From 841d738ef2f56f019f4b3b5dedd746dc4fa20f42 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 5 Sep 2023 17:33:39 +0800 Subject: [PATCH] update frontend build --- backend/web/assets/AccountInfo-00e84a61.js | 1 - backend/web/assets/AccountInfo-ba1104d6.js | 1 + .../web/assets/AccountSettings-19940ed7.js | 1 - .../web/assets/AccountSettings-ee4b14cb.js | 1 + backend/web/assets/AddOne-dbc3bffb.js | 1 - ...pace-5bfdea19.js => DataSpace-cdee42ed.js} | 2 +- ...8f650464.js => DatabaseDetail-565a03e8.js} | 2 +- ...95.js => DatabaseObjectCreate-67d5a16a.js} | 2 +- .../assets/DatabaseObjectDetail-c9c6824c.js | 1 - .../assets/DatabaseObjectDetail-d150ff81.js | 1 + ...db540c.js => DatabaseOutlined-a293b150.js} | 2 +- backend/web/assets/MarkdownEditor-38e43a8d.js | 1 - backend/web/assets/MarkdownEditor-de9455d7.js | 1 + .../web/assets/NewWorkflowModal-1c07a1e7.js | 1 - ...ue_vue_type_style_index_0_lang-f4546029.js | 1 + ...8fa17cc.js => QuestionPopover-3baee3b6.js} | 2 +- ...r-22c6610f.css => TextOutput-22c6610f.css} | 0 ...rer-3d08027d.js => TextOutput-39ff842e.js} | 160 +++++++++--------- .../web/assets/UploaderFieldUse-71f49711.js | 1 - .../web/assets/UploaderFieldUse-7351b05e.js | 1 + backend/web/assets/WorkflowEditor-0cc440c6.js | 51 ------ ...ec6859.css => WorkflowEditor-14bce7c1.css} | 2 +- backend/web/assets/WorkflowEditor-c7747b26.js | 51 ++++++ ...s => WorkflowRunRecordsDrawer-31cf6fb4.js} | 2 +- backend/web/assets/WorkflowSpace-0fcbdd01.js | 1 - backend/web/assets/WorkflowSpace-659ac1dd.css | 1 - backend/web/assets/WorkflowSpace-859f20d4.js | 1 + backend/web/assets/WorkflowSpace-fb9ee385.css | 1 + .../web/assets/WorkflowSpaceMain-5fe037a4.js | 1 - ...7ed.css => WorkflowSpaceMain-a9d4ce5d.css} | 2 +- .../web/assets/WorkflowSpaceMain-deef18a5.js | 1 + .../web/assets/WorkflowSpaceUse-4d5d179e.js | 1 - .../web/assets/WorkflowSpaceUse-a2195012.css | 1 - .../web/assets/WorkflowSpaceUse-b6815112.js | 1 + .../web/assets/WorkflowSpaceUse-de96bfae.css | 1 + .../web/assets/WorkflowTemplate-1699e51b.js | 1 + .../web/assets/WorkflowTemplate-99a45f9a.js | 1 - backend/web/assets/arc-b070a76c.js | 1 + backend/web/assets/arc-b31ff68c.js | 1 - ...2796.js => c4Diagram-c0b17d02-851b5ffe.js} | 2 +- .../assets/classDiagram-a8cc8886-0f4296f8.js | 1 + .../assets/classDiagram-a8cc8886-5888c769.js | 1 - .../classDiagram-v2-802a48d3-8a1fcf07.js | 2 - .../classDiagram-v2-802a48d3-d939e561.js | 2 + .../assets/createText-3b1f58a4-cb14bcdc.js | 7 + .../assets/createText-3b1f58a4-cf050b71.js | 7 - ...abase-adffb067.js => database-2818470e.js} | 2 +- backend/web/assets/edges-0005682e-04b6df38.js | 4 - backend/web/assets/edges-0005682e-ae86cacb.js | 4 + ...46a3.js => erDiagram-dedf2781-1cba01d0.js} | 8 +- ...b86a346.js => flowDb-ff651a22-eeadc954.js} | 6 +- ...8c.js => flowDiagram-d6f8fe3a-2517ad0a.js} | 8 +- .../flowDiagram-v2-58f49b84-4d4dd746.js | 1 + .../flowDiagram-v2-58f49b84-7c402221.js | 1 - ...chart-elk-definition-56584a6c-7691460b.js} | 2 +- ...7.js => ganttDiagram-088dbd90-259acb1a.js} | 6 +- ...s => gitGraphDiagram-e0ffc2d1-ad508ff6.js} | 10 +- .../{index-fb7c1fe5.js => index-ace83a9e.js} | 2 +- .../{index-51905ea3.js => index-ef7aa48c.js} | 6 +- backend/web/assets/index-f58d48f9-4ae439b4.js | 1 + backend/web/assets/index-f58d48f9-594fab58.js | 1 - ...2c.js => infoDiagram-64895a6e-d5aa12d6.js} | 6 +- ...js => journeyDiagram-adaa34f8-a7e82d80.js} | 8 +- backend/web/assets/layout-218ba7ee.js | 1 + backend/web/assets/layout-e00002c0.js | 1 - backend/web/assets/line-7fbcfe17.js | 1 - backend/web/assets/line-971ba693.js | 1 + backend/web/assets/linear-7918616e.js | 1 + backend/web/assets/linear-e4d2c5e8.js | 1 - ...> mindmap-definition-57868176-3f6fc2a7.js} | 2 +- ...148.js => pieDiagram-3fca7ce7-29dfb0d5.js} | 8 +- ...s => quadrantDiagram-0ca4be02-6c7c14fd.js} | 4 +- ...> requirementDiagram-e13af0f0-d96c1e5a.js} | 4 +- .../assets/sankeyDiagram-a7f8e230-2ffb6873.js | 8 - .../assets/sankeyDiagram-a7f8e230-5b80af1c.js | 8 + ...s => sequenceDiagram-84aa38e3-3c31c30f.js} | 2 +- .../assets/stateDiagram-9a586ac6-1cfcb484.js | 1 - .../assets/stateDiagram-9a586ac6-bcbbce57.js | 1 + .../stateDiagram-v2-96f2b9df-4f3bd457.js | 1 + .../stateDiagram-v2-96f2b9df-77469703.js | 1 - .../web/assets/styles-1b0c237a-9ea92680.js | 110 ------------ .../web/assets/styles-1b0c237a-f93a9f01.js | 110 ++++++++++++ ...f0c29e6.js => styles-622362e4-fd075d51.js} | 6 +- ...5345b95.js => styles-a1a6e33f-335bad62.js} | 4 +- .../web/assets/svgDraw-70101091-699797c4.js | 2 - .../web/assets/svgDraw-70101091-6aa9b265.js | 2 + .../assets/svgDrawCommon-42e92da3-e31904ea.js | 1 - .../assets/svgDrawCommon-42e92da3-fd0afe46.js | 1 + ... timeline-definition-1a90b03d-3181d6ca.js} | 8 +- ...nt-2cf446f2.js => userAccount-fedc0a01.js} | 2 +- ...e-87373af7.js => userDatabase-3faee336.js} | 2 +- backend/web/index.html | 2 +- frontend/pnpm-lock.yaml | 38 ++--- 93 files changed, 368 insertions(+), 369 deletions(-) delete mode 100644 backend/web/assets/AccountInfo-00e84a61.js create mode 100644 backend/web/assets/AccountInfo-ba1104d6.js delete mode 100644 backend/web/assets/AccountSettings-19940ed7.js create mode 100644 backend/web/assets/AccountSettings-ee4b14cb.js delete mode 100644 backend/web/assets/AddOne-dbc3bffb.js rename backend/web/assets/{DataSpace-5bfdea19.js => DataSpace-cdee42ed.js} (92%) rename backend/web/assets/{DatabaseDetail-8f650464.js => DatabaseDetail-565a03e8.js} (93%) rename backend/web/assets/{DatabaseObjectCreate-a9926f95.js => DatabaseObjectCreate-67d5a16a.js} (95%) delete mode 100644 backend/web/assets/DatabaseObjectDetail-c9c6824c.js create mode 100644 backend/web/assets/DatabaseObjectDetail-d150ff81.js rename backend/web/assets/{DatabaseOutlined-78db540c.js => DatabaseOutlined-a293b150.js} (97%) delete mode 100644 backend/web/assets/MarkdownEditor-38e43a8d.js create mode 100644 backend/web/assets/MarkdownEditor-de9455d7.js delete mode 100644 backend/web/assets/NewWorkflowModal-1c07a1e7.js create mode 100644 backend/web/assets/NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js rename backend/web/assets/{QuestionPopover-c8fa17cc.js => QuestionPopover-3baee3b6.js} (97%) rename backend/web/assets/{EchartsRenderer-22c6610f.css => TextOutput-22c6610f.css} (100%) rename backend/web/assets/{EchartsRenderer-3d08027d.js => TextOutput-39ff842e.js} (75%) delete mode 100644 backend/web/assets/UploaderFieldUse-71f49711.js create mode 100644 backend/web/assets/UploaderFieldUse-7351b05e.js delete mode 100644 backend/web/assets/WorkflowEditor-0cc440c6.js rename backend/web/assets/{WorkflowEditor-e7ec6859.css => WorkflowEditor-14bce7c1.css} (96%) create mode 100644 backend/web/assets/WorkflowEditor-c7747b26.js rename backend/web/assets/{WorkflowRunRecordsDrawer-55188329.js => WorkflowRunRecordsDrawer-31cf6fb4.js} (92%) delete mode 100644 backend/web/assets/WorkflowSpace-0fcbdd01.js delete mode 100644 backend/web/assets/WorkflowSpace-659ac1dd.css create mode 100644 backend/web/assets/WorkflowSpace-859f20d4.js create mode 100644 backend/web/assets/WorkflowSpace-fb9ee385.css delete mode 100644 backend/web/assets/WorkflowSpaceMain-5fe037a4.js rename backend/web/assets/{WorkflowSpaceMain-90b977ed.css => WorkflowSpaceMain-a9d4ce5d.css} (91%) create mode 100644 backend/web/assets/WorkflowSpaceMain-deef18a5.js delete mode 100644 backend/web/assets/WorkflowSpaceUse-4d5d179e.js delete mode 100644 backend/web/assets/WorkflowSpaceUse-a2195012.css create mode 100644 backend/web/assets/WorkflowSpaceUse-b6815112.js create mode 100644 backend/web/assets/WorkflowSpaceUse-de96bfae.css create mode 100644 backend/web/assets/WorkflowTemplate-1699e51b.js delete mode 100644 backend/web/assets/WorkflowTemplate-99a45f9a.js create mode 100644 backend/web/assets/arc-b070a76c.js delete mode 100644 backend/web/assets/arc-b31ff68c.js rename backend/web/assets/{c4Diagram-c0b17d02-90912796.js => c4Diagram-c0b17d02-851b5ffe.js} (79%) create mode 100644 backend/web/assets/classDiagram-a8cc8886-0f4296f8.js delete mode 100644 backend/web/assets/classDiagram-a8cc8886-5888c769.js delete mode 100644 backend/web/assets/classDiagram-v2-802a48d3-8a1fcf07.js create mode 100644 backend/web/assets/classDiagram-v2-802a48d3-d939e561.js create mode 100644 backend/web/assets/createText-3b1f58a4-cb14bcdc.js delete mode 100644 backend/web/assets/createText-3b1f58a4-cf050b71.js rename backend/web/assets/{database-adffb067.js => database-2818470e.js} (65%) delete mode 100644 backend/web/assets/edges-0005682e-04b6df38.js create mode 100644 backend/web/assets/edges-0005682e-ae86cacb.js rename backend/web/assets/{erDiagram-dedf2781-389146a3.js => erDiagram-dedf2781-1cba01d0.js} (66%) rename backend/web/assets/{flowDb-ff651a22-6b86a346.js => flowDb-ff651a22-eeadc954.js} (53%) rename backend/web/assets/{flowDiagram-d6f8fe3a-4570a98c.js => flowDiagram-d6f8fe3a-2517ad0a.js} (85%) create mode 100644 backend/web/assets/flowDiagram-v2-58f49b84-4d4dd746.js delete mode 100644 backend/web/assets/flowDiagram-v2-58f49b84-7c402221.js rename backend/web/assets/{flowchart-elk-definition-56584a6c-f7e4e75c.js => flowchart-elk-definition-56584a6c-7691460b.js} (89%) rename backend/web/assets/{ganttDiagram-088dbd90-86576d07.js => ganttDiagram-088dbd90-259acb1a.js} (50%) rename backend/web/assets/{gitGraphDiagram-e0ffc2d1-031a8a32.js => gitGraphDiagram-e0ffc2d1-ad508ff6.js} (57%) rename backend/web/assets/{index-fb7c1fe5.js => index-ace83a9e.js} (97%) rename backend/web/assets/{index-51905ea3.js => index-ef7aa48c.js} (98%) create mode 100644 backend/web/assets/index-f58d48f9-4ae439b4.js delete mode 100644 backend/web/assets/index-f58d48f9-594fab58.js rename backend/web/assets/{infoDiagram-64895a6e-76b1892c.js => infoDiagram-64895a6e-d5aa12d6.js} (75%) rename backend/web/assets/{journeyDiagram-adaa34f8-532986db.js => journeyDiagram-adaa34f8-a7e82d80.js} (72%) create mode 100644 backend/web/assets/layout-218ba7ee.js delete mode 100644 backend/web/assets/layout-e00002c0.js delete mode 100644 backend/web/assets/line-7fbcfe17.js create mode 100644 backend/web/assets/line-971ba693.js create mode 100644 backend/web/assets/linear-7918616e.js delete mode 100644 backend/web/assets/linear-e4d2c5e8.js rename backend/web/assets/{mindmap-definition-57868176-9f488f05.js => mindmap-definition-57868176-3f6fc2a7.js} (99%) rename backend/web/assets/{pieDiagram-3fca7ce7-72c81148.js => pieDiagram-3fca7ce7-29dfb0d5.js} (64%) rename backend/web/assets/{quadrantDiagram-0ca4be02-1efcd4bd.js => quadrantDiagram-0ca4be02-6c7c14fd.js} (72%) rename backend/web/assets/{requirementDiagram-e13af0f0-97e4242f.js => requirementDiagram-e13af0f0-d96c1e5a.js} (62%) delete mode 100644 backend/web/assets/sankeyDiagram-a7f8e230-2ffb6873.js create mode 100644 backend/web/assets/sankeyDiagram-a7f8e230-5b80af1c.js rename backend/web/assets/{sequenceDiagram-84aa38e3-a1db5076.js => sequenceDiagram-84aa38e3-3c31c30f.js} (80%) delete mode 100644 backend/web/assets/stateDiagram-9a586ac6-1cfcb484.js create mode 100644 backend/web/assets/stateDiagram-9a586ac6-bcbbce57.js create mode 100644 backend/web/assets/stateDiagram-v2-96f2b9df-4f3bd457.js delete mode 100644 backend/web/assets/stateDiagram-v2-96f2b9df-77469703.js delete mode 100644 backend/web/assets/styles-1b0c237a-9ea92680.js create mode 100644 backend/web/assets/styles-1b0c237a-f93a9f01.js rename backend/web/assets/{styles-622362e4-1f0c29e6.js => styles-622362e4-fd075d51.js} (65%) rename backend/web/assets/{styles-a1a6e33f-c5345b95.js => styles-a1a6e33f-335bad62.js} (70%) delete mode 100644 backend/web/assets/svgDraw-70101091-699797c4.js create mode 100644 backend/web/assets/svgDraw-70101091-6aa9b265.js delete mode 100644 backend/web/assets/svgDrawCommon-42e92da3-e31904ea.js create mode 100644 backend/web/assets/svgDrawCommon-42e92da3-fd0afe46.js rename backend/web/assets/{timeline-definition-1a90b03d-12fd19f1.js => timeline-definition-1a90b03d-3181d6ca.js} (79%) rename backend/web/assets/{userAccount-2cf446f2.js => userAccount-fedc0a01.js} (79%) rename backend/web/assets/{userDatabase-87373af7.js => userDatabase-3faee336.js} (91%) diff --git a/backend/web/assets/AccountInfo-00e84a61.js b/backend/web/assets/AccountInfo-00e84a61.js deleted file mode 100644 index fcc9651f..00000000 --- a/backend/web/assets/AccountInfo-00e84a61.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as y,U as x,P as t,o as A,K as g,x as e,c as o,u as c,G as h,R as s,H as r}from"./index-51905ea3.js";import{u as v}from"./userAccount-2cf446f2.js";const V={__name:"AccountInfo",setup(I){const _=v(),{userAccount:u}=y(_),{t:a}=x();return(w,B)=>{const n=t("a-typography-text"),l=t("a-divider"),i=t("a-list-item"),p=t("a-list"),d=t("a-card"),m=t("a-col"),f=t("a-row");return A(),g(f,{type:"flex",justify:"center",gutter:[16,16]},{default:e(()=>[o(m,{span:"12"},{default:e(()=>[o(d,{title:c(a)("userAccount.accountInfo.my_account")},{default:e(()=>[o(p,{"item-layout":"horizontal"},{default:e(()=>[o(i,null,{default:e(()=>[h("div",null,[o(n,{strong:""},{default:e(()=>[s(r(c(a)("userAccount.accountInfo.my_credits")),1)]),_:1}),o(l,{type:"vertical"}),o(n,{type:"success"},{default:e(()=>[s(r(c(u).credits),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})}}};export{V as default}; diff --git a/backend/web/assets/AccountInfo-ba1104d6.js b/backend/web/assets/AccountInfo-ba1104d6.js new file mode 100644 index 00000000..d62a09b1 --- /dev/null +++ b/backend/web/assets/AccountInfo-ba1104d6.js @@ -0,0 +1 @@ +import{a1 as y,U as x,P as t,o as A,K as g,x as e,c as o,u as c,G as h,R as s,H as r}from"./index-ef7aa48c.js";import{u as v}from"./userAccount-fedc0a01.js";const V={__name:"AccountInfo",setup(I){const _=v(),{userAccount:u}=y(_),{t:a}=x();return(w,B)=>{const n=t("a-typography-text"),l=t("a-divider"),i=t("a-list-item"),p=t("a-list"),d=t("a-card"),m=t("a-col"),f=t("a-row");return A(),g(f,{type:"flex",justify:"center",gutter:[16,16]},{default:e(()=>[o(m,{span:"12"},{default:e(()=>[o(d,{title:c(a)("userAccount.accountInfo.my_account")},{default:e(()=>[o(p,{"item-layout":"horizontal"},{default:e(()=>[o(i,null,{default:e(()=>[h("div",null,[o(n,{strong:""},{default:e(()=>[s(r(c(a)("userAccount.accountInfo.my_credits")),1)]),_:1}),o(l,{type:"vertical"}),o(n,{type:"success"},{default:e(()=>[s(r(c(u).credits),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})}}};export{V as default}; diff --git a/backend/web/assets/AccountSettings-19940ed7.js b/backend/web/assets/AccountSettings-19940ed7.js deleted file mode 100644 index 46f36765..00000000 --- a/backend/web/assets/AccountSettings-19940ed7.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as y,U as g,P as t,o as x,K as A,x as e,c as o,u as a,R as s,H as _}from"./index-51905ea3.js";import{u as S}from"./userAccount-2cf446f2.js";const C={__name:"AccountSettings",setup(h){const r=S(),{userAccount:u}=y(r),{t:c}=g();return(v,w)=>{const n=t("a-typography-text"),l=t("a-divider"),i=t("a-list-item"),p=t("a-list"),m=t("a-card"),d=t("a-col"),f=t("a-row");return x(),A(f,{type:"flex",justify:"center",gutter:[16,16]},{default:e(()=>[o(d,{xs:24,lg:12},{default:e(()=>[o(m,{title:a(c)("userAccount.accountSettings.account_settings")},{default:e(()=>[o(p,{"item-layout":"horizontal"},{default:e(()=>[o(i,null,{default:e(()=>[o(n,{strong:""},{default:e(()=>[s(_(a(c)("userAccount.accountSettings.account_email")),1)]),_:1}),o(l,{type:"vertical"}),o(n,{type:"secondary"},{default:e(()=>[s(_(a(u).email),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})}}};export{C as default}; diff --git a/backend/web/assets/AccountSettings-ee4b14cb.js b/backend/web/assets/AccountSettings-ee4b14cb.js new file mode 100644 index 00000000..b4aabc96 --- /dev/null +++ b/backend/web/assets/AccountSettings-ee4b14cb.js @@ -0,0 +1 @@ +import{a1 as y,U as g,P as t,o as x,K as A,x as e,c as o,u as a,R as s,H as _}from"./index-ef7aa48c.js";import{u as S}from"./userAccount-fedc0a01.js";const C={__name:"AccountSettings",setup(h){const r=S(),{userAccount:u}=y(r),{t:c}=g();return(v,w)=>{const n=t("a-typography-text"),l=t("a-divider"),i=t("a-list-item"),p=t("a-list"),m=t("a-card"),d=t("a-col"),f=t("a-row");return x(),A(f,{type:"flex",justify:"center",gutter:[16,16]},{default:e(()=>[o(d,{xs:24,lg:12},{default:e(()=>[o(m,{title:a(c)("userAccount.accountSettings.account_settings")},{default:e(()=>[o(p,{"item-layout":"horizontal"},{default:e(()=>[o(i,null,{default:e(()=>[o(n,{strong:""},{default:e(()=>[s(_(a(c)("userAccount.accountSettings.account_email")),1)]),_:1}),o(l,{type:"vertical"}),o(n,{type:"secondary"},{default:e(()=>[s(_(a(u).email),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})}}};export{C as default}; diff --git a/backend/web/assets/AddOne-dbc3bffb.js b/backend/web/assets/AddOne-dbc3bffb.js deleted file mode 100644 index f92e8d37..00000000 --- a/backend/web/assets/AddOne-dbc3bffb.js +++ /dev/null @@ -1 +0,0 @@ -import{I as i}from"./index-fb7c1fe5.js";import{c as t}from"./index-51905ea3.js";const l=i("add-one",!1,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M24 16V32",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M16 24L32 24",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])});export{l as A}; diff --git a/backend/web/assets/DataSpace-5bfdea19.js b/backend/web/assets/DataSpace-cdee42ed.js similarity index 92% rename from backend/web/assets/DataSpace-5bfdea19.js rename to backend/web/assets/DataSpace-cdee42ed.js index b5dec9e3..de520cfa 100644 --- a/backend/web/assets/DataSpace-5bfdea19.js +++ b/backend/web/assets/DataSpace-cdee42ed.js @@ -1 +1 @@ -import{U as P,r as g,aa as T,m as C,D as G,a2 as f,P as s,o as l,e as u,c as r,x as t,aY as H,R as _,H as m,u as p,F as h,I as w,K as b,aZ as K,y as Y}from"./index-51905ea3.js";import{u as Z}from"./userDatabase-87373af7.js";import{d as v}from"./database-adffb067.js";const j={class:"dataspace-container"},q={key:1},z={key:2},J={key:3},ea={__name:"DataSpace",setup(Q){const{t:a}=P(),x=g(!0),D=T(),R=Z(),d=C({columns:[{name:a("workspace.dataSpace.database_name"),dataIndex:"name",key:"name"},{title:a("common.status"),dataIndex:"status",key:"status",width:"200px"},{title:a("common.tags"),key:"tags",dataIndex:"tags",width:"200px"},{title:a("common.action"),key:"action",width:"200px"}],data:[],hoverRowVid:null,customRow:n=>({style:{cursor:"pointer"},onClick:async e=>{(e.target.classList.contains("ant-table-cell")||e.target.classList.contains("database-title"))&&await D.push(`/data/${n.vid}`)},onMouseenter:e=>{d.hoverRowVid=n.vid},onMouseleave:e=>{d.hoverRowVid=null}})}),y=async()=>{const n=await v("list",{});n.status==200?(R.setUserDatabases(n.data),d.data=n.data.map(e=>({...e,color:H[e.status],tags:[]})),x.value=!1):f.error(n.msg)};G(async()=>{await y()});const o=C({open:g(!1),creating:g(!1),create:async()=>{o.creating=!0,(await v("create",{name:o.databaseName})).status===200?f.success(a("workspace.dataSpace.create_success")):f.error(a("workspace.dataSpace.create_failed")),await y(),o.creating=!1,o.open=!1}}),N=async n=>{(await v("delete",{vid:n})).status===200?f.success(a("workspace.dataSpace.delete_success")):f.error(a("workspace.dataSpace.delete_failed")),await y()};return(n,e)=>{const I=s("a-button"),L=s("a-input"),U=s("a-form-item"),V=s("a-modal"),M=s("a-typography-text"),S=s("a-tag"),B=s("a-typography-link"),$=s("a-popconfirm"),O=s("a-table"),A=s("a-card"),E=s("a-col"),F=s("a-row");return l(),u("div",j,[r(F,{align:"center",gutter:[16,16]},{default:t(()=>[r(E,{xl:16,lg:18,md:20,sm:22,xs:24},{default:t(()=>[r(A,{loading:x.value},{extra:t(()=>[r(I,{type:"primary",onClick:e[0]||(e[0]=c=>o.open=!0)},{default:t(()=>[_(m(p(a)("workspace.dataSpace.create")),1)]),_:1}),r(V,{open:o.open,"onUpdate:open":e[2]||(e[2]=c=>o.open=c),title:p(a)("workspace.dataSpace.create"),onOk:o.create,confirmLoading:o.creating},{default:t(()=>[r(U,{label:p(a)("workspace.dataSpace.database_name")},{default:t(()=>[r(L,{value:o.databaseName,"onUpdate:value":e[1]||(e[1]=c=>o.databaseName=c)},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["open","title","onOk","confirmLoading"])]),default:t(()=>[r(O,{columns:d.columns,customRow:d.customRow,"data-source":d.data},{headerCell:t(({column:c})=>[c.key==="name"?(l(),u(h,{key:0},[_(m(p(a)("workspace.dataSpace.database_name")),1)],64)):w("",!0)]),bodyCell:t(({column:c,record:i})=>[c.key==="name"?(l(),b(M,{key:0,class:"database-title"},{default:t(()=>[_(m(i.name),1)]),_:2},1024)):c.key==="status"?(l(),u("span",q,[r(S,{color:i.color},{default:t(()=>[i.status==="CREATING"?(l(),b(p(K),{key:0})):w("",!0),_(" "+m(p(a)(`workspace.dataSpace.status_${i.status.toLowerCase()}`)),1)]),_:2},1032,["color"])])):c.key==="tags"?(l(),u("span",z,[(l(!0),u(h,null,Y(i.tags,k=>(l(),b(S,{key:k},{default:t(()=>[_(m(k.toUpperCase()),1)]),_:2},1024))),128))])):c.key==="action"?(l(),u("span",J,[r($,{title:p(a)("workspace.dataSpace.delete_confirm"),onConfirm:k=>N(i.vid)},{default:t(()=>[r(B,{type:"danger"},{default:t(()=>[_(m(p(a)("common.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])])):w("",!0)]),_:1},8,["columns","customRow","data-source"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}};export{ea as default}; +import{U as P,r as g,a9 as T,m as C,D as G,a4 as f,P as s,o as l,e as u,c as r,x as t,aY as H,R as _,H as m,u as p,F as h,I as w,K as b,aZ as K,y as Y}from"./index-ef7aa48c.js";import{u as Z}from"./userDatabase-3faee336.js";import{d as v}from"./database-2818470e.js";const j={class:"dataspace-container"},q={key:1},z={key:2},J={key:3},ea={__name:"DataSpace",setup(Q){const{t:a}=P(),x=g(!0),D=T(),R=Z(),d=C({columns:[{name:a("workspace.dataSpace.database_name"),dataIndex:"name",key:"name"},{title:a("common.status"),dataIndex:"status",key:"status",width:"200px"},{title:a("common.tags"),key:"tags",dataIndex:"tags",width:"200px"},{title:a("common.action"),key:"action",width:"200px"}],data:[],hoverRowVid:null,customRow:n=>({style:{cursor:"pointer"},onClick:async e=>{(e.target.classList.contains("ant-table-cell")||e.target.classList.contains("database-title"))&&await D.push(`/data/${n.vid}`)},onMouseenter:e=>{d.hoverRowVid=n.vid},onMouseleave:e=>{d.hoverRowVid=null}})}),y=async()=>{const n=await v("list",{});n.status==200?(R.setUserDatabases(n.data),d.data=n.data.map(e=>({...e,color:H[e.status],tags:[]})),x.value=!1):f.error(n.msg)};G(async()=>{await y()});const o=C({open:g(!1),creating:g(!1),create:async()=>{o.creating=!0,(await v("create",{name:o.databaseName})).status===200?f.success(a("workspace.dataSpace.create_success")):f.error(a("workspace.dataSpace.create_failed")),await y(),o.creating=!1,o.open=!1}}),N=async n=>{(await v("delete",{vid:n})).status===200?f.success(a("workspace.dataSpace.delete_success")):f.error(a("workspace.dataSpace.delete_failed")),await y()};return(n,e)=>{const I=s("a-button"),L=s("a-input"),U=s("a-form-item"),V=s("a-modal"),M=s("a-typography-text"),S=s("a-tag"),B=s("a-typography-link"),$=s("a-popconfirm"),O=s("a-table"),A=s("a-card"),E=s("a-col"),F=s("a-row");return l(),u("div",j,[r(F,{align:"center",gutter:[16,16]},{default:t(()=>[r(E,{xl:16,lg:18,md:20,sm:22,xs:24},{default:t(()=>[r(A,{loading:x.value},{extra:t(()=>[r(I,{type:"primary",onClick:e[0]||(e[0]=c=>o.open=!0)},{default:t(()=>[_(m(p(a)("workspace.dataSpace.create")),1)]),_:1}),r(V,{open:o.open,"onUpdate:open":e[2]||(e[2]=c=>o.open=c),title:p(a)("workspace.dataSpace.create"),onOk:o.create,confirmLoading:o.creating},{default:t(()=>[r(U,{label:p(a)("workspace.dataSpace.database_name")},{default:t(()=>[r(L,{value:o.databaseName,"onUpdate:value":e[1]||(e[1]=c=>o.databaseName=c)},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["open","title","onOk","confirmLoading"])]),default:t(()=>[r(O,{columns:d.columns,customRow:d.customRow,"data-source":d.data},{headerCell:t(({column:c})=>[c.key==="name"?(l(),u(h,{key:0},[_(m(p(a)("workspace.dataSpace.database_name")),1)],64)):w("",!0)]),bodyCell:t(({column:c,record:i})=>[c.key==="name"?(l(),b(M,{key:0,class:"database-title"},{default:t(()=>[_(m(i.name),1)]),_:2},1024)):c.key==="status"?(l(),u("span",q,[r(S,{color:i.color},{default:t(()=>[i.status==="CREATING"?(l(),b(p(K),{key:0})):w("",!0),_(" "+m(p(a)(`workspace.dataSpace.status_${i.status.toLowerCase()}`)),1)]),_:2},1032,["color"])])):c.key==="tags"?(l(),u("span",z,[(l(!0),u(h,null,Y(i.tags,k=>(l(),b(S,{key:k},{default:t(()=>[_(m(k.toUpperCase()),1)]),_:2},1024))),128))])):c.key==="action"?(l(),u("span",J,[r($,{title:p(a)("workspace.dataSpace.delete_confirm"),onConfirm:k=>N(i.vid)},{default:t(()=>[r(B,{type:"danger"},{default:t(()=>[_(m(p(a)("common.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])])):w("",!0)]),_:1},8,["columns","customRow","data-source"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}};export{ea as default}; diff --git a/backend/web/assets/DatabaseDetail-8f650464.js b/backend/web/assets/DatabaseDetail-565a03e8.js similarity index 93% rename from backend/web/assets/DatabaseDetail-8f650464.js rename to backend/web/assets/DatabaseDetail-565a03e8.js index 51762eca..7c4c5ae6 100644 --- a/backend/web/assets/DatabaseDetail-8f650464.js +++ b/backend/web/assets/DatabaseDetail-565a03e8.js @@ -1 +1 @@ -import{c as o,A as U,U as q,r as R,a9 as J,aa as Q,m as W,b as Y,a2 as w,D as K,P as f,o as i,e as v,x as a,u as r,R as p,H as _,F as O,I as h,K as g,aZ as ee,V as te}from"./index-51905ea3.js";import{a as $,d as ae}from"./database-adffb067.js";import{_ as ne}from"./_plugin-vue_export-helper-c27b6911.js";import{C as oe,D as V}from"./DatabaseOutlined-78db540c.js";var se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};const re=se;function L(s){for(var e=1;e({total:n.total,current:n.current,pageSize:n.pageSize})),handleTableChange:(c,l,b)=>{n.load({page_size:c.pageSize,page:c.current,sort_field:b.field,sort_order:b.order})},hoverRowOid:null,customRow:c=>({style:{cursor:"pointer"},onClick:async l=>{(l.target.classList.contains("ant-table-cell")||l.target.classList.contains("object-title"))&&await m.push(`/data/${k}/object/${c.oid}`)},onMouseenter:l=>{n.hoverRowOid=c.vid},onMouseleave:l=>{n.hoverRowOid=null}}),load:async c=>{n.loading=!0;const l=await $("list",{vid:k,...c});l.status==200?n.data=l.data.objects.map(b=>(b.create_time=new Date(b.create_time).toLocaleString(),b)):w.error(l.msg),n.total=l.data.total,n.pageSize=l.data.page_size,n.current=l.data.page,n.loading=!1}}),T=async()=>{await n.load({});const c=await ae("get",{vid:k});c.status==200?(D.value=c.data,t.value=!1):w.error(c.msg)};K(async()=>{await T()});const B=async()=>{await m.push(`/data/${k}/create`)},E=c=>{$("delete",{oid:c}).then(l=>{l.status===200?w.success(e("workspace.databaseDetail.delete_success")):w.error(e("workspace.databaseDetail.delete_failed")),n.load({})})};return(c,l)=>{const b=f("router-link"),S=f("a-breadcrumb-item"),H=f("a-breadcrumb"),z=f("a-col"),N=f("a-button"),x=f("a-typography-text"),C=f("a-tag"),I=f("a-typography-link"),F=f("a-popconfirm"),G=f("a-table"),X=f("a-card"),Z=f("a-row");return i(),v("div",_e,[o(Z,{align:"center",gutter:[16,16]},{default:a(()=>[o(z,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[o(H,null,{default:a(()=>[o(S,null,{default:a(()=>[o(b,{to:"/data"},{default:a(()=>[o(r(oe)),p(" "+_(r(e)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1}),o(S,null,{default:a(()=>[o(r(V)),p(" "+_(D.value.name),1)]),_:1})]),_:1})]),_:1}),o(z,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[o(X,{loading:t.value},{title:a(()=>[o(r(V)),p(" "+_(D.value.name),1)]),extra:a(()=>[o(N,{type:"primary",onClick:B},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.add_object")),1)]),_:1})]),default:a(()=>[o(G,{loading:n.loading,customRow:n.customRow,columns:n.columns,"data-source":n.data,pagination:n.pagination,onChange:n.handleTableChange},{headerCell:a(({column:y})=>[y.key==="title"?(i(),v(O,{key:0},[p(_(r(e)("workspace.databaseDetail.object_title")),1)],64)):h("",!0)]),bodyCell:a(({column:y,record:d})=>{var A;return[y.key==="title"?(i(),v(O,{key:0},[d.status=="PR"?(i(),g(x,{key:0,disabled:""},{default:a(()=>[p(_(d.title)+" ",1),o(r(ee))]),_:2},1024)):(i(),g(x,{key:1,class:"object-title"},{default:a(()=>[p(_(d.title),1)]),_:2},1024))],64)):y.key==="data_type"?(i(),v("span",me,[d.data_type.toUpperCase()=="TEXT"?(i(),g(C,{key:0,color:"blue"},{default:a(()=>[o(r(te)),p(" "+_(r(e)(`workspace.databaseDetail.data_type_${d.data_type.toUpperCase()}`)),1)]),_:2},1024)):h("",!0),d.data_type.toUpperCase()=="IMAGE"?(i(),g(C,{key:1,color:"green"},{default:a(()=>[o(r(pe)),p(" "+_(r(e)(`workspace.databaseDetail.data_type_${d.data_type.toUpperCase()}`)),1)]),_:2},1024)):h("",!0),d.data_type.toUpperCase()=="AUDIO"?(i(),g(C,{key:2,color:"purple"},{default:a(()=>[o(r(ce)),p(" "+_(r(e)(`workspace.databaseDetail.data_type_${d.data_type.toUpperCase()}`)),1)]),_:2},1024)):h("",!0)])):y.key==="source_url"?(i(),v(O,{key:2},[((A=d.source_url)==null?void 0:A.length)>0?(i(),g(I,{key:0,href:d.source_url,target:"_blank"},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.source_url")),1)]),_:2},1032,["href"])):(i(),g(x,{key:1,disabled:""},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.source_url")),1)]),_:1}))],64)):y.key==="action"?(i(),v(O,{key:3},[d.status!="PR"?(i(),g(F,{key:0,placement:"leftTop",title:r(e)("workspace.databaseDetail.delete_confirm"),onConfirm:be=>E(d.oid)},{default:a(()=>[o(I,{type:"danger"},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])):h("",!0)],64)):h("",!0)]}),_:1},8,["loading","customRow","columns","data-source","pagination","onChange"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}},ke=ne(fe,[["__scopeId","data-v-956bc8c6"]]);export{ke as default}; +import{c as o,A as U,U as q,r as R,a8 as J,a9 as Q,m as W,b as Y,a4 as w,D as K,P as f,o as i,e as v,x as a,u as r,R as p,H as _,F as O,I as h,K as g,aZ as ee,X as te}from"./index-ef7aa48c.js";import{a as $,d as ae}from"./database-2818470e.js";import{_ as ne}from"./_plugin-vue_export-helper-c27b6911.js";import{C as oe,D as V}from"./DatabaseOutlined-a293b150.js";var se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"}}]},name:"audio",theme:"outlined"};const re=se;function L(s){for(var e=1;e({total:n.total,current:n.current,pageSize:n.pageSize})),handleTableChange:(c,l,b)=>{n.load({page_size:c.pageSize,page:c.current,sort_field:b.field,sort_order:b.order})},hoverRowOid:null,customRow:c=>({style:{cursor:"pointer"},onClick:async l=>{(l.target.classList.contains("ant-table-cell")||l.target.classList.contains("object-title"))&&await m.push(`/data/${k}/object/${c.oid}`)},onMouseenter:l=>{n.hoverRowOid=c.vid},onMouseleave:l=>{n.hoverRowOid=null}}),load:async c=>{n.loading=!0;const l=await $("list",{vid:k,...c});l.status==200?n.data=l.data.objects.map(b=>(b.create_time=new Date(b.create_time).toLocaleString(),b)):w.error(l.msg),n.total=l.data.total,n.pageSize=l.data.page_size,n.current=l.data.page,n.loading=!1}}),T=async()=>{await n.load({});const c=await ae("get",{vid:k});c.status==200?(D.value=c.data,t.value=!1):w.error(c.msg)};K(async()=>{await T()});const B=async()=>{await m.push(`/data/${k}/create`)},E=c=>{$("delete",{oid:c}).then(l=>{l.status===200?w.success(e("workspace.databaseDetail.delete_success")):w.error(e("workspace.databaseDetail.delete_failed")),n.load({})})};return(c,l)=>{const b=f("router-link"),S=f("a-breadcrumb-item"),H=f("a-breadcrumb"),z=f("a-col"),N=f("a-button"),x=f("a-typography-text"),C=f("a-tag"),I=f("a-typography-link"),F=f("a-popconfirm"),X=f("a-table"),G=f("a-card"),Z=f("a-row");return i(),v("div",_e,[o(Z,{align:"center",gutter:[16,16]},{default:a(()=>[o(z,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[o(H,null,{default:a(()=>[o(S,null,{default:a(()=>[o(b,{to:"/data"},{default:a(()=>[o(r(oe)),p(" "+_(r(e)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1}),o(S,null,{default:a(()=>[o(r(V)),p(" "+_(D.value.name),1)]),_:1})]),_:1})]),_:1}),o(z,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[o(G,{loading:t.value},{title:a(()=>[o(r(V)),p(" "+_(D.value.name),1)]),extra:a(()=>[o(N,{type:"primary",onClick:B},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.add_object")),1)]),_:1})]),default:a(()=>[o(X,{loading:n.loading,customRow:n.customRow,columns:n.columns,"data-source":n.data,pagination:n.pagination,onChange:n.handleTableChange},{headerCell:a(({column:y})=>[y.key==="title"?(i(),v(O,{key:0},[p(_(r(e)("workspace.databaseDetail.object_title")),1)],64)):h("",!0)]),bodyCell:a(({column:y,record:d})=>{var A;return[y.key==="title"?(i(),v(O,{key:0},[d.status=="PR"?(i(),g(x,{key:0,disabled:""},{default:a(()=>[p(_(d.title)+" ",1),o(r(ee))]),_:2},1024)):(i(),g(x,{key:1,class:"object-title"},{default:a(()=>[p(_(d.title),1)]),_:2},1024))],64)):y.key==="data_type"?(i(),v("span",me,[d.data_type.toUpperCase()=="TEXT"?(i(),g(C,{key:0,color:"blue"},{default:a(()=>[o(r(te)),p(" "+_(r(e)(`workspace.databaseDetail.data_type_${d.data_type.toUpperCase()}`)),1)]),_:2},1024)):h("",!0),d.data_type.toUpperCase()=="IMAGE"?(i(),g(C,{key:1,color:"green"},{default:a(()=>[o(r(pe)),p(" "+_(r(e)(`workspace.databaseDetail.data_type_${d.data_type.toUpperCase()}`)),1)]),_:2},1024)):h("",!0),d.data_type.toUpperCase()=="AUDIO"?(i(),g(C,{key:2,color:"purple"},{default:a(()=>[o(r(ce)),p(" "+_(r(e)(`workspace.databaseDetail.data_type_${d.data_type.toUpperCase()}`)),1)]),_:2},1024)):h("",!0)])):y.key==="source_url"?(i(),v(O,{key:2},[((A=d.source_url)==null?void 0:A.length)>0?(i(),g(I,{key:0,href:d.source_url,target:"_blank"},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.source_url")),1)]),_:2},1032,["href"])):(i(),g(x,{key:1,disabled:""},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.source_url")),1)]),_:1}))],64)):y.key==="action"?(i(),v(O,{key:3},[d.status!="PR"?(i(),g(F,{key:0,placement:"leftTop",title:r(e)("workspace.databaseDetail.delete_confirm"),onConfirm:be=>E(d.oid)},{default:a(()=>[o(I,{type:"danger"},{default:a(()=>[p(_(r(e)("workspace.databaseDetail.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])):h("",!0)],64)):h("",!0)]}),_:1},8,["loading","customRow","columns","data-source","pagination","onChange"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}},ke=ne(fe,[["__scopeId","data-v-956bc8c6"]]);export{ke as default}; diff --git a/backend/web/assets/DatabaseObjectCreate-a9926f95.js b/backend/web/assets/DatabaseObjectCreate-67d5a16a.js similarity index 95% rename from backend/web/assets/DatabaseObjectCreate-a9926f95.js rename to backend/web/assets/DatabaseObjectCreate-67d5a16a.js index 5e82d86f..237fbfae 100644 --- a/backend/web/assets/DatabaseObjectCreate-a9926f95.js +++ b/backend/web/assets/DatabaseObjectCreate-67d5a16a.js @@ -1 +1 @@ -import{U as ee,r as j,a9 as te,aa as ae,m as F,b as le,D as oe,P as d,o as u,e as h,c as t,x as e,a2 as C,u as l,R as c,H as n,a_ as se,K as i,F as N,I as b,G as re,a$ as de,a6 as ne}from"./index-51905ea3.js";import{_ as ue}from"./UploaderFieldUse-71f49711.js";import{_ as ce}from"./QuestionPopover-c8fa17cc.js";import{d as _e,a as ie}from"./database-adffb067.js";import{_ as be}from"./_plugin-vue_export-helper-c27b6911.js";import{C as me,D as pe}from"./DatabaseOutlined-78db540c.js";const fe={key:0,class:"loading-container"},ke={key:1,class:"dataspace-container"},ve={href:"objectInfo.source_url",target:"_blank"},je={__name:"DatabaseObjectCreate",setup(we){const{t:a}=ee(),w=j(!0),q=te(),P=ae(),O=q.params.databaseId,g=j({}),o=F({add_method:"url",use_oversea_crawler:!1,source_url:"",files:[],title:"",content:""}),_=F({split_method:"general",chunk_length:1e3,delimiter:"\\n",remove_url_and_email:!1}),m=j(0),A=j([{title:a("workspace.databaseObjectCreate.add_object"),content:"First-content"},{title:a("workspace.databaseObjectCreate.process_rules"),content:"Second-content"},{title:a("workspace.databaseObjectCreate.finish"),content:"Last-content"}]),H=le(()=>{if(m.value==0)return o.add_method=="url"?o.source_url=="":o.add_method=="files"?o.files.length==0:o.title==""||o.content=="";m.value==1}),z=async()=>{const v=await _e("get",{vid:O});v.status==200?g.value=v.data:C.error(v.msg)};oe(async()=>{w.value=!0,await z(),w.value=!1});const y=j(!1),E=async()=>{if(o.add_method=="text"&&o.content.length==0){C.error(a("workspace.databaseObjectCreate.content_empty"));return}y.value=!0,(await ie("create",{vid:O,...o,process_rules:_})).status===200?C.success(a("workspace.databaseObjectCreate.create_success")):C.error(a("workspace.databaseObjectCreate.create_failed")),y.value=!1,await P.push(`/data/${O}`)};return(v,s)=>{const G=d("a-spin"),$=d("router-link"),x=d("a-breadcrumb-item"),K=d("a-breadcrumb"),U=d("a-col"),L=d("a-steps"),k=d("a-radio-button"),V=d("a-radio-group"),p=d("a-form-item"),S=d("a-checkbox"),D=d("a-input"),M=d("a-textarea"),B=d("a-form"),T=d("a-input-number"),f=d("a-descriptions-item"),J=d("a-list-item-meta"),Q=d("a-list-item"),W=d("a-list"),X=d("a-descriptions"),R=d("a-row"),I=d("a-button"),Y=d("a-space"),Z=d("a-card");return w.value?(u(),h("div",fe,[t(G)])):(u(),h("div",ke,[t(R,{justify:"center",gutter:[16,16]},{default:e(()=>[t(U,{xl:16,lg:18,md:20,sm:22,xs:24},{default:e(()=>[t(K,null,{default:e(()=>[t(x,null,{default:e(()=>[t($,{to:"/data"},{default:e(()=>[t(l(me)),c(" "+n(l(a)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1}),t(x,null,{default:e(()=>[t($,{to:`/data/${g.value.vid}`},{default:e(()=>[t(l(pe)),c(" "+n(g.value.name),1)]),_:1},8,["to"])]),_:1}),t(x,null,{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_object")),1)]),_:1})]),_:1})]),_:1}),t(U,{xl:16,lg:18,md:20,sm:22,xs:24},{default:e(()=>[t(Z,{loading:w.value},{title:e(()=>[t(l(se)),c(" "+n(l(a)("workspace.databaseObjectCreate.add_object")),1)]),default:e(()=>[t(L,{current:m.value,items:A.value,style:{"margin-bottom":"30px"}},null,8,["current","items"]),m.value==0?(u(),i(B,{key:0,"label-col":{span:6}},{default:e(()=>[t(p,{label:l(a)("workspace.databaseObjectCreate.add_method")},{default:e(()=>[t(V,{value:o.add_method,"onUpdate:value":s[0]||(s[0]=r=>o.add_method=r)},{default:e(()=>[t(k,{value:"url"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_method_url")),1)]),_:1}),t(k,{value:"files"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_method_files")),1)]),_:1}),t(k,{value:"text"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_method_text")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),o.add_method=="url"?(u(),h(N,{key:0},[o.add_method=="url"?(u(),i(p,{key:0,label:l(a)("workspace.databaseObjectCreate.use_oversea_crawler")},{default:e(()=>[t(S,{checked:o.use_oversea_crawler,"onUpdate:checked":s[1]||(s[1]=r=>o.use_oversea_crawler=r)},null,8,["checked"])]),_:1},8,["label"])):b("",!0),t(p,{label:l(a)("workspace.databaseObjectCreate.object_source_url")},{default:e(()=>[t(D,{value:o.source_url,"onUpdate:value":s[2]||(s[2]=r=>o.source_url=r)},null,8,["value"])]),_:1},8,["label"])],64)):b("",!0),o.add_method=="files"?(u(),i(ue,{key:1,modelValue:o.files,"onUpdate:modelValue":s[3]||(s[3]=r=>o.files=r),multiple:!0,style:{"margin-bottom":"30px"}},null,8,["modelValue"])):b("",!0),o.add_method=="text"?(u(),h(N,{key:2},[t(p,{label:l(a)("workspace.databaseObjectCreate.object_title")},{default:e(()=>[t(D,{value:o.title,"onUpdate:value":s[4]||(s[4]=r=>o.title=r)},null,8,["value"])]),_:1},8,["label"]),t(p,{label:l(a)("workspace.databaseObjectCreate.object_content")},{default:e(()=>[t(M,{value:o.content,"onUpdate:value":s[5]||(s[5]=r=>o.content=r),"auto-size":!0,"show-count":!0},null,8,["value"])]),_:1},8,["label"])],64)):b("",!0)]),_:1})):b("",!0),m.value==1?(u(),i(B,{key:1,"label-col":{span:6}},{default:e(()=>[t(p,{label:l(a)("workspace.databaseObjectCreate.split_method")},{default:e(()=>[t(V,{value:_.split_method,"onUpdate:value":s[6]||(s[6]=r=>_.split_method=r)},{default:e(()=>[t(k,{value:"general"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_general")),1)]),_:1}),t(k,{value:"delimeter"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_delimeter")),1)]),_:1}),t(k,{value:"markdown"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_markdown")),1)]),_:1}),t(k,{value:"table"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_table")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),["delimeter","table"].includes(_.split_method)?b("",!0):(u(),i(p,{key:0},{label:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.chunk_length"))+" ",1),t(ce,{contents:[l(a)("workspace.databaseObjectCreate.question.chunk_length.1"),l(a)("workspace.databaseObjectCreate.question.chunk_length.2"),l(a)("workspace.databaseObjectCreate.question.chunk_length.3")]},null,8,["contents"])]),default:e(()=>[t(T,{value:_.chunk_length,"onUpdate:value":s[7]||(s[7]=r=>_.chunk_length=r)},null,8,["value"])]),_:1})),_.split_method=="delimeter"?(u(),i(p,{key:1,label:l(a)("workspace.databaseObjectCreate.delimiter")},{default:e(()=>[t(D,{value:_.delimiter,"onUpdate:value":s[8]||(s[8]=r=>_.delimiter=r),style:{width:"200px"}},null,8,["value"])]),_:1},8,["label"])):b("",!0),t(p,{label:l(a)("workspace.databaseObjectCreate.remove_url_and_email")},{default:e(()=>[t(S,{checked:_.remove_url_and_email,"onUpdate:checked":s[9]||(s[9]=r=>_.remove_url_and_email=r)},null,8,["checked"])]),_:1},8,["label"])]),_:1})):b("",!0),t(R,{align:"center",gutter:[16,16]},{default:e(()=>[t(U,{xl:16,md:24},{default:e(()=>[m.value==2?(u(),i(X,{key:0,bordered:""},{default:e(()=>[t(f,{label:l(a)("workspace.databaseObjectCreate.add_method"),span:3},{default:e(()=>[c(n(l(a)(`workspace.databaseObjectCreate.add_method_${o.add_method}`)),1)]),_:1},8,["label"]),o.add_method=="url"?(u(),i(f,{key:0,label:l(a)("workspace.databaseObjectCreate.object_source_url"),span:3},{default:e(()=>[re("a",ve,n(o.source_url),1)]),_:1},8,["label"])):b("",!0),o.add_method=="files"?(u(),i(f,{key:1,label:l(a)("workspace.databaseObjectCreate.object_files"),span:3},{default:e(()=>[t(W,{dataSource:o.files},{renderItem:e(({item:r})=>[t(Q,null,{default:e(()=>[t(J,{title:r},null,8,["title"])]),_:2},1024)]),_:1},8,["dataSource"])]),_:1},8,["label"])):b("",!0),o.add_method=="text"?(u(),i(f,{key:2,label:l(a)("workspace.databaseObjectCreate.object_title"),span:1},{default:e(()=>[c(n(o.title),1)]),_:1},8,["label"])):b("",!0),o.add_method=="text"?(u(),i(f,{key:3,label:l(a)("workspace.databaseObjectCreate.object_content"),span:2},{default:e(()=>[c(n(o.content),1)]),_:1},8,["label"])):b("",!0),t(f,{label:l(a)("workspace.databaseObjectCreate.split_method")},{default:e(()=>[c(n(l(a)(`workspace.databaseObjectCreate.split_method_${_.split_method}`)),1)]),_:1},8,["label"]),_.split_method!="delimeter"?(u(),i(f,{key:4,label:l(a)("workspace.databaseObjectCreate.chunk_length")},{default:e(()=>[c(n(_.chunk_length),1)]),_:1},8,["label"])):b("",!0),_.split_method=="delimeter"?(u(),i(f,{key:5,label:l(a)("workspace.databaseObjectCreate.delimiter")},{default:e(()=>[c(n(_.delimiter),1)]),_:1},8,["label"])):b("",!0),t(f,{label:l(a)("workspace.databaseObjectCreate.remove_url_and_email")},{default:e(()=>[_.remove_url_and_email?(u(),i(l(de),{key:0})):(u(),i(l(ne),{key:1}))]),_:1},8,["label"])]),_:1})):b("",!0)]),_:1})]),_:1}),t(Y,{style:{float:"right"}},{default:e(()=>[t(I,{disabled:m.value==0,onClick:s[10]||(s[10]=r=>m.value-=1)},{default:e(()=>[c(n(l(a)("common.previous_step")),1)]),_:1},8,["disabled"]),m.value<2?(u(),i(I,{key:0,type:"primary",disabled:H.value,onClick:s[11]||(s[11]=r=>m.value+=1)},{default:e(()=>[c(n(l(a)("common.next_step")),1)]),_:1},8,["disabled"])):b("",!0),m.value==2?(u(),i(I,{key:1,type:"primary",loading:y.value,onClick:E},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.finish")),1)]),_:1},8,["loading"])):b("",!0)]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})]))}}},Ue=be(je,[["__scopeId","data-v-6623fed1"]]);export{Ue as default}; +import{U as ee,r as j,a8 as te,a9 as ae,m as F,b as le,D as oe,P as d,o as u,e as h,c as t,x as e,a4 as C,u as l,R as c,H as n,a_ as se,K as i,F as N,I as b,G as re,a$ as de,a7 as ne}from"./index-ef7aa48c.js";import{_ as ue}from"./UploaderFieldUse-7351b05e.js";import{_ as ce}from"./QuestionPopover-3baee3b6.js";import{d as _e,a as ie}from"./database-2818470e.js";import{_ as be}from"./_plugin-vue_export-helper-c27b6911.js";import{C as me,D as pe}from"./DatabaseOutlined-a293b150.js";const fe={key:0,class:"loading-container"},ke={key:1,class:"dataspace-container"},ve={href:"objectInfo.source_url",target:"_blank"},je={__name:"DatabaseObjectCreate",setup(we){const{t:a}=ee(),w=j(!0),q=te(),P=ae(),O=q.params.databaseId,g=j({}),o=F({add_method:"url",use_oversea_crawler:!1,source_url:"",files:[],title:"",content:""}),_=F({split_method:"general",chunk_length:1e3,delimiter:"\\n",remove_url_and_email:!1}),m=j(0),A=j([{title:a("workspace.databaseObjectCreate.add_object"),content:"First-content"},{title:a("workspace.databaseObjectCreate.process_rules"),content:"Second-content"},{title:a("workspace.databaseObjectCreate.finish"),content:"Last-content"}]),H=le(()=>{if(m.value==0)return o.add_method=="url"?o.source_url=="":o.add_method=="files"?o.files.length==0:o.title==""||o.content=="";m.value==1}),z=async()=>{const v=await _e("get",{vid:O});v.status==200?g.value=v.data:C.error(v.msg)};oe(async()=>{w.value=!0,await z(),w.value=!1});const y=j(!1),E=async()=>{if(o.add_method=="text"&&o.content.length==0){C.error(a("workspace.databaseObjectCreate.content_empty"));return}y.value=!0,(await ie("create",{vid:O,...o,process_rules:_})).status===200?C.success(a("workspace.databaseObjectCreate.create_success")):C.error(a("workspace.databaseObjectCreate.create_failed")),y.value=!1,await P.push(`/data/${O}`)};return(v,s)=>{const G=d("a-spin"),$=d("router-link"),x=d("a-breadcrumb-item"),K=d("a-breadcrumb"),U=d("a-col"),L=d("a-steps"),k=d("a-radio-button"),V=d("a-radio-group"),p=d("a-form-item"),S=d("a-checkbox"),D=d("a-input"),M=d("a-textarea"),B=d("a-form"),T=d("a-input-number"),f=d("a-descriptions-item"),J=d("a-list-item-meta"),Q=d("a-list-item"),W=d("a-list"),X=d("a-descriptions"),R=d("a-row"),I=d("a-button"),Y=d("a-space"),Z=d("a-card");return w.value?(u(),h("div",fe,[t(G)])):(u(),h("div",ke,[t(R,{justify:"center",gutter:[16,16]},{default:e(()=>[t(U,{xl:16,lg:18,md:20,sm:22,xs:24},{default:e(()=>[t(K,null,{default:e(()=>[t(x,null,{default:e(()=>[t($,{to:"/data"},{default:e(()=>[t(l(me)),c(" "+n(l(a)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1}),t(x,null,{default:e(()=>[t($,{to:`/data/${g.value.vid}`},{default:e(()=>[t(l(pe)),c(" "+n(g.value.name),1)]),_:1},8,["to"])]),_:1}),t(x,null,{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_object")),1)]),_:1})]),_:1})]),_:1}),t(U,{xl:16,lg:18,md:20,sm:22,xs:24},{default:e(()=>[t(Z,{loading:w.value},{title:e(()=>[t(l(se)),c(" "+n(l(a)("workspace.databaseObjectCreate.add_object")),1)]),default:e(()=>[t(L,{current:m.value,items:A.value,style:{"margin-bottom":"30px"}},null,8,["current","items"]),m.value==0?(u(),i(B,{key:0,"label-col":{span:6}},{default:e(()=>[t(p,{label:l(a)("workspace.databaseObjectCreate.add_method")},{default:e(()=>[t(V,{value:o.add_method,"onUpdate:value":s[0]||(s[0]=r=>o.add_method=r)},{default:e(()=>[t(k,{value:"url"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_method_url")),1)]),_:1}),t(k,{value:"files"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_method_files")),1)]),_:1}),t(k,{value:"text"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.add_method_text")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),o.add_method=="url"?(u(),h(N,{key:0},[o.add_method=="url"?(u(),i(p,{key:0,label:l(a)("workspace.databaseObjectCreate.use_oversea_crawler")},{default:e(()=>[t(S,{checked:o.use_oversea_crawler,"onUpdate:checked":s[1]||(s[1]=r=>o.use_oversea_crawler=r)},null,8,["checked"])]),_:1},8,["label"])):b("",!0),t(p,{label:l(a)("workspace.databaseObjectCreate.object_source_url")},{default:e(()=>[t(D,{value:o.source_url,"onUpdate:value":s[2]||(s[2]=r=>o.source_url=r)},null,8,["value"])]),_:1},8,["label"])],64)):b("",!0),o.add_method=="files"?(u(),i(ue,{key:1,modelValue:o.files,"onUpdate:modelValue":s[3]||(s[3]=r=>o.files=r),multiple:!0,style:{"margin-bottom":"30px"}},null,8,["modelValue"])):b("",!0),o.add_method=="text"?(u(),h(N,{key:2},[t(p,{label:l(a)("workspace.databaseObjectCreate.object_title")},{default:e(()=>[t(D,{value:o.title,"onUpdate:value":s[4]||(s[4]=r=>o.title=r)},null,8,["value"])]),_:1},8,["label"]),t(p,{label:l(a)("workspace.databaseObjectCreate.object_content")},{default:e(()=>[t(M,{value:o.content,"onUpdate:value":s[5]||(s[5]=r=>o.content=r),"auto-size":!0,"show-count":!0},null,8,["value"])]),_:1},8,["label"])],64)):b("",!0)]),_:1})):b("",!0),m.value==1?(u(),i(B,{key:1,"label-col":{span:6}},{default:e(()=>[t(p,{label:l(a)("workspace.databaseObjectCreate.split_method")},{default:e(()=>[t(V,{value:_.split_method,"onUpdate:value":s[6]||(s[6]=r=>_.split_method=r)},{default:e(()=>[t(k,{value:"general"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_general")),1)]),_:1}),t(k,{value:"delimeter"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_delimeter")),1)]),_:1}),t(k,{value:"markdown"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_markdown")),1)]),_:1}),t(k,{value:"table"},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.split_method_table")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),["delimeter","table"].includes(_.split_method)?b("",!0):(u(),i(p,{key:0},{label:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.chunk_length"))+" ",1),t(ce,{contents:[l(a)("workspace.databaseObjectCreate.question.chunk_length.1"),l(a)("workspace.databaseObjectCreate.question.chunk_length.2"),l(a)("workspace.databaseObjectCreate.question.chunk_length.3")]},null,8,["contents"])]),default:e(()=>[t(T,{value:_.chunk_length,"onUpdate:value":s[7]||(s[7]=r=>_.chunk_length=r)},null,8,["value"])]),_:1})),_.split_method=="delimeter"?(u(),i(p,{key:1,label:l(a)("workspace.databaseObjectCreate.delimiter")},{default:e(()=>[t(D,{value:_.delimiter,"onUpdate:value":s[8]||(s[8]=r=>_.delimiter=r),style:{width:"200px"}},null,8,["value"])]),_:1},8,["label"])):b("",!0),t(p,{label:l(a)("workspace.databaseObjectCreate.remove_url_and_email")},{default:e(()=>[t(S,{checked:_.remove_url_and_email,"onUpdate:checked":s[9]||(s[9]=r=>_.remove_url_and_email=r)},null,8,["checked"])]),_:1},8,["label"])]),_:1})):b("",!0),t(R,{align:"center",gutter:[16,16]},{default:e(()=>[t(U,{xl:16,md:24},{default:e(()=>[m.value==2?(u(),i(X,{key:0,bordered:""},{default:e(()=>[t(f,{label:l(a)("workspace.databaseObjectCreate.add_method"),span:3},{default:e(()=>[c(n(l(a)(`workspace.databaseObjectCreate.add_method_${o.add_method}`)),1)]),_:1},8,["label"]),o.add_method=="url"?(u(),i(f,{key:0,label:l(a)("workspace.databaseObjectCreate.object_source_url"),span:3},{default:e(()=>[re("a",ve,n(o.source_url),1)]),_:1},8,["label"])):b("",!0),o.add_method=="files"?(u(),i(f,{key:1,label:l(a)("workspace.databaseObjectCreate.object_files"),span:3},{default:e(()=>[t(W,{dataSource:o.files},{renderItem:e(({item:r})=>[t(Q,null,{default:e(()=>[t(J,{title:r},null,8,["title"])]),_:2},1024)]),_:1},8,["dataSource"])]),_:1},8,["label"])):b("",!0),o.add_method=="text"?(u(),i(f,{key:2,label:l(a)("workspace.databaseObjectCreate.object_title"),span:1},{default:e(()=>[c(n(o.title),1)]),_:1},8,["label"])):b("",!0),o.add_method=="text"?(u(),i(f,{key:3,label:l(a)("workspace.databaseObjectCreate.object_content"),span:2},{default:e(()=>[c(n(o.content),1)]),_:1},8,["label"])):b("",!0),t(f,{label:l(a)("workspace.databaseObjectCreate.split_method")},{default:e(()=>[c(n(l(a)(`workspace.databaseObjectCreate.split_method_${_.split_method}`)),1)]),_:1},8,["label"]),_.split_method!="delimeter"?(u(),i(f,{key:4,label:l(a)("workspace.databaseObjectCreate.chunk_length")},{default:e(()=>[c(n(_.chunk_length),1)]),_:1},8,["label"])):b("",!0),_.split_method=="delimeter"?(u(),i(f,{key:5,label:l(a)("workspace.databaseObjectCreate.delimiter")},{default:e(()=>[c(n(_.delimiter),1)]),_:1},8,["label"])):b("",!0),t(f,{label:l(a)("workspace.databaseObjectCreate.remove_url_and_email")},{default:e(()=>[_.remove_url_and_email?(u(),i(l(de),{key:0})):(u(),i(l(ne),{key:1}))]),_:1},8,["label"])]),_:1})):b("",!0)]),_:1})]),_:1}),t(Y,{style:{float:"right"}},{default:e(()=>[t(I,{disabled:m.value==0,onClick:s[10]||(s[10]=r=>m.value-=1)},{default:e(()=>[c(n(l(a)("common.previous_step")),1)]),_:1},8,["disabled"]),m.value<2?(u(),i(I,{key:0,type:"primary",disabled:H.value,onClick:s[11]||(s[11]=r=>m.value+=1)},{default:e(()=>[c(n(l(a)("common.next_step")),1)]),_:1},8,["disabled"])):b("",!0),m.value==2?(u(),i(I,{key:1,type:"primary",loading:y.value,onClick:E},{default:e(()=>[c(n(l(a)("workspace.databaseObjectCreate.finish")),1)]),_:1},8,["loading"])):b("",!0)]),_:1})]),_:1},8,["loading"])]),_:1})]),_:1})]))}}},Ue=be(je,[["__scopeId","data-v-6623fed1"]]);export{Ue as default}; diff --git a/backend/web/assets/DatabaseObjectDetail-c9c6824c.js b/backend/web/assets/DatabaseObjectDetail-c9c6824c.js deleted file mode 100644 index 818043b3..00000000 --- a/backend/web/assets/DatabaseObjectDetail-c9c6824c.js +++ /dev/null @@ -1 +0,0 @@ -import{U as Q,r as k,a9 as W,D as X,m as $,b as Y,P as o,a5 as Z,o as i,e as y,c as e,x as a,a2 as K,u as t,R as c,H as r,a_ as ee,F as M,K as m,I as g,a7 as ae,a8 as te,a$ as oe,a6 as se}from"./index-51905ea3.js";import{d as ne,a as le}from"./database-adffb067.js";import{_ as ce}from"./_plugin-vue_export-helper-c27b6911.js";import{C as re,D as de}from"./DatabaseOutlined-78db540c.js";const ie={key:0,class:"loading-container"},ue={key:1,class:"dataspace-container"},_e={__name:"DatabaseObjectDetail",setup(pe){const{t:s}=Q(),v=k(!0),j=W(),P=j.params.databaseId,S=j.params.objectId,w=k({}),n=k({}),B=async()=>{const l=await ne("get",{vid:P});l.status==200?w.value=l.data:K.error(l.msg)},V=async()=>{const l=await le("get",{oid:S});l.status==200?n.value=l.data:K.error(l.msg)};X(async()=>{v.value=!0,await Promise.all([B(),V()]),u.data=n.value.raw_data.segments,v.value=!1});const D=k("segments"),u=$({columns:[{title:"#",key:"index",dataIndex:"index",width:"50px"},{title:s("workspace.databaseObjectDetail.segment_text"),key:"text",dataIndex:"text",ellipsis:!0},{title:s("workspace.databaseObjectDetail.segment_word_counts"),key:"word_counts",dataIndex:"word_counts",width:"50px"}],data:[],loading:!1,current:1,pageSize:10,total:0,pagination:Y(()=>({total:u.total,current:u.current,pageSize:u.pageSize})),hoverRowOid:null,customRow:l=>({style:{cursor:"pointer"},onClick:async d=>{(d.target.classList.contains("ant-table-cell")||d.target.classList.contains("object-title"))&&(p.segmentIndex=l.index,p.text=l.text,p.keywords=l.keywords,p.open=!0)},onMouseenter:d=>{u.hoverRowOid=l.vid},onMouseleave:d=>{u.hoverRowOid=null}})}),p=$({open:!1,segmentIndex:0,text:"",keywords:[]});return(l,d)=>{const z=o("a-spin"),C=o("router-link"),h=o("a-breadcrumb-item"),F=o("a-breadcrumb"),I=o("a-col"),R=o("a-typography-link"),N=o("a-popconfirm"),U=o("a-table"),O=o("a-tab-pane"),A=o("a-divider"),b=o("a-descriptions-item"),H=o("a-descriptions"),L=o("a-tabs"),T=o("a-typography-paragraph"),E=o("a-modal"),q=o("a-card"),G=o("a-row"),J=Z("highlight");return v.value?(i(),y("div",ie,[e(z)])):(i(),y("div",ue,[e(G,{align:"center",gutter:[16,16]},{default:a(()=>[e(I,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[e(F,null,{default:a(()=>[e(h,null,{default:a(()=>[e(C,{to:"/data"},{default:a(()=>[e(t(re)),c(" "+r(t(s)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1}),e(h,null,{default:a(()=>[e(C,{to:`/data/${w.value.vid}`},{default:a(()=>[e(t(de)),c(" "+r(w.value.name),1)]),_:1},8,["to"])]),_:1}),e(h,null,{default:a(()=>[c(r(n.value.title),1)]),_:1})]),_:1})]),_:1}),e(I,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[e(q,{loading:v.value},{title:a(()=>[e(t(ee)),c(" "+r(n.value.title),1)]),default:a(()=>[e(L,{activeKey:D.value,"onUpdate:activeKey":d[0]||(d[0]=_=>D.value=_),"tab-position":"left"},{default:a(()=>[e(O,{key:"segments",tab:t(s)("workspace.databaseObjectDetail.segments")},{default:a(()=>[e(U,{customRow:u.customRow,columns:u.columns,"data-source":u.data,pagination:u.pagination},{bodyCell:a(({column:_,record:f})=>[_.key==="keywords"?(i(),y(M,{key:0},[c(r(f.keywords.join(", ")),1)],64)):_.key==="action"?(i(),y(M,{key:1},[f.status!="PR"?(i(),m(N,{key:0,placement:"leftTop",title:t(s)("workspace.databaseDetail.delete_confirm"),onConfirm:x=>l.deleteObject(f.oid)},{default:a(()=>[e(R,{type:"danger"},{default:a(()=>[c(r(t(s)("workspace.databaseDetail.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])):g("",!0)],64)):g("",!0)]),_:1},8,["customRow","columns","data-source","pagination"])]),_:1},8,["tab"]),e(O,{key:"full-document",tab:t(s)("workspace.databaseObjectDetail.full_document")},{default:a(()=>{var _,f,x;return[((_=n.value.source_url)==null?void 0:_.length)>0?(i(),m(R,{key:0,href:n.value.source_url,target:"_blank"},{default:a(()=>[c(r(t(s)("workspace.databaseObjectDetail.source_url")),1)]),_:1},8,["href"])):g("",!0),((f=n.value.source_url)==null?void 0:f.length)>0?(i(),m(A,{key:1})):g("",!0),ae(e(t(te),{source:((x=n.value.raw_data)==null?void 0:x.text)||"",class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[J]])]}),_:1},8,["tab"]),e(O,{key:"params_info",tab:t(s)("workspace.databaseObjectDetail.params_info")},{default:a(()=>[e(H,{bordered:""},{default:a(()=>[e(b,{label:t(s)("workspace.databaseObjectCreate.split_method")},{default:a(()=>[c(r(t(s)(`workspace.databaseObjectCreate.split_method_${n.value.info.process_rules.split_method}`)),1)]),_:1},8,["label"]),n.value.info.process_rules.split_method!="delimeter"?(i(),m(b,{key:0,label:t(s)("workspace.databaseObjectCreate.chunk_length")},{default:a(()=>[c(r(n.value.info.process_rules.chunk_length),1)]),_:1},8,["label"])):g("",!0),n.value.info.process_rules.split_method=="delimeter"?(i(),m(b,{key:1,label:t(s)("workspace.databaseObjectCreate.delimiter")},{default:a(()=>[c(r(n.value.info.process_rules.delimiter),1)]),_:1},8,["label"])):g("",!0),e(b,{label:t(s)("workspace.databaseObjectCreate.remove_url_and_email")},{default:a(()=>[n.value.info.process_rules.remove_url_and_email?(i(),m(t(oe),{key:0})):(i(),m(t(se),{key:1}))]),_:1},8,["label"]),e(b,{label:t(s)("workspace.databaseObjectDetail.paragraph_counts")},{default:a(()=>[c(r(n.value.info.paragraph_counts),1)]),_:1},8,["label"]),e(b,{label:t(s)("workspace.databaseObjectDetail.word_counts")},{default:a(()=>[c(r(n.value.info.word_counts),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["tab"])]),_:1},8,["activeKey"]),e(E,{open:p.open,"onUpdate:open":d[1]||(d[1]=_=>p.open=_),title:`# ${p.segmentIndex}`,onCancel:d[2]||(d[2]=_=>p.open=!1),footer:null},{default:a(()=>[e(T,{content:p.text},null,8,["content"])]),_:1},8,["open","title"])]),_:1},8,["loading"])]),_:1})]),_:1})]))}}},ve=ce(_e,[["__scopeId","data-v-89abffdc"]]);export{ve as default}; diff --git a/backend/web/assets/DatabaseObjectDetail-d150ff81.js b/backend/web/assets/DatabaseObjectDetail-d150ff81.js new file mode 100644 index 00000000..9d054ad6 --- /dev/null +++ b/backend/web/assets/DatabaseObjectDetail-d150ff81.js @@ -0,0 +1 @@ +import{U as Q,r as k,a8 as W,D as X,m as $,b as Y,P as o,an as Z,o as i,e as y,c as e,x as a,a4 as K,u as t,R as c,H as r,a_ as ee,F as M,K as m,I as g,V as ae,ao as te,a$ as oe,a7 as se}from"./index-ef7aa48c.js";import{d as ne,a as le}from"./database-2818470e.js";import{_ as ce}from"./_plugin-vue_export-helper-c27b6911.js";import{C as re,D as de}from"./DatabaseOutlined-a293b150.js";const ie={key:0,class:"loading-container"},ue={key:1,class:"dataspace-container"},_e={__name:"DatabaseObjectDetail",setup(pe){const{t:s}=Q(),v=k(!0),j=W(),P=j.params.databaseId,S=j.params.objectId,w=k({}),n=k({}),V=async()=>{const l=await ne("get",{vid:P});l.status==200?w.value=l.data:K.error(l.msg)},B=async()=>{const l=await le("get",{oid:S});l.status==200?n.value=l.data:K.error(l.msg)};X(async()=>{v.value=!0,await Promise.all([V(),B()]),u.data=n.value.raw_data.segments,v.value=!1});const D=k("segments"),u=$({columns:[{title:"#",key:"index",dataIndex:"index",width:"50px"},{title:s("workspace.databaseObjectDetail.segment_text"),key:"text",dataIndex:"text",ellipsis:!0},{title:s("workspace.databaseObjectDetail.segment_word_counts"),key:"word_counts",dataIndex:"word_counts",width:"50px"}],data:[],loading:!1,current:1,pageSize:10,total:0,pagination:Y(()=>({total:u.total,current:u.current,pageSize:u.pageSize})),hoverRowOid:null,customRow:l=>({style:{cursor:"pointer"},onClick:async d=>{(d.target.classList.contains("ant-table-cell")||d.target.classList.contains("object-title"))&&(p.segmentIndex=l.index,p.text=l.text,p.keywords=l.keywords,p.open=!0)},onMouseenter:d=>{u.hoverRowOid=l.vid},onMouseleave:d=>{u.hoverRowOid=null}})}),p=$({open:!1,segmentIndex:0,text:"",keywords:[]});return(l,d)=>{const z=o("a-spin"),C=o("router-link"),h=o("a-breadcrumb-item"),F=o("a-breadcrumb"),I=o("a-col"),R=o("a-typography-link"),N=o("a-popconfirm"),U=o("a-table"),O=o("a-tab-pane"),A=o("a-divider"),b=o("a-descriptions-item"),H=o("a-descriptions"),L=o("a-tabs"),T=o("a-typography-paragraph"),E=o("a-modal"),q=o("a-card"),G=o("a-row"),J=Z("highlight");return v.value?(i(),y("div",ie,[e(z)])):(i(),y("div",ue,[e(G,{align:"center",gutter:[16,16]},{default:a(()=>[e(I,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[e(F,null,{default:a(()=>[e(h,null,{default:a(()=>[e(C,{to:"/data"},{default:a(()=>[e(t(re)),c(" "+r(t(s)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1}),e(h,null,{default:a(()=>[e(C,{to:`/data/${w.value.vid}`},{default:a(()=>[e(t(de)),c(" "+r(w.value.name),1)]),_:1},8,["to"])]),_:1}),e(h,null,{default:a(()=>[c(r(n.value.title),1)]),_:1})]),_:1})]),_:1}),e(I,{xl:16,lg:18,md:20,sm:22,xs:24},{default:a(()=>[e(q,{loading:v.value},{title:a(()=>[e(t(ee)),c(" "+r(n.value.title),1)]),default:a(()=>[e(L,{activeKey:D.value,"onUpdate:activeKey":d[0]||(d[0]=_=>D.value=_),"tab-position":"left"},{default:a(()=>[e(O,{key:"segments",tab:t(s)("workspace.databaseObjectDetail.segments")},{default:a(()=>[e(U,{customRow:u.customRow,columns:u.columns,"data-source":u.data,pagination:u.pagination},{bodyCell:a(({column:_,record:f})=>[_.key==="keywords"?(i(),y(M,{key:0},[c(r(f.keywords.join(", ")),1)],64)):_.key==="action"?(i(),y(M,{key:1},[f.status!="PR"?(i(),m(N,{key:0,placement:"leftTop",title:t(s)("workspace.databaseDetail.delete_confirm"),onConfirm:x=>l.deleteObject(f.oid)},{default:a(()=>[e(R,{type:"danger"},{default:a(()=>[c(r(t(s)("workspace.databaseDetail.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])):g("",!0)],64)):g("",!0)]),_:1},8,["customRow","columns","data-source","pagination"])]),_:1},8,["tab"]),e(O,{key:"full-document",tab:t(s)("workspace.databaseObjectDetail.full_document")},{default:a(()=>{var _,f,x;return[((_=n.value.source_url)==null?void 0:_.length)>0?(i(),m(R,{key:0,href:n.value.source_url,target:"_blank"},{default:a(()=>[c(r(t(s)("workspace.databaseObjectDetail.source_url")),1)]),_:1},8,["href"])):g("",!0),((f=n.value.source_url)==null?void 0:f.length)>0?(i(),m(A,{key:1})):g("",!0),ae(e(t(te),{source:((x=n.value.raw_data)==null?void 0:x.text)||"",class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[J]])]}),_:1},8,["tab"]),e(O,{key:"params_info",tab:t(s)("workspace.databaseObjectDetail.params_info")},{default:a(()=>[e(H,{bordered:""},{default:a(()=>[e(b,{label:t(s)("workspace.databaseObjectCreate.split_method")},{default:a(()=>[c(r(t(s)(`workspace.databaseObjectCreate.split_method_${n.value.info.process_rules.split_method}`)),1)]),_:1},8,["label"]),n.value.info.process_rules.split_method!="delimeter"?(i(),m(b,{key:0,label:t(s)("workspace.databaseObjectCreate.chunk_length")},{default:a(()=>[c(r(n.value.info.process_rules.chunk_length),1)]),_:1},8,["label"])):g("",!0),n.value.info.process_rules.split_method=="delimeter"?(i(),m(b,{key:1,label:t(s)("workspace.databaseObjectCreate.delimiter")},{default:a(()=>[c(r(n.value.info.process_rules.delimiter),1)]),_:1},8,["label"])):g("",!0),e(b,{label:t(s)("workspace.databaseObjectCreate.remove_url_and_email")},{default:a(()=>[n.value.info.process_rules.remove_url_and_email?(i(),m(t(oe),{key:0})):(i(),m(t(se),{key:1}))]),_:1},8,["label"]),e(b,{label:t(s)("workspace.databaseObjectDetail.paragraph_counts")},{default:a(()=>[c(r(n.value.info.paragraph_counts),1)]),_:1},8,["label"]),e(b,{label:t(s)("workspace.databaseObjectDetail.word_counts")},{default:a(()=>[c(r(n.value.info.word_counts),1)]),_:1},8,["label"])]),_:1})]),_:1},8,["tab"])]),_:1},8,["activeKey"]),e(E,{open:p.open,"onUpdate:open":d[1]||(d[1]=_=>p.open=_),title:`# ${p.segmentIndex}`,onCancel:d[2]||(d[2]=_=>p.open=!1),footer:null},{default:a(()=>[e(T,{content:p.text},null,8,["content"])]),_:1},8,["open","title"])]),_:1},8,["loading"])]),_:1})]),_:1})]))}}},ve=ce(_e,[["__scopeId","data-v-89abffdc"]]);export{ve as default}; diff --git a/backend/web/assets/DatabaseOutlined-78db540c.js b/backend/web/assets/DatabaseOutlined-a293b150.js similarity index 97% rename from backend/web/assets/DatabaseOutlined-78db540c.js rename to backend/web/assets/DatabaseOutlined-a293b150.js index ba94275e..a91519ef 100644 --- a/backend/web/assets/DatabaseOutlined-78db540c.js +++ b/backend/web/assets/DatabaseOutlined-a293b150.js @@ -1 +1 @@ -import{c as s,A as o}from"./index-51905ea3.js";var v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"cluster",theme:"outlined"};const f=v;function l(r){for(var t=1;t{const p=s("a-checkbox"),v=s("a-form-item-rest"),_=s("a-textarea"),h=g("highlight");return V(),b("div",null,[l(v,null,{default:n(()=>[l(p,{checked:t.value,"onUpdate:checked":e[0]||(e[0]=a=>t.value=a)},{default:n(()=>[M(S(d(m)("common.preview")),1)]),_:1},8,["checked"])]),_:1}),u(l(_,{value:o.value,"onUpdate:value":e[1]||(e[1]=a=>o.value=a),autoSize:{minRows:3,maxRows:10},placeholder:i.placeholder},null,8,["value","placeholder"]),[[c,!t.value]]),u(l(d(U),{source:o.value,"onUpdate:source":e[2]||(e[2]=a=>o.value=a),class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[h],[c,t.value]])])}}};export{R as _}; diff --git a/backend/web/assets/MarkdownEditor-de9455d7.js b/backend/web/assets/MarkdownEditor-de9455d7.js new file mode 100644 index 00000000..c48c04a6 --- /dev/null +++ b/backend/web/assets/MarkdownEditor-de9455d7.js @@ -0,0 +1 @@ +import{I as f}from"./index-ace83a9e.js";import{c as o,$ as _,U as x,a0 as g,r as V,P as s,an as j,o as M,e as p,x as r,V as i,W as c,u as d,R as C,H as L,ao as W}from"./index-ef7aa48c.js";const y=f("add-one",!1,function(e){return o("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[o("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null),o("path",{d:"M24 16V32",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),o("path",{d:"M16 24L32 24",stroke:e.colors[2],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),z={__name:"MarkdownEditor",props:_({placeholder:{type:String,default:""}},{modelValue:{}}),emits:["update:modelValue"],setup(e){const u=e,{t:k}=x(),l=g(e,"modelValue"),n=V(!1);return(b,t)=>{const m=s("a-checkbox"),h=s("a-form-item-rest"),v=s("a-textarea"),w=j("highlight");return M(),p("div",null,[o(h,null,{default:r(()=>[o(m,{checked:n.value,"onUpdate:checked":t[0]||(t[0]=a=>n.value=a)},{default:r(()=>[C(L(d(k)("common.preview")),1)]),_:1},8,["checked"])]),_:1}),i(o(v,{value:l.value,"onUpdate:value":t[1]||(t[1]=a=>l.value=a),autoSize:{minRows:3,maxRows:10},placeholder:u.placeholder},null,8,["value","placeholder"]),[[c,!n.value]]),i(o(d(W),{source:l.value,"onUpdate:source":t[2]||(t[2]=a=>l.value=a),class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[w],[c,n.value]])])}}};export{y as A,z as _}; diff --git a/backend/web/assets/NewWorkflowModal-1c07a1e7.js b/backend/web/assets/NewWorkflowModal-1c07a1e7.js deleted file mode 100644 index 4e5b858a..00000000 --- a/backend/web/assets/NewWorkflowModal-1c07a1e7.js +++ /dev/null @@ -1 +0,0 @@ -import{c as r,A as x,U as h,r as b,P as l,o as k,K as S,x as s,G as U,u,R as M,H as A}from"./index-51905ea3.js";import{A as N}from"./AddOne-dbc3bffb.js";var P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};const C=P;function f(o){for(var e=1;e{a.value=!0},w=i=>{a.value=!1,t("create",{id:i})};return e({showModal:m}),(i,c)=>{const d=l("a-typography-text"),v=l("a-card"),y=l("a-col"),g=l("a-row"),O=l("a-modal");return k(),S(O,{open:a.value,"onUpdate:open":c[1]||(c[1]=_=>a.value=_),width:"50vw",title:u(n)("components.workspace.newWorkflowModal.create_new_workflow"),footer:null},{default:s(()=>[r(g,{gutter:[16,16]},{default:s(()=>[r(y,{xs:24,md:12,lg:6},{default:s(()=>[r(v,{class:"template-card-small",hoverable:"",style:{width:"240px"},onClick:c[0]||(c[0]=_=>w("empty"))},{default:s(()=>[U("div",B,[r(d,{class:"text-primary"},{default:s(()=>[r(u(N),{style:{"font-size":"100px"}})]),_:1}),r(d,null,{default:s(()=>[M(A(u(n)("components.workspace.newWorkflowModal.empty_workflow")),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["open","title"])}}};export{V as U,$ as _}; diff --git a/backend/web/assets/NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js b/backend/web/assets/NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js new file mode 100644 index 00000000..b5ae482c --- /dev/null +++ b/backend/web/assets/NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js @@ -0,0 +1 @@ +import{c as u,A as i}from"./index-ef7aa48c.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};const s=o;function l(r){for(var e=1;e{const d=u("a-typography-paragraph"),v=u("a-typography-link"),h=u("a-popover");return n(),c(h,{overlayClassName:t.value.join(" ")},{content:i(()=>[(n(!0),l(f,null,b(e.contents,a=>(n(),l(f,{key:a},[typeof a=="string"?(n(),c(d,{key:0},{default:i(()=>[y(m(a),1)]),_:2},1024)):a.type=="link"?(n(),c(d,{key:1},{default:i(()=>[p(v,{href:a.url,target:"_blank"},{default:i(()=>[y(m(a.text),1)]),_:2},1032,["href"])]),_:2},1024)):(n(),l("div",j,[a.type=="image"?(n(),l("img",{key:0,src:a.url},null,8,w)):x("",!0)]))],64))),128))]),default:i(()=>[p(k(S),{style:{margin:"0 2px"}})]),_:1},8,["overlayClassName"])}}};export{V as _}; +import{c as p,A as C,r as O,P as u,o as n,K as c,x as i,e as l,F as f,y as b,R as y,H as m,I as x,u as k}from"./index-ef7aa48c.js";var P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Q=P;function g(r){for(var e=1;e{const d=u("a-typography-paragraph"),v=u("a-typography-link"),h=u("a-popover");return n(),c(h,{overlayClassName:t.value.join(" ")},{content:i(()=>[(n(!0),l(f,null,b(e.contents,a=>(n(),l(f,{key:a},[typeof a=="string"?(n(),c(d,{key:0},{default:i(()=>[y(m(a),1)]),_:2},1024)):a.type=="link"?(n(),c(d,{key:1},{default:i(()=>[p(v,{href:a.url,target:"_blank"},{default:i(()=>[y(m(a.text),1)]),_:2},1032,["href"])]),_:2},1024)):(n(),l("div",j,[a.type=="image"?(n(),l("img",{key:0,src:a.url},null,8,w)):x("",!0)]))],64))),128))]),default:i(()=>[p(k(S),{style:{margin:"0 2px"}})]),_:1},8,["overlayClassName"])}}};export{V as _}; diff --git a/backend/web/assets/EchartsRenderer-22c6610f.css b/backend/web/assets/TextOutput-22c6610f.css similarity index 100% rename from backend/web/assets/EchartsRenderer-22c6610f.css rename to backend/web/assets/TextOutput-22c6610f.css diff --git a/backend/web/assets/EchartsRenderer-3d08027d.js b/backend/web/assets/TextOutput-39ff842e.js similarity index 75% rename from backend/web/assets/EchartsRenderer-3d08027d.js rename to backend/web/assets/TextOutput-39ff842e.js index 1a3a95e0..2daedd82 100644 --- a/backend/web/assets/EchartsRenderer-3d08027d.js +++ b/backend/web/assets/TextOutput-39ff842e.js @@ -1,4 +1,4 @@ -import{at as E3,au as Pz,av as Rz,aw as hM,ax as Fz,ay as Oz,az as Nz,aA as cM,aB as I6,aC as zz,aD as Vz,aE as $z,aF as Gz,aG as Hz,aH as qz,aI as Wz,aJ as B6,aK as Uz,aL as Yz,aM as Xz,aN as Zz,c as Jr,A as jz,U as sp,_ as fM,m as P6,r as js,D as Kz,P as ii,o as Lr,e as bn,K as Pc,x as An,F as hm,y as f4,G as mr,u as Ks,W as Jz,R as I3,H as zs,J as ia,am as Do,a7 as jf,ae as Kf,aO as R6,I as Jf,n as F6,f as qv,T as Qz,aP as gu,v as B3,aQ as eV,w as Su,aR as P3,aS as tV,aT as rV,aU as nV,aV as iV,aW as x_,aX as $r,a as aV,X as Wv,i as Uv,B as oV,b as Wh,C as sV,E as O6,N as lV,L as N6,M as uV,p as hV}from"./index-51905ea3.js";import{_ as cV}from"./_plugin-vue_export-helper-c27b6911.js";function fV(t,e,r){if(!E3(r))return!1;var n=typeof e;return(n=="number"?Pz(r)&&Rz(e,r.length):n=="string"&&e in r)?hM(r[e],t):!1}function dV(t){return Fz(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,o&&fV(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{i.value=l,n.forEach((u,h)=>{u===l&&(r.value=a[h])})},s=l=>{l>=0&&l<=.3?i.value=e("components.nodes.llms.OpenAI.precise"):l>.3&&l<=.7?i.value=e("components.nodes.llms.OpenAI.balanced"):l>.7&&l<=1&&(i.value=e("components.nodes.llms.OpenAI.creative"))};return Kz(()=>{s(r.value)}),(l,u)=>{const h=ii("a-segmented"),c=ii("a-input-number");return Lr(),bn("div",null,[Jr(h,{value:i.value,"onUpdate:value":u[0]||(u[0]=f=>i.value=f),options:n,block:"",onChange:o},null,8,["value","options"]),Jr(c,{style:{width:"100%"},value:r.value,"onUpdate:value":u[1]||(u[1]=f=>r.value=f),step:.1,max:1,min:0,keyboard:!1,onChange:s},null,8,["value"])])}}},SV={style:{display:"flex",gap:"5px"}},q3e={__name:"ListFieldUse",props:{modelValue:{}},emits:["update:modelValue"],setup(t){const e=fM(t,"modelValue"),{t:r}=sp(),n=(a,o)=>{e.value[o]=a},i=a=>{e.value.splice(a,1)};return(a,o)=>{const s=ii("a-input"),l=ii("a-col"),u=ii("a-button"),h=ii("a-row");return Lr(),Pc(h,{type:"flex",gutter:[12,12]},{default:An(()=>[(Lr(!0),bn(hm,null,f4(e.value,(c,f)=>(Lr(),Pc(l,{span:24,key:f},{default:An(()=>[mr("div",SV,[Jr(s,{value:c,onInput:d=>n(d.target.value,f)},null,8,["value","onInput"]),Jr(Ks(bV),{onClick:d=>i(f)},null,8,["onClick"])])]),_:2},1024))),128)),Jr(l,{span:24},{default:An(()=>[Jr(u,{type:"dashed",style:{width:"100%"},onClick:o[0]||(o[0]=c=>e.value.push(""))},{default:An(()=>[Jr(Ks(Jz)),I3(" "+zs(Ks(r)("components.nodes.listField.add_item")),1)]),_:1})]),_:1})]),_:1})}}};window._iconfont_svg_string_1017934='',function(t){var r=(r=document.getElementsByTagName("script"))[r.length-1],e=r.getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,a,o,s,l=function(c,f){f.parentNode.insertBefore(c,f)};if(e&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}n=function(){var c,f=document.createElement("div");f.innerHTML=t._iconfont_svg_string_1017934,(f=f.getElementsByTagName("svg")[0])&&(f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.width=0,f.style.height=0,f.style.overflow="hidden",f=f,(c=document.body).firstChild?l(f,c.firstChild):c.appendChild(f))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=n,o=t.document,s=!1,h(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,u())})}function u(){s||(s=!0,a())}function h(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(h,50)}u()}}(window);let wV=class{constructor(){this.__map={}}beforeEach(e){this.__interceptor=e}on(e,r){const n=Array.isArray(e)?e:[e];for(const i of n){this.__map[i]=this.__map[i]||[];const a=this.__map[i];a&&a.push(r)}return this}emit(e,r,n){this.__interceptor!==void 0?this.__interceptor(e,()=>{this.__emit(e,r),n&&n()}):(this.__emit(e,r),n&&n())}__emit(e,r){const n=this.__map[e];if(Array.isArray(n)&&(n!=null&&n.length))for(const i of n)i(r,e);this.event=r}off(e,r){const n=this.__map[e];if(n!==void 0)if(r===void 0)delete this.__map[e];else{const i=n.findIndex(a=>a===r);n.splice(i,1)}}destroy(){this.__map={}}};const v4="clientX",g4="clientY",CV=16,pM="start",AV="move",vM="cancel",gM="end",TV="left",kV="right",DV="up",MV="down",LV={4:"start",5:"move",1:"end",3:"cancel"};function EV(t){return LV[t]}function IV(t,e,r){const n={1:{0:{move:4},4:{move:5,end:1,cancel:3},5:{move:5,end:1,cancel:3}},0:{4:{move:2,end:1,cancel:3},5:{start:2,move:2,end:1,cancel:3}}}[Number(t)][e];return n!==void 0&&n[r]||0}function BV(t){[1,3,2].includes(t.state)&&(t.state=0)}function PV(t){return[5,1,3].includes(t)}function RV(t){if(t.disabled)return t.state=0,!0}function FV(t,e){return Object.assign(Object.assign(Object.assign({},t),e),{state:0,disabled:!1})}function V6(){let t,e,r,n,i=0;return function(a){if(t=e,a!==void 0){i=Number.MAX_SAFE_INTEGER>i?++i:1;const o=function(u,h){const{phase:c,points:f,changedPoints:d,nativeEvent:v}=u,g=f.length,m=pM===c,y=gM===c&&g===0||vM===c,b=Date.now(),{x:w,y:T}=$6(f)||$6(d),{currentTarget:M}=v;return Object.assign(u,{id:h,x:w,y:T,timestamp:b,isStart:m,isEnd:y,pointLength:g,currentTarget:M,getOffset(D=M){const P=D.getBoundingClientRect();return{x:w-Math.round(P.left),y:T-Math.round(P.top)}}})}(a,i);e=o;const{isStart:s,pointLength:l}=o;return s&&(r=o,t=void 0,n=1(n.x+=i[v4],n.y+=i[g4],n),{x:0,y:0});return{x:Math.round(r.x/e),y:Math.round(r.y/e)}}}function G6(t,e,r,n){const i={};for(const o in r)["target","currentTarget","type"].includes(o)||(i[o]=r[o]);let a;return document.createEvent?(a=document.createEvent("HTMLEvents"),a.initEvent(t,n==null?void 0:n.bubbles,n==null?void 0:n.cancelable)):a=new Event(t,n),Object.assign(a,i,{match:()=>r.targets&&0a.currentTarget.contains(o))}),e.dispatchEvent(a)}function OV(t,e){const{preventDefault:r}=e;return n=r,Object.prototype.toString.call(n)==="[object Function]"?r(t):!!r;var n}const H6=["touchstart","touchmove","touchend","touchcancel","mousedown"],q6=["mousemove","mouseup"],NV={domEvents:{bubbles:!0,cancelable:!0},preventDefault:t=>{if(t.target&&"tagName"in t.target){const{tagName:e}=t.target;return!/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(e)}return!1}};class zV extends wV{constructor(e,r){super(),this.v="2.1.3",this.__computeFunctionList=[],this.__computeFunctionCreatorList=[],this.__pluginContexts=[],this.__isIgnoreMouse=!1,this.el=e,this.c={},this.__options=Object.assign(Object.assign({},NV),r);const n=function(a){const o=V6();return function(s){const l=[],u=[];Array.from(s.touches).forEach(({clientX:c,clientY:f,target:d})=>{a!=null&&a.contains(d)&&(l.push(d),u.push({clientX:c,clientY:f,target:d}))});const h=Array.from(s.changedTouches).map(({clientX:c,clientY:f,target:d})=>({clientX:c,clientY:f,target:d}));return o({phase:s.type.replace("touch",""),changedPoints:h,points:u,nativeEvent:s,target:s.target,targets:l})}}(this.el),i=function(){let a,o=!1,s=null;const l=V6();return function(u){const{clientX:h,clientY:c,type:f,button:d,target:v}=u;let g,m=[{clientX:h,clientY:c,target:v}];if(f==="mousedown"&&d===0)s=v,o=!0,g="start";else{if(!o)return;f==="mousemove"?g="move":f==="mouseup"&&(m=[],g="end",o=!1)}const y=a||[{clientX:h,clientY:c,target:v}];if(a=[{clientX:h,clientY:c,target:v}],g!==void 0)return l({phase:g,changedPoints:y,points:m,target:s,targets:[s],nativeEvent:u})}}();if(this.__inputCreatorMap={touchstart:n,touchmove:n,touchend:n,touchcancel:n,mousedown:i,mousemove:i,mouseup:i},this.on("at:after",a=>{const{target:o,__type:s}=a,{domEvents:l}=this.__options;l&&this.el!==void 0&&o&&(G6(s,o,a,l),G6("at:after",o,a,l))}),e!==void 0){e.style.webkitTapHighlightColor="rgba(0,0,0,0)";let a=!1;try{const o={};Object.defineProperty(o,"passive",{get(){a=!0}}),window.addEventListener("_",()=>{},o)}catch{}this.on("u",function(o,s,l){return H6.forEach(u=>{o.addEventListener(u,s,l)}),q6.forEach(u=>{window.addEventListener(u,s,l)}),()=>{H6.forEach(u=>{o.removeEventListener(u,s)}),q6.forEach(u=>{window.removeEventListener(u,s)})}}(e,this.catchEvent.bind(this),this.__options.preventDefault===!1&&a?{passive:!0}:{passive:!1}))}}use(e,r){this.__pluginContexts.push(e(this,r))}catchEvent(e){const r=this.__inputCreatorMap[e.type](e);if(r!==void 0){const n=()=>e.stopPropagation(),i=()=>e.stopImmediatePropagation(),a=()=>e.preventDefault();if(OV(e,this.__options))a();else if(e.type==="touchstart"?this.__isIgnoreMouse=!0:e.type==="touchmove"&&(this.__isIgnoreMouse=!1),this.__isIgnoreMouse&&e.type.startsWith("mouse"))return void(e.type==="mouseup"&&(this.__isIgnoreMouse=!1));this.emit("input",r),this.emit2(`at:${r.phase}`,r,{});const o={};this.__computeFunctionList.forEach(s=>{const l=s(r,o);if(l!==void 0)for(const u in l)o[u]=l[u]}),this.emit("computed",Object.assign(Object.assign(Object.assign({},r),o),{stopPropagation:n,stopImmediatePropagation:i,preventDefault:a}))}}compute(e,r){for(const n of e)this.__computeFunctionCreatorList.includes(n)||(this.__computeFunctionCreatorList.push(n),this.__computeFunctionList.push(n()));this.on("computed",r)}beforeEach(e){super.beforeEach((r,n)=>{var i;!((i=this.c)===null||i===void 0)&&i.name?e(r,n):n()})}get(e){return this.__pluginContexts.find(r=>e===r.name)}set(e){this.__options=Object.assign(Object.assign({},this.__options),e)}emit2(e,r,n){this.c=n,this.emit(e,Object.assign(Object.assign({},r),{type:e}),()=>{this.emit("at:after",Object.assign(Object.assign({},r),{name:e,__type:e}))})}destroy(){this.emit("u"),super.destroy()}}var VV=t=>Math.sqrt(t.x*t.x+t.y*t.y),$V=t=>t/Math.PI*180,mM=(t,e)=>{if(t!==0||e!==0)return Math.abs(t)>=Math.abs(e)?0{if(BV(r),RV(r))return;const i=function(){const{pointLength:a,distance:o}=n;return r.pointLength===a&&r.threshold<=o}();if(r.state=IV(i,r.state,n.phase),i||PV(r.state)){const{name:a}=r;t.emit2(a,n,r),t.emit2(a+EV(r.state),n,r),![gM,vM].includes(n.phase)&&n.direction&&t.emit2(a+n.direction,n,r)}}),r}const YV={name:"AudioPlayer",inheritAttrs:!1,props:{audioList:{default:null,type:Array},showPlayButton:{default:!0,type:Boolean},showPrevButton:{default:!0,type:Boolean},showNextButton:{default:!0,type:Boolean},showVolumeButton:{default:!0,type:Boolean},showProgressBar:{default:!0,type:Boolean},beforePlay:{default:null,type:Function},beforePrev:{default:null,type:Function},beforeNext:{default:null,type:Function},isLoop:{type:Boolean,default:!0},isAutoPlayNext:{type:Boolean,default:!0},progressInterval:{default:1e3,type:Number},showPlaybackRate:{type:Boolean,default:!0},playbackRates:{type:Array,default:()=>[.5,1,1.5,2]},themeColor:{type:String,default:"#EC4141"},disabledProgressDrag:{type:Boolean,default:!1},disabledProgressClick:{type:Boolean,default:!1}},emits:["pause","play-prev","play-next","timeupdate","loadedmetadata","ended","progress-start","progress-end","progress-move","progress-click","playing","play","play-error"],data(){return{isIOS:/iPhone|iPad|iPod/i.test(window.navigator.userAgent),isPlaying:!1,isDragging:!1,isDraggingVolume:!1,isShowErrorMessage:!1,isLoading:!1,isShowVolume:!1,isShowRates:!1,timer:null,noticeMessage:"",duration:"",currentPlayIndex:0,currentTime:"",currentVolume:1,playbackRate:1,at:null}},computed:{currentTimeFormatted(){return this.currentTime?this.formatTime(this.currentTime):"00:00"},durationFormatted(){return this.duration?this.formatTime(this.duration):"00:00"}},mounted(){this.at=new zV(this.$el,{preventDefault:!1}),this.at.use(UV)},beforeUnmount(){this.at.destroy(),this.pause()},methods:{handleVolumeIconTouchstart(){this.isShowVolume=!this.isShowVolume},handleVolumePanmove(t){let e=this.$refs.playVolumeWrap.getBoundingClientRect(),r=t.y,n,i;n=Math.round(e.bottom-r),i=n/this.$refs.playVolumeWrap.offsetHeight,i=Math.min(i,1),i=Math.max(i,0),this.$refs.audio.volume=i,this.currentVolume=i},handleVolumePanend(){this.isShowVolume=!1},handleSetPlaybackRate(t){this.playbackRate=+t,this.$refs.audio.playbackRate=+t,this.isShowRates=!1},handleShowErrorMessage(t={}){this.noticeMessage=t.message,this.isShowErrorMessage=!0,window.setTimeout(()=>{this.isShowErrorMessage=!1},t.duration||3e3)},onLoadedmetadata(t){this.duration=this.$refs.audio.duration,this.$emit("loadedmetadata",t)},onTimeUpdate(t){this.$emit("timeupdate",t)},formatTime(t){let e;return e=Math.floor(t/60),t=Math.ceil(t%60),e+="",t+="",e=e.length===1?"0"+e:e,t=t.length===1?"0"+t:t,e+":"+t},onEnded(t){window.setTimeout(()=>{this.pause(),this.$emit("ended",t),this.isLoop&&this.isAutoPlayNext&&this.playNext()},1e3)},handleProgressPanstart(t){this.disabledProgressDrag||(this.isDragging=!0,this.$emit("progress-start",t))},handleProgressPanend(t){this.disabledProgressDrag||(this.$refs.audio.currentTime=this.currentTime,this.play(),this.isDragging=!1,this.$emit("progress-end",t))},handleProgressPanmove(t){if(this.disabledProgressDrag)return;let e=t.x,r=t.target.getBoundingClientRect(),i=parseInt(getComputedStyle(t.target).left)+(e-r.left);i=Math.min(i,this.$refs.audioProgressWrap.offsetWidth),i=Math.max(i,0),this.setPointPosition(i),this.$refs.audioProgress.style.width=i+"px",this.currentTime=i/this.$refs.audioProgressWrap.offsetWidth*this.duration,this.$emit("progress-move",t)},handleClickProgressWrap(t){if(this.disabledProgressClick)return;let e=t.target,r=t.offsetX;e!==this.$refs.audioProgressPoint&&(this.currentTime=r/this.$refs.audioProgressWrap.offsetWidth*this.duration,this.$refs.audio.currentTime=this.currentTime,this.setPointPosition(r),this.$refs.audioProgress.style.width=r+"px",this.play(),this.$emit("progress-click",t))},setPointPosition(t){this.$refs.audioProgressPoint.style.left=t-this.$refs.audioProgressPoint.offsetWidth/2+"px"},playing(){if(this.isDragging)return;let t=this.$refs.audio.currentTime/this.$refs.audio.duration*this.$refs.audioProgressWrap.offsetWidth;this.currentTime=this.$refs.audio.currentTime,this.$refs.audioProgress.style.width=t+"px",this.setPointPosition(t),this.$emit("playing")},play(){this.isLoading=!0;let t=()=>{this.$refs.audio.play().then(()=>{this.$nextTick(()=>{this.timer?this.currentTime=this.$refs.audio.currentTime:this.timer=window.setInterval(this.playing,this.progressInterval),this.isPlaying=!0,this.isLoading=!1,this.$refs.audio.playbackRate=this.playbackRate}),this.$emit("play")}).catch(e=>{this.handleShowErrorMessage({message:e.message}),e.code===9&&this.isAutoPlayNext&&window.setTimeout(()=>{this.playNext()},3e3),this.isLoading=!1,this.$emit("play-error",e)})};if(this.isIOS&&(console.log("为了解决 iOS 设备接口异步请求后出现无法播放问题,请无视 The play() request was interrupted by a call to pause() 错误"),this.$refs.audio.play(),this.$refs.audio.pause()),this.beforePlay){this.beforePlay(e=>{e!==!1&&t()});return}t()},pause(){this.$refs.audio.pause(),this.$nextTick(()=>{this.clearTimer(),this.isPlaying=!1,this.$emit("pause")})},playPrev(){if(this.currentPlayIndex<=0&&!this.isLoop)return;this.clearTimer();let t=()=>{this.currentPlayIndex<=0&&this.isLoop?this.currentPlayIndex=this.audioList.length-1:this.currentPlayIndex--,this.$nextTick(()=>{this.play(),this.$emit("play-prev")})};if(this.beforePrev){this.beforePrev(e=>{e!==!1&&t()});return}t()},clearTimer(){window.clearInterval(this.timer),this.timer=null},playNext(){if(this.currentPlayIndex+1>=this.audioList.length&&!this.isLoop)return;this.clearTimer();let t=()=>{this.currentPlayIndex+1>=this.audioList.length&&this.isLoop?this.currentPlayIndex=0:this.currentPlayIndex++,this.$nextTick(()=>{this.play(),this.$emit("play-next")})};if(this.beforeNext){this.beforeNext(e=>{e!==!1&&t()});return}t()}}},XV={class:"audio-player"},ZV={class:"audio__btn-wrap"},jV=["onClick"],KV=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-play-prev"})],-1),JV={key:2,class:"audio__play-loading"},QV=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-play"})],-1),e$=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-pause"})],-1),t$=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-play-next"})],-1),r$={key:5,class:"audio__play-volume-icon-wrap"},n$=["xlink:href"],i$={class:"audio__time-wrap"},a$={class:"audio__current-time"},o$={class:"audio__duration"},s$=["src"];function l$(t,e,r,n,i,a){return Lr(),bn("div",XV,[mr("div",ZV,[r.showPlaybackRate?(Lr(),bn("div",{key:0,class:"audio__play-rate",style:ia({color:r.themeColor})},[mr("span",{onClick:e[0]||(e[0]=Do(o=>i.isShowRates=!i.isShowRates,["stop"]))},zs(i.playbackRate.toFixed(1)+"x"),1),Jr(R6,{name:"fade-rate"},{default:An(()=>[jf(mr("div",{class:"audio__play-rate__dropdown",style:ia({backgroundColor:r.themeColor})},[(Lr(!0),bn(hm,null,f4(r.playbackRates,o=>(Lr(),bn("div",{key:"pr_"+o,onClick:Do(s=>a.handleSetPlaybackRate(o),["stop"])},zs(o.toFixed(1)+"x"),9,jV))),128))],4),[[Kf,i.isShowRates]])]),_:1})],4)):Jf("",!0),r.showPrevButton?(Lr(),bn("div",{key:1,class:F6(["audio__play-prev",{disable:!r.isLoop&&i.currentPlayIndex===0}]),onClick:e[1]||(e[1]=Do((...o)=>a.playPrev&&a.playPrev(...o),["stop"])),style:ia({color:r.themeColor})},[qv(t.$slots,"play-prev",{},()=>[KV])],6)):Jf("",!0),i.isLoading?(Lr(),bn("div",JV,[(Lr(),bn(hm,null,f4(8,o=>mr("span",{key:o,style:ia({backgroundColor:r.themeColor})},null,4)),64))])):(Lr(),bn(hm,{key:3},[!i.isPlaying&&r.showPlayButton?(Lr(),bn("div",{key:0,class:"audio__play-start",onClick:e[2]||(e[2]=Do((...o)=>a.play&&a.play(...o),["stop"])),style:ia({color:r.themeColor})},[qv(t.$slots,"play-start",{},()=>[QV])],4)):r.showPlayButton?(Lr(),bn("div",{key:1,class:"audio__play-pause",onClick:e[3]||(e[3]=Do((...o)=>a.pause&&a.pause(...o),["stop"])),style:ia({color:r.themeColor})},[qv(t.$slots,"play-pause",{},()=>[e$])],4)):Jf("",!0)],64)),r.showNextButton?(Lr(),bn("div",{key:4,class:F6(["audio__play-next",{disable:!r.isLoop&&i.currentPlayIndex===r.audioList.length-1}]),onClick:e[4]||(e[4]=Do((...o)=>a.playNext&&a.playNext(...o),["stop"])),style:ia({color:r.themeColor})},[qv(t.$slots,"play-next",{},()=>[t$])],6)):Jf("",!0),r.showVolumeButton?(Lr(),bn("div",r$,[(Lr(),bn("svg",{class:"audio__play-icon","aria-hidden":"true",style:ia({color:r.themeColor}),onClick:e[5]||(e[5]=Do((...o)=>a.handleVolumeIconTouchstart&&a.handleVolumeIconTouchstart(...o),["stop"]))},[mr("use",{"xlink:href":i.currentVolume?"#icon-volume":"#icon-volume-no"},null,8,n$)],4)),Jr(R6,{name:"fade-volume"},{default:An(()=>[jf(mr("div",{ref:"playVolumeWrap",class:"audio__play-volume-wrap",onClick:e[6]||(e[6]=Do((...o)=>a.handleVolumePanmove&&a.handleVolumePanmove(...o),["stop"])),onPanmove:e[7]||(e[7]=(...o)=>a.handleVolumePanmove&&a.handleVolumePanmove(...o)),onPanend:e[8]||(e[8]=(...o)=>a.handleVolumePanend&&a.handleVolumePanend(...o))},[mr("div",{ref:"playVolume",class:"audio__play-volume",style:ia({height:i.currentVolume*100+"%",backgroundColor:r.themeColor})},null,4)],544),[[Kf,i.isShowVolume]])]),_:1})])):Jf("",!0),jf(mr("div",{class:"audio__notice"},zs(i.noticeMessage),513),[[Kf,i.isShowErrorMessage]])]),jf(mr("div",{ref:"audioProgressWrap",class:"audio__progress-wrap",onClick:e[12]||(e[12]=Do((...o)=>a.handleClickProgressWrap&&a.handleClickProgressWrap(...o),["stop"]))},[mr("div",{ref:"audioProgress",class:"audio__progress",style:ia({backgroundColor:r.themeColor})},null,4),mr("div",{ref:"audioProgressPoint",class:"audio__progress-point",style:ia({backgroundColor:r.themeColor,boxShadow:`0 0 10px 0 ${r.themeColor}`}),onPanstart:e[9]||(e[9]=(...o)=>a.handleProgressPanstart&&a.handleProgressPanstart(...o)),onPanend:e[10]||(e[10]=(...o)=>a.handleProgressPanend&&a.handleProgressPanend(...o)),onPanmove:e[11]||(e[11]=(...o)=>a.handleProgressPanmove&&a.handleProgressPanmove(...o))},null,36)],512),[[Kf,r.showProgressBar]]),jf(mr("div",i$,[mr("div",a$,zs(a.currentTimeFormatted),1),mr("div",o$,zs(a.durationFormatted),1)],512),[[Kf,r.showProgressBar]]),mr("audio",Qz({ref:"audio",class:"audio-player__audio",src:r.audioList[i.currentPlayIndex]},t.$attrs,{onEnded:e[13]||(e[13]=(...o)=>a.onEnded&&a.onEnded(...o)),onTimeupdate:e[14]||(e[14]=(...o)=>a.onTimeUpdate&&a.onTimeUpdate(...o)),onLoadedmetadata:e[15]||(e[15]=(...o)=>a.onLoadedmetadata&&a.onLoadedmetadata(...o))})," 浏览器太老咯,请升级浏览器吧~ ",16,s$)])}const cm=cV(YV,[["render",l$]]);cm.install=t=>{t.component(cm.name,cm)};const U3e={__name:"AudioPlayer",props:{audios:{type:Array,required:!0,default:()=>[]}},setup(t){const e=t;return(r,n)=>(Lr(),Pc(Ks(cm),{"audio-list":e.audios,"theme-color":"#28c5e5",isLoop:!1},null,8,["audio-list"]))}};var m4={exports:{}},b_={exports:{}},W6;function u$(){return W6||(W6=1,function(t,e){(function(n,i){t.exports=i()})(typeof self<"u"?self:gu,function(){return function(){var r={};(function(){r.d=function(R,_){for(var x in _)r.o(_,x)&&!r.o(R,x)&&Object.defineProperty(R,x,{enumerable:!0,get:_[x]})}})(),function(){r.o=function(R,_){return Object.prototype.hasOwnProperty.call(R,_)}}();var n={};r.d(n,{default:function(){return p_}});var i=function R(_,x){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var S="KaTeX parse error: "+_,A,L,F=x&&x.loc;if(F&&F.start<=F.end){var Y=F.lexer.input;A=F.start,L=F.end,A===Y.length?S+=" at end of input: ":S+=" at position "+(A+1)+": ";var Q=Y.slice(A,L).replace(/[^]/g,"$&̲"),te;A>15?te="…"+Y.slice(A-15,A):te=Y.slice(0,A);var le;L+15":">","<":"<",'"':""","'":"'"},c=/[&><"']/g;function f(R){return String(R).replace(c,function(_){return h[_]})}var d=function R(_){return _.type==="ordgroup"||_.type==="color"?_.body.length===1?R(_.body[0]):_:_.type==="font"?R(_.body):_},v=function(_){var x=d(_);return x.type==="mathord"||x.type==="textord"||x.type==="atom"},g=function(_){if(!_)throw new Error("Expected non-null, but got "+String(_));return _},m=function(_){var x=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(_);return x!=null?x[1]:"_relative"},y={contains:o,deflt:s,escape:f,hyphenate:u,getBaseElem:d,isCharacterBox:v,protocolFromUrl:m},b={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:!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 ",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:function(_){return"#"+_}},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(_,x){return x.push(_),x}},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:function(_){return Math.max(0,_)},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:!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:function(_){return Math.max(0,_)},cli:"-s, --max-size ",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:function(_){return Math.max(0,_)},cli:"-e, --max-expand ",cliProcessor:function(_){return _==="Infinity"?1/0:parseInt(_)}},globalGroup:{type:"boolean",cli:!1}};function w(R){if(R.default)return R.default;var _=R.type,x=Array.isArray(_)?_[0]:_;if(typeof x!="string")return x.enum[0];switch(x){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var T=function(){function R(x){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,x=x||{};for(var S in b)if(b.hasOwnProperty(S)){var A=b[S];this[S]=x[S]!==void 0?A.processor?A.processor(x[S]):x[S]:w(A)}}var _=R.prototype;return _.reportNonstrict=function(S,A,L){var F=this.strict;if(typeof F=="function"&&(F=F(S,A,L)),!(!F||F==="ignore")){if(F===!0||F==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(A+" ["+S+"]"),L);F==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(A+" ["+S+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+F+"': "+A+" ["+S+"]"))}},_.useStrictBehavior=function(S,A,L){var F=this.strict;if(typeof F=="function")try{F=F(S,A,L)}catch{F="error"}return!F||F==="ignore"?!1:F===!0||F==="error"?!0:F==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(A+" ["+S+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+F+"': "+A+" ["+S+"]")),!1)},_.isTrusted=function(S){S.url&&!S.protocol&&(S.protocol=y.protocolFromUrl(S.url));var A=typeof this.trust=="function"?this.trust(S):this.trust;return!!A},R}(),M=function(){function R(x,S,A){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=x,this.size=S,this.cramped=A}var _=R.prototype;return _.sup=function(){return G[J[this.id]]},_.sub=function(){return G[K[this.id]]},_.fracNum=function(){return G[se[this.id]]},_.fracDen=function(){return G[ae[this.id]]},_.cramp=function(){return G[ce[this.id]]},_.text=function(){return G[ye[this.id]]},_.isTight=function(){return this.size>=2},R}(),D=0,P=1,O=2,V=3,$=4,H=5,j=6,q=7,G=[new M(D,0,!1),new M(P,0,!0),new M(O,1,!1),new M(V,1,!0),new M($,2,!1),new M(H,2,!0),new M(j,3,!1),new M(q,3,!0)],J=[$,H,$,H,j,q,j,q],K=[H,H,H,H,q,q,q,q],se=[O,V,$,H,j,q,j,q],ae=[V,V,H,H,q,q,q,q],ce=[P,P,V,V,H,H,q,q],ye=[D,P,O,V,O,V,O,V],de={DISPLAY:G[D],TEXT:G[O],SCRIPT:G[$],SCRIPTSCRIPT:G[j]},De=[{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]]}];function Ie(R){for(var _=0;_=A[0]&&R<=A[1])return x.name}return null}var Pe=[];De.forEach(function(R){return R.blocks.forEach(function(_){return Pe.push.apply(Pe,_)})});function Qe(R){for(var _=0;_=Pe[_]&&R<=Pe[_+1])return!0;return!1}var Ke=80,et=function(_,x){return"M95,"+(622+_+x)+` +import{at as I3,au as Pz,av as Rz,aw as hM,ax as Fz,ay as Oz,az as Nz,aA as cM,aB as I6,aC as zz,aD as Vz,aE as $z,aF as Gz,aG as Hz,aH as qz,aI as Wz,aJ as B6,aK as Uz,aL as Yz,aM as Xz,aN as Zz,c as Nr,A as jz,U as lp,a0 as fM,m as P6,r as Ks,D as Kz,P as Gn,o as Sr,e as ln,K as Wu,x as hn,F as Q0,y as d4,G as mr,u as Go,Y as Jz,R as xy,H as Oo,J as ia,ak as Do,V as mc,W as Kf,aO as R6,I as Jf,n as F6,f as Wv,T as Qz,aP as mu,v as B3,aQ as eV,w as wu,aR as P3,aS as tV,aT as rV,aU as nV,aV as iV,aW as b_,aX as Gr,a as aV,Z as Uv,i as Yv,B as oV,b as lu,C as sV,E as O6,N as lV,L as N6,M as uV,p as hV,an as cV,ao as fV}from"./index-ef7aa48c.js";import{_ as dV}from"./_plugin-vue_export-helper-c27b6911.js";function pV(t,e,r){if(!I3(r))return!1;var n=typeof e;return(n=="number"?Pz(r)&&Rz(e,r.length):n=="string"&&e in r)?hM(r[e],t):!1}function vV(t){return Fz(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,o&&pV(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n{i.value=l,n.forEach((u,h)=>{u===l&&(r.value=a[h])})},s=l=>{l>=0&&l<=.3?i.value=e("components.nodes.llms.OpenAI.precise"):l>.3&&l<=.7?i.value=e("components.nodes.llms.OpenAI.balanced"):l>.7&&l<=1&&(i.value=e("components.nodes.llms.OpenAI.creative"))};return Kz(()=>{s(r.value)}),(l,u)=>{const h=Gn("a-segmented"),c=Gn("a-input-number");return Sr(),ln("div",null,[Nr(h,{value:i.value,"onUpdate:value":u[0]||(u[0]=f=>i.value=f),options:n,block:"",onChange:o},null,8,["value","options"]),Nr(c,{style:{width:"100%"},value:r.value,"onUpdate:value":u[1]||(u[1]=f=>r.value=f),step:.1,max:1,min:0,keyboard:!1,onChange:s},null,8,["value"])])}}},CV={style:{display:"flex",gap:"5px"}},U3e={__name:"ListFieldUse",props:{modelValue:{}},emits:["update:modelValue"],setup(t){const e=fM(t,"modelValue"),{t:r}=lp(),n=(a,o)=>{e.value[o]=a},i=a=>{e.value.splice(a,1)};return(a,o)=>{const s=Gn("a-input"),l=Gn("a-col"),u=Gn("a-button"),h=Gn("a-row");return Sr(),Wu(h,{type:"flex",gutter:[12,12]},{default:hn(()=>[(Sr(!0),ln(Q0,null,d4(e.value,(c,f)=>(Sr(),Wu(l,{span:24,key:f},{default:hn(()=>[mr("div",CV,[Nr(s,{value:c,onInput:d=>n(d.target.value,f)},null,8,["value","onInput"]),Nr(Go(wV),{onClick:d=>i(f)},null,8,["onClick"])])]),_:2},1024))),128)),Nr(l,{span:24},{default:hn(()=>[Nr(u,{type:"dashed",style:{width:"100%"},onClick:o[0]||(o[0]=c=>e.value.push(""))},{default:hn(()=>[Nr(Go(Jz)),xy(" "+Oo(Go(r)("components.nodes.listField.add_item")),1)]),_:1})]),_:1})]),_:1})}}};window._iconfont_svg_string_1017934='',function(t){var r=(r=document.getElementsByTagName("script"))[r.length-1],e=r.getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,a,o,s,l=function(c,f){f.parentNode.insertBefore(c,f)};if(e&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}n=function(){var c,f=document.createElement("div");f.innerHTML=t._iconfont_svg_string_1017934,(f=f.getElementsByTagName("svg")[0])&&(f.setAttribute("aria-hidden","true"),f.style.position="absolute",f.style.width=0,f.style.height=0,f.style.overflow="hidden",f=f,(c=document.body).firstChild?l(f,c.firstChild):c.appendChild(f))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=n,o=t.document,s=!1,h(),o.onreadystatechange=function(){o.readyState=="complete"&&(o.onreadystatechange=null,u())})}function u(){s||(s=!0,a())}function h(){try{o.documentElement.doScroll("left")}catch{return void setTimeout(h,50)}u()}}(window);let AV=class{constructor(){this.__map={}}beforeEach(e){this.__interceptor=e}on(e,r){const n=Array.isArray(e)?e:[e];for(const i of n){this.__map[i]=this.__map[i]||[];const a=this.__map[i];a&&a.push(r)}return this}emit(e,r,n){this.__interceptor!==void 0?this.__interceptor(e,()=>{this.__emit(e,r),n&&n()}):(this.__emit(e,r),n&&n())}__emit(e,r){const n=this.__map[e];if(Array.isArray(n)&&(n!=null&&n.length))for(const i of n)i(r,e);this.event=r}off(e,r){const n=this.__map[e];if(n!==void 0)if(r===void 0)delete this.__map[e];else{const i=n.findIndex(a=>a===r);n.splice(i,1)}}destroy(){this.__map={}}};const g4="clientX",m4="clientY",TV=16,pM="start",kV="move",vM="cancel",gM="end",DV="left",MV="right",LV="up",EV="down",IV={4:"start",5:"move",1:"end",3:"cancel"};function BV(t){return IV[t]}function PV(t,e,r){const n={1:{0:{move:4},4:{move:5,end:1,cancel:3},5:{move:5,end:1,cancel:3}},0:{4:{move:2,end:1,cancel:3},5:{start:2,move:2,end:1,cancel:3}}}[Number(t)][e];return n!==void 0&&n[r]||0}function RV(t){[1,3,2].includes(t.state)&&(t.state=0)}function FV(t){return[5,1,3].includes(t)}function OV(t){if(t.disabled)return t.state=0,!0}function NV(t,e){return Object.assign(Object.assign(Object.assign({},t),e),{state:0,disabled:!1})}function V6(){let t,e,r,n,i=0;return function(a){if(t=e,a!==void 0){i=Number.MAX_SAFE_INTEGER>i?++i:1;const o=function(u,h){const{phase:c,points:f,changedPoints:d,nativeEvent:v}=u,g=f.length,m=pM===c,y=gM===c&&g===0||vM===c,b=Date.now(),{x:w,y:T}=$6(f)||$6(d),{currentTarget:M}=v;return Object.assign(u,{id:h,x:w,y:T,timestamp:b,isStart:m,isEnd:y,pointLength:g,currentTarget:M,getOffset(D=M){const P=D.getBoundingClientRect();return{x:w-Math.round(P.left),y:T-Math.round(P.top)}}})}(a,i);e=o;const{isStart:s,pointLength:l}=o;return s&&(r=o,t=void 0,n=1(n.x+=i[g4],n.y+=i[m4],n),{x:0,y:0});return{x:Math.round(r.x/e),y:Math.round(r.y/e)}}}function G6(t,e,r,n){const i={};for(const o in r)["target","currentTarget","type"].includes(o)||(i[o]=r[o]);let a;return document.createEvent?(a=document.createEvent("HTMLEvents"),a.initEvent(t,n==null?void 0:n.bubbles,n==null?void 0:n.cancelable)):a=new Event(t,n),Object.assign(a,i,{match:()=>r.targets&&0a.currentTarget.contains(o))}),e.dispatchEvent(a)}function zV(t,e){const{preventDefault:r}=e;return n=r,Object.prototype.toString.call(n)==="[object Function]"?r(t):!!r;var n}const H6=["touchstart","touchmove","touchend","touchcancel","mousedown"],q6=["mousemove","mouseup"],VV={domEvents:{bubbles:!0,cancelable:!0},preventDefault:t=>{if(t.target&&"tagName"in t.target){const{tagName:e}=t.target;return!/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(e)}return!1}};class $V extends AV{constructor(e,r){super(),this.v="2.1.3",this.__computeFunctionList=[],this.__computeFunctionCreatorList=[],this.__pluginContexts=[],this.__isIgnoreMouse=!1,this.el=e,this.c={},this.__options=Object.assign(Object.assign({},VV),r);const n=function(a){const o=V6();return function(s){const l=[],u=[];Array.from(s.touches).forEach(({clientX:c,clientY:f,target:d})=>{a!=null&&a.contains(d)&&(l.push(d),u.push({clientX:c,clientY:f,target:d}))});const h=Array.from(s.changedTouches).map(({clientX:c,clientY:f,target:d})=>({clientX:c,clientY:f,target:d}));return o({phase:s.type.replace("touch",""),changedPoints:h,points:u,nativeEvent:s,target:s.target,targets:l})}}(this.el),i=function(){let a,o=!1,s=null;const l=V6();return function(u){const{clientX:h,clientY:c,type:f,button:d,target:v}=u;let g,m=[{clientX:h,clientY:c,target:v}];if(f==="mousedown"&&d===0)s=v,o=!0,g="start";else{if(!o)return;f==="mousemove"?g="move":f==="mouseup"&&(m=[],g="end",o=!1)}const y=a||[{clientX:h,clientY:c,target:v}];if(a=[{clientX:h,clientY:c,target:v}],g!==void 0)return l({phase:g,changedPoints:y,points:m,target:s,targets:[s],nativeEvent:u})}}();if(this.__inputCreatorMap={touchstart:n,touchmove:n,touchend:n,touchcancel:n,mousedown:i,mousemove:i,mouseup:i},this.on("at:after",a=>{const{target:o,__type:s}=a,{domEvents:l}=this.__options;l&&this.el!==void 0&&o&&(G6(s,o,a,l),G6("at:after",o,a,l))}),e!==void 0){e.style.webkitTapHighlightColor="rgba(0,0,0,0)";let a=!1;try{const o={};Object.defineProperty(o,"passive",{get(){a=!0}}),window.addEventListener("_",()=>{},o)}catch{}this.on("u",function(o,s,l){return H6.forEach(u=>{o.addEventListener(u,s,l)}),q6.forEach(u=>{window.addEventListener(u,s,l)}),()=>{H6.forEach(u=>{o.removeEventListener(u,s)}),q6.forEach(u=>{window.removeEventListener(u,s)})}}(e,this.catchEvent.bind(this),this.__options.preventDefault===!1&&a?{passive:!0}:{passive:!1}))}}use(e,r){this.__pluginContexts.push(e(this,r))}catchEvent(e){const r=this.__inputCreatorMap[e.type](e);if(r!==void 0){const n=()=>e.stopPropagation(),i=()=>e.stopImmediatePropagation(),a=()=>e.preventDefault();if(zV(e,this.__options))a();else if(e.type==="touchstart"?this.__isIgnoreMouse=!0:e.type==="touchmove"&&(this.__isIgnoreMouse=!1),this.__isIgnoreMouse&&e.type.startsWith("mouse"))return void(e.type==="mouseup"&&(this.__isIgnoreMouse=!1));this.emit("input",r),this.emit2(`at:${r.phase}`,r,{});const o={};this.__computeFunctionList.forEach(s=>{const l=s(r,o);if(l!==void 0)for(const u in l)o[u]=l[u]}),this.emit("computed",Object.assign(Object.assign(Object.assign({},r),o),{stopPropagation:n,stopImmediatePropagation:i,preventDefault:a}))}}compute(e,r){for(const n of e)this.__computeFunctionCreatorList.includes(n)||(this.__computeFunctionCreatorList.push(n),this.__computeFunctionList.push(n()));this.on("computed",r)}beforeEach(e){super.beforeEach((r,n)=>{var i;!((i=this.c)===null||i===void 0)&&i.name?e(r,n):n()})}get(e){return this.__pluginContexts.find(r=>e===r.name)}set(e){this.__options=Object.assign(Object.assign({},this.__options),e)}emit2(e,r,n){this.c=n,this.emit(e,Object.assign(Object.assign({},r),{type:e}),()=>{this.emit("at:after",Object.assign(Object.assign({},r),{name:e,__type:e}))})}destroy(){this.emit("u"),super.destroy()}}var GV=t=>Math.sqrt(t.x*t.x+t.y*t.y),HV=t=>t/Math.PI*180,mM=(t,e)=>{if(t!==0||e!==0)return Math.abs(t)>=Math.abs(e)?0{if(RV(r),OV(r))return;const i=function(){const{pointLength:a,distance:o}=n;return r.pointLength===a&&r.threshold<=o}();if(r.state=PV(i,r.state,n.phase),i||FV(r.state)){const{name:a}=r;t.emit2(a,n,r),t.emit2(a+BV(r.state),n,r),![gM,vM].includes(n.phase)&&n.direction&&t.emit2(a+n.direction,n,r)}}),r}const ZV={name:"AudioPlayer",inheritAttrs:!1,props:{audioList:{default:null,type:Array},showPlayButton:{default:!0,type:Boolean},showPrevButton:{default:!0,type:Boolean},showNextButton:{default:!0,type:Boolean},showVolumeButton:{default:!0,type:Boolean},showProgressBar:{default:!0,type:Boolean},beforePlay:{default:null,type:Function},beforePrev:{default:null,type:Function},beforeNext:{default:null,type:Function},isLoop:{type:Boolean,default:!0},isAutoPlayNext:{type:Boolean,default:!0},progressInterval:{default:1e3,type:Number},showPlaybackRate:{type:Boolean,default:!0},playbackRates:{type:Array,default:()=>[.5,1,1.5,2]},themeColor:{type:String,default:"#EC4141"},disabledProgressDrag:{type:Boolean,default:!1},disabledProgressClick:{type:Boolean,default:!1}},emits:["pause","play-prev","play-next","timeupdate","loadedmetadata","ended","progress-start","progress-end","progress-move","progress-click","playing","play","play-error"],data(){return{isIOS:/iPhone|iPad|iPod/i.test(window.navigator.userAgent),isPlaying:!1,isDragging:!1,isDraggingVolume:!1,isShowErrorMessage:!1,isLoading:!1,isShowVolume:!1,isShowRates:!1,timer:null,noticeMessage:"",duration:"",currentPlayIndex:0,currentTime:"",currentVolume:1,playbackRate:1,at:null}},computed:{currentTimeFormatted(){return this.currentTime?this.formatTime(this.currentTime):"00:00"},durationFormatted(){return this.duration?this.formatTime(this.duration):"00:00"}},mounted(){this.at=new $V(this.$el,{preventDefault:!1}),this.at.use(XV)},beforeUnmount(){this.at.destroy(),this.pause()},methods:{handleVolumeIconTouchstart(){this.isShowVolume=!this.isShowVolume},handleVolumePanmove(t){let e=this.$refs.playVolumeWrap.getBoundingClientRect(),r=t.y,n,i;n=Math.round(e.bottom-r),i=n/this.$refs.playVolumeWrap.offsetHeight,i=Math.min(i,1),i=Math.max(i,0),this.$refs.audio.volume=i,this.currentVolume=i},handleVolumePanend(){this.isShowVolume=!1},handleSetPlaybackRate(t){this.playbackRate=+t,this.$refs.audio.playbackRate=+t,this.isShowRates=!1},handleShowErrorMessage(t={}){this.noticeMessage=t.message,this.isShowErrorMessage=!0,window.setTimeout(()=>{this.isShowErrorMessage=!1},t.duration||3e3)},onLoadedmetadata(t){this.duration=this.$refs.audio.duration,this.$emit("loadedmetadata",t)},onTimeUpdate(t){this.$emit("timeupdate",t)},formatTime(t){let e;return e=Math.floor(t/60),t=Math.ceil(t%60),e+="",t+="",e=e.length===1?"0"+e:e,t=t.length===1?"0"+t:t,e+":"+t},onEnded(t){window.setTimeout(()=>{this.pause(),this.$emit("ended",t),this.isLoop&&this.isAutoPlayNext&&this.playNext()},1e3)},handleProgressPanstart(t){this.disabledProgressDrag||(this.isDragging=!0,this.$emit("progress-start",t))},handleProgressPanend(t){this.disabledProgressDrag||(this.$refs.audio.currentTime=this.currentTime,this.play(),this.isDragging=!1,this.$emit("progress-end",t))},handleProgressPanmove(t){if(this.disabledProgressDrag)return;let e=t.x,r=t.target.getBoundingClientRect(),i=parseInt(getComputedStyle(t.target).left)+(e-r.left);i=Math.min(i,this.$refs.audioProgressWrap.offsetWidth),i=Math.max(i,0),this.setPointPosition(i),this.$refs.audioProgress.style.width=i+"px",this.currentTime=i/this.$refs.audioProgressWrap.offsetWidth*this.duration,this.$emit("progress-move",t)},handleClickProgressWrap(t){if(this.disabledProgressClick)return;let e=t.target,r=t.offsetX;e!==this.$refs.audioProgressPoint&&(this.currentTime=r/this.$refs.audioProgressWrap.offsetWidth*this.duration,this.$refs.audio.currentTime=this.currentTime,this.setPointPosition(r),this.$refs.audioProgress.style.width=r+"px",this.play(),this.$emit("progress-click",t))},setPointPosition(t){this.$refs.audioProgressPoint.style.left=t-this.$refs.audioProgressPoint.offsetWidth/2+"px"},playing(){if(this.isDragging)return;let t=this.$refs.audio.currentTime/this.$refs.audio.duration*this.$refs.audioProgressWrap.offsetWidth;this.currentTime=this.$refs.audio.currentTime,this.$refs.audioProgress.style.width=t+"px",this.setPointPosition(t),this.$emit("playing")},play(){this.isLoading=!0;let t=()=>{this.$refs.audio.play().then(()=>{this.$nextTick(()=>{this.timer?this.currentTime=this.$refs.audio.currentTime:this.timer=window.setInterval(this.playing,this.progressInterval),this.isPlaying=!0,this.isLoading=!1,this.$refs.audio.playbackRate=this.playbackRate}),this.$emit("play")}).catch(e=>{this.handleShowErrorMessage({message:e.message}),e.code===9&&this.isAutoPlayNext&&window.setTimeout(()=>{this.playNext()},3e3),this.isLoading=!1,this.$emit("play-error",e)})};if(this.isIOS&&(console.log("为了解决 iOS 设备接口异步请求后出现无法播放问题,请无视 The play() request was interrupted by a call to pause() 错误"),this.$refs.audio.play(),this.$refs.audio.pause()),this.beforePlay){this.beforePlay(e=>{e!==!1&&t()});return}t()},pause(){this.$refs.audio.pause(),this.$nextTick(()=>{this.clearTimer(),this.isPlaying=!1,this.$emit("pause")})},playPrev(){if(this.currentPlayIndex<=0&&!this.isLoop)return;this.clearTimer();let t=()=>{this.currentPlayIndex<=0&&this.isLoop?this.currentPlayIndex=this.audioList.length-1:this.currentPlayIndex--,this.$nextTick(()=>{this.play(),this.$emit("play-prev")})};if(this.beforePrev){this.beforePrev(e=>{e!==!1&&t()});return}t()},clearTimer(){window.clearInterval(this.timer),this.timer=null},playNext(){if(this.currentPlayIndex+1>=this.audioList.length&&!this.isLoop)return;this.clearTimer();let t=()=>{this.currentPlayIndex+1>=this.audioList.length&&this.isLoop?this.currentPlayIndex=0:this.currentPlayIndex++,this.$nextTick(()=>{this.play(),this.$emit("play-next")})};if(this.beforeNext){this.beforeNext(e=>{e!==!1&&t()});return}t()}}},jV={class:"audio-player"},KV={class:"audio__btn-wrap"},JV=["onClick"],QV=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-play-prev"})],-1),e$={key:2,class:"audio__play-loading"},t$=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-play"})],-1),r$=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-pause"})],-1),n$=mr("svg",{class:"audio__play-icon","aria-hidden":"true"},[mr("use",{"xlink:href":"#icon-play-next"})],-1),i$={key:5,class:"audio__play-volume-icon-wrap"},a$=["xlink:href"],o$={class:"audio__time-wrap"},s$={class:"audio__current-time"},l$={class:"audio__duration"},u$=["src"];function h$(t,e,r,n,i,a){return Sr(),ln("div",jV,[mr("div",KV,[r.showPlaybackRate?(Sr(),ln("div",{key:0,class:"audio__play-rate",style:ia({color:r.themeColor})},[mr("span",{onClick:e[0]||(e[0]=Do(o=>i.isShowRates=!i.isShowRates,["stop"]))},Oo(i.playbackRate.toFixed(1)+"x"),1),Nr(R6,{name:"fade-rate"},{default:hn(()=>[mc(mr("div",{class:"audio__play-rate__dropdown",style:ia({backgroundColor:r.themeColor})},[(Sr(!0),ln(Q0,null,d4(r.playbackRates,o=>(Sr(),ln("div",{key:"pr_"+o,onClick:Do(s=>a.handleSetPlaybackRate(o),["stop"])},Oo(o.toFixed(1)+"x"),9,JV))),128))],4),[[Kf,i.isShowRates]])]),_:1})],4)):Jf("",!0),r.showPrevButton?(Sr(),ln("div",{key:1,class:F6(["audio__play-prev",{disable:!r.isLoop&&i.currentPlayIndex===0}]),onClick:e[1]||(e[1]=Do((...o)=>a.playPrev&&a.playPrev(...o),["stop"])),style:ia({color:r.themeColor})},[Wv(t.$slots,"play-prev",{},()=>[QV])],6)):Jf("",!0),i.isLoading?(Sr(),ln("div",e$,[(Sr(),ln(Q0,null,d4(8,o=>mr("span",{key:o,style:ia({backgroundColor:r.themeColor})},null,4)),64))])):(Sr(),ln(Q0,{key:3},[!i.isPlaying&&r.showPlayButton?(Sr(),ln("div",{key:0,class:"audio__play-start",onClick:e[2]||(e[2]=Do((...o)=>a.play&&a.play(...o),["stop"])),style:ia({color:r.themeColor})},[Wv(t.$slots,"play-start",{},()=>[t$])],4)):r.showPlayButton?(Sr(),ln("div",{key:1,class:"audio__play-pause",onClick:e[3]||(e[3]=Do((...o)=>a.pause&&a.pause(...o),["stop"])),style:ia({color:r.themeColor})},[Wv(t.$slots,"play-pause",{},()=>[r$])],4)):Jf("",!0)],64)),r.showNextButton?(Sr(),ln("div",{key:4,class:F6(["audio__play-next",{disable:!r.isLoop&&i.currentPlayIndex===r.audioList.length-1}]),onClick:e[4]||(e[4]=Do((...o)=>a.playNext&&a.playNext(...o),["stop"])),style:ia({color:r.themeColor})},[Wv(t.$slots,"play-next",{},()=>[n$])],6)):Jf("",!0),r.showVolumeButton?(Sr(),ln("div",i$,[(Sr(),ln("svg",{class:"audio__play-icon","aria-hidden":"true",style:ia({color:r.themeColor}),onClick:e[5]||(e[5]=Do((...o)=>a.handleVolumeIconTouchstart&&a.handleVolumeIconTouchstart(...o),["stop"]))},[mr("use",{"xlink:href":i.currentVolume?"#icon-volume":"#icon-volume-no"},null,8,a$)],4)),Nr(R6,{name:"fade-volume"},{default:hn(()=>[mc(mr("div",{ref:"playVolumeWrap",class:"audio__play-volume-wrap",onClick:e[6]||(e[6]=Do((...o)=>a.handleVolumePanmove&&a.handleVolumePanmove(...o),["stop"])),onPanmove:e[7]||(e[7]=(...o)=>a.handleVolumePanmove&&a.handleVolumePanmove(...o)),onPanend:e[8]||(e[8]=(...o)=>a.handleVolumePanend&&a.handleVolumePanend(...o))},[mr("div",{ref:"playVolume",class:"audio__play-volume",style:ia({height:i.currentVolume*100+"%",backgroundColor:r.themeColor})},null,4)],544),[[Kf,i.isShowVolume]])]),_:1})])):Jf("",!0),mc(mr("div",{class:"audio__notice"},Oo(i.noticeMessage),513),[[Kf,i.isShowErrorMessage]])]),mc(mr("div",{ref:"audioProgressWrap",class:"audio__progress-wrap",onClick:e[12]||(e[12]=Do((...o)=>a.handleClickProgressWrap&&a.handleClickProgressWrap(...o),["stop"]))},[mr("div",{ref:"audioProgress",class:"audio__progress",style:ia({backgroundColor:r.themeColor})},null,4),mr("div",{ref:"audioProgressPoint",class:"audio__progress-point",style:ia({backgroundColor:r.themeColor,boxShadow:`0 0 10px 0 ${r.themeColor}`}),onPanstart:e[9]||(e[9]=(...o)=>a.handleProgressPanstart&&a.handleProgressPanstart(...o)),onPanend:e[10]||(e[10]=(...o)=>a.handleProgressPanend&&a.handleProgressPanend(...o)),onPanmove:e[11]||(e[11]=(...o)=>a.handleProgressPanmove&&a.handleProgressPanmove(...o))},null,36)],512),[[Kf,r.showProgressBar]]),mc(mr("div",o$,[mr("div",s$,Oo(a.currentTimeFormatted),1),mr("div",l$,Oo(a.durationFormatted),1)],512),[[Kf,r.showProgressBar]]),mr("audio",Qz({ref:"audio",class:"audio-player__audio",src:r.audioList[i.currentPlayIndex]},t.$attrs,{onEnded:e[13]||(e[13]=(...o)=>a.onEnded&&a.onEnded(...o)),onTimeupdate:e[14]||(e[14]=(...o)=>a.onTimeUpdate&&a.onTimeUpdate(...o)),onLoadedmetadata:e[15]||(e[15]=(...o)=>a.onLoadedmetadata&&a.onLoadedmetadata(...o))})," 浏览器太老咯,请升级浏览器吧~ ",16,u$)])}const cm=dV(ZV,[["render",h$]]);cm.install=t=>{t.component(cm.name,cm)};const X3e={__name:"AudioPlayer",props:{audios:{type:Array,required:!0,default:()=>[]}},setup(t){const e=t;return(r,n)=>(Sr(),Wu(Go(cm),{"audio-list":e.audios,"theme-color":"#28c5e5",isLoop:!1},null,8,["audio-list"]))}};var y4={exports:{}},S_={exports:{}},W6;function c$(){return W6||(W6=1,function(t,e){(function(n,i){t.exports=i()})(typeof self<"u"?self:mu,function(){return function(){var r={};(function(){r.d=function(R,_){for(var x in _)r.o(_,x)&&!r.o(R,x)&&Object.defineProperty(R,x,{enumerable:!0,get:_[x]})}})(),function(){r.o=function(R,_){return Object.prototype.hasOwnProperty.call(R,_)}}();var n={};r.d(n,{default:function(){return v_}});var i=function R(_,x){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var S="KaTeX parse error: "+_,A,L,F=x&&x.loc;if(F&&F.start<=F.end){var Y=F.lexer.input;A=F.start,L=F.end,A===Y.length?S+=" at end of input: ":S+=" at position "+(A+1)+": ";var Q=Y.slice(A,L).replace(/[^]/g,"$&̲"),te;A>15?te="…"+Y.slice(A-15,A):te=Y.slice(0,A);var le;L+15":">","<":"<",'"':""","'":"'"},c=/[&><"']/g;function f(R){return String(R).replace(c,function(_){return h[_]})}var d=function R(_){return _.type==="ordgroup"||_.type==="color"?_.body.length===1?R(_.body[0]):_:_.type==="font"?R(_.body):_},v=function(_){var x=d(_);return x.type==="mathord"||x.type==="textord"||x.type==="atom"},g=function(_){if(!_)throw new Error("Expected non-null, but got "+String(_));return _},m=function(_){var x=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(_);return x!=null?x[1]:"_relative"},y={contains:o,deflt:s,escape:f,hyphenate:u,getBaseElem:d,isCharacterBox:v,protocolFromUrl:m},b={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:!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 ",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:function(_){return"#"+_}},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(_,x){return x.push(_),x}},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:function(_){return Math.max(0,_)},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:!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:function(_){return Math.max(0,_)},cli:"-s, --max-size ",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:function(_){return Math.max(0,_)},cli:"-e, --max-expand ",cliProcessor:function(_){return _==="Infinity"?1/0:parseInt(_)}},globalGroup:{type:"boolean",cli:!1}};function w(R){if(R.default)return R.default;var _=R.type,x=Array.isArray(_)?_[0]:_;if(typeof x!="string")return x.enum[0];switch(x){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var T=function(){function R(x){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,x=x||{};for(var S in b)if(b.hasOwnProperty(S)){var A=b[S];this[S]=x[S]!==void 0?A.processor?A.processor(x[S]):x[S]:w(A)}}var _=R.prototype;return _.reportNonstrict=function(S,A,L){var F=this.strict;if(typeof F=="function"&&(F=F(S,A,L)),!(!F||F==="ignore")){if(F===!0||F==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(A+" ["+S+"]"),L);F==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(A+" ["+S+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+F+"': "+A+" ["+S+"]"))}},_.useStrictBehavior=function(S,A,L){var F=this.strict;if(typeof F=="function")try{F=F(S,A,L)}catch{F="error"}return!F||F==="ignore"?!1:F===!0||F==="error"?!0:F==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(A+" ["+S+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+F+"': "+A+" ["+S+"]")),!1)},_.isTrusted=function(S){S.url&&!S.protocol&&(S.protocol=y.protocolFromUrl(S.url));var A=typeof this.trust=="function"?this.trust(S):this.trust;return!!A},R}(),M=function(){function R(x,S,A){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=x,this.size=S,this.cramped=A}var _=R.prototype;return _.sup=function(){return G[J[this.id]]},_.sub=function(){return G[K[this.id]]},_.fracNum=function(){return G[se[this.id]]},_.fracDen=function(){return G[ae[this.id]]},_.cramp=function(){return G[ce[this.id]]},_.text=function(){return G[ye[this.id]]},_.isTight=function(){return this.size>=2},R}(),D=0,P=1,O=2,V=3,$=4,H=5,j=6,q=7,G=[new M(D,0,!1),new M(P,0,!0),new M(O,1,!1),new M(V,1,!0),new M($,2,!1),new M(H,2,!0),new M(j,3,!1),new M(q,3,!0)],J=[$,H,$,H,j,q,j,q],K=[H,H,H,H,q,q,q,q],se=[O,V,$,H,j,q,j,q],ae=[V,V,H,H,q,q,q,q],ce=[P,P,V,V,H,H,q,q],ye=[D,P,O,V,O,V,O,V],de={DISPLAY:G[D],TEXT:G[O],SCRIPT:G[$],SCRIPTSCRIPT:G[j]},De=[{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]]}];function Ie(R){for(var _=0;_=A[0]&&R<=A[1])return x.name}return null}var Pe=[];De.forEach(function(R){return R.blocks.forEach(function(_){return Pe.push.apply(Pe,_)})});function Qe(R){for(var _=0;_=Pe[_]&&R<=Pe[_+1])return!0;return!1}var Ke=80,et=function(_,x){return"M95,"+(622+_+x)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.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 @@ -224,7 +224,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -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 c-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 -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Cr=function(_,x){switch(_){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+x+` v1759 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ar=function(_,x){switch(_){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+x+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+x+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+x+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+x+" v1759 h84z";case"vert":return"M145 15 v585 v"+x+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-x+` v-585 c-2.667,-10,-9.667,-15,-21,-15 @@ -252,13 +252,13 @@ c-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 c0,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 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(x+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --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.")}},dr=function(){function R(x){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=x,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var _=R.prototype;return _.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){for(var S=document.createDocumentFragment(),A=0;A=5?_=0:R>=3?_=1:_=2,!yo[_]){var x=yo[_]={cssEmPerMu:Mn.quad[_]/18};for(var S in Mn)Mn.hasOwnProperty(S)&&(x[S]=Mn[S][_])}return yo[_]}var lh=[[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]],as=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yl=function(_,x){return x.size<2?_:lh[_-1][x.size-1]},_o=function(){function R(x){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=x.style,this.color=x.color,this.size=x.size||R.BASESIZE,this.textSize=x.textSize||this.size,this.phantom=!!x.phantom,this.font=x.font||"",this.fontFamily=x.fontFamily||"",this.fontWeight=x.fontWeight||"",this.fontShape=x.fontShape||"",this.sizeMultiplier=as[this.size-1],this.maxSize=x.maxSize,this.minRuleThickness=x.minRuleThickness,this._fontMetrics=void 0}var _=R.prototype;return _.extend=function(S){var A={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 L in S)S.hasOwnProperty(L)&&(A[L]=S[L]);return new R(A)},_.havingStyle=function(S){return this.style===S?this:this.extend({style:S,size:yl(this.textSize,S)})},_.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},_.havingSize=function(S){return this.size===S&&this.textSize===S?this:this.extend({style:this.style.text(),size:S,textSize:S,sizeMultiplier:as[S-1]})},_.havingBaseStyle=function(S){S=S||this.style.text();var A=yl(R.BASESIZE,S);return this.size===A&&this.textSize===R.BASESIZE&&this.style===S?this:this.extend({style:S,size:A})},_.havingBaseSizing=function(){var S;switch(this.style.id){case 4:case 5:S=3;break;case 6:case 7:S=1;break;default:S=6}return this.extend({style:this.style.text(),size:S})},_.withColor=function(S){return this.extend({color:S})},_.withPhantom=function(){return this.extend({phantom:!0})},_.withFont=function(S){return this.extend({font:S})},_.withTextFontFamily=function(S){return this.extend({fontFamily:S,font:""})},_.withTextFontWeight=function(S){return this.extend({fontWeight:S,font:""})},_.withTextFontShape=function(S){return this.extend({fontShape:S,font:""})},_.sizingClasses=function(S){return S.size!==this.size?["sizing","reset-size"+S.size,"size"+this.size]:[]},_.baseSizingClasses=function(){return this.size!==R.BASESIZE?["sizing","reset-size"+this.size,"size"+R.BASESIZE]:[]},_.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=ml(this.size)),this._fontMetrics},_.getColor=function(){return this.phantom?"transparent":this.color},R}();_o.BASESIZE=6;var xo=_o,rn={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ta={ex:!0,em:!0,mu:!0},os=function(_){return typeof _!="string"&&(_=_.unit),_ in rn||_ in Ta||_==="ex"},ir=function(_,x){var S;if(_.unit in rn)S=rn[_.unit]/x.fontMetrics().ptPerEm/x.sizeMultiplier;else if(_.unit==="mu")S=x.fontMetrics().cssEmPerMu;else{var A;if(x.style.isTight()?A=x.havingStyle(x.style.text()):A=x,_.unit==="ex")S=A.fontMetrics().xHeight;else if(_.unit==="em")S=A.fontMetrics().quad;else throw new a("Invalid unit: '"+_.unit+"'");A!==x&&(S*=A.sizeMultiplier/x.sizeMultiplier)}return Math.min(_.number*S,x.maxSize)},Ve=function(_){return+_.toFixed(4)+"em"},Zr=function(_){return _.filter(function(x){return x}).join(" ")},uh=function(_,x,S){if(this.classes=_||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=S||{},x){x.style.isTight()&&this.classes.push("mtight");var A=x.getColor();A&&(this.style.color=A)}},hh=function(_){var x=document.createElement(_);x.className=Zr(this.classes);for(var S in this.style)this.style.hasOwnProperty(S)&&(x.style[S]=this.style[S]);for(var A in this.attributes)this.attributes.hasOwnProperty(A)&&x.setAttribute(A,this.attributes[A]);for(var L=0;L",x},Yn=function(){function R(x,S,A,L){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,uh.call(this,x,A,L),this.children=S||[]}var _=R.prototype;return _.setAttribute=function(S,A){this.attributes[S]=A},_.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){return hh.call(this,"span")},_.toMarkup=function(){return yr.call(this,"span")},R}(),ss=function(){function R(x,S,A,L){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,uh.call(this,S,L),this.children=A||[],this.setAttribute("href",x)}var _=R.prototype;return _.setAttribute=function(S,A){this.attributes[S]=A},_.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){return hh.call(this,"a")},_.toMarkup=function(){return yr.call(this,"a")},R}(),_l=function(){function R(x,S,A){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=S,this.src=x,this.classes=["mord"],this.style=A}var _=R.prototype;return _.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){var S=document.createElement("img");S.src=this.src,S.alt=this.alt,S.className="mord";for(var A in this.style)this.style.hasOwnProperty(A)&&(S.style[A]=this.style[A]);return S},_.toMarkup=function(){var S=""+this.alt+"0&&(A=document.createElement("span"),A.style.marginRight=Ve(this.italic)),this.classes.length>0&&(A=A||document.createElement("span"),A.className=Zr(this.classes));for(var L in this.style)this.style.hasOwnProperty(L)&&(A=A||document.createElement("span"),A.style[L]=this.style[L]);return A?(A.appendChild(S),A):S},_.toMarkup=function(){var S=!1,A="0&&(L+="margin-right:"+this.italic+"em;");for(var F in this.style)this.style.hasOwnProperty(F)&&(L+=y.hyphenate(F)+":"+this.style[F]+";");L&&(S=!0,A+=' style="'+y.escape(L)+'"');var Y=y.escape(this.text);return S?(A+=">",A+=Y,A+="",A):Y},R}(),pn=function(){function R(x,S){this.children=void 0,this.attributes=void 0,this.children=x||[],this.attributes=S||{}}var _=R.prototype;return _.toNode=function(){var S="http://www.w3.org/2000/svg",A=document.createElementNS(S,"svg");for(var L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&A.setAttribute(L,this.attributes[L]);for(var F=0;F":""},R}(),vn=function(){function R(x){this.attributes=void 0,this.attributes=x||{}}var _=R.prototype;return _.toNode=function(){var S="http://www.w3.org/2000/svg",A=document.createElementNS(S,"line");for(var L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&A.setAttribute(L,this.attributes[L]);return A},_.toMarkup=function(){var S=" but got "+String(R)+".")}var ea={bin:1,close:1,inner:1,open:1,punct:1,rel:1},xl={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ka={math:{},text:{}},ar=ka;function B(R,_,x,S,A,L){ka[R][A]={font:_,group:x,replace:S},L&&S&&(ka[R][S]=ka[R][A])}var N="math",Me="text",Z="main",ie="ams",rr="accent-token",je="bin",Hr="close",at="inner",oe="mathord",ke="op-token",$e="open",Ht="punct",ne="rel",_r="spacing",he="textord";B(N,Z,ne,"≡","\\equiv",!0),B(N,Z,ne,"≺","\\prec",!0),B(N,Z,ne,"≻","\\succ",!0),B(N,Z,ne,"∼","\\sim",!0),B(N,Z,ne,"⊥","\\perp"),B(N,Z,ne,"⪯","\\preceq",!0),B(N,Z,ne,"⪰","\\succeq",!0),B(N,Z,ne,"≃","\\simeq",!0),B(N,Z,ne,"∣","\\mid",!0),B(N,Z,ne,"≪","\\ll",!0),B(N,Z,ne,"≫","\\gg",!0),B(N,Z,ne,"≍","\\asymp",!0),B(N,Z,ne,"∥","\\parallel"),B(N,Z,ne,"⋈","\\bowtie",!0),B(N,Z,ne,"⌣","\\smile",!0),B(N,Z,ne,"⊑","\\sqsubseteq",!0),B(N,Z,ne,"⊒","\\sqsupseteq",!0),B(N,Z,ne,"≐","\\doteq",!0),B(N,Z,ne,"⌢","\\frown",!0),B(N,Z,ne,"∋","\\ni",!0),B(N,Z,ne,"∝","\\propto",!0),B(N,Z,ne,"⊢","\\vdash",!0),B(N,Z,ne,"⊣","\\dashv",!0),B(N,Z,ne,"∋","\\owns"),B(N,Z,Ht,".","\\ldotp"),B(N,Z,Ht,"⋅","\\cdotp"),B(N,Z,he,"#","\\#"),B(Me,Z,he,"#","\\#"),B(N,Z,he,"&","\\&"),B(Me,Z,he,"&","\\&"),B(N,Z,he,"ℵ","\\aleph",!0),B(N,Z,he,"∀","\\forall",!0),B(N,Z,he,"ℏ","\\hbar",!0),B(N,Z,he,"∃","\\exists",!0),B(N,Z,he,"∇","\\nabla",!0),B(N,Z,he,"♭","\\flat",!0),B(N,Z,he,"ℓ","\\ell",!0),B(N,Z,he,"♮","\\natural",!0),B(N,Z,he,"♣","\\clubsuit",!0),B(N,Z,he,"℘","\\wp",!0),B(N,Z,he,"♯","\\sharp",!0),B(N,Z,he,"♢","\\diamondsuit",!0),B(N,Z,he,"ℜ","\\Re",!0),B(N,Z,he,"♡","\\heartsuit",!0),B(N,Z,he,"ℑ","\\Im",!0),B(N,Z,he,"♠","\\spadesuit",!0),B(N,Z,he,"§","\\S",!0),B(Me,Z,he,"§","\\S"),B(N,Z,he,"¶","\\P",!0),B(Me,Z,he,"¶","\\P"),B(N,Z,he,"†","\\dag"),B(Me,Z,he,"†","\\dag"),B(Me,Z,he,"†","\\textdagger"),B(N,Z,he,"‡","\\ddag"),B(Me,Z,he,"‡","\\ddag"),B(Me,Z,he,"‡","\\textdaggerdbl"),B(N,Z,Hr,"⎱","\\rmoustache",!0),B(N,Z,$e,"⎰","\\lmoustache",!0),B(N,Z,Hr,"⟯","\\rgroup",!0),B(N,Z,$e,"⟮","\\lgroup",!0),B(N,Z,je,"∓","\\mp",!0),B(N,Z,je,"⊖","\\ominus",!0),B(N,Z,je,"⊎","\\uplus",!0),B(N,Z,je,"⊓","\\sqcap",!0),B(N,Z,je,"∗","\\ast"),B(N,Z,je,"⊔","\\sqcup",!0),B(N,Z,je,"◯","\\bigcirc",!0),B(N,Z,je,"∙","\\bullet",!0),B(N,Z,je,"‡","\\ddagger"),B(N,Z,je,"≀","\\wr",!0),B(N,Z,je,"⨿","\\amalg"),B(N,Z,je,"&","\\And"),B(N,Z,ne,"⟵","\\longleftarrow",!0),B(N,Z,ne,"⇐","\\Leftarrow",!0),B(N,Z,ne,"⟸","\\Longleftarrow",!0),B(N,Z,ne,"⟶","\\longrightarrow",!0),B(N,Z,ne,"⇒","\\Rightarrow",!0),B(N,Z,ne,"⟹","\\Longrightarrow",!0),B(N,Z,ne,"↔","\\leftrightarrow",!0),B(N,Z,ne,"⟷","\\longleftrightarrow",!0),B(N,Z,ne,"⇔","\\Leftrightarrow",!0),B(N,Z,ne,"⟺","\\Longleftrightarrow",!0),B(N,Z,ne,"↦","\\mapsto",!0),B(N,Z,ne,"⟼","\\longmapsto",!0),B(N,Z,ne,"↗","\\nearrow",!0),B(N,Z,ne,"↩","\\hookleftarrow",!0),B(N,Z,ne,"↪","\\hookrightarrow",!0),B(N,Z,ne,"↘","\\searrow",!0),B(N,Z,ne,"↼","\\leftharpoonup",!0),B(N,Z,ne,"⇀","\\rightharpoonup",!0),B(N,Z,ne,"↙","\\swarrow",!0),B(N,Z,ne,"↽","\\leftharpoondown",!0),B(N,Z,ne,"⇁","\\rightharpoondown",!0),B(N,Z,ne,"↖","\\nwarrow",!0),B(N,Z,ne,"⇌","\\rightleftharpoons",!0),B(N,ie,ne,"≮","\\nless",!0),B(N,ie,ne,"","\\@nleqslant"),B(N,ie,ne,"","\\@nleqq"),B(N,ie,ne,"⪇","\\lneq",!0),B(N,ie,ne,"≨","\\lneqq",!0),B(N,ie,ne,"","\\@lvertneqq"),B(N,ie,ne,"⋦","\\lnsim",!0),B(N,ie,ne,"⪉","\\lnapprox",!0),B(N,ie,ne,"⊀","\\nprec",!0),B(N,ie,ne,"⋠","\\npreceq",!0),B(N,ie,ne,"⋨","\\precnsim",!0),B(N,ie,ne,"⪹","\\precnapprox",!0),B(N,ie,ne,"≁","\\nsim",!0),B(N,ie,ne,"","\\@nshortmid"),B(N,ie,ne,"∤","\\nmid",!0),B(N,ie,ne,"⊬","\\nvdash",!0),B(N,ie,ne,"⊭","\\nvDash",!0),B(N,ie,ne,"⋪","\\ntriangleleft"),B(N,ie,ne,"⋬","\\ntrianglelefteq",!0),B(N,ie,ne,"⊊","\\subsetneq",!0),B(N,ie,ne,"","\\@varsubsetneq"),B(N,ie,ne,"⫋","\\subsetneqq",!0),B(N,ie,ne,"","\\@varsubsetneqq"),B(N,ie,ne,"≯","\\ngtr",!0),B(N,ie,ne,"","\\@ngeqslant"),B(N,ie,ne,"","\\@ngeqq"),B(N,ie,ne,"⪈","\\gneq",!0),B(N,ie,ne,"≩","\\gneqq",!0),B(N,ie,ne,"","\\@gvertneqq"),B(N,ie,ne,"⋧","\\gnsim",!0),B(N,ie,ne,"⪊","\\gnapprox",!0),B(N,ie,ne,"⊁","\\nsucc",!0),B(N,ie,ne,"⋡","\\nsucceq",!0),B(N,ie,ne,"⋩","\\succnsim",!0),B(N,ie,ne,"⪺","\\succnapprox",!0),B(N,ie,ne,"≆","\\ncong",!0),B(N,ie,ne,"","\\@nshortparallel"),B(N,ie,ne,"∦","\\nparallel",!0),B(N,ie,ne,"⊯","\\nVDash",!0),B(N,ie,ne,"⋫","\\ntriangleright"),B(N,ie,ne,"⋭","\\ntrianglerighteq",!0),B(N,ie,ne,"","\\@nsupseteqq"),B(N,ie,ne,"⊋","\\supsetneq",!0),B(N,ie,ne,"","\\@varsupsetneq"),B(N,ie,ne,"⫌","\\supsetneqq",!0),B(N,ie,ne,"","\\@varsupsetneqq"),B(N,ie,ne,"⊮","\\nVdash",!0),B(N,ie,ne,"⪵","\\precneqq",!0),B(N,ie,ne,"⪶","\\succneqq",!0),B(N,ie,ne,"","\\@nsubseteqq"),B(N,ie,je,"⊴","\\unlhd"),B(N,ie,je,"⊵","\\unrhd"),B(N,ie,ne,"↚","\\nleftarrow",!0),B(N,ie,ne,"↛","\\nrightarrow",!0),B(N,ie,ne,"⇍","\\nLeftarrow",!0),B(N,ie,ne,"⇏","\\nRightarrow",!0),B(N,ie,ne,"↮","\\nleftrightarrow",!0),B(N,ie,ne,"⇎","\\nLeftrightarrow",!0),B(N,ie,ne,"△","\\vartriangle"),B(N,ie,he,"ℏ","\\hslash"),B(N,ie,he,"▽","\\triangledown"),B(N,ie,he,"◊","\\lozenge"),B(N,ie,he,"Ⓢ","\\circledS"),B(N,ie,he,"®","\\circledR"),B(Me,ie,he,"®","\\circledR"),B(N,ie,he,"∡","\\measuredangle",!0),B(N,ie,he,"∄","\\nexists"),B(N,ie,he,"℧","\\mho"),B(N,ie,he,"Ⅎ","\\Finv",!0),B(N,ie,he,"⅁","\\Game",!0),B(N,ie,he,"‵","\\backprime"),B(N,ie,he,"▲","\\blacktriangle"),B(N,ie,he,"▼","\\blacktriangledown"),B(N,ie,he,"■","\\blacksquare"),B(N,ie,he,"⧫","\\blacklozenge"),B(N,ie,he,"★","\\bigstar"),B(N,ie,he,"∢","\\sphericalangle",!0),B(N,ie,he,"∁","\\complement",!0),B(N,ie,he,"ð","\\eth",!0),B(Me,Z,he,"ð","ð"),B(N,ie,he,"╱","\\diagup"),B(N,ie,he,"╲","\\diagdown"),B(N,ie,he,"□","\\square"),B(N,ie,he,"□","\\Box"),B(N,ie,he,"◊","\\Diamond"),B(N,ie,he,"¥","\\yen",!0),B(Me,ie,he,"¥","\\yen",!0),B(N,ie,he,"✓","\\checkmark",!0),B(Me,ie,he,"✓","\\checkmark"),B(N,ie,he,"ℶ","\\beth",!0),B(N,ie,he,"ℸ","\\daleth",!0),B(N,ie,he,"ℷ","\\gimel",!0),B(N,ie,he,"ϝ","\\digamma",!0),B(N,ie,he,"ϰ","\\varkappa"),B(N,ie,$e,"┌","\\@ulcorner",!0),B(N,ie,Hr,"┐","\\@urcorner",!0),B(N,ie,$e,"└","\\@llcorner",!0),B(N,ie,Hr,"┘","\\@lrcorner",!0),B(N,ie,ne,"≦","\\leqq",!0),B(N,ie,ne,"⩽","\\leqslant",!0),B(N,ie,ne,"⪕","\\eqslantless",!0),B(N,ie,ne,"≲","\\lesssim",!0),B(N,ie,ne,"⪅","\\lessapprox",!0),B(N,ie,ne,"≊","\\approxeq",!0),B(N,ie,je,"⋖","\\lessdot"),B(N,ie,ne,"⋘","\\lll",!0),B(N,ie,ne,"≶","\\lessgtr",!0),B(N,ie,ne,"⋚","\\lesseqgtr",!0),B(N,ie,ne,"⪋","\\lesseqqgtr",!0),B(N,ie,ne,"≑","\\doteqdot"),B(N,ie,ne,"≓","\\risingdotseq",!0),B(N,ie,ne,"≒","\\fallingdotseq",!0),B(N,ie,ne,"∽","\\backsim",!0),B(N,ie,ne,"⋍","\\backsimeq",!0),B(N,ie,ne,"⫅","\\subseteqq",!0),B(N,ie,ne,"⋐","\\Subset",!0),B(N,ie,ne,"⊏","\\sqsubset",!0),B(N,ie,ne,"≼","\\preccurlyeq",!0),B(N,ie,ne,"⋞","\\curlyeqprec",!0),B(N,ie,ne,"≾","\\precsim",!0),B(N,ie,ne,"⪷","\\precapprox",!0),B(N,ie,ne,"⊲","\\vartriangleleft"),B(N,ie,ne,"⊴","\\trianglelefteq"),B(N,ie,ne,"⊨","\\vDash",!0),B(N,ie,ne,"⊪","\\Vvdash",!0),B(N,ie,ne,"⌣","\\smallsmile"),B(N,ie,ne,"⌢","\\smallfrown"),B(N,ie,ne,"≏","\\bumpeq",!0),B(N,ie,ne,"≎","\\Bumpeq",!0),B(N,ie,ne,"≧","\\geqq",!0),B(N,ie,ne,"⩾","\\geqslant",!0),B(N,ie,ne,"⪖","\\eqslantgtr",!0),B(N,ie,ne,"≳","\\gtrsim",!0),B(N,ie,ne,"⪆","\\gtrapprox",!0),B(N,ie,je,"⋗","\\gtrdot"),B(N,ie,ne,"⋙","\\ggg",!0),B(N,ie,ne,"≷","\\gtrless",!0),B(N,ie,ne,"⋛","\\gtreqless",!0),B(N,ie,ne,"⪌","\\gtreqqless",!0),B(N,ie,ne,"≖","\\eqcirc",!0),B(N,ie,ne,"≗","\\circeq",!0),B(N,ie,ne,"≜","\\triangleq",!0),B(N,ie,ne,"∼","\\thicksim"),B(N,ie,ne,"≈","\\thickapprox"),B(N,ie,ne,"⫆","\\supseteqq",!0),B(N,ie,ne,"⋑","\\Supset",!0),B(N,ie,ne,"⊐","\\sqsupset",!0),B(N,ie,ne,"≽","\\succcurlyeq",!0),B(N,ie,ne,"⋟","\\curlyeqsucc",!0),B(N,ie,ne,"≿","\\succsim",!0),B(N,ie,ne,"⪸","\\succapprox",!0),B(N,ie,ne,"⊳","\\vartriangleright"),B(N,ie,ne,"⊵","\\trianglerighteq"),B(N,ie,ne,"⊩","\\Vdash",!0),B(N,ie,ne,"∣","\\shortmid"),B(N,ie,ne,"∥","\\shortparallel"),B(N,ie,ne,"≬","\\between",!0),B(N,ie,ne,"⋔","\\pitchfork",!0),B(N,ie,ne,"∝","\\varpropto"),B(N,ie,ne,"◀","\\blacktriangleleft"),B(N,ie,ne,"∴","\\therefore",!0),B(N,ie,ne,"∍","\\backepsilon"),B(N,ie,ne,"▶","\\blacktriangleright"),B(N,ie,ne,"∵","\\because",!0),B(N,ie,ne,"⋘","\\llless"),B(N,ie,ne,"⋙","\\gggtr"),B(N,ie,je,"⊲","\\lhd"),B(N,ie,je,"⊳","\\rhd"),B(N,ie,ne,"≂","\\eqsim",!0),B(N,Z,ne,"⋈","\\Join"),B(N,ie,ne,"≑","\\Doteq",!0),B(N,ie,je,"∔","\\dotplus",!0),B(N,ie,je,"∖","\\smallsetminus"),B(N,ie,je,"⋒","\\Cap",!0),B(N,ie,je,"⋓","\\Cup",!0),B(N,ie,je,"⩞","\\doublebarwedge",!0),B(N,ie,je,"⊟","\\boxminus",!0),B(N,ie,je,"⊞","\\boxplus",!0),B(N,ie,je,"⋇","\\divideontimes",!0),B(N,ie,je,"⋉","\\ltimes",!0),B(N,ie,je,"⋊","\\rtimes",!0),B(N,ie,je,"⋋","\\leftthreetimes",!0),B(N,ie,je,"⋌","\\rightthreetimes",!0),B(N,ie,je,"⋏","\\curlywedge",!0),B(N,ie,je,"⋎","\\curlyvee",!0),B(N,ie,je,"⊝","\\circleddash",!0),B(N,ie,je,"⊛","\\circledast",!0),B(N,ie,je,"⋅","\\centerdot"),B(N,ie,je,"⊺","\\intercal",!0),B(N,ie,je,"⋒","\\doublecap"),B(N,ie,je,"⋓","\\doublecup"),B(N,ie,je,"⊠","\\boxtimes",!0),B(N,ie,ne,"⇢","\\dashrightarrow",!0),B(N,ie,ne,"⇠","\\dashleftarrow",!0),B(N,ie,ne,"⇇","\\leftleftarrows",!0),B(N,ie,ne,"⇆","\\leftrightarrows",!0),B(N,ie,ne,"⇚","\\Lleftarrow",!0),B(N,ie,ne,"↞","\\twoheadleftarrow",!0),B(N,ie,ne,"↢","\\leftarrowtail",!0),B(N,ie,ne,"↫","\\looparrowleft",!0),B(N,ie,ne,"⇋","\\leftrightharpoons",!0),B(N,ie,ne,"↶","\\curvearrowleft",!0),B(N,ie,ne,"↺","\\circlearrowleft",!0),B(N,ie,ne,"↰","\\Lsh",!0),B(N,ie,ne,"⇈","\\upuparrows",!0),B(N,ie,ne,"↿","\\upharpoonleft",!0),B(N,ie,ne,"⇃","\\downharpoonleft",!0),B(N,Z,ne,"⊶","\\origof",!0),B(N,Z,ne,"⊷","\\imageof",!0),B(N,ie,ne,"⊸","\\multimap",!0),B(N,ie,ne,"↭","\\leftrightsquigarrow",!0),B(N,ie,ne,"⇉","\\rightrightarrows",!0),B(N,ie,ne,"⇄","\\rightleftarrows",!0),B(N,ie,ne,"↠","\\twoheadrightarrow",!0),B(N,ie,ne,"↣","\\rightarrowtail",!0),B(N,ie,ne,"↬","\\looparrowright",!0),B(N,ie,ne,"↷","\\curvearrowright",!0),B(N,ie,ne,"↻","\\circlearrowright",!0),B(N,ie,ne,"↱","\\Rsh",!0),B(N,ie,ne,"⇊","\\downdownarrows",!0),B(N,ie,ne,"↾","\\upharpoonright",!0),B(N,ie,ne,"⇂","\\downharpoonright",!0),B(N,ie,ne,"⇝","\\rightsquigarrow",!0),B(N,ie,ne,"⇝","\\leadsto"),B(N,ie,ne,"⇛","\\Rrightarrow",!0),B(N,ie,ne,"↾","\\restriction"),B(N,Z,he,"‘","`"),B(N,Z,he,"$","\\$"),B(Me,Z,he,"$","\\$"),B(Me,Z,he,"$","\\textdollar"),B(N,Z,he,"%","\\%"),B(Me,Z,he,"%","\\%"),B(N,Z,he,"_","\\_"),B(Me,Z,he,"_","\\_"),B(Me,Z,he,"_","\\textunderscore"),B(N,Z,he,"∠","\\angle",!0),B(N,Z,he,"∞","\\infty",!0),B(N,Z,he,"′","\\prime"),B(N,Z,he,"△","\\triangle"),B(N,Z,he,"Γ","\\Gamma",!0),B(N,Z,he,"Δ","\\Delta",!0),B(N,Z,he,"Θ","\\Theta",!0),B(N,Z,he,"Λ","\\Lambda",!0),B(N,Z,he,"Ξ","\\Xi",!0),B(N,Z,he,"Π","\\Pi",!0),B(N,Z,he,"Σ","\\Sigma",!0),B(N,Z,he,"Υ","\\Upsilon",!0),B(N,Z,he,"Φ","\\Phi",!0),B(N,Z,he,"Ψ","\\Psi",!0),B(N,Z,he,"Ω","\\Omega",!0),B(N,Z,he,"A","Α"),B(N,Z,he,"B","Β"),B(N,Z,he,"E","Ε"),B(N,Z,he,"Z","Ζ"),B(N,Z,he,"H","Η"),B(N,Z,he,"I","Ι"),B(N,Z,he,"K","Κ"),B(N,Z,he,"M","Μ"),B(N,Z,he,"N","Ν"),B(N,Z,he,"O","Ο"),B(N,Z,he,"P","Ρ"),B(N,Z,he,"T","Τ"),B(N,Z,he,"X","Χ"),B(N,Z,he,"¬","\\neg",!0),B(N,Z,he,"¬","\\lnot"),B(N,Z,he,"⊤","\\top"),B(N,Z,he,"⊥","\\bot"),B(N,Z,he,"∅","\\emptyset"),B(N,ie,he,"∅","\\varnothing"),B(N,Z,oe,"α","\\alpha",!0),B(N,Z,oe,"β","\\beta",!0),B(N,Z,oe,"γ","\\gamma",!0),B(N,Z,oe,"δ","\\delta",!0),B(N,Z,oe,"ϵ","\\epsilon",!0),B(N,Z,oe,"ζ","\\zeta",!0),B(N,Z,oe,"η","\\eta",!0),B(N,Z,oe,"θ","\\theta",!0),B(N,Z,oe,"ι","\\iota",!0),B(N,Z,oe,"κ","\\kappa",!0),B(N,Z,oe,"λ","\\lambda",!0),B(N,Z,oe,"μ","\\mu",!0),B(N,Z,oe,"ν","\\nu",!0),B(N,Z,oe,"ξ","\\xi",!0),B(N,Z,oe,"ο","\\omicron",!0),B(N,Z,oe,"π","\\pi",!0),B(N,Z,oe,"ρ","\\rho",!0),B(N,Z,oe,"σ","\\sigma",!0),B(N,Z,oe,"τ","\\tau",!0),B(N,Z,oe,"υ","\\upsilon",!0),B(N,Z,oe,"ϕ","\\phi",!0),B(N,Z,oe,"χ","\\chi",!0),B(N,Z,oe,"ψ","\\psi",!0),B(N,Z,oe,"ω","\\omega",!0),B(N,Z,oe,"ε","\\varepsilon",!0),B(N,Z,oe,"ϑ","\\vartheta",!0),B(N,Z,oe,"ϖ","\\varpi",!0),B(N,Z,oe,"ϱ","\\varrho",!0),B(N,Z,oe,"ς","\\varsigma",!0),B(N,Z,oe,"φ","\\varphi",!0),B(N,Z,je,"∗","*",!0),B(N,Z,je,"+","+"),B(N,Z,je,"−","-",!0),B(N,Z,je,"⋅","\\cdot",!0),B(N,Z,je,"∘","\\circ",!0),B(N,Z,je,"÷","\\div",!0),B(N,Z,je,"±","\\pm",!0),B(N,Z,je,"×","\\times",!0),B(N,Z,je,"∩","\\cap",!0),B(N,Z,je,"∪","\\cup",!0),B(N,Z,je,"∖","\\setminus",!0),B(N,Z,je,"∧","\\land"),B(N,Z,je,"∨","\\lor"),B(N,Z,je,"∧","\\wedge",!0),B(N,Z,je,"∨","\\vee",!0),B(N,Z,he,"√","\\surd"),B(N,Z,$e,"⟨","\\langle",!0),B(N,Z,$e,"∣","\\lvert"),B(N,Z,$e,"∥","\\lVert"),B(N,Z,Hr,"?","?"),B(N,Z,Hr,"!","!"),B(N,Z,Hr,"⟩","\\rangle",!0),B(N,Z,Hr,"∣","\\rvert"),B(N,Z,Hr,"∥","\\rVert"),B(N,Z,ne,"=","="),B(N,Z,ne,":",":"),B(N,Z,ne,"≈","\\approx",!0),B(N,Z,ne,"≅","\\cong",!0),B(N,Z,ne,"≥","\\ge"),B(N,Z,ne,"≥","\\geq",!0),B(N,Z,ne,"←","\\gets"),B(N,Z,ne,">","\\gt",!0),B(N,Z,ne,"∈","\\in",!0),B(N,Z,ne,"","\\@not"),B(N,Z,ne,"⊂","\\subset",!0),B(N,Z,ne,"⊃","\\supset",!0),B(N,Z,ne,"⊆","\\subseteq",!0),B(N,Z,ne,"⊇","\\supseteq",!0),B(N,ie,ne,"⊈","\\nsubseteq",!0),B(N,ie,ne,"⊉","\\nsupseteq",!0),B(N,Z,ne,"⊨","\\models"),B(N,Z,ne,"←","\\leftarrow",!0),B(N,Z,ne,"≤","\\le"),B(N,Z,ne,"≤","\\leq",!0),B(N,Z,ne,"<","\\lt",!0),B(N,Z,ne,"→","\\rightarrow",!0),B(N,Z,ne,"→","\\to"),B(N,ie,ne,"≱","\\ngeq",!0),B(N,ie,ne,"≰","\\nleq",!0),B(N,Z,_r," ","\\ "),B(N,Z,_r," ","\\space"),B(N,Z,_r," ","\\nobreakspace"),B(Me,Z,_r," ","\\ "),B(Me,Z,_r," "," "),B(Me,Z,_r," ","\\space"),B(Me,Z,_r," ","\\nobreakspace"),B(N,Z,_r,null,"\\nobreak"),B(N,Z,_r,null,"\\allowbreak"),B(N,Z,Ht,",",","),B(N,Z,Ht,";",";"),B(N,ie,je,"⊼","\\barwedge",!0),B(N,ie,je,"⊻","\\veebar",!0),B(N,Z,je,"⊙","\\odot",!0),B(N,Z,je,"⊕","\\oplus",!0),B(N,Z,je,"⊗","\\otimes",!0),B(N,Z,he,"∂","\\partial",!0),B(N,Z,je,"⊘","\\oslash",!0),B(N,ie,je,"⊚","\\circledcirc",!0),B(N,ie,je,"⊡","\\boxdot",!0),B(N,Z,je,"△","\\bigtriangleup"),B(N,Z,je,"▽","\\bigtriangledown"),B(N,Z,je,"†","\\dagger"),B(N,Z,je,"⋄","\\diamond"),B(N,Z,je,"⋆","\\star"),B(N,Z,je,"◃","\\triangleleft"),B(N,Z,je,"▹","\\triangleright"),B(N,Z,$e,"{","\\{"),B(Me,Z,he,"{","\\{"),B(Me,Z,he,"{","\\textbraceleft"),B(N,Z,Hr,"}","\\}"),B(Me,Z,he,"}","\\}"),B(Me,Z,he,"}","\\textbraceright"),B(N,Z,$e,"{","\\lbrace"),B(N,Z,Hr,"}","\\rbrace"),B(N,Z,$e,"[","\\lbrack",!0),B(Me,Z,he,"[","\\lbrack",!0),B(N,Z,Hr,"]","\\rbrack",!0),B(Me,Z,he,"]","\\rbrack",!0),B(N,Z,$e,"(","\\lparen",!0),B(N,Z,Hr,")","\\rparen",!0),B(Me,Z,he,"<","\\textless",!0),B(Me,Z,he,">","\\textgreater",!0),B(N,Z,$e,"⌊","\\lfloor",!0),B(N,Z,Hr,"⌋","\\rfloor",!0),B(N,Z,$e,"⌈","\\lceil",!0),B(N,Z,Hr,"⌉","\\rceil",!0),B(N,Z,he,"\\","\\backslash"),B(N,Z,he,"∣","|"),B(N,Z,he,"∣","\\vert"),B(Me,Z,he,"|","\\textbar",!0),B(N,Z,he,"∥","\\|"),B(N,Z,he,"∥","\\Vert"),B(Me,Z,he,"∥","\\textbardbl"),B(Me,Z,he,"~","\\textasciitilde"),B(Me,Z,he,"\\","\\textbackslash"),B(Me,Z,he,"^","\\textasciicircum"),B(N,Z,ne,"↑","\\uparrow",!0),B(N,Z,ne,"⇑","\\Uparrow",!0),B(N,Z,ne,"↓","\\downarrow",!0),B(N,Z,ne,"⇓","\\Downarrow",!0),B(N,Z,ne,"↕","\\updownarrow",!0),B(N,Z,ne,"⇕","\\Updownarrow",!0),B(N,Z,ke,"∐","\\coprod"),B(N,Z,ke,"⋁","\\bigvee"),B(N,Z,ke,"⋀","\\bigwedge"),B(N,Z,ke,"⨄","\\biguplus"),B(N,Z,ke,"⋂","\\bigcap"),B(N,Z,ke,"⋃","\\bigcup"),B(N,Z,ke,"∫","\\int"),B(N,Z,ke,"∫","\\intop"),B(N,Z,ke,"∬","\\iint"),B(N,Z,ke,"∭","\\iiint"),B(N,Z,ke,"∏","\\prod"),B(N,Z,ke,"∑","\\sum"),B(N,Z,ke,"⨂","\\bigotimes"),B(N,Z,ke,"⨁","\\bigoplus"),B(N,Z,ke,"⨀","\\bigodot"),B(N,Z,ke,"∮","\\oint"),B(N,Z,ke,"∯","\\oiint"),B(N,Z,ke,"∰","\\oiiint"),B(N,Z,ke,"⨆","\\bigsqcup"),B(N,Z,ke,"∫","\\smallint"),B(Me,Z,at,"…","\\textellipsis"),B(N,Z,at,"…","\\mathellipsis"),B(Me,Z,at,"…","\\ldots",!0),B(N,Z,at,"…","\\ldots",!0),B(N,Z,at,"⋯","\\@cdots",!0),B(N,Z,at,"⋱","\\ddots",!0),B(N,Z,he,"⋮","\\varvdots"),B(N,Z,rr,"ˊ","\\acute"),B(N,Z,rr,"ˋ","\\grave"),B(N,Z,rr,"¨","\\ddot"),B(N,Z,rr,"~","\\tilde"),B(N,Z,rr,"ˉ","\\bar"),B(N,Z,rr,"˘","\\breve"),B(N,Z,rr,"ˇ","\\check"),B(N,Z,rr,"^","\\hat"),B(N,Z,rr,"⃗","\\vec"),B(N,Z,rr,"˙","\\dot"),B(N,Z,rr,"˚","\\mathring"),B(N,Z,oe,"","\\@imath"),B(N,Z,oe,"","\\@jmath"),B(N,Z,he,"ı","ı"),B(N,Z,he,"ȷ","ȷ"),B(Me,Z,he,"ı","\\i",!0),B(Me,Z,he,"ȷ","\\j",!0),B(Me,Z,he,"ß","\\ss",!0),B(Me,Z,he,"æ","\\ae",!0),B(Me,Z,he,"œ","\\oe",!0),B(Me,Z,he,"ø","\\o",!0),B(Me,Z,he,"Æ","\\AE",!0),B(Me,Z,he,"Œ","\\OE",!0),B(Me,Z,he,"Ø","\\O",!0),B(Me,Z,rr,"ˊ","\\'"),B(Me,Z,rr,"ˋ","\\`"),B(Me,Z,rr,"ˆ","\\^"),B(Me,Z,rr,"˜","\\~"),B(Me,Z,rr,"ˉ","\\="),B(Me,Z,rr,"˘","\\u"),B(Me,Z,rr,"˙","\\."),B(Me,Z,rr,"¸","\\c"),B(Me,Z,rr,"˚","\\r"),B(Me,Z,rr,"ˇ","\\v"),B(Me,Z,rr,"¨",'\\"'),B(Me,Z,rr,"˝","\\H"),B(Me,Z,rr,"◯","\\textcircled");var jr={"--":!0,"---":!0,"``":!0,"''":!0};B(Me,Z,he,"–","--",!0),B(Me,Z,he,"–","\\textendash"),B(Me,Z,he,"—","---",!0),B(Me,Z,he,"—","\\textemdash"),B(Me,Z,he,"‘","`",!0),B(Me,Z,he,"‘","\\textquoteleft"),B(Me,Z,he,"’","'",!0),B(Me,Z,he,"’","\\textquoteright"),B(Me,Z,he,"“","``",!0),B(Me,Z,he,"“","\\textquotedblleft"),B(Me,Z,he,"”","''",!0),B(Me,Z,he,"”","\\textquotedblright"),B(N,Z,he,"°","\\degree",!0),B(Me,Z,he,"°","\\degree"),B(Me,Z,he,"°","\\textdegree",!0),B(N,Z,he,"£","\\pounds"),B(N,Z,he,"£","\\mathsterling",!0),B(Me,Z,he,"£","\\pounds"),B(Me,Z,he,"£","\\textsterling",!0),B(N,ie,he,"✠","\\maltese"),B(Me,ie,he,"✠","\\maltese");for(var Da='0123456789/@."',us=0;usx&&(x=F.height),F.depth>S&&(S=F.depth),F.maxFontSize>A&&(A=F.maxFontSize)}_.height=x,_.depth=S,_.maxFontSize=A},qr=function(_,x,S,A){var L=new Yn(_,x,S,A);return yf(L),L},Op=function(_,x,S,A){return new Yn(_,x,S,A)},L2=function(_,x,S){var A=qr([_],[],x);return A.height=Math.max(S||x.fontMetrics().defaultRuleThickness,x.minRuleThickness),A.style.borderBottomWidth=Ve(A.height),A.maxFontSize=1,A},E2=function(_,x,S,A){var L=new ss(_,x,S,A);return yf(L),L},Np=function(_){var x=new dr(_);return yf(x),x},I2=function(_,x){return _ instanceof dr?qr([],[_],x):_},B2=function(_){if(_.positionType==="individualShift"){for(var x=_.children,S=[x[0]],A=-x[0].shift-x[0].elem.depth,L=A,F=1;F0&&(L.push(bh(F,_)),F=[]),L.push(S[Y]));F.length>0&&L.push(bh(F,_));var te;x?(te=bh(Dr(x,_,!0)),te.classes=["tag"],L.push(te)):A&&L.push(A);var le=Ti(["katex-html"],L);if(le.setAttribute("aria-hidden","true"),te){var me=te.children[0];me.style.height=Ve(le.height+le.depth),le.depth&&(me.style.verticalAlign=Ve(-le.depth))}return le}function Sh(R){return new dr(R)}var Xn=function(){function R(x,S,A){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=x,this.attributes={},this.children=S||[],this.classes=A||[]}var _=R.prototype;return _.setAttribute=function(S,A){this.attributes[S]=A},_.getAttribute=function(S){return this.attributes[S]},_.toNode=function(){var S=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var A in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,A)&&S.setAttribute(A,this.attributes[A]);this.classes.length>0&&(S.className=Zr(this.classes));for(var L=0;L0&&(S+=' class ="'+y.escape(Zr(this.classes))+'"'),S+=">";for(var L=0;L",S},_.toText=function(){return this.children.map(function(S){return S.toText()}).join("")},R}(),kl=function(){function R(x){this.text=void 0,this.text=x}var _=R.prototype;return _.toNode=function(){return document.createTextNode(this.text)},_.toMarkup=function(){return y.escape(this.toText())},_.toText=function(){return this.text},R}(),Hp=function(){function R(x){this.width=void 0,this.character=void 0,this.width=x,x>=.05555&&x<=.05556?this.character=" ":x>=.1666&&x<=.1667?this.character=" ":x>=.2222&&x<=.2223?this.character=" ":x>=.2777&&x<=.2778?this.character="  ":x>=-.05556&&x<=-.05555?this.character=" ⁣":x>=-.1667&&x<=-.1666?this.character=" ⁣":x>=-.2223&&x<=-.2222?this.character=" ⁣":x>=-.2778&&x<=-.2777?this.character=" ⁣":this.character=null}var _=R.prototype;return _.toNode=function(){if(this.character)return document.createTextNode(this.character);var S=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return S.setAttribute("width",Ve(this.width)),S},_.toMarkup=function(){return this.character?""+this.character+"":''},_.toText=function(){return this.character?this.character:" "},R}(),Fe={MathNode:Xn,TextNode:kl,SpaceNode:Hp,newDocumentFragment:Sh},En=function(_,x,S){return ar[x][_]&&ar[x][_].replace&&_.charCodeAt(0)!==55349&&!(jr.hasOwnProperty(_)&&S&&(S.fontFamily&&S.fontFamily.slice(4,6)==="tt"||S.font&&S.font.slice(4,6)==="tt"))&&(_=ar[x][_].replace),new Fe.TextNode(_)},_f=function(_){return _.length===1?_[0]:new Fe.MathNode("mrow",_)},xf=function(_,x){if(x.fontFamily==="texttt")return"monospace";if(x.fontFamily==="textsf")return x.fontShape==="textit"&&x.fontWeight==="textbf"?"sans-serif-bold-italic":x.fontShape==="textit"?"sans-serif-italic":x.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(x.fontShape==="textit"&&x.fontWeight==="textbf")return"bold-italic";if(x.fontShape==="textit")return"italic";if(x.fontWeight==="textbf")return"bold";var S=x.font;if(!S||S==="mathnormal")return null;var A=_.mode;if(S==="mathit")return"italic";if(S==="boldsymbol")return _.type==="textord"?"bold":"bold-italic";if(S==="mathbf")return"bold";if(S==="mathbb")return"double-struck";if(S==="mathfrak")return"fraktur";if(S==="mathscr"||S==="mathcal")return"script";if(S==="mathsf")return"sans-serif";if(S==="mathtt")return"monospace";var L=_.text;if(y.contains(["\\imath","\\jmath"],L))return null;ar[A][L]&&ar[A][L].replace&&(L=ar[A][L].replace);var F=_e.fontMap[S].fontName;return tn(L,F,A)?_e.fontMap[S].variant:null},mn=function(_,x,S){if(_.length===1){var A=or(_[0],x);return S&&A instanceof Xn&&A.type==="mo"&&(A.setAttribute("lspace","0em"),A.setAttribute("rspace","0em")),[A]}for(var L=[],F,Y=0;Y<_.length;Y++){var Q=or(_[Y],x);if(Q instanceof Xn&&F instanceof Xn){if(Q.type==="mtext"&&F.type==="mtext"&&Q.getAttribute("mathvariant")===F.getAttribute("mathvariant")){var te;(te=F.children).push.apply(te,Q.children);continue}else if(Q.type==="mn"&&F.type==="mn"){var le;(le=F.children).push.apply(le,Q.children);continue}else if(Q.type==="mi"&&Q.children.length===1&&F.type==="mn"){var me=Q.children[0];if(me instanceof kl&&me.text==="."){var be;(be=F.children).push.apply(be,Q.children);continue}}else if(F.type==="mi"&&F.children.length===1){var we=F.children[0];if(we instanceof kl&&we.text==="̸"&&(Q.type==="mo"||Q.type==="mi"||Q.type==="mn")){var Te=Q.children[0];Te instanceof kl&&Te.text.length>0&&(Te.text=Te.text.slice(0,1)+"̸"+Te.text.slice(1),L.pop())}}}L.push(Q),F=Q}return L},Ea=function(_,x,S){return _f(mn(_,x,S))},or=function(_,x){if(!_)return new Fe.MathNode("mrow");if(_h[_.type]){var S=_h[_.type](_,x);return S}else throw new a("Got group of unknown type: '"+_.type+"'")};function qp(R,_,x,S,A){var L=mn(R,x),F;L.length===1&&L[0]instanceof Xn&&y.contains(["mrow","mtable"],L[0].type)?F=L[0]:F=new Fe.MathNode("mrow",L);var Y=new Fe.MathNode("annotation",[new Fe.TextNode(_)]);Y.setAttribute("encoding","application/x-tex");var Q=new Fe.MathNode("semantics",[F,Y]),te=new Fe.MathNode("math",[Q]);te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),S&&te.setAttribute("display","block");var le=A?"katex":"katex-mathml";return _e.makeSpan([le],[te])}var Wp=function(_){return new xo({style:_.displayMode?de.DISPLAY:de.TEXT,maxSize:_.maxSize,minRuleThickness:_.minRuleThickness})},Up=function(_,x){if(x.displayMode){var S=["katex-display"];x.leqno&&S.push("leqno"),x.fleqn&&S.push("fleqn"),_=_e.makeSpan(S,[_])}return _},V2=function(_,x,S){var A=Wp(S),L;if(S.output==="mathml")return qp(_,x,A,S.displayMode,!0);if(S.output==="html"){var F=Tl(_,A);L=_e.makeSpan(["katex"],[F])}else{var Y=qp(_,x,A,S.displayMode,!1),Q=Tl(_,A);L=_e.makeSpan(["katex"],[Y,Q])}return Up(L,S)},$2=function(_,x,S){var A=Wp(S),L=Tl(_,A),F=_e.makeSpan(["katex"],[L]);return Up(F,S)},G2={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Br=function(_){var x=new Fe.MathNode("mo",[new Fe.TextNode(G2[_.replace(/^\\/,"")])]);return x.setAttribute("stretchy","true"),x},Yp={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]},Dl=function(_){return _.type==="ordgroup"?_.body.length:1},an=function(_,x){function S(){var Q=4e5,te=_.label.slice(1);if(y.contains(["widehat","widecheck","widetilde","utilde"],te)){var le=_,me=Dl(le.base),be,we,Te;if(me>5)te==="widehat"||te==="widecheck"?(be=420,Q=2364,Te=.42,we=te+"4"):(be=312,Q=2340,Te=.34,we="tilde4");else{var Ne=[1,1,2,2,3,3][me];te==="widehat"||te==="widecheck"?(Q=[0,1062,2364,2364,2364][Ne],be=[0,239,300,360,420][Ne],Te=[0,.24,.3,.3,.36,.42][Ne],we=te+Ne):(Q=[0,600,1033,2339,2340][Ne],be=[0,260,286,306,312][Ne],Te=[0,.26,.286,.3,.306,.34][Ne],we="tilde"+Ne)}var We=new ci(we),tt=new pn([We],{width:"100%",height:Ve(Te),viewBox:"0 0 "+Q+" "+be,preserveAspectRatio:"none"});return{span:_e.makeSvgSpan([],[tt],x),minWidth:0,height:Te}}else{var ut=[],mt=Yp[te],qt=mt[0],Et=mt[1],Qt=mt[2],Ut=Qt/1e3,tr=qt.length,cr,br;if(tr===1){var In=mt[3];cr=["hide-tail"],br=[In]}else if(tr===2)cr=["halfarrow-left","halfarrow-right"],br=["xMinYMin","xMaxYMin"];else if(tr===3)cr=["brace-left","brace-center","brace-right"],br=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+tr+" children.");for(var gr=0;gr0&&(L.style.minWidth=Ve(F)),L},bf=function(_,x,S,A,L){var F,Y=_.height+_.depth+S+A;if(/fbox|color|angl/.test(x)){if(F=_e.makeSpan(["stretchy",x],[],L),x==="fbox"){var Q=L.color&&L.getColor();Q&&(F.style.borderColor=Q)}}else{var te=[];/^[bx]cancel$/.test(x)&&te.push(new vn({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(x)&&te.push(new vn({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var le=new pn(te,{width:"100%",height:Ve(Y)});F=_e.makeSvgSpan([],[le],L)}return F.height=Y,F.style.height=Ve(Y),F},di={encloseSpan:bf,mathMLnode:Br,svgSpan:an};function It(R,_){if(!R||R.type!==_)throw new Error("Expected node of type "+_+", but got "+(R?"node of type "+R.type:String(R)));return R}function Sf(R){var _=wh(R);if(!_)throw new Error("Expected node of symbol group type, but got "+(R?"node of type "+R.type:String(R)));return _}function wh(R){return R&&(R.type==="atom"||xl.hasOwnProperty(R.type))?R:null}var wf=function(_,x){var S,A,L;_&&_.type==="supsub"?(A=It(_.base,"accent"),S=A.base,_.base=S,L=vf(Wt(_,x)),_.base=A):(A=It(_,"accent"),S=A.base);var F=Wt(S,x.havingCrampedStyle()),Y=A.isShifty&&y.isCharacterBox(S),Q=0;if(Y){var te=y.getBaseElem(S),le=Wt(te,x.havingCrampedStyle());Q=ls(le).skew}var me=A.label==="\\c",be=me?F.height+F.depth:Math.min(F.height,x.fontMetrics().xHeight),we;if(A.isStretchy)we=di.svgSpan(A,x),we=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:F},{type:"elem",elem:we,wrapperClasses:["svg-align"],wrapperStyle:Q>0?{width:"calc(100% - "+Ve(2*Q)+")",marginLeft:Ve(2*Q)}:void 0}]},x);else{var Te,Ne;A.label==="\\vec"?(Te=_e.staticSvg("vec",x),Ne=_e.svgData.vec[1]):(Te=_e.makeOrd({mode:A.mode,text:A.label},x,"textord"),Te=ls(Te),Te.italic=0,Ne=Te.width,me&&(be+=Te.depth)),we=_e.makeSpan(["accent-body"],[Te]);var We=A.label==="\\textcircled";We&&(we.classes.push("accent-full"),be=F.height);var tt=Q;We||(tt-=Ne/2),we.style.left=Ve(tt),A.label==="\\textcircled"&&(we.style.top=".2em"),we=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:F},{type:"kern",size:-be},{type:"elem",elem:we}]},x)}var ut=_e.makeSpan(["mord","accent"],[we],x);return L?(L.children[0]=ut,L.height=Math.max(ut.height,L.height),L.classes[0]="mord",L):ut},Xp=function(_,x){var S=_.isStretchy?di.mathMLnode(_.label):new Fe.MathNode("mo",[En(_.label,_.mode)]),A=new Fe.MathNode("mover",[or(_.base,x),S]);return A.setAttribute("accent","true"),A},H2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(R){return"\\"+R}).join("|"));Xe({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:function(_,x){var S=xh(x[0]),A=!H2.test(_.funcName),L=!A||_.funcName==="\\widehat"||_.funcName==="\\widetilde"||_.funcName==="\\widecheck";return{type:"accent",mode:_.parser.mode,label:_.funcName,isStretchy:A,isShifty:L,base:S}},htmlBuilder:wf,mathmlBuilder:Xp}),Xe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(_,x){var S=x[0],A=_.parser.mode;return A==="math"&&(_.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+_.funcName+" works only in text mode"),A="text"),{type:"accent",mode:A,label:_.funcName,isStretchy:!1,isShifty:!0,base:S}},htmlBuilder:wf,mathmlBuilder:Xp}),Xe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"accentUnder",mode:S.mode,label:A,base:L}},htmlBuilder:function(_,x){var S=Wt(_.base,x),A=di.svgSpan(_,x),L=_.label==="\\utilde"?.12:0,F=_e.makeVList({positionType:"top",positionData:S.height,children:[{type:"elem",elem:A,wrapperClasses:["svg-align"]},{type:"kern",size:L},{type:"elem",elem:S}]},x);return _e.makeSpan(["mord","accentunder"],[F],x)},mathmlBuilder:function(_,x){var S=di.mathMLnode(_.label),A=new Fe.MathNode("munder",[or(_.base,x),S]);return A.setAttribute("accentunder","true"),A}});var Mr=function(_){var x=new Fe.MathNode("mpadded",_?[_]:[]);return x.setAttribute("width","+0.6em"),x.setAttribute("lspace","0.3em"),x};Xe({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:function(_,x,S){var A=_.parser,L=_.funcName;return{type:"xArrow",mode:A.mode,label:L,body:x[0],below:S[0]}},htmlBuilder:function(_,x){var S=x.style,A=x.havingStyle(S.sup()),L=_e.wrapFragment(Wt(_.body,A,x),x),F=_.label.slice(0,2)==="\\x"?"x":"cd";L.classes.push(F+"-arrow-pad");var Y;_.below&&(A=x.havingStyle(S.sub()),Y=_e.wrapFragment(Wt(_.below,A,x),x),Y.classes.push(F+"-arrow-pad"));var Q=di.svgSpan(_,x),te=-x.fontMetrics().axisHeight+.5*Q.height,le=-x.fontMetrics().axisHeight-.5*Q.height-.111;(L.depth>.25||_.label==="\\xleftequilibrium")&&(le-=L.depth);var me;if(Y){var be=-x.fontMetrics().axisHeight+Y.height+.5*Q.height+.111;me=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:L,shift:le},{type:"elem",elem:Q,shift:te},{type:"elem",elem:Y,shift:be}]},x)}else me=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:L,shift:le},{type:"elem",elem:Q,shift:te}]},x);return me.children[0].children[0].children[1].classes.push("svg-align"),_e.makeSpan(["mrel","x-arrow"],[me],x)},mathmlBuilder:function(_,x){var S=di.mathMLnode(_.label);S.setAttribute("minsize",_.label.charAt(0)==="x"?"1.75em":"3.0em");var A;if(_.body){var L=Mr(or(_.body,x));if(_.below){var F=Mr(or(_.below,x));A=new Fe.MathNode("munderover",[S,F,L])}else A=new Fe.MathNode("mover",[S,L])}else if(_.below){var Y=Mr(or(_.below,x));A=new Fe.MathNode("munder",[S,Y])}else A=Mr(),A=new Fe.MathNode("mover",[S,A]);return A}});var Zp=_e.makeSpan;function jp(R,_){var x=Dr(R.body,_,!0);return Zp([R.mclass],x,_)}function Ch(R,_){var x,S=mn(R.body,_);return R.mclass==="minner"?x=new Fe.MathNode("mpadded",S):R.mclass==="mord"?R.isCharacterBox?(x=S[0],x.type="mi"):x=new Fe.MathNode("mi",S):(R.isCharacterBox?(x=S[0],x.type="mo"):x=new Fe.MathNode("mo",S),R.mclass==="mbin"?(x.attributes.lspace="0.22em",x.attributes.rspace="0.22em"):R.mclass==="mpunct"?(x.attributes.lspace="0em",x.attributes.rspace="0.17em"):R.mclass==="mopen"||R.mclass==="mclose"?(x.attributes.lspace="0em",x.attributes.rspace="0em"):R.mclass==="minner"&&(x.attributes.lspace="0.0556em",x.attributes.width="+0.1111em")),x}Xe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"mclass",mode:S.mode,mclass:"m"+A.slice(5),body:Ar(L),isCharacterBox:y.isCharacterBox(L)}},htmlBuilder:jp,mathmlBuilder:Ch});var Ml=function(_){var x=_.type==="ordgroup"&&_.body.length?_.body[0]:_;return x.type==="atom"&&(x.family==="bin"||x.family==="rel")?"m"+x.family:"mord"};Xe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(_,x){var S=_.parser;return{type:"mclass",mode:S.mode,mclass:Ml(x[0]),body:Ar(x[1]),isCharacterBox:y.isCharacterBox(x[1])}}}),Xe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[1],F=x[0],Y;A!=="\\stackrel"?Y=Ml(L):Y="mrel";var Q={type:"op",mode:L.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:A!=="\\stackrel",body:Ar(L)},te={type:"supsub",mode:F.mode,base:Q,sup:A==="\\underset"?null:F,sub:A==="\\underset"?F:null};return{type:"mclass",mode:S.mode,mclass:Y,body:[te],isCharacterBox:y.isCharacterBox(te)}},htmlBuilder:jp,mathmlBuilder:Ch}),Xe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){var S=_.parser;return{type:"pmb",mode:S.mode,mclass:Ml(x[0]),body:Ar(x[0])}},htmlBuilder:function(_,x){var S=Dr(_.body,x,!0),A=_e.makeSpan([_.mclass],S,x);return A.style.textShadow="0.02em 0.01em 0.04px",A},mathmlBuilder:function(_,x){var S=mn(_.body,x),A=new Fe.MathNode("mstyle",S);return A.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),A}});var Kp={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Cf=function(){return{type:"styling",body:[],mode:"math",style:"display"}},Af=function(_){return _.type==="textord"&&_.text==="@"},Jp=function(_,x){return(_.type==="mathord"||_.type==="atom")&&_.text===x};function q2(R,_,x){var S=Kp[R];switch(S){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return x.callFunction(S,[_[0]],[_[1]]);case"\\uparrow":case"\\downarrow":{var A=x.callFunction("\\\\cdleft",[_[0]],[]),L={type:"atom",text:S,mode:"math",family:"rel"},F=x.callFunction("\\Big",[L],[]),Y=x.callFunction("\\\\cdright",[_[1]],[]),Q={type:"ordgroup",mode:"math",body:[A,F,Y]};return x.callFunction("\\\\cdparent",[Q],[])}case"\\\\cdlongequal":return x.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var te={type:"textord",text:"\\Vert",mode:"math"};return x.callFunction("\\Big",[te],[])}default:return{type:"textord",text:" ",mode:"math"}}}function W2(R){var _=[];for(R.gullet.beginGroup(),R.gullet.macros.set("\\cr","\\\\\\relax"),R.gullet.beginGroup();;){_.push(R.parseExpression(!1,"\\\\")),R.gullet.endGroup(),R.gullet.beginGroup();var x=R.fetch().text;if(x==="&"||x==="\\\\")R.consume();else if(x==="\\end"){_[_.length-1].length===0&&_.pop();break}else throw new a("Expected \\\\ or \\cr or \\end",R.nextToken)}for(var S=[],A=[S],L=0;L<_.length;L++){for(var F=_[L],Y=Cf(),Q=0;Q-1))if("<>AV".indexOf(te)>-1)for(var me=0;me<2;me++){for(var be=!0,we=Q+1;weAV=|." after @',F[Q]);var Te=q2(te,le,R),Ne={type:"styling",body:[Te],mode:"math",style:"display"};S.push(Ne),Y=Cf()}L%2===0?S.push(Y):S.shift(),S=[],A.push(S)}R.gullet.endGroup(),R.gullet.endGroup();var We=new Array(A[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:A,arraystretch:1,addJot:!0,rowGaps:[null],cols:We,colSeparationType:"CD",hLinesBeforeRow:new Array(A.length+1).fill([])}}Xe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName;return{type:"cdlabel",mode:S.mode,side:A.slice(4),label:x[0]}},htmlBuilder:function(_,x){var S=x.havingStyle(x.style.sup()),A=_e.wrapFragment(Wt(_.label,S,x),x);return A.classes.push("cd-label-"+_.side),A.style.bottom=Ve(.8-A.depth),A.height=0,A.depth=0,A},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mrow",[or(_.label,x)]);return S=new Fe.MathNode("mpadded",[S]),S.setAttribute("width","0"),_.side==="left"&&S.setAttribute("lspace","-1width"),S.setAttribute("voffset","0.7em"),S=new Fe.MathNode("mstyle",[S]),S.setAttribute("displaystyle","false"),S.setAttribute("scriptlevel","1"),S}}),Xe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(_,x){var S=_.parser;return{type:"cdlabelparent",mode:S.mode,fragment:x[0]}},htmlBuilder:function(_,x){var S=_e.wrapFragment(Wt(_.fragment,x),x);return S.classes.push("cd-vert-arrow"),S},mathmlBuilder:function(_,x){return new Fe.MathNode("mrow",[or(_.fragment,x)])}}),Xe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){for(var S=_.parser,A=It(x[0],"ordgroup"),L=A.body,F="",Y=0;Y=1114111)throw new a("\\@char with invalid code point "+F);return te<=65535?le=String.fromCharCode(te):(te-=65536,le=String.fromCharCode((te>>10)+55296,(te&1023)+56320)),{type:"textord",mode:S.mode,text:le}}});var Qp=function(_,x){var S=Dr(_.body,x.withColor(_.color),!1);return _e.makeFragment(S)},Tf=function(_,x){var S=mn(_.body,x.withColor(_.color)),A=new Fe.MathNode("mstyle",S);return A.setAttribute("mathcolor",_.color),A};Xe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(_,x){var S=_.parser,A=It(x[0],"color-token").color,L=x[1];return{type:"color",mode:S.mode,color:A,body:Ar(L)}},htmlBuilder:Qp,mathmlBuilder:Tf}),Xe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(_,x){var S=_.parser,A=_.breakOnTokenText,L=It(x[0],"color-token").color;S.gullet.macros.set("\\current@color",L);var F=S.parseExpression(!0,A);return{type:"color",mode:S.mode,color:L,body:F}},htmlBuilder:Qp,mathmlBuilder:Tf}),Xe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler:function(_,x,S){var A=_.parser,L=A.gullet.future().text==="["?A.parseSizeGroup(!0):null,F=!A.settings.displayMode||!A.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:A.mode,newLine:F,size:L&&It(L,"size").value}},htmlBuilder:function(_,x){var S=_e.makeSpan(["mspace"],[],x);return _.newLine&&(S.classes.push("newline"),_.size&&(S.style.marginTop=Ve(ir(_.size,x)))),S},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mspace");return _.newLine&&(S.setAttribute("linebreak","newline"),_.size&&S.setAttribute("height",Ve(ir(_.size,x)))),S}});var kf={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ev=function(_){var x=_.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(x))throw new a("Expected a control sequence",_);return x},U2=function(_){var x=_.gullet.popToken();return x.text==="="&&(x=_.gullet.popToken(),x.text===" "&&(x=_.gullet.popToken())),x},Df=function(_,x,S,A){var L=_.gullet.macros.get(S.text);L==null&&(S.noexpand=!0,L={tokens:[S],numArgs:0,unexpandable:!_.gullet.isExpandable(S.text)}),_.gullet.macros.set(x,L,A)};Xe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(_){var x=_.parser,S=_.funcName;x.consumeSpaces();var A=x.fetch();if(kf[A.text])return(S==="\\global"||S==="\\\\globallong")&&(A.text=kf[A.text]),It(x.parseFunction(),"internal");throw new a("Invalid token after macro prefix",A)}}),Xe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_){var x=_.parser,S=_.funcName,A=x.gullet.popToken(),L=A.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(L))throw new a("Expected a control sequence",A);for(var F=0,Y,Q=[[]];x.gullet.future().text!=="{";)if(A=x.gullet.popToken(),A.text==="#"){if(x.gullet.future().text==="{"){Y=x.gullet.future(),Q[F].push("{");break}if(A=x.gullet.popToken(),!/^[1-9]$/.test(A.text))throw new a('Invalid argument number "'+A.text+'"');if(parseInt(A.text)!==F+1)throw new a('Argument number "'+A.text+'" out of order');F++,Q.push([])}else{if(A.text==="EOF")throw new a("Expected a macro definition");Q[F].push(A.text)}var te=x.gullet.consumeArg(),le=te.tokens;return Y&&le.unshift(Y),(S==="\\edef"||S==="\\xdef")&&(le=x.gullet.expandTokens(le),le.reverse()),x.gullet.macros.set(L,{tokens:le,numArgs:F,delimiters:Q},S===kf[S]),{type:"internal",mode:x.mode}}}),Xe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_){var x=_.parser,S=_.funcName,A=ev(x.gullet.popToken());x.gullet.consumeSpaces();var L=U2(x);return Df(x,A,L,S==="\\\\globallet"),{type:"internal",mode:x.mode}}}),Xe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_){var x=_.parser,S=_.funcName,A=ev(x.gullet.popToken()),L=x.gullet.popToken(),F=x.gullet.popToken();return Df(x,A,F,S==="\\\\globalfuture"),x.gullet.pushToken(F),x.gullet.pushToken(L),{type:"internal",mode:x.mode}}});var Ll=function(_,x,S){var A=ar.math[_]&&ar.math[_].replace,L=tn(A||_,x,S);if(!L)throw new Error("Unsupported symbol "+_+" and font size "+x+".");return L},Mf=function(_,x,S,A){var L=S.havingBaseStyle(x),F=_e.makeSpan(A.concat(L.sizingClasses(S)),[_],S),Y=L.sizeMultiplier/S.sizeMultiplier;return F.height*=Y,F.depth*=Y,F.maxFontSize=L.sizeMultiplier,F},tv=function(_,x,S){var A=x.havingBaseStyle(S),L=(1-x.sizeMultiplier/A.sizeMultiplier)*x.fontMetrics().axisHeight;_.classes.push("delimcenter"),_.style.top=Ve(L),_.height-=L,_.depth+=L},Y2=function(_,x,S,A,L,F){var Y=_e.makeSymbol(_,"Main-Regular",L,A),Q=Mf(Y,x,A,F);return S&&tv(Q,A,x),Q},X2=function(_,x,S,A){return _e.makeSymbol(_,"Size"+x+"-Regular",S,A)},rv=function(_,x,S,A,L,F){var Y=X2(_,x,L,A),Q=Mf(_e.makeSpan(["delimsizing","size"+x],[Y],A),de.TEXT,A,F);return S&&tv(Q,A,de.TEXT),Q},Ah=function(_,x,S){var A;x==="Size1-Regular"?A="delim-size1":A="delim-size4";var L=_e.makeSpan(["delimsizinginner",A],[_e.makeSpan([],[_e.makeSymbol(_,x,S)])]);return{type:"elem",elem:L}},Lf=function(_,x,S){var A=Kt["Size4-Regular"][_.charCodeAt(0)]?Kt["Size4-Regular"][_.charCodeAt(0)][4]:Kt["Size1-Regular"][_.charCodeAt(0)][4],L=new ci("inner",Zt(_,Math.round(1e3*x))),F=new pn([L],{width:Ve(A),height:Ve(x),style:"width:"+Ve(A),viewBox:"0 0 "+1e3*A+" "+Math.round(1e3*x),preserveAspectRatio:"xMinYMin"}),Y=_e.makeSvgSpan([],[F],S);return Y.height=x,Y.style.height=Ve(x),Y.style.width=Ve(A),{type:"elem",elem:Y}},Ef=.008,Th={type:"kern",size:-1*Ef},Z2=["|","\\lvert","\\rvert","\\vert"],j2=["\\|","\\lVert","\\rVert","\\Vert"],nv=function(_,x,S,A,L,F){var Y,Q,te,le,me="",be=0;Y=te=le=_,Q=null;var we="Size1-Regular";_==="\\uparrow"?te=le="⏐":_==="\\Uparrow"?te=le="‖":_==="\\downarrow"?Y=te="⏐":_==="\\Downarrow"?Y=te="‖":_==="\\updownarrow"?(Y="\\uparrow",te="⏐",le="\\downarrow"):_==="\\Updownarrow"?(Y="\\Uparrow",te="‖",le="\\Downarrow"):y.contains(Z2,_)?(te="∣",me="vert",be=333):y.contains(j2,_)?(te="∥",me="doublevert",be=556):_==="["||_==="\\lbrack"?(Y="⎡",te="⎢",le="⎣",we="Size4-Regular",me="lbrack",be=667):_==="]"||_==="\\rbrack"?(Y="⎤",te="⎥",le="⎦",we="Size4-Regular",me="rbrack",be=667):_==="\\lfloor"||_==="⌊"?(te=Y="⎢",le="⎣",we="Size4-Regular",me="lfloor",be=667):_==="\\lceil"||_==="⌈"?(Y="⎡",te=le="⎢",we="Size4-Regular",me="lceil",be=667):_==="\\rfloor"||_==="⌋"?(te=Y="⎥",le="⎦",we="Size4-Regular",me="rfloor",be=667):_==="\\rceil"||_==="⌉"?(Y="⎤",te=le="⎥",we="Size4-Regular",me="rceil",be=667):_==="("||_==="\\lparen"?(Y="⎛",te="⎜",le="⎝",we="Size4-Regular",me="lparen",be=875):_===")"||_==="\\rparen"?(Y="⎞",te="⎟",le="⎠",we="Size4-Regular",me="rparen",be=875):_==="\\{"||_==="\\lbrace"?(Y="⎧",Q="⎨",le="⎩",te="⎪",we="Size4-Regular"):_==="\\}"||_==="\\rbrace"?(Y="⎫",Q="⎬",le="⎭",te="⎪",we="Size4-Regular"):_==="\\lgroup"||_==="⟮"?(Y="⎧",le="⎩",te="⎪",we="Size4-Regular"):_==="\\rgroup"||_==="⟯"?(Y="⎫",le="⎭",te="⎪",we="Size4-Regular"):_==="\\lmoustache"||_==="⎰"?(Y="⎧",le="⎭",te="⎪",we="Size4-Regular"):(_==="\\rmoustache"||_==="⎱")&&(Y="⎫",le="⎩",te="⎪",we="Size4-Regular");var Te=Ll(Y,we,L),Ne=Te.height+Te.depth,We=Ll(te,we,L),tt=We.height+We.depth,ut=Ll(le,we,L),mt=ut.height+ut.depth,qt=0,Et=1;if(Q!==null){var Qt=Ll(Q,we,L);qt=Qt.height+Qt.depth,Et=2}var Ut=Ne+mt+qt,tr=Math.max(0,Math.ceil((x-Ut)/(Et*tt))),cr=Ut+tr*Et*tt,br=A.fontMetrics().axisHeight;S&&(br*=A.sizeMultiplier);var In=cr/2-br,gr=[];if(me.length>0){var Fa=cr-Ne-mt,Bn=Math.round(cr*1e3),sn=Cr(me,Math.round(Fa*1e3)),ra=new ci(me,sn),gs=(be/1e3).toFixed(3)+"em",ms=(Bn/1e3).toFixed(3)+"em",$h=new pn([ra],{width:gs,height:ms,viewBox:"0 0 "+be+" "+Bn}),Oa=_e.makeSvgSpan([],[$h],A);Oa.height=Bn/1e3,Oa.style.width=gs,Oa.style.height=ms,gr.push({type:"elem",elem:Oa})}else{if(gr.push(Ah(le,we,L)),gr.push(Th),Q===null){var Na=cr-Ne-mt+2*Ef;gr.push(Lf(te,Na,A))}else{var Pn=(cr-Ne-mt-qt)/2+2*Ef;gr.push(Lf(te,Pn,A)),gr.push(Th),gr.push(Ah(Q,we,L)),gr.push(Th),gr.push(Lf(te,Pn,A))}gr.push(Th),gr.push(Ah(Y,we,L))}var Rn=A.havingBaseStyle(de.TEXT),Yf=_e.makeVList({positionType:"bottom",positionData:In,children:gr},Rn);return Mf(_e.makeSpan(["delimsizing","mult"],[Yf],Rn),de.TEXT,A,F)},kh=80,Dh=.08,Mh=function(_,x,S,A,L){var F=ht(_,A,S),Y=new ci(_,F),Q=new pn([Y],{width:"400em",height:Ve(x),viewBox:"0 0 400000 "+S,preserveAspectRatio:"xMinYMin slice"});return _e.makeSvgSpan(["hide-tail"],[Q],L)},iv=function(_,x){var S=x.havingBaseSizing(),A=lv("\\surd",_*S.sizeMultiplier,Lh,S),L=S.sizeMultiplier,F=Math.max(0,x.minRuleThickness-x.fontMetrics().sqrtRuleThickness),Y,Q=0,te=0,le=0,me;return A.type==="small"?(le=1e3+1e3*F+kh,_<1?L=1:_<1.4&&(L=.7),Q=(1+F+Dh)/L,te=(1+F)/L,Y=Mh("sqrtMain",Q,le,F,x),Y.style.minWidth="0.853em",me=.833/L):A.type==="large"?(le=(1e3+kh)*El[A.size],te=(El[A.size]+F)/L,Q=(El[A.size]+F+Dh)/L,Y=Mh("sqrtSize"+A.size,Q,le,F,x),Y.style.minWidth="1.02em",me=1/L):(Q=_+F+Dh,te=_+F,le=Math.floor(1e3*_+F)+kh,Y=Mh("sqrtTall",Q,le,F,x),Y.style.minWidth="0.742em",me=1.056),Y.height=te,Y.style.height=Ve(Q),{span:Y,advanceWidth:me,ruleWidth:(x.fontMetrics().sqrtRuleThickness+F)*L}},If=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],K2=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],av=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],El=[0,1.2,1.8,2.4,3],ov=function(_,x,S,A,L){if(_==="<"||_==="\\lt"||_==="⟨"?_="\\langle":(_===">"||_==="\\gt"||_==="⟩")&&(_="\\rangle"),y.contains(If,_)||y.contains(av,_))return rv(_,x,!1,S,A,L);if(y.contains(K2,_))return nv(_,El[x],!1,S,A,L);throw new a("Illegal delimiter: '"+_+"'")},J2=[{type:"small",style:de.SCRIPTSCRIPT},{type:"small",style:de.SCRIPT},{type:"small",style:de.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],sv=[{type:"small",style:de.SCRIPTSCRIPT},{type:"small",style:de.SCRIPT},{type:"small",style:de.TEXT},{type:"stack"}],Lh=[{type:"small",style:de.SCRIPTSCRIPT},{type:"small",style:de.SCRIPT},{type:"small",style:de.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Q2=function(_){if(_.type==="small")return"Main-Regular";if(_.type==="large")return"Size"+_.size+"-Regular";if(_.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+_.type+"' here.")},lv=function(_,x,S,A){for(var L=Math.min(2,3-A.style.size),F=L;Fx)return S[F]}return S[S.length-1]},uv=function(_,x,S,A,L,F){_==="<"||_==="\\lt"||_==="⟨"?_="\\langle":(_===">"||_==="\\gt"||_==="⟩")&&(_="\\rangle");var Y;y.contains(av,_)?Y=J2:y.contains(If,_)?Y=Lh:Y=sv;var Q=lv(_,x,Y,A);return Q.type==="small"?Y2(_,Q.style,S,A,L,F):Q.type==="large"?rv(_,Q.size,S,A,L,F):nv(_,x,S,A,L,F)},e_=function(_,x,S,A,L,F){var Y=A.fontMetrics().axisHeight*A.sizeMultiplier,Q=901,te=5/A.fontMetrics().ptPerEm,le=Math.max(x-Y,S+Y),me=Math.max(le/500*Q,2*le-te);return uv(_,me,!0,A,L,F)},ki={sqrtImage:iv,sizedDelim:ov,sizeToMaxHeight:El,customSizedDelim:uv,leftRightDelim:e_},hv={"\\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}},t_=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Eh(R,_){var x=wh(R);if(x&&y.contains(t_,x.text))return x;throw x?new a("Invalid delimiter '"+x.text+"' after '"+_.funcName+"'",R):new a("Invalid delimiter type '"+R.type+"'",R)}Xe({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:function(_,x){var S=Eh(x[0],_);return{type:"delimsizing",mode:_.parser.mode,size:hv[_.funcName].size,mclass:hv[_.funcName].mclass,delim:S.text}},htmlBuilder:function(_,x){return _.delim==="."?_e.makeSpan([_.mclass]):ki.sizedDelim(_.delim,_.size,x,_.mode,[_.mclass])},mathmlBuilder:function(_){var x=[];_.delim!=="."&&x.push(En(_.delim,_.mode));var S=new Fe.MathNode("mo",x);_.mclass==="mopen"||_.mclass==="mclose"?S.setAttribute("fence","true"):S.setAttribute("fence","false"),S.setAttribute("stretchy","true");var A=Ve(ki.sizeToMaxHeight[_.size]);return S.setAttribute("minsize",A),S.setAttribute("maxsize",A),S}});function cv(R){if(!R.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Xe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(_,x){var S=_.parser.gullet.macros.get("\\current@color");if(S&&typeof S!="string")throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:_.parser.mode,delim:Eh(x[0],_).text,color:S}}}),Xe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(_,x){var S=Eh(x[0],_),A=_.parser;++A.leftrightDepth;var L=A.parseExpression(!1);--A.leftrightDepth,A.expect("\\right",!1);var F=It(A.parseFunction(),"leftright-right");return{type:"leftright",mode:A.mode,body:L,left:S.text,right:F.delim,rightColor:F.color}},htmlBuilder:function(_,x){cv(_);for(var S=Dr(_.body,x,!0,["mopen","mclose"]),A=0,L=0,F=!1,Y=0;Y-1?"mpadded":"menclose",[or(_.body,x)]);switch(_.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(S=x.fontMetrics().fboxsep*x.fontMetrics().ptPerEm,A.setAttribute("width","+"+2*S+"pt"),A.setAttribute("height","+"+2*S+"pt"),A.setAttribute("lspace",S+"pt"),A.setAttribute("voffset",S+"pt"),_.label==="\\fcolorbox"){var L=Math.max(x.fontMetrics().fboxrule,x.minRuleThickness);A.setAttribute("style","border: "+L+"em solid "+String(_.borderColor))}break;case"\\xcancel":A.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return _.backgroundColor&&A.setAttribute("mathbackground",_.backgroundColor),A};Xe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(_,x,S){var A=_.parser,L=_.funcName,F=It(x[0],"color-token").color,Y=x[1];return{type:"enclose",mode:A.mode,label:L,backgroundColor:F,body:Y}},htmlBuilder:Ih,mathmlBuilder:Bf}),Xe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(_,x,S){var A=_.parser,L=_.funcName,F=It(x[0],"color-token").color,Y=It(x[1],"color-token").color,Q=x[2];return{type:"enclose",mode:A.mode,label:L,backgroundColor:Y,borderColor:F,body:Q}},htmlBuilder:Ih,mathmlBuilder:Bf}),Xe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(_,x){var S=_.parser;return{type:"enclose",mode:S.mode,label:"\\fbox",body:x[0]}}}),Xe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"enclose",mode:S.mode,label:A,body:L}},htmlBuilder:Ih,mathmlBuilder:Bf}),Xe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(_,x){var S=_.parser;return{type:"enclose",mode:S.mode,label:"\\angl",body:x[0]}}});var fv={};function Di(R){for(var _=R.type,x=R.names,S=R.props,A=R.handler,L=R.htmlBuilder,F=R.mathmlBuilder,Y={type:_,numArgs:S.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:A},Q=0;Q1||!le)&&Ne.pop(),tt.length0&&(mt+=.25),te.push({pos:mt,isDashed:Hh[qh]})}for(qt(F[0]),S=0;S<_.body.length;++S){var Et=_.body[S],Qt=tt,Ut=ut;Y0&&(In+=ut,Ut=Y)){var ys=void 0;(A>0||_.hskipBeforeAndAfter)&&(ys=y.deflt(Pn.pregap,be),ys!==0&&(sn=_e.makeSpan(["arraycolsep"],[]),sn.style.width=Ve(ys),Bn.push(sn)));var _s=[];for(S=0;S0){for(var g_=_e.makeLineSpan("hline",x,le),m_=_e.makeLineSpan("hdashline",x,le),Xf=[{type:"elem",elem:Q,shift:0}];te.length>0;){var Vv=te.pop(),$v=Vv.pos-gr;Vv.isDashed?Xf.push({type:"elem",elem:m_,shift:$v}):Xf.push({type:"elem",elem:g_,shift:$v})}Q=_e.makeVList({positionType:"individualShift",children:Xf},x)}if(gs.length===0)return _e.makeSpan(["mord"],[Q],x);var Zf=_e.makeVList({positionType:"individualShift",children:gs},x);return Zf=_e.makeSpan(["tag"],[Zf],x),_e.makeFragment([Q,Zf])},Ph={c:"center ",l:"left ",r:"right "},Zn=function(_,x){for(var S=[],A=new Fe.MathNode("mtd",[],["mtr-glue"]),L=new Fe.MathNode("mtd",[],["mml-eqn-num"]),F=0;F<_.body.length;F++){for(var Y=_.body[F],Q=[],te=0;te0){var Te=_.cols,Ne="",We=!1,tt=0,ut=Te.length;Te[0].type==="separator"&&(be+="top ",tt=1),Te[Te.length-1].type==="separator"&&(be+="bottom ",ut-=1);for(var mt=tt;mt0?"left ":"",be+=tr[tr.length-1].length>0?"right ":"";for(var cr=1;cr-1?"alignat":"align",L=_.envName==="split",F=vi(_.parser,{cols:S,addJot:!0,autoTag:L?void 0:Mi(_.envName),emptySingleRow:!0,colSeparationType:A,maxNumCols:L?2:void 0,leqno:_.parser.settings.leqno},"display"),Y,Q=0,te={type:"ordgroup",mode:_.mode,body:[]};if(x[0]&&x[0].type==="ordgroup"){for(var le="",me=0;me0&&we&&(We=1),S[Te]={type:"align",align:Ne,pregap:We,postgap:0}}return F.colSeparationType=we?"align":"alignat",F};Di({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(_,x){var S=wh(x[0]),A=S?[x[0]]:It(x[0],"ordgroup").body,L=A.map(function(Y){var Q=Sf(Y),te=Q.text;if("lcr".indexOf(te)!==-1)return{type:"align",align:te};if(te==="|")return{type:"separator",separator:"|"};if(te===":")return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+te,Y)}),F={cols:L,hskipBeforeAndAfter:!0,maxNumCols:L.length};return vi(_.parser,F,Bh(_.envName))},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(_){var x={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[_.envName.replace("*","")],S="c",A={hskipBeforeAndAfter:!1,cols:[{type:"align",align:S}]};if(_.envName.charAt(_.envName.length-1)==="*"){var L=_.parser;if(L.consumeSpaces(),L.fetch().text==="["){if(L.consume(),L.consumeSpaces(),S=L.fetch().text,"lcr".indexOf(S)===-1)throw new a("Expected l or c or r",L.nextToken);L.consume(),L.consumeSpaces(),L.expect("]"),L.consume(),A.cols=[{type:"align",align:S}]}}var F=vi(_.parser,A,Bh(_.envName)),Y=Math.max.apply(Math,[0].concat(F.body.map(function(Q){return Q.length})));return F.cols=new Array(Y).fill({type:"align",align:S}),x?{type:"leftright",mode:_.mode,body:[F],left:x[0],right:x[1],rightColor:void 0}:F},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(_){var x={arraystretch:.5},S=vi(_.parser,x,"script");return S.colSeparationType="small",S},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["subarray"],props:{numArgs:1},handler:function(_,x){var S=wh(x[0]),A=S?[x[0]]:It(x[0],"ordgroup").body,L=A.map(function(Y){var Q=Sf(Y),te=Q.text;if("lc".indexOf(te)!==-1)return{type:"align",align:te};throw new a("Unknown column alignment: "+te,Y)});if(L.length>1)throw new a("{subarray} can contain only one column");var F={cols:L,hskipBeforeAndAfter:!1,arraystretch:.5};if(F=vi(_.parser,F,"script"),F.body.length>0&&F.body[0].length>1)throw new a("{subarray} can contain only one column");return F},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(_){var x={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},S=vi(_.parser,x,Bh(_.envName));return{type:"leftright",mode:_.mode,body:[S],left:_.envName.indexOf("r")>-1?".":"\\{",right:_.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:dv,htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(_){y.contains(["gather","gather*"],_.envName)&&hs(_);var x={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Mi(_.envName),emptySingleRow:!0,leqno:_.parser.settings.leqno};return vi(_.parser,x,"display")},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:dv,htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(_){hs(_);var x={autoTag:Mi(_.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:_.parser.settings.leqno};return vi(_.parser,x,"display")},htmlBuilder:gi,mathmlBuilder:Zn}),Di({type:"array",names:["CD"],props:{numArgs:0},handler:function(_){return hs(_),W2(_.parser)},htmlBuilder:gi,mathmlBuilder:Zn}),ee("\\nonumber","\\gdef\\@eqnsw{0}"),ee("\\notag","\\nonumber"),Xe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(_,x){throw new a(_.funcName+" valid only within array environment")}});var pv=fv,vv=pv;Xe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];if(L.type!=="ordgroup")throw new a("Invalid environment name",L);for(var F="",Y=0;Y=de.SCRIPT.id?S.text():de.DISPLAY:_==="text"&&S.size===de.DISPLAY.size?S=de.TEXT:_==="script"?S=de.SCRIPT:_==="scriptscript"&&(S=de.SCRIPTSCRIPT),S},Rh=function(_,x){var S=Of(_.size,x.style),A=S.fracNum(),L=S.fracDen(),F;F=x.havingStyle(A);var Y=Wt(_.numer,F,x);if(_.continued){var Q=8.5/x.fontMetrics().ptPerEm,te=3.5/x.fontMetrics().ptPerEm;Y.height=Y.height0?Ne=3*we:Ne=7*we,We=x.fontMetrics().denom1):(be>0?(Te=x.fontMetrics().num2,Ne=we):(Te=x.fontMetrics().num3,Ne=3*we),We=x.fontMetrics().denom2);var tt;if(me){var mt=x.fontMetrics().axisHeight;Te-Y.depth-(mt+.5*be)0&&(x=_,x=x==="."?null:x),x};Xe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(_,x){var S=_.parser,A=x[4],L=x[5],F=xh(x[0]),Y=F.type==="atom"&&F.family==="open"?on(F.text):null,Q=xh(x[1]),te=Q.type==="atom"&&Q.family==="close"?on(Q.text):null,le=It(x[2],"size"),me,be=null;le.isBlank?me=!0:(be=le.value,me=be.number>0);var we="auto",Te=x[3];if(Te.type==="ordgroup"){if(Te.body.length>0){var Ne=It(Te.body[0],"textord");we=Ba[Number(Ne.text)]}}else Te=It(Te,"textord"),we=Ba[Number(Te.text)];return{type:"genfrac",mode:S.mode,numer:A,denom:L,continued:!1,hasBarLine:me,barSize:be,leftDelim:Y,rightDelim:te,size:we}},htmlBuilder:Rh,mathmlBuilder:jn}),Xe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(_,x){var S=_.parser;_.funcName;var A=_.token;return{type:"infix",mode:S.mode,replaceWith:"\\\\abovefrac",size:It(x[0],"size").value,token:A}}}),Xe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(_,x){var S=_.parser;_.funcName;var A=x[0],L=g(It(x[1],"infix").size),F=x[2],Y=L.number>0;return{type:"genfrac",mode:S.mode,numer:A,denom:F,continued:!1,hasBarLine:Y,barSize:L,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Rh,mathmlBuilder:jn});var Ao=function(_,x){var S=x.style,A,L;_.type==="supsub"?(A=_.sup?Wt(_.sup,x.havingStyle(S.sup()),x):Wt(_.sub,x.havingStyle(S.sub()),x),L=It(_.base,"horizBrace")):L=It(_,"horizBrace");var F=Wt(L.base,x.havingBaseStyle(de.DISPLAY)),Y=di.svgSpan(L,x),Q;if(L.isOver?(Q=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:F},{type:"kern",size:.1},{type:"elem",elem:Y}]},x),Q.children[0].children[0].children[1].classes.push("svg-align")):(Q=_e.makeVList({positionType:"bottom",positionData:F.depth+.1+Y.height,children:[{type:"elem",elem:Y},{type:"kern",size:.1},{type:"elem",elem:F}]},x),Q.children[0].children[0].children[0].classes.push("svg-align")),A){var te=_e.makeSpan(["mord",L.isOver?"mover":"munder"],[Q],x);L.isOver?Q=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:te},{type:"kern",size:.2},{type:"elem",elem:A}]},x):Q=_e.makeVList({positionType:"bottom",positionData:te.depth+.2+A.height+A.depth,children:[{type:"elem",elem:A},{type:"kern",size:.2},{type:"elem",elem:te}]},x)}return _e.makeSpan(["mord",L.isOver?"mover":"munder"],[Q],x)},r_=function(_,x){var S=di.mathMLnode(_.label);return new Fe.MathNode(_.isOver?"mover":"munder",[or(_.base,x),S])};Xe({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName;return{type:"horizBrace",mode:S.mode,label:A,isOver:/^\\over/.test(A),base:x[0]}},htmlBuilder:Ao,mathmlBuilder:r_}),Xe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(_,x){var S=_.parser,A=x[1],L=It(x[0],"url").url;return S.settings.isTrusted({command:"\\href",url:L})?{type:"href",mode:S.mode,href:L,body:Ar(A)}:S.formatUnsupportedCmd("\\href")},htmlBuilder:function(_,x){var S=Dr(_.body,x,!1);return _e.makeAnchor(_.href,[],S,x)},mathmlBuilder:function(_,x){var S=Ea(_.body,x);return S instanceof Xn||(S=new Xn("mrow",[S])),S.setAttribute("href",_.href),S}}),Xe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(_,x){var S=_.parser,A=It(x[0],"url").url;if(!S.settings.isTrusted({command:"\\url",url:A}))return S.formatUnsupportedCmd("\\url");for(var L=[],F=0;F0&&(A=ir(_.totalheight,x)-S);var L=0;_.width.number>0&&(L=ir(_.width,x));var F={height:Ve(S+A)};L>0&&(F.width=Ve(L)),A>0&&(F.verticalAlign=Ve(-A));var Y=new _l(_.src,_.alt,F);return Y.height=S,Y.depth=A,Y},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mglyph",[]);S.setAttribute("alt",_.alt);var A=ir(_.height,x),L=0;if(_.totalheight.number>0&&(L=ir(_.totalheight,x)-A,S.setAttribute("valign",Ve(-L))),S.setAttribute("height",Ve(A+L)),_.width.number>0){var F=ir(_.width,x);S.setAttribute("width",Ve(F))}return S.setAttribute("src",_.src),S}}),Xe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=It(x[0],"size");if(S.settings.strict){var F=A[1]==="m",Y=L.value.unit==="mu";F?(Y||S.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+A+" supports only mu units, "+("not "+L.value.unit+" units")),S.mode!=="math"&&S.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+A+" works only in math mode")):Y&&S.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+A+" doesn't support mu units")}return{type:"kern",mode:S.mode,dimension:L.value}},htmlBuilder:function(_,x){return _e.makeGlue(_.dimension,x)},mathmlBuilder:function(_,x){var S=ir(_.dimension,x);return new Fe.SpaceNode(S)}}),Xe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"lap",mode:S.mode,alignment:A.slice(5),body:L}},htmlBuilder:function(_,x){var S;_.alignment==="clap"?(S=_e.makeSpan([],[Wt(_.body,x)]),S=_e.makeSpan(["inner"],[S],x)):S=_e.makeSpan(["inner"],[Wt(_.body,x)]);var A=_e.makeSpan(["fix"],[]),L=_e.makeSpan([_.alignment],[S,A],x),F=_e.makeSpan(["strut"]);return F.style.height=Ve(L.height+L.depth),L.depth&&(F.style.verticalAlign=Ve(-L.depth)),L.children.unshift(F),L=_e.makeSpan(["thinbox"],[L],x),_e.makeSpan(["mord","vbox"],[L],x)},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mpadded",[or(_.body,x)]);if(_.alignment!=="rlap"){var A=_.alignment==="llap"?"-1":"-0.5";S.setAttribute("lspace",A+"width")}return S.setAttribute("width","0px"),S}}),Xe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(_,x){var S=_.funcName,A=_.parser,L=A.mode;A.switchMode("math");var F=S==="\\("?"\\)":"$",Y=A.parseExpression(!1,F);return A.expect(F),A.switchMode(L),{type:"styling",mode:A.mode,style:"text",body:Y}}}),Xe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(_,x){throw new a("Mismatched "+_.funcName)}});var yv=function(_,x){switch(x.style.size){case de.DISPLAY.size:return _.display;case de.TEXT.size:return _.text;case de.SCRIPT.size:return _.script;case de.SCRIPTSCRIPT.size:return _.scriptscript;default:return _.text}};Xe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(_,x){var S=_.parser;return{type:"mathchoice",mode:S.mode,display:Ar(x[0]),text:Ar(x[1]),script:Ar(x[2]),scriptscript:Ar(x[3])}},htmlBuilder:function(_,x){var S=yv(_,x),A=Dr(S,x,!1);return _e.makeFragment(A)},mathmlBuilder:function(_,x){var S=yv(_,x);return Ea(S,x)}});var zf=function(_,x,S,A,L,F,Y){_=_e.makeSpan([],[_]);var Q=S&&y.isCharacterBox(S),te,le;if(x){var me=Wt(x,A.havingStyle(L.sup()),A);le={elem:me,kern:Math.max(A.fontMetrics().bigOpSpacing1,A.fontMetrics().bigOpSpacing3-me.depth)}}if(S){var be=Wt(S,A.havingStyle(L.sub()),A);te={elem:be,kern:Math.max(A.fontMetrics().bigOpSpacing2,A.fontMetrics().bigOpSpacing4-be.height)}}var we;if(le&&te){var Te=A.fontMetrics().bigOpSpacing5+te.elem.height+te.elem.depth+te.kern+_.depth+Y;we=_e.makeVList({positionType:"bottom",positionData:Te,children:[{type:"kern",size:A.fontMetrics().bigOpSpacing5},{type:"elem",elem:te.elem,marginLeft:Ve(-F)},{type:"kern",size:te.kern},{type:"elem",elem:_},{type:"kern",size:le.kern},{type:"elem",elem:le.elem,marginLeft:Ve(F)},{type:"kern",size:A.fontMetrics().bigOpSpacing5}]},A)}else if(te){var Ne=_.height-Y;we=_e.makeVList({positionType:"top",positionData:Ne,children:[{type:"kern",size:A.fontMetrics().bigOpSpacing5},{type:"elem",elem:te.elem,marginLeft:Ve(-F)},{type:"kern",size:te.kern},{type:"elem",elem:_}]},A)}else if(le){var We=_.depth+Y;we=_e.makeVList({positionType:"bottom",positionData:We,children:[{type:"elem",elem:_},{type:"kern",size:le.kern},{type:"elem",elem:le.elem,marginLeft:Ve(F)},{type:"kern",size:A.fontMetrics().bigOpSpacing5}]},A)}else return _;var tt=[we];if(te&&F!==0&&!Q){var ut=_e.makeSpan(["mspace"],[],A);ut.style.marginRight=Ve(F),tt.unshift(ut)}return _e.makeSpan(["mop","op-limits"],tt,A)},_v=["\\smallint"],To=function(_,x){var S,A,L=!1,F;_.type==="supsub"?(S=_.sup,A=_.sub,F=It(_.base,"op"),L=!0):F=It(_,"op");var Y=x.style,Q=!1;Y.size===de.DISPLAY.size&&F.symbol&&!y.contains(_v,F.name)&&(Q=!0);var te;if(F.symbol){var le=Q?"Size2-Regular":"Size1-Regular",me="";if((F.name==="\\oiint"||F.name==="\\oiiint")&&(me=F.name.slice(1),F.name=me==="oiint"?"\\iint":"\\iiint"),te=_e.makeSymbol(F.name,le,"math",x,["mop","op-symbol",Q?"large-op":"small-op"]),me.length>0){var be=te.italic,we=_e.staticSvg(me+"Size"+(Q?"2":"1"),x);te=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:te,shift:0},{type:"elem",elem:we,shift:Q?.08:0}]},x),F.name="\\"+me,te.classes.unshift("mop"),te.italic=be}}else if(F.body){var Te=Dr(F.body,x,!0);Te.length===1&&Te[0]instanceof nn?(te=Te[0],te.classes[0]="mop"):te=_e.makeSpan(["mop"],Te,x)}else{for(var Ne=[],We=1;We0){for(var Q=F.body.map(function(be){var we=be.text;return typeof we=="string"?{type:"textord",mode:be.mode,text:we}:be}),te=Dr(Q,x.withFont("mathrm"),!0),le=0;le=0?Q.setAttribute("height",Ve(L)):(Q.setAttribute("height",Ve(L)),Q.setAttribute("depth",Ve(-L))),Q.setAttribute("voffset",Ve(L)),Q}});function Il(R,_,x){for(var S=Dr(R,_,!1),A=_.sizeMultiplier/x.sizeMultiplier,L=0;LS.height+S.depth+Y&&(Y=(Y+we-S.height-S.depth)/2);var Te=le.height-S.height-Y-me;S.style.paddingLeft=Ve(be);var Ne=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S,wrapperClasses:["svg-align"]},{type:"kern",size:-(S.height+Te)},{type:"elem",elem:le},{type:"kern",size:me}]},x);if(_.index){var We=x.havingStyle(de.SCRIPTSCRIPT),tt=Wt(_.index,We,x),ut=.6*(Ne.height-Ne.depth),mt=_e.makeVList({positionType:"shift",positionData:-ut,children:[{type:"elem",elem:tt}]},x),qt=_e.makeSpan(["root"],[mt]);return _e.makeSpan(["mord","sqrt"],[qt,Ne],x)}else return _e.makeSpan(["mord","sqrt"],[Ne],x)},mathmlBuilder:function(_,x){var S=_.body,A=_.index;return A?new Fe.MathNode("mroot",[or(S,x),or(A,x)]):new Fe.MathNode("msqrt",[or(S,x)])}});var Gf={display:de.DISPLAY,text:de.TEXT,script:de.SCRIPT,scriptscript:de.SCRIPTSCRIPT};Xe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_,x){var S=_.breakOnTokenText,A=_.funcName,L=_.parser,F=L.parseExpression(!0,S),Y=A.slice(1,A.length-5);return{type:"styling",mode:L.mode,style:Y,body:F}},htmlBuilder:function(_,x){var S=Gf[_.style],A=x.havingStyle(S).withFont("");return Il(_.body,A,x)},mathmlBuilder:function(_,x){var S=Gf[_.style],A=x.havingStyle(S),L=mn(_.body,A),F=new Fe.MathNode("mstyle",L),Y={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Q=Y[_.style];return F.setAttribute("scriptlevel",Q[0]),F.setAttribute("displaystyle",Q[1]),F}});var ds=function(_,x){var S=_.base;if(S)if(S.type==="op"){var A=S.limits&&(x.style.size===de.DISPLAY.size||S.alwaysHandleSupSub);return A?To:null}else if(S.type==="operatorname"){var L=S.alwaysHandleSupSub&&(x.style.size===de.DISPLAY.size||S.limits);return L?Vf:null}else{if(S.type==="accent")return y.isCharacterBox(S.base)?wf:null;if(S.type==="horizBrace"){var F=!_.sub;return F===S.isOver?Ao:null}else return null}else return null};Co({type:"supsub",htmlBuilder:function(_,x){var S=ds(_,x);if(S)return S(_,x);var A=_.base,L=_.sup,F=_.sub,Y=Wt(A,x),Q,te,le=x.fontMetrics(),me=0,be=0,we=A&&y.isCharacterBox(A);if(L){var Te=x.havingStyle(x.style.sup());Q=Wt(L,Te,x),we||(me=Y.height-Te.fontMetrics().supDrop*Te.sizeMultiplier/x.sizeMultiplier)}if(F){var Ne=x.havingStyle(x.style.sub());te=Wt(F,Ne,x),we||(be=Y.depth+Ne.fontMetrics().subDrop*Ne.sizeMultiplier/x.sizeMultiplier)}var We;x.style===de.DISPLAY?We=le.sup1:x.style.cramped?We=le.sup3:We=le.sup2;var tt=x.sizeMultiplier,ut=Ve(.5/le.ptPerEm/tt),mt=null;if(te){var qt=_.base&&_.base.type==="op"&&_.base.name&&(_.base.name==="\\oiint"||_.base.name==="\\oiiint");(Y instanceof nn||qt)&&(mt=Ve(-Y.italic))}var Et;if(Q&&te){me=Math.max(me,We,Q.depth+.25*le.xHeight),be=Math.max(be,le.sub2);var Qt=le.defaultRuleThickness,Ut=4*Qt;if(me-Q.depth-(te.height-be)0&&(me+=tr,be-=tr)}var cr=[{type:"elem",elem:te,shift:be,marginRight:ut,marginLeft:mt},{type:"elem",elem:Q,shift:-me,marginRight:ut}];Et=_e.makeVList({positionType:"individualShift",children:cr},x)}else if(te){be=Math.max(be,le.sub1,te.height-.8*le.xHeight);var br=[{type:"elem",elem:te,marginLeft:mt,marginRight:ut}];Et=_e.makeVList({positionType:"shift",positionData:be,children:br},x)}else if(Q)me=Math.max(me,We,Q.depth+.25*le.xHeight),Et=_e.makeVList({positionType:"shift",positionData:-me,children:[{type:"elem",elem:Q,marginRight:ut}]},x);else throw new Error("supsub must have either sup or sub.");var In=Cl(Y,"right")||"mord";return _e.makeSpan([In],[Y,_e.makeSpan(["msupsub"],[Et])],x)},mathmlBuilder:function(_,x){var S=!1,A,L;_.base&&_.base.type==="horizBrace"&&(L=!!_.sup,L===_.base.isOver&&(S=!0,A=_.base.isOver)),_.base&&(_.base.type==="op"||_.base.type==="operatorname")&&(_.base.parentIsSupSub=!0);var F=[or(_.base,x)];_.sub&&F.push(or(_.sub,x)),_.sup&&F.push(or(_.sup,x));var Y;if(S)Y=A?"mover":"munder";else if(_.sub)if(_.sup){var le=_.base;le&&le.type==="op"&&le.limits&&x.style===de.DISPLAY||le&&le.type==="operatorname"&&le.alwaysHandleSupSub&&(x.style===de.DISPLAY||le.limits)?Y="munderover":Y="msubsup"}else{var te=_.base;te&&te.type==="op"&&te.limits&&(x.style===de.DISPLAY||te.alwaysHandleSupSub)||te&&te.type==="operatorname"&&te.alwaysHandleSupSub&&(te.limits||x.style===de.DISPLAY)?Y="munder":Y="msub"}else{var Q=_.base;Q&&Q.type==="op"&&Q.limits&&(x.style===de.DISPLAY||Q.alwaysHandleSupSub)||Q&&Q.type==="operatorname"&&Q.alwaysHandleSupSub&&(Q.limits||x.style===de.DISPLAY)?Y="mover":Y="msup"}return new Fe.MathNode(Y,F)}}),Co({type:"atom",htmlBuilder:function(_,x){return _e.mathsym(_.text,_.mode,x,["m"+_.family])},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mo",[En(_.text,_.mode)]);if(_.family==="bin"){var A=xf(_,x);A==="bold-italic"&&S.setAttribute("mathvariant",A)}else _.family==="punct"?S.setAttribute("separator","true"):(_.family==="open"||_.family==="close")&&S.setAttribute("stretchy","false");return S}});var Fh={mi:"italic",mn:"normal",mtext:"normal"};Co({type:"mathord",htmlBuilder:function(_,x){return _e.makeOrd(_,x,"mathord")},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mi",[En(_.text,_.mode,x)]),A=xf(_,x)||"italic";return A!==Fh[S.type]&&S.setAttribute("mathvariant",A),S}}),Co({type:"textord",htmlBuilder:function(_,x){return _e.makeOrd(_,x,"textord")},mathmlBuilder:function(_,x){var S=En(_.text,_.mode,x),A=xf(_,x)||"normal",L;return _.mode==="text"?L=new Fe.MathNode("mtext",[S]):/[0-9]/.test(_.text)?L=new Fe.MathNode("mn",[S]):_.text==="\\prime"?L=new Fe.MathNode("mo",[S]):L=new Fe.MathNode("mi",[S]),A!==Fh[L.type]&&L.setAttribute("mathvariant",A),L}});var xr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ps={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Co({type:"spacing",htmlBuilder:function(_,x){if(ps.hasOwnProperty(_.text)){var S=ps[_.text].className||"";if(_.mode==="text"){var A=_e.makeOrd(_,x,"textord");return A.classes.push(S),A}else return _e.makeSpan(["mspace",S],[_e.mathsym(_.text,_.mode,x)],x)}else{if(xr.hasOwnProperty(_.text))return _e.makeSpan(["mspace",xr[_.text]],[],x);throw new a('Unknown type of space "'+_.text+'"')}},mathmlBuilder:function(_,x){var S;if(ps.hasOwnProperty(_.text))S=new Fe.MathNode("mtext",[new Fe.TextNode(" ")]);else{if(xr.hasOwnProperty(_.text))return new Fe.MathNode("mspace");throw new a('Unknown type of space "'+_.text+'"')}return S}});var Oh=function(){var _=new Fe.MathNode("mtd",[]);return _.setAttribute("width","50%"),_};Co({type:"tag",mathmlBuilder:function(_,x){var S=new Fe.MathNode("mtable",[new Fe.MathNode("mtr",[Oh(),new Fe.MathNode("mtd",[Ea(_.body,x)]),Oh(),new Fe.MathNode("mtd",[Ea(_.tag,x)])])]);return S.setAttribute("width","100%"),S}});var xv={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},bv={"\\textbf":"textbf","\\textmd":"textmd"},i_={"\\textit":"textit","\\textup":"textup"},Sv=function(_,x){var S=_.font;return S?xv[S]?x.withTextFontFamily(xv[S]):bv[S]?x.withTextFontWeight(bv[S]):x.withTextFontShape(i_[S]):x};Xe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"text",mode:S.mode,body:Ar(L),font:A}},htmlBuilder:function(_,x){var S=Sv(_,x),A=Dr(_.body,S,!0);return _e.makeSpan(["mord","text"],A,S)},mathmlBuilder:function(_,x){var S=Sv(_,x);return Ea(_.body,S)}}),Xe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){var S=_.parser;return{type:"underline",mode:S.mode,body:x[0]}},htmlBuilder:function(_,x){var S=Wt(_.body,x),A=_e.makeLineSpan("underline-line",x),L=x.fontMetrics().defaultRuleThickness,F=_e.makeVList({positionType:"top",positionData:S.height,children:[{type:"kern",size:L},{type:"elem",elem:A},{type:"kern",size:3*L},{type:"elem",elem:S}]},x);return _e.makeSpan(["mord","underline"],[F],x)},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mo",[new Fe.TextNode("‾")]);S.setAttribute("stretchy","true");var A=new Fe.MathNode("munder",[or(_.body,x),S]);return A.setAttribute("accentunder","true"),A}}),Xe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(_,x){var S=_.parser;return{type:"vcenter",mode:S.mode,body:x[0]}},htmlBuilder:function(_,x){var S=Wt(_.body,x),A=x.fontMetrics().axisHeight,L=.5*(S.height-A-(S.depth+A));return _e.makeVList({positionType:"shift",positionData:L,children:[{type:"elem",elem:S}]},x)},mathmlBuilder:function(_,x){return new Fe.MathNode("mpadded",[or(_.body,x)],["vcenter"])}}),Xe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(_,x,S){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(_,x){for(var S=wv(_),A=[],L=x.havingStyle(x.style.text()),F=0;F=5?_=0:R>=3?_=1:_=2,!yo[_]){var x=yo[_]={cssEmPerMu:Mn.quad[_]/18};for(var S in Mn)Mn.hasOwnProperty(S)&&(x[S]=Mn[S][_])}return yo[_]}var hh=[[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]],ss=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yl=function(_,x){return x.size<2?_:hh[_-1][x.size-1]},_o=function(){function R(x){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=x.style,this.color=x.color,this.size=x.size||R.BASESIZE,this.textSize=x.textSize||this.size,this.phantom=!!x.phantom,this.font=x.font||"",this.fontFamily=x.fontFamily||"",this.fontWeight=x.fontWeight||"",this.fontShape=x.fontShape||"",this.sizeMultiplier=ss[this.size-1],this.maxSize=x.maxSize,this.minRuleThickness=x.minRuleThickness,this._fontMetrics=void 0}var _=R.prototype;return _.extend=function(S){var A={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 L in S)S.hasOwnProperty(L)&&(A[L]=S[L]);return new R(A)},_.havingStyle=function(S){return this.style===S?this:this.extend({style:S,size:yl(this.textSize,S)})},_.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},_.havingSize=function(S){return this.size===S&&this.textSize===S?this:this.extend({style:this.style.text(),size:S,textSize:S,sizeMultiplier:ss[S-1]})},_.havingBaseStyle=function(S){S=S||this.style.text();var A=yl(R.BASESIZE,S);return this.size===A&&this.textSize===R.BASESIZE&&this.style===S?this:this.extend({style:S,size:A})},_.havingBaseSizing=function(){var S;switch(this.style.id){case 4:case 5:S=3;break;case 6:case 7:S=1;break;default:S=6}return this.extend({style:this.style.text(),size:S})},_.withColor=function(S){return this.extend({color:S})},_.withPhantom=function(){return this.extend({phantom:!0})},_.withFont=function(S){return this.extend({font:S})},_.withTextFontFamily=function(S){return this.extend({fontFamily:S,font:""})},_.withTextFontWeight=function(S){return this.extend({fontWeight:S,font:""})},_.withTextFontShape=function(S){return this.extend({fontShape:S,font:""})},_.sizingClasses=function(S){return S.size!==this.size?["sizing","reset-size"+S.size,"size"+this.size]:[]},_.baseSizingClasses=function(){return this.size!==R.BASESIZE?["sizing","reset-size"+this.size,"size"+R.BASESIZE]:[]},_.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=ml(this.size)),this._fontMetrics},_.getColor=function(){return this.phantom?"transparent":this.color},R}();_o.BASESIZE=6;var xo=_o,rn={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ta={ex:!0,em:!0,mu:!0},ls=function(_){return typeof _!="string"&&(_=_.unit),_ in rn||_ in Ta||_==="ex"},ir=function(_,x){var S;if(_.unit in rn)S=rn[_.unit]/x.fontMetrics().ptPerEm/x.sizeMultiplier;else if(_.unit==="mu")S=x.fontMetrics().cssEmPerMu;else{var A;if(x.style.isTight()?A=x.havingStyle(x.style.text()):A=x,_.unit==="ex")S=A.fontMetrics().xHeight;else if(_.unit==="em")S=A.fontMetrics().quad;else throw new a("Invalid unit: '"+_.unit+"'");A!==x&&(S*=A.sizeMultiplier/x.sizeMultiplier)}return Math.min(_.number*S,x.maxSize)},Ve=function(_){return+_.toFixed(4)+"em"},jr=function(_){return _.filter(function(x){return x}).join(" ")},ch=function(_,x,S){if(this.classes=_||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=S||{},x){x.style.isTight()&&this.classes.push("mtight");var A=x.getColor();A&&(this.style.color=A)}},fh=function(_){var x=document.createElement(_);x.className=jr(this.classes);for(var S in this.style)this.style.hasOwnProperty(S)&&(x.style[S]=this.style[S]);for(var A in this.attributes)this.attributes.hasOwnProperty(A)&&x.setAttribute(A,this.attributes[A]);for(var L=0;L",x},Xn=function(){function R(x,S,A,L){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,ch.call(this,x,A,L),this.children=S||[]}var _=R.prototype;return _.setAttribute=function(S,A){this.attributes[S]=A},_.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){return fh.call(this,"span")},_.toMarkup=function(){return yr.call(this,"span")},R}(),us=function(){function R(x,S,A,L){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,ch.call(this,S,L),this.children=A||[],this.setAttribute("href",x)}var _=R.prototype;return _.setAttribute=function(S,A){this.attributes[S]=A},_.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){return fh.call(this,"a")},_.toMarkup=function(){return yr.call(this,"a")},R}(),_l=function(){function R(x,S,A){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=S,this.src=x,this.classes=["mord"],this.style=A}var _=R.prototype;return _.hasClass=function(S){return y.contains(this.classes,S)},_.toNode=function(){var S=document.createElement("img");S.src=this.src,S.alt=this.alt,S.className="mord";for(var A in this.style)this.style.hasOwnProperty(A)&&(S.style[A]=this.style[A]);return S},_.toMarkup=function(){var S=""+this.alt+"0&&(A=document.createElement("span"),A.style.marginRight=Ve(this.italic)),this.classes.length>0&&(A=A||document.createElement("span"),A.className=jr(this.classes));for(var L in this.style)this.style.hasOwnProperty(L)&&(A=A||document.createElement("span"),A.style[L]=this.style[L]);return A?(A.appendChild(S),A):S},_.toMarkup=function(){var S=!1,A="0&&(L+="margin-right:"+this.italic+"em;");for(var F in this.style)this.style.hasOwnProperty(F)&&(L+=y.hyphenate(F)+":"+this.style[F]+";");L&&(S=!0,A+=' style="'+y.escape(L)+'"');var Y=y.escape(this.text);return S?(A+=">",A+=Y,A+="",A):Y},R}(),gn=function(){function R(x,S){this.children=void 0,this.attributes=void 0,this.children=x||[],this.attributes=S||{}}var _=R.prototype;return _.toNode=function(){var S="http://www.w3.org/2000/svg",A=document.createElementNS(S,"svg");for(var L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&A.setAttribute(L,this.attributes[L]);for(var F=0;F":""},R}(),mn=function(){function R(x){this.attributes=void 0,this.attributes=x||{}}var _=R.prototype;return _.toNode=function(){var S="http://www.w3.org/2000/svg",A=document.createElementNS(S,"line");for(var L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&A.setAttribute(L,this.attributes[L]);return A},_.toMarkup=function(){var S=" but got "+String(R)+".")}var ea={bin:1,close:1,inner:1,open:1,punct:1,rel:1},xl={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ka={math:{},text:{}},ar=ka;function B(R,_,x,S,A,L){ka[R][A]={font:_,group:x,replace:S},L&&S&&(ka[R][S]=ka[R][A])}var N="math",Me="text",Z="main",ie="ams",rr="accent-token",je="bin",qr="close",at="inner",oe="mathord",ke="op-token",$e="open",Ht="punct",ne="rel",_r="spacing",he="textord";B(N,Z,ne,"≡","\\equiv",!0),B(N,Z,ne,"≺","\\prec",!0),B(N,Z,ne,"≻","\\succ",!0),B(N,Z,ne,"∼","\\sim",!0),B(N,Z,ne,"⊥","\\perp"),B(N,Z,ne,"⪯","\\preceq",!0),B(N,Z,ne,"⪰","\\succeq",!0),B(N,Z,ne,"≃","\\simeq",!0),B(N,Z,ne,"∣","\\mid",!0),B(N,Z,ne,"≪","\\ll",!0),B(N,Z,ne,"≫","\\gg",!0),B(N,Z,ne,"≍","\\asymp",!0),B(N,Z,ne,"∥","\\parallel"),B(N,Z,ne,"⋈","\\bowtie",!0),B(N,Z,ne,"⌣","\\smile",!0),B(N,Z,ne,"⊑","\\sqsubseteq",!0),B(N,Z,ne,"⊒","\\sqsupseteq",!0),B(N,Z,ne,"≐","\\doteq",!0),B(N,Z,ne,"⌢","\\frown",!0),B(N,Z,ne,"∋","\\ni",!0),B(N,Z,ne,"∝","\\propto",!0),B(N,Z,ne,"⊢","\\vdash",!0),B(N,Z,ne,"⊣","\\dashv",!0),B(N,Z,ne,"∋","\\owns"),B(N,Z,Ht,".","\\ldotp"),B(N,Z,Ht,"⋅","\\cdotp"),B(N,Z,he,"#","\\#"),B(Me,Z,he,"#","\\#"),B(N,Z,he,"&","\\&"),B(Me,Z,he,"&","\\&"),B(N,Z,he,"ℵ","\\aleph",!0),B(N,Z,he,"∀","\\forall",!0),B(N,Z,he,"ℏ","\\hbar",!0),B(N,Z,he,"∃","\\exists",!0),B(N,Z,he,"∇","\\nabla",!0),B(N,Z,he,"♭","\\flat",!0),B(N,Z,he,"ℓ","\\ell",!0),B(N,Z,he,"♮","\\natural",!0),B(N,Z,he,"♣","\\clubsuit",!0),B(N,Z,he,"℘","\\wp",!0),B(N,Z,he,"♯","\\sharp",!0),B(N,Z,he,"♢","\\diamondsuit",!0),B(N,Z,he,"ℜ","\\Re",!0),B(N,Z,he,"♡","\\heartsuit",!0),B(N,Z,he,"ℑ","\\Im",!0),B(N,Z,he,"♠","\\spadesuit",!0),B(N,Z,he,"§","\\S",!0),B(Me,Z,he,"§","\\S"),B(N,Z,he,"¶","\\P",!0),B(Me,Z,he,"¶","\\P"),B(N,Z,he,"†","\\dag"),B(Me,Z,he,"†","\\dag"),B(Me,Z,he,"†","\\textdagger"),B(N,Z,he,"‡","\\ddag"),B(Me,Z,he,"‡","\\ddag"),B(Me,Z,he,"‡","\\textdaggerdbl"),B(N,Z,qr,"⎱","\\rmoustache",!0),B(N,Z,$e,"⎰","\\lmoustache",!0),B(N,Z,qr,"⟯","\\rgroup",!0),B(N,Z,$e,"⟮","\\lgroup",!0),B(N,Z,je,"∓","\\mp",!0),B(N,Z,je,"⊖","\\ominus",!0),B(N,Z,je,"⊎","\\uplus",!0),B(N,Z,je,"⊓","\\sqcap",!0),B(N,Z,je,"∗","\\ast"),B(N,Z,je,"⊔","\\sqcup",!0),B(N,Z,je,"◯","\\bigcirc",!0),B(N,Z,je,"∙","\\bullet",!0),B(N,Z,je,"‡","\\ddagger"),B(N,Z,je,"≀","\\wr",!0),B(N,Z,je,"⨿","\\amalg"),B(N,Z,je,"&","\\And"),B(N,Z,ne,"⟵","\\longleftarrow",!0),B(N,Z,ne,"⇐","\\Leftarrow",!0),B(N,Z,ne,"⟸","\\Longleftarrow",!0),B(N,Z,ne,"⟶","\\longrightarrow",!0),B(N,Z,ne,"⇒","\\Rightarrow",!0),B(N,Z,ne,"⟹","\\Longrightarrow",!0),B(N,Z,ne,"↔","\\leftrightarrow",!0),B(N,Z,ne,"⟷","\\longleftrightarrow",!0),B(N,Z,ne,"⇔","\\Leftrightarrow",!0),B(N,Z,ne,"⟺","\\Longleftrightarrow",!0),B(N,Z,ne,"↦","\\mapsto",!0),B(N,Z,ne,"⟼","\\longmapsto",!0),B(N,Z,ne,"↗","\\nearrow",!0),B(N,Z,ne,"↩","\\hookleftarrow",!0),B(N,Z,ne,"↪","\\hookrightarrow",!0),B(N,Z,ne,"↘","\\searrow",!0),B(N,Z,ne,"↼","\\leftharpoonup",!0),B(N,Z,ne,"⇀","\\rightharpoonup",!0),B(N,Z,ne,"↙","\\swarrow",!0),B(N,Z,ne,"↽","\\leftharpoondown",!0),B(N,Z,ne,"⇁","\\rightharpoondown",!0),B(N,Z,ne,"↖","\\nwarrow",!0),B(N,Z,ne,"⇌","\\rightleftharpoons",!0),B(N,ie,ne,"≮","\\nless",!0),B(N,ie,ne,"","\\@nleqslant"),B(N,ie,ne,"","\\@nleqq"),B(N,ie,ne,"⪇","\\lneq",!0),B(N,ie,ne,"≨","\\lneqq",!0),B(N,ie,ne,"","\\@lvertneqq"),B(N,ie,ne,"⋦","\\lnsim",!0),B(N,ie,ne,"⪉","\\lnapprox",!0),B(N,ie,ne,"⊀","\\nprec",!0),B(N,ie,ne,"⋠","\\npreceq",!0),B(N,ie,ne,"⋨","\\precnsim",!0),B(N,ie,ne,"⪹","\\precnapprox",!0),B(N,ie,ne,"≁","\\nsim",!0),B(N,ie,ne,"","\\@nshortmid"),B(N,ie,ne,"∤","\\nmid",!0),B(N,ie,ne,"⊬","\\nvdash",!0),B(N,ie,ne,"⊭","\\nvDash",!0),B(N,ie,ne,"⋪","\\ntriangleleft"),B(N,ie,ne,"⋬","\\ntrianglelefteq",!0),B(N,ie,ne,"⊊","\\subsetneq",!0),B(N,ie,ne,"","\\@varsubsetneq"),B(N,ie,ne,"⫋","\\subsetneqq",!0),B(N,ie,ne,"","\\@varsubsetneqq"),B(N,ie,ne,"≯","\\ngtr",!0),B(N,ie,ne,"","\\@ngeqslant"),B(N,ie,ne,"","\\@ngeqq"),B(N,ie,ne,"⪈","\\gneq",!0),B(N,ie,ne,"≩","\\gneqq",!0),B(N,ie,ne,"","\\@gvertneqq"),B(N,ie,ne,"⋧","\\gnsim",!0),B(N,ie,ne,"⪊","\\gnapprox",!0),B(N,ie,ne,"⊁","\\nsucc",!0),B(N,ie,ne,"⋡","\\nsucceq",!0),B(N,ie,ne,"⋩","\\succnsim",!0),B(N,ie,ne,"⪺","\\succnapprox",!0),B(N,ie,ne,"≆","\\ncong",!0),B(N,ie,ne,"","\\@nshortparallel"),B(N,ie,ne,"∦","\\nparallel",!0),B(N,ie,ne,"⊯","\\nVDash",!0),B(N,ie,ne,"⋫","\\ntriangleright"),B(N,ie,ne,"⋭","\\ntrianglerighteq",!0),B(N,ie,ne,"","\\@nsupseteqq"),B(N,ie,ne,"⊋","\\supsetneq",!0),B(N,ie,ne,"","\\@varsupsetneq"),B(N,ie,ne,"⫌","\\supsetneqq",!0),B(N,ie,ne,"","\\@varsupsetneqq"),B(N,ie,ne,"⊮","\\nVdash",!0),B(N,ie,ne,"⪵","\\precneqq",!0),B(N,ie,ne,"⪶","\\succneqq",!0),B(N,ie,ne,"","\\@nsubseteqq"),B(N,ie,je,"⊴","\\unlhd"),B(N,ie,je,"⊵","\\unrhd"),B(N,ie,ne,"↚","\\nleftarrow",!0),B(N,ie,ne,"↛","\\nrightarrow",!0),B(N,ie,ne,"⇍","\\nLeftarrow",!0),B(N,ie,ne,"⇏","\\nRightarrow",!0),B(N,ie,ne,"↮","\\nleftrightarrow",!0),B(N,ie,ne,"⇎","\\nLeftrightarrow",!0),B(N,ie,ne,"△","\\vartriangle"),B(N,ie,he,"ℏ","\\hslash"),B(N,ie,he,"▽","\\triangledown"),B(N,ie,he,"◊","\\lozenge"),B(N,ie,he,"Ⓢ","\\circledS"),B(N,ie,he,"®","\\circledR"),B(Me,ie,he,"®","\\circledR"),B(N,ie,he,"∡","\\measuredangle",!0),B(N,ie,he,"∄","\\nexists"),B(N,ie,he,"℧","\\mho"),B(N,ie,he,"Ⅎ","\\Finv",!0),B(N,ie,he,"⅁","\\Game",!0),B(N,ie,he,"‵","\\backprime"),B(N,ie,he,"▲","\\blacktriangle"),B(N,ie,he,"▼","\\blacktriangledown"),B(N,ie,he,"■","\\blacksquare"),B(N,ie,he,"⧫","\\blacklozenge"),B(N,ie,he,"★","\\bigstar"),B(N,ie,he,"∢","\\sphericalangle",!0),B(N,ie,he,"∁","\\complement",!0),B(N,ie,he,"ð","\\eth",!0),B(Me,Z,he,"ð","ð"),B(N,ie,he,"╱","\\diagup"),B(N,ie,he,"╲","\\diagdown"),B(N,ie,he,"□","\\square"),B(N,ie,he,"□","\\Box"),B(N,ie,he,"◊","\\Diamond"),B(N,ie,he,"¥","\\yen",!0),B(Me,ie,he,"¥","\\yen",!0),B(N,ie,he,"✓","\\checkmark",!0),B(Me,ie,he,"✓","\\checkmark"),B(N,ie,he,"ℶ","\\beth",!0),B(N,ie,he,"ℸ","\\daleth",!0),B(N,ie,he,"ℷ","\\gimel",!0),B(N,ie,he,"ϝ","\\digamma",!0),B(N,ie,he,"ϰ","\\varkappa"),B(N,ie,$e,"┌","\\@ulcorner",!0),B(N,ie,qr,"┐","\\@urcorner",!0),B(N,ie,$e,"└","\\@llcorner",!0),B(N,ie,qr,"┘","\\@lrcorner",!0),B(N,ie,ne,"≦","\\leqq",!0),B(N,ie,ne,"⩽","\\leqslant",!0),B(N,ie,ne,"⪕","\\eqslantless",!0),B(N,ie,ne,"≲","\\lesssim",!0),B(N,ie,ne,"⪅","\\lessapprox",!0),B(N,ie,ne,"≊","\\approxeq",!0),B(N,ie,je,"⋖","\\lessdot"),B(N,ie,ne,"⋘","\\lll",!0),B(N,ie,ne,"≶","\\lessgtr",!0),B(N,ie,ne,"⋚","\\lesseqgtr",!0),B(N,ie,ne,"⪋","\\lesseqqgtr",!0),B(N,ie,ne,"≑","\\doteqdot"),B(N,ie,ne,"≓","\\risingdotseq",!0),B(N,ie,ne,"≒","\\fallingdotseq",!0),B(N,ie,ne,"∽","\\backsim",!0),B(N,ie,ne,"⋍","\\backsimeq",!0),B(N,ie,ne,"⫅","\\subseteqq",!0),B(N,ie,ne,"⋐","\\Subset",!0),B(N,ie,ne,"⊏","\\sqsubset",!0),B(N,ie,ne,"≼","\\preccurlyeq",!0),B(N,ie,ne,"⋞","\\curlyeqprec",!0),B(N,ie,ne,"≾","\\precsim",!0),B(N,ie,ne,"⪷","\\precapprox",!0),B(N,ie,ne,"⊲","\\vartriangleleft"),B(N,ie,ne,"⊴","\\trianglelefteq"),B(N,ie,ne,"⊨","\\vDash",!0),B(N,ie,ne,"⊪","\\Vvdash",!0),B(N,ie,ne,"⌣","\\smallsmile"),B(N,ie,ne,"⌢","\\smallfrown"),B(N,ie,ne,"≏","\\bumpeq",!0),B(N,ie,ne,"≎","\\Bumpeq",!0),B(N,ie,ne,"≧","\\geqq",!0),B(N,ie,ne,"⩾","\\geqslant",!0),B(N,ie,ne,"⪖","\\eqslantgtr",!0),B(N,ie,ne,"≳","\\gtrsim",!0),B(N,ie,ne,"⪆","\\gtrapprox",!0),B(N,ie,je,"⋗","\\gtrdot"),B(N,ie,ne,"⋙","\\ggg",!0),B(N,ie,ne,"≷","\\gtrless",!0),B(N,ie,ne,"⋛","\\gtreqless",!0),B(N,ie,ne,"⪌","\\gtreqqless",!0),B(N,ie,ne,"≖","\\eqcirc",!0),B(N,ie,ne,"≗","\\circeq",!0),B(N,ie,ne,"≜","\\triangleq",!0),B(N,ie,ne,"∼","\\thicksim"),B(N,ie,ne,"≈","\\thickapprox"),B(N,ie,ne,"⫆","\\supseteqq",!0),B(N,ie,ne,"⋑","\\Supset",!0),B(N,ie,ne,"⊐","\\sqsupset",!0),B(N,ie,ne,"≽","\\succcurlyeq",!0),B(N,ie,ne,"⋟","\\curlyeqsucc",!0),B(N,ie,ne,"≿","\\succsim",!0),B(N,ie,ne,"⪸","\\succapprox",!0),B(N,ie,ne,"⊳","\\vartriangleright"),B(N,ie,ne,"⊵","\\trianglerighteq"),B(N,ie,ne,"⊩","\\Vdash",!0),B(N,ie,ne,"∣","\\shortmid"),B(N,ie,ne,"∥","\\shortparallel"),B(N,ie,ne,"≬","\\between",!0),B(N,ie,ne,"⋔","\\pitchfork",!0),B(N,ie,ne,"∝","\\varpropto"),B(N,ie,ne,"◀","\\blacktriangleleft"),B(N,ie,ne,"∴","\\therefore",!0),B(N,ie,ne,"∍","\\backepsilon"),B(N,ie,ne,"▶","\\blacktriangleright"),B(N,ie,ne,"∵","\\because",!0),B(N,ie,ne,"⋘","\\llless"),B(N,ie,ne,"⋙","\\gggtr"),B(N,ie,je,"⊲","\\lhd"),B(N,ie,je,"⊳","\\rhd"),B(N,ie,ne,"≂","\\eqsim",!0),B(N,Z,ne,"⋈","\\Join"),B(N,ie,ne,"≑","\\Doteq",!0),B(N,ie,je,"∔","\\dotplus",!0),B(N,ie,je,"∖","\\smallsetminus"),B(N,ie,je,"⋒","\\Cap",!0),B(N,ie,je,"⋓","\\Cup",!0),B(N,ie,je,"⩞","\\doublebarwedge",!0),B(N,ie,je,"⊟","\\boxminus",!0),B(N,ie,je,"⊞","\\boxplus",!0),B(N,ie,je,"⋇","\\divideontimes",!0),B(N,ie,je,"⋉","\\ltimes",!0),B(N,ie,je,"⋊","\\rtimes",!0),B(N,ie,je,"⋋","\\leftthreetimes",!0),B(N,ie,je,"⋌","\\rightthreetimes",!0),B(N,ie,je,"⋏","\\curlywedge",!0),B(N,ie,je,"⋎","\\curlyvee",!0),B(N,ie,je,"⊝","\\circleddash",!0),B(N,ie,je,"⊛","\\circledast",!0),B(N,ie,je,"⋅","\\centerdot"),B(N,ie,je,"⊺","\\intercal",!0),B(N,ie,je,"⋒","\\doublecap"),B(N,ie,je,"⋓","\\doublecup"),B(N,ie,je,"⊠","\\boxtimes",!0),B(N,ie,ne,"⇢","\\dashrightarrow",!0),B(N,ie,ne,"⇠","\\dashleftarrow",!0),B(N,ie,ne,"⇇","\\leftleftarrows",!0),B(N,ie,ne,"⇆","\\leftrightarrows",!0),B(N,ie,ne,"⇚","\\Lleftarrow",!0),B(N,ie,ne,"↞","\\twoheadleftarrow",!0),B(N,ie,ne,"↢","\\leftarrowtail",!0),B(N,ie,ne,"↫","\\looparrowleft",!0),B(N,ie,ne,"⇋","\\leftrightharpoons",!0),B(N,ie,ne,"↶","\\curvearrowleft",!0),B(N,ie,ne,"↺","\\circlearrowleft",!0),B(N,ie,ne,"↰","\\Lsh",!0),B(N,ie,ne,"⇈","\\upuparrows",!0),B(N,ie,ne,"↿","\\upharpoonleft",!0),B(N,ie,ne,"⇃","\\downharpoonleft",!0),B(N,Z,ne,"⊶","\\origof",!0),B(N,Z,ne,"⊷","\\imageof",!0),B(N,ie,ne,"⊸","\\multimap",!0),B(N,ie,ne,"↭","\\leftrightsquigarrow",!0),B(N,ie,ne,"⇉","\\rightrightarrows",!0),B(N,ie,ne,"⇄","\\rightleftarrows",!0),B(N,ie,ne,"↠","\\twoheadrightarrow",!0),B(N,ie,ne,"↣","\\rightarrowtail",!0),B(N,ie,ne,"↬","\\looparrowright",!0),B(N,ie,ne,"↷","\\curvearrowright",!0),B(N,ie,ne,"↻","\\circlearrowright",!0),B(N,ie,ne,"↱","\\Rsh",!0),B(N,ie,ne,"⇊","\\downdownarrows",!0),B(N,ie,ne,"↾","\\upharpoonright",!0),B(N,ie,ne,"⇂","\\downharpoonright",!0),B(N,ie,ne,"⇝","\\rightsquigarrow",!0),B(N,ie,ne,"⇝","\\leadsto"),B(N,ie,ne,"⇛","\\Rrightarrow",!0),B(N,ie,ne,"↾","\\restriction"),B(N,Z,he,"‘","`"),B(N,Z,he,"$","\\$"),B(Me,Z,he,"$","\\$"),B(Me,Z,he,"$","\\textdollar"),B(N,Z,he,"%","\\%"),B(Me,Z,he,"%","\\%"),B(N,Z,he,"_","\\_"),B(Me,Z,he,"_","\\_"),B(Me,Z,he,"_","\\textunderscore"),B(N,Z,he,"∠","\\angle",!0),B(N,Z,he,"∞","\\infty",!0),B(N,Z,he,"′","\\prime"),B(N,Z,he,"△","\\triangle"),B(N,Z,he,"Γ","\\Gamma",!0),B(N,Z,he,"Δ","\\Delta",!0),B(N,Z,he,"Θ","\\Theta",!0),B(N,Z,he,"Λ","\\Lambda",!0),B(N,Z,he,"Ξ","\\Xi",!0),B(N,Z,he,"Π","\\Pi",!0),B(N,Z,he,"Σ","\\Sigma",!0),B(N,Z,he,"Υ","\\Upsilon",!0),B(N,Z,he,"Φ","\\Phi",!0),B(N,Z,he,"Ψ","\\Psi",!0),B(N,Z,he,"Ω","\\Omega",!0),B(N,Z,he,"A","Α"),B(N,Z,he,"B","Β"),B(N,Z,he,"E","Ε"),B(N,Z,he,"Z","Ζ"),B(N,Z,he,"H","Η"),B(N,Z,he,"I","Ι"),B(N,Z,he,"K","Κ"),B(N,Z,he,"M","Μ"),B(N,Z,he,"N","Ν"),B(N,Z,he,"O","Ο"),B(N,Z,he,"P","Ρ"),B(N,Z,he,"T","Τ"),B(N,Z,he,"X","Χ"),B(N,Z,he,"¬","\\neg",!0),B(N,Z,he,"¬","\\lnot"),B(N,Z,he,"⊤","\\top"),B(N,Z,he,"⊥","\\bot"),B(N,Z,he,"∅","\\emptyset"),B(N,ie,he,"∅","\\varnothing"),B(N,Z,oe,"α","\\alpha",!0),B(N,Z,oe,"β","\\beta",!0),B(N,Z,oe,"γ","\\gamma",!0),B(N,Z,oe,"δ","\\delta",!0),B(N,Z,oe,"ϵ","\\epsilon",!0),B(N,Z,oe,"ζ","\\zeta",!0),B(N,Z,oe,"η","\\eta",!0),B(N,Z,oe,"θ","\\theta",!0),B(N,Z,oe,"ι","\\iota",!0),B(N,Z,oe,"κ","\\kappa",!0),B(N,Z,oe,"λ","\\lambda",!0),B(N,Z,oe,"μ","\\mu",!0),B(N,Z,oe,"ν","\\nu",!0),B(N,Z,oe,"ξ","\\xi",!0),B(N,Z,oe,"ο","\\omicron",!0),B(N,Z,oe,"π","\\pi",!0),B(N,Z,oe,"ρ","\\rho",!0),B(N,Z,oe,"σ","\\sigma",!0),B(N,Z,oe,"τ","\\tau",!0),B(N,Z,oe,"υ","\\upsilon",!0),B(N,Z,oe,"ϕ","\\phi",!0),B(N,Z,oe,"χ","\\chi",!0),B(N,Z,oe,"ψ","\\psi",!0),B(N,Z,oe,"ω","\\omega",!0),B(N,Z,oe,"ε","\\varepsilon",!0),B(N,Z,oe,"ϑ","\\vartheta",!0),B(N,Z,oe,"ϖ","\\varpi",!0),B(N,Z,oe,"ϱ","\\varrho",!0),B(N,Z,oe,"ς","\\varsigma",!0),B(N,Z,oe,"φ","\\varphi",!0),B(N,Z,je,"∗","*",!0),B(N,Z,je,"+","+"),B(N,Z,je,"−","-",!0),B(N,Z,je,"⋅","\\cdot",!0),B(N,Z,je,"∘","\\circ",!0),B(N,Z,je,"÷","\\div",!0),B(N,Z,je,"±","\\pm",!0),B(N,Z,je,"×","\\times",!0),B(N,Z,je,"∩","\\cap",!0),B(N,Z,je,"∪","\\cup",!0),B(N,Z,je,"∖","\\setminus",!0),B(N,Z,je,"∧","\\land"),B(N,Z,je,"∨","\\lor"),B(N,Z,je,"∧","\\wedge",!0),B(N,Z,je,"∨","\\vee",!0),B(N,Z,he,"√","\\surd"),B(N,Z,$e,"⟨","\\langle",!0),B(N,Z,$e,"∣","\\lvert"),B(N,Z,$e,"∥","\\lVert"),B(N,Z,qr,"?","?"),B(N,Z,qr,"!","!"),B(N,Z,qr,"⟩","\\rangle",!0),B(N,Z,qr,"∣","\\rvert"),B(N,Z,qr,"∥","\\rVert"),B(N,Z,ne,"=","="),B(N,Z,ne,":",":"),B(N,Z,ne,"≈","\\approx",!0),B(N,Z,ne,"≅","\\cong",!0),B(N,Z,ne,"≥","\\ge"),B(N,Z,ne,"≥","\\geq",!0),B(N,Z,ne,"←","\\gets"),B(N,Z,ne,">","\\gt",!0),B(N,Z,ne,"∈","\\in",!0),B(N,Z,ne,"","\\@not"),B(N,Z,ne,"⊂","\\subset",!0),B(N,Z,ne,"⊃","\\supset",!0),B(N,Z,ne,"⊆","\\subseteq",!0),B(N,Z,ne,"⊇","\\supseteq",!0),B(N,ie,ne,"⊈","\\nsubseteq",!0),B(N,ie,ne,"⊉","\\nsupseteq",!0),B(N,Z,ne,"⊨","\\models"),B(N,Z,ne,"←","\\leftarrow",!0),B(N,Z,ne,"≤","\\le"),B(N,Z,ne,"≤","\\leq",!0),B(N,Z,ne,"<","\\lt",!0),B(N,Z,ne,"→","\\rightarrow",!0),B(N,Z,ne,"→","\\to"),B(N,ie,ne,"≱","\\ngeq",!0),B(N,ie,ne,"≰","\\nleq",!0),B(N,Z,_r," ","\\ "),B(N,Z,_r," ","\\space"),B(N,Z,_r," ","\\nobreakspace"),B(Me,Z,_r," ","\\ "),B(Me,Z,_r," "," "),B(Me,Z,_r," ","\\space"),B(Me,Z,_r," ","\\nobreakspace"),B(N,Z,_r,null,"\\nobreak"),B(N,Z,_r,null,"\\allowbreak"),B(N,Z,Ht,",",","),B(N,Z,Ht,";",";"),B(N,ie,je,"⊼","\\barwedge",!0),B(N,ie,je,"⊻","\\veebar",!0),B(N,Z,je,"⊙","\\odot",!0),B(N,Z,je,"⊕","\\oplus",!0),B(N,Z,je,"⊗","\\otimes",!0),B(N,Z,he,"∂","\\partial",!0),B(N,Z,je,"⊘","\\oslash",!0),B(N,ie,je,"⊚","\\circledcirc",!0),B(N,ie,je,"⊡","\\boxdot",!0),B(N,Z,je,"△","\\bigtriangleup"),B(N,Z,je,"▽","\\bigtriangledown"),B(N,Z,je,"†","\\dagger"),B(N,Z,je,"⋄","\\diamond"),B(N,Z,je,"⋆","\\star"),B(N,Z,je,"◃","\\triangleleft"),B(N,Z,je,"▹","\\triangleright"),B(N,Z,$e,"{","\\{"),B(Me,Z,he,"{","\\{"),B(Me,Z,he,"{","\\textbraceleft"),B(N,Z,qr,"}","\\}"),B(Me,Z,he,"}","\\}"),B(Me,Z,he,"}","\\textbraceright"),B(N,Z,$e,"{","\\lbrace"),B(N,Z,qr,"}","\\rbrace"),B(N,Z,$e,"[","\\lbrack",!0),B(Me,Z,he,"[","\\lbrack",!0),B(N,Z,qr,"]","\\rbrack",!0),B(Me,Z,he,"]","\\rbrack",!0),B(N,Z,$e,"(","\\lparen",!0),B(N,Z,qr,")","\\rparen",!0),B(Me,Z,he,"<","\\textless",!0),B(Me,Z,he,">","\\textgreater",!0),B(N,Z,$e,"⌊","\\lfloor",!0),B(N,Z,qr,"⌋","\\rfloor",!0),B(N,Z,$e,"⌈","\\lceil",!0),B(N,Z,qr,"⌉","\\rceil",!0),B(N,Z,he,"\\","\\backslash"),B(N,Z,he,"∣","|"),B(N,Z,he,"∣","\\vert"),B(Me,Z,he,"|","\\textbar",!0),B(N,Z,he,"∥","\\|"),B(N,Z,he,"∥","\\Vert"),B(Me,Z,he,"∥","\\textbardbl"),B(Me,Z,he,"~","\\textasciitilde"),B(Me,Z,he,"\\","\\textbackslash"),B(Me,Z,he,"^","\\textasciicircum"),B(N,Z,ne,"↑","\\uparrow",!0),B(N,Z,ne,"⇑","\\Uparrow",!0),B(N,Z,ne,"↓","\\downarrow",!0),B(N,Z,ne,"⇓","\\Downarrow",!0),B(N,Z,ne,"↕","\\updownarrow",!0),B(N,Z,ne,"⇕","\\Updownarrow",!0),B(N,Z,ke,"∐","\\coprod"),B(N,Z,ke,"⋁","\\bigvee"),B(N,Z,ke,"⋀","\\bigwedge"),B(N,Z,ke,"⨄","\\biguplus"),B(N,Z,ke,"⋂","\\bigcap"),B(N,Z,ke,"⋃","\\bigcup"),B(N,Z,ke,"∫","\\int"),B(N,Z,ke,"∫","\\intop"),B(N,Z,ke,"∬","\\iint"),B(N,Z,ke,"∭","\\iiint"),B(N,Z,ke,"∏","\\prod"),B(N,Z,ke,"∑","\\sum"),B(N,Z,ke,"⨂","\\bigotimes"),B(N,Z,ke,"⨁","\\bigoplus"),B(N,Z,ke,"⨀","\\bigodot"),B(N,Z,ke,"∮","\\oint"),B(N,Z,ke,"∯","\\oiint"),B(N,Z,ke,"∰","\\oiiint"),B(N,Z,ke,"⨆","\\bigsqcup"),B(N,Z,ke,"∫","\\smallint"),B(Me,Z,at,"…","\\textellipsis"),B(N,Z,at,"…","\\mathellipsis"),B(Me,Z,at,"…","\\ldots",!0),B(N,Z,at,"…","\\ldots",!0),B(N,Z,at,"⋯","\\@cdots",!0),B(N,Z,at,"⋱","\\ddots",!0),B(N,Z,he,"⋮","\\varvdots"),B(N,Z,rr,"ˊ","\\acute"),B(N,Z,rr,"ˋ","\\grave"),B(N,Z,rr,"¨","\\ddot"),B(N,Z,rr,"~","\\tilde"),B(N,Z,rr,"ˉ","\\bar"),B(N,Z,rr,"˘","\\breve"),B(N,Z,rr,"ˇ","\\check"),B(N,Z,rr,"^","\\hat"),B(N,Z,rr,"⃗","\\vec"),B(N,Z,rr,"˙","\\dot"),B(N,Z,rr,"˚","\\mathring"),B(N,Z,oe,"","\\@imath"),B(N,Z,oe,"","\\@jmath"),B(N,Z,he,"ı","ı"),B(N,Z,he,"ȷ","ȷ"),B(Me,Z,he,"ı","\\i",!0),B(Me,Z,he,"ȷ","\\j",!0),B(Me,Z,he,"ß","\\ss",!0),B(Me,Z,he,"æ","\\ae",!0),B(Me,Z,he,"œ","\\oe",!0),B(Me,Z,he,"ø","\\o",!0),B(Me,Z,he,"Æ","\\AE",!0),B(Me,Z,he,"Œ","\\OE",!0),B(Me,Z,he,"Ø","\\O",!0),B(Me,Z,rr,"ˊ","\\'"),B(Me,Z,rr,"ˋ","\\`"),B(Me,Z,rr,"ˆ","\\^"),B(Me,Z,rr,"˜","\\~"),B(Me,Z,rr,"ˉ","\\="),B(Me,Z,rr,"˘","\\u"),B(Me,Z,rr,"˙","\\."),B(Me,Z,rr,"¸","\\c"),B(Me,Z,rr,"˚","\\r"),B(Me,Z,rr,"ˇ","\\v"),B(Me,Z,rr,"¨",'\\"'),B(Me,Z,rr,"˝","\\H"),B(Me,Z,rr,"◯","\\textcircled");var Kr={"--":!0,"---":!0,"``":!0,"''":!0};B(Me,Z,he,"–","--",!0),B(Me,Z,he,"–","\\textendash"),B(Me,Z,he,"—","---",!0),B(Me,Z,he,"—","\\textemdash"),B(Me,Z,he,"‘","`",!0),B(Me,Z,he,"‘","\\textquoteleft"),B(Me,Z,he,"’","'",!0),B(Me,Z,he,"’","\\textquoteright"),B(Me,Z,he,"“","``",!0),B(Me,Z,he,"“","\\textquotedblleft"),B(Me,Z,he,"”","''",!0),B(Me,Z,he,"”","\\textquotedblright"),B(N,Z,he,"°","\\degree",!0),B(Me,Z,he,"°","\\degree"),B(Me,Z,he,"°","\\textdegree",!0),B(N,Z,he,"£","\\pounds"),B(N,Z,he,"£","\\mathsterling",!0),B(Me,Z,he,"£","\\pounds"),B(Me,Z,he,"£","\\textsterling",!0),B(N,ie,he,"✠","\\maltese"),B(Me,ie,he,"✠","\\maltese");for(var Da='0123456789/@."',cs=0;csx&&(x=F.height),F.depth>S&&(S=F.depth),F.maxFontSize>A&&(A=F.maxFontSize)}_.height=x,_.depth=S,_.maxFontSize=A},Wr=function(_,x,S,A){var L=new Xn(_,x,S,A);return _f(L),L},Np=function(_,x,S,A){return new Xn(_,x,S,A)},E2=function(_,x,S){var A=Wr([_],[],x);return A.height=Math.max(S||x.fontMetrics().defaultRuleThickness,x.minRuleThickness),A.style.borderBottomWidth=Ve(A.height),A.maxFontSize=1,A},I2=function(_,x,S,A){var L=new us(_,x,S,A);return _f(L),L},zp=function(_){var x=new dr(_);return _f(x),x},B2=function(_,x){return _ instanceof dr?Wr([],[_],x):_},P2=function(_){if(_.positionType==="individualShift"){for(var x=_.children,S=[x[0]],A=-x[0].shift-x[0].elem.depth,L=A,F=1;F0&&(L.push(wh(F,_)),F=[]),L.push(S[Y]));F.length>0&&L.push(wh(F,_));var te;x?(te=wh(Mr(x,_,!0)),te.classes=["tag"],L.push(te)):A&&L.push(A);var le=Ti(["katex-html"],L);if(le.setAttribute("aria-hidden","true"),te){var me=te.children[0];me.style.height=Ve(le.height+le.depth),le.depth&&(me.style.verticalAlign=Ve(-le.depth))}return le}function Ch(R){return new dr(R)}var Zn=function(){function R(x,S,A){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=x,this.attributes={},this.children=S||[],this.classes=A||[]}var _=R.prototype;return _.setAttribute=function(S,A){this.attributes[S]=A},_.getAttribute=function(S){return this.attributes[S]},_.toNode=function(){var S=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var A in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,A)&&S.setAttribute(A,this.attributes[A]);this.classes.length>0&&(S.className=jr(this.classes));for(var L=0;L0&&(S+=' class ="'+y.escape(jr(this.classes))+'"'),S+=">";for(var L=0;L",S},_.toText=function(){return this.children.map(function(S){return S.toText()}).join("")},R}(),kl=function(){function R(x){this.text=void 0,this.text=x}var _=R.prototype;return _.toNode=function(){return document.createTextNode(this.text)},_.toMarkup=function(){return y.escape(this.toText())},_.toText=function(){return this.text},R}(),qp=function(){function R(x){this.width=void 0,this.character=void 0,this.width=x,x>=.05555&&x<=.05556?this.character=" ":x>=.1666&&x<=.1667?this.character=" ":x>=.2222&&x<=.2223?this.character=" ":x>=.2777&&x<=.2778?this.character="  ":x>=-.05556&&x<=-.05555?this.character=" ⁣":x>=-.1667&&x<=-.1666?this.character=" ⁣":x>=-.2223&&x<=-.2222?this.character=" ⁣":x>=-.2778&&x<=-.2777?this.character=" ⁣":this.character=null}var _=R.prototype;return _.toNode=function(){if(this.character)return document.createTextNode(this.character);var S=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return S.setAttribute("width",Ve(this.width)),S},_.toMarkup=function(){return this.character?""+this.character+"":''},_.toText=function(){return this.character?this.character:" "},R}(),Fe={MathNode:Zn,TextNode:kl,SpaceNode:qp,newDocumentFragment:Ch},En=function(_,x,S){return ar[x][_]&&ar[x][_].replace&&_.charCodeAt(0)!==55349&&!(Kr.hasOwnProperty(_)&&S&&(S.fontFamily&&S.fontFamily.slice(4,6)==="tt"||S.font&&S.font.slice(4,6)==="tt"))&&(_=ar[x][_].replace),new Fe.TextNode(_)},xf=function(_){return _.length===1?_[0]:new Fe.MathNode("mrow",_)},bf=function(_,x){if(x.fontFamily==="texttt")return"monospace";if(x.fontFamily==="textsf")return x.fontShape==="textit"&&x.fontWeight==="textbf"?"sans-serif-bold-italic":x.fontShape==="textit"?"sans-serif-italic":x.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(x.fontShape==="textit"&&x.fontWeight==="textbf")return"bold-italic";if(x.fontShape==="textit")return"italic";if(x.fontWeight==="textbf")return"bold";var S=x.font;if(!S||S==="mathnormal")return null;var A=_.mode;if(S==="mathit")return"italic";if(S==="boldsymbol")return _.type==="textord"?"bold":"bold-italic";if(S==="mathbf")return"bold";if(S==="mathbb")return"double-struck";if(S==="mathfrak")return"fraktur";if(S==="mathscr"||S==="mathcal")return"script";if(S==="mathsf")return"sans-serif";if(S==="mathtt")return"monospace";var L=_.text;if(y.contains(["\\imath","\\jmath"],L))return null;ar[A][L]&&ar[A][L].replace&&(L=ar[A][L].replace);var F=_e.fontMap[S].fontName;return tn(L,F,A)?_e.fontMap[S].variant:null},_n=function(_,x,S){if(_.length===1){var A=or(_[0],x);return S&&A instanceof Zn&&A.type==="mo"&&(A.setAttribute("lspace","0em"),A.setAttribute("rspace","0em")),[A]}for(var L=[],F,Y=0;Y<_.length;Y++){var Q=or(_[Y],x);if(Q instanceof Zn&&F instanceof Zn){if(Q.type==="mtext"&&F.type==="mtext"&&Q.getAttribute("mathvariant")===F.getAttribute("mathvariant")){var te;(te=F.children).push.apply(te,Q.children);continue}else if(Q.type==="mn"&&F.type==="mn"){var le;(le=F.children).push.apply(le,Q.children);continue}else if(Q.type==="mi"&&Q.children.length===1&&F.type==="mn"){var me=Q.children[0];if(me instanceof kl&&me.text==="."){var be;(be=F.children).push.apply(be,Q.children);continue}}else if(F.type==="mi"&&F.children.length===1){var we=F.children[0];if(we instanceof kl&&we.text==="̸"&&(Q.type==="mo"||Q.type==="mi"||Q.type==="mn")){var Te=Q.children[0];Te instanceof kl&&Te.text.length>0&&(Te.text=Te.text.slice(0,1)+"̸"+Te.text.slice(1),L.pop())}}}L.push(Q),F=Q}return L},Ea=function(_,x,S){return xf(_n(_,x,S))},or=function(_,x){if(!_)return new Fe.MathNode("mrow");if(bh[_.type]){var S=bh[_.type](_,x);return S}else throw new a("Got group of unknown type: '"+_.type+"'")};function Wp(R,_,x,S,A){var L=_n(R,x),F;L.length===1&&L[0]instanceof Zn&&y.contains(["mrow","mtable"],L[0].type)?F=L[0]:F=new Fe.MathNode("mrow",L);var Y=new Fe.MathNode("annotation",[new Fe.TextNode(_)]);Y.setAttribute("encoding","application/x-tex");var Q=new Fe.MathNode("semantics",[F,Y]),te=new Fe.MathNode("math",[Q]);te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),S&&te.setAttribute("display","block");var le=A?"katex":"katex-mathml";return _e.makeSpan([le],[te])}var Up=function(_){return new xo({style:_.displayMode?de.DISPLAY:de.TEXT,maxSize:_.maxSize,minRuleThickness:_.minRuleThickness})},Yp=function(_,x){if(x.displayMode){var S=["katex-display"];x.leqno&&S.push("leqno"),x.fleqn&&S.push("fleqn"),_=_e.makeSpan(S,[_])}return _},$2=function(_,x,S){var A=Up(S),L;if(S.output==="mathml")return Wp(_,x,A,S.displayMode,!0);if(S.output==="html"){var F=Tl(_,A);L=_e.makeSpan(["katex"],[F])}else{var Y=Wp(_,x,A,S.displayMode,!1),Q=Tl(_,A);L=_e.makeSpan(["katex"],[Y,Q])}return Yp(L,S)},G2=function(_,x,S){var A=Up(S),L=Tl(_,A),F=_e.makeSpan(["katex"],[L]);return Yp(F,S)},H2={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Br=function(_){var x=new Fe.MathNode("mo",[new Fe.TextNode(H2[_.replace(/^\\/,"")])]);return x.setAttribute("stretchy","true"),x},Xp={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]},Dl=function(_){return _.type==="ordgroup"?_.body.length:1},an=function(_,x){function S(){var Q=4e5,te=_.label.slice(1);if(y.contains(["widehat","widecheck","widetilde","utilde"],te)){var le=_,me=Dl(le.base),be,we,Te;if(me>5)te==="widehat"||te==="widecheck"?(be=420,Q=2364,Te=.42,we=te+"4"):(be=312,Q=2340,Te=.34,we="tilde4");else{var Ne=[1,1,2,2,3,3][me];te==="widehat"||te==="widecheck"?(Q=[0,1062,2364,2364,2364][Ne],be=[0,239,300,360,420][Ne],Te=[0,.24,.3,.3,.36,.42][Ne],we=te+Ne):(Q=[0,600,1033,2339,2340][Ne],be=[0,260,286,306,312][Ne],Te=[0,.26,.286,.3,.306,.34][Ne],we="tilde"+Ne)}var We=new ci(we),tt=new gn([We],{width:"100%",height:Ve(Te),viewBox:"0 0 "+Q+" "+be,preserveAspectRatio:"none"});return{span:_e.makeSvgSpan([],[tt],x),minWidth:0,height:Te}}else{var ut=[],mt=Xp[te],qt=mt[0],Et=mt[1],Qt=mt[2],Ut=Qt/1e3,tr=qt.length,cr,br;if(tr===1){var In=mt[3];cr=["hide-tail"],br=[In]}else if(tr===2)cr=["halfarrow-left","halfarrow-right"],br=["xMinYMin","xMaxYMin"];else if(tr===3)cr=["brace-left","brace-center","brace-right"],br=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+tr+" children.");for(var gr=0;gr0&&(L.style.minWidth=Ve(F)),L},Sf=function(_,x,S,A,L){var F,Y=_.height+_.depth+S+A;if(/fbox|color|angl/.test(x)){if(F=_e.makeSpan(["stretchy",x],[],L),x==="fbox"){var Q=L.color&&L.getColor();Q&&(F.style.borderColor=Q)}}else{var te=[];/^[bx]cancel$/.test(x)&&te.push(new mn({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(x)&&te.push(new mn({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var le=new gn(te,{width:"100%",height:Ve(Y)});F=_e.makeSvgSpan([],[le],L)}return F.height=Y,F.style.height=Ve(Y),F},di={encloseSpan:Sf,mathMLnode:Br,svgSpan:an};function It(R,_){if(!R||R.type!==_)throw new Error("Expected node of type "+_+", but got "+(R?"node of type "+R.type:String(R)));return R}function wf(R){var _=Ah(R);if(!_)throw new Error("Expected node of symbol group type, but got "+(R?"node of type "+R.type:String(R)));return _}function Ah(R){return R&&(R.type==="atom"||xl.hasOwnProperty(R.type))?R:null}var Cf=function(_,x){var S,A,L;_&&_.type==="supsub"?(A=It(_.base,"accent"),S=A.base,_.base=S,L=gf(Wt(_,x)),_.base=A):(A=It(_,"accent"),S=A.base);var F=Wt(S,x.havingCrampedStyle()),Y=A.isShifty&&y.isCharacterBox(S),Q=0;if(Y){var te=y.getBaseElem(S),le=Wt(te,x.havingCrampedStyle());Q=hs(le).skew}var me=A.label==="\\c",be=me?F.height+F.depth:Math.min(F.height,x.fontMetrics().xHeight),we;if(A.isStretchy)we=di.svgSpan(A,x),we=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:F},{type:"elem",elem:we,wrapperClasses:["svg-align"],wrapperStyle:Q>0?{width:"calc(100% - "+Ve(2*Q)+")",marginLeft:Ve(2*Q)}:void 0}]},x);else{var Te,Ne;A.label==="\\vec"?(Te=_e.staticSvg("vec",x),Ne=_e.svgData.vec[1]):(Te=_e.makeOrd({mode:A.mode,text:A.label},x,"textord"),Te=hs(Te),Te.italic=0,Ne=Te.width,me&&(be+=Te.depth)),we=_e.makeSpan(["accent-body"],[Te]);var We=A.label==="\\textcircled";We&&(we.classes.push("accent-full"),be=F.height);var tt=Q;We||(tt-=Ne/2),we.style.left=Ve(tt),A.label==="\\textcircled"&&(we.style.top=".2em"),we=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:F},{type:"kern",size:-be},{type:"elem",elem:we}]},x)}var ut=_e.makeSpan(["mord","accent"],[we],x);return L?(L.children[0]=ut,L.height=Math.max(ut.height,L.height),L.classes[0]="mord",L):ut},Zp=function(_,x){var S=_.isStretchy?di.mathMLnode(_.label):new Fe.MathNode("mo",[En(_.label,_.mode)]),A=new Fe.MathNode("mover",[or(_.base,x),S]);return A.setAttribute("accent","true"),A},q2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(R){return"\\"+R}).join("|"));Xe({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:function(_,x){var S=Sh(x[0]),A=!q2.test(_.funcName),L=!A||_.funcName==="\\widehat"||_.funcName==="\\widetilde"||_.funcName==="\\widecheck";return{type:"accent",mode:_.parser.mode,label:_.funcName,isStretchy:A,isShifty:L,base:S}},htmlBuilder:Cf,mathmlBuilder:Zp}),Xe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(_,x){var S=x[0],A=_.parser.mode;return A==="math"&&(_.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+_.funcName+" works only in text mode"),A="text"),{type:"accent",mode:A,label:_.funcName,isStretchy:!1,isShifty:!0,base:S}},htmlBuilder:Cf,mathmlBuilder:Zp}),Xe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"accentUnder",mode:S.mode,label:A,base:L}},htmlBuilder:function(_,x){var S=Wt(_.base,x),A=di.svgSpan(_,x),L=_.label==="\\utilde"?.12:0,F=_e.makeVList({positionType:"top",positionData:S.height,children:[{type:"elem",elem:A,wrapperClasses:["svg-align"]},{type:"kern",size:L},{type:"elem",elem:S}]},x);return _e.makeSpan(["mord","accentunder"],[F],x)},mathmlBuilder:function(_,x){var S=di.mathMLnode(_.label),A=new Fe.MathNode("munder",[or(_.base,x),S]);return A.setAttribute("accentunder","true"),A}});var Lr=function(_){var x=new Fe.MathNode("mpadded",_?[_]:[]);return x.setAttribute("width","+0.6em"),x.setAttribute("lspace","0.3em"),x};Xe({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:function(_,x,S){var A=_.parser,L=_.funcName;return{type:"xArrow",mode:A.mode,label:L,body:x[0],below:S[0]}},htmlBuilder:function(_,x){var S=x.style,A=x.havingStyle(S.sup()),L=_e.wrapFragment(Wt(_.body,A,x),x),F=_.label.slice(0,2)==="\\x"?"x":"cd";L.classes.push(F+"-arrow-pad");var Y;_.below&&(A=x.havingStyle(S.sub()),Y=_e.wrapFragment(Wt(_.below,A,x),x),Y.classes.push(F+"-arrow-pad"));var Q=di.svgSpan(_,x),te=-x.fontMetrics().axisHeight+.5*Q.height,le=-x.fontMetrics().axisHeight-.5*Q.height-.111;(L.depth>.25||_.label==="\\xleftequilibrium")&&(le-=L.depth);var me;if(Y){var be=-x.fontMetrics().axisHeight+Y.height+.5*Q.height+.111;me=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:L,shift:le},{type:"elem",elem:Q,shift:te},{type:"elem",elem:Y,shift:be}]},x)}else me=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:L,shift:le},{type:"elem",elem:Q,shift:te}]},x);return me.children[0].children[0].children[1].classes.push("svg-align"),_e.makeSpan(["mrel","x-arrow"],[me],x)},mathmlBuilder:function(_,x){var S=di.mathMLnode(_.label);S.setAttribute("minsize",_.label.charAt(0)==="x"?"1.75em":"3.0em");var A;if(_.body){var L=Lr(or(_.body,x));if(_.below){var F=Lr(or(_.below,x));A=new Fe.MathNode("munderover",[S,F,L])}else A=new Fe.MathNode("mover",[S,L])}else if(_.below){var Y=Lr(or(_.below,x));A=new Fe.MathNode("munder",[S,Y])}else A=Lr(),A=new Fe.MathNode("mover",[S,A]);return A}});var jp=_e.makeSpan;function Kp(R,_){var x=Mr(R.body,_,!0);return jp([R.mclass],x,_)}function Th(R,_){var x,S=_n(R.body,_);return R.mclass==="minner"?x=new Fe.MathNode("mpadded",S):R.mclass==="mord"?R.isCharacterBox?(x=S[0],x.type="mi"):x=new Fe.MathNode("mi",S):(R.isCharacterBox?(x=S[0],x.type="mo"):x=new Fe.MathNode("mo",S),R.mclass==="mbin"?(x.attributes.lspace="0.22em",x.attributes.rspace="0.22em"):R.mclass==="mpunct"?(x.attributes.lspace="0em",x.attributes.rspace="0.17em"):R.mclass==="mopen"||R.mclass==="mclose"?(x.attributes.lspace="0em",x.attributes.rspace="0em"):R.mclass==="minner"&&(x.attributes.lspace="0.0556em",x.attributes.width="+0.1111em")),x}Xe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"mclass",mode:S.mode,mclass:"m"+A.slice(5),body:Tr(L),isCharacterBox:y.isCharacterBox(L)}},htmlBuilder:Kp,mathmlBuilder:Th});var Ml=function(_){var x=_.type==="ordgroup"&&_.body.length?_.body[0]:_;return x.type==="atom"&&(x.family==="bin"||x.family==="rel")?"m"+x.family:"mord"};Xe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(_,x){var S=_.parser;return{type:"mclass",mode:S.mode,mclass:Ml(x[0]),body:Tr(x[1]),isCharacterBox:y.isCharacterBox(x[1])}}}),Xe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[1],F=x[0],Y;A!=="\\stackrel"?Y=Ml(L):Y="mrel";var Q={type:"op",mode:L.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:A!=="\\stackrel",body:Tr(L)},te={type:"supsub",mode:F.mode,base:Q,sup:A==="\\underset"?null:F,sub:A==="\\underset"?F:null};return{type:"mclass",mode:S.mode,mclass:Y,body:[te],isCharacterBox:y.isCharacterBox(te)}},htmlBuilder:Kp,mathmlBuilder:Th}),Xe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){var S=_.parser;return{type:"pmb",mode:S.mode,mclass:Ml(x[0]),body:Tr(x[0])}},htmlBuilder:function(_,x){var S=Mr(_.body,x,!0),A=_e.makeSpan([_.mclass],S,x);return A.style.textShadow="0.02em 0.01em 0.04px",A},mathmlBuilder:function(_,x){var S=_n(_.body,x),A=new Fe.MathNode("mstyle",S);return A.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),A}});var Jp={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Af=function(){return{type:"styling",body:[],mode:"math",style:"display"}},Tf=function(_){return _.type==="textord"&&_.text==="@"},Qp=function(_,x){return(_.type==="mathord"||_.type==="atom")&&_.text===x};function W2(R,_,x){var S=Jp[R];switch(S){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return x.callFunction(S,[_[0]],[_[1]]);case"\\uparrow":case"\\downarrow":{var A=x.callFunction("\\\\cdleft",[_[0]],[]),L={type:"atom",text:S,mode:"math",family:"rel"},F=x.callFunction("\\Big",[L],[]),Y=x.callFunction("\\\\cdright",[_[1]],[]),Q={type:"ordgroup",mode:"math",body:[A,F,Y]};return x.callFunction("\\\\cdparent",[Q],[])}case"\\\\cdlongequal":return x.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var te={type:"textord",text:"\\Vert",mode:"math"};return x.callFunction("\\Big",[te],[])}default:return{type:"textord",text:" ",mode:"math"}}}function U2(R){var _=[];for(R.gullet.beginGroup(),R.gullet.macros.set("\\cr","\\\\\\relax"),R.gullet.beginGroup();;){_.push(R.parseExpression(!1,"\\\\")),R.gullet.endGroup(),R.gullet.beginGroup();var x=R.fetch().text;if(x==="&"||x==="\\\\")R.consume();else if(x==="\\end"){_[_.length-1].length===0&&_.pop();break}else throw new a("Expected \\\\ or \\cr or \\end",R.nextToken)}for(var S=[],A=[S],L=0;L<_.length;L++){for(var F=_[L],Y=Af(),Q=0;Q-1))if("<>AV".indexOf(te)>-1)for(var me=0;me<2;me++){for(var be=!0,we=Q+1;weAV=|." after @',F[Q]);var Te=W2(te,le,R),Ne={type:"styling",body:[Te],mode:"math",style:"display"};S.push(Ne),Y=Af()}L%2===0?S.push(Y):S.shift(),S=[],A.push(S)}R.gullet.endGroup(),R.gullet.endGroup();var We=new Array(A[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:A,arraystretch:1,addJot:!0,rowGaps:[null],cols:We,colSeparationType:"CD",hLinesBeforeRow:new Array(A.length+1).fill([])}}Xe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName;return{type:"cdlabel",mode:S.mode,side:A.slice(4),label:x[0]}},htmlBuilder:function(_,x){var S=x.havingStyle(x.style.sup()),A=_e.wrapFragment(Wt(_.label,S,x),x);return A.classes.push("cd-label-"+_.side),A.style.bottom=Ve(.8-A.depth),A.height=0,A.depth=0,A},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mrow",[or(_.label,x)]);return S=new Fe.MathNode("mpadded",[S]),S.setAttribute("width","0"),_.side==="left"&&S.setAttribute("lspace","-1width"),S.setAttribute("voffset","0.7em"),S=new Fe.MathNode("mstyle",[S]),S.setAttribute("displaystyle","false"),S.setAttribute("scriptlevel","1"),S}}),Xe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(_,x){var S=_.parser;return{type:"cdlabelparent",mode:S.mode,fragment:x[0]}},htmlBuilder:function(_,x){var S=_e.wrapFragment(Wt(_.fragment,x),x);return S.classes.push("cd-vert-arrow"),S},mathmlBuilder:function(_,x){return new Fe.MathNode("mrow",[or(_.fragment,x)])}}),Xe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){for(var S=_.parser,A=It(x[0],"ordgroup"),L=A.body,F="",Y=0;Y=1114111)throw new a("\\@char with invalid code point "+F);return te<=65535?le=String.fromCharCode(te):(te-=65536,le=String.fromCharCode((te>>10)+55296,(te&1023)+56320)),{type:"textord",mode:S.mode,text:le}}});var ev=function(_,x){var S=Mr(_.body,x.withColor(_.color),!1);return _e.makeFragment(S)},kf=function(_,x){var S=_n(_.body,x.withColor(_.color)),A=new Fe.MathNode("mstyle",S);return A.setAttribute("mathcolor",_.color),A};Xe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(_,x){var S=_.parser,A=It(x[0],"color-token").color,L=x[1];return{type:"color",mode:S.mode,color:A,body:Tr(L)}},htmlBuilder:ev,mathmlBuilder:kf}),Xe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(_,x){var S=_.parser,A=_.breakOnTokenText,L=It(x[0],"color-token").color;S.gullet.macros.set("\\current@color",L);var F=S.parseExpression(!0,A);return{type:"color",mode:S.mode,color:L,body:F}},htmlBuilder:ev,mathmlBuilder:kf}),Xe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler:function(_,x,S){var A=_.parser,L=A.gullet.future().text==="["?A.parseSizeGroup(!0):null,F=!A.settings.displayMode||!A.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:A.mode,newLine:F,size:L&&It(L,"size").value}},htmlBuilder:function(_,x){var S=_e.makeSpan(["mspace"],[],x);return _.newLine&&(S.classes.push("newline"),_.size&&(S.style.marginTop=Ve(ir(_.size,x)))),S},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mspace");return _.newLine&&(S.setAttribute("linebreak","newline"),_.size&&S.setAttribute("height",Ve(ir(_.size,x)))),S}});var Df={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},tv=function(_){var x=_.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(x))throw new a("Expected a control sequence",_);return x},Y2=function(_){var x=_.gullet.popToken();return x.text==="="&&(x=_.gullet.popToken(),x.text===" "&&(x=_.gullet.popToken())),x},Mf=function(_,x,S,A){var L=_.gullet.macros.get(S.text);L==null&&(S.noexpand=!0,L={tokens:[S],numArgs:0,unexpandable:!_.gullet.isExpandable(S.text)}),_.gullet.macros.set(x,L,A)};Xe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(_){var x=_.parser,S=_.funcName;x.consumeSpaces();var A=x.fetch();if(Df[A.text])return(S==="\\global"||S==="\\\\globallong")&&(A.text=Df[A.text]),It(x.parseFunction(),"internal");throw new a("Invalid token after macro prefix",A)}}),Xe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_){var x=_.parser,S=_.funcName,A=x.gullet.popToken(),L=A.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(L))throw new a("Expected a control sequence",A);for(var F=0,Y,Q=[[]];x.gullet.future().text!=="{";)if(A=x.gullet.popToken(),A.text==="#"){if(x.gullet.future().text==="{"){Y=x.gullet.future(),Q[F].push("{");break}if(A=x.gullet.popToken(),!/^[1-9]$/.test(A.text))throw new a('Invalid argument number "'+A.text+'"');if(parseInt(A.text)!==F+1)throw new a('Argument number "'+A.text+'" out of order');F++,Q.push([])}else{if(A.text==="EOF")throw new a("Expected a macro definition");Q[F].push(A.text)}var te=x.gullet.consumeArg(),le=te.tokens;return Y&&le.unshift(Y),(S==="\\edef"||S==="\\xdef")&&(le=x.gullet.expandTokens(le),le.reverse()),x.gullet.macros.set(L,{tokens:le,numArgs:F,delimiters:Q},S===Df[S]),{type:"internal",mode:x.mode}}}),Xe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_){var x=_.parser,S=_.funcName,A=tv(x.gullet.popToken());x.gullet.consumeSpaces();var L=Y2(x);return Mf(x,A,L,S==="\\\\globallet"),{type:"internal",mode:x.mode}}}),Xe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_){var x=_.parser,S=_.funcName,A=tv(x.gullet.popToken()),L=x.gullet.popToken(),F=x.gullet.popToken();return Mf(x,A,F,S==="\\\\globalfuture"),x.gullet.pushToken(F),x.gullet.pushToken(L),{type:"internal",mode:x.mode}}});var Ll=function(_,x,S){var A=ar.math[_]&&ar.math[_].replace,L=tn(A||_,x,S);if(!L)throw new Error("Unsupported symbol "+_+" and font size "+x+".");return L},Lf=function(_,x,S,A){var L=S.havingBaseStyle(x),F=_e.makeSpan(A.concat(L.sizingClasses(S)),[_],S),Y=L.sizeMultiplier/S.sizeMultiplier;return F.height*=Y,F.depth*=Y,F.maxFontSize=L.sizeMultiplier,F},rv=function(_,x,S){var A=x.havingBaseStyle(S),L=(1-x.sizeMultiplier/A.sizeMultiplier)*x.fontMetrics().axisHeight;_.classes.push("delimcenter"),_.style.top=Ve(L),_.height-=L,_.depth+=L},X2=function(_,x,S,A,L,F){var Y=_e.makeSymbol(_,"Main-Regular",L,A),Q=Lf(Y,x,A,F);return S&&rv(Q,A,x),Q},Z2=function(_,x,S,A){return _e.makeSymbol(_,"Size"+x+"-Regular",S,A)},nv=function(_,x,S,A,L,F){var Y=Z2(_,x,L,A),Q=Lf(_e.makeSpan(["delimsizing","size"+x],[Y],A),de.TEXT,A,F);return S&&rv(Q,A,de.TEXT),Q},kh=function(_,x,S){var A;x==="Size1-Regular"?A="delim-size1":A="delim-size4";var L=_e.makeSpan(["delimsizinginner",A],[_e.makeSpan([],[_e.makeSymbol(_,x,S)])]);return{type:"elem",elem:L}},Ef=function(_,x,S){var A=Kt["Size4-Regular"][_.charCodeAt(0)]?Kt["Size4-Regular"][_.charCodeAt(0)][4]:Kt["Size1-Regular"][_.charCodeAt(0)][4],L=new ci("inner",Zt(_,Math.round(1e3*x))),F=new gn([L],{width:Ve(A),height:Ve(x),style:"width:"+Ve(A),viewBox:"0 0 "+1e3*A+" "+Math.round(1e3*x),preserveAspectRatio:"xMinYMin"}),Y=_e.makeSvgSpan([],[F],S);return Y.height=x,Y.style.height=Ve(x),Y.style.width=Ve(A),{type:"elem",elem:Y}},If=.008,Dh={type:"kern",size:-1*If},j2=["|","\\lvert","\\rvert","\\vert"],K2=["\\|","\\lVert","\\rVert","\\Vert"],iv=function(_,x,S,A,L,F){var Y,Q,te,le,me="",be=0;Y=te=le=_,Q=null;var we="Size1-Regular";_==="\\uparrow"?te=le="⏐":_==="\\Uparrow"?te=le="‖":_==="\\downarrow"?Y=te="⏐":_==="\\Downarrow"?Y=te="‖":_==="\\updownarrow"?(Y="\\uparrow",te="⏐",le="\\downarrow"):_==="\\Updownarrow"?(Y="\\Uparrow",te="‖",le="\\Downarrow"):y.contains(j2,_)?(te="∣",me="vert",be=333):y.contains(K2,_)?(te="∥",me="doublevert",be=556):_==="["||_==="\\lbrack"?(Y="⎡",te="⎢",le="⎣",we="Size4-Regular",me="lbrack",be=667):_==="]"||_==="\\rbrack"?(Y="⎤",te="⎥",le="⎦",we="Size4-Regular",me="rbrack",be=667):_==="\\lfloor"||_==="⌊"?(te=Y="⎢",le="⎣",we="Size4-Regular",me="lfloor",be=667):_==="\\lceil"||_==="⌈"?(Y="⎡",te=le="⎢",we="Size4-Regular",me="lceil",be=667):_==="\\rfloor"||_==="⌋"?(te=Y="⎥",le="⎦",we="Size4-Regular",me="rfloor",be=667):_==="\\rceil"||_==="⌉"?(Y="⎤",te=le="⎥",we="Size4-Regular",me="rceil",be=667):_==="("||_==="\\lparen"?(Y="⎛",te="⎜",le="⎝",we="Size4-Regular",me="lparen",be=875):_===")"||_==="\\rparen"?(Y="⎞",te="⎟",le="⎠",we="Size4-Regular",me="rparen",be=875):_==="\\{"||_==="\\lbrace"?(Y="⎧",Q="⎨",le="⎩",te="⎪",we="Size4-Regular"):_==="\\}"||_==="\\rbrace"?(Y="⎫",Q="⎬",le="⎭",te="⎪",we="Size4-Regular"):_==="\\lgroup"||_==="⟮"?(Y="⎧",le="⎩",te="⎪",we="Size4-Regular"):_==="\\rgroup"||_==="⟯"?(Y="⎫",le="⎭",te="⎪",we="Size4-Regular"):_==="\\lmoustache"||_==="⎰"?(Y="⎧",le="⎭",te="⎪",we="Size4-Regular"):(_==="\\rmoustache"||_==="⎱")&&(Y="⎫",le="⎩",te="⎪",we="Size4-Regular");var Te=Ll(Y,we,L),Ne=Te.height+Te.depth,We=Ll(te,we,L),tt=We.height+We.depth,ut=Ll(le,we,L),mt=ut.height+ut.depth,qt=0,Et=1;if(Q!==null){var Qt=Ll(Q,we,L);qt=Qt.height+Qt.depth,Et=2}var Ut=Ne+mt+qt,tr=Math.max(0,Math.ceil((x-Ut)/(Et*tt))),cr=Ut+tr*Et*tt,br=A.fontMetrics().axisHeight;S&&(br*=A.sizeMultiplier);var In=cr/2-br,gr=[];if(me.length>0){var Fa=cr-Ne-mt,Bn=Math.round(cr*1e3),sn=Ar(me,Math.round(Fa*1e3)),ra=new ci(me,sn),ys=(be/1e3).toFixed(3)+"em",_s=(Bn/1e3).toFixed(3)+"em",Hh=new gn([ra],{width:ys,height:_s,viewBox:"0 0 "+be+" "+Bn}),Oa=_e.makeSvgSpan([],[Hh],A);Oa.height=Bn/1e3,Oa.style.width=ys,Oa.style.height=_s,gr.push({type:"elem",elem:Oa})}else{if(gr.push(kh(le,we,L)),gr.push(Dh),Q===null){var Na=cr-Ne-mt+2*If;gr.push(Ef(te,Na,A))}else{var Pn=(cr-Ne-mt-qt)/2+2*If;gr.push(Ef(te,Pn,A)),gr.push(Dh),gr.push(kh(Q,we,L)),gr.push(Dh),gr.push(Ef(te,Pn,A))}gr.push(Dh),gr.push(kh(Y,we,L))}var Rn=A.havingBaseStyle(de.TEXT),Xf=_e.makeVList({positionType:"bottom",positionData:In,children:gr},Rn);return Lf(_e.makeSpan(["delimsizing","mult"],[Xf],Rn),de.TEXT,A,F)},Mh=80,Lh=.08,Eh=function(_,x,S,A,L){var F=ht(_,A,S),Y=new ci(_,F),Q=new gn([Y],{width:"400em",height:Ve(x),viewBox:"0 0 400000 "+S,preserveAspectRatio:"xMinYMin slice"});return _e.makeSvgSpan(["hide-tail"],[Q],L)},av=function(_,x){var S=x.havingBaseSizing(),A=uv("\\surd",_*S.sizeMultiplier,Ih,S),L=S.sizeMultiplier,F=Math.max(0,x.minRuleThickness-x.fontMetrics().sqrtRuleThickness),Y,Q=0,te=0,le=0,me;return A.type==="small"?(le=1e3+1e3*F+Mh,_<1?L=1:_<1.4&&(L=.7),Q=(1+F+Lh)/L,te=(1+F)/L,Y=Eh("sqrtMain",Q,le,F,x),Y.style.minWidth="0.853em",me=.833/L):A.type==="large"?(le=(1e3+Mh)*El[A.size],te=(El[A.size]+F)/L,Q=(El[A.size]+F+Lh)/L,Y=Eh("sqrtSize"+A.size,Q,le,F,x),Y.style.minWidth="1.02em",me=1/L):(Q=_+F+Lh,te=_+F,le=Math.floor(1e3*_+F)+Mh,Y=Eh("sqrtTall",Q,le,F,x),Y.style.minWidth="0.742em",me=1.056),Y.height=te,Y.style.height=Ve(Q),{span:Y,advanceWidth:me,ruleWidth:(x.fontMetrics().sqrtRuleThickness+F)*L}},Bf=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],J2=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ov=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],El=[0,1.2,1.8,2.4,3],sv=function(_,x,S,A,L){if(_==="<"||_==="\\lt"||_==="⟨"?_="\\langle":(_===">"||_==="\\gt"||_==="⟩")&&(_="\\rangle"),y.contains(Bf,_)||y.contains(ov,_))return nv(_,x,!1,S,A,L);if(y.contains(J2,_))return iv(_,El[x],!1,S,A,L);throw new a("Illegal delimiter: '"+_+"'")},Q2=[{type:"small",style:de.SCRIPTSCRIPT},{type:"small",style:de.SCRIPT},{type:"small",style:de.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],lv=[{type:"small",style:de.SCRIPTSCRIPT},{type:"small",style:de.SCRIPT},{type:"small",style:de.TEXT},{type:"stack"}],Ih=[{type:"small",style:de.SCRIPTSCRIPT},{type:"small",style:de.SCRIPT},{type:"small",style:de.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],e_=function(_){if(_.type==="small")return"Main-Regular";if(_.type==="large")return"Size"+_.size+"-Regular";if(_.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+_.type+"' here.")},uv=function(_,x,S,A){for(var L=Math.min(2,3-A.style.size),F=L;Fx)return S[F]}return S[S.length-1]},hv=function(_,x,S,A,L,F){_==="<"||_==="\\lt"||_==="⟨"?_="\\langle":(_===">"||_==="\\gt"||_==="⟩")&&(_="\\rangle");var Y;y.contains(ov,_)?Y=Q2:y.contains(Bf,_)?Y=Ih:Y=lv;var Q=uv(_,x,Y,A);return Q.type==="small"?X2(_,Q.style,S,A,L,F):Q.type==="large"?nv(_,Q.size,S,A,L,F):iv(_,x,S,A,L,F)},t_=function(_,x,S,A,L,F){var Y=A.fontMetrics().axisHeight*A.sizeMultiplier,Q=901,te=5/A.fontMetrics().ptPerEm,le=Math.max(x-Y,S+Y),me=Math.max(le/500*Q,2*le-te);return hv(_,me,!0,A,L,F)},ki={sqrtImage:av,sizedDelim:sv,sizeToMaxHeight:El,customSizedDelim:hv,leftRightDelim:t_},cv={"\\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}},r_=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Bh(R,_){var x=Ah(R);if(x&&y.contains(r_,x.text))return x;throw x?new a("Invalid delimiter '"+x.text+"' after '"+_.funcName+"'",R):new a("Invalid delimiter type '"+R.type+"'",R)}Xe({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:function(_,x){var S=Bh(x[0],_);return{type:"delimsizing",mode:_.parser.mode,size:cv[_.funcName].size,mclass:cv[_.funcName].mclass,delim:S.text}},htmlBuilder:function(_,x){return _.delim==="."?_e.makeSpan([_.mclass]):ki.sizedDelim(_.delim,_.size,x,_.mode,[_.mclass])},mathmlBuilder:function(_){var x=[];_.delim!=="."&&x.push(En(_.delim,_.mode));var S=new Fe.MathNode("mo",x);_.mclass==="mopen"||_.mclass==="mclose"?S.setAttribute("fence","true"):S.setAttribute("fence","false"),S.setAttribute("stretchy","true");var A=Ve(ki.sizeToMaxHeight[_.size]);return S.setAttribute("minsize",A),S.setAttribute("maxsize",A),S}});function fv(R){if(!R.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Xe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(_,x){var S=_.parser.gullet.macros.get("\\current@color");if(S&&typeof S!="string")throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:_.parser.mode,delim:Bh(x[0],_).text,color:S}}}),Xe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(_,x){var S=Bh(x[0],_),A=_.parser;++A.leftrightDepth;var L=A.parseExpression(!1);--A.leftrightDepth,A.expect("\\right",!1);var F=It(A.parseFunction(),"leftright-right");return{type:"leftright",mode:A.mode,body:L,left:S.text,right:F.delim,rightColor:F.color}},htmlBuilder:function(_,x){fv(_);for(var S=Mr(_.body,x,!0,["mopen","mclose"]),A=0,L=0,F=!1,Y=0;Y-1?"mpadded":"menclose",[or(_.body,x)]);switch(_.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(S=x.fontMetrics().fboxsep*x.fontMetrics().ptPerEm,A.setAttribute("width","+"+2*S+"pt"),A.setAttribute("height","+"+2*S+"pt"),A.setAttribute("lspace",S+"pt"),A.setAttribute("voffset",S+"pt"),_.label==="\\fcolorbox"){var L=Math.max(x.fontMetrics().fboxrule,x.minRuleThickness);A.setAttribute("style","border: "+L+"em solid "+String(_.borderColor))}break;case"\\xcancel":A.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return _.backgroundColor&&A.setAttribute("mathbackground",_.backgroundColor),A};Xe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(_,x,S){var A=_.parser,L=_.funcName,F=It(x[0],"color-token").color,Y=x[1];return{type:"enclose",mode:A.mode,label:L,backgroundColor:F,body:Y}},htmlBuilder:Ph,mathmlBuilder:Pf}),Xe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(_,x,S){var A=_.parser,L=_.funcName,F=It(x[0],"color-token").color,Y=It(x[1],"color-token").color,Q=x[2];return{type:"enclose",mode:A.mode,label:L,backgroundColor:Y,borderColor:F,body:Q}},htmlBuilder:Ph,mathmlBuilder:Pf}),Xe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(_,x){var S=_.parser;return{type:"enclose",mode:S.mode,label:"\\fbox",body:x[0]}}}),Xe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"enclose",mode:S.mode,label:A,body:L}},htmlBuilder:Ph,mathmlBuilder:Pf}),Xe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(_,x){var S=_.parser;return{type:"enclose",mode:S.mode,label:"\\angl",body:x[0]}}});var dv={};function Di(R){for(var _=R.type,x=R.names,S=R.props,A=R.handler,L=R.htmlBuilder,F=R.mathmlBuilder,Y={type:_,numArgs:S.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:A},Q=0;Q1||!le)&&Ne.pop(),tt.length0&&(mt+=.25),te.push({pos:mt,isDashed:Wh[Uh]})}for(qt(F[0]),S=0;S<_.body.length;++S){var Et=_.body[S],Qt=tt,Ut=ut;Y0&&(In+=ut,Ut=Y)){var xs=void 0;(A>0||_.hskipBeforeAndAfter)&&(xs=y.deflt(Pn.pregap,be),xs!==0&&(sn=_e.makeSpan(["arraycolsep"],[]),sn.style.width=Ve(xs),Bn.push(sn)));var bs=[];for(S=0;S0){for(var m_=_e.makeLineSpan("hline",x,le),y_=_e.makeLineSpan("hdashline",x,le),Zf=[{type:"elem",elem:Q,shift:0}];te.length>0;){var $v=te.pop(),Gv=$v.pos-gr;$v.isDashed?Zf.push({type:"elem",elem:y_,shift:Gv}):Zf.push({type:"elem",elem:m_,shift:Gv})}Q=_e.makeVList({positionType:"individualShift",children:Zf},x)}if(ys.length===0)return _e.makeSpan(["mord"],[Q],x);var jf=_e.makeVList({positionType:"individualShift",children:ys},x);return jf=_e.makeSpan(["tag"],[jf],x),_e.makeFragment([Q,jf])},Fh={c:"center ",l:"left ",r:"right "},jn=function(_,x){for(var S=[],A=new Fe.MathNode("mtd",[],["mtr-glue"]),L=new Fe.MathNode("mtd",[],["mml-eqn-num"]),F=0;F<_.body.length;F++){for(var Y=_.body[F],Q=[],te=0;te0){var Te=_.cols,Ne="",We=!1,tt=0,ut=Te.length;Te[0].type==="separator"&&(be+="top ",tt=1),Te[Te.length-1].type==="separator"&&(be+="bottom ",ut-=1);for(var mt=tt;mt0?"left ":"",be+=tr[tr.length-1].length>0?"right ":"";for(var cr=1;cr-1?"alignat":"align",L=_.envName==="split",F=vi(_.parser,{cols:S,addJot:!0,autoTag:L?void 0:Mi(_.envName),emptySingleRow:!0,colSeparationType:A,maxNumCols:L?2:void 0,leqno:_.parser.settings.leqno},"display"),Y,Q=0,te={type:"ordgroup",mode:_.mode,body:[]};if(x[0]&&x[0].type==="ordgroup"){for(var le="",me=0;me0&&we&&(We=1),S[Te]={type:"align",align:Ne,pregap:We,postgap:0}}return F.colSeparationType=we?"align":"alignat",F};Di({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(_,x){var S=Ah(x[0]),A=S?[x[0]]:It(x[0],"ordgroup").body,L=A.map(function(Y){var Q=wf(Y),te=Q.text;if("lcr".indexOf(te)!==-1)return{type:"align",align:te};if(te==="|")return{type:"separator",separator:"|"};if(te===":")return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+te,Y)}),F={cols:L,hskipBeforeAndAfter:!0,maxNumCols:L.length};return vi(_.parser,F,Rh(_.envName))},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(_){var x={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[_.envName.replace("*","")],S="c",A={hskipBeforeAndAfter:!1,cols:[{type:"align",align:S}]};if(_.envName.charAt(_.envName.length-1)==="*"){var L=_.parser;if(L.consumeSpaces(),L.fetch().text==="["){if(L.consume(),L.consumeSpaces(),S=L.fetch().text,"lcr".indexOf(S)===-1)throw new a("Expected l or c or r",L.nextToken);L.consume(),L.consumeSpaces(),L.expect("]"),L.consume(),A.cols=[{type:"align",align:S}]}}var F=vi(_.parser,A,Rh(_.envName)),Y=Math.max.apply(Math,[0].concat(F.body.map(function(Q){return Q.length})));return F.cols=new Array(Y).fill({type:"align",align:S}),x?{type:"leftright",mode:_.mode,body:[F],left:x[0],right:x[1],rightColor:void 0}:F},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(_){var x={arraystretch:.5},S=vi(_.parser,x,"script");return S.colSeparationType="small",S},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["subarray"],props:{numArgs:1},handler:function(_,x){var S=Ah(x[0]),A=S?[x[0]]:It(x[0],"ordgroup").body,L=A.map(function(Y){var Q=wf(Y),te=Q.text;if("lc".indexOf(te)!==-1)return{type:"align",align:te};throw new a("Unknown column alignment: "+te,Y)});if(L.length>1)throw new a("{subarray} can contain only one column");var F={cols:L,hskipBeforeAndAfter:!1,arraystretch:.5};if(F=vi(_.parser,F,"script"),F.body.length>0&&F.body[0].length>1)throw new a("{subarray} can contain only one column");return F},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(_){var x={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},S=vi(_.parser,x,Rh(_.envName));return{type:"leftright",mode:_.mode,body:[S],left:_.envName.indexOf("r")>-1?".":"\\{",right:_.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:pv,htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(_){y.contains(["gather","gather*"],_.envName)&&fs(_);var x={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Mi(_.envName),emptySingleRow:!0,leqno:_.parser.settings.leqno};return vi(_.parser,x,"display")},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:pv,htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(_){fs(_);var x={autoTag:Mi(_.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:_.parser.settings.leqno};return vi(_.parser,x,"display")},htmlBuilder:gi,mathmlBuilder:jn}),Di({type:"array",names:["CD"],props:{numArgs:0},handler:function(_){return fs(_),U2(_.parser)},htmlBuilder:gi,mathmlBuilder:jn}),ee("\\nonumber","\\gdef\\@eqnsw{0}"),ee("\\notag","\\nonumber"),Xe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(_,x){throw new a(_.funcName+" valid only within array environment")}});var vv=dv,gv=vv;Xe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];if(L.type!=="ordgroup")throw new a("Invalid environment name",L);for(var F="",Y=0;Y=de.SCRIPT.id?S.text():de.DISPLAY:_==="text"&&S.size===de.DISPLAY.size?S=de.TEXT:_==="script"?S=de.SCRIPT:_==="scriptscript"&&(S=de.SCRIPTSCRIPT),S},Oh=function(_,x){var S=Nf(_.size,x.style),A=S.fracNum(),L=S.fracDen(),F;F=x.havingStyle(A);var Y=Wt(_.numer,F,x);if(_.continued){var Q=8.5/x.fontMetrics().ptPerEm,te=3.5/x.fontMetrics().ptPerEm;Y.height=Y.height0?Ne=3*we:Ne=7*we,We=x.fontMetrics().denom1):(be>0?(Te=x.fontMetrics().num2,Ne=we):(Te=x.fontMetrics().num3,Ne=3*we),We=x.fontMetrics().denom2);var tt;if(me){var mt=x.fontMetrics().axisHeight;Te-Y.depth-(mt+.5*be)0&&(x=_,x=x==="."?null:x),x};Xe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(_,x){var S=_.parser,A=x[4],L=x[5],F=Sh(x[0]),Y=F.type==="atom"&&F.family==="open"?on(F.text):null,Q=Sh(x[1]),te=Q.type==="atom"&&Q.family==="close"?on(Q.text):null,le=It(x[2],"size"),me,be=null;le.isBlank?me=!0:(be=le.value,me=be.number>0);var we="auto",Te=x[3];if(Te.type==="ordgroup"){if(Te.body.length>0){var Ne=It(Te.body[0],"textord");we=Ba[Number(Ne.text)]}}else Te=It(Te,"textord"),we=Ba[Number(Te.text)];return{type:"genfrac",mode:S.mode,numer:A,denom:L,continued:!1,hasBarLine:me,barSize:be,leftDelim:Y,rightDelim:te,size:we}},htmlBuilder:Oh,mathmlBuilder:Kn}),Xe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(_,x){var S=_.parser;_.funcName;var A=_.token;return{type:"infix",mode:S.mode,replaceWith:"\\\\abovefrac",size:It(x[0],"size").value,token:A}}}),Xe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(_,x){var S=_.parser;_.funcName;var A=x[0],L=g(It(x[1],"infix").size),F=x[2],Y=L.number>0;return{type:"genfrac",mode:S.mode,numer:A,denom:F,continued:!1,hasBarLine:Y,barSize:L,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Oh,mathmlBuilder:Kn});var Ao=function(_,x){var S=x.style,A,L;_.type==="supsub"?(A=_.sup?Wt(_.sup,x.havingStyle(S.sup()),x):Wt(_.sub,x.havingStyle(S.sub()),x),L=It(_.base,"horizBrace")):L=It(_,"horizBrace");var F=Wt(L.base,x.havingBaseStyle(de.DISPLAY)),Y=di.svgSpan(L,x),Q;if(L.isOver?(Q=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:F},{type:"kern",size:.1},{type:"elem",elem:Y}]},x),Q.children[0].children[0].children[1].classes.push("svg-align")):(Q=_e.makeVList({positionType:"bottom",positionData:F.depth+.1+Y.height,children:[{type:"elem",elem:Y},{type:"kern",size:.1},{type:"elem",elem:F}]},x),Q.children[0].children[0].children[0].classes.push("svg-align")),A){var te=_e.makeSpan(["mord",L.isOver?"mover":"munder"],[Q],x);L.isOver?Q=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:te},{type:"kern",size:.2},{type:"elem",elem:A}]},x):Q=_e.makeVList({positionType:"bottom",positionData:te.depth+.2+A.height+A.depth,children:[{type:"elem",elem:A},{type:"kern",size:.2},{type:"elem",elem:te}]},x)}return _e.makeSpan(["mord",L.isOver?"mover":"munder"],[Q],x)},n_=function(_,x){var S=di.mathMLnode(_.label);return new Fe.MathNode(_.isOver?"mover":"munder",[or(_.base,x),S])};Xe({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(_,x){var S=_.parser,A=_.funcName;return{type:"horizBrace",mode:S.mode,label:A,isOver:/^\\over/.test(A),base:x[0]}},htmlBuilder:Ao,mathmlBuilder:n_}),Xe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(_,x){var S=_.parser,A=x[1],L=It(x[0],"url").url;return S.settings.isTrusted({command:"\\href",url:L})?{type:"href",mode:S.mode,href:L,body:Tr(A)}:S.formatUnsupportedCmd("\\href")},htmlBuilder:function(_,x){var S=Mr(_.body,x,!1);return _e.makeAnchor(_.href,[],S,x)},mathmlBuilder:function(_,x){var S=Ea(_.body,x);return S instanceof Zn||(S=new Zn("mrow",[S])),S.setAttribute("href",_.href),S}}),Xe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(_,x){var S=_.parser,A=It(x[0],"url").url;if(!S.settings.isTrusted({command:"\\url",url:A}))return S.formatUnsupportedCmd("\\url");for(var L=[],F=0;F0&&(A=ir(_.totalheight,x)-S);var L=0;_.width.number>0&&(L=ir(_.width,x));var F={height:Ve(S+A)};L>0&&(F.width=Ve(L)),A>0&&(F.verticalAlign=Ve(-A));var Y=new _l(_.src,_.alt,F);return Y.height=S,Y.depth=A,Y},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mglyph",[]);S.setAttribute("alt",_.alt);var A=ir(_.height,x),L=0;if(_.totalheight.number>0&&(L=ir(_.totalheight,x)-A,S.setAttribute("valign",Ve(-L))),S.setAttribute("height",Ve(A+L)),_.width.number>0){var F=ir(_.width,x);S.setAttribute("width",Ve(F))}return S.setAttribute("src",_.src),S}}),Xe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=It(x[0],"size");if(S.settings.strict){var F=A[1]==="m",Y=L.value.unit==="mu";F?(Y||S.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+A+" supports only mu units, "+("not "+L.value.unit+" units")),S.mode!=="math"&&S.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+A+" works only in math mode")):Y&&S.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+A+" doesn't support mu units")}return{type:"kern",mode:S.mode,dimension:L.value}},htmlBuilder:function(_,x){return _e.makeGlue(_.dimension,x)},mathmlBuilder:function(_,x){var S=ir(_.dimension,x);return new Fe.SpaceNode(S)}}),Xe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"lap",mode:S.mode,alignment:A.slice(5),body:L}},htmlBuilder:function(_,x){var S;_.alignment==="clap"?(S=_e.makeSpan([],[Wt(_.body,x)]),S=_e.makeSpan(["inner"],[S],x)):S=_e.makeSpan(["inner"],[Wt(_.body,x)]);var A=_e.makeSpan(["fix"],[]),L=_e.makeSpan([_.alignment],[S,A],x),F=_e.makeSpan(["strut"]);return F.style.height=Ve(L.height+L.depth),L.depth&&(F.style.verticalAlign=Ve(-L.depth)),L.children.unshift(F),L=_e.makeSpan(["thinbox"],[L],x),_e.makeSpan(["mord","vbox"],[L],x)},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mpadded",[or(_.body,x)]);if(_.alignment!=="rlap"){var A=_.alignment==="llap"?"-1":"-0.5";S.setAttribute("lspace",A+"width")}return S.setAttribute("width","0px"),S}}),Xe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(_,x){var S=_.funcName,A=_.parser,L=A.mode;A.switchMode("math");var F=S==="\\("?"\\)":"$",Y=A.parseExpression(!1,F);return A.expect(F),A.switchMode(L),{type:"styling",mode:A.mode,style:"text",body:Y}}}),Xe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(_,x){throw new a("Mismatched "+_.funcName)}});var _v=function(_,x){switch(x.style.size){case de.DISPLAY.size:return _.display;case de.TEXT.size:return _.text;case de.SCRIPT.size:return _.script;case de.SCRIPTSCRIPT.size:return _.scriptscript;default:return _.text}};Xe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(_,x){var S=_.parser;return{type:"mathchoice",mode:S.mode,display:Tr(x[0]),text:Tr(x[1]),script:Tr(x[2]),scriptscript:Tr(x[3])}},htmlBuilder:function(_,x){var S=_v(_,x),A=Mr(S,x,!1);return _e.makeFragment(A)},mathmlBuilder:function(_,x){var S=_v(_,x);return Ea(S,x)}});var Vf=function(_,x,S,A,L,F,Y){_=_e.makeSpan([],[_]);var Q=S&&y.isCharacterBox(S),te,le;if(x){var me=Wt(x,A.havingStyle(L.sup()),A);le={elem:me,kern:Math.max(A.fontMetrics().bigOpSpacing1,A.fontMetrics().bigOpSpacing3-me.depth)}}if(S){var be=Wt(S,A.havingStyle(L.sub()),A);te={elem:be,kern:Math.max(A.fontMetrics().bigOpSpacing2,A.fontMetrics().bigOpSpacing4-be.height)}}var we;if(le&&te){var Te=A.fontMetrics().bigOpSpacing5+te.elem.height+te.elem.depth+te.kern+_.depth+Y;we=_e.makeVList({positionType:"bottom",positionData:Te,children:[{type:"kern",size:A.fontMetrics().bigOpSpacing5},{type:"elem",elem:te.elem,marginLeft:Ve(-F)},{type:"kern",size:te.kern},{type:"elem",elem:_},{type:"kern",size:le.kern},{type:"elem",elem:le.elem,marginLeft:Ve(F)},{type:"kern",size:A.fontMetrics().bigOpSpacing5}]},A)}else if(te){var Ne=_.height-Y;we=_e.makeVList({positionType:"top",positionData:Ne,children:[{type:"kern",size:A.fontMetrics().bigOpSpacing5},{type:"elem",elem:te.elem,marginLeft:Ve(-F)},{type:"kern",size:te.kern},{type:"elem",elem:_}]},A)}else if(le){var We=_.depth+Y;we=_e.makeVList({positionType:"bottom",positionData:We,children:[{type:"elem",elem:_},{type:"kern",size:le.kern},{type:"elem",elem:le.elem,marginLeft:Ve(F)},{type:"kern",size:A.fontMetrics().bigOpSpacing5}]},A)}else return _;var tt=[we];if(te&&F!==0&&!Q){var ut=_e.makeSpan(["mspace"],[],A);ut.style.marginRight=Ve(F),tt.unshift(ut)}return _e.makeSpan(["mop","op-limits"],tt,A)},xv=["\\smallint"],To=function(_,x){var S,A,L=!1,F;_.type==="supsub"?(S=_.sup,A=_.sub,F=It(_.base,"op"),L=!0):F=It(_,"op");var Y=x.style,Q=!1;Y.size===de.DISPLAY.size&&F.symbol&&!y.contains(xv,F.name)&&(Q=!0);var te;if(F.symbol){var le=Q?"Size2-Regular":"Size1-Regular",me="";if((F.name==="\\oiint"||F.name==="\\oiiint")&&(me=F.name.slice(1),F.name=me==="oiint"?"\\iint":"\\iiint"),te=_e.makeSymbol(F.name,le,"math",x,["mop","op-symbol",Q?"large-op":"small-op"]),me.length>0){var be=te.italic,we=_e.staticSvg(me+"Size"+(Q?"2":"1"),x);te=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:te,shift:0},{type:"elem",elem:we,shift:Q?.08:0}]},x),F.name="\\"+me,te.classes.unshift("mop"),te.italic=be}}else if(F.body){var Te=Mr(F.body,x,!0);Te.length===1&&Te[0]instanceof nn?(te=Te[0],te.classes[0]="mop"):te=_e.makeSpan(["mop"],Te,x)}else{for(var Ne=[],We=1;We0){for(var Q=F.body.map(function(be){var we=be.text;return typeof we=="string"?{type:"textord",mode:be.mode,text:we}:be}),te=Mr(Q,x.withFont("mathrm"),!0),le=0;le=0?Q.setAttribute("height",Ve(L)):(Q.setAttribute("height",Ve(L)),Q.setAttribute("depth",Ve(-L))),Q.setAttribute("voffset",Ve(L)),Q}});function Il(R,_,x){for(var S=Mr(R,_,!1),A=_.sizeMultiplier/x.sizeMultiplier,L=0;LS.height+S.depth+Y&&(Y=(Y+we-S.height-S.depth)/2);var Te=le.height-S.height-Y-me;S.style.paddingLeft=Ve(be);var Ne=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:S,wrapperClasses:["svg-align"]},{type:"kern",size:-(S.height+Te)},{type:"elem",elem:le},{type:"kern",size:me}]},x);if(_.index){var We=x.havingStyle(de.SCRIPTSCRIPT),tt=Wt(_.index,We,x),ut=.6*(Ne.height-Ne.depth),mt=_e.makeVList({positionType:"shift",positionData:-ut,children:[{type:"elem",elem:tt}]},x),qt=_e.makeSpan(["root"],[mt]);return _e.makeSpan(["mord","sqrt"],[qt,Ne],x)}else return _e.makeSpan(["mord","sqrt"],[Ne],x)},mathmlBuilder:function(_,x){var S=_.body,A=_.index;return A?new Fe.MathNode("mroot",[or(S,x),or(A,x)]):new Fe.MathNode("msqrt",[or(S,x)])}});var Hf={display:de.DISPLAY,text:de.TEXT,script:de.SCRIPT,scriptscript:de.SCRIPTSCRIPT};Xe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(_,x){var S=_.breakOnTokenText,A=_.funcName,L=_.parser,F=L.parseExpression(!0,S),Y=A.slice(1,A.length-5);return{type:"styling",mode:L.mode,style:Y,body:F}},htmlBuilder:function(_,x){var S=Hf[_.style],A=x.havingStyle(S).withFont("");return Il(_.body,A,x)},mathmlBuilder:function(_,x){var S=Hf[_.style],A=x.havingStyle(S),L=_n(_.body,A),F=new Fe.MathNode("mstyle",L),Y={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Q=Y[_.style];return F.setAttribute("scriptlevel",Q[0]),F.setAttribute("displaystyle",Q[1]),F}});var vs=function(_,x){var S=_.base;if(S)if(S.type==="op"){var A=S.limits&&(x.style.size===de.DISPLAY.size||S.alwaysHandleSupSub);return A?To:null}else if(S.type==="operatorname"){var L=S.alwaysHandleSupSub&&(x.style.size===de.DISPLAY.size||S.limits);return L?$f:null}else{if(S.type==="accent")return y.isCharacterBox(S.base)?Cf:null;if(S.type==="horizBrace"){var F=!_.sub;return F===S.isOver?Ao:null}else return null}else return null};Co({type:"supsub",htmlBuilder:function(_,x){var S=vs(_,x);if(S)return S(_,x);var A=_.base,L=_.sup,F=_.sub,Y=Wt(A,x),Q,te,le=x.fontMetrics(),me=0,be=0,we=A&&y.isCharacterBox(A);if(L){var Te=x.havingStyle(x.style.sup());Q=Wt(L,Te,x),we||(me=Y.height-Te.fontMetrics().supDrop*Te.sizeMultiplier/x.sizeMultiplier)}if(F){var Ne=x.havingStyle(x.style.sub());te=Wt(F,Ne,x),we||(be=Y.depth+Ne.fontMetrics().subDrop*Ne.sizeMultiplier/x.sizeMultiplier)}var We;x.style===de.DISPLAY?We=le.sup1:x.style.cramped?We=le.sup3:We=le.sup2;var tt=x.sizeMultiplier,ut=Ve(.5/le.ptPerEm/tt),mt=null;if(te){var qt=_.base&&_.base.type==="op"&&_.base.name&&(_.base.name==="\\oiint"||_.base.name==="\\oiiint");(Y instanceof nn||qt)&&(mt=Ve(-Y.italic))}var Et;if(Q&&te){me=Math.max(me,We,Q.depth+.25*le.xHeight),be=Math.max(be,le.sub2);var Qt=le.defaultRuleThickness,Ut=4*Qt;if(me-Q.depth-(te.height-be)0&&(me+=tr,be-=tr)}var cr=[{type:"elem",elem:te,shift:be,marginRight:ut,marginLeft:mt},{type:"elem",elem:Q,shift:-me,marginRight:ut}];Et=_e.makeVList({positionType:"individualShift",children:cr},x)}else if(te){be=Math.max(be,le.sub1,te.height-.8*le.xHeight);var br=[{type:"elem",elem:te,marginLeft:mt,marginRight:ut}];Et=_e.makeVList({positionType:"shift",positionData:be,children:br},x)}else if(Q)me=Math.max(me,We,Q.depth+.25*le.xHeight),Et=_e.makeVList({positionType:"shift",positionData:-me,children:[{type:"elem",elem:Q,marginRight:ut}]},x);else throw new Error("supsub must have either sup or sub.");var In=Cl(Y,"right")||"mord";return _e.makeSpan([In],[Y,_e.makeSpan(["msupsub"],[Et])],x)},mathmlBuilder:function(_,x){var S=!1,A,L;_.base&&_.base.type==="horizBrace"&&(L=!!_.sup,L===_.base.isOver&&(S=!0,A=_.base.isOver)),_.base&&(_.base.type==="op"||_.base.type==="operatorname")&&(_.base.parentIsSupSub=!0);var F=[or(_.base,x)];_.sub&&F.push(or(_.sub,x)),_.sup&&F.push(or(_.sup,x));var Y;if(S)Y=A?"mover":"munder";else if(_.sub)if(_.sup){var le=_.base;le&&le.type==="op"&&le.limits&&x.style===de.DISPLAY||le&&le.type==="operatorname"&&le.alwaysHandleSupSub&&(x.style===de.DISPLAY||le.limits)?Y="munderover":Y="msubsup"}else{var te=_.base;te&&te.type==="op"&&te.limits&&(x.style===de.DISPLAY||te.alwaysHandleSupSub)||te&&te.type==="operatorname"&&te.alwaysHandleSupSub&&(te.limits||x.style===de.DISPLAY)?Y="munder":Y="msub"}else{var Q=_.base;Q&&Q.type==="op"&&Q.limits&&(x.style===de.DISPLAY||Q.alwaysHandleSupSub)||Q&&Q.type==="operatorname"&&Q.alwaysHandleSupSub&&(Q.limits||x.style===de.DISPLAY)?Y="mover":Y="msup"}return new Fe.MathNode(Y,F)}}),Co({type:"atom",htmlBuilder:function(_,x){return _e.mathsym(_.text,_.mode,x,["m"+_.family])},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mo",[En(_.text,_.mode)]);if(_.family==="bin"){var A=bf(_,x);A==="bold-italic"&&S.setAttribute("mathvariant",A)}else _.family==="punct"?S.setAttribute("separator","true"):(_.family==="open"||_.family==="close")&&S.setAttribute("stretchy","false");return S}});var Nh={mi:"italic",mn:"normal",mtext:"normal"};Co({type:"mathord",htmlBuilder:function(_,x){return _e.makeOrd(_,x,"mathord")},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mi",[En(_.text,_.mode,x)]),A=bf(_,x)||"italic";return A!==Nh[S.type]&&S.setAttribute("mathvariant",A),S}}),Co({type:"textord",htmlBuilder:function(_,x){return _e.makeOrd(_,x,"textord")},mathmlBuilder:function(_,x){var S=En(_.text,_.mode,x),A=bf(_,x)||"normal",L;return _.mode==="text"?L=new Fe.MathNode("mtext",[S]):/[0-9]/.test(_.text)?L=new Fe.MathNode("mn",[S]):_.text==="\\prime"?L=new Fe.MathNode("mo",[S]):L=new Fe.MathNode("mi",[S]),A!==Nh[L.type]&&L.setAttribute("mathvariant",A),L}});var xr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},gs={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Co({type:"spacing",htmlBuilder:function(_,x){if(gs.hasOwnProperty(_.text)){var S=gs[_.text].className||"";if(_.mode==="text"){var A=_e.makeOrd(_,x,"textord");return A.classes.push(S),A}else return _e.makeSpan(["mspace",S],[_e.mathsym(_.text,_.mode,x)],x)}else{if(xr.hasOwnProperty(_.text))return _e.makeSpan(["mspace",xr[_.text]],[],x);throw new a('Unknown type of space "'+_.text+'"')}},mathmlBuilder:function(_,x){var S;if(gs.hasOwnProperty(_.text))S=new Fe.MathNode("mtext",[new Fe.TextNode(" ")]);else{if(xr.hasOwnProperty(_.text))return new Fe.MathNode("mspace");throw new a('Unknown type of space "'+_.text+'"')}return S}});var zh=function(){var _=new Fe.MathNode("mtd",[]);return _.setAttribute("width","50%"),_};Co({type:"tag",mathmlBuilder:function(_,x){var S=new Fe.MathNode("mtable",[new Fe.MathNode("mtr",[zh(),new Fe.MathNode("mtd",[Ea(_.body,x)]),zh(),new Fe.MathNode("mtd",[Ea(_.tag,x)])])]);return S.setAttribute("width","100%"),S}});var bv={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Sv={"\\textbf":"textbf","\\textmd":"textmd"},a_={"\\textit":"textit","\\textup":"textup"},wv=function(_,x){var S=_.font;return S?bv[S]?x.withTextFontFamily(bv[S]):Sv[S]?x.withTextFontWeight(Sv[S]):x.withTextFontShape(a_[S]):x};Xe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(_,x){var S=_.parser,A=_.funcName,L=x[0];return{type:"text",mode:S.mode,body:Tr(L),font:A}},htmlBuilder:function(_,x){var S=wv(_,x),A=Mr(_.body,S,!0);return _e.makeSpan(["mord","text"],A,S)},mathmlBuilder:function(_,x){var S=wv(_,x);return Ea(_.body,S)}}),Xe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(_,x){var S=_.parser;return{type:"underline",mode:S.mode,body:x[0]}},htmlBuilder:function(_,x){var S=Wt(_.body,x),A=_e.makeLineSpan("underline-line",x),L=x.fontMetrics().defaultRuleThickness,F=_e.makeVList({positionType:"top",positionData:S.height,children:[{type:"kern",size:L},{type:"elem",elem:A},{type:"kern",size:3*L},{type:"elem",elem:S}]},x);return _e.makeSpan(["mord","underline"],[F],x)},mathmlBuilder:function(_,x){var S=new Fe.MathNode("mo",[new Fe.TextNode("‾")]);S.setAttribute("stretchy","true");var A=new Fe.MathNode("munder",[or(_.body,x),S]);return A.setAttribute("accentunder","true"),A}}),Xe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(_,x){var S=_.parser;return{type:"vcenter",mode:S.mode,body:x[0]}},htmlBuilder:function(_,x){var S=Wt(_.body,x),A=x.fontMetrics().axisHeight,L=.5*(S.height-A-(S.depth+A));return _e.makeVList({positionType:"shift",positionData:L,children:[{type:"elem",elem:S}]},x)},mathmlBuilder:function(_,x){return new Fe.MathNode("mpadded",[or(_.body,x)],["vcenter"])}}),Xe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(_,x,S){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(_,x){for(var S=Cv(_),A=[],L=x.havingStyle(x.style.text()),F=0;F0;)this.endGroup()},_.has=function(S){return this.current.hasOwnProperty(S)||this.builtins.hasOwnProperty(S)},_.get=function(S){return this.current.hasOwnProperty(S)?this.current[S]:this.builtins[S]},_.set=function(S,A,L){if(L===void 0&&(L=!1),L){for(var F=0;F0&&(this.undefStack[this.undefStack.length-1][S]=A)}else{var Y=this.undefStack[this.undefStack.length-1];Y&&!Y.hasOwnProperty(S)&&(Y[S]=this.current[S])}A==null?delete this.current[S]:this.current[S]=A},R}(),kv=Pf,Dv=kv;ee("\\noexpand",function(R){var _=R.popToken();return R.isExpandable(_.text)&&(_.noexpand=!0,_.treatAsRelax=!0),{tokens:[_],numArgs:0}}),ee("\\expandafter",function(R){var _=R.popToken();return R.expandOnce(!0),{tokens:[_],numArgs:0}}),ee("\\@firstoftwo",function(R){var _=R.consumeArgs(2);return{tokens:_[0],numArgs:0}}),ee("\\@secondoftwo",function(R){var _=R.consumeArgs(2);return{tokens:_[1],numArgs:0}}),ee("\\@ifnextchar",function(R){var _=R.consumeArgs(3);R.consumeSpaces();var x=R.future();return _[0].length===1&&_[0][0].text===x.text?{tokens:_[1],numArgs:0}:{tokens:_[2],numArgs:0}}),ee("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),ee("\\TextOrMath",function(R){var _=R.consumeArgs(2);return R.mode==="text"?{tokens:_[0],numArgs:0}:{tokens:_[1],numArgs:0}});var Hf={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};ee("\\char",function(R){var _=R.popToken(),x,S="";if(_.text==="'")x=8,_=R.popToken();else if(_.text==='"')x=16,_=R.popToken();else if(_.text==="`")if(_=R.popToken(),_.text[0]==="\\")S=_.text.charCodeAt(1);else{if(_.text==="EOF")throw new a("\\char` missing argument");S=_.text.charCodeAt(0)}else x=10;if(x){if(S=Hf[_.text],S==null||S>=x)throw new a("Invalid base-"+x+" digit "+_.text);for(var A;(A=Hf[R.future().text])!=null&&A":"\\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"};ee("\\dots",function(R){var _="\\dotso",x=R.expandAfterFuture().text;return x in Mv?_=Mv[x]:(x.slice(0,4)==="\\not"||x in ar.math&&y.contains(["bin","rel"],ar.math[x].group))&&(_="\\dotsb"),_});var ko={")":!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};ee("\\dotso",function(R){var _=R.future().text;return _ in ko?"\\ldots\\,":"\\ldots"}),ee("\\dotsc",function(R){var _=R.future().text;return _ in ko&&_!==","?"\\ldots\\,":"\\ldots"}),ee("\\cdots",function(R){var _=R.future().text;return _ in ko?"\\@cdots\\,":"\\@cdots"}),ee("\\dotsb","\\cdots"),ee("\\dotsm","\\cdots"),ee("\\dotsi","\\!\\cdots"),ee("\\dotsx","\\ldots\\,"),ee("\\DOTSI","\\relax"),ee("\\DOTSB","\\relax"),ee("\\DOTSX","\\relax"),ee("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),ee("\\,","\\tmspace+{3mu}{.1667em}"),ee("\\thinspace","\\,"),ee("\\>","\\mskip{4mu}"),ee("\\:","\\tmspace+{4mu}{.2222em}"),ee("\\medspace","\\:"),ee("\\;","\\tmspace+{5mu}{.2777em}"),ee("\\thickspace","\\;"),ee("\\!","\\tmspace-{3mu}{.1667em}"),ee("\\negthinspace","\\!"),ee("\\negmedspace","\\tmspace-{4mu}{.2222em}"),ee("\\negthickspace","\\tmspace-{5mu}{.277em}"),ee("\\enspace","\\kern.5em "),ee("\\enskip","\\hskip.5em\\relax"),ee("\\quad","\\hskip1em\\relax"),ee("\\qquad","\\hskip2em\\relax"),ee("\\tag","\\@ifstar\\tag@literal\\tag@paren"),ee("\\tag@paren","\\tag@literal{({#1})}"),ee("\\tag@literal",function(R){if(R.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),ee("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),ee("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),ee("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),ee("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),ee("\\newline","\\\\\\relax"),ee("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Lv=Ve(Kt["Main-Regular"]["T".charCodeAt(0)][1]-.7*Kt["Main-Regular"]["A".charCodeAt(0)][1]);ee("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Lv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),ee("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Lv+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),ee("\\hspace","\\@ifstar\\@hspacer\\@hspace"),ee("\\@hspace","\\hskip #1\\relax"),ee("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),ee("\\ordinarycolon",":"),ee("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),ee("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),ee("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),ee("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),ee("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),ee("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),ee("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),ee("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),ee("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),ee("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),ee("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),ee("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),ee("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),ee("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),ee("∷","\\dblcolon"),ee("∹","\\eqcolon"),ee("≔","\\coloneqq"),ee("≕","\\eqqcolon"),ee("⩴","\\Coloneqq"),ee("\\ratio","\\vcentcolon"),ee("\\coloncolon","\\dblcolon"),ee("\\colonequals","\\coloneqq"),ee("\\coloncolonequals","\\Coloneqq"),ee("\\equalscolon","\\eqqcolon"),ee("\\equalscoloncolon","\\Eqqcolon"),ee("\\colonminus","\\coloneq"),ee("\\coloncolonminus","\\Coloneq"),ee("\\minuscolon","\\eqcolon"),ee("\\minuscoloncolon","\\Eqcolon"),ee("\\coloncolonapprox","\\Colonapprox"),ee("\\coloncolonsim","\\Colonsim"),ee("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ee("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ee("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ee("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ee("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),ee("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),ee("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),ee("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),ee("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),ee("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),ee("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),ee("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),ee("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),ee("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),ee("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),ee("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),ee("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),ee("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),ee("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),ee("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),ee("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),ee("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),ee("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),ee("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),ee("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),ee("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),ee("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),ee("\\imath","\\html@mathml{\\@imath}{ı}"),ee("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),ee("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),ee("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),ee("⟦","\\llbracket"),ee("⟧","\\rrbracket"),ee("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),ee("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),ee("⦃","\\lBrace"),ee("⦄","\\rBrace"),ee("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),ee("⦵","\\minuso"),ee("\\darr","\\downarrow"),ee("\\dArr","\\Downarrow"),ee("\\Darr","\\Downarrow"),ee("\\lang","\\langle"),ee("\\rang","\\rangle"),ee("\\uarr","\\uparrow"),ee("\\uArr","\\Uparrow"),ee("\\Uarr","\\Uparrow"),ee("\\N","\\mathbb{N}"),ee("\\R","\\mathbb{R}"),ee("\\Z","\\mathbb{Z}"),ee("\\alef","\\aleph"),ee("\\alefsym","\\aleph"),ee("\\Alpha","\\mathrm{A}"),ee("\\Beta","\\mathrm{B}"),ee("\\bull","\\bullet"),ee("\\Chi","\\mathrm{X}"),ee("\\clubs","\\clubsuit"),ee("\\cnums","\\mathbb{C}"),ee("\\Complex","\\mathbb{C}"),ee("\\Dagger","\\ddagger"),ee("\\diamonds","\\diamondsuit"),ee("\\empty","\\emptyset"),ee("\\Epsilon","\\mathrm{E}"),ee("\\Eta","\\mathrm{H}"),ee("\\exist","\\exists"),ee("\\harr","\\leftrightarrow"),ee("\\hArr","\\Leftrightarrow"),ee("\\Harr","\\Leftrightarrow"),ee("\\hearts","\\heartsuit"),ee("\\image","\\Im"),ee("\\infin","\\infty"),ee("\\Iota","\\mathrm{I}"),ee("\\isin","\\in"),ee("\\Kappa","\\mathrm{K}"),ee("\\larr","\\leftarrow"),ee("\\lArr","\\Leftarrow"),ee("\\Larr","\\Leftarrow"),ee("\\lrarr","\\leftrightarrow"),ee("\\lrArr","\\Leftrightarrow"),ee("\\Lrarr","\\Leftrightarrow"),ee("\\Mu","\\mathrm{M}"),ee("\\natnums","\\mathbb{N}"),ee("\\Nu","\\mathrm{N}"),ee("\\Omicron","\\mathrm{O}"),ee("\\plusmn","\\pm"),ee("\\rarr","\\rightarrow"),ee("\\rArr","\\Rightarrow"),ee("\\Rarr","\\Rightarrow"),ee("\\real","\\Re"),ee("\\reals","\\mathbb{R}"),ee("\\Reals","\\mathbb{R}"),ee("\\Rho","\\mathrm{P}"),ee("\\sdot","\\cdot"),ee("\\sect","\\S"),ee("\\spades","\\spadesuit"),ee("\\sub","\\subset"),ee("\\sube","\\subseteq"),ee("\\supe","\\supseteq"),ee("\\Tau","\\mathrm{T}"),ee("\\thetasym","\\vartheta"),ee("\\weierp","\\wp"),ee("\\Zeta","\\mathrm{Z}"),ee("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),ee("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),ee("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),ee("\\bra","\\mathinner{\\langle{#1}|}"),ee("\\ket","\\mathinner{|{#1}\\rangle}"),ee("\\braket","\\mathinner{\\langle{#1}\\rangle}"),ee("\\Bra","\\left\\langle#1\\right|"),ee("\\Ket","\\left|#1\\right\\rangle");var Ev=function(_){return function(x){var S=x.consumeArg().tokens,A=x.consumeArg().tokens,L=x.consumeArg().tokens,F=x.consumeArg().tokens,Y=x.macros.get("|"),Q=x.macros.get("\\|");x.macros.beginGroup();var te=function(we){return function(Te){_&&(Te.macros.set("|",Y),L.length&&Te.macros.set("\\|",Q));var Ne=we;if(!we&&L.length){var We=Te.future();We.text==="|"&&(Te.popToken(),Ne=!0)}return{tokens:Ne?L:A,numArgs:0}}};x.macros.set("|",te(!1)),L.length&&x.macros.set("\\|",te(!0));var le=x.consumeArg().tokens,me=x.expandTokens([].concat(F,le,S));return x.macros.endGroup(),{tokens:me.reverse(),numArgs:0}}};ee("\\bra@ket",Ev(!1)),ee("\\bra@set",Ev(!0)),ee("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),ee("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),ee("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),ee("\\angln","{\\angl n}"),ee("\\blue","\\textcolor{##6495ed}{#1}"),ee("\\orange","\\textcolor{##ffa500}{#1}"),ee("\\pink","\\textcolor{##ff00af}{#1}"),ee("\\red","\\textcolor{##df0030}{#1}"),ee("\\green","\\textcolor{##28ae7b}{#1}"),ee("\\gray","\\textcolor{gray}{#1}"),ee("\\purple","\\textcolor{##9d38bd}{#1}"),ee("\\blueA","\\textcolor{##ccfaff}{#1}"),ee("\\blueB","\\textcolor{##80f6ff}{#1}"),ee("\\blueC","\\textcolor{##63d9ea}{#1}"),ee("\\blueD","\\textcolor{##11accd}{#1}"),ee("\\blueE","\\textcolor{##0c7f99}{#1}"),ee("\\tealA","\\textcolor{##94fff5}{#1}"),ee("\\tealB","\\textcolor{##26edd5}{#1}"),ee("\\tealC","\\textcolor{##01d1c1}{#1}"),ee("\\tealD","\\textcolor{##01a995}{#1}"),ee("\\tealE","\\textcolor{##208170}{#1}"),ee("\\greenA","\\textcolor{##b6ffb0}{#1}"),ee("\\greenB","\\textcolor{##8af281}{#1}"),ee("\\greenC","\\textcolor{##74cf70}{#1}"),ee("\\greenD","\\textcolor{##1fab54}{#1}"),ee("\\greenE","\\textcolor{##0d923f}{#1}"),ee("\\goldA","\\textcolor{##ffd0a9}{#1}"),ee("\\goldB","\\textcolor{##ffbb71}{#1}"),ee("\\goldC","\\textcolor{##ff9c39}{#1}"),ee("\\goldD","\\textcolor{##e07d10}{#1}"),ee("\\goldE","\\textcolor{##a75a05}{#1}"),ee("\\redA","\\textcolor{##fca9a9}{#1}"),ee("\\redB","\\textcolor{##ff8482}{#1}"),ee("\\redC","\\textcolor{##f9685d}{#1}"),ee("\\redD","\\textcolor{##e84d39}{#1}"),ee("\\redE","\\textcolor{##bc2612}{#1}"),ee("\\maroonA","\\textcolor{##ffbde0}{#1}"),ee("\\maroonB","\\textcolor{##ff92c6}{#1}"),ee("\\maroonC","\\textcolor{##ed5fa6}{#1}"),ee("\\maroonD","\\textcolor{##ca337c}{#1}"),ee("\\maroonE","\\textcolor{##9e034e}{#1}"),ee("\\purpleA","\\textcolor{##ddd7ff}{#1}"),ee("\\purpleB","\\textcolor{##c6b9fc}{#1}"),ee("\\purpleC","\\textcolor{##aa87ff}{#1}"),ee("\\purpleD","\\textcolor{##7854ab}{#1}"),ee("\\purpleE","\\textcolor{##543b78}{#1}"),ee("\\mintA","\\textcolor{##f5f9e8}{#1}"),ee("\\mintB","\\textcolor{##edf2df}{#1}"),ee("\\mintC","\\textcolor{##e0e5cc}{#1}"),ee("\\grayA","\\textcolor{##f6f7f7}{#1}"),ee("\\grayB","\\textcolor{##f0f1f2}{#1}"),ee("\\grayC","\\textcolor{##e3e5e6}{#1}"),ee("\\grayD","\\textcolor{##d6d8da}{#1}"),ee("\\grayE","\\textcolor{##babec2}{#1}"),ee("\\grayF","\\textcolor{##888d93}{#1}"),ee("\\grayG","\\textcolor{##626569}{#1}"),ee("\\grayH","\\textcolor{##3b3e40}{#1}"),ee("\\grayI","\\textcolor{##21242c}{#1}"),ee("\\kaBlue","\\textcolor{##314453}{#1}"),ee("\\kaGreen","\\textcolor{##71B307}{#1}");var Iv={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},c_=function(){function R(x,S,A){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=S,this.expansionCount=0,this.feed(x),this.macros=new h_(Dv,S.macros),this.mode=A,this.stack=[]}var _=R.prototype;return _.feed=function(S){this.lexer=new Tv(S,this.settings)},_.switchMode=function(S){this.mode=S},_.beginGroup=function(){this.macros.beginGroup()},_.endGroup=function(){this.macros.endGroup()},_.endGroups=function(){this.macros.endGroups()},_.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},_.popToken=function(){return this.future(),this.stack.pop()},_.pushToken=function(S){this.stack.push(S)},_.pushTokens=function(S){var A;(A=this.stack).push.apply(A,S)},_.scanArgument=function(S){var A,L,F;if(S){if(this.consumeSpaces(),this.future().text!=="[")return null;A=this.popToken();var Y=this.consumeArg(["]"]);F=Y.tokens,L=Y.end}else{var Q=this.consumeArg();F=Q.tokens,A=Q.start,L=Q.end}return this.pushToken(new Ia("EOF",L.loc)),this.pushTokens(F),A.range(L,"")},_.consumeSpaces=function(){for(;;){var S=this.future();if(S.text===" ")this.stack.pop();else break}},_.consumeArg=function(S){var A=[],L=S&&S.length>0;L||this.consumeSpaces();var F=this.future(),Y,Q=0,te=0;do{if(Y=this.popToken(),A.push(Y),Y.text==="{")++Q;else if(Y.text==="}"){if(--Q,Q===-1)throw new a("Extra }",Y)}else if(Y.text==="EOF")throw new a("Unexpected end of input in a macro argument, expected '"+(S&&L?S[te]:"}")+"'",Y);if(S&&L)if((Q===0||Q===1&&S[te]==="{")&&Y.text===S[te]){if(++te,te===S.length){A.splice(-te,te);break}}else te=0}while(Q!==0||L);return F.text==="{"&&A[A.length-1].text==="}"&&(A.pop(),A.shift()),A.reverse(),{tokens:A,start:F,end:Y}},_.consumeArgs=function(S,A){if(A){if(A.length!==S+1)throw new a("The length of delimiters doesn't match the number of args!");for(var L=A[0],F=0;Fthis.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting");var Y=F.tokens,Q=this.consumeArgs(F.numArgs,F.delimiters);if(F.numArgs){Y=Y.slice();for(var te=Y.length-1;te>=0;--te){var le=Y[te];if(le.text==="#"){if(te===0)throw new a("Incomplete placeholder at end of macro body",le);if(le=Y[--te],le.text==="#")Y.splice(te+1,1);else if(/^[1-9]$/.test(le.text)){var me;(me=Y).splice.apply(me,[te,2].concat(Q[+le.text-1]))}else throw new a("Not a valid argument number",le)}}}return this.pushTokens(Y),Y.length},_.expandAfterFuture=function(){return this.expandOnce(),this.future()},_.expandNextToken=function(){for(;;)if(this.expandOnce()===!1){var S=this.stack.pop();return S.treatAsRelax&&(S.text="\\relax"),S}throw new Error},_.expandMacro=function(S){return this.macros.has(S)?this.expandTokens([new Ia(S)]):void 0},_.expandTokens=function(S){var A=[],L=this.stack.length;for(this.pushTokens(S);this.stack.length>L;)if(this.expandOnce(!0)===!1){var F=this.stack.pop();F.treatAsRelax&&(F.noexpand=!1,F.treatAsRelax=!1),A.push(F)}return A},_.expandMacroAsText=function(S){var A=this.expandMacro(S);return A&&A.map(function(L){return L.text}).join("")},_._getExpansion=function(S){var A=this.macros.get(S);if(A==null)return A;if(S.length===1){var L=this.lexer.catcodes[S];if(L!=null&&L!==13)return}var F=typeof A=="function"?A(this):A;if(typeof F=="string"){var Y=0;if(F.indexOf("#")!==-1)for(var Q=F.replace(/##/g,"");Q.indexOf("#"+(Y+1))!==-1;)++Y;for(var te=new Tv(F,this.settings),le=[],me=te.lex();me.text!=="EOF";)le.push(me),me=te.lex();le.reverse();var be={tokens:le,numArgs:Y};return be}return F},_.isDefined=function(S){return this.macros.has(S)||Ra.hasOwnProperty(S)||ar.math.hasOwnProperty(S)||ar.text.hasOwnProperty(S)||Iv.hasOwnProperty(S)},_.isExpandable=function(S){var A=this.macros.get(S);return A!=null?typeof A=="string"||typeof A=="function"||!A.unexpandable:Ra.hasOwnProperty(S)&&!Ra[S].primitive},R}(),zh=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Vh=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),qf={"́":{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"}},Bv={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"},Pv=function(){function R(x,S){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 c_(x,S,this.mode),this.settings=S,this.leftrightDepth=0}var _=R.prototype;return _.expect=function(S,A){if(A===void 0&&(A=!0),this.fetch().text!==S)throw new a("Expected '"+S+"', got '"+this.fetch().text+"'",this.fetch());A&&this.consume()},_.consume=function(){this.nextToken=null},_.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},_.switchMode=function(S){this.mode=S,this.gullet.switchMode(S)},_.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var S=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),S}finally{this.gullet.endGroups()}},_.subparse=function(S){var A=this.nextToken;this.consume(),this.gullet.pushToken(new Ia("}")),this.gullet.pushTokens(S);var L=this.parseExpression(!1);return this.expect("}"),this.nextToken=A,L},_.parseExpression=function(S,A){for(var L=[];;){this.mode==="math"&&this.consumeSpaces();var F=this.fetch();if(R.endOfExpression.indexOf(F.text)!==-1||A&&F.text===A||S&&Ra[F.text]&&Ra[F.text].infix)break;var Y=this.parseAtom(A);if(Y){if(Y.type==="internal")continue}else break;L.push(Y)}return this.mode==="text"&&this.formLigatures(L),this.handleInfixNodes(L)},_.handleInfixNodes=function(S){for(var A=-1,L,F=0;F=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+A[0]+'" used in math mode',S);var te=ar[this.mode][A].group,le=pi.range(S),me;if(ea.hasOwnProperty(te)){var be=te;me={type:"atom",mode:this.mode,family:be,loc:le,text:A}}else me={type:te,mode:this.mode,loc:le,text:A};Q=me}else if(A.charCodeAt(0)>=128)this.settings.strict&&(Qe(A.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+A[0]+'" used in math mode',S):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+A[0]+'"'+(" ("+A.charCodeAt(0)+")"),S)),Q={type:"textord",mode:"text",loc:pi.range(S),text:A};else return null;if(this.consume(),Y)for(var we=0;wethis.revoke(C)}revoke(C){const k=this.listeners.indexOf(C);k>=0&&this.listeners.splice(k,1)}revokeAll(){this.listeners.splice(0)}call(...C){for(const k of this.listeners)k(...C)}}function l(){return l=Object.assign||function(p){for(var C=1;C=0)&&(k[E]=p[E]);return k}const h=["textContent"];function c(p){return p.replace(/[&<"]/g,C=>({"&":"&","<":"<",'"':"""})[C])}function f(p){return p.replace(/<(\/script>)/g,"\\x3c$2")}function d(p,C){const k=C?Object.entries(C).map(([I,E])=>{if(!(E==null||E===!1))return I=` ${c(I)}`,E===!0?I:`${I}="${c(E)}"`}).filter(Boolean).join(""):"";return`<${p}${k}>`}function v(p){return``}function g(p,C,k){return C==null?d(p,k):d(p,k)+(C||"")+v(p)}function m(p,C){const k=C.map(I=>typeof I=="function"?I.toString():JSON.stringify(I??null)).join(",");return`(${p.toString()})(${k})`}function y(p,C){return p.map(k=>{if(k.type==="script"){const I=k.data,{textContent:E}=I,z=u(I,h);return g("script",E||"",z)}if(k.type==="iife"){const{fn:I,getParams:E}=k.data;return g("script",f(m(I,(E==null?void 0:E(C))||[])))}return""})}function b(p){return p.map(C=>C.type==="stylesheet"?g("link",null,l({rel:"stylesheet"},C.data)):g("style",C.data))}Math.random().toString(36).slice(2,8);function w(p,{before:C,after:k}){return function(...E){const z={args:E,thisObj:this};try{C&&C(z)}catch{}z.result=p.apply(z.thisObj,z.args);try{k&&k(z)}catch{}return z.result}}function T(p){const C={};return function(...I){const E=`${I[0]}`;let z=C[E];return z||(z={value:p(...I)},C[E]=z),z.value}}function M(p,C,k){const I=document.createElement(p);return C&&Object.entries(C).forEach(([E,z])=>{I[E]=z}),k&&Object.entries(k).forEach(([E,z])=>{I.setAttribute(E,z)}),I}const D=T(p=>{document.head.append(M("link",{rel:"preload",as:"script",href:p}))});async function P(p,C){if(!p.loaded&&(p.type==="script"&&(p.loaded=new Promise((k,I)=>{var E;document.head.append(M("script",l({},p.data,{onload:k,onerror:I}))),(E=p.data)!=null&&E.src||k(void 0)}).then(()=>{p.loaded=!0})),p.type==="iife")){const{fn:k,getParams:I}=p.data;k(...(I==null?void 0:I(C))||[]),p.loaded=!0}await p.loaded}async function O(p,C){const k=p.filter(I=>{var E;return I.type==="script"&&((E=I.data)==null?void 0:E.src)});k.length>1&&k.forEach(I=>D(I.data.src)),C=l({getMarkmap:()=>window.markmap},C);for(const I of p)await P(I,C)}const V=` +?)[ \r ]*`,Vh="[̀-ͯ]",u_=new RegExp(Vh+"+$"),h_="("+Tv+"+)|"+(l_+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(Vh+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Vh+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+ms)+("|"+s_+")"),kv=function(){function R(x,S){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=x,this.settings=S,this.tokenRegex=new RegExp(h_,"g"),this.catcodes={"%":14,"~":13}}var _=R.prototype;return _.setCatcode=function(S,A){this.catcodes[S]=A},_.lex=function(){var S=this.input,A=this.tokenRegex.lastIndex;if(A===S.length)return new Ia("EOF",new pi(this,A,A));var L=this.tokenRegex.exec(S);if(L===null||L.index!==A)throw new a("Unexpected character: '"+S[A]+"'",new Ia(S[A],new pi(this,A,A+1)));var F=L[6]||L[3]||(L[2]?"\\ ":" ");if(this.catcodes[F]===14){var Y=S.indexOf(` +`,this.tokenRegex.lastIndex);return Y===-1?(this.tokenRegex.lastIndex=S.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=Y+1,this.lex()}return new Ia(F,new pi(this,A,this.tokenRegex.lastIndex))},R}(),c_=function(){function R(x,S){x===void 0&&(x={}),S===void 0&&(S={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=S,this.builtins=x,this.undefStack=[]}var _=R.prototype;return _.beginGroup=function(){this.undefStack.push({})},_.endGroup=function(){if(this.undefStack.length===0)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var S=this.undefStack.pop();for(var A in S)S.hasOwnProperty(A)&&(S[A]==null?delete this.current[A]:this.current[A]=S[A])},_.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},_.has=function(S){return this.current.hasOwnProperty(S)||this.builtins.hasOwnProperty(S)},_.get=function(S){return this.current.hasOwnProperty(S)?this.current[S]:this.builtins[S]},_.set=function(S,A,L){if(L===void 0&&(L=!1),L){for(var F=0;F0&&(this.undefStack[this.undefStack.length-1][S]=A)}else{var Y=this.undefStack[this.undefStack.length-1];Y&&!Y.hasOwnProperty(S)&&(Y[S]=this.current[S])}A==null?delete this.current[S]:this.current[S]=A},R}(),Dv=Rf,Mv=Dv;ee("\\noexpand",function(R){var _=R.popToken();return R.isExpandable(_.text)&&(_.noexpand=!0,_.treatAsRelax=!0),{tokens:[_],numArgs:0}}),ee("\\expandafter",function(R){var _=R.popToken();return R.expandOnce(!0),{tokens:[_],numArgs:0}}),ee("\\@firstoftwo",function(R){var _=R.consumeArgs(2);return{tokens:_[0],numArgs:0}}),ee("\\@secondoftwo",function(R){var _=R.consumeArgs(2);return{tokens:_[1],numArgs:0}}),ee("\\@ifnextchar",function(R){var _=R.consumeArgs(3);R.consumeSpaces();var x=R.future();return _[0].length===1&&_[0][0].text===x.text?{tokens:_[1],numArgs:0}:{tokens:_[2],numArgs:0}}),ee("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),ee("\\TextOrMath",function(R){var _=R.consumeArgs(2);return R.mode==="text"?{tokens:_[0],numArgs:0}:{tokens:_[1],numArgs:0}});var qf={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};ee("\\char",function(R){var _=R.popToken(),x,S="";if(_.text==="'")x=8,_=R.popToken();else if(_.text==='"')x=16,_=R.popToken();else if(_.text==="`")if(_=R.popToken(),_.text[0]==="\\")S=_.text.charCodeAt(1);else{if(_.text==="EOF")throw new a("\\char` missing argument");S=_.text.charCodeAt(0)}else x=10;if(x){if(S=qf[_.text],S==null||S>=x)throw new a("Invalid base-"+x+" digit "+_.text);for(var A;(A=qf[R.future().text])!=null&&A":"\\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"};ee("\\dots",function(R){var _="\\dotso",x=R.expandAfterFuture().text;return x in Lv?_=Lv[x]:(x.slice(0,4)==="\\not"||x in ar.math&&y.contains(["bin","rel"],ar.math[x].group))&&(_="\\dotsb"),_});var ko={")":!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};ee("\\dotso",function(R){var _=R.future().text;return _ in ko?"\\ldots\\,":"\\ldots"}),ee("\\dotsc",function(R){var _=R.future().text;return _ in ko&&_!==","?"\\ldots\\,":"\\ldots"}),ee("\\cdots",function(R){var _=R.future().text;return _ in ko?"\\@cdots\\,":"\\@cdots"}),ee("\\dotsb","\\cdots"),ee("\\dotsm","\\cdots"),ee("\\dotsi","\\!\\cdots"),ee("\\dotsx","\\ldots\\,"),ee("\\DOTSI","\\relax"),ee("\\DOTSB","\\relax"),ee("\\DOTSX","\\relax"),ee("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),ee("\\,","\\tmspace+{3mu}{.1667em}"),ee("\\thinspace","\\,"),ee("\\>","\\mskip{4mu}"),ee("\\:","\\tmspace+{4mu}{.2222em}"),ee("\\medspace","\\:"),ee("\\;","\\tmspace+{5mu}{.2777em}"),ee("\\thickspace","\\;"),ee("\\!","\\tmspace-{3mu}{.1667em}"),ee("\\negthinspace","\\!"),ee("\\negmedspace","\\tmspace-{4mu}{.2222em}"),ee("\\negthickspace","\\tmspace-{5mu}{.277em}"),ee("\\enspace","\\kern.5em "),ee("\\enskip","\\hskip.5em\\relax"),ee("\\quad","\\hskip1em\\relax"),ee("\\qquad","\\hskip2em\\relax"),ee("\\tag","\\@ifstar\\tag@literal\\tag@paren"),ee("\\tag@paren","\\tag@literal{({#1})}"),ee("\\tag@literal",function(R){if(R.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),ee("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),ee("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),ee("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),ee("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),ee("\\newline","\\\\\\relax"),ee("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Ev=Ve(Kt["Main-Regular"]["T".charCodeAt(0)][1]-.7*Kt["Main-Regular"]["A".charCodeAt(0)][1]);ee("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ev+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),ee("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ev+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),ee("\\hspace","\\@ifstar\\@hspacer\\@hspace"),ee("\\@hspace","\\hskip #1\\relax"),ee("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),ee("\\ordinarycolon",":"),ee("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),ee("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),ee("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),ee("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),ee("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),ee("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),ee("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),ee("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),ee("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),ee("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),ee("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),ee("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),ee("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),ee("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),ee("∷","\\dblcolon"),ee("∹","\\eqcolon"),ee("≔","\\coloneqq"),ee("≕","\\eqqcolon"),ee("⩴","\\Coloneqq"),ee("\\ratio","\\vcentcolon"),ee("\\coloncolon","\\dblcolon"),ee("\\colonequals","\\coloneqq"),ee("\\coloncolonequals","\\Coloneqq"),ee("\\equalscolon","\\eqqcolon"),ee("\\equalscoloncolon","\\Eqqcolon"),ee("\\colonminus","\\coloneq"),ee("\\coloncolonminus","\\Coloneq"),ee("\\minuscolon","\\eqcolon"),ee("\\minuscoloncolon","\\Eqcolon"),ee("\\coloncolonapprox","\\Colonapprox"),ee("\\coloncolonsim","\\Colonsim"),ee("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ee("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ee("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ee("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ee("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),ee("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),ee("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),ee("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),ee("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),ee("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),ee("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),ee("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),ee("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),ee("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),ee("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),ee("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),ee("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),ee("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),ee("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),ee("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),ee("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),ee("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),ee("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),ee("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),ee("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),ee("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),ee("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),ee("\\imath","\\html@mathml{\\@imath}{ı}"),ee("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),ee("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),ee("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),ee("⟦","\\llbracket"),ee("⟧","\\rrbracket"),ee("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),ee("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),ee("⦃","\\lBrace"),ee("⦄","\\rBrace"),ee("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),ee("⦵","\\minuso"),ee("\\darr","\\downarrow"),ee("\\dArr","\\Downarrow"),ee("\\Darr","\\Downarrow"),ee("\\lang","\\langle"),ee("\\rang","\\rangle"),ee("\\uarr","\\uparrow"),ee("\\uArr","\\Uparrow"),ee("\\Uarr","\\Uparrow"),ee("\\N","\\mathbb{N}"),ee("\\R","\\mathbb{R}"),ee("\\Z","\\mathbb{Z}"),ee("\\alef","\\aleph"),ee("\\alefsym","\\aleph"),ee("\\Alpha","\\mathrm{A}"),ee("\\Beta","\\mathrm{B}"),ee("\\bull","\\bullet"),ee("\\Chi","\\mathrm{X}"),ee("\\clubs","\\clubsuit"),ee("\\cnums","\\mathbb{C}"),ee("\\Complex","\\mathbb{C}"),ee("\\Dagger","\\ddagger"),ee("\\diamonds","\\diamondsuit"),ee("\\empty","\\emptyset"),ee("\\Epsilon","\\mathrm{E}"),ee("\\Eta","\\mathrm{H}"),ee("\\exist","\\exists"),ee("\\harr","\\leftrightarrow"),ee("\\hArr","\\Leftrightarrow"),ee("\\Harr","\\Leftrightarrow"),ee("\\hearts","\\heartsuit"),ee("\\image","\\Im"),ee("\\infin","\\infty"),ee("\\Iota","\\mathrm{I}"),ee("\\isin","\\in"),ee("\\Kappa","\\mathrm{K}"),ee("\\larr","\\leftarrow"),ee("\\lArr","\\Leftarrow"),ee("\\Larr","\\Leftarrow"),ee("\\lrarr","\\leftrightarrow"),ee("\\lrArr","\\Leftrightarrow"),ee("\\Lrarr","\\Leftrightarrow"),ee("\\Mu","\\mathrm{M}"),ee("\\natnums","\\mathbb{N}"),ee("\\Nu","\\mathrm{N}"),ee("\\Omicron","\\mathrm{O}"),ee("\\plusmn","\\pm"),ee("\\rarr","\\rightarrow"),ee("\\rArr","\\Rightarrow"),ee("\\Rarr","\\Rightarrow"),ee("\\real","\\Re"),ee("\\reals","\\mathbb{R}"),ee("\\Reals","\\mathbb{R}"),ee("\\Rho","\\mathrm{P}"),ee("\\sdot","\\cdot"),ee("\\sect","\\S"),ee("\\spades","\\spadesuit"),ee("\\sub","\\subset"),ee("\\sube","\\subseteq"),ee("\\supe","\\supseteq"),ee("\\Tau","\\mathrm{T}"),ee("\\thetasym","\\vartheta"),ee("\\weierp","\\wp"),ee("\\Zeta","\\mathrm{Z}"),ee("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),ee("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),ee("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),ee("\\bra","\\mathinner{\\langle{#1}|}"),ee("\\ket","\\mathinner{|{#1}\\rangle}"),ee("\\braket","\\mathinner{\\langle{#1}\\rangle}"),ee("\\Bra","\\left\\langle#1\\right|"),ee("\\Ket","\\left|#1\\right\\rangle");var Iv=function(_){return function(x){var S=x.consumeArg().tokens,A=x.consumeArg().tokens,L=x.consumeArg().tokens,F=x.consumeArg().tokens,Y=x.macros.get("|"),Q=x.macros.get("\\|");x.macros.beginGroup();var te=function(we){return function(Te){_&&(Te.macros.set("|",Y),L.length&&Te.macros.set("\\|",Q));var Ne=we;if(!we&&L.length){var We=Te.future();We.text==="|"&&(Te.popToken(),Ne=!0)}return{tokens:Ne?L:A,numArgs:0}}};x.macros.set("|",te(!1)),L.length&&x.macros.set("\\|",te(!0));var le=x.consumeArg().tokens,me=x.expandTokens([].concat(F,le,S));return x.macros.endGroup(),{tokens:me.reverse(),numArgs:0}}};ee("\\bra@ket",Iv(!1)),ee("\\bra@set",Iv(!0)),ee("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),ee("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),ee("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),ee("\\angln","{\\angl n}"),ee("\\blue","\\textcolor{##6495ed}{#1}"),ee("\\orange","\\textcolor{##ffa500}{#1}"),ee("\\pink","\\textcolor{##ff00af}{#1}"),ee("\\red","\\textcolor{##df0030}{#1}"),ee("\\green","\\textcolor{##28ae7b}{#1}"),ee("\\gray","\\textcolor{gray}{#1}"),ee("\\purple","\\textcolor{##9d38bd}{#1}"),ee("\\blueA","\\textcolor{##ccfaff}{#1}"),ee("\\blueB","\\textcolor{##80f6ff}{#1}"),ee("\\blueC","\\textcolor{##63d9ea}{#1}"),ee("\\blueD","\\textcolor{##11accd}{#1}"),ee("\\blueE","\\textcolor{##0c7f99}{#1}"),ee("\\tealA","\\textcolor{##94fff5}{#1}"),ee("\\tealB","\\textcolor{##26edd5}{#1}"),ee("\\tealC","\\textcolor{##01d1c1}{#1}"),ee("\\tealD","\\textcolor{##01a995}{#1}"),ee("\\tealE","\\textcolor{##208170}{#1}"),ee("\\greenA","\\textcolor{##b6ffb0}{#1}"),ee("\\greenB","\\textcolor{##8af281}{#1}"),ee("\\greenC","\\textcolor{##74cf70}{#1}"),ee("\\greenD","\\textcolor{##1fab54}{#1}"),ee("\\greenE","\\textcolor{##0d923f}{#1}"),ee("\\goldA","\\textcolor{##ffd0a9}{#1}"),ee("\\goldB","\\textcolor{##ffbb71}{#1}"),ee("\\goldC","\\textcolor{##ff9c39}{#1}"),ee("\\goldD","\\textcolor{##e07d10}{#1}"),ee("\\goldE","\\textcolor{##a75a05}{#1}"),ee("\\redA","\\textcolor{##fca9a9}{#1}"),ee("\\redB","\\textcolor{##ff8482}{#1}"),ee("\\redC","\\textcolor{##f9685d}{#1}"),ee("\\redD","\\textcolor{##e84d39}{#1}"),ee("\\redE","\\textcolor{##bc2612}{#1}"),ee("\\maroonA","\\textcolor{##ffbde0}{#1}"),ee("\\maroonB","\\textcolor{##ff92c6}{#1}"),ee("\\maroonC","\\textcolor{##ed5fa6}{#1}"),ee("\\maroonD","\\textcolor{##ca337c}{#1}"),ee("\\maroonE","\\textcolor{##9e034e}{#1}"),ee("\\purpleA","\\textcolor{##ddd7ff}{#1}"),ee("\\purpleB","\\textcolor{##c6b9fc}{#1}"),ee("\\purpleC","\\textcolor{##aa87ff}{#1}"),ee("\\purpleD","\\textcolor{##7854ab}{#1}"),ee("\\purpleE","\\textcolor{##543b78}{#1}"),ee("\\mintA","\\textcolor{##f5f9e8}{#1}"),ee("\\mintB","\\textcolor{##edf2df}{#1}"),ee("\\mintC","\\textcolor{##e0e5cc}{#1}"),ee("\\grayA","\\textcolor{##f6f7f7}{#1}"),ee("\\grayB","\\textcolor{##f0f1f2}{#1}"),ee("\\grayC","\\textcolor{##e3e5e6}{#1}"),ee("\\grayD","\\textcolor{##d6d8da}{#1}"),ee("\\grayE","\\textcolor{##babec2}{#1}"),ee("\\grayF","\\textcolor{##888d93}{#1}"),ee("\\grayG","\\textcolor{##626569}{#1}"),ee("\\grayH","\\textcolor{##3b3e40}{#1}"),ee("\\grayI","\\textcolor{##21242c}{#1}"),ee("\\kaBlue","\\textcolor{##314453}{#1}"),ee("\\kaGreen","\\textcolor{##71B307}{#1}");var Bv={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},f_=function(){function R(x,S,A){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=S,this.expansionCount=0,this.feed(x),this.macros=new c_(Mv,S.macros),this.mode=A,this.stack=[]}var _=R.prototype;return _.feed=function(S){this.lexer=new kv(S,this.settings)},_.switchMode=function(S){this.mode=S},_.beginGroup=function(){this.macros.beginGroup()},_.endGroup=function(){this.macros.endGroup()},_.endGroups=function(){this.macros.endGroups()},_.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},_.popToken=function(){return this.future(),this.stack.pop()},_.pushToken=function(S){this.stack.push(S)},_.pushTokens=function(S){var A;(A=this.stack).push.apply(A,S)},_.scanArgument=function(S){var A,L,F;if(S){if(this.consumeSpaces(),this.future().text!=="[")return null;A=this.popToken();var Y=this.consumeArg(["]"]);F=Y.tokens,L=Y.end}else{var Q=this.consumeArg();F=Q.tokens,A=Q.start,L=Q.end}return this.pushToken(new Ia("EOF",L.loc)),this.pushTokens(F),A.range(L,"")},_.consumeSpaces=function(){for(;;){var S=this.future();if(S.text===" ")this.stack.pop();else break}},_.consumeArg=function(S){var A=[],L=S&&S.length>0;L||this.consumeSpaces();var F=this.future(),Y,Q=0,te=0;do{if(Y=this.popToken(),A.push(Y),Y.text==="{")++Q;else if(Y.text==="}"){if(--Q,Q===-1)throw new a("Extra }",Y)}else if(Y.text==="EOF")throw new a("Unexpected end of input in a macro argument, expected '"+(S&&L?S[te]:"}")+"'",Y);if(S&&L)if((Q===0||Q===1&&S[te]==="{")&&Y.text===S[te]){if(++te,te===S.length){A.splice(-te,te);break}}else te=0}while(Q!==0||L);return F.text==="{"&&A[A.length-1].text==="}"&&(A.pop(),A.shift()),A.reverse(),{tokens:A,start:F,end:Y}},_.consumeArgs=function(S,A){if(A){if(A.length!==S+1)throw new a("The length of delimiters doesn't match the number of args!");for(var L=A[0],F=0;Fthis.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting");var Y=F.tokens,Q=this.consumeArgs(F.numArgs,F.delimiters);if(F.numArgs){Y=Y.slice();for(var te=Y.length-1;te>=0;--te){var le=Y[te];if(le.text==="#"){if(te===0)throw new a("Incomplete placeholder at end of macro body",le);if(le=Y[--te],le.text==="#")Y.splice(te+1,1);else if(/^[1-9]$/.test(le.text)){var me;(me=Y).splice.apply(me,[te,2].concat(Q[+le.text-1]))}else throw new a("Not a valid argument number",le)}}}return this.pushTokens(Y),Y.length},_.expandAfterFuture=function(){return this.expandOnce(),this.future()},_.expandNextToken=function(){for(;;)if(this.expandOnce()===!1){var S=this.stack.pop();return S.treatAsRelax&&(S.text="\\relax"),S}throw new Error},_.expandMacro=function(S){return this.macros.has(S)?this.expandTokens([new Ia(S)]):void 0},_.expandTokens=function(S){var A=[],L=this.stack.length;for(this.pushTokens(S);this.stack.length>L;)if(this.expandOnce(!0)===!1){var F=this.stack.pop();F.treatAsRelax&&(F.noexpand=!1,F.treatAsRelax=!1),A.push(F)}return A},_.expandMacroAsText=function(S){var A=this.expandMacro(S);return A&&A.map(function(L){return L.text}).join("")},_._getExpansion=function(S){var A=this.macros.get(S);if(A==null)return A;if(S.length===1){var L=this.lexer.catcodes[S];if(L!=null&&L!==13)return}var F=typeof A=="function"?A(this):A;if(typeof F=="string"){var Y=0;if(F.indexOf("#")!==-1)for(var Q=F.replace(/##/g,"");Q.indexOf("#"+(Y+1))!==-1;)++Y;for(var te=new kv(F,this.settings),le=[],me=te.lex();me.text!=="EOF";)le.push(me),me=te.lex();le.reverse();var be={tokens:le,numArgs:Y};return be}return F},_.isDefined=function(S){return this.macros.has(S)||Ra.hasOwnProperty(S)||ar.math.hasOwnProperty(S)||ar.text.hasOwnProperty(S)||Bv.hasOwnProperty(S)},_.isExpandable=function(S){var A=this.macros.get(S);return A!=null?typeof A=="string"||typeof A=="function"||!A.unexpandable:Ra.hasOwnProperty(S)&&!Ra[S].primitive},R}(),$h=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Gh=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Wf={"́":{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"}},Pv={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"},Rv=function(){function R(x,S){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 f_(x,S,this.mode),this.settings=S,this.leftrightDepth=0}var _=R.prototype;return _.expect=function(S,A){if(A===void 0&&(A=!0),this.fetch().text!==S)throw new a("Expected '"+S+"', got '"+this.fetch().text+"'",this.fetch());A&&this.consume()},_.consume=function(){this.nextToken=null},_.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},_.switchMode=function(S){this.mode=S,this.gullet.switchMode(S)},_.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var S=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),S}finally{this.gullet.endGroups()}},_.subparse=function(S){var A=this.nextToken;this.consume(),this.gullet.pushToken(new Ia("}")),this.gullet.pushTokens(S);var L=this.parseExpression(!1);return this.expect("}"),this.nextToken=A,L},_.parseExpression=function(S,A){for(var L=[];;){this.mode==="math"&&this.consumeSpaces();var F=this.fetch();if(R.endOfExpression.indexOf(F.text)!==-1||A&&F.text===A||S&&Ra[F.text]&&Ra[F.text].infix)break;var Y=this.parseAtom(A);if(Y){if(Y.type==="internal")continue}else break;L.push(Y)}return this.mode==="text"&&this.formLigatures(L),this.handleInfixNodes(L)},_.handleInfixNodes=function(S){for(var A=-1,L,F=0;F=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+A[0]+'" used in math mode',S);var te=ar[this.mode][A].group,le=pi.range(S),me;if(ea.hasOwnProperty(te)){var be=te;me={type:"atom",mode:this.mode,family:be,loc:le,text:A}}else me={type:te,mode:this.mode,loc:le,text:A};Q=me}else if(A.charCodeAt(0)>=128)this.settings.strict&&(Qe(A.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+A[0]+'" used in math mode',S):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+A[0]+'"'+(" ("+A.charCodeAt(0)+")"),S)),Q={type:"textord",mode:"text",loc:pi.range(S),text:A};else return null;if(this.consume(),Y)for(var we=0;wethis.revoke(C)}revoke(C){const k=this.listeners.indexOf(C);k>=0&&this.listeners.splice(k,1)}revokeAll(){this.listeners.splice(0)}call(...C){for(const k of this.listeners)k(...C)}}function l(){return l=Object.assign||function(p){for(var C=1;C=0)&&(k[E]=p[E]);return k}const h=["textContent"];function c(p){return p.replace(/[&<"]/g,C=>({"&":"&","<":"<",'"':"""})[C])}function f(p){return p.replace(/<(\/script>)/g,"\\x3c$2")}function d(p,C){const k=C?Object.entries(C).map(([I,E])=>{if(!(E==null||E===!1))return I=` ${c(I)}`,E===!0?I:`${I}="${c(E)}"`}).filter(Boolean).join(""):"";return`<${p}${k}>`}function v(p){return``}function g(p,C,k){return C==null?d(p,k):d(p,k)+(C||"")+v(p)}function m(p,C){const k=C.map(I=>typeof I=="function"?I.toString():JSON.stringify(I??null)).join(",");return`(${p.toString()})(${k})`}function y(p,C){return p.map(k=>{if(k.type==="script"){const I=k.data,{textContent:E}=I,z=u(I,h);return g("script",E||"",z)}if(k.type==="iife"){const{fn:I,getParams:E}=k.data;return g("script",f(m(I,(E==null?void 0:E(C))||[])))}return""})}function b(p){return p.map(C=>C.type==="stylesheet"?g("link",null,l({rel:"stylesheet"},C.data)):g("style",C.data))}Math.random().toString(36).slice(2,8);function w(p,{before:C,after:k}){return function(...E){const z={args:E,thisObj:this};try{C&&C(z)}catch{}z.result=p.apply(z.thisObj,z.args);try{k&&k(z)}catch{}return z.result}}function T(p){const C={};return function(...I){const E=`${I[0]}`;let z=C[E];return z||(z={value:p(...I)},C[E]=z),z.value}}function M(p,C,k){const I=document.createElement(p);return C&&Object.entries(C).forEach(([E,z])=>{I[E]=z}),k&&Object.entries(k).forEach(([E,z])=>{I.setAttribute(E,z)}),I}const D=T(p=>{document.head.append(M("link",{rel:"preload",as:"script",href:p}))});async function P(p,C){if(!p.loaded&&(p.type==="script"&&(p.loaded=new Promise((k,I)=>{var E;document.head.append(M("script",l({},p.data,{onload:k,onerror:I}))),(E=p.data)!=null&&E.src||k(void 0)}).then(()=>{p.loaded=!0})),p.type==="iife")){const{fn:k,getParams:I}=p.data;k(...(I==null?void 0:I(C))||[]),p.loaded=!0}await p.loaded}async function O(p,C){const k=p.filter(I=>{var E;return I.type==="script"&&((E=I.data)==null?void 0:E.src)});k.length>1&&k.forEach(I=>D(I.data.src)),C=l({getMarkmap:()=>window.markmap},C);for(const I of p)await P(I,C)}const V=` @@ -313,33 +313,33 @@ l0,-`+(x+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, `},Ae.dt_close=function(){return` `},Ae.dd_close=function(){return` `};function Xt(p,C){return++C>=p.length-2?C:p[C].type==="paragraph_open"&&p[C].tight&&p[C+1].type==="inline"&&p[C+1].content.length===0&&p[C+2].type==="paragraph_close"&&p[C+2].tight?Xt(p,C+2):C}var ht=Ae.getBreak=function(C,k){return k=Xt(C,k),k"u"&&(I.abbreviations[":"+re]=fe),U)}function Gr(p){var C=p.tokens,k,I,E,z;if(!p.inlineMode){for(k=1,I=C.length-1;k1)||k===41&&(I--,I<0))break;C++}return z===C||(E=ye(p.src.slice(z,C)),!p.parser.validateLink(E))?!1:(p.linkContent=E,p.pos=C,!0)}function yo(p,C){var k,I=C,E=p.posMax,z=p.src.charCodeAt(C);if(z!==34&&z!==39&&z!==40)return!1;for(C++,z===40&&(z=41);C"u"&&(I.references[Le]={title:ve,href:ue}),U)}function as(p){var C=p.tokens,k,I,E,z;if(p.env.references=p.env.references||{},!p.inlineMode){for(k=1,I=C.length-1;k0?U[C].count:1,I=0;I=0;C--)if(z=E[C],z.type==="text"){for(re=0,U=z.content,ue.lastIndex=0,fe=z.level,X=[];ve=ue.exec(U);)ue.lastIndex>re&&X.push({type:"text",content:U.slice(re,ve.index+ve[1].length),level:fe}),X.push({type:"abbr_open",title:p.env.abbreviations[":"+ve[2]],level:fe++}),X.push({type:"text",content:ve[2],level:fe}),X.push({type:"abbr_close",level:--fe}),re=ue.lastIndex-ve[3].length;X.length&&(re=0;z--)if(p.tokens[z].type==="inline")for(E=p.tokens[z].children,C=E.length-1;C>=0;C--)k=E[C],k.type==="text"&&(I=k.content,I=Zr(I),os.test(I)&&(I=I.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),k.content=I)}}var hh=/['"]/,yr=/['"]/g,Yn=/[-\s()\[\]]/,ss="’";function _l(p,C){return C<0||C>=p.length?!1:!Yn.test(p[C])}function Ai(p,C,k){return p.substr(0,C)+k+p.substr(C+1)}function nn(p){var C,k,I,E,z,U,X,re,fe,ue,ve,Le,Ee,Oe,Ze,yt,Bt;if(p.options.typographer){for(Bt=[],Ze=p.tokens.length-1;Ze>=0;Ze--)if(p.tokens[Ze].type==="inline"){for(yt=p.tokens[Ze].children,Bt.length=0,C=0;C=0&&!(Bt[Ee].level<=X);Ee--);Bt.length=Ee+1,I=k.content,z=0,U=I.length;e:for(;z=0&&(ue=Bt[Ee],!(Bt[Ee].level=this.eMarks[C]},vn.prototype.skipEmptyLines=function(C){for(var k=this.lineMax;CI;)if(k!==this.src.charCodeAt(--C))return C+1;return C},vn.prototype.getLines=function(C,k,I,E){var z,U,X,re,fe,ue=C;if(C>=k)return"";if(ue+1===k)return U=this.bMarks[ue]+Math.min(this.tShift[ue],I),X=E?this.eMarks[ue]+1:this.eMarks[ue],this.src.slice(U,X);for(re=new Array(k-C),z=0;ueI&&(fe=I),fe<0&&(fe=0),U=this.bMarks[ue]+fe,ue+1=4){I++,E=I;continue}break}return p.line=I,p.tokens.push({type:"code",content:p.getLines(C,E,4+p.blkIndent,!0),block:!0,lines:[C,p.line],level:p.level}),!0}function vf(p,C,k,I){var E,z,U,X,re,fe=!1,ue=p.bMarks[C]+p.tShift[C],ve=p.eMarks[C];if(ue+3>ve||(E=p.src.charCodeAt(ue),E!==126&&E!==96)||(re=ue,ue=p.skipChars(ue,E),z=ue-re,z<3)||(U=p.src.slice(ue,ve).trim(),U.indexOf("`")>=0))return!1;if(I)return!0;for(X=C;X++,!(X>=k||(ue=re=p.bMarks[X]+p.tShift[X],ve=p.eMarks[X],ue=4)&&(ue=p.skipChars(ue,E),!(ue-reyt||p.src.charCodeAt(Ze++)!==62||p.level>=p.options.maxNesting)return!1;if(I)return!0;for(p.src.charCodeAt(Ze)===32&&Ze++,re=p.blkIndent,p.blkIndent=0,X=[p.bMarks[C]],p.bMarks[C]=Ze,Ze=Ze=yt,U=[p.tShift[C]],p.tShift[C]=Ze-p.bMarks[C],ve=p.parser.ruler.getRules("blockquote"),E=C+1;E=yt));E++){if(p.src.charCodeAt(Ze++)===62){p.src.charCodeAt(Ze)===32&&Ze++,X.push(p.bMarks[E]),p.bMarks[E]=Ze,Ze=Ze=yt,U.push(p.tShift[E]),p.tShift[E]=Ze-p.bMarks[E];continue}if(z)break;for(Oe=!1,Le=0,Ee=ve.length;Lere||(E=p.src.charCodeAt(X++),E!==42&&E!==45&&E!==95))return!1;for(z=1;X=E||(k=p.src.charCodeAt(I++),k!==42&&k!==45&&k!==43)||I=E||(k=p.src.charCodeAt(I++),k<48||k>57))return-1;for(;;){if(I>=E)return-1;if(k=p.src.charCodeAt(I++),!(k>=48&&k<=57)){if(k===41||k===46)break;return-1}}return I=0)yt=!0;else if((ve=ka(p,C))>=0)yt=!1;else return!1;if(p.level>=p.options.maxNesting)return!1;if(Ze=p.src.charCodeAt(ve-1),I)return!0;for(Pt=p.tokens.length,yt?(ue=p.bMarks[C]+p.tShift[C],Oe=Number(p.src.substr(ue,ve-ue-1)),p.tokens.push({type:"ordered_list_open",order:Oe,lines:na=[C,0],level:p.level++})):p.tokens.push({type:"bullet_list_open",lines:na=[C,0],level:p.level++}),E=C,yn=!1,y_=p.parser.ruler.getRules("list");E=Le?Ee=1:Ee=Bt-ve,Ee>4&&(Ee=1),Ee<1&&(Ee=1),z=ve-p.bMarks[E]+Ee,p.tokens.push({type:"list_item_open",lines:Gv=[C,0],level:p.level++}),X=p.blkIndent,re=p.tight,U=p.tShift[C],fe=p.parentType,p.tShift[C]=Bt-p.bMarks[C],p.blkIndent=z,p.tight=!0,p.parentType="list",p.parser.tokenize(p,C,k,!0),(!p.tight||yn)&&(L6=!1),yn=p.line-C>1&&p.isEmpty(p.line-1),p.blkIndent=X,p.tShift[C]=U,p.tight=re,p.parentType=fe,p.tokens.push({type:"list_item_close",level:--p.level}),E=C=p.line,Gv[1]=E,Bt=p.bMarks[C],!(E>=k||p.isEmpty(E)||p.tShift[E]ue||p.src.charCodeAt(fe)!==91||p.src.charCodeAt(fe+1)!==94||p.level>=p.options.maxNesting)return!1;for(X=fe+2;X=ue||p.src.charCodeAt(++X)!==58?!1:(I||(X++,p.env.footnotes||(p.env.footnotes={}),p.env.footnotes.refs||(p.env.footnotes.refs={}),re=p.src.slice(fe+2,X-2),p.env.footnotes.refs[":"+re]=-1,p.tokens.push({type:"footnote_reference_open",label:re,level:p.level++}),E=p.bMarks[C],z=p.tShift[C],U=p.parentType,p.tShift[C]=p.skipSpaces(X)-X,p.bMarks[C]=X,p.blkIndent+=4,p.parentType="footnote",p.tShift[C]=re||(E=p.src.charCodeAt(X),E!==35||X>=re))return!1;for(z=1,E=p.src.charCodeAt(++X);E===35&&X6||XX&&p.src.charCodeAt(U-1)===32&&(re=U),p.line=C+1,p.tokens.push({type:"heading_open",hLevel:z,lines:[C,p.line],level:p.level}),X=k||p.tShift[U]3||(E=p.bMarks[U]+p.tShift[U],z=p.eMarks[U],E>=z)||(I=p.src.charCodeAt(E),I!==45&&I!==61)||(E=p.skipChars(E,I),E=p.skipSpaces(E),E]/,Hr=/^<\/([a-zA-Z]{1,15})[\s>]/;function at(p){var C=p|32;return C>=97&&C<=122}function oe(p,C,k,I){var E,z,U,X=p.bMarks[C],re=p.eMarks[C],fe=p.tShift[C];if(X+=fe,!p.options.html||fe>3||X+2>=re||p.src.charCodeAt(X)!==60)return!1;if(E=p.src.charCodeAt(X+1),E===33||E===63){if(I)return!0}else if(E===47||at(E)){if(E===47){if(z=p.src.slice(X,re).match(Hr),!z)return!1}else if(z=p.src.slice(X,re).match(je),!z)return!1;if(rr[z[1].toLowerCase()]!==!0)return!1;if(I)return!0}else return!1;for(U=C+1;Uk||(re=C+1,p.tShift[re]=p.eMarks[re])||(E=p.src.charCodeAt(U),E!==124&&E!==45&&E!==58)||(z=ke(p,C+1),!/^[-:| ]+$/.test(z))||(fe=z.split("|"),fe<=2))return!1;for(ve=[],X=0;X=z||(I=p.src.charCodeAt(E++),I!==126&&I!==58)||(k=p.skipSpaces(E),E===k)||k>=z?-1:k}function ne(p,C){var k,I,E=p.level+2;for(k=C+2,I=p.tokens.length-2;k=0;if(ue=C+1,p.isEmpty(ue)&&++ue>k||p.tShift[ue]=p.options.maxNesting)return!1;fe=p.tokens.length,p.tokens.push({type:"dl_open",lines:re=[C,0],level:p.level++}),U=C,z=ue;e:for(;;){for(Bt=!0,yt=!1,p.tokens.push({type:"dt_open",lines:[U,U],level:p.level++}),p.tokens.push({type:"inline",content:p.getLines(U,U+1,p.blkIndent,!1).trim(),level:p.level+1,lines:[U,U],children:[]}),p.tokens.push({type:"dt_close",level:--p.level});;){if(p.tokens.push({type:"dd_open",lines:X=[ue,0],level:p.level++}),Ze=p.tight,Le=p.ddIndent,ve=p.blkIndent,Oe=p.tShift[z],Ee=p.parentType,p.blkIndent=p.ddIndent=p.tShift[z]+2,p.tShift[z]=E-p.bMarks[z],p.tight=!0,p.parentType="deflist",p.parser.tokenize(p,z,k,!0),(!p.tight||yt)&&(Bt=!1),yt=p.line-z>1&&p.isEmpty(p.line-1),p.tShift[z]=Oe,p.tight=Ze,p.parentType=Ee,p.blkIndent=ve,p.ddIndent=Le,p.tokens.push({type:"dd_close",level:--p.level}),X[1]=ue=p.line,ue>=k||p.tShift[ue]=k||(U=ue,p.isEmpty(U))||p.tShift[U]=k)||(p.isEmpty(z)&&z++,z>=k)||p.tShift[z]3)){for(E=!1,z=0,U=re.length;z=k||p.tShift[z]=0&&(p=p.replace(us,function(X,re){var fe;return p.charCodeAt(re)===10?(z=re+1,U=0,X):(fe=" ".slice((re-z-U)%4),U=re-z+1,fe)})),E=new vn(p,this,C,k,I),this.tokenize(E,E.line,E.lineMax)};function mf(p){switch(p){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function Rp(p,C){for(var k=p.pos;k=0&&p.pending.charCodeAt(k)===32)if(k>=1&&p.pending.charCodeAt(k-1)===32){for(var z=k-2;z>=0;z--)if(p.pending.charCodeAt(z)!==32){p.pending=p.pending.substring(0,z+1);break}p.push({type:"hardbreak",level:p.level})}else p.pending=p.pending.slice(0,-1),p.push({type:"softbreak",level:p.level});else p.push({type:"softbreak",level:p.level});for(E++;E?@[]^_`{|}~-".split("").forEach(function(p){bl[p.charCodeAt(0)]=1});function kt(p,C){var k,I=p.pos,E=p.posMax;if(p.src.charCodeAt(I)!==92)return!1;if(I++,I=z||p.src.charCodeAt(U+1)!==126||p.level>=p.options.maxNesting||(X=U>0?p.src.charCodeAt(U-1):-1,re=p.src.charCodeAt(U+2),X===126)||re===126||re===32||re===10)return!1;for(I=U+2;IU+3)return p.pos+=I-U,C||(p.pending+=p.src.slice(U,I)),!0;for(p.pos=U+2,E=1;p.pos+1=z||p.src.charCodeAt(U+1)!==43||p.level>=p.options.maxNesting||(X=U>0?p.src.charCodeAt(U-1):-1,re=p.src.charCodeAt(U+2),X===43)||re===43||re===32||re===10)return!1;for(I=U+2;I=z||p.src.charCodeAt(U+1)!==61||p.level>=p.options.maxNesting||(X=U>0?p.src.charCodeAt(U-1):-1,re=p.src.charCodeAt(U+2),X===61)||re===61||re===32||re===10)return!1;for(I=U+2;I=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122}function dh(p,C){var k=C,I,E,z,U=!0,X=!0,re=p.posMax,fe=p.src.charCodeAt(C);for(I=C>0?p.src.charCodeAt(C-1):-1;k=re&&(U=!1),z=k-C,z>=4?U=X=!1:(E=k=p.options.maxNesting)return!1;for(p.pos=ue+k,X=[k];p.pos?@[\]^_`{|}~-])/g;function Fp(p,C){var k,I,E=p.posMax,z=p.pos;if(p.src.charCodeAt(z)!==126||C||z+2>=E||p.level>=p.options.maxNesting)return!1;for(p.pos=z+1;p.pos?@[\]^_`{|}~-])/g;function gh(p,C){var k,I,E=p.posMax,z=p.pos;if(p.src.charCodeAt(z)!==94||C||z+2>=E||p.level>=p.options.maxNesting)return!1;for(p.pos=z+1;p.pos=p.options.maxNesting||(k=Ee+1,I=Kt(p,Ee),I<0))return!1;if(X=I+1,X=Le)return!1;for(Ee=X,tn(p,X)?(z=p.linkContent,X=p.pos):z="",Ee=X;X=Le||p.src.charCodeAt(X)!==41)return p.pos=ve,!1;X++}else{if(p.linkLevel>0)return!1;for(;X=0?E=p.src.slice(Ee,X++):X=Ee-1),E||(typeof E>"u"&&(X=I+1),E=p.src.slice(k,I)),re=p.env.references[ml(E)],!re)return p.pos=ve,!1;z=re.href,U=re.title}return C||(p.pos=k,p.posMax=I,ue?p.push({type:"image",src:z,title:U,alt:p.src.substr(k,I-k),level:p.level}):(p.push({type:"link_open",href:z,title:U,level:p.level++}),p.linkLevel++,p.parser.tokenize(p),p.linkLevel--,p.push({type:"link_close",level:--p.level}))),p.pos=X,p.posMax=Le,!0}function A2(p,C){var k,I,E,z,U=p.posMax,X=p.pos;return X+2>=U||p.src.charCodeAt(X)!==94||p.src.charCodeAt(X+1)!==91||p.level>=p.options.maxNesting||(k=X+2,I=Kt(p,X+1),I<0)?!1:(C||(p.env.footnotes||(p.env.footnotes={}),p.env.footnotes.list||(p.env.footnotes.list=[]),E=p.env.footnotes.list.length,p.pos=k,p.posMax=I,p.push({type:"footnote_ref",id:E,level:p.level}),p.linkLevel++,z=p.tokens.length,p.parser.tokenize(p),p.env.footnotes.list[E]={tokens:p.tokens.splice(z)},p.linkLevel--),p.pos=I+1,p.posMax=U,!0)}function T2(p,C){var k,I,E,z,U=p.posMax,X=p.pos;if(X+3>U||!p.env.footnotes||!p.env.footnotes.refs||p.src.charCodeAt(X)!==91||p.src.charCodeAt(X+1)!==94||p.level>=p.options.maxNesting)return!1;for(I=X+2;I=U||(I++,k=p.src.slice(X+2,I-1),typeof p.env.footnotes.refs[":"+k]>"u")?!1:(C||(p.env.footnotes.list||(p.env.footnotes.list=[]),p.env.footnotes.refs[":"+k]<0?(E=p.env.footnotes.list.length,p.env.footnotes.list[E]={label:k,count:0},p.env.footnotes.refs[":"+k]=E):E=p.env.footnotes.refs[":"+k],z=p.env.footnotes.list[E].count,p.env.footnotes.list[E].count++,p.push({type:"footnote_ref",id:E,subId:z,level:p.level})),p.pos=I,p.posMax=U,!0)}var k2=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],D2=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,M2=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function yf(p,C){var k,I,E,z,U,X=p.pos;return p.src.charCodeAt(X)!==60||(k=p.src.slice(X),k.indexOf(">")<0)?!1:(I=k.match(M2),I?k2.indexOf(I[1].toLowerCase())<0||(z=I[0].slice(1,-1),U=Ln(z),!p.parser.validateLink(z))?!1:(C||(p.push({type:"link_open",href:U,level:p.level}),p.push({type:"text",content:z,level:p.level+1}),p.push({type:"link_close",level:p.level})),p.pos+=I[0].length,!0):(E=k.match(D2),E?(z=E[0].slice(1,-1),U=Ln("mailto:"+z),p.parser.validateLink(U)?(C||(p.push({type:"link_open",href:U,level:p.level}),p.push({type:"text",content:z,level:p.level+1}),p.push({type:"link_close",level:p.level})),p.pos+=E[0].length,!0):!1):!1))}function qr(p,C){return p=p.source,C=C||"",function k(I,E){return I?(E=E.source||E,p=p.replace(I,E),k):new RegExp(p,C)}}var Op=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,L2=/[^"'=<>`\x00-\x20]+/,E2=/'[^']*'/,Np=/"[^"]*"/,I2=qr(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",L2)("single_quoted",E2)("double_quoted",Np)(),B2=qr(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Op)("attr_value",I2)(),P2=qr(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",B2)(),R2=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,mh=/|/,zp=/<[?].*?[?]>/,Vp=/]*>/,F2=//,_e=qr(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",P2)("close_tag",R2)("comment",mh)("processing",zp)("declaration",Vp)("cdata",F2)();function vr(p){var C=p|32;return C>=97&&C<=122}function So(p,C){var k,I,E,z=p.pos;return!p.options.html||(E=p.posMax,p.src.charCodeAt(z)!==60||z+2>=E)||(k=p.src.charCodeAt(z+1),k!==33&&k!==63&&k!==47&&!vr(k))||(I=p.src.slice(z).match(_e),!I)?!1:(C||p.push({type:"htmltag",content:p.src.slice(z,z+I[0].length),level:p.level}),p.pos+=I[0].length,!0)}var ta=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,O2=/^&([a-z][a-z0-9]{1,31});/i;function N2(p,C){var k,I,E,z=p.pos,U=p.posMax;if(p.src.charCodeAt(z)!==38)return!1;if(z+10){p.pos=z;return}for(E=0;E=I)break;continue}p.pending+=p.src[p.pos++]}p.pending&&p.pushPending()},wo.prototype.parse=function(p,C,k,I){var E=new dr(p,this,C,k,I);this.tokenize(E)};function _h(p){var C=["vbscript","javascript","file","data"],k=p.trim().toLowerCase();return k=Ke(k),!(k.indexOf(":")!==-1&&C.indexOf(k.split(":")[0])!==-1)}var Xe={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Co={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},xh={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Ar={default:Xe,full:Co,commonmark:xh};function Ti(p,C,k){this.src=C,this.env=k,this.options=p.options,this.tokens=[],this.inlineMode=!1,this.inline=p.inline,this.block=p.block,this.renderer=p.renderer,this.typographer=p.typographer}function La(p,C){typeof p!="string"&&(C=p,p="default"),C&&C.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead: +`};function Zt(){this.rules=ae({},Ae),this.getBreak=Ae.getBreak}Zt.prototype.renderInline=function(p,C,k){for(var I=this.rules,E=p.length,z=0,U="";E--;)U+=I[p[z].type](p,z++,C,k,this);return U},Zt.prototype.render=function(p,C,k){for(var I=this.rules,E=p.length,z=-1,U="";++z"u"&&(I.abbreviations[":"+re]=fe),U)}function Hr(p){var C=p.tokens,k,I,E,z;if(!p.inlineMode){for(k=1,I=C.length-1;k1)||k===41&&(I--,I<0))break;C++}return z===C||(E=ye(p.src.slice(z,C)),!p.parser.validateLink(E))?!1:(p.linkContent=E,p.pos=C,!0)}function yo(p,C){var k,I=C,E=p.posMax,z=p.src.charCodeAt(C);if(z!==34&&z!==39&&z!==40)return!1;for(C++,z===40&&(z=41);C"u"&&(I.references[Le]={title:ve,href:ue}),U)}function ss(p){var C=p.tokens,k,I,E,z;if(p.env.references=p.env.references||{},!p.inlineMode){for(k=1,I=C.length-1;k0?U[C].count:1,I=0;I=0;C--)if(z=E[C],z.type==="text"){for(re=0,U=z.content,ue.lastIndex=0,fe=z.level,X=[];ve=ue.exec(U);)ue.lastIndex>re&&X.push({type:"text",content:U.slice(re,ve.index+ve[1].length),level:fe}),X.push({type:"abbr_open",title:p.env.abbreviations[":"+ve[2]],level:fe++}),X.push({type:"text",content:ve[2],level:fe}),X.push({type:"abbr_close",level:--fe}),re=ue.lastIndex-ve[3].length;X.length&&(re=0;z--)if(p.tokens[z].type==="inline")for(E=p.tokens[z].children,C=E.length-1;C>=0;C--)k=E[C],k.type==="text"&&(I=k.content,I=jr(I),ls.test(I)&&(I=I.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),k.content=I)}}var fh=/['"]/,yr=/['"]/g,Xn=/[-\s()\[\]]/,us="’";function _l(p,C){return C<0||C>=p.length?!1:!Xn.test(p[C])}function Ai(p,C,k){return p.substr(0,C)+k+p.substr(C+1)}function nn(p){var C,k,I,E,z,U,X,re,fe,ue,ve,Le,Ee,Oe,Ze,yt,Bt;if(p.options.typographer){for(Bt=[],Ze=p.tokens.length-1;Ze>=0;Ze--)if(p.tokens[Ze].type==="inline"){for(yt=p.tokens[Ze].children,Bt.length=0,C=0;C=0&&!(Bt[Ee].level<=X);Ee--);Bt.length=Ee+1,I=k.content,z=0,U=I.length;e:for(;z=0&&(ue=Bt[Ee],!(Bt[Ee].level=this.eMarks[C]},mn.prototype.skipEmptyLines=function(C){for(var k=this.lineMax;CI;)if(k!==this.src.charCodeAt(--C))return C+1;return C},mn.prototype.getLines=function(C,k,I,E){var z,U,X,re,fe,ue=C;if(C>=k)return"";if(ue+1===k)return U=this.bMarks[ue]+Math.min(this.tShift[ue],I),X=E?this.eMarks[ue]+1:this.eMarks[ue],this.src.slice(U,X);for(re=new Array(k-C),z=0;ueI&&(fe=I),fe<0&&(fe=0),U=this.bMarks[ue]+fe,ue+1=4){I++,E=I;continue}break}return p.line=I,p.tokens.push({type:"code",content:p.getLines(C,E,4+p.blkIndent,!0),block:!0,lines:[C,p.line],level:p.level}),!0}function gf(p,C,k,I){var E,z,U,X,re,fe=!1,ue=p.bMarks[C]+p.tShift[C],ve=p.eMarks[C];if(ue+3>ve||(E=p.src.charCodeAt(ue),E!==126&&E!==96)||(re=ue,ue=p.skipChars(ue,E),z=ue-re,z<3)||(U=p.src.slice(ue,ve).trim(),U.indexOf("`")>=0))return!1;if(I)return!0;for(X=C;X++,!(X>=k||(ue=re=p.bMarks[X]+p.tShift[X],ve=p.eMarks[X],ue=4)&&(ue=p.skipChars(ue,E),!(ue-reyt||p.src.charCodeAt(Ze++)!==62||p.level>=p.options.maxNesting)return!1;if(I)return!0;for(p.src.charCodeAt(Ze)===32&&Ze++,re=p.blkIndent,p.blkIndent=0,X=[p.bMarks[C]],p.bMarks[C]=Ze,Ze=Ze=yt,U=[p.tShift[C]],p.tShift[C]=Ze-p.bMarks[C],ve=p.parser.ruler.getRules("blockquote"),E=C+1;E=yt));E++){if(p.src.charCodeAt(Ze++)===62){p.src.charCodeAt(Ze)===32&&Ze++,X.push(p.bMarks[E]),p.bMarks[E]=Ze,Ze=Ze=yt,U.push(p.tShift[E]),p.tShift[E]=Ze-p.bMarks[E];continue}if(z)break;for(Oe=!1,Le=0,Ee=ve.length;Lere||(E=p.src.charCodeAt(X++),E!==42&&E!==45&&E!==95))return!1;for(z=1;X=E||(k=p.src.charCodeAt(I++),k!==42&&k!==45&&k!==43)||I=E||(k=p.src.charCodeAt(I++),k<48||k>57))return-1;for(;;){if(I>=E)return-1;if(k=p.src.charCodeAt(I++),!(k>=48&&k<=57)){if(k===41||k===46)break;return-1}}return I=0)yt=!0;else if((ve=ka(p,C))>=0)yt=!1;else return!1;if(p.level>=p.options.maxNesting)return!1;if(Ze=p.src.charCodeAt(ve-1),I)return!0;for(Pt=p.tokens.length,yt?(ue=p.bMarks[C]+p.tShift[C],Oe=Number(p.src.substr(ue,ve-ue-1)),p.tokens.push({type:"ordered_list_open",order:Oe,lines:na=[C,0],level:p.level++})):p.tokens.push({type:"bullet_list_open",lines:na=[C,0],level:p.level++}),E=C,xn=!1,__=p.parser.ruler.getRules("list");E=Le?Ee=1:Ee=Bt-ve,Ee>4&&(Ee=1),Ee<1&&(Ee=1),z=ve-p.bMarks[E]+Ee,p.tokens.push({type:"list_item_open",lines:Hv=[C,0],level:p.level++}),X=p.blkIndent,re=p.tight,U=p.tShift[C],fe=p.parentType,p.tShift[C]=Bt-p.bMarks[C],p.blkIndent=z,p.tight=!0,p.parentType="list",p.parser.tokenize(p,C,k,!0),(!p.tight||xn)&&(L6=!1),xn=p.line-C>1&&p.isEmpty(p.line-1),p.blkIndent=X,p.tShift[C]=U,p.tight=re,p.parentType=fe,p.tokens.push({type:"list_item_close",level:--p.level}),E=C=p.line,Hv[1]=E,Bt=p.bMarks[C],!(E>=k||p.isEmpty(E)||p.tShift[E]ue||p.src.charCodeAt(fe)!==91||p.src.charCodeAt(fe+1)!==94||p.level>=p.options.maxNesting)return!1;for(X=fe+2;X=ue||p.src.charCodeAt(++X)!==58?!1:(I||(X++,p.env.footnotes||(p.env.footnotes={}),p.env.footnotes.refs||(p.env.footnotes.refs={}),re=p.src.slice(fe+2,X-2),p.env.footnotes.refs[":"+re]=-1,p.tokens.push({type:"footnote_reference_open",label:re,level:p.level++}),E=p.bMarks[C],z=p.tShift[C],U=p.parentType,p.tShift[C]=p.skipSpaces(X)-X,p.bMarks[C]=X,p.blkIndent+=4,p.parentType="footnote",p.tShift[C]=re||(E=p.src.charCodeAt(X),E!==35||X>=re))return!1;for(z=1,E=p.src.charCodeAt(++X);E===35&&X6||XX&&p.src.charCodeAt(U-1)===32&&(re=U),p.line=C+1,p.tokens.push({type:"heading_open",hLevel:z,lines:[C,p.line],level:p.level}),X=k||p.tShift[U]3||(E=p.bMarks[U]+p.tShift[U],z=p.eMarks[U],E>=z)||(I=p.src.charCodeAt(E),I!==45&&I!==61)||(E=p.skipChars(E,I),E=p.skipSpaces(E),E]/,qr=/^<\/([a-zA-Z]{1,15})[\s>]/;function at(p){var C=p|32;return C>=97&&C<=122}function oe(p,C,k,I){var E,z,U,X=p.bMarks[C],re=p.eMarks[C],fe=p.tShift[C];if(X+=fe,!p.options.html||fe>3||X+2>=re||p.src.charCodeAt(X)!==60)return!1;if(E=p.src.charCodeAt(X+1),E===33||E===63){if(I)return!0}else if(E===47||at(E)){if(E===47){if(z=p.src.slice(X,re).match(qr),!z)return!1}else if(z=p.src.slice(X,re).match(je),!z)return!1;if(rr[z[1].toLowerCase()]!==!0)return!1;if(I)return!0}else return!1;for(U=C+1;Uk||(re=C+1,p.tShift[re]=p.eMarks[re])||(E=p.src.charCodeAt(U),E!==124&&E!==45&&E!==58)||(z=ke(p,C+1),!/^[-:| ]+$/.test(z))||(fe=z.split("|"),fe<=2))return!1;for(ve=[],X=0;X=z||(I=p.src.charCodeAt(E++),I!==126&&I!==58)||(k=p.skipSpaces(E),E===k)||k>=z?-1:k}function ne(p,C){var k,I,E=p.level+2;for(k=C+2,I=p.tokens.length-2;k=0;if(ue=C+1,p.isEmpty(ue)&&++ue>k||p.tShift[ue]=p.options.maxNesting)return!1;fe=p.tokens.length,p.tokens.push({type:"dl_open",lines:re=[C,0],level:p.level++}),U=C,z=ue;e:for(;;){for(Bt=!0,yt=!1,p.tokens.push({type:"dt_open",lines:[U,U],level:p.level++}),p.tokens.push({type:"inline",content:p.getLines(U,U+1,p.blkIndent,!1).trim(),level:p.level+1,lines:[U,U],children:[]}),p.tokens.push({type:"dt_close",level:--p.level});;){if(p.tokens.push({type:"dd_open",lines:X=[ue,0],level:p.level++}),Ze=p.tight,Le=p.ddIndent,ve=p.blkIndent,Oe=p.tShift[z],Ee=p.parentType,p.blkIndent=p.ddIndent=p.tShift[z]+2,p.tShift[z]=E-p.bMarks[z],p.tight=!0,p.parentType="deflist",p.parser.tokenize(p,z,k,!0),(!p.tight||yt)&&(Bt=!1),yt=p.line-z>1&&p.isEmpty(p.line-1),p.tShift[z]=Oe,p.tight=Ze,p.parentType=Ee,p.blkIndent=ve,p.ddIndent=Le,p.tokens.push({type:"dd_close",level:--p.level}),X[1]=ue=p.line,ue>=k||p.tShift[ue]=k||(U=ue,p.isEmpty(U))||p.tShift[U]=k)||(p.isEmpty(z)&&z++,z>=k)||p.tShift[z]3)){for(E=!1,z=0,U=re.length;z=k||p.tShift[z]=0&&(p=p.replace(cs,function(X,re){var fe;return p.charCodeAt(re)===10?(z=re+1,U=0,X):(fe=" ".slice((re-z-U)%4),U=re-z+1,fe)})),E=new mn(p,this,C,k,I),this.tokenize(E,E.line,E.lineMax)};function yf(p){switch(p){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function Fp(p,C){for(var k=p.pos;k=0&&p.pending.charCodeAt(k)===32)if(k>=1&&p.pending.charCodeAt(k-1)===32){for(var z=k-2;z>=0;z--)if(p.pending.charCodeAt(z)!==32){p.pending=p.pending.substring(0,z+1);break}p.push({type:"hardbreak",level:p.level})}else p.pending=p.pending.slice(0,-1),p.push({type:"softbreak",level:p.level});else p.push({type:"softbreak",level:p.level});for(E++;E?@[]^_`{|}~-".split("").forEach(function(p){bl[p.charCodeAt(0)]=1});function kt(p,C){var k,I=p.pos,E=p.posMax;if(p.src.charCodeAt(I)!==92)return!1;if(I++,I=z||p.src.charCodeAt(U+1)!==126||p.level>=p.options.maxNesting||(X=U>0?p.src.charCodeAt(U-1):-1,re=p.src.charCodeAt(U+2),X===126)||re===126||re===32||re===10)return!1;for(I=U+2;IU+3)return p.pos+=I-U,C||(p.pending+=p.src.slice(U,I)),!0;for(p.pos=U+2,E=1;p.pos+1=z||p.src.charCodeAt(U+1)!==43||p.level>=p.options.maxNesting||(X=U>0?p.src.charCodeAt(U-1):-1,re=p.src.charCodeAt(U+2),X===43)||re===43||re===32||re===10)return!1;for(I=U+2;I=z||p.src.charCodeAt(U+1)!==61||p.level>=p.options.maxNesting||(X=U>0?p.src.charCodeAt(U-1):-1,re=p.src.charCodeAt(U+2),X===61)||re===61||re===32||re===10)return!1;for(I=U+2;I=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122}function vh(p,C){var k=C,I,E,z,U=!0,X=!0,re=p.posMax,fe=p.src.charCodeAt(C);for(I=C>0?p.src.charCodeAt(C-1):-1;k=re&&(U=!1),z=k-C,z>=4?U=X=!1:(E=k=p.options.maxNesting)return!1;for(p.pos=ue+k,X=[k];p.pos?@[\]^_`{|}~-])/g;function Op(p,C){var k,I,E=p.posMax,z=p.pos;if(p.src.charCodeAt(z)!==126||C||z+2>=E||p.level>=p.options.maxNesting)return!1;for(p.pos=z+1;p.pos?@[\]^_`{|}~-])/g;function yh(p,C){var k,I,E=p.posMax,z=p.pos;if(p.src.charCodeAt(z)!==94||C||z+2>=E||p.level>=p.options.maxNesting)return!1;for(p.pos=z+1;p.pos=p.options.maxNesting||(k=Ee+1,I=Kt(p,Ee),I<0))return!1;if(X=I+1,X=Le)return!1;for(Ee=X,tn(p,X)?(z=p.linkContent,X=p.pos):z="",Ee=X;X=Le||p.src.charCodeAt(X)!==41)return p.pos=ve,!1;X++}else{if(p.linkLevel>0)return!1;for(;X=0?E=p.src.slice(Ee,X++):X=Ee-1),E||(typeof E>"u"&&(X=I+1),E=p.src.slice(k,I)),re=p.env.references[ml(E)],!re)return p.pos=ve,!1;z=re.href,U=re.title}return C||(p.pos=k,p.posMax=I,ue?p.push({type:"image",src:z,title:U,alt:p.src.substr(k,I-k),level:p.level}):(p.push({type:"link_open",href:z,title:U,level:p.level++}),p.linkLevel++,p.parser.tokenize(p),p.linkLevel--,p.push({type:"link_close",level:--p.level}))),p.pos=X,p.posMax=Le,!0}function T2(p,C){var k,I,E,z,U=p.posMax,X=p.pos;return X+2>=U||p.src.charCodeAt(X)!==94||p.src.charCodeAt(X+1)!==91||p.level>=p.options.maxNesting||(k=X+2,I=Kt(p,X+1),I<0)?!1:(C||(p.env.footnotes||(p.env.footnotes={}),p.env.footnotes.list||(p.env.footnotes.list=[]),E=p.env.footnotes.list.length,p.pos=k,p.posMax=I,p.push({type:"footnote_ref",id:E,level:p.level}),p.linkLevel++,z=p.tokens.length,p.parser.tokenize(p),p.env.footnotes.list[E]={tokens:p.tokens.splice(z)},p.linkLevel--),p.pos=I+1,p.posMax=U,!0)}function k2(p,C){var k,I,E,z,U=p.posMax,X=p.pos;if(X+3>U||!p.env.footnotes||!p.env.footnotes.refs||p.src.charCodeAt(X)!==91||p.src.charCodeAt(X+1)!==94||p.level>=p.options.maxNesting)return!1;for(I=X+2;I=U||(I++,k=p.src.slice(X+2,I-1),typeof p.env.footnotes.refs[":"+k]>"u")?!1:(C||(p.env.footnotes.list||(p.env.footnotes.list=[]),p.env.footnotes.refs[":"+k]<0?(E=p.env.footnotes.list.length,p.env.footnotes.list[E]={label:k,count:0},p.env.footnotes.refs[":"+k]=E):E=p.env.footnotes.refs[":"+k],z=p.env.footnotes.list[E].count,p.env.footnotes.list[E].count++,p.push({type:"footnote_ref",id:E,subId:z,level:p.level})),p.pos=I,p.posMax=U,!0)}var D2=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],M2=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,L2=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function _f(p,C){var k,I,E,z,U,X=p.pos;return p.src.charCodeAt(X)!==60||(k=p.src.slice(X),k.indexOf(">")<0)?!1:(I=k.match(L2),I?D2.indexOf(I[1].toLowerCase())<0||(z=I[0].slice(1,-1),U=Ln(z),!p.parser.validateLink(z))?!1:(C||(p.push({type:"link_open",href:U,level:p.level}),p.push({type:"text",content:z,level:p.level+1}),p.push({type:"link_close",level:p.level})),p.pos+=I[0].length,!0):(E=k.match(M2),E?(z=E[0].slice(1,-1),U=Ln("mailto:"+z),p.parser.validateLink(U)?(C||(p.push({type:"link_open",href:U,level:p.level}),p.push({type:"text",content:z,level:p.level+1}),p.push({type:"link_close",level:p.level})),p.pos+=E[0].length,!0):!1):!1))}function Wr(p,C){return p=p.source,C=C||"",function k(I,E){return I?(E=E.source||E,p=p.replace(I,E),k):new RegExp(p,C)}}var Np=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,E2=/[^"'=<>`\x00-\x20]+/,I2=/'[^']*'/,zp=/"[^"]*"/,B2=Wr(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",E2)("single_quoted",I2)("double_quoted",zp)(),P2=Wr(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",Np)("attr_value",B2)(),R2=Wr(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",P2)(),F2=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,_h=/|/,Vp=/<[?].*?[?]>/,$p=/]*>/,O2=//,_e=Wr(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",R2)("close_tag",F2)("comment",_h)("processing",Vp)("declaration",$p)("cdata",O2)();function vr(p){var C=p|32;return C>=97&&C<=122}function So(p,C){var k,I,E,z=p.pos;return!p.options.html||(E=p.posMax,p.src.charCodeAt(z)!==60||z+2>=E)||(k=p.src.charCodeAt(z+1),k!==33&&k!==63&&k!==47&&!vr(k))||(I=p.src.slice(z).match(_e),!I)?!1:(C||p.push({type:"htmltag",content:p.src.slice(z,z+I[0].length),level:p.level}),p.pos+=I[0].length,!0)}var ta=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,N2=/^&([a-z][a-z0-9]{1,31});/i;function z2(p,C){var k,I,E,z=p.pos,U=p.posMax;if(p.src.charCodeAt(z)!==38)return!1;if(z+10){p.pos=z;return}for(E=0;E=I)break;continue}p.pending+=p.src[p.pos++]}p.pending&&p.pushPending()},wo.prototype.parse=function(p,C,k,I){var E=new dr(p,this,C,k,I);this.tokenize(E)};function bh(p){var C=["vbscript","javascript","file","data"],k=p.trim().toLowerCase();return k=Ke(k),!(k.indexOf(":")!==-1&&C.indexOf(k.split(":")[0])!==-1)}var Xe={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},Co={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},Sh={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},Tr={default:Xe,full:Co,commonmark:Sh};function Ti(p,C,k){this.src=C,this.env=k,this.options=p.options,this.tokens=[],this.inlineMode=!1,this.inline=p.inline,this.block=p.block,this.renderer=p.renderer,this.typographer=p.typographer}function La(p,C){typeof p!="string"&&(C=p,p="default"),C&&C.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead: import Remarkable from 'remarkable'; import linkify from 'remarkable/linkify'; new Remarkable().use(linkify) -`),this.inline=new wo,this.block=new Da,this.core=new ci,this.renderer=new Zt,this.ruler=new Mt,this.options={},this.configure(Ar[p]),this.set(C||{})}La.prototype.set=function(p){ae(this.options,p)},La.prototype.configure=function(p){var C=this;if(!p)throw new Error("Wrong `remarkable` preset, check name/content");p.options&&C.set(p.options),p.components&&Object.keys(p.components).forEach(function(k){p.components[k].rules&&C[k].ruler.enable(p.components[k].rules,!0)})},La.prototype.use=function(p,C){return p(this,C),this},La.prototype.parse=function(p,C){var k=new Ti(this,p,C);return this.core.process(k),k.tokens},La.prototype.render=function(p,C){return C=C||{},this.renderer.render(this.parse(p,C),this.options,C)},La.prototype.parseInline=function(p,C){var k=new Ti(this,p,C);return k.inlineMode=!0,this.core.process(k),k.tokens},La.prototype.renderInline=function(p,C){return C=C||{},this.renderer.render(this.parseInline(p,C),this.options,C)};var z2=(p,C)=>{const k="\\",I="$",z=(C||{}).delimiter||I;if(z.length!==1)throw new Error("invalid delimiter");const U=a,X=(ue,ve)=>U.renderToString(ue,{displayMode:ve,throwOnError:!1}),re=(ue,ve,Le)=>{let Ee=!1,Oe=ue.bMarks[ve]+ue.tShift[ve],Ze=ue.eMarks[ve];if(Oe+1>Ze)return!1;const yt=ue.src.charAt(Oe);if(yt!==z)return!1;let Bt=Oe;Oe=ue.skipChars(Oe,yt);let Pt=Oe-Bt;if(Pt!==2)return!1;let yn=ve;for(;++yn,!(yn>=Le||(Oe=Bt=ue.bMarks[yn]+ue.tShift[yn],Ze=ue.eMarks[yn],Oe=4)&&(Oe=ue.skipChars(Oe,yt),!(Oe-Bt{const Le=ue.pos,Ee=ue.posMax;let Oe=Le;if(ue.src.charAt(Oe)!==z)return!1;for(++Oe;Oe2)return!1;const yt=Oe;let Bt=0;for(;Oe1,level:ue.level})}return ue.pos=na,!0}}Oe+=1}return ve||(ue.pending+=Ze),ue.pos+=Ze.length,!0};p.inline.ruler.push("katex",fe,C),p.block.ruler.push("katex",re,C),p.renderer.rules.katex=(ue,ve)=>X(ue[ve].content,ue[ve].block),p.renderer.rules.katex.delimiter=z},wl={versions:{katex:"0.16.0",webfontloader:"1.6.28"},preloadScripts:[{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"}}],scripts:[{type:"iife",data:{fn:p=>{window.WebFontConfig={custom:{families:["KaTeX_AMS","KaTeX_Caligraphic:n4,n7","KaTeX_Fraktur:n4,n7","KaTeX_Main:n4,n7,i4,i7","KaTeX_Math:i4,i7","KaTeX_Script","KaTeX_SansSerif:n4,n7,i4","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4","KaTeX_Typewriter"]},active:()=>{p().refreshHook.call()}}},getParams({getMarkmap:p}){return[p]}}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.js",defer:!0}}],styles:[{type:"stylesheet",data:{href:"https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css"}}]};const Dr="https://cdn.jsdelivr.net/npm/";function $p(p,C,k){return p.map(I=>(typeof I=="string"&&(I.startsWith(`${C}/`)?I=`${Dr}${C}@${k}${I.slice(C.length)}`:I.startsWith(`${C}@`)&&(I=`${Dr}${I}`)),I))}function Gp(){return{parser:new s,beforeParse:new s,afterParse:new s,htmltag:new s,retransform:new s}}function T6(p){return p}let Cl;const Al=()=>(Cl||(Cl=O(wl.preloadScripts)),Cl),Wt="katex";var bh={name:Wt,config:wl,transform(p){const C=(I,E)=>{const{katex:z}=window;return z?z.renderToString(I,{displayMode:E,throwOnError:!1}):(Al().then(()=>{p.retransform.call()}),I)};let k=()=>{};return p.parser.tap(I=>{I.use(z2),I.renderer.rules.katex=(E,z)=>(k(),C(E[z].content,E[z].block))}),p.beforeParse.tap((I,E)=>{k=()=>{E.features[Wt]=!0}}),p.afterParse.tap((I,E)=>{const{frontmatter:z}=E;z!=null&&z.markmap&&["extraJs","extraCss"].forEach(U=>{z.markmap[U]&&(z.markmap[U]=$p(z.markmap[U],Wt,wl.versions.katex))})}),{styles:wl.styles,scripts:wl.scripts}}},Tl={versions:{prismjs:"1.28.0"},preloadScripts:[{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/prismjs@1.28.0/components/prism-core.min.js"}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/prismjs@1.28.0/plugins/autoloader/prism-autoloader.min.js"}}],styles:[{type:"stylesheet",data:{href:"https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism.css"}}]};let Sh;const Xn=()=>(Sh||(Sh=O(Tl.preloadScripts)),Sh);function kl(p,C){Xn().then(()=>{window.Prism.plugins.autoloader.loadLanguages([p],()=>{C.retransform.call()})})}const Hp="prism";var Fe={name:Hp,config:Tl,transform(p){let C=()=>{};return p.parser.tap(k=>{k.set({highlight:(I,E)=>{var z;C();const{Prism:U}=window,X=U==null||(z=U.languages)==null?void 0:z[E];return X?U.highlight(I,X,E):(kl(E,p),"")}})}),p.beforeParse.tap((k,I)=>{C=()=>{I.features[Hp]=!0}}),{styles:Tl.styles}}};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function En(p){return typeof p>"u"||p===null}function _f(p){return typeof p=="object"&&p!==null}function xf(p){return Array.isArray(p)?p:En(p)?[]:[p]}function mn(p,C){var k,I,E,z;if(C)for(z=Object.keys(C),k=0,I=z.length;k{const k="\\",I="$",z=(C||{}).delimiter||I;if(z.length!==1)throw new Error("invalid delimiter");const U=a,X=(ue,ve)=>U.renderToString(ue,{displayMode:ve,throwOnError:!1}),re=(ue,ve,Le)=>{let Ee=!1,Oe=ue.bMarks[ve]+ue.tShift[ve],Ze=ue.eMarks[ve];if(Oe+1>Ze)return!1;const yt=ue.src.charAt(Oe);if(yt!==z)return!1;let Bt=Oe;Oe=ue.skipChars(Oe,yt);let Pt=Oe-Bt;if(Pt!==2)return!1;let xn=ve;for(;++xn,!(xn>=Le||(Oe=Bt=ue.bMarks[xn]+ue.tShift[xn],Ze=ue.eMarks[xn],Oe=4)&&(Oe=ue.skipChars(Oe,yt),!(Oe-Bt{const Le=ue.pos,Ee=ue.posMax;let Oe=Le;if(ue.src.charAt(Oe)!==z)return!1;for(++Oe;Oe2)return!1;const yt=Oe;let Bt=0;for(;Oe1,level:ue.level})}return ue.pos=na,!0}}Oe+=1}return ve||(ue.pending+=Ze),ue.pos+=Ze.length,!0};p.inline.ruler.push("katex",fe,C),p.block.ruler.push("katex",re,C),p.renderer.rules.katex=(ue,ve)=>X(ue[ve].content,ue[ve].block),p.renderer.rules.katex.delimiter=z},wl={versions:{katex:"0.16.0",webfontloader:"1.6.28"},preloadScripts:[{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js"}}],scripts:[{type:"iife",data:{fn:p=>{window.WebFontConfig={custom:{families:["KaTeX_AMS","KaTeX_Caligraphic:n4,n7","KaTeX_Fraktur:n4,n7","KaTeX_Main:n4,n7,i4,i7","KaTeX_Math:i4,i7","KaTeX_Script","KaTeX_SansSerif:n4,n7,i4","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4","KaTeX_Typewriter"]},active:()=>{p().refreshHook.call()}}},getParams({getMarkmap:p}){return[p]}}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.js",defer:!0}}],styles:[{type:"stylesheet",data:{href:"https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css"}}]};const Mr="https://cdn.jsdelivr.net/npm/";function Gp(p,C,k){return p.map(I=>(typeof I=="string"&&(I.startsWith(`${C}/`)?I=`${Mr}${C}@${k}${I.slice(C.length)}`:I.startsWith(`${C}@`)&&(I=`${Mr}${I}`)),I))}function Hp(){return{parser:new s,beforeParse:new s,afterParse:new s,htmltag:new s,retransform:new s}}function T6(p){return p}let Cl;const Al=()=>(Cl||(Cl=O(wl.preloadScripts)),Cl),Wt="katex";var wh={name:Wt,config:wl,transform(p){const C=(I,E)=>{const{katex:z}=window;return z?z.renderToString(I,{displayMode:E,throwOnError:!1}):(Al().then(()=>{p.retransform.call()}),I)};let k=()=>{};return p.parser.tap(I=>{I.use(V2),I.renderer.rules.katex=(E,z)=>(k(),C(E[z].content,E[z].block))}),p.beforeParse.tap((I,E)=>{k=()=>{E.features[Wt]=!0}}),p.afterParse.tap((I,E)=>{const{frontmatter:z}=E;z!=null&&z.markmap&&["extraJs","extraCss"].forEach(U=>{z.markmap[U]&&(z.markmap[U]=Gp(z.markmap[U],Wt,wl.versions.katex))})}),{styles:wl.styles,scripts:wl.scripts}}},Tl={versions:{prismjs:"1.28.0"},preloadScripts:[{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/prismjs@1.28.0/components/prism-core.min.js"}},{type:"script",data:{src:"https://cdn.jsdelivr.net/npm/prismjs@1.28.0/plugins/autoloader/prism-autoloader.min.js"}}],styles:[{type:"stylesheet",data:{href:"https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism.css"}}]};let Ch;const Zn=()=>(Ch||(Ch=O(Tl.preloadScripts)),Ch);function kl(p,C){Zn().then(()=>{window.Prism.plugins.autoloader.loadLanguages([p],()=>{C.retransform.call()})})}const qp="prism";var Fe={name:qp,config:Tl,transform(p){let C=()=>{};return p.parser.tap(k=>{k.set({highlight:(I,E)=>{var z;C();const{Prism:U}=window,X=U==null||(z=U.languages)==null?void 0:z[E];return X?U.highlight(I,X,E):(kl(E,p),"")}})}),p.beforeParse.tap((k,I)=>{C=()=>{I.features[qp]=!0}}),{styles:Tl.styles}}};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function En(p){return typeof p>"u"||p===null}function xf(p){return typeof p=="object"&&p!==null}function bf(p){return Array.isArray(p)?p:En(p)?[]:[p]}function _n(p,C){var k,I,E,z;if(C)for(z=Object.keys(C),k=0,I=z.length;kX&&(z=" ... ",C=I-X+z.length),k-I>X&&(U=" ...",k=I+X-U.length),{str:z+p.slice(C,k).replace(/\t/g,"→")+U,pos:I-C+z.length}}function di(p,C){return Br.repeat(" ",C-p.length)+p}function It(p,C){if(C=Object.create(C||null),!p.buffer)return null;C.maxLength||(C.maxLength=79),typeof C.indent!="number"&&(C.indent=1),typeof C.linesBefore!="number"&&(C.linesBefore=3),typeof C.linesAfter!="number"&&(C.linesAfter=2);for(var k=/\r?\n|\r|\0/g,I=[0],E=[],z,U=-1;z=k.exec(p.buffer);)E.push(z.index),I.push(z.index+z[0].length),p.position<=z.index&&U<0&&(U=I.length-2);U<0&&(U=I.length-1);var X="",re,fe,ue=Math.min(p.line+C.linesAfter,E.length).toString().length,ve=C.maxLength-(C.indent+ue+3);for(re=1;re<=C.linesBefore&&!(U-re<0);re++)fe=bf(p.buffer,I[U-re],E[U-re],p.position-(I[U]-I[U-re]),ve),X=Br.repeat(" ",C.indent)+di((p.line-re+1).toString(),ue)+" | "+fe.str+` -`+X;for(fe=bf(p.buffer,I[U],E[U],p.position,ve),X+=Br.repeat(" ",C.indent)+di((p.line+1).toString(),ue)+" | "+fe.str+` +`+p.mark.snippet),I+" "+k):I}function Dl(p,C){Error.call(this),this.name="YAMLException",this.reason=p,this.mark=C,this.message=Xp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Dl.prototype=Object.create(Error.prototype),Dl.prototype.constructor=Dl,Dl.prototype.toString=function(C){return this.name+": "+Xp(this,C)};var an=Dl;function Sf(p,C,k,I,E){var z="",U="",X=Math.floor(E/2)-1;return I-C>X&&(z=" ... ",C=I-X+z.length),k-I>X&&(U=" ...",k=I+X-U.length),{str:z+p.slice(C,k).replace(/\t/g,"→")+U,pos:I-C+z.length}}function di(p,C){return Br.repeat(" ",C-p.length)+p}function It(p,C){if(C=Object.create(C||null),!p.buffer)return null;C.maxLength||(C.maxLength=79),typeof C.indent!="number"&&(C.indent=1),typeof C.linesBefore!="number"&&(C.linesBefore=3),typeof C.linesAfter!="number"&&(C.linesAfter=2);for(var k=/\r?\n|\r|\0/g,I=[0],E=[],z,U=-1;z=k.exec(p.buffer);)E.push(z.index),I.push(z.index+z[0].length),p.position<=z.index&&U<0&&(U=I.length-2);U<0&&(U=I.length-1);var X="",re,fe,ue=Math.min(p.line+C.linesAfter,E.length).toString().length,ve=C.maxLength-(C.indent+ue+3);for(re=1;re<=C.linesBefore&&!(U-re<0);re++)fe=Sf(p.buffer,I[U-re],E[U-re],p.position-(I[U]-I[U-re]),ve),X=Br.repeat(" ",C.indent)+di((p.line-re+1).toString(),ue)+" | "+fe.str+` +`+X;for(fe=Sf(p.buffer,I[U],E[U],p.position,ve),X+=Br.repeat(" ",C.indent)+di((p.line+1).toString(),ue)+" | "+fe.str+` `,X+=Br.repeat("-",C.indent+ue+3+fe.pos)+`^ -`,re=1;re<=C.linesAfter&&!(U+re>=E.length);re++)fe=bf(p.buffer,I[U+re],E[U+re],p.position-(I[U]-I[U+re]),ve),X+=Br.repeat(" ",C.indent)+di((p.line+re+1).toString(),ue)+" | "+fe.str+` -`;return X.replace(/\n$/,"")}var Sf=It,wh=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],wf=["scalar","sequence","mapping"];function Xp(p){var C={};return p!==null&&Object.keys(p).forEach(function(k){p[k].forEach(function(I){C[String(I)]=k})}),C}function H2(p,C){if(C=C||{},Object.keys(C).forEach(function(k){if(wh.indexOf(k)===-1)throw new an('Unknown option "'+k+'" is met in definition of "'+p+'" YAML type.')}),this.options=C,this.tag=p,this.kind=C.kind||null,this.resolve=C.resolve||function(){return!0},this.construct=C.construct||function(k){return k},this.instanceOf=C.instanceOf||null,this.predicate=C.predicate||null,this.represent=C.represent||null,this.representName=C.representName||null,this.defaultStyle=C.defaultStyle||null,this.multi=C.multi||!1,this.styleAliases=Xp(C.styleAliases||null),wf.indexOf(this.kind)===-1)throw new an('Unknown kind "'+this.kind+'" is specified for "'+p+'" YAML type.')}var Mr=H2;function Zp(p,C){var k=[];return p[C].forEach(function(I){var E=k.length;k.forEach(function(z,U){z.tag===I.tag&&z.kind===I.kind&&z.multi===I.multi&&(E=U)}),k[E]=I}),k}function jp(){var p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},C,k;function I(E){E.multi?(p.multi[E.kind].push(E),p.multi.fallback.push(E)):p[E.kind][E.tag]=p.fallback[E.tag]=E}for(C=0,k=arguments.length;C=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0o"+p.toString(8):"-0o"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lf=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ef(p){return!(p===null||!Lf.test(p)||p[p.length-1]==="_")}function Th(p){var C,k;return C=p.replace(/_/g,"").toLowerCase(),k=C[0]==="-"?-1:1,"+-".indexOf(C[0])>=0&&(C=C.slice(1)),C===".inf"?k===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:C===".nan"?NaN:k*parseFloat(C,10)}var Z2=/^[-+]?[0-9]+e/;function j2(p,C){var k;if(isNaN(p))switch(C){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(C){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(C){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Br.isNegativeZero(p))return"-0.0";return k=p.toString(10),Z2.test(k)?k.replace("e",".e"):k}function nv(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||Br.isNegativeZero(p))}var kh=new Mr("tag:yaml.org,2002:float",{kind:"scalar",resolve:Ef,construct:Th,predicate:nv,represent:j2,defaultStyle:"lowercase"}),Dh=Jp.extend({implicit:[Tf,Df,Ah,kh]}),Mh=Dh,iv=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),If=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]))?))?$");function K2(p){return p===null?!1:iv.exec(p)!==null||If.exec(p)!==null}function av(p){var C,k,I,E,z,U,X,re=0,fe=null,ue,ve,Le;if(C=iv.exec(p),C===null&&(C=If.exec(p)),C===null)throw new Error("Date resolve error");if(k=+C[1],I=+C[2]-1,E=+C[3],!C[4])return new Date(Date.UTC(k,I,E));if(z=+C[4],U=+C[5],X=+C[6],C[7]){for(re=C[7].slice(0,3);re.length<3;)re+="0";re=+re}return C[9]&&(ue=+C[10],ve=+(C[11]||0),fe=(ue*60+ve)*6e4,C[9]==="-"&&(fe=-fe)),Le=new Date(Date.UTC(k,I,E,z,U,X,re)),fe&&Le.setTime(Le.getTime()-fe),Le}function El(p){return p.toISOString()}var ov=new Mr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:K2,construct:av,instanceOf:Date,represent:El});function J2(p){return p==="<<"||p===null}var sv=new Mr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:J2}),Lh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function Q2(p){if(p===null)return!1;var C,k,I=0,E=p.length,z=Lh;for(k=0;k64)){if(C<0)return!1;I+=6}return I%8===0}function lv(p){var C,k,I=p.replace(/[\r\n=]/g,""),E=I.length,z=Lh,U=0,X=[];for(C=0;C>16&255),X.push(U>>8&255),X.push(U&255)),U=U<<6|z.indexOf(I.charAt(C));return k=E%4*6,k===0?(X.push(U>>16&255),X.push(U>>8&255),X.push(U&255)):k===18?(X.push(U>>10&255),X.push(U>>2&255)):k===12&&X.push(U>>4&255),new Uint8Array(X)}function uv(p){var C="",k=0,I,E,z=p.length,U=Lh;for(I=0;I>18&63],C+=U[k>>12&63],C+=U[k>>6&63],C+=U[k&63]),k=(k<<8)+p[I];return E=z%3,E===0?(C+=U[k>>18&63],C+=U[k>>12&63],C+=U[k>>6&63],C+=U[k&63]):E===2?(C+=U[k>>10&63],C+=U[k>>4&63],C+=U[k<<2&63],C+=U[64]):E===1&&(C+=U[k>>2&63],C+=U[k<<4&63],C+=U[64],C+=U[64]),C}function e_(p){return Object.prototype.toString.call(p)==="[object Uint8Array]"}var ki=new Mr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Q2,construct:lv,predicate:e_,represent:uv}),hv=Object.prototype.hasOwnProperty,t_=Object.prototype.toString;function Eh(p){if(p===null)return!0;var C=[],k,I,E,z,U,X=p;for(k=0,I=X.length;k>10)+55296,(p-65536&1023)+56320)}for(var To=new Array(256),cs=new Array(256),fs=0;fs<256;fs++)To[fs]=zf(fs)?1:0,cs[fs]=zf(fs);function n_(p,C){this.input=p,this.filename=C.filename||null,this.schema=C.schema||hs,this.onWarning=C.onWarning||null,this.legacy=C.legacy||!1,this.json=C.json||!1,this.listener=C.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Vf(p,C){var k={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return k.snippet=Sf(k),new an(C,k)}function ct(p,C){throw Vf(p,C)}function Il(p,C){p.onWarning&&p.onWarning.call(null,Vf(p,C))}var $f={YAML:function(C,k,I){var E,z,U;C.version!==null&&ct(C,"duplication of %YAML directive"),I.length!==1&&ct(C,"YAML directive accepts exactly one argument"),E=/^([0-9]+)\.([0-9]+)$/.exec(I[0]),E===null&&ct(C,"ill-formed argument of the YAML directive"),z=parseInt(E[1],10),U=parseInt(E[2],10),z!==1&&ct(C,"unacceptable YAML version of the document"),C.version=I[0],C.checkLineBreaks=U<2,U!==1&&U!==2&&Il(C,"unsupported YAML version of the document")},TAG:function(C,k,I){var E,z;I.length!==2&&ct(C,"TAG directive accepts exactly two arguments"),E=I[0],z=I[1],Ff.test(E)||ct(C,"ill-formed tag handle (first argument) of the TAG directive"),Mi.call(C.tagMap,E)&&ct(C,'there is a previously declared suffix for "'+E+'" tag handle'),Of.test(z)||ct(C,"ill-formed tag prefix (second argument) of the TAG directive");try{z=decodeURIComponent(z)}catch{ct(C,"tag prefix is malformed: "+z)}C.tagMap[E]=z}};function Pa(p,C,k,I){var E,z,U,X;if(C1&&(p.result+=Br.repeat(` -`,C-1))}function xv(p,C,k){var I,E,z,U,X,re,fe,ue,ve=p.kind,Le=p.result,Ee;if(Ee=p.input.charCodeAt(p.position),on(Ee)||Ao(Ee)||Ee===35||Ee===38||Ee===42||Ee===33||Ee===124||Ee===62||Ee===39||Ee===34||Ee===37||Ee===64||Ee===96||(Ee===63||Ee===45)&&(E=p.input.charCodeAt(p.position+1),on(E)||k&&Ao(E)))return!1;for(p.kind="scalar",p.result="",z=U=p.position,X=!1;Ee!==0;){if(Ee===58){if(E=p.input.charCodeAt(p.position+1),on(E)||k&&Ao(E))break}else if(Ee===35){if(I=p.input.charCodeAt(p.position-1),on(I))break}else{if(p.position===p.lineStart&&ps(p)||k&&Ao(Ee))break;if(jn(Ee))if(re=p.line,fe=p.lineStart,ue=p.lineIndent,xr(p,!1,-1),p.lineIndent>=C){X=!0,Ee=p.input.charCodeAt(p.position);continue}else{p.position=U,p.line=re,p.lineStart=fe,p.lineIndent=ue;break}}X&&(Pa(p,z,U,!1),Oh(p,p.line-re),z=U=p.position,X=!1),Ba(Ee)||(U=p.position+1),Ee=p.input.charCodeAt(++p.position)}return Pa(p,z,U,!1),p.result?!0:(p.kind=ve,p.result=Le,!1)}function bv(p,C){var k,I,E;if(k=p.input.charCodeAt(p.position),k!==39)return!1;for(p.kind="scalar",p.result="",p.position++,I=E=p.position;(k=p.input.charCodeAt(p.position))!==0;)if(k===39)if(Pa(p,I,p.position,!0),k=p.input.charCodeAt(++p.position),k===39)I=p.position,p.position++,E=p.position;else return!0;else jn(k)?(Pa(p,I,E,!0),Oh(p,xr(p,!1,C)),I=E=p.position):p.position===p.lineStart&&ps(p)?ct(p,"unexpected end of the document within a single quoted scalar"):(p.position++,E=p.position);ct(p,"unexpected end of the stream within a single quoted scalar")}function i_(p,C){var k,I,E,z,U,X;if(X=p.input.charCodeAt(p.position),X!==34)return!1;for(p.kind="scalar",p.result="",p.position++,k=I=p.position;(X=p.input.charCodeAt(p.position))!==0;){if(X===34)return Pa(p,k,p.position,!0),p.position++,!0;if(X===92){if(Pa(p,k,p.position,!0),X=p.input.charCodeAt(++p.position),jn(X))xr(p,!1,C);else if(X<256&&To[X])p.result+=cs[X],p.position++;else if((U=Nf(X))>0){for(E=U,z=0;E>0;E--)X=p.input.charCodeAt(++p.position),(U=r_(X))>=0?z=(z<<4)+U:ct(p,"expected hexadecimal character");p.result+=_v(z),p.position++}else ct(p,"unknown escape sequence");k=I=p.position}else jn(X)?(Pa(p,k,I,!0),Oh(p,xr(p,!1,C)),k=I=p.position):p.position===p.lineStart&&ps(p)?ct(p,"unexpected end of the document within a double quoted scalar"):(p.position++,I=p.position)}ct(p,"unexpected end of the stream within a double quoted scalar")}function Sv(p,C){var k=!0,I,E,z,U=p.tag,X,re=p.anchor,fe,ue,ve,Le,Ee,Oe=Object.create(null),Ze,yt,Bt,Pt;if(Pt=p.input.charCodeAt(p.position),Pt===91)ue=93,Ee=!1,X=[];else if(Pt===123)ue=125,Ee=!0,X={};else return!1;for(p.anchor!==null&&(p.anchorMap[p.anchor]=X),Pt=p.input.charCodeAt(++p.position);Pt!==0;){if(xr(p,!0,C),Pt=p.input.charCodeAt(p.position),Pt===ue)return p.position++,p.tag=U,p.anchor=re,p.kind=Ee?"mapping":"sequence",p.result=X,!0;k?Pt===44&&ct(p,"expected the node content, but found ','"):ct(p,"missed comma between flow collection entries"),yt=Ze=Bt=null,ve=Le=!1,Pt===63&&(fe=p.input.charCodeAt(p.position+1),on(fe)&&(ve=Le=!0,p.position++,xr(p,!0,C))),I=p.line,E=p.lineStart,z=p.position,vs(p,C,vi,!1,!0),yt=p.tag,Ze=p.result,xr(p,!0,C),Pt=p.input.charCodeAt(p.position),(Le||p.line===I)&&Pt===58&&(ve=!0,Pt=p.input.charCodeAt(++p.position),xr(p,!0,C),vs(p,C,vi,!1,!0),Bt=p.result),Ee?ds(p,X,Oe,yt,Ze,Bt,I,E,z):ve?X.push(ds(p,null,Oe,yt,Ze,Bt,I,E,z)):X.push(Ze),xr(p,!0,C),Pt=p.input.charCodeAt(p.position),Pt===44?(k=!0,Pt=p.input.charCodeAt(++p.position)):k=!1}ct(p,"unexpected end of the stream within a flow collection")}function wv(p,C){var k,I,E=Zn,z=!1,U=!1,X=C,re=0,fe=!1,ue,ve;if(ve=p.input.charCodeAt(p.position),ve===124)I=!1;else if(ve===62)I=!0;else return!1;for(p.kind="scalar",p.result="";ve!==0;)if(ve=p.input.charCodeAt(++p.position),ve===43||ve===45)Zn===E?E=ve===43?pv:dv:ct(p,"repeat of a chomping mode identifier");else if((ue=yv(ve))>=0)ue===0?ct(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):U?ct(p,"repeat of an indentation width identifier"):(X=C+ue-1,U=!0);else break;if(Ba(ve)){do ve=p.input.charCodeAt(++p.position);while(Ba(ve));if(ve===35)do ve=p.input.charCodeAt(++p.position);while(!jn(ve)&&ve!==0)}for(;ve!==0;){for(Fh(p),p.lineIndent=0,ve=p.input.charCodeAt(p.position);(!U||p.lineIndentX&&(X=p.lineIndent),jn(ve)){re++;continue}if(p.lineIndent=E.length);re++)fe=Sf(p.buffer,I[U+re],E[U+re],p.position-(I[U]-I[U+re]),ve),X+=Br.repeat(" ",C.indent)+di((p.line+re+1).toString(),ue)+" | "+fe.str+` +`;return X.replace(/\n$/,"")}var wf=It,Ah=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Cf=["scalar","sequence","mapping"];function Zp(p){var C={};return p!==null&&Object.keys(p).forEach(function(k){p[k].forEach(function(I){C[String(I)]=k})}),C}function q2(p,C){if(C=C||{},Object.keys(C).forEach(function(k){if(Ah.indexOf(k)===-1)throw new an('Unknown option "'+k+'" is met in definition of "'+p+'" YAML type.')}),this.options=C,this.tag=p,this.kind=C.kind||null,this.resolve=C.resolve||function(){return!0},this.construct=C.construct||function(k){return k},this.instanceOf=C.instanceOf||null,this.predicate=C.predicate||null,this.represent=C.represent||null,this.representName=C.representName||null,this.defaultStyle=C.defaultStyle||null,this.multi=C.multi||!1,this.styleAliases=Zp(C.styleAliases||null),Cf.indexOf(this.kind)===-1)throw new an('Unknown kind "'+this.kind+'" is specified for "'+p+'" YAML type.')}var Lr=q2;function jp(p,C){var k=[];return p[C].forEach(function(I){var E=k.length;k.forEach(function(z,U){z.tag===I.tag&&z.kind===I.kind&&z.multi===I.multi&&(E=U)}),k[E]=I}),k}function Kp(){var p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},C,k;function I(E){E.multi?(p.multi[E.kind].push(E),p.multi.fallback.push(E)):p[E.kind][E.tag]=p.fallback[E.tag]=E}for(C=0,k=arguments.length;C=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0o"+p.toString(8):"-0o"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ef=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function If(p){return!(p===null||!Ef.test(p)||p[p.length-1]==="_")}function Dh(p){var C,k;return C=p.replace(/_/g,"").toLowerCase(),k=C[0]==="-"?-1:1,"+-".indexOf(C[0])>=0&&(C=C.slice(1)),C===".inf"?k===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:C===".nan"?NaN:k*parseFloat(C,10)}var j2=/^[-+]?[0-9]+e/;function K2(p,C){var k;if(isNaN(p))switch(C){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(C){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(C){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Br.isNegativeZero(p))return"-0.0";return k=p.toString(10),j2.test(k)?k.replace("e",".e"):k}function iv(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||Br.isNegativeZero(p))}var Mh=new Lr("tag:yaml.org,2002:float",{kind:"scalar",resolve:If,construct:Dh,predicate:iv,represent:K2,defaultStyle:"lowercase"}),Lh=Qp.extend({implicit:[kf,Mf,kh,Mh]}),Eh=Lh,av=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Bf=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]))?))?$");function J2(p){return p===null?!1:av.exec(p)!==null||Bf.exec(p)!==null}function ov(p){var C,k,I,E,z,U,X,re=0,fe=null,ue,ve,Le;if(C=av.exec(p),C===null&&(C=Bf.exec(p)),C===null)throw new Error("Date resolve error");if(k=+C[1],I=+C[2]-1,E=+C[3],!C[4])return new Date(Date.UTC(k,I,E));if(z=+C[4],U=+C[5],X=+C[6],C[7]){for(re=C[7].slice(0,3);re.length<3;)re+="0";re=+re}return C[9]&&(ue=+C[10],ve=+(C[11]||0),fe=(ue*60+ve)*6e4,C[9]==="-"&&(fe=-fe)),Le=new Date(Date.UTC(k,I,E,z,U,X,re)),fe&&Le.setTime(Le.getTime()-fe),Le}function El(p){return p.toISOString()}var sv=new Lr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J2,construct:ov,instanceOf:Date,represent:El});function Q2(p){return p==="<<"||p===null}var lv=new Lr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Q2}),Ih=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function e_(p){if(p===null)return!1;var C,k,I=0,E=p.length,z=Ih;for(k=0;k64)){if(C<0)return!1;I+=6}return I%8===0}function uv(p){var C,k,I=p.replace(/[\r\n=]/g,""),E=I.length,z=Ih,U=0,X=[];for(C=0;C>16&255),X.push(U>>8&255),X.push(U&255)),U=U<<6|z.indexOf(I.charAt(C));return k=E%4*6,k===0?(X.push(U>>16&255),X.push(U>>8&255),X.push(U&255)):k===18?(X.push(U>>10&255),X.push(U>>2&255)):k===12&&X.push(U>>4&255),new Uint8Array(X)}function hv(p){var C="",k=0,I,E,z=p.length,U=Ih;for(I=0;I>18&63],C+=U[k>>12&63],C+=U[k>>6&63],C+=U[k&63]),k=(k<<8)+p[I];return E=z%3,E===0?(C+=U[k>>18&63],C+=U[k>>12&63],C+=U[k>>6&63],C+=U[k&63]):E===2?(C+=U[k>>10&63],C+=U[k>>4&63],C+=U[k<<2&63],C+=U[64]):E===1&&(C+=U[k>>2&63],C+=U[k<<4&63],C+=U[64],C+=U[64]),C}function t_(p){return Object.prototype.toString.call(p)==="[object Uint8Array]"}var ki=new Lr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:e_,construct:uv,predicate:t_,represent:hv}),cv=Object.prototype.hasOwnProperty,r_=Object.prototype.toString;function Bh(p){if(p===null)return!0;var C=[],k,I,E,z,U,X=p;for(k=0,I=X.length;k>10)+55296,(p-65536&1023)+56320)}for(var To=new Array(256),ds=new Array(256),ps=0;ps<256;ps++)To[ps]=Vf(ps)?1:0,ds[ps]=Vf(ps);function i_(p,C){this.input=p,this.filename=C.filename||null,this.schema=C.schema||fs,this.onWarning=C.onWarning||null,this.legacy=C.legacy||!1,this.json=C.json||!1,this.listener=C.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=p.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function $f(p,C){var k={name:p.filename,buffer:p.input.slice(0,-1),position:p.position,line:p.line,column:p.position-p.lineStart};return k.snippet=wf(k),new an(C,k)}function ct(p,C){throw $f(p,C)}function Il(p,C){p.onWarning&&p.onWarning.call(null,$f(p,C))}var Gf={YAML:function(C,k,I){var E,z,U;C.version!==null&&ct(C,"duplication of %YAML directive"),I.length!==1&&ct(C,"YAML directive accepts exactly one argument"),E=/^([0-9]+)\.([0-9]+)$/.exec(I[0]),E===null&&ct(C,"ill-formed argument of the YAML directive"),z=parseInt(E[1],10),U=parseInt(E[2],10),z!==1&&ct(C,"unacceptable YAML version of the document"),C.version=I[0],C.checkLineBreaks=U<2,U!==1&&U!==2&&Il(C,"unsupported YAML version of the document")},TAG:function(C,k,I){var E,z;I.length!==2&&ct(C,"TAG directive accepts exactly two arguments"),E=I[0],z=I[1],Of.test(E)||ct(C,"ill-formed tag handle (first argument) of the TAG directive"),Mi.call(C.tagMap,E)&&ct(C,'there is a previously declared suffix for "'+E+'" tag handle'),Nf.test(z)||ct(C,"ill-formed tag prefix (second argument) of the TAG directive");try{z=decodeURIComponent(z)}catch{ct(C,"tag prefix is malformed: "+z)}C.tagMap[E]=z}};function Pa(p,C,k,I){var E,z,U,X;if(C1&&(p.result+=Br.repeat(` +`,C-1))}function bv(p,C,k){var I,E,z,U,X,re,fe,ue,ve=p.kind,Le=p.result,Ee;if(Ee=p.input.charCodeAt(p.position),on(Ee)||Ao(Ee)||Ee===35||Ee===38||Ee===42||Ee===33||Ee===124||Ee===62||Ee===39||Ee===34||Ee===37||Ee===64||Ee===96||(Ee===63||Ee===45)&&(E=p.input.charCodeAt(p.position+1),on(E)||k&&Ao(E)))return!1;for(p.kind="scalar",p.result="",z=U=p.position,X=!1;Ee!==0;){if(Ee===58){if(E=p.input.charCodeAt(p.position+1),on(E)||k&&Ao(E))break}else if(Ee===35){if(I=p.input.charCodeAt(p.position-1),on(I))break}else{if(p.position===p.lineStart&&gs(p)||k&&Ao(Ee))break;if(Kn(Ee))if(re=p.line,fe=p.lineStart,ue=p.lineIndent,xr(p,!1,-1),p.lineIndent>=C){X=!0,Ee=p.input.charCodeAt(p.position);continue}else{p.position=U,p.line=re,p.lineStart=fe,p.lineIndent=ue;break}}X&&(Pa(p,z,U,!1),zh(p,p.line-re),z=U=p.position,X=!1),Ba(Ee)||(U=p.position+1),Ee=p.input.charCodeAt(++p.position)}return Pa(p,z,U,!1),p.result?!0:(p.kind=ve,p.result=Le,!1)}function Sv(p,C){var k,I,E;if(k=p.input.charCodeAt(p.position),k!==39)return!1;for(p.kind="scalar",p.result="",p.position++,I=E=p.position;(k=p.input.charCodeAt(p.position))!==0;)if(k===39)if(Pa(p,I,p.position,!0),k=p.input.charCodeAt(++p.position),k===39)I=p.position,p.position++,E=p.position;else return!0;else Kn(k)?(Pa(p,I,E,!0),zh(p,xr(p,!1,C)),I=E=p.position):p.position===p.lineStart&&gs(p)?ct(p,"unexpected end of the document within a single quoted scalar"):(p.position++,E=p.position);ct(p,"unexpected end of the stream within a single quoted scalar")}function a_(p,C){var k,I,E,z,U,X;if(X=p.input.charCodeAt(p.position),X!==34)return!1;for(p.kind="scalar",p.result="",p.position++,k=I=p.position;(X=p.input.charCodeAt(p.position))!==0;){if(X===34)return Pa(p,k,p.position,!0),p.position++,!0;if(X===92){if(Pa(p,k,p.position,!0),X=p.input.charCodeAt(++p.position),Kn(X))xr(p,!1,C);else if(X<256&&To[X])p.result+=ds[X],p.position++;else if((U=zf(X))>0){for(E=U,z=0;E>0;E--)X=p.input.charCodeAt(++p.position),(U=n_(X))>=0?z=(z<<4)+U:ct(p,"expected hexadecimal character");p.result+=xv(z),p.position++}else ct(p,"unknown escape sequence");k=I=p.position}else Kn(X)?(Pa(p,k,I,!0),zh(p,xr(p,!1,C)),k=I=p.position):p.position===p.lineStart&&gs(p)?ct(p,"unexpected end of the document within a double quoted scalar"):(p.position++,I=p.position)}ct(p,"unexpected end of the stream within a double quoted scalar")}function wv(p,C){var k=!0,I,E,z,U=p.tag,X,re=p.anchor,fe,ue,ve,Le,Ee,Oe=Object.create(null),Ze,yt,Bt,Pt;if(Pt=p.input.charCodeAt(p.position),Pt===91)ue=93,Ee=!1,X=[];else if(Pt===123)ue=125,Ee=!0,X={};else return!1;for(p.anchor!==null&&(p.anchorMap[p.anchor]=X),Pt=p.input.charCodeAt(++p.position);Pt!==0;){if(xr(p,!0,C),Pt=p.input.charCodeAt(p.position),Pt===ue)return p.position++,p.tag=U,p.anchor=re,p.kind=Ee?"mapping":"sequence",p.result=X,!0;k?Pt===44&&ct(p,"expected the node content, but found ','"):ct(p,"missed comma between flow collection entries"),yt=Ze=Bt=null,ve=Le=!1,Pt===63&&(fe=p.input.charCodeAt(p.position+1),on(fe)&&(ve=Le=!0,p.position++,xr(p,!0,C))),I=p.line,E=p.lineStart,z=p.position,ms(p,C,vi,!1,!0),yt=p.tag,Ze=p.result,xr(p,!0,C),Pt=p.input.charCodeAt(p.position),(Le||p.line===I)&&Pt===58&&(ve=!0,Pt=p.input.charCodeAt(++p.position),xr(p,!0,C),ms(p,C,vi,!1,!0),Bt=p.result),Ee?vs(p,X,Oe,yt,Ze,Bt,I,E,z):ve?X.push(vs(p,null,Oe,yt,Ze,Bt,I,E,z)):X.push(Ze),xr(p,!0,C),Pt=p.input.charCodeAt(p.position),Pt===44?(k=!0,Pt=p.input.charCodeAt(++p.position)):k=!1}ct(p,"unexpected end of the stream within a flow collection")}function Cv(p,C){var k,I,E=jn,z=!1,U=!1,X=C,re=0,fe=!1,ue,ve;if(ve=p.input.charCodeAt(p.position),ve===124)I=!1;else if(ve===62)I=!0;else return!1;for(p.kind="scalar",p.result="";ve!==0;)if(ve=p.input.charCodeAt(++p.position),ve===43||ve===45)jn===E?E=ve===43?vv:pv:ct(p,"repeat of a chomping mode identifier");else if((ue=_v(ve))>=0)ue===0?ct(p,"bad explicit indentation width of a block scalar; it cannot be less than one"):U?ct(p,"repeat of an indentation width identifier"):(X=C+ue-1,U=!0);else break;if(Ba(ve)){do ve=p.input.charCodeAt(++p.position);while(Ba(ve));if(ve===35)do ve=p.input.charCodeAt(++p.position);while(!Kn(ve)&&ve!==0)}for(;ve!==0;){for(Nh(p),p.lineIndent=0,ve=p.input.charCodeAt(p.position);(!U||p.lineIndentX&&(X=p.lineIndent),Kn(ve)){re++;continue}if(p.lineIndentC)&&re!==0)ct(p,"bad indentation of a sequence entry");else if(p.lineIndentC)&&(yt&&(U=p.line,X=p.lineStart,re=p.position),vs(p,C,Ph,!0,E)&&(yt?Oe=p.result:Ze=p.result),yt||(ds(p,ve,Le,Ee,Oe,Ze,U,X,re),Ee=Oe=Ze=null),xr(p,!0,-1),Pt=p.input.charCodeAt(p.position)),(p.line===z||p.lineIndent>C)&&Pt!==0)ct(p,"bad indentation of a mapping entry");else if(p.lineIndentC?re=1:p.lineIndent===C?re=0:p.lineIndentC?re=1:p.lineIndent===C?re=0:p.lineIndent tag; it should be "scalar", not "'+p.kind+'"'),ve=0,Le=p.implicitTypes.length;ve"),p.result!==null&&Oe.kind!==p.kind&&ct(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+Oe.kind+'", not "'+p.kind+'"'),Oe.resolve(p.result,p.tag)?(p.result=Oe.construct(p.result,p.tag),p.anchor!==null&&(p.anchorMap[p.anchor]=p.result)):ct(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.tag!==null||p.anchor!==null||ue}function s_(p){var C=p.position,k,I,E,z=!1,U;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(U=p.input.charCodeAt(p.position))!==0&&(xr(p,!0,-1),U=p.input.charCodeAt(p.position),!(p.lineIndent>0||U!==37));){for(z=!0,U=p.input.charCodeAt(++p.position),k=p.position;U!==0&&!on(U);)U=p.input.charCodeAt(++p.position);for(I=p.input.slice(k,p.position),E=[],I.length<1&&ct(p,"directive name must not be less than one character in length");U!==0;){for(;Ba(U);)U=p.input.charCodeAt(++p.position);if(U===35){do U=p.input.charCodeAt(++p.position);while(U!==0&&!jn(U));break}if(jn(U))break;for(k=p.position;U!==0&&!on(U);)U=p.input.charCodeAt(++p.position);E.push(p.input.slice(k,p.position))}U!==0&&Fh(p),Mi.call($f,I)?$f[I](p,I,E):Il(p,'unknown document directive "'+I+'"')}if(xr(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,xr(p,!0,-1)):z&&ct(p,"directives end mark is expected"),vs(p,p.lineIndent-1,Ph,!1,!0),xr(p,!0,-1),p.checkLineBreaks&&gv.test(p.input.slice(C,p.position))&&Il(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&ps(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,xr(p,!0,-1));return}if(p.position"u"&&(k=C,C=null);var I=Nh(p,k);if(typeof C!="function")return I;for(var E=0,z=I.length;EC)&&re!==0)ct(p,"bad indentation of a sequence entry");else if(p.lineIndentC)&&(yt&&(U=p.line,X=p.lineStart,re=p.position),ms(p,C,Fh,!0,E)&&(yt?Oe=p.result:Ze=p.result),yt||(vs(p,ve,Le,Ee,Oe,Ze,U,X,re),Ee=Oe=Ze=null),xr(p,!0,-1),Pt=p.input.charCodeAt(p.position)),(p.line===z||p.lineIndent>C)&&Pt!==0)ct(p,"bad indentation of a mapping entry");else if(p.lineIndentC?re=1:p.lineIndent===C?re=0:p.lineIndentC?re=1:p.lineIndent===C?re=0:p.lineIndent tag; it should be "scalar", not "'+p.kind+'"'),ve=0,Le=p.implicitTypes.length;ve"),p.result!==null&&Oe.kind!==p.kind&&ct(p,"unacceptable node kind for !<"+p.tag+'> tag; it should be "'+Oe.kind+'", not "'+p.kind+'"'),Oe.resolve(p.result,p.tag)?(p.result=Oe.construct(p.result,p.tag),p.anchor!==null&&(p.anchorMap[p.anchor]=p.result)):ct(p,"cannot resolve a node with !<"+p.tag+"> explicit tag")}return p.listener!==null&&p.listener("close",p),p.tag!==null||p.anchor!==null||ue}function l_(p){var C=p.position,k,I,E,z=!1,U;for(p.version=null,p.checkLineBreaks=p.legacy,p.tagMap=Object.create(null),p.anchorMap=Object.create(null);(U=p.input.charCodeAt(p.position))!==0&&(xr(p,!0,-1),U=p.input.charCodeAt(p.position),!(p.lineIndent>0||U!==37));){for(z=!0,U=p.input.charCodeAt(++p.position),k=p.position;U!==0&&!on(U);)U=p.input.charCodeAt(++p.position);for(I=p.input.slice(k,p.position),E=[],I.length<1&&ct(p,"directive name must not be less than one character in length");U!==0;){for(;Ba(U);)U=p.input.charCodeAt(++p.position);if(U===35){do U=p.input.charCodeAt(++p.position);while(U!==0&&!Kn(U));break}if(Kn(U))break;for(k=p.position;U!==0&&!on(U);)U=p.input.charCodeAt(++p.position);E.push(p.input.slice(k,p.position))}U!==0&&Nh(p),Mi.call(Gf,I)?Gf[I](p,I,E):Il(p,'unknown document directive "'+I+'"')}if(xr(p,!0,-1),p.lineIndent===0&&p.input.charCodeAt(p.position)===45&&p.input.charCodeAt(p.position+1)===45&&p.input.charCodeAt(p.position+2)===45?(p.position+=3,xr(p,!0,-1)):z&&ct(p,"directives end mark is expected"),ms(p,p.lineIndent-1,Fh,!1,!0),xr(p,!0,-1),p.checkLineBreaks&&mv.test(p.input.slice(C,p.position))&&Il(p,"non-ASCII line breaks are interpreted as content"),p.documents.push(p.result),p.position===p.lineStart&&gs(p)){p.input.charCodeAt(p.position)===46&&(p.position+=3,xr(p,!0,-1));return}if(p.position"u"&&(k=C,C=null);var I=Vh(p,k);if(typeof C!="function")return I;for(var E=0,z=I.length;E=55296&&k<=56319&&C+1=56320&&I<=57343)?(k-55296)*1024+I-56320+65536:k}function Et(p){var C=/^\n* /;return C.test(p)}var Qt=1,Ut=2,tr=3,cr=4,br=5;function In(p,C,k,I,E,z,U,X){var re,fe=0,ue=null,ve=!1,Le=!1,Ee=I!==-1,Oe=-1,Ze=ut(qt(p,0))&&mt(qt(p,p.length-1));if(C||U)for(re=0;re=65536?re+=2:re++){if(fe=qt(p,re),!Ne(fe))return br;Ze=Ze&&tt(fe,ue,X),ue=fe}else{for(re=0;re=65536?re+=2:re++){if(fe=qt(p,re),fe===ko)ve=!0,Ee&&(Le=Le||re-Oe-1>I&&p[Oe+1]!==" ",Oe=re);else if(!Ne(fe))return br;Ze=Ze&&tt(fe,ue,X),ue=fe}Le=Le||Ee&&re-Oe-1>I&&p[Oe+1]!==" "}return!ve&&!Le?Ze&&!U&&!E(p)?Qt:z===te?br:Ut:k>9&&Et(p)?br:U?z===te?br:Ut:Le?cr:tr}function gr(p,C,k,I,E){p.dump=function(){if(C.length===0)return p.quotingType===te?'""':"''";if(!p.noCompatMode&&(A.indexOf(C)!==-1||L.test(C)))return p.quotingType===te?'"'+C+'"':"'"+C+"'";var z=p.indent*Math.max(1,k),U=p.lineWidth===-1?-1:Math.max(Math.min(p.lineWidth,40),p.lineWidth-z),X=I||p.flowLevel>-1&&k>=p.flowLevel;function re(fe){return we(p,fe)}switch(In(C,X,p.indent,U,re,p.quotingType,p.forceQuotes&&!I,E)){case Qt:return C;case Ut:return"'"+C.replace(/'/g,"''")+"'";case tr:return"|"+Fa(C,p.indent)+Bn(me(C,z));case cr:return">"+Fa(C,p.indent)+Bn(me(sn(C,U),z));case br:return'"'+gs(C)+'"';default:throw new an("impossible error: invalid scalar style")}}()}function Fa(p,C){var k=Et(p)?String(C):"",I=p[p.length-1]===` +`+Br.repeat(" ",p.indent*C)}function we(p,C){var k,I,E;for(k=0,I=p.implicitTypes.length;k=55296&&k<=56319&&C+1=56320&&I<=57343)?(k-55296)*1024+I-56320+65536:k}function Et(p){var C=/^\n* /;return C.test(p)}var Qt=1,Ut=2,tr=3,cr=4,br=5;function In(p,C,k,I,E,z,U,X){var re,fe=0,ue=null,ve=!1,Le=!1,Ee=I!==-1,Oe=-1,Ze=ut(qt(p,0))&&mt(qt(p,p.length-1));if(C||U)for(re=0;re=65536?re+=2:re++){if(fe=qt(p,re),!Ne(fe))return br;Ze=Ze&&tt(fe,ue,X),ue=fe}else{for(re=0;re=65536?re+=2:re++){if(fe=qt(p,re),fe===ko)ve=!0,Ee&&(Le=Le||re-Oe-1>I&&p[Oe+1]!==" ",Oe=re);else if(!Ne(fe))return br;Ze=Ze&&tt(fe,ue,X),ue=fe}Le=Le||Ee&&re-Oe-1>I&&p[Oe+1]!==" "}return!ve&&!Le?Ze&&!U&&!E(p)?Qt:z===te?br:Ut:k>9&&Et(p)?br:U?z===te?br:Ut:Le?cr:tr}function gr(p,C,k,I,E){p.dump=function(){if(C.length===0)return p.quotingType===te?'""':"''";if(!p.noCompatMode&&(A.indexOf(C)!==-1||L.test(C)))return p.quotingType===te?'"'+C+'"':"'"+C+"'";var z=p.indent*Math.max(1,k),U=p.lineWidth===-1?-1:Math.max(Math.min(p.lineWidth,40),p.lineWidth-z),X=I||p.flowLevel>-1&&k>=p.flowLevel;function re(fe){return we(p,fe)}switch(In(C,X,p.indent,U,re,p.quotingType,p.forceQuotes&&!I,E)){case Qt:return C;case Ut:return"'"+C.replace(/'/g,"''")+"'";case tr:return"|"+Fa(C,p.indent)+Bn(me(C,z));case cr:return">"+Fa(C,p.indent)+Bn(me(sn(C,U),z));case br:return'"'+ys(C)+'"';default:throw new an("impossible error: invalid scalar style")}}()}function Fa(p,C){var k=Et(p)?String(C):"",I=p[p.length-1]===` `,E=I&&(p[p.length-2]===` `||p===` `),z=E?"+":I?"":"-";return k+z+` @@ -350,24 +350,24 @@ new Remarkable().use(linkify) `:"")+ra(re,C),E=z}return I}function ra(p,C){if(p===""||p[0]===" ")return p;for(var k=/ [^ ]/g,I,E=0,z,U=0,X=0,re="";I=k.exec(p);)X=I.index,X-E>C&&(z=U>E?U:X,re+=` `+p.slice(E,z),E=z+1),U=X;return re+=` `,p.length-E>C&&U>E?re+=p.slice(E,U)+` -`+p.slice(U+1):re+=p.slice(E),re.slice(1)}function gs(p){for(var C="",k=0,I,E=0;E=65536?E+=2:E++)k=qt(p,E),I=S[k],!I&&Ne(k)?(C+=p[E],k>=65536&&(C+=p[E+1])):C+=I||Y(k);return C}function ms(p,C,k){var I="",E=p.tag,z,U,X;for(z=0,U=k.length;z"u"&&Rn(p,C,null,!1,!1))&&(I!==""&&(I+=","+(p.condenseFlow?"":" ")),I+=p.dump);p.tag=E,p.dump="["+I+"]"}function $h(p,C,k,I){var E="",z=p.tag,U,X,re;for(U=0,X=k.length;U"u"&&Rn(p,C+1,null,!0,!0,!1,!0))&&((!I||E!=="")&&(E+=be(p,C)),p.dump&&ko===p.dump.charCodeAt(0)?E+="-":E+="- ",E+=p.dump);p.tag=z,p.dump=E||"[]"}function Oa(p,C,k){var I="",E=p.tag,z=Object.keys(k),U,X,re,fe,ue;for(U=0,X=z.length;U1024&&(ue+="? "),ue+=p.dump+(p.condenseFlow?'"':"")+":"+(p.condenseFlow?"":" "),Rn(p,C,fe,!1,!1)&&(ue+=p.dump,I+=ue));p.tag=E,p.dump="{"+I+"}"}function Na(p,C,k,I){var E="",z=p.tag,U=Object.keys(k),X,re,fe,ue,ve,Le;if(p.sortKeys===!0)U.sort();else if(typeof p.sortKeys=="function")U.sort(p.sortKeys);else if(p.sortKeys)throw new an("sortKeys must be a boolean or a function");for(X=0,re=U.length;X1024,ve&&(p.dump&&ko===p.dump.charCodeAt(0)?Le+="?":Le+="? "),Le+=p.dump,ve&&(Le+=be(p,C)),Rn(p,C+1,ue,!0,ve)&&(p.dump&&ko===p.dump.charCodeAt(0)?Le+=":":Le+=": ",Le+=p.dump,E+=Le));p.tag=z,p.dump=E||"{}"}function Pn(p,C,k){var I,E,z,U,X,re;for(E=k?p.explicitTypes:p.implicitTypes,z=0,U=E.length;z tag resolver accepts not "'+re+'" style');p.dump=I}return!0}return!1}function Rn(p,C,k,I,E,z,U){p.tag=null,p.dump=k,Pn(p,k,!1)||Pn(p,k,!0);var X=Dv.call(p.dump),re=I,fe;I&&(I=p.flowLevel<0||p.flowLevel>C);var ue=X==="[object Object]"||X==="[object Array]",ve,Le;if(ue&&(ve=p.duplicates.indexOf(k),Le=ve!==-1),(p.tag!==null&&p.tag!=="?"||Le||p.indent!==2&&C>0)&&(E=!1),Le&&p.usedDuplicates[ve])p.dump="*ref_"+ve;else{if(ue&&Le&&!p.usedDuplicates[ve]&&(p.usedDuplicates[ve]=!0),X==="[object Object]")I&&Object.keys(p.dump).length!==0?(Na(p,C,p.dump,E),Le&&(p.dump="&ref_"+ve+p.dump)):(Oa(p,C,p.dump),Le&&(p.dump="&ref_"+ve+" "+p.dump));else if(X==="[object Array]")I&&p.dump.length!==0?(p.noArrayIndent&&!U&&C>0?$h(p,C-1,p.dump,E):$h(p,C,p.dump,E),Le&&(p.dump="&ref_"+ve+p.dump)):(ms(p,C,p.dump),Le&&(p.dump="&ref_"+ve+" "+p.dump));else if(X==="[object String]")p.tag!=="?"&&gr(p,p.dump,C,z,re);else{if(X==="[object Undefined]")return!1;if(p.skipInvalid)return!1;throw new an("unacceptable kind of an object to dump "+X)}p.tag!==null&&p.tag!=="?"&&(fe=encodeURI(p.tag[0]==="!"?p.tag.slice(1):p.tag).replace(/!/g,"%21"),p.tag[0]==="!"?fe="!"+fe:fe.slice(0,18)==="tag:yaml.org,2002:"?fe="!!"+fe.slice(18):fe="!<"+fe+">",p.dump=fe+" "+p.dump)}return!0}function Yf(p,C){var k=[],I=[],E,z;for(za(p,k,I),E=0,z=I.length;E{const I=C.parse;C.parse=w(I,{before(E){const[z]=E.args;if(!z.startsWith(`--- +`+p.slice(U+1):re+=p.slice(E),re.slice(1)}function ys(p){for(var C="",k=0,I,E=0;E=65536?E+=2:E++)k=qt(p,E),I=S[k],!I&&Ne(k)?(C+=p[E],k>=65536&&(C+=p[E+1])):C+=I||Y(k);return C}function _s(p,C,k){var I="",E=p.tag,z,U,X;for(z=0,U=k.length;z"u"&&Rn(p,C,null,!1,!1))&&(I!==""&&(I+=","+(p.condenseFlow?"":" ")),I+=p.dump);p.tag=E,p.dump="["+I+"]"}function Hh(p,C,k,I){var E="",z=p.tag,U,X,re;for(U=0,X=k.length;U"u"&&Rn(p,C+1,null,!0,!0,!1,!0))&&((!I||E!=="")&&(E+=be(p,C)),p.dump&&ko===p.dump.charCodeAt(0)?E+="-":E+="- ",E+=p.dump);p.tag=z,p.dump=E||"[]"}function Oa(p,C,k){var I="",E=p.tag,z=Object.keys(k),U,X,re,fe,ue;for(U=0,X=z.length;U1024&&(ue+="? "),ue+=p.dump+(p.condenseFlow?'"':"")+":"+(p.condenseFlow?"":" "),Rn(p,C,fe,!1,!1)&&(ue+=p.dump,I+=ue));p.tag=E,p.dump="{"+I+"}"}function Na(p,C,k,I){var E="",z=p.tag,U=Object.keys(k),X,re,fe,ue,ve,Le;if(p.sortKeys===!0)U.sort();else if(typeof p.sortKeys=="function")U.sort(p.sortKeys);else if(p.sortKeys)throw new an("sortKeys must be a boolean or a function");for(X=0,re=U.length;X1024,ve&&(p.dump&&ko===p.dump.charCodeAt(0)?Le+="?":Le+="? "),Le+=p.dump,ve&&(Le+=be(p,C)),Rn(p,C+1,ue,!0,ve)&&(p.dump&&ko===p.dump.charCodeAt(0)?Le+=":":Le+=": ",Le+=p.dump,E+=Le));p.tag=z,p.dump=E||"{}"}function Pn(p,C,k){var I,E,z,U,X,re;for(E=k?p.explicitTypes:p.implicitTypes,z=0,U=E.length;z tag resolver accepts not "'+re+'" style');p.dump=I}return!0}return!1}function Rn(p,C,k,I,E,z,U){p.tag=null,p.dump=k,Pn(p,k,!1)||Pn(p,k,!0);var X=Mv.call(p.dump),re=I,fe;I&&(I=p.flowLevel<0||p.flowLevel>C);var ue=X==="[object Object]"||X==="[object Array]",ve,Le;if(ue&&(ve=p.duplicates.indexOf(k),Le=ve!==-1),(p.tag!==null&&p.tag!=="?"||Le||p.indent!==2&&C>0)&&(E=!1),Le&&p.usedDuplicates[ve])p.dump="*ref_"+ve;else{if(ue&&Le&&!p.usedDuplicates[ve]&&(p.usedDuplicates[ve]=!0),X==="[object Object]")I&&Object.keys(p.dump).length!==0?(Na(p,C,p.dump,E),Le&&(p.dump="&ref_"+ve+p.dump)):(Oa(p,C,p.dump),Le&&(p.dump="&ref_"+ve+" "+p.dump));else if(X==="[object Array]")I&&p.dump.length!==0?(p.noArrayIndent&&!U&&C>0?Hh(p,C-1,p.dump,E):Hh(p,C,p.dump,E),Le&&(p.dump="&ref_"+ve+p.dump)):(_s(p,C,p.dump),Le&&(p.dump="&ref_"+ve+" "+p.dump));else if(X==="[object String]")p.tag!=="?"&&gr(p,p.dump,C,z,re);else{if(X==="[object Undefined]")return!1;if(p.skipInvalid)return!1;throw new an("unacceptable kind of an object to dump "+X)}p.tag!==null&&p.tag!=="?"&&(fe=encodeURI(p.tag[0]==="!"?p.tag.slice(1):p.tag).replace(/!/g,"%21"),p.tag[0]==="!"?fe="!"+fe:fe.slice(0,18)==="tag:yaml.org,2002:"?fe="!!"+fe.slice(18):fe="!<"+fe+">",p.dump=fe+" "+p.dump)}return!0}function Xf(p,C){var k=[],I=[],E,z;for(za(p,k,I),E=0,z=I.length;E{const I=C.parse;C.parse=w(I,{before(E){const[z]=E.args;if(!z.startsWith(`--- `))return;const U=z.indexOf(` --- -`);if(U<0)return;const X=z.slice(4,U);let re;try{var fe;re=kz.load(X),(fe=re)!=null&&fe.markmap&&(re.markmap=Mz(re.markmap))}catch{return}k.frontmatter=re;const ue=U+5;E.args[0]=z.slice(ue)},after(){C.parse=I}})}),{}}};function Mz(p){if(p)return["color","extraJs","extraCss"].forEach(C=>{p[C]!=null&&(p[C]=Lz(p[C]))}),["duration","maxWidth","initialExpandLevel"].forEach(C=>{p[C]!=null&&(p[C]=Ez(p[C]))}),p}function Lz(p){var C;let k;return typeof p=="string"?k=[p]:Array.isArray(p)&&(k=p.filter(I=>I&&typeof I=="string")),(C=k)!=null&&C.length?k:void 0}function Ez(p){if(!isNaN(+p))return+p}const k6=[Dz,bh,Fe];function D6(p){if(p.type==="heading")p.children=p.children.filter(E=>E.type!=="paragraph");else if(p.type==="list_item"){var C;p.children=p.children.filter(E=>["paragraph","fence"].includes(E.type)?(p.content||(p.content=E.content,p.payload=o({},p.payload,E.payload)),!1):!0),((C=p.payload)==null?void 0:C.index)!=null&&(p.content=`${p.payload.index}. ${p.content}`)}else if(p.type==="ordered_list"){var k,I;let E=(k=(I=p.payload)==null?void 0:I.startIndex)!=null?k:1;p.children.forEach(z=>{z.type==="list_item"&&(z.payload=o({},z.payload,{index:E}),E+=1)})}p.children.length===0?delete p.children:(p.children.forEach(E=>D6(E)),p.children.length===1&&!p.children[0].content&&(p.children=p.children[0].children))}function M6(p,C=0){var k;p.depth=C,(k=p.children)==null||k.forEach(I=>{M6(I,C+1)})}class Iz{constructor(C=k6){this.assetsMap={},this.plugins=C,this.hooks=Gp();const k={};for(const{name:E,transform:z}of C)k[E]=z(this.hooks);this.assetsMap=k;const I=new La("full",{html:!0,breaks:!0,maxNesting:1/0});I.renderer.rules.htmltag=w(I.renderer.rules.htmltag,{after:E=>{this.hooks.htmltag.call(E)}}),this.md=I,this.hooks.parser.call(I)}buildTree(C){const{md:k}=this,I={type:"root",depth:0,content:"",children:[],payload:{}},E=[I];let z=0;for(const re of C){let fe=E[E.length-1];if(re.type.endsWith("_open")){const ue=re.type.slice(0,-5),ve={};if(re.lines&&(ve.lines=re.lines),ue==="heading")for(z=re.hLevel;((U=fe)==null?void 0:U.depth)>=z;){var U;E.pop(),fe=E[E.length-1]}else{var X;z=Math.max(z,((X=fe)==null?void 0:X.depth)||0)+1,ue==="ordered_list"&&(ve.startIndex=re.order)}const Le={type:ue,depth:z,payload:ve,content:"",children:[]};fe.children.push(Le),E.push(Le)}else if(fe){if(re.type===`${fe.type}_close`)fe.type==="heading"?z=fe.depth:(E.pop(),z=0);else if(re.type==="inline"){const ue=this.hooks.htmltag.tap(Le=>{const Ee=Le.result.match(/^$/),Oe=Ee==null?void 0:Ee[1].trim().split(" ");Oe[0]==="fold"&&(fe.payload.fold=["all","recursively"].includes(Oe[1])?2:1,Le.result="")}),ve=k.renderer.render([re],k.options,{});ue(),fe.content=`${fe.content||""}${ve}`}else if(re.type==="fence"){let ue=k.renderer.render([re],k.options,{});const ve=ue.match(//);ve&&(ue=ue.replace("
",``)),fe.children.push({type:re.type,depth:z+1,content:ue,children:[]})}}else continue}return I}transform(C){var k;const I={features:{}};this.hooks.beforeParse.call(this.md,I);const E=this.md.parse(C,{});this.hooks.afterParse.call(this.md,I);let z=this.buildTree(E);return D6(z),((k=z.children)==null?void 0:k.length)===1&&(z=z.children[0]),M6(z),o({},I,{root:z})}getAssets(C){var k;const I=[],E=[];(k=C)!=null||(C=this.plugins.map(z=>z.name));for(const z of C.map(U=>this.assetsMap[U]))z&&(z.styles&&I.push(...z.styles),z.scripts&&E.push(...z.scripts));return{styles:I,scripts:E}}getUsedAssets(C){const k=this.plugins.map(I=>I.name).filter(I=>C[I]);return this.getAssets(k)}}const Bz={"markmap-lib":"0.14.4",d3:"6.7.0"};r.Transformer=Iz,r.builtInPlugins=k6,r.fillTemplate=H,r.transformerVersions=Bz})})(m4,m4.exports);var h$=m4.exports;/*! markmap-common v0.14.2 | MIT License */class yM{constructor(){this.listeners=[]}tap(e){return this.listeners.push(e),()=>this.revoke(e)}revoke(e){const r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)}revokeAll(){this.listeners.splice(0)}call(...e){for(const r of this.listeners)r(...e)}}function yd(){return yd=Object.assign||function(t){for(var e=1;ee(i,()=>{var o;(o=i[r])==null||o.forEach(s=>{n(s,i)})},a);n(t)}function _M(t){if(Array.from)return Array.from(t);const e=[];for(let r=0;r{n&&r.indexOf(n)<0&&r.push(n)}),r.join(" ")}function Uh(t){if(typeof t=="string"){const r=t;t=n=>n.tagName===r}const e=t;return function(){let n=_M(this.childNodes);return e&&(n=n.filter(i=>e(i))),n}}function p$(t){const e={};return function(...n){const i=`${n[0]}`;let a=e[i];return a||(a={value:t(...n)},e[i]=a),a.value}}function jm(t,e,r){const n=document.createElement(t);return e&&Object.entries(e).forEach(([i,a])=>{n[i]=a}),r&&Object.entries(r).forEach(([i,a])=>{n.setAttribute(i,a)}),n}const v$=p$(t=>{document.head.append(jm("link",{rel:"preload",as:"script",href:t}))});async function g$(t,e){if(!t.loaded&&(t.type==="script"&&(t.loaded=new Promise((r,n)=>{var i;document.head.append(jm("script",yd({},t.data,{onload:r,onerror:n}))),(i=t.data)!=null&&i.src||r(void 0)}).then(()=>{t.loaded=!0})),t.type==="iife")){const{fn:r,getParams:n}=t.data;r(...(n==null?void 0:n(e))||[]),t.loaded=!0}await t.loaded}function m$(t){t.loaded||(t.loaded=!0,t.type==="style"?document.head.append(jm("style",{textContent:t.data})):t.type==="stylesheet"&&document.head.append(jm("link",yd({rel:"stylesheet"},t.data))))}async function y$(t,e){const r=t.filter(n=>{var i;return n.type==="script"&&((i=n.data)==null?void 0:i.src)});r.length>1&&r.forEach(n=>v$(n.data.src)),e=yd({getMarkmap:()=>window.markmap},e);for(const n of t)await g$(n,e)}function _$(t){for(const e of t)m$(e)}function Y6(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}function X6(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function x$(t,e){let r,n=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);return n}var b$={value:()=>{}};function F3(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}fm.prototype=F3.prototype={constructor:fm,on:function(t,e){var r=this._,n=S$(t+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),j6.hasOwnProperty(e)?{space:j6[e],local:t}:t}function C$(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===_4&&e.documentElement.namespaceURI===_4?e.createElement(t):e.createElementNS(r,t)}}function A$(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xM(t){var e=xy(t);return(e.local?A$:C$)(e)}function T$(){}function O3(t){return t==null?T$:function(){return this.querySelector(t)}}function k$(t){typeof t!="function"&&(t=O3(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=w&&(w=b+1);!(M=m[w])&&++w=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function j$(t){t||(t=K$);function e(c,f){return c&&f?t(c.__data__,f.__data__):!c-!f}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}function J$(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Q$(){return Array.from(this)}function eG(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?cG:typeof e=="function"?dG:fG)(t,e,r??"")):Rc(this.node(),t)}function Rc(t,e){return t.style.getPropertyValue(e)||TM(t).getComputedStyle(t,null).getPropertyValue(e)}function vG(t){return function(){delete this[t]}}function gG(t,e){return function(){this[t]=e}}function mG(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function yG(t,e){return arguments.length>1?this.each((e==null?vG:typeof e=="function"?mG:gG)(t,e)):this.node()[t]}function kM(t){return t.trim().split(/^|\s+/)}function N3(t){return t.classList||new DM(t)}function DM(t){this._node=t,this._names=kM(t.getAttribute("class")||"")}DM.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function MM(t,e){for(var r=N3(t),n=-1,i=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function UG(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Yv(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Yv(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=iH.exec(t))?new xi(e[1],e[2],e[3],1):(e=aH.exec(t))?new xi(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=oH.exec(t))?Yv(e[1],e[2],e[3],e[4]):(e=sH.exec(t))?Yv(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=lH.exec(t))?nC(e[1],e[2]/100,e[3]/100,1):(e=uH.exec(t))?nC(e[1],e[2]/100,e[3]/100,e[4]):K6.hasOwnProperty(t)?eC(K6[t]):t==="transparent"?new xi(NaN,NaN,NaN,0):null}function eC(t){return new xi(t>>16&255,t>>8&255,t&255,1)}function Yv(t,e,r,n){return n<=0&&(t=e=r=NaN),new xi(t,e,r,n)}function cH(t){return t instanceof up||(t=bd(t)),t?(t=t.rgb(),new xi(t.r,t.g,t.b,t.opacity)):new xi}function b4(t,e,r,n){return arguments.length===1?cH(t):new xi(t,e,r,n??1)}function xi(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}z3(xi,b4,BM(up,{brighter:function(t){return t=t==null?Jm:Math.pow(Jm,t),new xi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?_d:Math.pow(_d,t),new xi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:tC,formatHex:tC,formatRgb:rC,toString:rC}));function tC(){return"#"+w_(this.r)+w_(this.g)+w_(this.b)}function rC(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function w_(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function nC(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Xa(t,e,r,n)}function PM(t){if(t instanceof Xa)return new Xa(t.h,t.s,t.l,t.opacity);if(t instanceof up||(t=bd(t)),!t)return new Xa;if(t instanceof Xa)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(e===a?o=(r-n)/s+(r0&&l<1?0:o,new Xa(o,s,l,t.opacity)}function fH(t,e,r,n){return arguments.length===1?PM(t):new Xa(t,e,r,n??1)}function Xa(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}z3(Xa,fH,BM(up,{brighter:function(t){return t=t==null?Jm:Math.pow(Jm,t),new Xa(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?_d:Math.pow(_d,t),new Xa(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new xi(C_(t>=240?t-240:t+120,i,n),C_(t,i,n),C_(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function C_(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const RM=t=>()=>t;function dH(t,e){return function(r){return t+r*e}}function pH(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function vH(t){return(t=+t)==1?FM:function(e,r){return r-e?pH(e,r,t):RM(isNaN(e)?r:e)}}function FM(t,e){var r=e-t;return r?dH(t,r):RM(isNaN(t)?e:t)}const iC=function t(e){var r=vH(e);function n(i,a){var o=r((i=b4(i)).r,(a=b4(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=FM(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=s(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);function Ps(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var S4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,A_=new RegExp(S4.source,"g");function gH(t){return function(){return t}}function mH(t){return function(e){return t(e)+""}}function yH(t,e){var r=S4.lastIndex=A_.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(t=t+"",e=e+"";(n=S4.exec(t))&&(i=A_.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Ps(n,i)})),r=A_.lastIndex;return r180?h+=360:h-u>180&&(u+=360),f.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Ps(u,h)})):h&&c.push(i(c)+"rotate("+h+n)}function s(u,h,c,f){u!==h?f.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Ps(u,h)}):h&&c.push(i(c)+"skewX("+h+n)}function l(u,h,c,f,d,v){if(u!==c||h!==f){var g=d.push(i(d)+"scale(",null,",",null,")");v.push({i:g-4,x:Ps(u,c)},{i:g-2,x:Ps(h,f)})}else(c!==1||f!==1)&&d.push(i(d)+"scale("+c+","+f+")")}return function(u,h){var c=[],f=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,c,f),o(u.rotate,h.rotate,c,f),s(u.skewX,h.skewX,c,f),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,c,f),u=h=null,function(d){for(var v=-1,g=f.length,m;++v=0&&t._call.call(null,e),t=t._next;--Fc}function sC(){qu=(e1=Sd.now())+by,Fc=R0=0;try{DH()}finally{Fc=0,LH(),qu=0}}function MH(){var t=Sd.now(),e=t-e1;e>zM&&(by-=e,e1=t)}function LH(){for(var t,e=Qm,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Qm=r);F0=t,C4(n)}function C4(t){if(!Fc){R0&&(R0=clearTimeout(R0));var e=t-qu;e>24?(t<1/0&&(R0=setTimeout(sC,t-Sd.now()-by)),Qf&&(Qf=clearInterval(Qf))):(Qf||(e1=Sd.now(),Qf=setInterval(MH,zM)),Fc=1,VM(sC))}}function lC(t,e,r){var n=new t1;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var EH=F3("start","end","cancel","interrupt"),IH=[],GM=0,uC=1,A4=2,dm=3,hC=4,T4=5,pm=6;function Sy(t,e,r,n,i,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;BH(t,r,{name:e,index:n,group:i,on:EH,tween:IH,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:GM})}function $3(t,e){var r=Sa(t,e);if(r.state>GM)throw new Error("too late; already scheduled");return r}function po(t,e){var r=Sa(t,e);if(r.state>dm)throw new Error("too late; already running");return r}function Sa(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function BH(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=$M(a,0,r.time);function a(u){r.state=uC,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var h,c,f,d;if(r.state!==uC)return l();for(h in n)if(d=n[h],d.name===r.name){if(d.state===dm)return lC(o);d.state===hC?(d.state=pm,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+hA4&&n.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function uq(t,e,r){var n,i,a=lq(e)?$3:po;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}function hq(t,e){var r=this._id;return arguments.length<2?Sa(this.node(),r).on.on(t):this.each(uq(r,t,e))}function cq(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function fq(){return this.on("end.remove",cq(this._id))}function dq(t){var e=this._name,r=this._id;typeof t!="function"&&(t=O3(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;olu)if(!(Math.abs(h*s-l*u)>lu)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var f=r-a,d=n-o,v=s*s+l*l,g=f*f+d*d,m=Math.sqrt(v),y=Math.sqrt(c),b=i*Math.tan((k4-Math.acos((v+c-g)/(2*m*y)))/2),w=b/y,T=b/m;Math.abs(w-1)>lu&&(this._+="L"+(t+w*u)+","+(e+w*h)),this._+="A"+i+","+i+",0,0,"+ +(h*f>u*d)+","+(this._x1=t+T*s)+","+(this._y1=e+T*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var o=r*Math.cos(n),s=r*Math.sin(n),l=t+o,u=e+s,h=1^a,c=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>lu||Math.abs(this._y1-u)>lu)&&(this._+="L"+l+","+u),r&&(c<0&&(c=c%D4+D4),c>Nq?this._+="A"+r+","+r+",0,1,"+h+","+(t-o)+","+(e-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):c>lu&&(this._+="A"+r+","+r+",0,"+ +(c>=k4)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function zq(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const cC=Symbol("implicit");function YM(){var t=new Map,e=[],r=[],n=cC;function i(a){var o=a+"",s=t.get(o);if(!s){if(n!==cC)return n;t.set(o,s=e.push(a))}return r[(s-1)%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Map;for(const o of a){const s=o+"";t.has(s)||t.set(s,e.push(o))}return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return YM(e,r).unknown(n)},zq.apply(i,arguments),i}function Vq(t){for(var e=t.length/6|0,r=new Array(e),n=0;n()=>t;function jq(t,{sourceEvent:e,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function No(t,e,r){this.k=t,this.x=e,this.y=r}No.prototype={constructor:No,scale:function(t){return t===1?this:new No(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new No(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+")"}};var wy=new No(1,0,0);gm.prototype=No.prototype;function gm(t){for(;!t.__zoom;)if(!(t=t.parentNode))return wy;return t.__zoom}function T_(t){t.stopImmediatePropagation()}function e0(t){t.preventDefault(),t.stopImmediatePropagation()}function Kq(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Jq(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function dC(){return this.__zoom||wy}function Qq(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function eW(){return navigator.maxTouchPoints||"ontouchstart"in this}function tW(t,e,r){var n=t.invertX(e[0][0])-r[0][0],i=t.invertX(e[1][0])-r[1][0],a=t.invertY(e[0][1])-r[0][1],o=t.invertY(e[1][1])-r[1][1];return t.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function rW(){var t=Kq,e=Jq,r=tW,n=Qq,i=eW,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=TH,u=F3("start","zoom","end"),h,c,f,d=500,v=150,g=0,m=10;function y(G){G.property("__zoom",dC).on("wheel.zoom",O).on("mousedown.zoom",V).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(G,J,K,se){var ae=G.selection?G.selection():G;ae.property("__zoom",dC),G!==ae?M(G,J,K,se):ae.interrupt().each(function(){D(this,arguments).event(se).start().zoom(null,typeof J=="function"?J.apply(this,arguments):J).end()})},y.scaleBy=function(G,J,K,se){y.scaleTo(G,function(){var ae=this.__zoom.k,ce=typeof J=="function"?J.apply(this,arguments):J;return ae*ce},K,se)},y.scaleTo=function(G,J,K,se){y.transform(G,function(){var ae=e.apply(this,arguments),ce=this.__zoom,ye=K==null?T(ae):typeof K=="function"?K.apply(this,arguments):K,de=ce.invert(ye),De=typeof J=="function"?J.apply(this,arguments):J;return r(w(b(ce,De),ye,de),ae,o)},K,se)},y.translateBy=function(G,J,K,se){y.transform(G,function(){return r(this.__zoom.translate(typeof J=="function"?J.apply(this,arguments):J,typeof K=="function"?K.apply(this,arguments):K),e.apply(this,arguments),o)},null,se)},y.translateTo=function(G,J,K,se,ae){y.transform(G,function(){var ce=e.apply(this,arguments),ye=this.__zoom,de=se==null?T(ce):typeof se=="function"?se.apply(this,arguments):se;return r(wy.translate(de[0],de[1]).scale(ye.k).translate(typeof J=="function"?-J.apply(this,arguments):-J,typeof K=="function"?-K.apply(this,arguments):-K),ce,o)},se,ae)};function b(G,J){return J=Math.max(a[0],Math.min(a[1],J)),J===G.k?G:new No(J,G.x,G.y)}function w(G,J,K){var se=J[0]-K[0]*G.k,ae=J[1]-K[1]*G.k;return se===G.x&&ae===G.y?G:new No(G.k,se,ae)}function T(G){return[(+G[0][0]+ +G[1][0])/2,(+G[0][1]+ +G[1][1])/2]}function M(G,J,K,se){G.on("start.zoom",function(){D(this,arguments).event(se).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(se).end()}).tween("zoom",function(){var ae=this,ce=arguments,ye=D(ae,ce).event(se),de=e.apply(ae,ce),De=K==null?T(de):typeof K=="function"?K.apply(ae,ce):K,Ie=Math.max(de[1][0]-de[0][0],de[1][1]-de[0][1]),Pe=ae.__zoom,Qe=typeof J=="function"?J.apply(ae,ce):J,Ke=l(Pe.invert(De).concat(Ie/Pe.k),Qe.invert(De).concat(Ie/Qe.k));return function(et){if(et===1)et=Qe;else{var qe=Ke(et),lt=Ie/qe[2];et=new No(lt,De[0]-qe[0]*lt,De[1]-qe[1]*lt)}ye.zoom(null,et)}})}function D(G,J,K){return!K&&G.__zooming||new P(G,J)}function P(G,J){this.that=G,this.args=J,this.active=0,this.sourceEvent=null,this.extent=e.apply(G,J),this.taps=0}P.prototype={event:function(G){return G&&(this.sourceEvent=G),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(G,J){return this.mouse&&G!=="mouse"&&(this.mouse[1]=J.invert(this.mouse[0])),this.touch0&&G!=="touch"&&(this.touch0[1]=J.invert(this.touch0[0])),this.touch1&&G!=="touch"&&(this.touch1[1]=J.invert(this.touch1[0])),this.that.__zoom=J,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(G){var J=Vs(this.that).datum();u.call(G,this.that,new jq(G,{sourceEvent:this.sourceEvent,target:y,type:G,transform:this.that.__zoom,dispatch:u}),J)}};function O(G,...J){if(!t.apply(this,arguments))return;var K=D(this,J).event(G),se=this.__zoom,ae=Math.max(a[0],Math.min(a[1],se.k*Math.pow(2,n.apply(this,arguments)))),ce=Rl(G);if(K.wheel)(K.mouse[0][0]!==ce[0]||K.mouse[0][1]!==ce[1])&&(K.mouse[1]=se.invert(K.mouse[0]=ce)),clearTimeout(K.wheel);else{if(se.k===ae)return;K.mouse=[ce,se.invert(ce)],vm(this),K.start()}e0(G),K.wheel=setTimeout(ye,v),K.zoom("mouse",r(w(b(se,ae),K.mouse[0],K.mouse[1]),K.extent,o));function ye(){K.wheel=null,K.end()}}function V(G,...J){if(f||!t.apply(this,arguments))return;var K=D(this,J,!0).event(G),se=Vs(G.view).on("mousemove.zoom",De,!0).on("mouseup.zoom",Ie,!0),ae=Rl(G,ce),ce=G.currentTarget,ye=G.clientX,de=G.clientY;tH(G.view),T_(G),K.mouse=[ae,this.__zoom.invert(ae)],vm(this),K.start();function De(Pe){if(e0(Pe),!K.moved){var Qe=Pe.clientX-ye,Ke=Pe.clientY-de;K.moved=Qe*Qe+Ke*Ke>g}K.event(Pe).zoom("mouse",r(w(K.that.__zoom,K.mouse[0]=Rl(Pe,ce),K.mouse[1]),K.extent,o))}function Ie(Pe){se.on("mousemove.zoom mouseup.zoom",null),rH(Pe.view,K.moved),e0(Pe),K.event(Pe).end()}}function $(G,...J){if(t.apply(this,arguments)){var K=this.__zoom,se=Rl(G.changedTouches?G.changedTouches[0]:G,this),ae=K.invert(se),ce=K.k*(G.shiftKey?.5:2),ye=r(w(b(K,ce),se,ae),e.apply(this,J),o);e0(G),s>0?Vs(this).transition().duration(s).call(M,ye,se,G):Vs(this).call(y.transform,ye,se,G)}}function H(G,...J){if(t.apply(this,arguments)){var K=G.touches,se=K.length,ae=D(this,J,G.changedTouches.length===se).event(G),ce,ye,de,De;for(T_(G),ye=0;ye=0;)e+=r[n].value;t.value=e}function iW(){return this.eachAfter(nW)}function aW(t){var e=this,r,n=[e],i,a,o;do for(r=n.reverse(),n=[];e=r.pop();)if(t(e),i=e.children,i)for(a=0,o=i.length;a=0;--i)r.push(n[i]);return this}function sW(t){for(var e=this,r=[e],n=[],i,a,o;e=r.pop();)if(n.push(e),i=e.children,i)for(a=0,o=i.length;a=0;)r+=n[i].value;e.value=r})}function uW(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function hW(t){for(var e=this,r=cW(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n}function cW(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}function fW(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function dW(){var t=[];return this.each(function(e){t.push(e)}),t}function pW(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function vW(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function H3(t,e){var r=new r1(t),n=+t.value&&(r.value=t.value),i,a=[r],o,s,l,u;for(e==null&&(e=mW);i=a.pop();)if(n&&(i.value=+i.data.value),(s=e(i.data))&&(u=s.length))for(i.children=new Array(u),l=u-1;l>=0;--l)a.push(o=i.children[l]=new r1(s[l])),o.parent=i,o.depth=i.depth+1;return r.eachBefore(_W)}function gW(){return H3(this).eachBefore(yW)}function mW(t){return t.children}function yW(t){t.data=t.data.data}function _W(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function r1(t){this.data=t,this.depth=this.height=0,this.parent=null}r1.prototype=H3.prototype={constructor:r1,count:iW,each:aW,eachAfter:sW,eachBefore:oW,sum:lW,sort:uW,path:hW,ancestors:fW,descendants:dW,leaves:pW,links:vW,copy:gW};var xW="d3-flextree",bW="2.1.2",SW="build/d3-flextree.js",wW="index",CW={name:"Chris Maloney",url:"http://chrismaloney.org"},AW="Flexible tree layout algorithm that allows for variable node sizes.",TW=["d3","d3-module","layout","tree","hierarchy","d3-hierarchy","plugin","d3-plugin","infovis","visualization","2d"],kW="https://github.com/klortho/d3-flextree",DW="WTFPL",MW={type:"git",url:"https://github.com/klortho/d3-flextree.git"},LW={clean:"rm -rf build demo test","build:demo":"rollup -c --environment BUILD:demo","build:dev":"rollup -c --environment BUILD:dev","build:prod":"rollup -c --environment BUILD:prod","build:test":"rollup -c --environment BUILD:test",build:"rollup -c",lint:"eslint index.js src","test:main":"node test/bundle.js","test:browser":"node test/browser-tests.js",test:"npm-run-all test:*",prepare:"npm-run-all clean build lint test"},EW={"d3-hierarchy":"^1.1.5"},IW={"babel-plugin-external-helpers":"^6.22.0","babel-preset-es2015-rollup":"^3.0.0",d3:"^4.13.0","d3-selection-multi":"^1.0.1",eslint:"^4.19.1",jsdom:"^11.6.2","npm-run-all":"^4.1.2",rollup:"^0.55.3","rollup-plugin-babel":"^2.7.1","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-copy":"^0.2.3","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","rollup-plugin-uglify":"^3.0.0","uglify-es":"^3.3.9"},BW={name:xW,version:bW,main:SW,module:wW,"jsnext:main":"index",author:CW,description:AW,keywords:TW,homepage:kW,license:DW,repository:MW,scripts:LW,dependencies:EW,devDependencies:IW};const{version:PW}=BW,RW=Object.freeze({children:t=>t.children,nodeSize:t=>t.data.size,spacing:0});function ZM(t){const e=Object.assign({},RW,t);function r(s){const l=e[s];return typeof l=="function"?l:()=>l}function n(s){const l=o(a(),s,u=>u.children);return l.update(),l.data}function i(){const s=r("nodeSize"),l=r("spacing");return class XM extends H3.prototype.constructor{constructor(h){super(h)}copy(){const h=o(this.constructor,this,c=>c.children);return h.each(c=>c.data=c.data.data),h}get size(){return s(this)}spacing(h){return l(this,h)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const h=this.ancestors();return h[h.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((h,c)=>XM.maxExtents(h,c.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(h,c){return{top:Math.min(h.top,c.top),bottom:Math.max(h.bottom,c.bottom),left:Math.min(h.left,c.left),right:Math.max(h.right,c.right)}}}}function a(){const s=i(),l=r("nodeSize"),u=r("spacing");return class extends s{constructor(h){super(h),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return l(this.data)}spacing(h){return u(this.data,h.data)}get x(){return this.data.x}set x(h){this.data.x=h}get y(){return this.data.y}set y(h){this.data.y=h}update(){return jM(this),KM(this),this}}}function o(s,l,u){const h=(c,f)=>{const d=new s(c);Object.assign(d,{parent:f,depth:f===null?0:f.depth+1,height:0,length:1});const v=u(c)||[];return d.children=v.length===0?null:v.map(g=>h(g,d)),d.children&&Object.assign(d,d.children.reduce((g,m)=>({height:Math.max(g.height,m.height+1),length:g.length+m.length}),d)),d};return h(l,null)}return Object.assign(n,{nodeSize(s){return arguments.length?(e.nodeSize=s,n):e.nodeSize},spacing(s){return arguments.length?(e.spacing=s,n):e.spacing},children(s){return arguments.length?(e.children=s,n):e.children},hierarchy(s,l){const u=typeof l>"u"?e.children:l;return o(i(),s,u)},dump(s){const l=r("nodeSize"),u=h=>c=>{const f=h+"  ",d=h+"    ",{x:v,y:g}=c,m=l(c),y=c.children||[],b=y.length===0?" ":`,${f}children: [${d}${y.map(u(d)).join(d)}${f}],${h}`;return`{ size: [${m.join(", ")}],${f}x: ${v}, y: ${g}${b}},`};return u(`
-`)(s)}}),n}ZM.version=PW;const jM=(t,e=0)=>(t.y=e,(t.children||[]).reduce((r,n)=>{const[i,a]=r;jM(n,t.y+t.ySize);const o=(i===0?n.lExt:n.rExt).bottom;i!==0&&OW(t,i,a);const s=WW(o,i,a);return[i+1,s]},[0,null]),FW(t),qW(t),t),KM=(t,e,r)=>{typeof e>"u"&&(e=-t.relX-t.prelim,r=0);const n=e+t.relX;return t.relX=n+t.prelim-r,t.prelim=0,t.x=r+t.relX,(t.children||[]).forEach(i=>KM(i,n,t.x)),t},FW=t=>{(t.children||[]).reduce((e,r)=>{const[n,i]=e,a=n+r.shift,o=i+a+r.change;return r.relX+=o,[a,o]},[0,0])},OW=(t,e,r)=>{const n=t.children[e-1],i=t.children[e];let a=n,o=n.relX,s=i,l=i.relX,u=!0;for(;a&&s;){a.bottom>r.lowY&&(r=r.next);const h=o+a.prelim-(l+s.prelim)+a.xSize/2+s.xSize/2+a.spacing(s);(h>0||h<0&&u)&&(l+=h,NW(i,h),zW(t,e,r.index,h)),u=!1;const c=a.bottom,f=s.bottom;c<=f&&(a=$W(a),a&&(o+=a.relX)),c>=f&&(s=VW(s),s&&(l+=s.relX))}!a&&s?GW(t,e,s,l):a&&!s&&HW(t,e,a,o)},NW=(t,e)=>{t.relX+=e,t.lExtRelX+=e,t.rExtRelX+=e},zW=(t,e,r,n)=>{const i=t.children[e],a=e-r;if(a>1){const o=n/a;t.children[r+1].shift+=o,i.shift-=o,i.change-=n-o}},VW=t=>t.hasChildren?t.firstChild:t.lThr,$W=t=>t.hasChildren?t.lastChild:t.rThr,GW=(t,e,r,n)=>{const i=t.firstChild,a=i.lExt,o=t.children[e];a.lThr=r;const s=n-r.relX-i.lExtRelX;a.relX+=s,a.prelim-=s,i.lExt=o.lExt,i.lExtRelX=o.lExtRelX},HW=(t,e,r,n)=>{const i=t.children[e],a=i.rExt,o=t.children[e-1];a.rThr=r;const s=n-r.relX-i.rExtRelX;a.relX+=s,a.prelim-=s,i.rExt=o.rExt,i.rExtRelX=o.rExtRelX},qW=t=>{if(t.hasChildren){const e=t.firstChild,r=t.lastChild,n=(e.prelim+e.relX-e.xSize/2+r.relX+r.prelim+r.xSize/2)/2;Object.assign(t,{prelim:n,lExt:e.lExt,lExtRelX:e.lExtRelX,rExt:r.rExt,rExtRelX:r.rExtRelX})}},WW=(t,e,r)=>{for(;r!==null&&t>=r.lowY;)r=r.next;return{lowY:t,index:e,next:r}};/*! @gera2ld/jsx-dom v2.1.1 | ISC License */var JM=1,QM=2,mu=1,eL=4,UW="http://www.w3.org/2000/svg",k_="http://www.w3.org/1999/xlink",YW={show:k_,actuate:k_,href:k_},XW=function(e){return typeof e=="string"||typeof e=="number"},ZW=function(e){return(e==null?void 0:e.vtype)===JM},jW=function(e){return(e==null?void 0:e.vtype)===QM};function jv(t,e){var r;if(typeof t=="string")r=JM;else if(typeof t=="function")r=QM;else throw new Error("Invalid VNode type");return{vtype:r,type:t,props:e}}function KW(t){return t.children}var JW={isSvg:!1};function L4(t,e){if(e.type===mu)e.node!=null&&t.append(e.node);else if(e.type===eL)e.children.forEach(function(r){L4(t,r)});else throw new Error("Unkown ref type "+JSON.stringify(e))}function QW(t,e,r){for(var n in e)n==="key"||n==="children"||n==="ref"||(n==="dangerouslySetInnerHTML"?t.innerHTML=e[n].__html:n==="innerHTML"||n==="textContent"||n==="innerText"?t[n]=e[n]:n.startsWith("on")?t[n.toLowerCase()]=e[n]:tU(t,n,e[n],r.isSvg))}var eU={className:"class",labelFor:"for"};function tU(t,e,r,n){if(e=eU[e]||e,r===!0)t.setAttribute(e,"");else if(r===!1)t.removeAttribute(e);else{var i=n?YW[e]:void 0;i!==void 0?t.setAttributeNS(i,e,r):t.setAttribute(e,r)}}function O0(t,e){if(e===void 0&&(e=JW),t==null||typeof t=="boolean")return{type:mu,node:null};if(t instanceof Node)return{type:mu,node:t};if(jW(t)){var r=t,n=r.type,i=r.props;if(n===KW){var a=document.createDocumentFragment();if(i.children){var o=O0(i.children,e);L4(a,o)}return{type:mu,node:a}}var s=n(i);return O0(s,e)}if(XW(t))return{type:mu,node:document.createTextNode(""+t)};if(ZW(t)){var l,u=t,h=u.type,c=u.props;!e.isSvg&&h==="svg"&&(e=Object.assign({},e,{isSvg:!0})),e.isSvg?l=document.createElementNS(UW,h):l=document.createElement(h),QW(l,c,e);var f;if(c.children){var d=e;e.isSvg&&h==="foreignObject"&&(d=Object.assign({},d,{isSvg:!1})),f=O0(c.children,d)}f!=null&&L4(l,f);var v=c.ref;return typeof v=="function"&&v(l),{type:mu,node:l}}if(Array.isArray(t))return{type:eL,children:t.map(function(g){return O0(g,e)})};throw new Error("mount: Invalid Vnode!")}function tL(t){for(var e=[],r=0;r{r.ySizeInner=r.ySize-e,r.y+=e,n()},"children")}function vC(t,e){const r=x$(t,e);return t[r]}function gC(t){t.stopPropagation()}function aU(){return{transformHtml:new yM}}const oU=new yM,sU=YM($q),lU=typeof navigator<"u"&&navigator.userAgent.includes("Macintosh");class wd{constructor(e,r){this.revokers=[],["handleZoom","handleClick","handlePan"].forEach(n=>{this[n]=this[n].bind(this)}),this.viewHooks=aU(),this.svg=e.datum?e:Vs(e),this.styleNode=this.svg.append("style"),this.zoom=rW().filter(n=>this.options.scrollForPan&&n.type==="wheel"?n.ctrlKey&&!n.button:(!n.ctrlKey||n.type==="wheel")&&!n.button).on("zoom",this.handleZoom),this.setOptions(r),this.state={id:this.options.id||this.svg.attr("id")||f$()},this.g=this.svg.append("g"),this.revokers.push(oU.tap(()=>{this.setData()}))}getStyleContent(){const{style:e}=this.options,{id:r}=this.state,n=typeof e=="function"?e(r):"";return[this.options.embedGlobalCSS&&rU,n].filter(Boolean).join(`
-`)}updateStyle(){this.svg.attr("class",d$(this.svg.attr("class"),"markmap",this.state.id));const e=this.getStyleContent();this.styleNode.text(e)}handleZoom(e){const{transform:r}=e;this.g.attr("transform",r)}handlePan(e){e.preventDefault();const r=gm(this.svg.node()),n=r.translate(-e.deltaX/r.k,-e.deltaY/r.k);this.svg.call(this.zoom.transform,n)}handleClick(e,r){var n;const{data:i}=r;i.payload=Rs({},i.payload,{fold:(n=i.payload)!=null&&n.fold?0:1}),this.renderData(r.data)}initializeData(e){let r=0;const{color:n,nodeMinHeight:i,maxWidth:a,initialExpandLevel:o}=this.options,{id:s}=this.state,l=mm(jv("div",{className:`markmap-container markmap ${s}-g`})),u=mm(jv("style",{children:[this.getStyleContent(),nU].join(`
-`)}));document.body.append(l,u);const h=a?`max-width: ${a}px`:"";let c=0;y4(e,(d,v,g)=>{var m,y,b;d.children=(m=d.children)==null?void 0:m.map(M=>Rs({},M)),r+=1;const w=mm(jv("div",{className:"markmap-foreign",style:h,children:jv("div",{dangerouslySetInnerHTML:{__html:d.content}})}));l.append(w),d.state=Rs({},d.state,{id:r,el:w.firstChild}),d.state.path=[g==null||(y=g.state)==null?void 0:y.path,d.state.id].filter(Boolean).join("."),n(d);const T=((b=d.payload)==null?void 0:b.fold)===2;T?c+=1:(c||o>=0&&d.depth>=o)&&(d.payload=Rs({},d.payload,{fold:1})),v(),T&&(c-=1)});const f=_M(l.childNodes).map(d=>d.firstChild);this.viewHooks.transformHtml.call(this,f),f.forEach(d=>{d.parentNode.append(d.cloneNode(!0))}),y4(e,(d,v,g)=>{var m;const y=d.state.el.getBoundingClientRect();d.content=d.state.el.innerHTML,d.state.size=[Math.ceil(y.width)+1,Math.max(Math.ceil(y.height),i)],d.state.key=[g==null||(m=g.state)==null?void 0:m.id,d.state.id].filter(Boolean).join(".")+d.content,v()}),l.remove(),u.remove()}setOptions(e){this.options=Rs({},wd.defaultOptions,e),this.options.zoom?this.svg.call(this.zoom):this.svg.on(".zoom",null),this.svg.on("wheel",this.options.pan?this.handlePan:null)}setData(e,r){e&&(this.state.data=e),r&&this.setOptions(r),this.initializeData(this.state.data),this.updateStyle(),this.renderData()}renderData(e){var r,n;if(!this.state.data)return;const{spacingHorizontal:i,paddingX:a,spacingVertical:o,autoFit:s,color:l}=this.options,u=ZM().children(q=>{var G;return!((G=q.payload)!=null&&G.fold)&&q.children}).nodeSize(q=>{const[G,J]=q.data.state.size;return[J,G+(G?a*2:0)+i]}).spacing((q,G)=>q.parent===G.parent?o:o*2),h=u.hierarchy(this.state.data);u(h),iU(h,i);const c=h.descendants().reverse(),f=h.links(),d=Zq(),v=X6(c,q=>q.x-q.xSize/2),g=Y6(c,q=>q.x+q.xSize/2),m=X6(c,q=>q.y),y=Y6(c,q=>q.y+q.ySizeInner);Object.assign(this.state,{minX:v,maxX:g,minY:m,maxY:y}),s&&this.fit();const b=e&&c.find(q=>q.data===e)||h,w=(r=b.data.state.x0)!=null?r:b.x,T=(n=b.data.state.y0)!=null?n:b.y,M=this.g.selectAll(Uh("g")).data(c,q=>q.data.state.key),D=M.enter().append("g").attr("data-depth",q=>q.data.depth).attr("data-path",q=>q.data.state.path).attr("transform",q=>`translate(${T+b.ySizeInner-q.ySizeInner},${w+b.xSize/2-q.xSize})`),P=this.transition(M.exit());P.select("line").attr("x1",q=>q.ySizeInner).attr("x2",q=>q.ySizeInner),P.select("foreignObject").style("opacity",0),P.attr("transform",q=>`translate(${b.y+b.ySizeInner-q.ySizeInner},${b.x+b.xSize/2-q.xSize})`).remove();const O=M.merge(D).attr("class",q=>{var G;return["markmap-node",((G=q.data.payload)==null?void 0:G.fold)&&"markmap-fold"].filter(Boolean).join(" ")});this.transition(O).attr("transform",q=>`translate(${q.y},${q.x-q.xSize/2})`);const V=O.selectAll(Uh("line")).data(q=>[q],q=>q.data.state.key).join(q=>q.append("line").attr("x1",G=>G.ySizeInner).attr("x2",G=>G.ySizeInner),q=>q,q=>q.remove());this.transition(V).attr("x1",-1).attr("x2",q=>q.ySizeInner+2).attr("y1",q=>q.xSize).attr("y2",q=>q.xSize).attr("stroke",q=>l(q.data)).attr("stroke-width",pC);const $=O.selectAll(Uh("circle")).data(q=>q.data.children?[q]:[],q=>q.data.state.key).join(q=>q.append("circle").attr("stroke-width","1.5").attr("cx",G=>G.ySizeInner).attr("cy",G=>G.xSize).attr("r",0).on("click",(G,J)=>this.handleClick(G,J)),q=>q,q=>q.remove());this.transition($).attr("r",6).attr("cx",q=>q.ySizeInner).attr("cy",q=>q.xSize).attr("stroke",q=>l(q.data)).attr("fill",q=>{var G;return(G=q.data.payload)!=null&&G.fold&&q.data.children?l(q.data):"#fff"});const H=O.selectAll(Uh("foreignObject")).data(q=>[q],q=>q.data.state.key).join(q=>{const G=q.append("foreignObject").attr("class","markmap-foreign").attr("x",a).attr("y",0).style("opacity",0).on("mousedown",gC).on("dblclick",gC);return G.append("xhtml:div").select(function(K){const se=K.data.state.el.cloneNode(!0);return this.replaceWith(se),se}).attr("xmlns","http://www.w3.org/1999/xhtml"),G},q=>q,q=>q.remove()).attr("width",q=>Math.max(0,q.ySizeInner-a*2)).attr("height",q=>q.xSize);this.transition(H).style("opacity",1);const j=this.g.selectAll(Uh("path")).data(f,q=>q.target.data.state.key).join(q=>{const G=[T+b.ySizeInner,w+b.xSize/2];return q.insert("path","g").attr("class","markmap-link").attr("data-depth",J=>J.target.data.depth).attr("data-path",J=>J.target.data.state.path).attr("d",d({source:G,target:G}))},q=>q,q=>{const G=[b.y+b.ySizeInner,b.x+b.xSize/2];return this.transition(q).attr("d",d({source:G,target:G})).remove()});this.transition(j).attr("stroke",q=>l(q.target.data)).attr("stroke-width",q=>pC(q.target)).attr("d",q=>{const G=[q.source.y+q.source.ySizeInner,q.source.x+q.source.xSize/2],J=[q.target.y,q.target.x+q.target.xSize/2];return d({source:G,target:J})}),c.forEach(q=>{q.data.state.x0=q.x,q.data.state.y0=q.y})}transition(e){const{duration:r}=this.options;return e.transition().duration(r)}async fit(){const e=this.svg.node(),{width:r,height:n}=e.getBoundingClientRect(),{fitRatio:i}=this.options,{minX:a,maxX:o,minY:s,maxY:l}=this.state,u=l-s,h=o-a,c=Math.min(r/u*i,n/h*i,2),f=wy.translate((r-u*c)/2-s*c,(n-h*c)/2-a*c).scale(c);return this.transition(this.svg).call(this.zoom.transform,f).end().catch(S_)}async ensureView(e,r){let n,i;if(this.g.selectAll(Uh("g")).each(function(b){b.data===e&&(n=this,i=b)}),!n||!i)return;const a=this.svg.node(),o=a.getBoundingClientRect(),s=gm(a),[l,u]=[i.y,i.y+i.ySizeInner+2].map(y=>y*s.k+s.x),[h,c]=[i.x-i.xSize/2,i.x+i.xSize/2].map(y=>y*s.k+s.y),f=Rs({left:0,right:0,top:0,bottom:0},r),d=[f.left-l,o.width-f.right-u],v=[f.top-h,o.height-f.bottom-c],g=d[0]*d[1]>0?vC(d,Math.abs)/s.k:0,m=v[0]*v[1]>0?vC(v,Math.abs)/s.k:0;if(g||m){const y=s.translate(g,m);return this.transition(this.svg).call(this.zoom.transform,y).end().catch(S_)}}async rescale(e){const r=this.svg.node(),{width:n,height:i}=r.getBoundingClientRect(),a=n/2,o=i/2,s=gm(r),l=s.translate((a-s.x)*(1-e)/s.k,(o-s.y)*(1-e)/s.k).scale(e);return this.transition(this.svg).call(this.zoom.transform,l).end().catch(S_)}destroy(){this.svg.on(".zoom",null),this.svg.html(null),this.revokers.forEach(e=>{e()})}static create(e,r,n){const i=new wd(e,r);return n&&(i.setData(n),i.fit()),i}}wd.defaultOptions={autoFit:!1,color:t=>sU(`${t.state.path}`),duration:500,embedGlobalCSS:!0,fitRatio:.95,maxWidth:0,nodeMinHeight:16,paddingX:8,scrollForPan:lU,spacingHorizontal:80,spacingVertical:5,initialExpandLevel:-1,zoom:!0,pan:!0};var nL={exports:{}};(function(t,e){(function(r,n){n()})(gu,function(){function r(u,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function n(u,h,c){var f=new XMLHttpRequest;f.open("GET",u),f.responseType="blob",f.onload=function(){l(f.response,h,c)},f.onerror=function(){console.error("could not download file")},f.send()}function i(u){var h=new XMLHttpRequest;h.open("HEAD",u,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function a(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(h)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof gu=="object"&&gu.global===gu?gu:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,h,c){var f=o.URL||o.webkitURL,d=document.createElement("a");h=h||u.name||"download",d.download=h,d.rel="noopener",typeof u=="string"?(d.href=u,d.origin===location.origin?a(d):i(d.href)?n(u,h,c):a(d,d.target="_blank")):(d.href=f.createObjectURL(u),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){a(d)},0))}:"msSaveOrOpenBlob"in navigator?function(u,h,c){if(h=h||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(r(u,c),h);else if(i(u))n(u,h,c);else{var f=document.createElement("a");f.href=u,f.target="_blank",setTimeout(function(){a(f)})}}:function(u,h,c,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof u=="string")return n(u,h,c);var d=u.type==="application/octet-stream",v=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||d&&v||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var w=m.result;w=g?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},m.readAsDataURL(u)}else{var y=o.URL||o.webkitURL,b=y.createObjectURL(u);f?f.location=b:location.href=b,f=null,setTimeout(function(){y.revokeObjectURL(b)},4e4)}});o.saveAs=l.saveAs=l,t.exports=l})})(nL);var iL=nL.exports;const Y3e={__name:"MindmapRenderer",props:{content:{type:String,required:!0,default:""}},setup(t){const e=t,{t:r}=sp(),n=js(),i=js(e.content),a=js();let o;const s=new h$.Transformer,l=()=>{const{root:h,features:c}=s.transform(i.value),{styles:f,scripts:d}=s.getUsedAssets(c);f&&_$(f),d&&y$(d,{getMarkmap:()=>window.markmap}),a.value=h,o.setData(h),o.fit()};B3(()=>{o=wd.create(n.value),l()}),eV(l),Su(()=>e.content,()=>{i.value=e.content});const u=()=>{const h=document.querySelector("#markmap"),c=new XMLSerializer().serializeToString(h),f=new Blob([c],{type:"image/svg+xml"});iL.saveAs(f,"mindmap.svg")};return(h,c)=>{const f=ii("a-col"),d=ii("a-button"),v=ii("a-row");return Lr(),Pc(v,null,{default:An(()=>[Jr(f,{span:24},{default:An(()=>[(Lr(),bn("svg",{id:"markmap",ref_key:"svgRef",ref:n,style:{width:"100%","min-height":"50vh"}},null,512))]),_:1}),Jr(f,{span:24},{default:An(()=>[Jr(d,{onClick:u,type:"primary"},{default:An(()=>[I3(zs(Ks(r)("components.workspace.mindmapRenderer.download_svg")),1)]),_:1})]),_:1})]),_:1})}}};function uU(t){for(var e=[],r=1;r{p[C]!=null&&(p[C]=Lz(p[C]))}),["duration","maxWidth","initialExpandLevel"].forEach(C=>{p[C]!=null&&(p[C]=Ez(p[C]))}),p}function Lz(p){var C;let k;return typeof p=="string"?k=[p]:Array.isArray(p)&&(k=p.filter(I=>I&&typeof I=="string")),(C=k)!=null&&C.length?k:void 0}function Ez(p){if(!isNaN(+p))return+p}const k6=[Dz,wh,Fe];function D6(p){if(p.type==="heading")p.children=p.children.filter(E=>E.type!=="paragraph");else if(p.type==="list_item"){var C;p.children=p.children.filter(E=>["paragraph","fence"].includes(E.type)?(p.content||(p.content=E.content,p.payload=o({},p.payload,E.payload)),!1):!0),((C=p.payload)==null?void 0:C.index)!=null&&(p.content=`${p.payload.index}. ${p.content}`)}else if(p.type==="ordered_list"){var k,I;let E=(k=(I=p.payload)==null?void 0:I.startIndex)!=null?k:1;p.children.forEach(z=>{z.type==="list_item"&&(z.payload=o({},z.payload,{index:E}),E+=1)})}p.children.length===0?delete p.children:(p.children.forEach(E=>D6(E)),p.children.length===1&&!p.children[0].content&&(p.children=p.children[0].children))}function M6(p,C=0){var k;p.depth=C,(k=p.children)==null||k.forEach(I=>{M6(I,C+1)})}class Iz{constructor(C=k6){this.assetsMap={},this.plugins=C,this.hooks=Hp();const k={};for(const{name:E,transform:z}of C)k[E]=z(this.hooks);this.assetsMap=k;const I=new La("full",{html:!0,breaks:!0,maxNesting:1/0});I.renderer.rules.htmltag=w(I.renderer.rules.htmltag,{after:E=>{this.hooks.htmltag.call(E)}}),this.md=I,this.hooks.parser.call(I)}buildTree(C){const{md:k}=this,I={type:"root",depth:0,content:"",children:[],payload:{}},E=[I];let z=0;for(const re of C){let fe=E[E.length-1];if(re.type.endsWith("_open")){const ue=re.type.slice(0,-5),ve={};if(re.lines&&(ve.lines=re.lines),ue==="heading")for(z=re.hLevel;((U=fe)==null?void 0:U.depth)>=z;){var U;E.pop(),fe=E[E.length-1]}else{var X;z=Math.max(z,((X=fe)==null?void 0:X.depth)||0)+1,ue==="ordered_list"&&(ve.startIndex=re.order)}const Le={type:ue,depth:z,payload:ve,content:"",children:[]};fe.children.push(Le),E.push(Le)}else if(fe){if(re.type===`${fe.type}_close`)fe.type==="heading"?z=fe.depth:(E.pop(),z=0);else if(re.type==="inline"){const ue=this.hooks.htmltag.tap(Le=>{const Ee=Le.result.match(/^$/),Oe=Ee==null?void 0:Ee[1].trim().split(" ");Oe[0]==="fold"&&(fe.payload.fold=["all","recursively"].includes(Oe[1])?2:1,Le.result="")}),ve=k.renderer.render([re],k.options,{});ue(),fe.content=`${fe.content||""}${ve}`}else if(re.type==="fence"){let ue=k.renderer.render([re],k.options,{});const ve=ue.match(//);ve&&(ue=ue.replace("
",``)),fe.children.push({type:re.type,depth:z+1,content:ue,children:[]})}}else continue}return I}transform(C){var k;const I={features:{}};this.hooks.beforeParse.call(this.md,I);const E=this.md.parse(C,{});this.hooks.afterParse.call(this.md,I);let z=this.buildTree(E);return D6(z),((k=z.children)==null?void 0:k.length)===1&&(z=z.children[0]),M6(z),o({},I,{root:z})}getAssets(C){var k;const I=[],E=[];(k=C)!=null||(C=this.plugins.map(z=>z.name));for(const z of C.map(U=>this.assetsMap[U]))z&&(z.styles&&I.push(...z.styles),z.scripts&&E.push(...z.scripts));return{styles:I,scripts:E}}getUsedAssets(C){const k=this.plugins.map(I=>I.name).filter(I=>C[I]);return this.getAssets(k)}}const Bz={"markmap-lib":"0.14.4",d3:"6.7.0"};r.Transformer=Iz,r.builtInPlugins=k6,r.fillTemplate=H,r.transformerVersions=Bz})})(y4,y4.exports);var f$=y4.exports;/*! markmap-common v0.14.2 | MIT License */class yM{constructor(){this.listeners=[]}tap(e){return this.listeners.push(e),()=>this.revoke(e)}revoke(e){const r=this.listeners.indexOf(e);r>=0&&this.listeners.splice(r,1)}revokeAll(){this.listeners.splice(0)}call(...e){for(const r of this.listeners)r(...e)}}function _d(){return _d=Object.assign||function(t){for(var e=1;ee(i,()=>{var o;(o=i[r])==null||o.forEach(s=>{n(s,i)})},a);n(t)}function _M(t){if(Array.from)return Array.from(t);const e=[];for(let r=0;r{n&&r.indexOf(n)<0&&r.push(n)}),r.join(" ")}function Yh(t){if(typeof t=="string"){const r=t;t=n=>n.tagName===r}const e=t;return function(){let n=_M(this.childNodes);return e&&(n=n.filter(i=>e(i))),n}}function g$(t){const e={};return function(...n){const i=`${n[0]}`;let a=e[i];return a||(a={value:t(...n)},e[i]=a),a.value}}function jm(t,e,r){const n=document.createElement(t);return e&&Object.entries(e).forEach(([i,a])=>{n[i]=a}),r&&Object.entries(r).forEach(([i,a])=>{n.setAttribute(i,a)}),n}const m$=g$(t=>{document.head.append(jm("link",{rel:"preload",as:"script",href:t}))});async function y$(t,e){if(!t.loaded&&(t.type==="script"&&(t.loaded=new Promise((r,n)=>{var i;document.head.append(jm("script",_d({},t.data,{onload:r,onerror:n}))),(i=t.data)!=null&&i.src||r(void 0)}).then(()=>{t.loaded=!0})),t.type==="iife")){const{fn:r,getParams:n}=t.data;r(...(n==null?void 0:n(e))||[]),t.loaded=!0}await t.loaded}function _$(t){t.loaded||(t.loaded=!0,t.type==="style"?document.head.append(jm("style",{textContent:t.data})):t.type==="stylesheet"&&document.head.append(jm("link",_d({rel:"stylesheet"},t.data))))}async function x$(t,e){const r=t.filter(n=>{var i;return n.type==="script"&&((i=n.data)==null?void 0:i.src)});r.length>1&&r.forEach(n=>m$(n.data.src)),e=_d({getMarkmap:()=>window.markmap},e);for(const n of t)await y$(n,e)}function b$(t){for(const e of t)_$(e)}function Y6(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}function X6(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function S$(t,e){let r,n=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);return n}var w$={value:()=>{}};function F3(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}fm.prototype=F3.prototype={constructor:fm,on:function(t,e){var r=this._,n=C$(t+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),j6.hasOwnProperty(e)?{space:j6[e],local:t}:t}function T$(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===x4&&e.documentElement.namespaceURI===x4?e.createElement(t):e.createElementNS(r,t)}}function k$(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xM(t){var e=by(t);return(e.local?k$:T$)(e)}function D$(){}function O3(t){return t==null?D$:function(){return this.querySelector(t)}}function M$(t){typeof t!="function"&&(t=O3(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=w&&(w=b+1);!(M=m[w])&&++w=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function J$(t){t||(t=Q$);function e(c,f){return c&&f?t(c.__data__,f.__data__):!c-!f}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}function eG(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function tG(){return Array.from(this)}function rG(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?dG:typeof e=="function"?vG:pG)(t,e,r??"")):Fc(this.node(),t)}function Fc(t,e){return t.style.getPropertyValue(e)||TM(t).getComputedStyle(t,null).getPropertyValue(e)}function mG(t){return function(){delete this[t]}}function yG(t,e){return function(){this[t]=e}}function _G(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function xG(t,e){return arguments.length>1?this.each((e==null?mG:typeof e=="function"?_G:yG)(t,e)):this.node()[t]}function kM(t){return t.trim().split(/^|\s+/)}function N3(t){return t.classList||new DM(t)}function DM(t){this._node=t,this._names=kM(t.getAttribute("class")||"")}DM.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function MM(t,e){for(var r=N3(t),n=-1,i=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function XG(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Xv(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Xv(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=oH.exec(t))?new xi(e[1],e[2],e[3],1):(e=sH.exec(t))?new xi(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=lH.exec(t))?Xv(e[1],e[2],e[3],e[4]):(e=uH.exec(t))?Xv(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hH.exec(t))?nC(e[1],e[2]/100,e[3]/100,1):(e=cH.exec(t))?nC(e[1],e[2]/100,e[3]/100,e[4]):K6.hasOwnProperty(t)?eC(K6[t]):t==="transparent"?new xi(NaN,NaN,NaN,0):null}function eC(t){return new xi(t>>16&255,t>>8&255,t&255,1)}function Xv(t,e,r,n){return n<=0&&(t=e=r=NaN),new xi(t,e,r,n)}function dH(t){return t instanceof hp||(t=Sd(t)),t?(t=t.rgb(),new xi(t.r,t.g,t.b,t.opacity)):new xi}function S4(t,e,r,n){return arguments.length===1?dH(t):new xi(t,e,r,n??1)}function xi(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}z3(xi,S4,BM(hp,{brighter:function(t){return t=t==null?Jm:Math.pow(Jm,t),new xi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?xd:Math.pow(xd,t),new xi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:tC,formatHex:tC,formatRgb:rC,toString:rC}));function tC(){return"#"+C_(this.r)+C_(this.g)+C_(this.b)}function rC(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function C_(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function nC(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Xa(t,e,r,n)}function PM(t){if(t instanceof Xa)return new Xa(t.h,t.s,t.l,t.opacity);if(t instanceof hp||(t=Sd(t)),!t)return new Xa;if(t instanceof Xa)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(e===a?o=(r-n)/s+(r0&&l<1?0:o,new Xa(o,s,l,t.opacity)}function pH(t,e,r,n){return arguments.length===1?PM(t):new Xa(t,e,r,n??1)}function Xa(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}z3(Xa,pH,BM(hp,{brighter:function(t){return t=t==null?Jm:Math.pow(Jm,t),new Xa(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?xd:Math.pow(xd,t),new Xa(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new xi(A_(t>=240?t-240:t+120,i,n),A_(t,i,n),A_(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function A_(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const RM=t=>()=>t;function vH(t,e){return function(r){return t+r*e}}function gH(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function mH(t){return(t=+t)==1?FM:function(e,r){return r-e?gH(e,r,t):RM(isNaN(e)?r:e)}}function FM(t,e){var r=e-t;return r?vH(t,r):RM(isNaN(t)?e:t)}const iC=function t(e){var r=mH(e);function n(i,a){var o=r((i=S4(i)).r,(a=S4(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=FM(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=s(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);function Fs(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var w4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,T_=new RegExp(w4.source,"g");function yH(t){return function(){return t}}function _H(t){return function(e){return t(e)+""}}function xH(t,e){var r=w4.lastIndex=T_.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(t=t+"",e=e+"";(n=w4.exec(t))&&(i=T_.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Fs(n,i)})),r=T_.lastIndex;return r180?h+=360:h-u>180&&(u+=360),f.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Fs(u,h)})):h&&c.push(i(c)+"rotate("+h+n)}function s(u,h,c,f){u!==h?f.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Fs(u,h)}):h&&c.push(i(c)+"skewX("+h+n)}function l(u,h,c,f,d,v){if(u!==c||h!==f){var g=d.push(i(d)+"scale(",null,",",null,")");v.push({i:g-4,x:Fs(u,c)},{i:g-2,x:Fs(h,f)})}else(c!==1||f!==1)&&d.push(i(d)+"scale("+c+","+f+")")}return function(u,h){var c=[],f=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,c,f),o(u.rotate,h.rotate,c,f),s(u.skewX,h.skewX,c,f),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,c,f),u=h=null,function(d){for(var v=-1,g=f.length,m;++v=0&&t._call.call(null,e),t=t._next;--Oc}function sC(){Uu=(e1=wd.now())+Sy,Oc=R0=0;try{LH()}finally{Oc=0,IH(),Uu=0}}function EH(){var t=wd.now(),e=t-e1;e>zM&&(Sy-=e,e1=t)}function IH(){for(var t,e=Qm,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Qm=r);F0=t,A4(n)}function A4(t){if(!Oc){R0&&(R0=clearTimeout(R0));var e=t-Uu;e>24?(t<1/0&&(R0=setTimeout(sC,t-wd.now()-Sy)),Qf&&(Qf=clearInterval(Qf))):(Qf||(e1=wd.now(),Qf=setInterval(EH,zM)),Oc=1,VM(sC))}}function lC(t,e,r){var n=new t1;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var BH=F3("start","end","cancel","interrupt"),PH=[],GM=0,uC=1,T4=2,dm=3,hC=4,k4=5,pm=6;function wy(t,e,r,n,i,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;RH(t,r,{name:e,index:n,group:i,on:BH,tween:PH,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:GM})}function $3(t,e){var r=Sa(t,e);if(r.state>GM)throw new Error("too late; already scheduled");return r}function po(t,e){var r=Sa(t,e);if(r.state>dm)throw new Error("too late; already running");return r}function Sa(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function RH(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=$M(a,0,r.time);function a(u){r.state=uC,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var h,c,f,d;if(r.state!==uC)return l();for(h in n)if(d=n[h],d.name===r.name){if(d.state===dm)return lC(o);d.state===hC?(d.state=pm,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+hT4&&n.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function cq(t,e,r){var n,i,a=hq(e)?$3:po;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}function fq(t,e){var r=this._id;return arguments.length<2?Sa(this.node(),r).on.on(t):this.each(cq(r,t,e))}function dq(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function pq(){return this.on("end.remove",dq(this._id))}function vq(t){var e=this._name,r=this._id;typeof t!="function"&&(t=O3(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;ouu)if(!(Math.abs(h*s-l*u)>uu)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var f=r-a,d=n-o,v=s*s+l*l,g=f*f+d*d,m=Math.sqrt(v),y=Math.sqrt(c),b=i*Math.tan((D4-Math.acos((v+c-g)/(2*m*y)))/2),w=b/y,T=b/m;Math.abs(w-1)>uu&&(this._+="L"+(t+w*u)+","+(e+w*h)),this._+="A"+i+","+i+",0,0,"+ +(h*f>u*d)+","+(this._x1=t+T*s)+","+(this._y1=e+T*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var o=r*Math.cos(n),s=r*Math.sin(n),l=t+o,u=e+s,h=1^a,c=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>uu||Math.abs(this._y1-u)>uu)&&(this._+="L"+l+","+u),r&&(c<0&&(c=c%M4+M4),c>Vq?this._+="A"+r+","+r+",0,1,"+h+","+(t-o)+","+(e-s)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):c>uu&&(this._+="A"+r+","+r+",0,"+ +(c>=D4)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};function $q(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const cC=Symbol("implicit");function YM(){var t=new Map,e=[],r=[],n=cC;function i(a){var o=a+"",s=t.get(o);if(!s){if(n!==cC)return n;t.set(o,s=e.push(a))}return r[(s-1)%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new Map;for(const o of a){const s=o+"";t.has(s)||t.set(s,e.push(o))}return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return YM(e,r).unknown(n)},$q.apply(i,arguments),i}function Gq(t){for(var e=t.length/6|0,r=new Array(e),n=0;n()=>t;function Jq(t,{sourceEvent:e,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function zo(t,e,r){this.k=t,this.x=e,this.y=r}zo.prototype={constructor:zo,scale:function(t){return t===1?this:new zo(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new zo(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+")"}};var Cy=new zo(1,0,0);gm.prototype=zo.prototype;function gm(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Cy;return t.__zoom}function k_(t){t.stopImmediatePropagation()}function e0(t){t.preventDefault(),t.stopImmediatePropagation()}function Qq(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function eW(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function dC(){return this.__zoom||Cy}function tW(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function rW(){return navigator.maxTouchPoints||"ontouchstart"in this}function nW(t,e,r){var n=t.invertX(e[0][0])-r[0][0],i=t.invertX(e[1][0])-r[1][0],a=t.invertY(e[0][1])-r[0][1],o=t.invertY(e[1][1])-r[1][1];return t.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function iW(){var t=Qq,e=eW,r=nW,n=tW,i=rW,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,l=DH,u=F3("start","zoom","end"),h,c,f,d=500,v=150,g=0,m=10;function y(G){G.property("__zoom",dC).on("wheel.zoom",O).on("mousedown.zoom",V).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(G,J,K,se){var ae=G.selection?G.selection():G;ae.property("__zoom",dC),G!==ae?M(G,J,K,se):ae.interrupt().each(function(){D(this,arguments).event(se).start().zoom(null,typeof J=="function"?J.apply(this,arguments):J).end()})},y.scaleBy=function(G,J,K,se){y.scaleTo(G,function(){var ae=this.__zoom.k,ce=typeof J=="function"?J.apply(this,arguments):J;return ae*ce},K,se)},y.scaleTo=function(G,J,K,se){y.transform(G,function(){var ae=e.apply(this,arguments),ce=this.__zoom,ye=K==null?T(ae):typeof K=="function"?K.apply(this,arguments):K,de=ce.invert(ye),De=typeof J=="function"?J.apply(this,arguments):J;return r(w(b(ce,De),ye,de),ae,o)},K,se)},y.translateBy=function(G,J,K,se){y.transform(G,function(){return r(this.__zoom.translate(typeof J=="function"?J.apply(this,arguments):J,typeof K=="function"?K.apply(this,arguments):K),e.apply(this,arguments),o)},null,se)},y.translateTo=function(G,J,K,se,ae){y.transform(G,function(){var ce=e.apply(this,arguments),ye=this.__zoom,de=se==null?T(ce):typeof se=="function"?se.apply(this,arguments):se;return r(Cy.translate(de[0],de[1]).scale(ye.k).translate(typeof J=="function"?-J.apply(this,arguments):-J,typeof K=="function"?-K.apply(this,arguments):-K),ce,o)},se,ae)};function b(G,J){return J=Math.max(a[0],Math.min(a[1],J)),J===G.k?G:new zo(J,G.x,G.y)}function w(G,J,K){var se=J[0]-K[0]*G.k,ae=J[1]-K[1]*G.k;return se===G.x&&ae===G.y?G:new zo(G.k,se,ae)}function T(G){return[(+G[0][0]+ +G[1][0])/2,(+G[0][1]+ +G[1][1])/2]}function M(G,J,K,se){G.on("start.zoom",function(){D(this,arguments).event(se).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(se).end()}).tween("zoom",function(){var ae=this,ce=arguments,ye=D(ae,ce).event(se),de=e.apply(ae,ce),De=K==null?T(de):typeof K=="function"?K.apply(ae,ce):K,Ie=Math.max(de[1][0]-de[0][0],de[1][1]-de[0][1]),Pe=ae.__zoom,Qe=typeof J=="function"?J.apply(ae,ce):J,Ke=l(Pe.invert(De).concat(Ie/Pe.k),Qe.invert(De).concat(Ie/Qe.k));return function(et){if(et===1)et=Qe;else{var qe=Ke(et),lt=Ie/qe[2];et=new zo(lt,De[0]-qe[0]*lt,De[1]-qe[1]*lt)}ye.zoom(null,et)}})}function D(G,J,K){return!K&&G.__zooming||new P(G,J)}function P(G,J){this.that=G,this.args=J,this.active=0,this.sourceEvent=null,this.extent=e.apply(G,J),this.taps=0}P.prototype={event:function(G){return G&&(this.sourceEvent=G),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(G,J){return this.mouse&&G!=="mouse"&&(this.mouse[1]=J.invert(this.mouse[0])),this.touch0&&G!=="touch"&&(this.touch0[1]=J.invert(this.touch0[0])),this.touch1&&G!=="touch"&&(this.touch1[1]=J.invert(this.touch1[0])),this.that.__zoom=J,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(G){var J=$s(this.that).datum();u.call(G,this.that,new Jq(G,{sourceEvent:this.sourceEvent,target:y,type:G,transform:this.that.__zoom,dispatch:u}),J)}};function O(G,...J){if(!t.apply(this,arguments))return;var K=D(this,J).event(G),se=this.__zoom,ae=Math.max(a[0],Math.min(a[1],se.k*Math.pow(2,n.apply(this,arguments)))),ce=Rl(G);if(K.wheel)(K.mouse[0][0]!==ce[0]||K.mouse[0][1]!==ce[1])&&(K.mouse[1]=se.invert(K.mouse[0]=ce)),clearTimeout(K.wheel);else{if(se.k===ae)return;K.mouse=[ce,se.invert(ce)],vm(this),K.start()}e0(G),K.wheel=setTimeout(ye,v),K.zoom("mouse",r(w(b(se,ae),K.mouse[0],K.mouse[1]),K.extent,o));function ye(){K.wheel=null,K.end()}}function V(G,...J){if(f||!t.apply(this,arguments))return;var K=D(this,J,!0).event(G),se=$s(G.view).on("mousemove.zoom",De,!0).on("mouseup.zoom",Ie,!0),ae=Rl(G,ce),ce=G.currentTarget,ye=G.clientX,de=G.clientY;nH(G.view),k_(G),K.mouse=[ae,this.__zoom.invert(ae)],vm(this),K.start();function De(Pe){if(e0(Pe),!K.moved){var Qe=Pe.clientX-ye,Ke=Pe.clientY-de;K.moved=Qe*Qe+Ke*Ke>g}K.event(Pe).zoom("mouse",r(w(K.that.__zoom,K.mouse[0]=Rl(Pe,ce),K.mouse[1]),K.extent,o))}function Ie(Pe){se.on("mousemove.zoom mouseup.zoom",null),iH(Pe.view,K.moved),e0(Pe),K.event(Pe).end()}}function $(G,...J){if(t.apply(this,arguments)){var K=this.__zoom,se=Rl(G.changedTouches?G.changedTouches[0]:G,this),ae=K.invert(se),ce=K.k*(G.shiftKey?.5:2),ye=r(w(b(K,ce),se,ae),e.apply(this,J),o);e0(G),s>0?$s(this).transition().duration(s).call(M,ye,se,G):$s(this).call(y.transform,ye,se,G)}}function H(G,...J){if(t.apply(this,arguments)){var K=G.touches,se=K.length,ae=D(this,J,G.changedTouches.length===se).event(G),ce,ye,de,De;for(k_(G),ye=0;ye=0;)e+=r[n].value;t.value=e}function oW(){return this.eachAfter(aW)}function sW(t){var e=this,r,n=[e],i,a,o;do for(r=n.reverse(),n=[];e=r.pop();)if(t(e),i=e.children,i)for(a=0,o=i.length;a=0;--i)r.push(n[i]);return this}function uW(t){for(var e=this,r=[e],n=[],i,a,o;e=r.pop();)if(n.push(e),i=e.children,i)for(a=0,o=i.length;a=0;)r+=n[i].value;e.value=r})}function cW(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fW(t){for(var e=this,r=dW(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n}function dW(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}function pW(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function vW(){var t=[];return this.each(function(e){t.push(e)}),t}function gW(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function mW(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function H3(t,e){var r=new r1(t),n=+t.value&&(r.value=t.value),i,a=[r],o,s,l,u;for(e==null&&(e=_W);i=a.pop();)if(n&&(i.value=+i.data.value),(s=e(i.data))&&(u=s.length))for(i.children=new Array(u),l=u-1;l>=0;--l)a.push(o=i.children[l]=new r1(s[l])),o.parent=i,o.depth=i.depth+1;return r.eachBefore(bW)}function yW(){return H3(this).eachBefore(xW)}function _W(t){return t.children}function xW(t){t.data=t.data.data}function bW(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function r1(t){this.data=t,this.depth=this.height=0,this.parent=null}r1.prototype=H3.prototype={constructor:r1,count:oW,each:sW,eachAfter:uW,eachBefore:lW,sum:hW,sort:cW,path:fW,ancestors:pW,descendants:vW,leaves:gW,links:mW,copy:yW};var SW="d3-flextree",wW="2.1.2",CW="build/d3-flextree.js",AW="index",TW={name:"Chris Maloney",url:"http://chrismaloney.org"},kW="Flexible tree layout algorithm that allows for variable node sizes.",DW=["d3","d3-module","layout","tree","hierarchy","d3-hierarchy","plugin","d3-plugin","infovis","visualization","2d"],MW="https://github.com/klortho/d3-flextree",LW="WTFPL",EW={type:"git",url:"https://github.com/klortho/d3-flextree.git"},IW={clean:"rm -rf build demo test","build:demo":"rollup -c --environment BUILD:demo","build:dev":"rollup -c --environment BUILD:dev","build:prod":"rollup -c --environment BUILD:prod","build:test":"rollup -c --environment BUILD:test",build:"rollup -c",lint:"eslint index.js src","test:main":"node test/bundle.js","test:browser":"node test/browser-tests.js",test:"npm-run-all test:*",prepare:"npm-run-all clean build lint test"},BW={"d3-hierarchy":"^1.1.5"},PW={"babel-plugin-external-helpers":"^6.22.0","babel-preset-es2015-rollup":"^3.0.0",d3:"^4.13.0","d3-selection-multi":"^1.0.1",eslint:"^4.19.1",jsdom:"^11.6.2","npm-run-all":"^4.1.2",rollup:"^0.55.3","rollup-plugin-babel":"^2.7.1","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-copy":"^0.2.3","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.2","rollup-plugin-uglify":"^3.0.0","uglify-es":"^3.3.9"},RW={name:SW,version:wW,main:CW,module:AW,"jsnext:main":"index",author:TW,description:kW,keywords:DW,homepage:MW,license:LW,repository:EW,scripts:IW,dependencies:BW,devDependencies:PW};const{version:FW}=RW,OW=Object.freeze({children:t=>t.children,nodeSize:t=>t.data.size,spacing:0});function ZM(t){const e=Object.assign({},OW,t);function r(s){const l=e[s];return typeof l=="function"?l:()=>l}function n(s){const l=o(a(),s,u=>u.children);return l.update(),l.data}function i(){const s=r("nodeSize"),l=r("spacing");return class XM extends H3.prototype.constructor{constructor(h){super(h)}copy(){const h=o(this.constructor,this,c=>c.children);return h.each(c=>c.data=c.data.data),h}get size(){return s(this)}spacing(h){return l(this,h)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const h=this.ancestors();return h[h.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return this.children===null}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce((h,c)=>XM.maxExtents(h,c.extents),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(h,c){return{top:Math.min(h.top,c.top),bottom:Math.max(h.bottom,c.bottom),left:Math.min(h.left,c.left),right:Math.max(h.right,c.right)}}}}function a(){const s=i(),l=r("nodeSize"),u=r("spacing");return class extends s{constructor(h){super(h),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return l(this.data)}spacing(h){return u(this.data,h.data)}get x(){return this.data.x}set x(h){this.data.x=h}get y(){return this.data.y}set y(h){this.data.y=h}update(){return jM(this),KM(this),this}}}function o(s,l,u){const h=(c,f)=>{const d=new s(c);Object.assign(d,{parent:f,depth:f===null?0:f.depth+1,height:0,length:1});const v=u(c)||[];return d.children=v.length===0?null:v.map(g=>h(g,d)),d.children&&Object.assign(d,d.children.reduce((g,m)=>({height:Math.max(g.height,m.height+1),length:g.length+m.length}),d)),d};return h(l,null)}return Object.assign(n,{nodeSize(s){return arguments.length?(e.nodeSize=s,n):e.nodeSize},spacing(s){return arguments.length?(e.spacing=s,n):e.spacing},children(s){return arguments.length?(e.children=s,n):e.children},hierarchy(s,l){const u=typeof l>"u"?e.children:l;return o(i(),s,u)},dump(s){const l=r("nodeSize"),u=h=>c=>{const f=h+"  ",d=h+"    ",{x:v,y:g}=c,m=l(c),y=c.children||[],b=y.length===0?" ":`,${f}children: [${d}${y.map(u(d)).join(d)}${f}],${h}`;return`{ size: [${m.join(", ")}],${f}x: ${v}, y: ${g}${b}},`};return u(`
+`)(s)}}),n}ZM.version=FW;const jM=(t,e=0)=>(t.y=e,(t.children||[]).reduce((r,n)=>{const[i,a]=r;jM(n,t.y+t.ySize);const o=(i===0?n.lExt:n.rExt).bottom;i!==0&&zW(t,i,a);const s=YW(o,i,a);return[i+1,s]},[0,null]),NW(t),UW(t),t),KM=(t,e,r)=>{typeof e>"u"&&(e=-t.relX-t.prelim,r=0);const n=e+t.relX;return t.relX=n+t.prelim-r,t.prelim=0,t.x=r+t.relX,(t.children||[]).forEach(i=>KM(i,n,t.x)),t},NW=t=>{(t.children||[]).reduce((e,r)=>{const[n,i]=e,a=n+r.shift,o=i+a+r.change;return r.relX+=o,[a,o]},[0,0])},zW=(t,e,r)=>{const n=t.children[e-1],i=t.children[e];let a=n,o=n.relX,s=i,l=i.relX,u=!0;for(;a&&s;){a.bottom>r.lowY&&(r=r.next);const h=o+a.prelim-(l+s.prelim)+a.xSize/2+s.xSize/2+a.spacing(s);(h>0||h<0&&u)&&(l+=h,VW(i,h),$W(t,e,r.index,h)),u=!1;const c=a.bottom,f=s.bottom;c<=f&&(a=HW(a),a&&(o+=a.relX)),c>=f&&(s=GW(s),s&&(l+=s.relX))}!a&&s?qW(t,e,s,l):a&&!s&&WW(t,e,a,o)},VW=(t,e)=>{t.relX+=e,t.lExtRelX+=e,t.rExtRelX+=e},$W=(t,e,r,n)=>{const i=t.children[e],a=e-r;if(a>1){const o=n/a;t.children[r+1].shift+=o,i.shift-=o,i.change-=n-o}},GW=t=>t.hasChildren?t.firstChild:t.lThr,HW=t=>t.hasChildren?t.lastChild:t.rThr,qW=(t,e,r,n)=>{const i=t.firstChild,a=i.lExt,o=t.children[e];a.lThr=r;const s=n-r.relX-i.lExtRelX;a.relX+=s,a.prelim-=s,i.lExt=o.lExt,i.lExtRelX=o.lExtRelX},WW=(t,e,r,n)=>{const i=t.children[e],a=i.rExt,o=t.children[e-1];a.rThr=r;const s=n-r.relX-i.rExtRelX;a.relX+=s,a.prelim-=s,i.rExt=o.rExt,i.rExtRelX=o.rExtRelX},UW=t=>{if(t.hasChildren){const e=t.firstChild,r=t.lastChild,n=(e.prelim+e.relX-e.xSize/2+r.relX+r.prelim+r.xSize/2)/2;Object.assign(t,{prelim:n,lExt:e.lExt,lExtRelX:e.lExtRelX,rExt:r.rExt,rExtRelX:r.rExtRelX})}},YW=(t,e,r)=>{for(;r!==null&&t>=r.lowY;)r=r.next;return{lowY:t,index:e,next:r}};/*! @gera2ld/jsx-dom v2.1.1 | ISC License */var JM=1,QM=2,yu=1,eL=4,XW="http://www.w3.org/2000/svg",D_="http://www.w3.org/1999/xlink",ZW={show:D_,actuate:D_,href:D_},jW=function(e){return typeof e=="string"||typeof e=="number"},KW=function(e){return(e==null?void 0:e.vtype)===JM},JW=function(e){return(e==null?void 0:e.vtype)===QM};function Kv(t,e){var r;if(typeof t=="string")r=JM;else if(typeof t=="function")r=QM;else throw new Error("Invalid VNode type");return{vtype:r,type:t,props:e}}function QW(t){return t.children}var eU={isSvg:!1};function E4(t,e){if(e.type===yu)e.node!=null&&t.append(e.node);else if(e.type===eL)e.children.forEach(function(r){E4(t,r)});else throw new Error("Unkown ref type "+JSON.stringify(e))}function tU(t,e,r){for(var n in e)n==="key"||n==="children"||n==="ref"||(n==="dangerouslySetInnerHTML"?t.innerHTML=e[n].__html:n==="innerHTML"||n==="textContent"||n==="innerText"?t[n]=e[n]:n.startsWith("on")?t[n.toLowerCase()]=e[n]:nU(t,n,e[n],r.isSvg))}var rU={className:"class",labelFor:"for"};function nU(t,e,r,n){if(e=rU[e]||e,r===!0)t.setAttribute(e,"");else if(r===!1)t.removeAttribute(e);else{var i=n?ZW[e]:void 0;i!==void 0?t.setAttributeNS(i,e,r):t.setAttribute(e,r)}}function O0(t,e){if(e===void 0&&(e=eU),t==null||typeof t=="boolean")return{type:yu,node:null};if(t instanceof Node)return{type:yu,node:t};if(JW(t)){var r=t,n=r.type,i=r.props;if(n===QW){var a=document.createDocumentFragment();if(i.children){var o=O0(i.children,e);E4(a,o)}return{type:yu,node:a}}var s=n(i);return O0(s,e)}if(jW(t))return{type:yu,node:document.createTextNode(""+t)};if(KW(t)){var l,u=t,h=u.type,c=u.props;!e.isSvg&&h==="svg"&&(e=Object.assign({},e,{isSvg:!0})),e.isSvg?l=document.createElementNS(XW,h):l=document.createElement(h),tU(l,c,e);var f;if(c.children){var d=e;e.isSvg&&h==="foreignObject"&&(d=Object.assign({},d,{isSvg:!1})),f=O0(c.children,d)}f!=null&&E4(l,f);var v=c.ref;return typeof v=="function"&&v(l),{type:yu,node:l}}if(Array.isArray(t))return{type:eL,children:t.map(function(g){return O0(g,e)})};throw new Error("mount: Invalid Vnode!")}function tL(t){for(var e=[],r=0;r{r.ySizeInner=r.ySize-e,r.y+=e,n()},"children")}function vC(t,e){const r=S$(t,e);return t[r]}function gC(t){t.stopPropagation()}function sU(){return{transformHtml:new yM}}const lU=new yM,uU=YM(Hq),hU=typeof navigator<"u"&&navigator.userAgent.includes("Macintosh");class Cd{constructor(e,r){this.revokers=[],["handleZoom","handleClick","handlePan"].forEach(n=>{this[n]=this[n].bind(this)}),this.viewHooks=sU(),this.svg=e.datum?e:$s(e),this.styleNode=this.svg.append("style"),this.zoom=iW().filter(n=>this.options.scrollForPan&&n.type==="wheel"?n.ctrlKey&&!n.button:(!n.ctrlKey||n.type==="wheel")&&!n.button).on("zoom",this.handleZoom),this.setOptions(r),this.state={id:this.options.id||this.svg.attr("id")||p$()},this.g=this.svg.append("g"),this.revokers.push(lU.tap(()=>{this.setData()}))}getStyleContent(){const{style:e}=this.options,{id:r}=this.state,n=typeof e=="function"?e(r):"";return[this.options.embedGlobalCSS&&iU,n].filter(Boolean).join(`
+`)}updateStyle(){this.svg.attr("class",v$(this.svg.attr("class"),"markmap",this.state.id));const e=this.getStyleContent();this.styleNode.text(e)}handleZoom(e){const{transform:r}=e;this.g.attr("transform",r)}handlePan(e){e.preventDefault();const r=gm(this.svg.node()),n=r.translate(-e.deltaX/r.k,-e.deltaY/r.k);this.svg.call(this.zoom.transform,n)}handleClick(e,r){var n;const{data:i}=r;i.payload=Os({},i.payload,{fold:(n=i.payload)!=null&&n.fold?0:1}),this.renderData(r.data)}initializeData(e){let r=0;const{color:n,nodeMinHeight:i,maxWidth:a,initialExpandLevel:o}=this.options,{id:s}=this.state,l=mm(Kv("div",{className:`markmap-container markmap ${s}-g`})),u=mm(Kv("style",{children:[this.getStyleContent(),aU].join(`
+`)}));document.body.append(l,u);const h=a?`max-width: ${a}px`:"";let c=0;_4(e,(d,v,g)=>{var m,y,b;d.children=(m=d.children)==null?void 0:m.map(M=>Os({},M)),r+=1;const w=mm(Kv("div",{className:"markmap-foreign",style:h,children:Kv("div",{dangerouslySetInnerHTML:{__html:d.content}})}));l.append(w),d.state=Os({},d.state,{id:r,el:w.firstChild}),d.state.path=[g==null||(y=g.state)==null?void 0:y.path,d.state.id].filter(Boolean).join("."),n(d);const T=((b=d.payload)==null?void 0:b.fold)===2;T?c+=1:(c||o>=0&&d.depth>=o)&&(d.payload=Os({},d.payload,{fold:1})),v(),T&&(c-=1)});const f=_M(l.childNodes).map(d=>d.firstChild);this.viewHooks.transformHtml.call(this,f),f.forEach(d=>{d.parentNode.append(d.cloneNode(!0))}),_4(e,(d,v,g)=>{var m;const y=d.state.el.getBoundingClientRect();d.content=d.state.el.innerHTML,d.state.size=[Math.ceil(y.width)+1,Math.max(Math.ceil(y.height),i)],d.state.key=[g==null||(m=g.state)==null?void 0:m.id,d.state.id].filter(Boolean).join(".")+d.content,v()}),l.remove(),u.remove()}setOptions(e){this.options=Os({},Cd.defaultOptions,e),this.options.zoom?this.svg.call(this.zoom):this.svg.on(".zoom",null),this.svg.on("wheel",this.options.pan?this.handlePan:null)}setData(e,r){e&&(this.state.data=e),r&&this.setOptions(r),this.initializeData(this.state.data),this.updateStyle(),this.renderData()}renderData(e){var r,n;if(!this.state.data)return;const{spacingHorizontal:i,paddingX:a,spacingVertical:o,autoFit:s,color:l}=this.options,u=ZM().children(q=>{var G;return!((G=q.payload)!=null&&G.fold)&&q.children}).nodeSize(q=>{const[G,J]=q.data.state.size;return[J,G+(G?a*2:0)+i]}).spacing((q,G)=>q.parent===G.parent?o:o*2),h=u.hierarchy(this.state.data);u(h),oU(h,i);const c=h.descendants().reverse(),f=h.links(),d=Kq(),v=X6(c,q=>q.x-q.xSize/2),g=Y6(c,q=>q.x+q.xSize/2),m=X6(c,q=>q.y),y=Y6(c,q=>q.y+q.ySizeInner);Object.assign(this.state,{minX:v,maxX:g,minY:m,maxY:y}),s&&this.fit();const b=e&&c.find(q=>q.data===e)||h,w=(r=b.data.state.x0)!=null?r:b.x,T=(n=b.data.state.y0)!=null?n:b.y,M=this.g.selectAll(Yh("g")).data(c,q=>q.data.state.key),D=M.enter().append("g").attr("data-depth",q=>q.data.depth).attr("data-path",q=>q.data.state.path).attr("transform",q=>`translate(${T+b.ySizeInner-q.ySizeInner},${w+b.xSize/2-q.xSize})`),P=this.transition(M.exit());P.select("line").attr("x1",q=>q.ySizeInner).attr("x2",q=>q.ySizeInner),P.select("foreignObject").style("opacity",0),P.attr("transform",q=>`translate(${b.y+b.ySizeInner-q.ySizeInner},${b.x+b.xSize/2-q.xSize})`).remove();const O=M.merge(D).attr("class",q=>{var G;return["markmap-node",((G=q.data.payload)==null?void 0:G.fold)&&"markmap-fold"].filter(Boolean).join(" ")});this.transition(O).attr("transform",q=>`translate(${q.y},${q.x-q.xSize/2})`);const V=O.selectAll(Yh("line")).data(q=>[q],q=>q.data.state.key).join(q=>q.append("line").attr("x1",G=>G.ySizeInner).attr("x2",G=>G.ySizeInner),q=>q,q=>q.remove());this.transition(V).attr("x1",-1).attr("x2",q=>q.ySizeInner+2).attr("y1",q=>q.xSize).attr("y2",q=>q.xSize).attr("stroke",q=>l(q.data)).attr("stroke-width",pC);const $=O.selectAll(Yh("circle")).data(q=>q.data.children?[q]:[],q=>q.data.state.key).join(q=>q.append("circle").attr("stroke-width","1.5").attr("cx",G=>G.ySizeInner).attr("cy",G=>G.xSize).attr("r",0).on("click",(G,J)=>this.handleClick(G,J)),q=>q,q=>q.remove());this.transition($).attr("r",6).attr("cx",q=>q.ySizeInner).attr("cy",q=>q.xSize).attr("stroke",q=>l(q.data)).attr("fill",q=>{var G;return(G=q.data.payload)!=null&&G.fold&&q.data.children?l(q.data):"#fff"});const H=O.selectAll(Yh("foreignObject")).data(q=>[q],q=>q.data.state.key).join(q=>{const G=q.append("foreignObject").attr("class","markmap-foreign").attr("x",a).attr("y",0).style("opacity",0).on("mousedown",gC).on("dblclick",gC);return G.append("xhtml:div").select(function(K){const se=K.data.state.el.cloneNode(!0);return this.replaceWith(se),se}).attr("xmlns","http://www.w3.org/1999/xhtml"),G},q=>q,q=>q.remove()).attr("width",q=>Math.max(0,q.ySizeInner-a*2)).attr("height",q=>q.xSize);this.transition(H).style("opacity",1);const j=this.g.selectAll(Yh("path")).data(f,q=>q.target.data.state.key).join(q=>{const G=[T+b.ySizeInner,w+b.xSize/2];return q.insert("path","g").attr("class","markmap-link").attr("data-depth",J=>J.target.data.depth).attr("data-path",J=>J.target.data.state.path).attr("d",d({source:G,target:G}))},q=>q,q=>{const G=[b.y+b.ySizeInner,b.x+b.xSize/2];return this.transition(q).attr("d",d({source:G,target:G})).remove()});this.transition(j).attr("stroke",q=>l(q.target.data)).attr("stroke-width",q=>pC(q.target)).attr("d",q=>{const G=[q.source.y+q.source.ySizeInner,q.source.x+q.source.xSize/2],J=[q.target.y,q.target.x+q.target.xSize/2];return d({source:G,target:J})}),c.forEach(q=>{q.data.state.x0=q.x,q.data.state.y0=q.y})}transition(e){const{duration:r}=this.options;return e.transition().duration(r)}async fit(){const e=this.svg.node(),{width:r,height:n}=e.getBoundingClientRect(),{fitRatio:i}=this.options,{minX:a,maxX:o,minY:s,maxY:l}=this.state,u=l-s,h=o-a,c=Math.min(r/u*i,n/h*i,2),f=Cy.translate((r-u*c)/2-s*c,(n-h*c)/2-a*c).scale(c);return this.transition(this.svg).call(this.zoom.transform,f).end().catch(w_)}async ensureView(e,r){let n,i;if(this.g.selectAll(Yh("g")).each(function(b){b.data===e&&(n=this,i=b)}),!n||!i)return;const a=this.svg.node(),o=a.getBoundingClientRect(),s=gm(a),[l,u]=[i.y,i.y+i.ySizeInner+2].map(y=>y*s.k+s.x),[h,c]=[i.x-i.xSize/2,i.x+i.xSize/2].map(y=>y*s.k+s.y),f=Os({left:0,right:0,top:0,bottom:0},r),d=[f.left-l,o.width-f.right-u],v=[f.top-h,o.height-f.bottom-c],g=d[0]*d[1]>0?vC(d,Math.abs)/s.k:0,m=v[0]*v[1]>0?vC(v,Math.abs)/s.k:0;if(g||m){const y=s.translate(g,m);return this.transition(this.svg).call(this.zoom.transform,y).end().catch(w_)}}async rescale(e){const r=this.svg.node(),{width:n,height:i}=r.getBoundingClientRect(),a=n/2,o=i/2,s=gm(r),l=s.translate((a-s.x)*(1-e)/s.k,(o-s.y)*(1-e)/s.k).scale(e);return this.transition(this.svg).call(this.zoom.transform,l).end().catch(w_)}destroy(){this.svg.on(".zoom",null),this.svg.html(null),this.revokers.forEach(e=>{e()})}static create(e,r,n){const i=new Cd(e,r);return n&&(i.setData(n),i.fit()),i}}Cd.defaultOptions={autoFit:!1,color:t=>uU(`${t.state.path}`),duration:500,embedGlobalCSS:!0,fitRatio:.95,maxWidth:0,nodeMinHeight:16,paddingX:8,scrollForPan:hU,spacingHorizontal:80,spacingVertical:5,initialExpandLevel:-1,zoom:!0,pan:!0};var nL={exports:{}};(function(t,e){(function(r,n){n()})(mu,function(){function r(u,h){return typeof h>"u"?h={autoBom:!1}:typeof h!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),h={autoBom:!h}),h.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function n(u,h,c){var f=new XMLHttpRequest;f.open("GET",u),f.responseType="blob",f.onload=function(){l(f.response,h,c)},f.onerror=function(){console.error("could not download file")},f.send()}function i(u){var h=new XMLHttpRequest;h.open("HEAD",u,!1);try{h.send()}catch{}return 200<=h.status&&299>=h.status}function a(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var h=document.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(h)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof mu=="object"&&mu.global===mu?mu:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,h,c){var f=o.URL||o.webkitURL,d=document.createElement("a");h=h||u.name||"download",d.download=h,d.rel="noopener",typeof u=="string"?(d.href=u,d.origin===location.origin?a(d):i(d.href)?n(u,h,c):a(d,d.target="_blank")):(d.href=f.createObjectURL(u),setTimeout(function(){f.revokeObjectURL(d.href)},4e4),setTimeout(function(){a(d)},0))}:"msSaveOrOpenBlob"in navigator?function(u,h,c){if(h=h||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(r(u,c),h);else if(i(u))n(u,h,c);else{var f=document.createElement("a");f.href=u,f.target="_blank",setTimeout(function(){a(f)})}}:function(u,h,c,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof u=="string")return n(u,h,c);var d=u.type==="application/octet-stream",v=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||d&&v||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var w=m.result;w=g?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},m.readAsDataURL(u)}else{var y=o.URL||o.webkitURL,b=y.createObjectURL(u);f?f.location=b:location.href=b,f=null,setTimeout(function(){y.revokeObjectURL(b)},4e4)}});o.saveAs=l.saveAs=l,t.exports=l})})(nL);var iL=nL.exports;const Z3e={__name:"MindmapRenderer",props:{content:{type:String,required:!0,default:""}},setup(t){const e=t,{t:r}=lp(),n=Ks(),i=Ks(e.content),a=Ks();let o;const s=new f$.Transformer,l=()=>{const{root:h,features:c}=s.transform(i.value),{styles:f,scripts:d}=s.getUsedAssets(c);f&&b$(f),d&&x$(d,{getMarkmap:()=>window.markmap}),a.value=h,o.setData(h),o.fit()};B3(()=>{o=Cd.create(n.value),l()}),eV(l),wu(()=>e.content,()=>{i.value=e.content});const u=()=>{const h=document.querySelector("#markmap"),c=new XMLSerializer().serializeToString(h),f=new Blob([c],{type:"image/svg+xml"});iL.saveAs(f,"mindmap.svg")};return(h,c)=>{const f=Gn("a-col"),d=Gn("a-button"),v=Gn("a-row");return Sr(),Wu(v,null,{default:hn(()=>[Nr(f,{span:24},{default:hn(()=>[(Sr(),ln("svg",{id:"markmap",ref_key:"svgRef",ref:n,style:{width:"100%","min-height":"50vh"}},null,512))]),_:1}),Nr(f,{span:24},{default:hn(()=>[Nr(d,{onClick:u,type:"primary"},{default:hn(()=>[xy(Oo(Go(r)("components.workspace.mindmapRenderer.download_svg")),1)]),_:1})]),_:1})]),_:1})}}};function cU(t){for(var e=[],r=1;r-1}function l(h){var c=h.replace(i,"");return c.replace(r,function(f,d){return String.fromCharCode(d)})}function u(h){if(!h)return t.BLANK_URL;var c=l(h).replace(n,"").replace(i,"").trim();if(!c)return t.BLANK_URL;if(s(c))return c;var f=c.match(a);if(!f)return c;var d=f[0];return e.test(d)?t.BLANK_URL:c}t.sanitizeUrl=u})(aL);var hU={value:()=>{}};function oL(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}ym.prototype=oL.prototype={constructor:ym,on:function(t,e){var r=this._,n=cU(t+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),yC.hasOwnProperty(e)?{space:yC[e],local:t}:t}function dU(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===E4&&e.documentElement.namespaceURI===E4?e.createElement(t):e.createElementNS(r,t)}}function pU(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function sL(t){var e=Cy(t);return(e.local?pU:dU)(e)}function vU(){}function q3(t){return t==null?vU:function(){return this.querySelector(t)}}function gU(t){typeof t!="function"&&(t=q3(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=w&&(w=b+1);!(M=m[w])&&++w=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function $U(t){t||(t=GU);function e(c,f){return c&&f?t(c.__data__,f.__data__):!c-!f}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}function HU(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function qU(){return Array.from(this)}function WU(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?rY:typeof e=="function"?iY:nY)(t,e,r??"")):Oc(this.node(),t)}function Oc(t,e){return t.style.getPropertyValue(e)||fL(t).getComputedStyle(t,null).getPropertyValue(e)}function oY(t){return function(){delete this[t]}}function sY(t,e){return function(){this[t]=e}}function lY(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function uY(t,e){return arguments.length>1?this.each((e==null?oY:typeof e=="function"?lY:sY)(t,e)):this.node()[t]}function dL(t){return t.trim().split(/^|\s+/)}function W3(t){return t.classList||new pL(t)}function pL(t){this._node=t,this._names=dL(t.getAttribute("class")||"")}pL.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function vL(t,e){for(var r=W3(t),n=-1,i=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function OY(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Kv(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Kv(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=UY.exec(t))?new ai(e[1],e[2],e[3],1):(e=YY.exec(t))?new ai(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=XY.exec(t))?Kv(e[1],e[2],e[3],e[4]):(e=ZY.exec(t))?Kv(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=jY.exec(t))?AC(e[1],e[2]/100,e[3]/100,1):(e=KY.exec(t))?AC(e[1],e[2]/100,e[3]/100,e[4]):_C.hasOwnProperty(t)?SC(_C[t]):t==="transparent"?new ai(NaN,NaN,NaN,0):null}function SC(t){return new ai(t>>16&255,t>>8&255,t&255,1)}function Kv(t,e,r,n){return n<=0&&(t=e=r=NaN),new ai(t,e,r,n)}function eX(t){return t instanceof cp||(t=Td(t)),t?(t=t.rgb(),new ai(t.r,t.g,t.b,t.opacity)):new ai}function I4(t,e,r,n){return arguments.length===1?eX(t):new ai(t,e,r,n??1)}function ai(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}U3(ai,I4,_L(cp,{brighter(t){return t=t==null?i1:Math.pow(i1,t),new ai(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Cd:Math.pow(Cd,t),new ai(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ai(Iu(this.r),Iu(this.g),Iu(this.b),a1(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:wC,formatHex:wC,formatHex8:tX,formatRgb:CC,toString:CC}));function wC(){return`#${wu(this.r)}${wu(this.g)}${wu(this.b)}`}function tX(){return`#${wu(this.r)}${wu(this.g)}${wu(this.b)}${wu((isNaN(this.opacity)?1:this.opacity)*255)}`}function CC(){const t=a1(this.opacity);return`${t===1?"rgb(":"rgba("}${Iu(this.r)}, ${Iu(this.g)}, ${Iu(this.b)}${t===1?")":`, ${t})`}`}function a1(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Iu(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wu(t){return t=Iu(t),(t<16?"0":"")+t.toString(16)}function AC(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new fa(t,e,r,n)}function xL(t){if(t instanceof fa)return new fa(t.h,t.s,t.l,t.opacity);if(t instanceof cp||(t=Td(t)),!t)return new fa;if(t instanceof fa)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(e===a?o=(r-n)/s+(r0&&l<1?0:o,new fa(o,s,l,t.opacity)}function rX(t,e,r,n){return arguments.length===1?xL(t):new fa(t,e,r,n??1)}function fa(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}U3(fa,rX,_L(cp,{brighter(t){return t=t==null?i1:Math.pow(i1,t),new fa(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Cd:Math.pow(Cd,t),new fa(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ai(D_(t>=240?t-240:t+120,i,n),D_(t,i,n),D_(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new fa(TC(this.h),Jv(this.s),Jv(this.l),a1(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=a1(this.opacity);return`${t===1?"hsl(":"hsla("}${TC(this.h)}, ${Jv(this.s)*100}%, ${Jv(this.l)*100}%${t===1?")":`, ${t})`}`}}));function TC(t){return t=(t||0)%360,t<0?t+360:t}function Jv(t){return Math.max(0,Math.min(1,t||0))}function D_(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Y3=t=>()=>t;function bL(t,e){return function(r){return t+r*e}}function nX(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function X3e(t,e){var r=e-t;return r?bL(t,r>180||r<-180?r-360*Math.round(r/360):r):Y3(isNaN(t)?e:t)}function iX(t){return(t=+t)==1?SL:function(e,r){return r-e?nX(e,r,t):Y3(isNaN(e)?r:e)}}function SL(t,e){var r=e-t;return r?bL(t,r):Y3(isNaN(t)?e:t)}const kC=function t(e){var r=iX(e);function n(i,a){var o=r((i=I4(i)).r,(a=I4(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=SL(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=s(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);function Fs(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var B4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,M_=new RegExp(B4.source,"g");function aX(t){return function(){return t}}function oX(t){return function(e){return t(e)+""}}function sX(t,e){var r=B4.lastIndex=M_.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(t=t+"",e=e+"";(n=B4.exec(t))&&(i=M_.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Fs(n,i)})),r=M_.lastIndex;return r180?h+=360:h-u>180&&(u+=360),f.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Fs(u,h)})):h&&c.push(i(c)+"rotate("+h+n)}function s(u,h,c,f){u!==h?f.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Fs(u,h)}):h&&c.push(i(c)+"skewX("+h+n)}function l(u,h,c,f,d,v){if(u!==c||h!==f){var g=d.push(i(d)+"scale(",null,",",null,")");v.push({i:g-4,x:Fs(u,c)},{i:g-2,x:Fs(h,f)})}else(c!==1||f!==1)&&d.push(i(d)+"scale("+c+","+f+")")}return function(u,h){var c=[],f=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,c,f),o(u.rotate,h.rotate,c,f),s(u.skewX,h.skewX,c,f),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,c,f),u=h=null,function(d){for(var v=-1,g=f.length,m;++v=0&&t._call.call(void 0,e),t=t._next;--Nc}function MC(){Wu=(s1=kd.now())+Ay,Nc=N0=0;try{dX()}finally{Nc=0,vX(),Wu=0}}function pX(){var t=kd.now(),e=t-s1;e>AL&&(Ay-=e,s1=t)}function vX(){for(var t,e=o1,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:o1=r);z0=t,R4(n)}function R4(t){if(!Nc){N0&&(N0=clearTimeout(N0));var e=t-Wu;e>24?(t<1/0&&(N0=setTimeout(MC,t-kd.now()-Ay)),t0&&(t0=clearInterval(t0))):(t0||(s1=kd.now(),t0=setInterval(pX,AL)),Nc=1,TL(MC))}}function LC(t,e,r){var n=new l1;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var gX=oL("start","end","cancel","interrupt"),mX=[],DL=0,EC=1,F4=2,_m=3,IC=4,O4=5,xm=6;function Ty(t,e,r,n,i,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;yX(t,r,{name:e,index:n,group:i,on:gX,tween:mX,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:DL})}function Z3(t,e){var r=wa(t,e);if(r.state>DL)throw new Error("too late; already scheduled");return r}function vo(t,e){var r=wa(t,e);if(r.state>_m)throw new Error("too late; already running");return r}function wa(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function yX(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=kL(a,0,r.time);function a(u){r.state=EC,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var h,c,f,d;if(r.state!==EC)return l();for(h in n)if(d=n[h],d.name===r.name){if(d.state===_m)return LC(o);d.state===IC?(d.state=xm,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+hF4&&n.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function ZX(t,e,r){var n,i,a=XX(e)?Z3:vo;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}function jX(t,e){var r=this._id;return arguments.length<2?wa(this.node(),r).on.on(t):this.each(ZX(r,t,e))}function KX(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function JX(){return this.on("end.remove",KX(this._id))}function QX(t){var e=this._name,r=this._id;typeof t!="function"&&(t=q3(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o1?0:t<-1?K3:Math.acos(t)}function iSe(t){return t>=1?PC:t<=-1?-PC:Math.asin(t)}function IL(t){this._context=t}IL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function CZ(t){return new IL(t)}class BL{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function AZ(t){return new BL(t,!0)}function TZ(t){return new BL(t,!1)}function nl(){}function u1(t,e,r){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+r)/6)}function ky(t){this._context=t}ky.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:u1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:u1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function kZ(t){return new ky(t)}function PL(t){this._context=t}PL.prototype={areaStart:nl,areaEnd:nl,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);break}}},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:u1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function DZ(t){return new PL(t)}function RL(t){this._context=t}RL.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||this._line!==0&&this._point===3)&&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 r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:u1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function MZ(t){return new RL(t)}function FL(t,e){this._basis=new ky(t),this._beta=e}FL.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,o=e[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(n+l*a),this._beta*e[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const LZ=function t(e){function r(n){return e===1?new ky(n):new FL(n,e)}return r.beta=function(n){return t(+n)},r}(.85);function h1(t,e,r){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-r),t._x2,t._y2)}function J3(t,e){this._context=t,this._k=(1-e)/6}J3.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:h1(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:h1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const EZ=function t(e){function r(n){return new J3(n,e)}return r.tension=function(n){return t(+n)},r}(0);function Q3(t,e){this._context=t,this._k=(1-e)/6}Q3.prototype={areaStart:nl,areaEnd:nl,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);break}}},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:h1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const IZ=function t(e){function r(n){return new Q3(n,e)}return r.tension=function(n){return t(+n)},r}(0);function eS(t,e){this._context=t,this._k=(1-e)/6}eS.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||this._line!==0&&this._point===3)&&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:h1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const BZ=function t(e){function r(n){return new eS(n,e)}return r.tension=function(n){return t(+n)},r}(0);function tS(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>BC){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);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>BC){var u=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);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function OL(t,e){this._context=t,this._alpha=e}OL.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:tS(this,t,e);break}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 PZ=function t(e){function r(n){return e?new OL(n,e):new J3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function NL(t,e){this._context=t,this._alpha=e}NL.prototype={areaStart:nl,areaEnd:nl,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);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:tS(this,t,e);break}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 RZ=function t(e){function r(n){return e?new NL(n,e):new Q3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function zL(t,e){this._context=t,this._alpha=e}zL.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:tS(this,t,e);break}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 FZ=function t(e){function r(n){return e?new zL(n,e):new eS(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function VL(t){this._context=t}VL.prototype={areaStart:nl,areaEnd:nl,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))}};function OZ(t){return new VL(t)}function RC(t){return t<0?-1:1}function FC(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(RC(a)+RC(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function OC(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function L_(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function c1(t){this._context=t}c1.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:L_(this,this._t0,OC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(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,L_(this,OC(this,r=FC(this,t,e)),r);break;default:L_(this,this._t0,r=FC(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function $L(t){this._context=new GL(t)}($L.prototype=Object.create(c1.prototype)).point=function(t,e){c1.prototype.point.call(this,e,t)};function GL(t){this._context=t}GL.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,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function NZ(t){return new c1(t)}function zZ(t){return new $L(t)}function HL(t){this._context=t}HL.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,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=NC(t),i=NC(e),a=0,o=1;o=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function $Z(t){return new Dy(t,.5)}function GZ(t){return new Dy(t,0)}function HZ(t){return new Dy(t,1)}function V0(t,e,r){this.k=t,this.x=e,this.y=r}V0.prototype={constructor:V0,scale:function(t){return t===1?this:new V0(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new V0(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+")"}};V0.prototype;/*! @license DOMPurify 3.0.5 | (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.5/LICENSE */const{entries:qL,setPrototypeOf:zC,isFrozen:qZ,getPrototypeOf:WZ,getOwnPropertyDescriptor:UZ}=Object;let{freeze:qn,seal:ya,create:YZ}=Object,{apply:N4,construct:z4}=typeof Reflect<"u"&&Reflect;N4||(N4=function(e,r,n){return e.apply(r,n)});qn||(qn=function(e){return e});ya||(ya=function(e){return e});z4||(z4=function(e,r){return new e(...r)});const XZ=Yi(Array.prototype.forEach),VC=Yi(Array.prototype.pop),r0=Yi(Array.prototype.push),bm=Yi(String.prototype.toLowerCase),E_=Yi(String.prototype.toString),ZZ=Yi(String.prototype.match),aa=Yi(String.prototype.replace),jZ=Yi(String.prototype.indexOf),KZ=Yi(String.prototype.trim),mi=Yi(RegExp.prototype.test),n0=JZ(TypeError);function Yi(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i/gm),nj=ya(/\${[\w\W]*}/gm),ij=ya(/^data-[\-\w.\u00B7-\uFFFF]/),aj=ya(/^aria-[\-\w]+$/),WL=ya(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oj=ya(/^(?:\w+script|data):/i),sj=ya(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),UL=ya(/^html$/i);var WC=Object.freeze({__proto__:null,MUSTACHE_EXPR:tj,ERB_EXPR:rj,TMPLIT_EXPR:nj,DATA_ATTR:ij,ARIA_ATTR:aj,IS_ALLOWED_URI:WL,IS_SCRIPT_OR_DATA:oj,ATTR_WHITESPACE:sj,DOCTYPE_NAME:UL});const lj=()=>typeof window>"u"?null:window,uj=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function YL(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lj();const e=at=>YL(at);if(e.version="3.0.5",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;const r=t.document,n=r.currentScript;let{document:i}=t;const{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:c,DOMParser:f,trustedTypes:d}=t,v=l.prototype,g=eg(v,"cloneNode"),m=eg(v,"nextSibling"),y=eg(v,"childNodes"),b=eg(v,"parentNode");if(typeof o=="function"){const at=i.createElement("template");at.content&&at.content.ownerDocument&&(i=at.content.ownerDocument)}let w,T="";const{implementation:M,createNodeIterator:D,createDocumentFragment:P,getElementsByTagName:O}=i,{importNode:V}=r;let $={};e.isSupported=typeof qL=="function"&&typeof b=="function"&&M&&M.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:j,TMPLIT_EXPR:q,DATA_ATTR:G,ARIA_ATTR:J,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:se}=WC;let{IS_ALLOWED_URI:ae}=WC,ce=null;const ye=Ot({},[...$C,...I_,...B_,...P_,...GC]);let de=null;const De=Ot({},[...HC,...R_,...qC,...tg]);let Ie=Object.seal(Object.create(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}})),Pe=null,Qe=null,Ke=!0,et=!0,qe=!1,lt=!0,it=!1,Re=!1,Ae=!1,Xt=!1,ht=!1,Zt=!1,Mt=!1,Cr=!0,dr=!1;const Kt="user-content-";let Mn=!0,Gr=!1,Ln={},tn=null;const yo=Ot({},["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 ml=null;const lh=Ot({},["audio","video","img","source","image","track"]);let as=null;const yl=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_o="http://www.w3.org/1998/Math/MathML",xo="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml";let Ta=rn,os=!1,ir=null;const Ve=Ot({},[_o,xo,rn],E_);let Zr;const uh=["application/xhtml+xml","text/html"],hh="text/html";let yr,Yn=null;const ss=i.createElement("form"),_l=function(oe){return oe instanceof RegExp||oe instanceof Function},Ai=function(oe){if(!(Yn&&Yn===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=Yh(oe),Zr=uh.indexOf(oe.PARSER_MEDIA_TYPE)===-1?Zr=hh:Zr=oe.PARSER_MEDIA_TYPE,yr=Zr==="application/xhtml+xml"?E_:bm,ce="ALLOWED_TAGS"in oe?Ot({},oe.ALLOWED_TAGS,yr):ye,de="ALLOWED_ATTR"in oe?Ot({},oe.ALLOWED_ATTR,yr):De,ir="ALLOWED_NAMESPACES"in oe?Ot({},oe.ALLOWED_NAMESPACES,E_):Ve,as="ADD_URI_SAFE_ATTR"in oe?Ot(Yh(yl),oe.ADD_URI_SAFE_ATTR,yr):yl,ml="ADD_DATA_URI_TAGS"in oe?Ot(Yh(lh),oe.ADD_DATA_URI_TAGS,yr):lh,tn="FORBID_CONTENTS"in oe?Ot({},oe.FORBID_CONTENTS,yr):yo,Pe="FORBID_TAGS"in oe?Ot({},oe.FORBID_TAGS,yr):{},Qe="FORBID_ATTR"in oe?Ot({},oe.FORBID_ATTR,yr):{},Ln="USE_PROFILES"in oe?oe.USE_PROFILES:!1,Ke=oe.ALLOW_ARIA_ATTR!==!1,et=oe.ALLOW_DATA_ATTR!==!1,qe=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,lt=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=oe.SAFE_FOR_TEMPLATES||!1,Re=oe.WHOLE_DOCUMENT||!1,ht=oe.RETURN_DOM||!1,Zt=oe.RETURN_DOM_FRAGMENT||!1,Mt=oe.RETURN_TRUSTED_TYPE||!1,Xt=oe.FORCE_BODY||!1,Cr=oe.SANITIZE_DOM!==!1,dr=oe.SANITIZE_NAMED_PROPS||!1,Mn=oe.KEEP_CONTENT!==!1,Gr=oe.IN_PLACE||!1,ae=oe.ALLOWED_URI_REGEXP||WL,Ta=oe.NAMESPACE||rn,Ie=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&_l(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ie.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&_l(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ie.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ie.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),it&&(et=!1),Zt&&(ht=!0),Ln&&(ce=Ot({},[...GC]),de=[],Ln.html===!0&&(Ot(ce,$C),Ot(de,HC)),Ln.svg===!0&&(Ot(ce,I_),Ot(de,R_),Ot(de,tg)),Ln.svgFilters===!0&&(Ot(ce,B_),Ot(de,R_),Ot(de,tg)),Ln.mathMl===!0&&(Ot(ce,P_),Ot(de,qC),Ot(de,tg))),oe.ADD_TAGS&&(ce===ye&&(ce=Yh(ce)),Ot(ce,oe.ADD_TAGS,yr)),oe.ADD_ATTR&&(de===De&&(de=Yh(de)),Ot(de,oe.ADD_ATTR,yr)),oe.ADD_URI_SAFE_ATTR&&Ot(as,oe.ADD_URI_SAFE_ATTR,yr),oe.FORBID_CONTENTS&&(tn===yo&&(tn=Yh(tn)),Ot(tn,oe.FORBID_CONTENTS,yr)),Mn&&(ce["#text"]=!0),Re&&Ot(ce,["html","head","body"]),ce.table&&(Ot(ce,["tbody"]),delete Pe.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw n0('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw n0('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=oe.TRUSTED_TYPES_POLICY,T=w.createHTML("")}else w===void 0&&(w=uj(d,n)),w!==null&&typeof T=="string"&&(T=w.createHTML(""));qn&&qn(oe),Yn=oe}},nn=Ot({},["mi","mo","mn","ms","mtext"]),pn=Ot({},["foreignobject","desc","title","annotation-xml"]),ci=Ot({},["title","style","font","a","script"]),vn=Ot({},I_);Ot(vn,B_),Ot(vn,QZ);const ls=Ot({},P_);Ot(ls,ej);const vf=function(oe){let ke=b(oe);(!ke||!ke.tagName)&&(ke={namespaceURI:Ta,tagName:"template"});const $e=bm(oe.tagName),Ht=bm(ke.tagName);return ir[oe.namespaceURI]?oe.namespaceURI===xo?ke.namespaceURI===rn?$e==="svg":ke.namespaceURI===_o?$e==="svg"&&(Ht==="annotation-xml"||nn[Ht]):!!vn[$e]:oe.namespaceURI===_o?ke.namespaceURI===rn?$e==="math":ke.namespaceURI===xo?$e==="math"&&pn[Ht]:!!ls[$e]:oe.namespaceURI===rn?ke.namespaceURI===xo&&!pn[Ht]||ke.namespaceURI===_o&&!nn[Ht]?!1:!ls[$e]&&(ci[$e]||!vn[$e]):!!(Zr==="application/xhtml+xml"&&ir[oe.namespaceURI]):!1},ea=function(oe){r0(e.removed,{element:oe});try{oe.parentNode.removeChild(oe)}catch{oe.remove()}},xl=function(oe,ke){try{r0(e.removed,{attribute:ke.getAttributeNode(oe),from:ke})}catch{r0(e.removed,{attribute:null,from:ke})}if(ke.removeAttribute(oe),oe==="is"&&!de[oe])if(ht||Zt)try{ea(ke)}catch{}else try{ke.setAttribute(oe,"")}catch{}},ka=function(oe){let ke,$e;if(Xt)oe=""+oe;else{const _r=ZZ(oe,/^[\r\n\t ]+/);$e=_r&&_r[0]}Zr==="application/xhtml+xml"&&Ta===rn&&(oe=''+oe+"");const Ht=w?w.createHTML(oe):oe;if(Ta===rn)try{ke=new f().parseFromString(Ht,Zr)}catch{}if(!ke||!ke.documentElement){ke=M.createDocument(Ta,"template",null);try{ke.documentElement.innerHTML=os?T:Ht}catch{}}const ne=ke.body||ke.documentElement;return oe&&$e&&ne.insertBefore(i.createTextNode($e),ne.childNodes[0]||null),Ta===rn?O.call(ke,Re?"html":"body")[0]:Re?ke.documentElement:ne},ar=function(oe){return D.call(oe.ownerDocument||oe,oe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},B=function(oe){return oe instanceof c&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof h)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},N=function(oe){return typeof s=="object"?oe instanceof s:oe&&typeof oe=="object"&&typeof oe.nodeType=="number"&&typeof oe.nodeName=="string"},Me=function(oe,ke,$e){$[oe]&&XZ($[oe],Ht=>{Ht.call(e,ke,$e,Yn)})},Z=function(oe){let ke;if(Me("beforeSanitizeElements",oe,null),B(oe))return ea(oe),!0;const $e=yr(oe.nodeName);if(Me("uponSanitizeElement",oe,{tagName:$e,allowedTags:ce}),oe.hasChildNodes()&&!N(oe.firstElementChild)&&(!N(oe.content)||!N(oe.content.firstElementChild))&&mi(/<[/\w]/g,oe.innerHTML)&&mi(/<[/\w]/g,oe.textContent))return ea(oe),!0;if(!ce[$e]||Pe[$e]){if(!Pe[$e]&&rr($e)&&(Ie.tagNameCheck instanceof RegExp&&mi(Ie.tagNameCheck,$e)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck($e)))return!1;if(Mn&&!tn[$e]){const Ht=b(oe)||oe.parentNode,ne=y(oe)||oe.childNodes;if(ne&&Ht){const _r=ne.length;for(let he=_r-1;he>=0;--he)Ht.insertBefore(g(ne[he],!0),m(oe))}}return ea(oe),!0}return oe instanceof l&&!vf(oe)||($e==="noscript"||$e==="noembed"||$e==="noframes")&&mi(/<\/no(script|embed|frames)/i,oe.innerHTML)?(ea(oe),!0):(it&&oe.nodeType===3&&(ke=oe.textContent,ke=aa(ke,H," "),ke=aa(ke,j," "),ke=aa(ke,q," "),oe.textContent!==ke&&(r0(e.removed,{element:oe.cloneNode()}),oe.textContent=ke)),Me("afterSanitizeElements",oe,null),!1)},ie=function(oe,ke,$e){if(Cr&&(ke==="id"||ke==="name")&&($e in i||$e in ss))return!1;if(!(et&&!Qe[ke]&&mi(G,ke))){if(!(Ke&&mi(J,ke))){if(!de[ke]||Qe[ke]){if(!(rr(oe)&&(Ie.tagNameCheck instanceof RegExp&&mi(Ie.tagNameCheck,oe)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(oe))&&(Ie.attributeNameCheck instanceof RegExp&&mi(Ie.attributeNameCheck,ke)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(ke))||ke==="is"&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&mi(Ie.tagNameCheck,$e)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck($e))))return!1}else if(!as[ke]){if(!mi(ae,aa($e,se,""))){if(!((ke==="src"||ke==="xlink:href"||ke==="href")&&oe!=="script"&&jZ($e,"data:")===0&&ml[oe])){if(!(qe&&!mi(K,aa($e,se,"")))){if($e)return!1}}}}}}return!0},rr=function(oe){return oe.indexOf("-")>0},je=function(oe){let ke,$e,Ht,ne;Me("beforeSanitizeAttributes",oe,null);const{attributes:_r}=oe;if(!_r)return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:de};for(ne=_r.length;ne--;){ke=_r[ne];const{name:jr,namespaceURI:Da}=ke;if($e=jr==="value"?ke.value:KZ(ke.value),Ht=yr(jr),he.attrName=Ht,he.attrValue=$e,he.keepAttr=!0,he.forceKeepAttr=void 0,Me("uponSanitizeAttribute",oe,he),$e=he.attrValue,he.forceKeepAttr||(xl(jr,oe),!he.keepAttr))continue;if(!lt&&mi(/\/>/i,$e)){xl(jr,oe);continue}it&&($e=aa($e,H," "),$e=aa($e,j," "),$e=aa($e,q," "));const us=yr(oe.nodeName);if(ie(us,Ht,$e)){if(dr&&(Ht==="id"||Ht==="name")&&(xl(jr,oe),$e=Kt+$e),w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Da)switch(d.getAttributeType(us,Ht)){case"TrustedHTML":{$e=w.createHTML($e);break}case"TrustedScriptURL":{$e=w.createScriptURL($e);break}}try{Da?oe.setAttributeNS(Da,jr,$e):oe.setAttribute(jr,$e),VC(e.removed)}catch{}}}Me("afterSanitizeAttributes",oe,null)},Hr=function at(oe){let ke;const $e=ar(oe);for(Me("beforeSanitizeShadowDOM",oe,null);ke=$e.nextNode();)Me("uponSanitizeShadowNode",ke,null),!Z(ke)&&(ke.content instanceof a&&at(ke.content),je(ke));Me("afterSanitizeShadowDOM",oe,null)};return e.sanitize=function(at){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ke,$e,Ht,ne;if(os=!at,os&&(at=""),typeof at!="string"&&!N(at))if(typeof at.toString=="function"){if(at=at.toString(),typeof at!="string")throw n0("dirty is not a string, aborting")}else throw n0("toString is not a function");if(!e.isSupported)return at;if(Ae||Ai(oe),e.removed=[],typeof at=="string"&&(Gr=!1),Gr){if(at.nodeName){const jr=yr(at.nodeName);if(!ce[jr]||Pe[jr])throw n0("root node is forbidden and cannot be sanitized in-place")}}else if(at instanceof s)ke=ka(""),$e=ke.ownerDocument.importNode(at,!0),$e.nodeType===1&&$e.nodeName==="BODY"||$e.nodeName==="HTML"?ke=$e:ke.appendChild($e);else{if(!ht&&!it&&!Re&&at.indexOf("<")===-1)return w&&Mt?w.createHTML(at):at;if(ke=ka(at),!ke)return ht?null:Mt?T:""}ke&&Xt&&ea(ke.firstChild);const _r=ar(Gr?at:ke);for(;Ht=_r.nextNode();)Z(Ht)||(Ht.content instanceof a&&Hr(Ht.content),je(Ht));if(Gr)return at;if(ht){if(Zt)for(ne=P.call(ke.ownerDocument);ke.firstChild;)ne.appendChild(ke.firstChild);else ne=ke;return(de.shadowroot||de.shadowrootmode)&&(ne=V.call(r,ne,!0)),ne}let he=Re?ke.outerHTML:ke.innerHTML;return Re&&ce["!doctype"]&&ke.ownerDocument&&ke.ownerDocument.doctype&&ke.ownerDocument.doctype.name&&mi(UL,ke.ownerDocument.doctype.name)&&(he="
-`+he),it&&(he=aa(he,H," "),he=aa(he,j," "),he=aa(he,q," ")),w&&Mt?w.createHTML(he):he},e.setConfig=function(at){Ai(at),Ae=!0},e.clearConfig=function(){Yn=null,Ae=!1},e.isValidAttribute=function(at,oe,ke){Yn||Ai({});const $e=yr(at),Ht=yr(oe);return ie($e,Ht,ke)},e.addHook=function(at,oe){typeof oe=="function"&&($[at]=$[at]||[],r0($[at],oe))},e.removeHook=function(at){if($[at])return VC($[at])},e.removeHooks=function(at){$[at]&&($[at]=[])},e.removeAllHooks=function(){$={}},e}var f1=YL();const Sm={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,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Sm.hue2rgb(a,i,t+1/3)*255;case"g":return Sm.hue2rgb(a,i,t)*255;case"b":return Sm.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),o=(i+a)/2;if(n==="l")return o*100;if(i===a)return 0;const s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},fj=cj,dj={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},pj=dj,vj={channel:hj,lang:fj,unit:pj},Dt=vj,Es={};for(let t=0;t<=255;t++)Es[t]=Dt.unit.dec2hex(t);const Sn={ALL:0,RGB:1,HSL:2};class gj{constructor(){this.type=Sn.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Sn.ALL}is(e){return this.type===e}}const mj=gj;class yj{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new mj}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Sn.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Dt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Dt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Dt.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Dt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Dt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Dt.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(Sn.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(Sn.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(Sn.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(Sn.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(Sn.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(Sn.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Sn.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Sn.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Sn.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Sn.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Sn.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Sn.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const _j=yj,xj=new _j({r:0,g:0,b:0,a:0},"transparent"),My=xj,XL={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(XL.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,h=o?255:15;return My.set({r:(n>>l*(u+3)&h)*s,g:(n>>l*(u+2)&h)*s,b:(n>>l*(u+1)&h)*s,a:a?(n&h)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${Es[Math.round(e)]}${Es[Math.round(r)]}${Es[Math.round(n)]}${Es[Math.round(i*255)]}`:`#${Es[Math.round(e)]}${Es[Math.round(r)]}${Es[Math.round(n)]}`}},Q0=XL,wm={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(wm.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(wm.re);if(!r)return;const[,n,i,a,o,s]=r;return My.set({h:wm._hue2deg(n),s:Dt.channel.clamp.s(parseFloat(i)),l:Dt.channel.clamp.l(parseFloat(a)),a:o?Dt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Dt.lang.round(e)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(n)}%, ${i})`:`hsl(${Dt.lang.round(e)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(n)}%)`}},rg=wm,Cm={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=Cm.colors[t];if(e)return Q0.parse(e)},stringify:t=>{const e=Q0.stringify(t);for(const r in Cm.colors)if(Cm.colors[r]===e)return r}},UC=Cm,ZL={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(e!==114&&e!==82)return;const r=t.match(ZL.re);if(!r)return;const[,n,i,a,o,s,l,u,h]=r;return My.set({r:Dt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Dt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?Dt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Dt.lang.round(e)}, ${Dt.lang.round(r)}, ${Dt.lang.round(n)}, ${Dt.lang.round(i)})`:`rgb(${Dt.lang.round(e)}, ${Dt.lang.round(r)}, ${Dt.lang.round(n)})`}},ng=ZL,bj={format:{keyword:UC,hex:Q0,rgb:ng,rgba:ng,hsl:rg,hsla:rg},parse:t=>{if(typeof t!="string")return t;const e=Q0.parse(t)||ng.parse(t)||rg.parse(t)||UC.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Sn.HSL)||t.data.r===void 0?rg.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ng.stringify(t):Q0.stringify(t)},oo=bj,Sj=(t,e)=>{const r=oo.parse(t);for(const n in e)r[n]=Dt.channel.clamp[n](e[n]);return oo.stringify(r)},jL=Sj,wj=(t,e,r=0,n=1)=>{if(typeof t!="number")return jL(t,{a:e});const i=My.set({r:Dt.channel.clamp.r(t),g:Dt.channel.clamp.g(e),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(n)});return oo.stringify(i)},ed=wj,Cj=t=>{const{r:e,g:r,b:n}=oo.parse(t),i=.2126*Dt.channel.toLinear(e)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(n);return Dt.lang.round(i)},Aj=Cj,Tj=t=>Aj(t)>=.5,kj=Tj,Dj=t=>!kj(t),fp=Dj,Mj=(t,e,r)=>{const n=oo.parse(t),i=n[e],a=Dt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),oo.stringify(n)},KL=Mj,Lj=(t,e)=>KL(t,"l",e),vt=Lj,Ej=(t,e)=>KL(t,"l",-e),wt=Ej,Ij=(t,e)=>{const r=oo.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return jL(t,n)},ge=Ij,Bj=(t,e,r=50)=>{const{r:n,g:i,b:a,a:o}=oo.parse(t),{r:s,g:l,b:u,a:h}=oo.parse(e),c=r/100,f=c*2-1,d=o-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-g,y=n*g+s*m,b=i*g+l*m,w=a*g+u*m,T=o*c+h*(1-c);return ed(y,b,w,T)},Pj=Bj,Rj=(t,e=100)=>{const r=oo.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Pj(r,t,e)},Ue=Rj,Lo={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ft={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},rS=function(t="fatal"){let e=Lo.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Lo&&(e=Lo[t])):typeof t=="number"&&(e=t),ft.trace=()=>{},ft.debug=()=>{},ft.info=()=>{},ft.warn=()=>{},ft.error=()=>{},ft.fatal=()=>{},e<=Lo.fatal&&(ft.fatal=console.error?console.error.bind(console,Li("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Li("FATAL"))),e<=Lo.error&&(ft.error=console.error?console.error.bind(console,Li("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Li("ERROR"))),e<=Lo.warn&&(ft.warn=console.warn?console.warn.bind(console,Li("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Li("WARN"))),e<=Lo.info&&(ft.info=console.info?console.info.bind(console,Li("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Li("INFO"))),e<=Lo.debug&&(ft.debug=console.debug?console.debug.bind(console,Li("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Li("DEBUG"))),e<=Lo.trace&&(ft.trace=console.debug?console.debug.bind(console,Li("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Li("TRACE")))},Li=t=>`%c${tV().format("ss.SSS")} : ${t} : `,Ly=//gi,Fj=t=>t?QL(t).replace(/\\n/g,"#br#").split("#br#"):[""],JL=t=>f1.sanitize(t),YC=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=JL(t):n!=="loose"&&(t=QL(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Vj(t))}return t},Dd=(t,e)=>t&&(e.dompurifyConfig?t=f1.sanitize(YC(t,e),e.dompurifyConfig).toString():t=f1.sanitize(YC(t,e),{FORBID_TAGS:["style"]}).toString(),t),Oj=(t,e)=>typeof t=="string"?Dd(t,e):t.flat().map(r=>Dd(r,e)),Nj=t=>Ly.test(t),zj=t=>t.split(Ly),Vj=t=>t.replace(/#br#/g,"
"),QL=t=>t.replace(Ly,"#br#"),$j=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},eE=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Gj=function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},Hj=function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},qj=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return qj(r)}else return e},nS={getRows:Fj,sanitizeText:Dd,sanitizeTextOrArray:Oj,hasBreaks:Nj,splitBreaks:zj,lineBreakRegex:Ly,removeScript:JL,getUrl:$j,evaluate:eE,getMax:Gj,getMin:Hj},Gn=(t,e)=>e?ge(t,{s:-40,l:10}):ge(t,{s:-40,l:-10}),Ey="#ffffff",Iy="#f2f2f2";let Wj=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Gn(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Gn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Gn(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Gn(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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?wt(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||wt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Ue(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||vt(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const Uj=t=>{const e=new Wj;return e.calculate(t),e};let Yj=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=vt(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Ue(this.background),this.secondaryBorderColor=Gn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=vt(Ue("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=ed(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=wt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=wt(this.sectionBkgColor,10),this.taskBorderColor=ed(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ed(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(){this.secondBkg=vt(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=vt(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=vt(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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330});for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const Xj=t=>{const e=new Yj;return e.calculate(t),e};let Zj=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ge(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Gn(this.primaryColor,this.darkMode),this.secondaryBorderColor=Gn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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=ed(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||wt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||wt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const jj=t=>{const e=new Zj;return e.calculate(t),e};let Kj=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=vt("#cde498",10),this.primaryBorderColor=Gn(this.primaryColor,this.darkMode),this.secondaryBorderColor=Gn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.primaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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(){this.actorBorder=wt(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||wt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||wt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const Jj=t=>{const e=new Kj;return e.calculate(t),e};class Qj{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=vt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Gn(this.primaryColor,this.darkMode),this.secondaryBorderColor=Gn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Gn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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(){this.secondBkg=vt(this.contrast,55),this.border2=this.contrast,this.actorBorder=vt(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 e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const eK=t=>{const e=new Qj;return e.calculate(t),e},$o={base:{getThemeVariables:Uj},dark:{getThemeVariables:Xj},default:{getThemeVariables:jj},forest:{getThemeVariables:Jj},neutral:{getThemeVariables:eK}},bs={flowchart:{useMaxWidth:!0,titleTopMargin:25,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},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,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:""},theme:"default",maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,fontSize:16},tE={...bs,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:$o.default.getThemeVariables(),sequence:{...bs.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:{...bs.gantt,tickInterval:void 0,useWidth:void 0},c4:{...bs.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:{...bs.pie,useWidth:984},requirement:{...bs.requirement,useWidth:void 0},gitGraph:{...bs.gitGraph,useMaxWidth:!1},sankey:{...bs.sankey,useMaxWidth:!1}},rE=(t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...rE(t[n],"")]:[...r,e+n],[]),tK=new Set(rE(tE,"")),rK=tE,nE=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Am=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,nK=/\s*%%.*\n/gm;class iE extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const zc={},By=function(t,e){t=t.replace(nE,"").replace(Am,"").replace(nK,` -`);for(const[r,{detector:n}]of Object.entries(zc))if(n(t,e))return r;throw new iE(`No diagram type detected matching given configuration for text: ${t}`)},aE=(...t)=>{for(const{id:e,detector:r,loader:n}of t)oE(e,r,n)},oE=(t,e,r)=>{zc[t]?ft.error(`Detector with key ${t} already exists`):zc[t]={detector:e,loader:r},ft.debug(`Detector with key ${t} added${r?" with loader":""}`)},iK=t=>zc[t].loader,V4=(t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>V4(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=V4(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},Cn=V4,aK="​",oK={curveBasis:kZ,curveBasisClosed:DZ,curveBasisOpen:MZ,curveBumpX:AZ,curveBumpY:TZ,curveBundle:LZ,curveCardinalClosed:IZ,curveCardinalOpen:BZ,curveCardinal:EZ,curveCatmullRomClosed:RZ,curveCatmullRomOpen:FZ,curveCatmullRom:PZ,curveLinear:CZ,curveLinearClosed:OZ,curveMonotoneX:NZ,curveMonotoneY:zZ,curveNatural:VZ,curveStep:$Z,curveStepAfter:HZ,curveStepBefore:GZ},sK=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,lK=function(t,e){const r=sE(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const a=r.map(o=>o.args);Md(a),n=Cn(n,[...a])}else n=r.args;if(!n)return;let i=By(t,e);return["config"].forEach(a=>{n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a])}),n},sE=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${sK.source})(?=[}][%]{2}).* +`)),o+=c+n[l+1]}),o}var aL={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=t.BLANK_URL=void 0;var e=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,n=/&(newline|tab);/gi,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^.+(:|:)/gim,o=[".","/"];t.BLANK_URL="about:blank";function s(h){return o.indexOf(h[0])>-1}function l(h){var c=h.replace(i,"");return c.replace(r,function(f,d){return String.fromCharCode(d)})}function u(h){if(!h)return t.BLANK_URL;var c=l(h).replace(n,"").replace(i,"").trim();if(!c)return t.BLANK_URL;if(s(c))return c;var f=c.match(a);if(!f)return c;var d=f[0];return e.test(d)?t.BLANK_URL:c}t.sanitizeUrl=u})(aL);var fU={value:()=>{}};function oL(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}ym.prototype=oL.prototype={constructor:ym,on:function(t,e){var r=this._,n=dU(t+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),yC.hasOwnProperty(e)?{space:yC[e],local:t}:t}function vU(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===I4&&e.documentElement.namespaceURI===I4?e.createElement(t):e.createElementNS(r,t)}}function gU(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function sL(t){var e=Ay(t);return(e.local?gU:vU)(e)}function mU(){}function q3(t){return t==null?mU:function(){return this.querySelector(t)}}function yU(t){typeof t!="function"&&(t=q3(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=w&&(w=b+1);!(M=m[w])&&++w=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function HU(t){t||(t=qU);function e(c,f){return c&&f?t(c.__data__,f.__data__):!c-!f}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}function WU(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function UU(){return Array.from(this)}function YU(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?iY:typeof e=="function"?oY:aY)(t,e,r??"")):Nc(this.node(),t)}function Nc(t,e){return t.style.getPropertyValue(e)||fL(t).getComputedStyle(t,null).getPropertyValue(e)}function lY(t){return function(){delete this[t]}}function uY(t,e){return function(){this[t]=e}}function hY(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function cY(t,e){return arguments.length>1?this.each((e==null?lY:typeof e=="function"?hY:uY)(t,e)):this.node()[t]}function dL(t){return t.trim().split(/^|\s+/)}function W3(t){return t.classList||new pL(t)}function pL(t){this._node=t,this._names=dL(t.getAttribute("class")||"")}pL.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function vL(t,e){for(var r=W3(t),n=-1,i=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function zY(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Jv(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Jv(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=XY.exec(t))?new ai(e[1],e[2],e[3],1):(e=ZY.exec(t))?new ai(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=jY.exec(t))?Jv(e[1],e[2],e[3],e[4]):(e=KY.exec(t))?Jv(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=JY.exec(t))?AC(e[1],e[2]/100,e[3]/100,1):(e=QY.exec(t))?AC(e[1],e[2]/100,e[3]/100,e[4]):_C.hasOwnProperty(t)?SC(_C[t]):t==="transparent"?new ai(NaN,NaN,NaN,0):null}function SC(t){return new ai(t>>16&255,t>>8&255,t&255,1)}function Jv(t,e,r,n){return n<=0&&(t=e=r=NaN),new ai(t,e,r,n)}function rX(t){return t instanceof fp||(t=kd(t)),t?(t=t.rgb(),new ai(t.r,t.g,t.b,t.opacity)):new ai}function B4(t,e,r,n){return arguments.length===1?rX(t):new ai(t,e,r,n??1)}function ai(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}U3(ai,B4,_L(fp,{brighter(t){return t=t==null?i1:Math.pow(i1,t),new ai(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ad:Math.pow(Ad,t),new ai(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ai(Bu(this.r),Bu(this.g),Bu(this.b),a1(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:wC,formatHex:wC,formatHex8:nX,formatRgb:CC,toString:CC}));function wC(){return`#${Cu(this.r)}${Cu(this.g)}${Cu(this.b)}`}function nX(){return`#${Cu(this.r)}${Cu(this.g)}${Cu(this.b)}${Cu((isNaN(this.opacity)?1:this.opacity)*255)}`}function CC(){const t=a1(this.opacity);return`${t===1?"rgb(":"rgba("}${Bu(this.r)}, ${Bu(this.g)}, ${Bu(this.b)}${t===1?")":`, ${t})`}`}function a1(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Bu(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Cu(t){return t=Bu(t),(t<16?"0":"")+t.toString(16)}function AC(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new fa(t,e,r,n)}function xL(t){if(t instanceof fa)return new fa(t.h,t.s,t.l,t.opacity);if(t instanceof fp||(t=kd(t)),!t)return new fa;if(t instanceof fa)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(e===a?o=(r-n)/s+(r0&&l<1?0:o,new fa(o,s,l,t.opacity)}function iX(t,e,r,n){return arguments.length===1?xL(t):new fa(t,e,r,n??1)}function fa(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}U3(fa,iX,_L(fp,{brighter(t){return t=t==null?i1:Math.pow(i1,t),new fa(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ad:Math.pow(Ad,t),new fa(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ai(M_(t>=240?t-240:t+120,i,n),M_(t,i,n),M_(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new fa(TC(this.h),Qv(this.s),Qv(this.l),a1(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=a1(this.opacity);return`${t===1?"hsl(":"hsla("}${TC(this.h)}, ${Qv(this.s)*100}%, ${Qv(this.l)*100}%${t===1?")":`, ${t})`}`}}));function TC(t){return t=(t||0)%360,t<0?t+360:t}function Qv(t){return Math.max(0,Math.min(1,t||0))}function M_(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Y3=t=>()=>t;function bL(t,e){return function(r){return t+r*e}}function aX(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function j3e(t,e){var r=e-t;return r?bL(t,r>180||r<-180?r-360*Math.round(r/360):r):Y3(isNaN(t)?e:t)}function oX(t){return(t=+t)==1?SL:function(e,r){return r-e?aX(e,r,t):Y3(isNaN(e)?r:e)}}function SL(t,e){var r=e-t;return r?bL(t,r):Y3(isNaN(t)?e:t)}const kC=function t(e){var r=oX(e);function n(i,a){var o=r((i=B4(i)).r,(a=B4(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=SL(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=s(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);function Ns(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var P4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,L_=new RegExp(P4.source,"g");function sX(t){return function(){return t}}function lX(t){return function(e){return t(e)+""}}function uX(t,e){var r=P4.lastIndex=L_.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(t=t+"",e=e+"";(n=P4.exec(t))&&(i=L_.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:Ns(n,i)})),r=L_.lastIndex;return r180?h+=360:h-u>180&&(u+=360),f.push({i:c.push(i(c)+"rotate(",null,n)-2,x:Ns(u,h)})):h&&c.push(i(c)+"rotate("+h+n)}function s(u,h,c,f){u!==h?f.push({i:c.push(i(c)+"skewX(",null,n)-2,x:Ns(u,h)}):h&&c.push(i(c)+"skewX("+h+n)}function l(u,h,c,f,d,v){if(u!==c||h!==f){var g=d.push(i(d)+"scale(",null,",",null,")");v.push({i:g-4,x:Ns(u,c)},{i:g-2,x:Ns(h,f)})}else(c!==1||f!==1)&&d.push(i(d)+"scale("+c+","+f+")")}return function(u,h){var c=[],f=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,c,f),o(u.rotate,h.rotate,c,f),s(u.skewX,h.skewX,c,f),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,c,f),u=h=null,function(d){for(var v=-1,g=f.length,m;++v=0&&t._call.call(void 0,e),t=t._next;--zc}function MC(){Yu=(s1=Dd.now())+Ty,zc=N0=0;try{vX()}finally{zc=0,mX(),Yu=0}}function gX(){var t=Dd.now(),e=t-s1;e>AL&&(Ty-=e,s1=t)}function mX(){for(var t,e=o1,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:o1=r);z0=t,F4(n)}function F4(t){if(!zc){N0&&(N0=clearTimeout(N0));var e=t-Yu;e>24?(t<1/0&&(N0=setTimeout(MC,t-Dd.now()-Ty)),t0&&(t0=clearInterval(t0))):(t0||(s1=Dd.now(),t0=setInterval(gX,AL)),zc=1,TL(MC))}}function LC(t,e,r){var n=new l1;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var yX=oL("start","end","cancel","interrupt"),_X=[],DL=0,EC=1,O4=2,_m=3,IC=4,N4=5,xm=6;function ky(t,e,r,n,i,a){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;xX(t,r,{name:e,index:n,group:i,on:yX,tween:_X,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:DL})}function Z3(t,e){var r=wa(t,e);if(r.state>DL)throw new Error("too late; already scheduled");return r}function vo(t,e){var r=wa(t,e);if(r.state>_m)throw new Error("too late; already running");return r}function wa(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function xX(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=kL(a,0,r.time);function a(u){r.state=EC,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var h,c,f,d;if(r.state!==EC)return l();for(h in n)if(d=n[h],d.name===r.name){if(d.state===_m)return LC(o);d.state===IC?(d.state=xm,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+hO4&&n.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function KX(t,e,r){var n,i,a=jX(e)?Z3:vo;return function(){var o=a(this,t),s=o.on;s!==n&&(i=(n=s).copy()).on(e,r),o.on=i}}function JX(t,e){var r=this._id;return arguments.length<2?wa(this.node(),r).on.on(t):this.each(KX(r,t,e))}function QX(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function eZ(){return this.on("end.remove",QX(this._id))}function tZ(t){var e=this._name,r=this._id;typeof t!="function"&&(t=q3(t));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o1?0:t<-1?K3:Math.acos(t)}function oSe(t){return t>=1?PC:t<=-1?-PC:Math.asin(t)}function IL(t){this._context=t}IL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function TZ(t){return new IL(t)}class BL{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function kZ(t){return new BL(t,!0)}function DZ(t){return new BL(t,!1)}function nl(){}function u1(t,e,r){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+r)/6)}function Dy(t){this._context=t}Dy.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:u1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:u1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function MZ(t){return new Dy(t)}function PL(t){this._context=t}PL.prototype={areaStart:nl,areaEnd:nl,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);break}}},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:u1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function LZ(t){return new PL(t)}function RL(t){this._context=t}RL.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||this._line!==0&&this._point===3)&&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 r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:u1(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function EZ(t){return new RL(t)}function FL(t,e){this._basis=new Dy(t),this._beta=e}FL.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,o=e[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*t[s]+(1-this._beta)*(n+l*a),this._beta*e[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const IZ=function t(e){function r(n){return e===1?new Dy(n):new FL(n,e)}return r.beta=function(n){return t(+n)},r}(.85);function h1(t,e,r){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-r),t._x2,t._y2)}function J3(t,e){this._context=t,this._k=(1-e)/6}J3.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:h1(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:h1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const BZ=function t(e){function r(n){return new J3(n,e)}return r.tension=function(n){return t(+n)},r}(0);function Q3(t,e){this._context=t,this._k=(1-e)/6}Q3.prototype={areaStart:nl,areaEnd:nl,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);break}}},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:h1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const PZ=function t(e){function r(n){return new Q3(n,e)}return r.tension=function(n){return t(+n)},r}(0);function eS(t,e){this._context=t,this._k=(1-e)/6}eS.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||this._line!==0&&this._point===3)&&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:h1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const RZ=function t(e){function r(n){return new eS(n,e)}return r.tension=function(n){return t(+n)},r}(0);function tS(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>BC){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);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>BC){var u=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);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function OL(t,e){this._context=t,this._alpha=e}OL.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:tS(this,t,e);break}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 FZ=function t(e){function r(n){return e?new OL(n,e):new J3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function NL(t,e){this._context=t,this._alpha=e}NL.prototype={areaStart:nl,areaEnd:nl,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);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:tS(this,t,e);break}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 OZ=function t(e){function r(n){return e?new NL(n,e):new Q3(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function zL(t,e){this._context=t,this._alpha=e}zL.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:tS(this,t,e);break}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 NZ=function t(e){function r(n){return e?new zL(n,e):new eS(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function VL(t){this._context=t}VL.prototype={areaStart:nl,areaEnd:nl,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))}};function zZ(t){return new VL(t)}function RC(t){return t<0?-1:1}function FC(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(RC(a)+RC(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function OC(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function E_(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function c1(t){this._context=t}c1.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:E_(this,this._t0,OC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(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,E_(this,OC(this,r=FC(this,t,e)),r);break;default:E_(this,this._t0,r=FC(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function $L(t){this._context=new GL(t)}($L.prototype=Object.create(c1.prototype)).point=function(t,e){c1.prototype.point.call(this,e,t)};function GL(t){this._context=t}GL.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,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function VZ(t){return new c1(t)}function $Z(t){return new $L(t)}function HL(t){this._context=t}HL.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,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=NC(t),i=NC(e),a=0,o=1;o=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=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 r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function HZ(t){return new My(t,.5)}function qZ(t){return new My(t,0)}function WZ(t){return new My(t,1)}function V0(t,e,r){this.k=t,this.x=e,this.y=r}V0.prototype={constructor:V0,scale:function(t){return t===1?this:new V0(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new V0(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+")"}};V0.prototype;/*! @license DOMPurify 3.0.5 | (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.5/LICENSE */const{entries:qL,setPrototypeOf:zC,isFrozen:UZ,getPrototypeOf:YZ,getOwnPropertyDescriptor:XZ}=Object;let{freeze:Wn,seal:ya,create:ZZ}=Object,{apply:z4,construct:V4}=typeof Reflect<"u"&&Reflect;z4||(z4=function(e,r,n){return e.apply(r,n)});Wn||(Wn=function(e){return e});ya||(ya=function(e){return e});V4||(V4=function(e,r){return new e(...r)});const jZ=Yi(Array.prototype.forEach),VC=Yi(Array.prototype.pop),r0=Yi(Array.prototype.push),bm=Yi(String.prototype.toLowerCase),I_=Yi(String.prototype.toString),KZ=Yi(String.prototype.match),aa=Yi(String.prototype.replace),JZ=Yi(String.prototype.indexOf),QZ=Yi(String.prototype.trim),mi=Yi(RegExp.prototype.test),n0=ej(TypeError);function Yi(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i/gm),aj=ya(/\${[\w\W]*}/gm),oj=ya(/^data-[\-\w.\u00B7-\uFFFF]/),sj=ya(/^aria-[\-\w]+$/),WL=ya(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lj=ya(/^(?:\w+script|data):/i),uj=ya(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),UL=ya(/^html$/i);var WC=Object.freeze({__proto__:null,MUSTACHE_EXPR:nj,ERB_EXPR:ij,TMPLIT_EXPR:aj,DATA_ATTR:oj,ARIA_ATTR:sj,IS_ALLOWED_URI:WL,IS_SCRIPT_OR_DATA:lj,ATTR_WHITESPACE:uj,DOCTYPE_NAME:UL});const hj=()=>typeof window>"u"?null:window,cj=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function YL(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hj();const e=at=>YL(at);if(e.version="3.0.5",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;const r=t.document,n=r.currentScript;let{document:i}=t;const{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:u,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:c,DOMParser:f,trustedTypes:d}=t,v=l.prototype,g=tg(v,"cloneNode"),m=tg(v,"nextSibling"),y=tg(v,"childNodes"),b=tg(v,"parentNode");if(typeof o=="function"){const at=i.createElement("template");at.content&&at.content.ownerDocument&&(i=at.content.ownerDocument)}let w,T="";const{implementation:M,createNodeIterator:D,createDocumentFragment:P,getElementsByTagName:O}=i,{importNode:V}=r;let $={};e.isSupported=typeof qL=="function"&&typeof b=="function"&&M&&M.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:j,TMPLIT_EXPR:q,DATA_ATTR:G,ARIA_ATTR:J,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:se}=WC;let{IS_ALLOWED_URI:ae}=WC,ce=null;const ye=Ot({},[...$C,...B_,...P_,...R_,...GC]);let de=null;const De=Ot({},[...HC,...F_,...qC,...rg]);let Ie=Object.seal(Object.create(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}})),Pe=null,Qe=null,Ke=!0,et=!0,qe=!1,lt=!0,it=!1,Re=!1,Ae=!1,Xt=!1,ht=!1,Zt=!1,Mt=!1,Ar=!0,dr=!1;const Kt="user-content-";let Mn=!0,Hr=!1,Ln={},tn=null;const yo=Ot({},["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 ml=null;const hh=Ot({},["audio","video","img","source","image","track"]);let ss=null;const yl=Ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_o="http://www.w3.org/1998/Math/MathML",xo="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml";let Ta=rn,ls=!1,ir=null;const Ve=Ot({},[_o,xo,rn],I_);let jr;const ch=["application/xhtml+xml","text/html"],fh="text/html";let yr,Xn=null;const us=i.createElement("form"),_l=function(oe){return oe instanceof RegExp||oe instanceof Function},Ai=function(oe){if(!(Xn&&Xn===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=Xh(oe),jr=ch.indexOf(oe.PARSER_MEDIA_TYPE)===-1?jr=fh:jr=oe.PARSER_MEDIA_TYPE,yr=jr==="application/xhtml+xml"?I_:bm,ce="ALLOWED_TAGS"in oe?Ot({},oe.ALLOWED_TAGS,yr):ye,de="ALLOWED_ATTR"in oe?Ot({},oe.ALLOWED_ATTR,yr):De,ir="ALLOWED_NAMESPACES"in oe?Ot({},oe.ALLOWED_NAMESPACES,I_):Ve,ss="ADD_URI_SAFE_ATTR"in oe?Ot(Xh(yl),oe.ADD_URI_SAFE_ATTR,yr):yl,ml="ADD_DATA_URI_TAGS"in oe?Ot(Xh(hh),oe.ADD_DATA_URI_TAGS,yr):hh,tn="FORBID_CONTENTS"in oe?Ot({},oe.FORBID_CONTENTS,yr):yo,Pe="FORBID_TAGS"in oe?Ot({},oe.FORBID_TAGS,yr):{},Qe="FORBID_ATTR"in oe?Ot({},oe.FORBID_ATTR,yr):{},Ln="USE_PROFILES"in oe?oe.USE_PROFILES:!1,Ke=oe.ALLOW_ARIA_ATTR!==!1,et=oe.ALLOW_DATA_ATTR!==!1,qe=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,lt=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=oe.SAFE_FOR_TEMPLATES||!1,Re=oe.WHOLE_DOCUMENT||!1,ht=oe.RETURN_DOM||!1,Zt=oe.RETURN_DOM_FRAGMENT||!1,Mt=oe.RETURN_TRUSTED_TYPE||!1,Xt=oe.FORCE_BODY||!1,Ar=oe.SANITIZE_DOM!==!1,dr=oe.SANITIZE_NAMED_PROPS||!1,Mn=oe.KEEP_CONTENT!==!1,Hr=oe.IN_PLACE||!1,ae=oe.ALLOWED_URI_REGEXP||WL,Ta=oe.NAMESPACE||rn,Ie=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&_l(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ie.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&_l(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ie.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ie.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),it&&(et=!1),Zt&&(ht=!0),Ln&&(ce=Ot({},[...GC]),de=[],Ln.html===!0&&(Ot(ce,$C),Ot(de,HC)),Ln.svg===!0&&(Ot(ce,B_),Ot(de,F_),Ot(de,rg)),Ln.svgFilters===!0&&(Ot(ce,P_),Ot(de,F_),Ot(de,rg)),Ln.mathMl===!0&&(Ot(ce,R_),Ot(de,qC),Ot(de,rg))),oe.ADD_TAGS&&(ce===ye&&(ce=Xh(ce)),Ot(ce,oe.ADD_TAGS,yr)),oe.ADD_ATTR&&(de===De&&(de=Xh(de)),Ot(de,oe.ADD_ATTR,yr)),oe.ADD_URI_SAFE_ATTR&&Ot(ss,oe.ADD_URI_SAFE_ATTR,yr),oe.FORBID_CONTENTS&&(tn===yo&&(tn=Xh(tn)),Ot(tn,oe.FORBID_CONTENTS,yr)),Mn&&(ce["#text"]=!0),Re&&Ot(ce,["html","head","body"]),ce.table&&(Ot(ce,["tbody"]),delete Pe.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw n0('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw n0('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=oe.TRUSTED_TYPES_POLICY,T=w.createHTML("")}else w===void 0&&(w=cj(d,n)),w!==null&&typeof T=="string"&&(T=w.createHTML(""));Wn&&Wn(oe),Xn=oe}},nn=Ot({},["mi","mo","mn","ms","mtext"]),gn=Ot({},["foreignobject","desc","title","annotation-xml"]),ci=Ot({},["title","style","font","a","script"]),mn=Ot({},B_);Ot(mn,P_),Ot(mn,tj);const hs=Ot({},R_);Ot(hs,rj);const gf=function(oe){let ke=b(oe);(!ke||!ke.tagName)&&(ke={namespaceURI:Ta,tagName:"template"});const $e=bm(oe.tagName),Ht=bm(ke.tagName);return ir[oe.namespaceURI]?oe.namespaceURI===xo?ke.namespaceURI===rn?$e==="svg":ke.namespaceURI===_o?$e==="svg"&&(Ht==="annotation-xml"||nn[Ht]):!!mn[$e]:oe.namespaceURI===_o?ke.namespaceURI===rn?$e==="math":ke.namespaceURI===xo?$e==="math"&&gn[Ht]:!!hs[$e]:oe.namespaceURI===rn?ke.namespaceURI===xo&&!gn[Ht]||ke.namespaceURI===_o&&!nn[Ht]?!1:!hs[$e]&&(ci[$e]||!mn[$e]):!!(jr==="application/xhtml+xml"&&ir[oe.namespaceURI]):!1},ea=function(oe){r0(e.removed,{element:oe});try{oe.parentNode.removeChild(oe)}catch{oe.remove()}},xl=function(oe,ke){try{r0(e.removed,{attribute:ke.getAttributeNode(oe),from:ke})}catch{r0(e.removed,{attribute:null,from:ke})}if(ke.removeAttribute(oe),oe==="is"&&!de[oe])if(ht||Zt)try{ea(ke)}catch{}else try{ke.setAttribute(oe,"")}catch{}},ka=function(oe){let ke,$e;if(Xt)oe=""+oe;else{const _r=KZ(oe,/^[\r\n\t ]+/);$e=_r&&_r[0]}jr==="application/xhtml+xml"&&Ta===rn&&(oe=''+oe+"");const Ht=w?w.createHTML(oe):oe;if(Ta===rn)try{ke=new f().parseFromString(Ht,jr)}catch{}if(!ke||!ke.documentElement){ke=M.createDocument(Ta,"template",null);try{ke.documentElement.innerHTML=ls?T:Ht}catch{}}const ne=ke.body||ke.documentElement;return oe&&$e&&ne.insertBefore(i.createTextNode($e),ne.childNodes[0]||null),Ta===rn?O.call(ke,Re?"html":"body")[0]:Re?ke.documentElement:ne},ar=function(oe){return D.call(oe.ownerDocument||oe,oe,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},B=function(oe){return oe instanceof c&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof h)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},N=function(oe){return typeof s=="object"?oe instanceof s:oe&&typeof oe=="object"&&typeof oe.nodeType=="number"&&typeof oe.nodeName=="string"},Me=function(oe,ke,$e){$[oe]&&jZ($[oe],Ht=>{Ht.call(e,ke,$e,Xn)})},Z=function(oe){let ke;if(Me("beforeSanitizeElements",oe,null),B(oe))return ea(oe),!0;const $e=yr(oe.nodeName);if(Me("uponSanitizeElement",oe,{tagName:$e,allowedTags:ce}),oe.hasChildNodes()&&!N(oe.firstElementChild)&&(!N(oe.content)||!N(oe.content.firstElementChild))&&mi(/<[/\w]/g,oe.innerHTML)&&mi(/<[/\w]/g,oe.textContent))return ea(oe),!0;if(!ce[$e]||Pe[$e]){if(!Pe[$e]&&rr($e)&&(Ie.tagNameCheck instanceof RegExp&&mi(Ie.tagNameCheck,$e)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck($e)))return!1;if(Mn&&!tn[$e]){const Ht=b(oe)||oe.parentNode,ne=y(oe)||oe.childNodes;if(ne&&Ht){const _r=ne.length;for(let he=_r-1;he>=0;--he)Ht.insertBefore(g(ne[he],!0),m(oe))}}return ea(oe),!0}return oe instanceof l&&!gf(oe)||($e==="noscript"||$e==="noembed"||$e==="noframes")&&mi(/<\/no(script|embed|frames)/i,oe.innerHTML)?(ea(oe),!0):(it&&oe.nodeType===3&&(ke=oe.textContent,ke=aa(ke,H," "),ke=aa(ke,j," "),ke=aa(ke,q," "),oe.textContent!==ke&&(r0(e.removed,{element:oe.cloneNode()}),oe.textContent=ke)),Me("afterSanitizeElements",oe,null),!1)},ie=function(oe,ke,$e){if(Ar&&(ke==="id"||ke==="name")&&($e in i||$e in us))return!1;if(!(et&&!Qe[ke]&&mi(G,ke))){if(!(Ke&&mi(J,ke))){if(!de[ke]||Qe[ke]){if(!(rr(oe)&&(Ie.tagNameCheck instanceof RegExp&&mi(Ie.tagNameCheck,oe)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(oe))&&(Ie.attributeNameCheck instanceof RegExp&&mi(Ie.attributeNameCheck,ke)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(ke))||ke==="is"&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&mi(Ie.tagNameCheck,$e)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck($e))))return!1}else if(!ss[ke]){if(!mi(ae,aa($e,se,""))){if(!((ke==="src"||ke==="xlink:href"||ke==="href")&&oe!=="script"&&JZ($e,"data:")===0&&ml[oe])){if(!(qe&&!mi(K,aa($e,se,"")))){if($e)return!1}}}}}}return!0},rr=function(oe){return oe.indexOf("-")>0},je=function(oe){let ke,$e,Ht,ne;Me("beforeSanitizeAttributes",oe,null);const{attributes:_r}=oe;if(!_r)return;const he={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:de};for(ne=_r.length;ne--;){ke=_r[ne];const{name:Kr,namespaceURI:Da}=ke;if($e=Kr==="value"?ke.value:QZ(ke.value),Ht=yr(Kr),he.attrName=Ht,he.attrValue=$e,he.keepAttr=!0,he.forceKeepAttr=void 0,Me("uponSanitizeAttribute",oe,he),$e=he.attrValue,he.forceKeepAttr||(xl(Kr,oe),!he.keepAttr))continue;if(!lt&&mi(/\/>/i,$e)){xl(Kr,oe);continue}it&&($e=aa($e,H," "),$e=aa($e,j," "),$e=aa($e,q," "));const cs=yr(oe.nodeName);if(ie(cs,Ht,$e)){if(dr&&(Ht==="id"||Ht==="name")&&(xl(Kr,oe),$e=Kt+$e),w&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Da)switch(d.getAttributeType(cs,Ht)){case"TrustedHTML":{$e=w.createHTML($e);break}case"TrustedScriptURL":{$e=w.createScriptURL($e);break}}try{Da?oe.setAttributeNS(Da,Kr,$e):oe.setAttribute(Kr,$e),VC(e.removed)}catch{}}}Me("afterSanitizeAttributes",oe,null)},qr=function at(oe){let ke;const $e=ar(oe);for(Me("beforeSanitizeShadowDOM",oe,null);ke=$e.nextNode();)Me("uponSanitizeShadowNode",ke,null),!Z(ke)&&(ke.content instanceof a&&at(ke.content),je(ke));Me("afterSanitizeShadowDOM",oe,null)};return e.sanitize=function(at){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ke,$e,Ht,ne;if(ls=!at,ls&&(at=""),typeof at!="string"&&!N(at))if(typeof at.toString=="function"){if(at=at.toString(),typeof at!="string")throw n0("dirty is not a string, aborting")}else throw n0("toString is not a function");if(!e.isSupported)return at;if(Ae||Ai(oe),e.removed=[],typeof at=="string"&&(Hr=!1),Hr){if(at.nodeName){const Kr=yr(at.nodeName);if(!ce[Kr]||Pe[Kr])throw n0("root node is forbidden and cannot be sanitized in-place")}}else if(at instanceof s)ke=ka(""),$e=ke.ownerDocument.importNode(at,!0),$e.nodeType===1&&$e.nodeName==="BODY"||$e.nodeName==="HTML"?ke=$e:ke.appendChild($e);else{if(!ht&&!it&&!Re&&at.indexOf("<")===-1)return w&&Mt?w.createHTML(at):at;if(ke=ka(at),!ke)return ht?null:Mt?T:""}ke&&Xt&&ea(ke.firstChild);const _r=ar(Hr?at:ke);for(;Ht=_r.nextNode();)Z(Ht)||(Ht.content instanceof a&&qr(Ht.content),je(Ht));if(Hr)return at;if(ht){if(Zt)for(ne=P.call(ke.ownerDocument);ke.firstChild;)ne.appendChild(ke.firstChild);else ne=ke;return(de.shadowroot||de.shadowrootmode)&&(ne=V.call(r,ne,!0)),ne}let he=Re?ke.outerHTML:ke.innerHTML;return Re&&ce["!doctype"]&&ke.ownerDocument&&ke.ownerDocument.doctype&&ke.ownerDocument.doctype.name&&mi(UL,ke.ownerDocument.doctype.name)&&(he=" +`+he),it&&(he=aa(he,H," "),he=aa(he,j," "),he=aa(he,q," ")),w&&Mt?w.createHTML(he):he},e.setConfig=function(at){Ai(at),Ae=!0},e.clearConfig=function(){Xn=null,Ae=!1},e.isValidAttribute=function(at,oe,ke){Xn||Ai({});const $e=yr(at),Ht=yr(oe);return ie($e,Ht,ke)},e.addHook=function(at,oe){typeof oe=="function"&&($[at]=$[at]||[],r0($[at],oe))},e.removeHook=function(at){if($[at])return VC($[at])},e.removeHooks=function(at){$[at]&&($[at]=[])},e.removeAllHooks=function(){$={}},e}var f1=YL();const Sm={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,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Sm.hue2rgb(a,i,t+1/3)*255;case"g":return Sm.hue2rgb(a,i,t)*255;case"b":return Sm.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),o=(i+a)/2;if(n==="l")return o*100;if(i===a)return 0;const s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},pj=dj,vj={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},gj=vj,mj={channel:fj,lang:pj,unit:gj},Dt=mj,Bs={};for(let t=0;t<=255;t++)Bs[t]=Dt.unit.dec2hex(t);const wn={ALL:0,RGB:1,HSL:2};class yj{constructor(){this.type=wn.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=wn.ALL}is(e){return this.type===e}}const _j=yj;class xj{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new _j}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=wn.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=Dt.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Dt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Dt.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=Dt.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Dt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Dt.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(wn.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(wn.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(wn.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(wn.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(wn.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(wn.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(wn.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(wn.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(wn.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(wn.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(wn.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(wn.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const bj=xj,Sj=new bj({r:0,g:0,b:0,a:0},"transparent"),Ly=Sj,XL={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(XL.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,h=o?255:15;return Ly.set({r:(n>>l*(u+3)&h)*s,g:(n>>l*(u+2)&h)*s,b:(n>>l*(u+1)&h)*s,a:a?(n&h)*s/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${Bs[Math.round(e)]}${Bs[Math.round(r)]}${Bs[Math.round(n)]}${Bs[Math.round(i*255)]}`:`#${Bs[Math.round(e)]}${Bs[Math.round(r)]}${Bs[Math.round(n)]}`}},ed=XL,wm={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(wm.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(wm.re);if(!r)return;const[,n,i,a,o,s]=r;return Ly.set({h:wm._hue2deg(n),s:Dt.channel.clamp.s(parseFloat(i)),l:Dt.channel.clamp.l(parseFloat(a)),a:o?Dt.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${Dt.lang.round(e)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(n)}%, ${i})`:`hsl(${Dt.lang.round(e)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(n)}%)`}},ng=wm,Cm={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=Cm.colors[t];if(e)return ed.parse(e)},stringify:t=>{const e=ed.stringify(t);for(const r in Cm.colors)if(Cm.colors[r]===e)return r}},UC=Cm,ZL={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(e!==114&&e!==82)return;const r=t.match(ZL.re);if(!r)return;const[,n,i,a,o,s,l,u,h]=r;return Ly.set({r:Dt.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:Dt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?Dt.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${Dt.lang.round(e)}, ${Dt.lang.round(r)}, ${Dt.lang.round(n)}, ${Dt.lang.round(i)})`:`rgb(${Dt.lang.round(e)}, ${Dt.lang.round(r)}, ${Dt.lang.round(n)})`}},ig=ZL,wj={format:{keyword:UC,hex:ed,rgb:ig,rgba:ig,hsl:ng,hsla:ng},parse:t=>{if(typeof t!="string")return t;const e=ed.parse(t)||ig.parse(t)||ng.parse(t)||UC.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(wn.HSL)||t.data.r===void 0?ng.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ig.stringify(t):ed.stringify(t)},oo=wj,Cj=(t,e)=>{const r=oo.parse(t);for(const n in e)r[n]=Dt.channel.clamp[n](e[n]);return oo.stringify(r)},jL=Cj,Aj=(t,e,r=0,n=1)=>{if(typeof t!="number")return jL(t,{a:e});const i=Ly.set({r:Dt.channel.clamp.r(t),g:Dt.channel.clamp.g(e),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(n)});return oo.stringify(i)},td=Aj,Tj=t=>{const{r:e,g:r,b:n}=oo.parse(t),i=.2126*Dt.channel.toLinear(e)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(n);return Dt.lang.round(i)},kj=Tj,Dj=t=>kj(t)>=.5,Mj=Dj,Lj=t=>!Mj(t),dp=Lj,Ej=(t,e,r)=>{const n=oo.parse(t),i=n[e],a=Dt.channel.clamp[e](i+r);return i!==a&&(n[e]=a),oo.stringify(n)},KL=Ej,Ij=(t,e)=>KL(t,"l",e),vt=Ij,Bj=(t,e)=>KL(t,"l",-e),wt=Bj,Pj=(t,e)=>{const r=oo.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return jL(t,n)},ge=Pj,Rj=(t,e,r=50)=>{const{r:n,g:i,b:a,a:o}=oo.parse(t),{r:s,g:l,b:u,a:h}=oo.parse(e),c=r/100,f=c*2-1,d=o-h,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,m=1-g,y=n*g+s*m,b=i*g+l*m,w=a*g+u*m,T=o*c+h*(1-c);return td(y,b,w,T)},Fj=Rj,Oj=(t,e=100)=>{const r=oo.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Fj(r,t,e)},Ue=Oj,Lo={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},ft={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},rS=function(t="fatal"){let e=Lo.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Lo&&(e=Lo[t])):typeof t=="number"&&(e=t),ft.trace=()=>{},ft.debug=()=>{},ft.info=()=>{},ft.warn=()=>{},ft.error=()=>{},ft.fatal=()=>{},e<=Lo.fatal&&(ft.fatal=console.error?console.error.bind(console,Li("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Li("FATAL"))),e<=Lo.error&&(ft.error=console.error?console.error.bind(console,Li("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Li("ERROR"))),e<=Lo.warn&&(ft.warn=console.warn?console.warn.bind(console,Li("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Li("WARN"))),e<=Lo.info&&(ft.info=console.info?console.info.bind(console,Li("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Li("INFO"))),e<=Lo.debug&&(ft.debug=console.debug?console.debug.bind(console,Li("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Li("DEBUG"))),e<=Lo.trace&&(ft.trace=console.debug?console.debug.bind(console,Li("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Li("TRACE")))},Li=t=>`%c${tV().format("ss.SSS")} : ${t} : `,Ey=//gi,Nj=t=>t?QL(t).replace(/\\n/g,"#br#").split("#br#"):[""],JL=t=>f1.sanitize(t),YC=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=JL(t):n!=="loose"&&(t=QL(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Gj(t))}return t},Md=(t,e)=>t&&(e.dompurifyConfig?t=f1.sanitize(YC(t,e),e.dompurifyConfig).toString():t=f1.sanitize(YC(t,e),{FORBID_TAGS:["style"]}).toString(),t),zj=(t,e)=>typeof t=="string"?Md(t,e):t.flat().map(r=>Md(r,e)),Vj=t=>Ey.test(t),$j=t=>t.split(Ey),Gj=t=>t.replace(/#br#/g,"
"),QL=t=>t.replace(Ey,"#br#"),Hj=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},eE=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),qj=function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},Wj=function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},Uj=function(t){let e=t;if(t.split("~").length-1>=2){let r=e;do e=r,r=e.replace(/~([^\s,:;]+)~/,"<$1>");while(r!=e);return Uj(r)}else return e},nS={getRows:Nj,sanitizeText:Md,sanitizeTextOrArray:zj,hasBreaks:Vj,splitBreaks:$j,lineBreakRegex:Ey,removeScript:JL,getUrl:Hj,evaluate:eE,getMax:qj,getMin:Wj},Hn=(t,e)=>e?ge(t,{s:-40,l:10}):ge(t,{s:-40,l:-10}),Iy="#ffffff",By="#f2f2f2";let Yj=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||ge(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ge(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Hn(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Hn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Hn(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Hn(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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?wt(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||wt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Ue(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||vt(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const Xj=t=>{const e=new Yj;return e.calculate(t),e};let Zj=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=vt(this.primaryColor,16),this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Ue(this.background),this.secondaryBorderColor=Hn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Hn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=vt(Ue("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=td(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=wt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=wt(this.sectionBkgColor,10),this.taskBorderColor=td(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=td(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(){this.secondBkg=vt(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=vt(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=vt(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=ge(this.primaryColor,{h:64}),this.fillType3=ge(this.secondaryColor,{h:64}),this.fillType4=ge(this.primaryColor,{h:-64}),this.fillType5=ge(this.secondaryColor,{h:-64}),this.fillType6=ge(this.primaryColor,{h:128}),this.fillType7=ge(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330});for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const jj=t=>{const e=new Zj;return e.calculate(t),e};let Kj=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ge(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Hn(this.primaryColor,this.darkMode),this.secondaryBorderColor=Hn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Hn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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=td(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||wt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||wt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const Jj=t=>{const e=new Kj;return e.calculate(t),e};let Qj=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=vt("#cde498",10),this.primaryBorderColor=Hn(this.primaryColor,this.darkMode),this.secondaryBorderColor=Hn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Hn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.primaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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(){this.actorBorder=wt(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||ge(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ge(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ge(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ge(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ge(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ge(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ge(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ge(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ge(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||wt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||wt(this.tertiaryColor,40);for(let e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}};const eK=t=>{const e=new Qj;return e.calculate(t),e};class tK{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=vt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ge(this.primaryColor,{h:-160}),this.primaryBorderColor=Hn(this.primaryColor,this.darkMode),this.secondaryBorderColor=Hn(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Hn(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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(){this.secondBkg=vt(this.contrast,55),this.border2=this.contrast,this.actorBorder=vt(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 e=0;e{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const rK=t=>{const e=new tK;return e.calculate(t),e},Ho={base:{getThemeVariables:Xj},dark:{getThemeVariables:jj},default:{getThemeVariables:Jj},forest:{getThemeVariables:eK},neutral:{getThemeVariables:rK}},ws={flowchart:{useMaxWidth:!0,titleTopMargin:25,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},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,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:""},theme:"default",maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,fontSize:16},tE={...ws,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Ho.default.getThemeVariables(),sequence:{...ws.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:{...ws.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ws.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:{...ws.pie,useWidth:984},requirement:{...ws.requirement,useWidth:void 0},gitGraph:{...ws.gitGraph,useMaxWidth:!1},sankey:{...ws.sankey,useMaxWidth:!1}},rE=(t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...rE(t[n],"")]:[...r,e+n],[]),nK=new Set(rE(tE,"")),iK=tE,nE=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Am=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,aK=/\s*%%.*\n/gm;class iE extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}}const Vc={},Py=function(t,e){t=t.replace(nE,"").replace(Am,"").replace(aK,` +`);for(const[r,{detector:n}]of Object.entries(Vc))if(n(t,e))return r;throw new iE(`No diagram type detected matching given configuration for text: ${t}`)},aE=(...t)=>{for(const{id:e,detector:r,loader:n}of t)oE(e,r,n)},oE=(t,e,r)=>{Vc[t]?ft.error(`Detector with key ${t} already exists`):Vc[t]={detector:e,loader:r},ft.debug(`Detector with key ${t} added${r?" with loader":""}`)},oK=t=>Vc[t].loader,$4=(t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>$4(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=$4(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},An=$4,sK="​",lK={curveBasis:MZ,curveBasisClosed:LZ,curveBasisOpen:EZ,curveBumpX:kZ,curveBumpY:DZ,curveBundle:IZ,curveCardinalClosed:PZ,curveCardinalOpen:RZ,curveCardinal:BZ,curveCatmullRomClosed:OZ,curveCatmullRomOpen:NZ,curveCatmullRom:FZ,curveLinear:TZ,curveLinearClosed:zZ,curveMonotoneX:VZ,curveMonotoneY:$Z,curveNatural:GZ,curveStep:HZ,curveStepAfter:WZ,curveStepBefore:qZ},uK=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,hK=function(t,e){const r=sE(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const a=r.map(o=>o.args);Ld(a),n=An(n,[...a])}else n=r.args;if(!n)return;let i=Py(t,e);return["config"].forEach(a=>{n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a])}),n},sE=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${uK.source})(?=[}][%]{2}).* `,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),ft.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n;const i=[];for(;(n=Am.exec(t))!==null;)if(n.index===Am.lastIndex&&Am.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){const a=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:o})}return i.length===0&&i.push({type:t,args:null}),i.length===1?i[0]:i}catch(r){return ft.error(`ERROR: ${r.message} - Unable to parse directive - ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},uK=function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1};function hK(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return oK[r]||e}function cK(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?aL.sanitizeUrl(r):r}const fK=(t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let o=0;o{r+=d1(a,e),e=a});let n=r/2,i;return e=void 0,t.forEach(a=>{if(e&&!i){const o=d1(a,e);if(o=1&&(i={x:a.x,y:a.y}),s>0&&s<1&&(i={x:(1-s)*e.x+s*a.x,y:(1-s)*e.y+s*a.y})}}e=a}),i}function pK(t){return t.length===1?t[0]:dK(t)}const vK=(t,e,r)=>{let n;ft.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let a=25,o;n=void 0,e.forEach(h=>{if(n&&!o){const c=d1(h,n);if(c=1&&(o={x:h.x,y:h.y}),f>0&&f<1&&(o={x:(1-f)*n.x+f*h.x,y:(1-f)*n.y+f*h.y})}}n=h});const s=t?10:5,l=Math.atan2(e[0].y-o.y,e[0].x-o.x),u={x:0,y:0};return u.x=Math.sin(l)*s+(e[0].x+o.x)/2,u.y=-Math.cos(l)*s+(e[0].y+o.y)/2,u};function gK(t,e,r){let n=JSON.parse(JSON.stringify(r)),i;ft.info("our points",n),e!=="start_left"&&e!=="start_right"&&(n=n.reverse()),n.forEach(c=>{i=c});let o=25+t,s;i=void 0,n.forEach(c=>{if(i&&!s){const f=d1(c,i);if(f=1&&(s={x:c.x,y:c.y}),d>0&&d<1&&(s={x:(1-d)*i.x+d*c.x,y:(1-d)*i.y+d*c.y})}}i=c});const l=10+t*.5,u=Math.atan2(n[0].y-s.y,n[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(u)*l+(n[0].x+s.x)/2,h.y=-Math.cos(u)*l+(n[0].y+s.y)/2,e==="start_left"&&(h.x=Math.sin(u+Math.PI)*l+(n[0].x+s.x)/2,h.y=-Math.cos(u+Math.PI)*l+(n[0].y+s.y)/2),e==="end_right"&&(h.x=Math.sin(u-Math.PI)*l+(n[0].x+s.x)/2-5,h.y=-Math.cos(u-Math.PI)*l+(n[0].y+s.y)/2-5),e==="end_left"&&(h.x=Math.sin(u)*l+(n[0].x+s.x)/2-5,h.y=-Math.cos(u)*l+(n[0].y+s.y)/2-5),h}function mK(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}let XC=0;const yK=()=>(XC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+XC);function _K(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i_K(t.length),bK=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},SK=function(t,e){const r=e.text.replace(nS.lineBreakRegex," "),[,n]=aS(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},wK=P3((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),nS.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let a="";return n.forEach((o,s)=>{const l=p1(`${o} `,r),u=p1(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:d}=CK(o,e,"-",r);i.push(a,...f),a=d}else u+l>=e?(i.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===n.length&&i.push(a)}),i.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),CK=P3((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let o="";return i.forEach((s,l)=>{const u=`${o}${s}`;if(p1(u,n)>=e){const c=l+1,f=i.length===c,d=`${u}${r}`;a.push(f?u:d),o=""}else o=u}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function AK(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),iS(t,e).height}function p1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),iS(t,e).width}const iS=P3((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:n,fontWeight:i}=e;if(!t)return{width:0,height:0};const[,a]=aS(r),o=["sans-serif",n],s=t.split(nS.lineBreakRegex),l=[],u=Ni("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const h=u.append("svg");for(const f of o){let d=0;const v={width:0,height:0,lineHeight:0};for(const g of s){const m=bK();m.text=g||aK;const y=SK(h,m).style("font-size",a).style("font-weight",i).style("font-family",f),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,b.width)),d=Math.round(b.height),v.height+=d,v.lineHeight=Math.round(Math.max(v.lineHeight,d))}l.push(v)}h.remove();const c=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[c]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),TK=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let ig;const kK=function(t){return ig=ig||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ig.innerHTML=t,unescape(ig.textContent)},Md=t=>{if(ft.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Md(e));return}for(const e of Object.keys(t)){if(ft.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!tK.has(e)||t[e]==null){ft.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){ft.debug("sanitizing object",e),Md(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(ft.debug("sanitizing css option",e),t[e]=lE(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}ft.debug("After sanitization",t)}},lE=t=>{let e=0,r=0;for(const n of t){if(e{if(!n)return;const i=t.node().getBBox();t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},aS=t=>{if(typeof t=="number")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 MK(t,e){return mV({},t,e)}const Tm={assignWithDepth:Cn,wrapLabel:wK,calculateTextHeight:AK,calculateTextWidth:p1,calculateTextDimensions:iS,cleanAndMerge:MK,detectInit:lK,detectDirective:sE,isSubstringInArray:uK,interpolateToCurve:hK,calcLabelPosition:pK,calcCardinalityPosition:vK,calcTerminalLabelPosition:gK,formatUrl:cK,getStylesFromArray:mK,generateId:yK,random:xK,runFunc:fK,entityDecode:kK,initIdGenerator:TK,sanitizeDirective:Md,sanitizeCss:lE,insertTitle:DK,parseFontSize:aS},ZC="10.4.0",Ld=Object.freeze(rK);let Qn=Cn({},Ld),hE,Vc=[],td=Cn({},Ld);const Py=(t,e)=>{let r=Cn({},t),n={};for(const i of e)fE(i),n=Cn(n,i);if(r=Cn(r,n),n.theme&&n.theme in $o){const i=Cn({},hE),a=Cn(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in $o&&(r.themeVariables=$o[r.theme].getThemeVariables(a))}return td=r,dE(td),td},LK=t=>(Qn=Cn({},Ld),Qn=Cn(Qn,t),t.theme&&$o[t.theme]&&(Qn.themeVariables=$o[t.theme].getThemeVariables(t.themeVariables)),Py(Qn,Vc),Qn),EK=t=>{hE=Cn({},t)},IK=t=>(Qn=Cn(Qn,t),Py(Qn,Vc),Qn),cE=()=>Cn({},Qn),BK=t=>(dE(t),Cn(td,t),_a()),_a=()=>Cn({},td),fE=t=>{t&&(["secure",...Qn.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(ft.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&fE(t[e])}))},v1=t=>{Md(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),Vc.push(t),Py(Qn,Vc)},g1=(t=Qn)=>{Vc=[],Py(t,Vc)},PK={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},jC={},RK=t=>{jC[t]||(ft.warn(PK[t]),jC[t]=!0)},dE=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&RK("LAZY_LOAD_DEPRECATED")},pE="c4",FK=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),OK=async()=>{const{diagram:t}=await $r(()=>import("./c4Diagram-c0b17d02-90912796.js"),["assets/c4Diagram-c0b17d02-90912796.js","assets/svgDrawCommon-42e92da3-e31904ea.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:pE,diagram:t}},NK={id:pE,detector:FK,loader:OK},zK=NK,vE="flowchart",VK=(t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},$K=async()=>{const{diagram:t}=await $r(()=>import("./flowDiagram-d6f8fe3a-4570a98c.js"),["assets/flowDiagram-d6f8fe3a-4570a98c.js","assets/flowDb-ff651a22-6b86a346.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/styles-1b0c237a-9ea92680.js","assets/index-f58d48f9-594fab58.js","assets/edges-0005682e-04b6df38.js","assets/createText-3b1f58a4-cf050b71.js","assets/svgDraw-70101091-699797c4.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:vE,diagram:t}},GK={id:vE,detector:VK,loader:$K},HK=GK,gE="flowchart-v2",qK=(t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},WK=async()=>{const{diagram:t}=await $r(()=>import("./flowDiagram-v2-58f49b84-7c402221.js"),["assets/flowDiagram-v2-58f49b84-7c402221.js","assets/flowDb-ff651a22-6b86a346.js","assets/styles-1b0c237a-9ea92680.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/index-f58d48f9-594fab58.js","assets/edges-0005682e-04b6df38.js","assets/createText-3b1f58a4-cf050b71.js","assets/svgDraw-70101091-699797c4.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:gE,diagram:t}},UK={id:gE,detector:qK,loader:WK},YK=UK,mE="er",XK=t=>/^\s*erDiagram/.test(t),ZK=async()=>{const{diagram:t}=await $r(()=>import("./erDiagram-dedf2781-389146a3.js"),["assets/erDiagram-dedf2781-389146a3.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/stringify-ec884b6d.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:mE,diagram:t}},jK={id:mE,detector:XK,loader:ZK},KK=jK,yE="gitGraph",JK=t=>/^\s*gitGraph/.test(t),QK=async()=>{const{diagram:t}=await $r(()=>import("./gitGraphDiagram-e0ffc2d1-031a8a32.js"),["assets/gitGraphDiagram-e0ffc2d1-031a8a32.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:yE,diagram:t}},eJ={id:yE,detector:JK,loader:QK},tJ=eJ,_E="gantt",rJ=t=>/^\s*gantt/.test(t),nJ=async()=>{const{diagram:t}=await $r(()=>import("./ganttDiagram-088dbd90-86576d07.js"),["assets/ganttDiagram-088dbd90-86576d07.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/linear-e4d2c5e8.js","assets/init-77b53fdd.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:_E,diagram:t}},iJ={id:_E,detector:rJ,loader:nJ},aJ=iJ,xE="info",oJ=t=>/^\s*info/.test(t),sJ=async()=>{const{diagram:t}=await $r(()=>import("./infoDiagram-64895a6e-76b1892c.js"),["assets/infoDiagram-64895a6e-76b1892c.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:xE,diagram:t}},lJ={id:xE,detector:oJ,loader:sJ},bE="pie",uJ=t=>/^\s*pie/.test(t),hJ=async()=>{const{diagram:t}=await $r(()=>import("./pieDiagram-3fca7ce7-72c81148.js"),["assets/pieDiagram-3fca7ce7-72c81148.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/arc-b31ff68c.js","assets/path-53f90ab3.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/array-9f3ba611.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:bE,diagram:t}},cJ={id:bE,detector:uJ,loader:hJ},SE="quadrantChart",fJ=t=>/^\s*quadrantChart/.test(t),dJ=async()=>{const{diagram:t}=await $r(()=>import("./quadrantDiagram-0ca4be02-1efcd4bd.js"),["assets/quadrantDiagram-0ca4be02-1efcd4bd.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/linear-e4d2c5e8.js","assets/init-77b53fdd.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:SE,diagram:t}},pJ={id:SE,detector:fJ,loader:dJ},vJ=pJ,wE="requirement",gJ=t=>/^\s*requirement(Diagram)?/.test(t),mJ=async()=>{const{diagram:t}=await $r(()=>import("./requirementDiagram-e13af0f0-97e4242f.js"),["assets/requirementDiagram-e13af0f0-97e4242f.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:wE,diagram:t}},yJ={id:wE,detector:gJ,loader:mJ},_J=yJ,CE="sequence",xJ=t=>/^\s*sequenceDiagram/.test(t),bJ=async()=>{const{diagram:t}=await $r(()=>import("./sequenceDiagram-84aa38e3-a1db5076.js"),["assets/sequenceDiagram-84aa38e3-a1db5076.js","assets/svgDrawCommon-42e92da3-e31904ea.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:CE,diagram:t}},SJ={id:CE,detector:xJ,loader:bJ},wJ=SJ,AE="class",CJ=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},AJ=async()=>{const{diagram:t}=await $r(()=>import("./classDiagram-a8cc8886-5888c769.js"),["assets/classDiagram-a8cc8886-5888c769.js","assets/styles-622362e4-1f0c29e6.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/svgDraw-70101091-699797c4.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:AE,diagram:t}},TJ={id:AE,detector:CJ,loader:AJ},kJ=TJ,TE="classDiagram",DJ=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},MJ=async()=>{const{diagram:t}=await $r(()=>import("./classDiagram-v2-802a48d3-8a1fcf07.js"),["assets/classDiagram-v2-802a48d3-8a1fcf07.js","assets/styles-622362e4-1f0c29e6.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/index-f58d48f9-594fab58.js","assets/edges-0005682e-04b6df38.js","assets/createText-3b1f58a4-cf050b71.js","assets/svgDraw-70101091-699797c4.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:TE,diagram:t}},LJ={id:TE,detector:DJ,loader:MJ},EJ=LJ,kE="state",IJ=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},BJ=async()=>{const{diagram:t}=await $r(()=>import("./stateDiagram-9a586ac6-1cfcb484.js"),["assets/stateDiagram-9a586ac6-1cfcb484.js","assets/styles-a1a6e33f-c5345b95.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:kE,diagram:t}},PJ={id:kE,detector:IJ,loader:BJ},RJ=PJ,DE="stateDiagram",FJ=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},OJ=async()=>{const{diagram:t}=await $r(()=>import("./stateDiagram-v2-96f2b9df-77469703.js"),["assets/stateDiagram-v2-96f2b9df-77469703.js","assets/styles-a1a6e33f-c5345b95.js","assets/layout-e00002c0.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/index-f58d48f9-594fab58.js","assets/edges-0005682e-04b6df38.js","assets/createText-3b1f58a4-cf050b71.js","assets/svgDraw-70101091-699797c4.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:DE,diagram:t}},NJ={id:DE,detector:FJ,loader:OJ},zJ=NJ,ME="journey",VJ=t=>/^\s*journey/.test(t),$J=async()=>{const{diagram:t}=await $r(()=>import("./journeyDiagram-adaa34f8-532986db.js"),["assets/journeyDiagram-adaa34f8-532986db.js","assets/svgDrawCommon-42e92da3-e31904ea.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/arc-b31ff68c.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:ME,diagram:t}},GJ={id:ME,detector:VJ,loader:$J},HJ=GJ,qJ=t=>{var e;const{securityLevel:r}=_a();let n=Ni("body");if(r==="sandbox"){const o=((e=Ni(`#i${t}`).node())==null?void 0:e.contentDocument)??document;n=Ni(o.body)}return n.select(`#${t}`)},WJ=function(t,e){for(let r of e)t.attr(r[0],r[1])},UJ=function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},LE=function(t,e,r,n){const i=UJ(e,r,n);WJ(t,i)},YJ=function(t,e,r,n){const i=e.node().getBBox(),a=i.width,o=i.height;ft.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;ft.info(`Graph bounds: ${s}x${l}`,t),s=a+r*2,l=o+r*2,ft.info(`Calculated bounds: ${s}x${l}`),LE(e,l,s,n);const u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},XJ=(t,e,r)=>{ft.debug(`renering svg for syntax error -`);const n=qJ(e);n.attr("viewBox","0 0 2412 512"),LE(n,100,512,!0);const i=n.append("g");i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},EE={draw:XJ},ZJ=EE,jJ={db:{},renderer:EE,parser:{parser:{yy:{}},parse:()=>{}}},KJ=jJ,IE="flowchart-elk",JJ=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},QJ=async()=>{const{diagram:t}=await $r(()=>import("./flowchart-elk-definition-56584a6c-f7e4e75c.js"),["assets/flowchart-elk-definition-56584a6c-f7e4e75c.js","assets/flowDb-ff651a22-6b86a346.js","assets/edges-0005682e-04b6df38.js","assets/createText-3b1f58a4-cf050b71.js","assets/svgDraw-70101091-699797c4.js","assets/line-7fbcfe17.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:IE,diagram:t}},eQ={id:IE,detector:JJ,loader:QJ},tQ=eQ,BE="timeline",rQ=t=>/^\s*timeline/.test(t),nQ=async()=>{const{diagram:t}=await $r(()=>import("./timeline-definition-1a90b03d-12fd19f1.js"),["assets/timeline-definition-1a90b03d-12fd19f1.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/arc-b31ff68c.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:BE,diagram:t}},iQ={id:BE,detector:rQ,loader:nQ},aQ=iQ,PE="mindmap",oQ=t=>/^\s*mindmap/.test(t),sQ=async()=>{const{diagram:t}=await $r(()=>import("./mindmap-definition-57868176-9f488f05.js"),["assets/mindmap-definition-57868176-9f488f05.js","assets/createText-3b1f58a4-cf050b71.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:PE,diagram:t}},lQ={id:PE,detector:oQ,loader:sQ},uQ=lQ,RE="sankey",hQ=t=>/^\s*sankey-beta/.test(t),cQ=async()=>{const{diagram:t}=await $r(()=>import("./sankeyDiagram-a7f8e230-2ffb6873.js"),["assets/sankeyDiagram-a7f8e230-2ffb6873.js","assets/index-51905ea3.js","assets/index-a7252c28.css","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:RE,diagram:t}},fQ={id:RE,detector:hQ,loader:cQ},dQ=fQ,km={},pQ=(t,e,r)=>{let n="";return t in km&&km[t]?n=km[t](r):ft.warn(`No theme found for ${t}`),` & { + ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},cK=function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1};function fK(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return lK[r]||e}function dK(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?aL.sanitizeUrl(r):r}const pK=(t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let o=0;o{r+=d1(a,e),e=a});let n=r/2,i;return e=void 0,t.forEach(a=>{if(e&&!i){const o=d1(a,e);if(o=1&&(i={x:a.x,y:a.y}),s>0&&s<1&&(i={x:(1-s)*e.x+s*a.x,y:(1-s)*e.y+s*a.y})}}e=a}),i}function gK(t){return t.length===1?t[0]:vK(t)}const mK=(t,e,r)=>{let n;ft.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let a=25,o;n=void 0,e.forEach(h=>{if(n&&!o){const c=d1(h,n);if(c=1&&(o={x:h.x,y:h.y}),f>0&&f<1&&(o={x:(1-f)*n.x+f*h.x,y:(1-f)*n.y+f*h.y})}}n=h});const s=t?10:5,l=Math.atan2(e[0].y-o.y,e[0].x-o.x),u={x:0,y:0};return u.x=Math.sin(l)*s+(e[0].x+o.x)/2,u.y=-Math.cos(l)*s+(e[0].y+o.y)/2,u};function yK(t,e,r){let n=JSON.parse(JSON.stringify(r)),i;ft.info("our points",n),e!=="start_left"&&e!=="start_right"&&(n=n.reverse()),n.forEach(c=>{i=c});let o=25+t,s;i=void 0,n.forEach(c=>{if(i&&!s){const f=d1(c,i);if(f=1&&(s={x:c.x,y:c.y}),d>0&&d<1&&(s={x:(1-d)*i.x+d*c.x,y:(1-d)*i.y+d*c.y})}}i=c});const l=10+t*.5,u=Math.atan2(n[0].y-s.y,n[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(u)*l+(n[0].x+s.x)/2,h.y=-Math.cos(u)*l+(n[0].y+s.y)/2,e==="start_left"&&(h.x=Math.sin(u+Math.PI)*l+(n[0].x+s.x)/2,h.y=-Math.cos(u+Math.PI)*l+(n[0].y+s.y)/2),e==="end_right"&&(h.x=Math.sin(u-Math.PI)*l+(n[0].x+s.x)/2-5,h.y=-Math.cos(u-Math.PI)*l+(n[0].y+s.y)/2-5),e==="end_left"&&(h.x=Math.sin(u)*l+(n[0].x+s.x)/2-5,h.y=-Math.cos(u)*l+(n[0].y+s.y)/2-5),h}function _K(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}let XC=0;const xK=()=>(XC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+XC);function bK(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;ibK(t.length),wK=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},CK=function(t,e){const r=e.text.replace(nS.lineBreakRegex," "),[,n]=aS(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},AK=P3((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),nS.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let a="";return n.forEach((o,s)=>{const l=p1(`${o} `,r),u=p1(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:d}=TK(o,e,"-",r);i.push(a,...f),a=d}else u+l>=e?(i.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===n.length&&i.push(a)}),i.filter(o=>o!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),TK=P3((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let o="";return i.forEach((s,l)=>{const u=`${o}${s}`;if(p1(u,n)>=e){const c=l+1,f=i.length===c,d=`${u}${r}`;a.push(f?u:d),o=""}else o=u}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function kK(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),iS(t,e).height}function p1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),iS(t,e).width}const iS=P3((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:n,fontWeight:i}=e;if(!t)return{width:0,height:0};const[,a]=aS(r),o=["sans-serif",n],s=t.split(nS.lineBreakRegex),l=[],u=Ni("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const h=u.append("svg");for(const f of o){let d=0;const v={width:0,height:0,lineHeight:0};for(const g of s){const m=wK();m.text=g||sK;const y=CK(h,m).style("font-size",a).style("font-weight",i).style("font-family",f),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");v.width=Math.round(Math.max(v.width,b.width)),d=Math.round(b.height),v.height+=d,v.lineHeight=Math.round(Math.max(v.lineHeight,d))}l.push(v)}h.remove();const c=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[c]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),DK=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let ag;const MK=function(t){return ag=ag||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ag.innerHTML=t,unescape(ag.textContent)},Ld=t=>{if(ft.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>Ld(e));return}for(const e of Object.keys(t)){if(ft.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!nK.has(e)||t[e]==null){ft.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){ft.debug("sanitizing object",e),Ld(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(ft.debug("sanitizing css option",e),t[e]=lE(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}ft.debug("After sanitization",t)}},lE=t=>{let e=0,r=0;for(const n of t){if(e{if(!n)return;const i=t.node().getBBox();t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},aS=t=>{if(typeof t=="number")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 EK(t,e){return _V({},t,e)}const Tm={assignWithDepth:An,wrapLabel:AK,calculateTextHeight:kK,calculateTextWidth:p1,calculateTextDimensions:iS,cleanAndMerge:EK,detectInit:hK,detectDirective:sE,isSubstringInArray:cK,interpolateToCurve:fK,calcLabelPosition:gK,calcCardinalityPosition:mK,calcTerminalLabelPosition:yK,formatUrl:dK,getStylesFromArray:_K,generateId:xK,random:SK,runFunc:pK,entityDecode:MK,initIdGenerator:DK,sanitizeDirective:Ld,sanitizeCss:lE,insertTitle:LK,parseFontSize:aS},ZC="10.4.0",Ed=Object.freeze(iK);let ei=An({},Ed),hE,$c=[],rd=An({},Ed);const Ry=(t,e)=>{let r=An({},t),n={};for(const i of e)fE(i),n=An(n,i);if(r=An(r,n),n.theme&&n.theme in Ho){const i=An({},hE),a=An(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Ho&&(r.themeVariables=Ho[r.theme].getThemeVariables(a))}return rd=r,dE(rd),rd},IK=t=>(ei=An({},Ed),ei=An(ei,t),t.theme&&Ho[t.theme]&&(ei.themeVariables=Ho[t.theme].getThemeVariables(t.themeVariables)),Ry(ei,$c),ei),BK=t=>{hE=An({},t)},PK=t=>(ei=An(ei,t),Ry(ei,$c),ei),cE=()=>An({},ei),RK=t=>(dE(t),An(rd,t),_a()),_a=()=>An({},rd),fE=t=>{t&&(["secure",...ei.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(ft.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=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&fE(t[e])}))},v1=t=>{Ld(t),t.fontFamily&&(!t.themeVariables||!t.themeVariables.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),$c.push(t),Ry(ei,$c)},g1=(t=ei)=>{$c=[],Ry(t,$c)},FK={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},jC={},OK=t=>{jC[t]||(ft.warn(FK[t]),jC[t]=!0)},dE=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&OK("LAZY_LOAD_DEPRECATED")},pE="c4",NK=t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),zK=async()=>{const{diagram:t}=await Gr(()=>import("./c4Diagram-c0b17d02-851b5ffe.js"),["assets/c4Diagram-c0b17d02-851b5ffe.js","assets/svgDrawCommon-42e92da3-fd0afe46.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:pE,diagram:t}},VK={id:pE,detector:NK,loader:zK},$K=VK,vE="flowchart",GK=(t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},HK=async()=>{const{diagram:t}=await Gr(()=>import("./flowDiagram-d6f8fe3a-2517ad0a.js"),["assets/flowDiagram-d6f8fe3a-2517ad0a.js","assets/flowDb-ff651a22-eeadc954.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/styles-1b0c237a-f93a9f01.js","assets/index-f58d48f9-4ae439b4.js","assets/edges-0005682e-ae86cacb.js","assets/createText-3b1f58a4-cb14bcdc.js","assets/svgDraw-70101091-6aa9b265.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:vE,diagram:t}},qK={id:vE,detector:GK,loader:HK},WK=qK,gE="flowchart-v2",UK=(t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t)},YK=async()=>{const{diagram:t}=await Gr(()=>import("./flowDiagram-v2-58f49b84-4d4dd746.js"),["assets/flowDiagram-v2-58f49b84-4d4dd746.js","assets/flowDb-ff651a22-eeadc954.js","assets/styles-1b0c237a-f93a9f01.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/index-f58d48f9-4ae439b4.js","assets/edges-0005682e-ae86cacb.js","assets/createText-3b1f58a4-cb14bcdc.js","assets/svgDraw-70101091-6aa9b265.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:gE,diagram:t}},XK={id:gE,detector:UK,loader:YK},ZK=XK,mE="er",jK=t=>/^\s*erDiagram/.test(t),KK=async()=>{const{diagram:t}=await Gr(()=>import("./erDiagram-dedf2781-1cba01d0.js"),["assets/erDiagram-dedf2781-1cba01d0.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/stringify-ec884b6d.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:mE,diagram:t}},JK={id:mE,detector:jK,loader:KK},QK=JK,yE="gitGraph",eJ=t=>/^\s*gitGraph/.test(t),tJ=async()=>{const{diagram:t}=await Gr(()=>import("./gitGraphDiagram-e0ffc2d1-ad508ff6.js"),["assets/gitGraphDiagram-e0ffc2d1-ad508ff6.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:yE,diagram:t}},rJ={id:yE,detector:eJ,loader:tJ},nJ=rJ,_E="gantt",iJ=t=>/^\s*gantt/.test(t),aJ=async()=>{const{diagram:t}=await Gr(()=>import("./ganttDiagram-088dbd90-259acb1a.js"),["assets/ganttDiagram-088dbd90-259acb1a.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/linear-7918616e.js","assets/init-77b53fdd.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:_E,diagram:t}},oJ={id:_E,detector:iJ,loader:aJ},sJ=oJ,xE="info",lJ=t=>/^\s*info/.test(t),uJ=async()=>{const{diagram:t}=await Gr(()=>import("./infoDiagram-64895a6e-d5aa12d6.js"),["assets/infoDiagram-64895a6e-d5aa12d6.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:xE,diagram:t}},hJ={id:xE,detector:lJ,loader:uJ},bE="pie",cJ=t=>/^\s*pie/.test(t),fJ=async()=>{const{diagram:t}=await Gr(()=>import("./pieDiagram-3fca7ce7-29dfb0d5.js"),["assets/pieDiagram-3fca7ce7-29dfb0d5.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/arc-b070a76c.js","assets/path-53f90ab3.js","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/array-9f3ba611.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:bE,diagram:t}},dJ={id:bE,detector:cJ,loader:fJ},SE="quadrantChart",pJ=t=>/^\s*quadrantChart/.test(t),vJ=async()=>{const{diagram:t}=await Gr(()=>import("./quadrantDiagram-0ca4be02-6c7c14fd.js"),["assets/quadrantDiagram-0ca4be02-6c7c14fd.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/linear-7918616e.js","assets/init-77b53fdd.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:SE,diagram:t}},gJ={id:SE,detector:pJ,loader:vJ},mJ=gJ,wE="requirement",yJ=t=>/^\s*requirement(Diagram)?/.test(t),_J=async()=>{const{diagram:t}=await Gr(()=>import("./requirementDiagram-e13af0f0-d96c1e5a.js"),["assets/requirementDiagram-e13af0f0-d96c1e5a.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:wE,diagram:t}},xJ={id:wE,detector:yJ,loader:_J},bJ=xJ,CE="sequence",SJ=t=>/^\s*sequenceDiagram/.test(t),wJ=async()=>{const{diagram:t}=await Gr(()=>import("./sequenceDiagram-84aa38e3-3c31c30f.js"),["assets/sequenceDiagram-84aa38e3-3c31c30f.js","assets/svgDrawCommon-42e92da3-fd0afe46.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:CE,diagram:t}},CJ={id:CE,detector:SJ,loader:wJ},AJ=CJ,AE="class",TJ=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},kJ=async()=>{const{diagram:t}=await Gr(()=>import("./classDiagram-a8cc8886-0f4296f8.js"),["assets/classDiagram-a8cc8886-0f4296f8.js","assets/styles-622362e4-fd075d51.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/svgDraw-70101091-6aa9b265.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:AE,diagram:t}},DJ={id:AE,detector:TJ,loader:kJ},MJ=DJ,TE="classDiagram",LJ=(t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},EJ=async()=>{const{diagram:t}=await Gr(()=>import("./classDiagram-v2-802a48d3-d939e561.js"),["assets/classDiagram-v2-802a48d3-d939e561.js","assets/styles-622362e4-fd075d51.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/index-f58d48f9-4ae439b4.js","assets/edges-0005682e-ae86cacb.js","assets/createText-3b1f58a4-cb14bcdc.js","assets/svgDraw-70101091-6aa9b265.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:TE,diagram:t}},IJ={id:TE,detector:LJ,loader:EJ},BJ=IJ,kE="state",PJ=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},RJ=async()=>{const{diagram:t}=await Gr(()=>import("./stateDiagram-9a586ac6-bcbbce57.js"),["assets/stateDiagram-9a586ac6-bcbbce57.js","assets/styles-a1a6e33f-335bad62.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:kE,diagram:t}},FJ={id:kE,detector:PJ,loader:RJ},OJ=FJ,DE="stateDiagram",NJ=(t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},zJ=async()=>{const{diagram:t}=await Gr(()=>import("./stateDiagram-v2-96f2b9df-4f3bd457.js"),["assets/stateDiagram-v2-96f2b9df-4f3bd457.js","assets/styles-a1a6e33f-335bad62.js","assets/layout-218ba7ee.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/index-f58d48f9-4ae439b4.js","assets/edges-0005682e-ae86cacb.js","assets/createText-3b1f58a4-cb14bcdc.js","assets/svgDraw-70101091-6aa9b265.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:DE,diagram:t}},VJ={id:DE,detector:NJ,loader:zJ},$J=VJ,ME="journey",GJ=t=>/^\s*journey/.test(t),HJ=async()=>{const{diagram:t}=await Gr(()=>import("./journeyDiagram-adaa34f8-a7e82d80.js"),["assets/journeyDiagram-adaa34f8-a7e82d80.js","assets/svgDrawCommon-42e92da3-fd0afe46.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/arc-b070a76c.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:ME,diagram:t}},qJ={id:ME,detector:GJ,loader:HJ},WJ=qJ,UJ=t=>{var e;const{securityLevel:r}=_a();let n=Ni("body");if(r==="sandbox"){const o=((e=Ni(`#i${t}`).node())==null?void 0:e.contentDocument)??document;n=Ni(o.body)}return n.select(`#${t}`)},YJ=function(t,e){for(let r of e)t.attr(r[0],r[1])},XJ=function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},LE=function(t,e,r,n){const i=XJ(e,r,n);YJ(t,i)},ZJ=function(t,e,r,n){const i=e.node().getBBox(),a=i.width,o=i.height;ft.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;ft.info(`Graph bounds: ${s}x${l}`,t),s=a+r*2,l=o+r*2,ft.info(`Calculated bounds: ${s}x${l}`),LE(e,l,s,n);const u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},jJ=(t,e,r)=>{ft.debug(`renering svg for syntax error +`);const n=UJ(e);n.attr("viewBox","0 0 2412 512"),LE(n,100,512,!0);const i=n.append("g");i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},EE={draw:jJ},KJ=EE,JJ={db:{},renderer:EE,parser:{parser:{yy:{}},parse:()=>{}}},QJ=JJ,IE="flowchart-elk",eQ=(t,e)=>{var r;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk")},tQ=async()=>{const{diagram:t}=await Gr(()=>import("./flowchart-elk-definition-56584a6c-7691460b.js"),["assets/flowchart-elk-definition-56584a6c-7691460b.js","assets/flowDb-ff651a22-eeadc954.js","assets/edges-0005682e-ae86cacb.js","assets/createText-3b1f58a4-cb14bcdc.js","assets/svgDraw-70101091-6aa9b265.js","assets/line-971ba693.js","assets/array-9f3ba611.js","assets/path-53f90ab3.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:IE,diagram:t}},rQ={id:IE,detector:eQ,loader:tQ},nQ=rQ,BE="timeline",iQ=t=>/^\s*timeline/.test(t),aQ=async()=>{const{diagram:t}=await Gr(()=>import("./timeline-definition-1a90b03d-3181d6ca.js"),["assets/timeline-definition-1a90b03d-3181d6ca.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/arc-b070a76c.js","assets/path-53f90ab3.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:BE,diagram:t}},oQ={id:BE,detector:iQ,loader:aQ},sQ=oQ,PE="mindmap",lQ=t=>/^\s*mindmap/.test(t),uQ=async()=>{const{diagram:t}=await Gr(()=>import("./mindmap-definition-57868176-3f6fc2a7.js"),["assets/mindmap-definition-57868176-3f6fc2a7.js","assets/createText-3b1f58a4-cb14bcdc.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:PE,diagram:t}},hQ={id:PE,detector:lQ,loader:uQ},cQ=hQ,RE="sankey",fQ=t=>/^\s*sankey-beta/.test(t),dQ=async()=>{const{diagram:t}=await Gr(()=>import("./sankeyDiagram-a7f8e230-5b80af1c.js"),["assets/sankeyDiagram-a7f8e230-5b80af1c.js","assets/index-ef7aa48c.js","assets/index-a7252c28.css","assets/ordinal-ba9b4969.js","assets/init-77b53fdd.js","assets/_plugin-vue_export-helper-c27b6911.js"]);return{id:RE,diagram:t}},pQ={id:RE,detector:fQ,loader:dQ},vQ=pQ,km={},gQ=(t,e,r)=>{let n="";return t in km&&km[t]?n=km[t](r):ft.warn(`No theme found for ${t}`),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} @@ -416,34 +416,34 @@ new Remarkable().use(linkify) ${n} ${e} -`},vQ=(t,e)=>{e!==void 0&&(km[t]=e)},gQ=pQ;let oS="",Ry="",sS="";const lS=t=>Dd(t,_a()),FE=function(){oS="",sS="",Ry=""},OE=function(t){oS=lS(t).replace(/^\s+/g,"")},NE=function(){return oS||Ry},zE=function(t){sS=lS(t).replace(/\n\s+/g,` -`)},VE=function(){return sS},$E=function(t){Ry=lS(t)},GE=function(){return Ry},mQ={getAccTitle:NE,setAccTitle:OE,getDiagramTitle:GE,setDiagramTitle:$E,getAccDescription:VE,setAccDescription:zE,clear:FE},yQ=Object.freeze(Object.defineProperty({__proto__:null,clear:FE,default:mQ,getAccDescription:VE,getAccTitle:NE,getDiagramTitle:GE,setAccDescription:zE,setAccTitle:OE,setDiagramTitle:$E},Symbol.toStringTag,{value:"Module"}));let Ol={};const HE=function(t,e,r,n){ft.debug("parseDirective is being called",e,r,n);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Ol={};break;case"type_directive":if(!Ol)throw new Error("currentDirective is undefined");Ol.type=e.toLowerCase();break;case"arg_directive":if(!Ol)throw new Error("currentDirective is undefined");Ol.args=JSON.parse(e);break;case"close_directive":_Q(t,Ol,n),Ol=void 0;break}}catch(i){ft.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),ft.error(i.message)}},_Q=function(t,e,r){switch(ft.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(n=>{e.args[n]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[n],delete e.args[n])}),v1(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":ft.warn("themeCss encountered");break;default:ft.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},xQ=ft,bQ=rS,qE=_a,SQ=t=>Dd(t,qE()),wQ=YJ,CQ=()=>yQ,AQ=(t,e,r,n)=>HE(t,e,r,n),m1={},y1=(t,e,r)=>{if(m1[t])throw new Error(`Diagram ${t} already registered.`);m1[t]=e,r&&oE(t,r),vQ(t,e.styles),e.injectUtils&&e.injectUtils(xQ,bQ,qE,SQ,wQ,CQ(),AQ)},uS=t=>{if(t in m1)return m1[t];throw new TQ(t)};class TQ extends Error{constructor(e){super(`Diagram ${e} not found.`)}}let KC=!1;const hS=()=>{KC||(KC=!0,y1("error",KJ,t=>t.toLowerCase().trim()==="error"),y1("---",{db:{clear:()=>{}},styles:{},renderer:{},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("---")),aE(zK,EJ,kJ,KK,aJ,lJ,cJ,_J,wJ,tQ,YK,HK,uQ,aQ,tJ,zJ,RJ,HJ,vJ,dQ))};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function WE(t){return typeof t>"u"||t===null}function kQ(t){return typeof t=="object"&&t!==null}function DQ(t){return Array.isArray(t)?t:WE(t)?[]:[t]}function MQ(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r{e!==void 0&&(km[t]=e)},yQ=gQ;let oS="",Fy="",sS="";const lS=t=>Md(t,_a()),FE=function(){oS="",sS="",Fy=""},OE=function(t){oS=lS(t).replace(/^\s+/g,"")},NE=function(){return oS||Fy},zE=function(t){sS=lS(t).replace(/\n\s+/g,` +`)},VE=function(){return sS},$E=function(t){Fy=lS(t)},GE=function(){return Fy},_Q={getAccTitle:NE,setAccTitle:OE,getDiagramTitle:GE,setDiagramTitle:$E,getAccDescription:VE,setAccDescription:zE,clear:FE},xQ=Object.freeze(Object.defineProperty({__proto__:null,clear:FE,default:_Q,getAccDescription:VE,getAccTitle:NE,getDiagramTitle:GE,setAccDescription:zE,setAccTitle:OE,setDiagramTitle:$E},Symbol.toStringTag,{value:"Module"}));let Ol={};const HE=function(t,e,r,n){ft.debug("parseDirective is being called",e,r,n);try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Ol={};break;case"type_directive":if(!Ol)throw new Error("currentDirective is undefined");Ol.type=e.toLowerCase();break;case"arg_directive":if(!Ol)throw new Error("currentDirective is undefined");Ol.args=JSON.parse(e);break;case"close_directive":bQ(t,Ol,n),Ol=void 0;break}}catch(i){ft.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),ft.error(i.message)}},bQ=function(t,e,r){switch(ft.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(n=>{e.args[n]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[n],delete e.args[n])}),v1(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":ft.warn("themeCss encountered");break;default:ft.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},SQ=ft,wQ=rS,qE=_a,CQ=t=>Md(t,qE()),AQ=ZJ,TQ=()=>xQ,kQ=(t,e,r,n)=>HE(t,e,r,n),m1={},y1=(t,e,r)=>{if(m1[t])throw new Error(`Diagram ${t} already registered.`);m1[t]=e,r&&oE(t,r),mQ(t,e.styles),e.injectUtils&&e.injectUtils(SQ,wQ,qE,CQ,AQ,TQ(),kQ)},uS=t=>{if(t in m1)return m1[t];throw new DQ(t)};class DQ extends Error{constructor(e){super(`Diagram ${e} not found.`)}}let KC=!1;const hS=()=>{KC||(KC=!0,y1("error",QJ,t=>t.toLowerCase().trim()==="error"),y1("---",{db:{clear:()=>{}},styles:{},renderer:{},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("---")),aE($K,BJ,MJ,QK,sJ,hJ,dJ,bJ,AJ,nQ,ZK,WK,cQ,sQ,nJ,$J,OJ,WJ,mJ,vQ))};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function WE(t){return typeof t>"u"||t===null}function MQ(t){return typeof t=="object"&&t!==null}function LQ(t){return Array.isArray(t)?t:WE(t)?[]:[t]}function EQ(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;rs&&(a=" ... ",e=n-s+a.length),r-n>s&&(o=" ...",r=n+s-o.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:n-e+a.length}}function O_(t,e){return $n.repeat(" ",e-t.length)+t}function NQ(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,o=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var s="",l,u,h=Math.min(t.line+e.linesAfter,i.length).toString().length,c=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)u=F_(t.buffer,n[o-l],i[o-l],t.position-(n[o]-n[o-l]),c),s=$n.repeat(" ",e.indent)+O_((t.line-l+1).toString(),h)+" | "+u.str+` -`+s;for(u=F_(t.buffer,n[o],i[o],t.position,c),s+=$n.repeat(" ",e.indent)+O_((t.line+1).toString(),h)+" | "+u.str+` +`+t.mark.snippet),n+" "+r):n}function Id(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=UE(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Id.prototype=Object.create(Error.prototype);Id.prototype.constructor=Id;Id.prototype.toString=function(e){return this.name+": "+UE(this,e)};var No=Id;function O_(t,e,r,n,i){var a="",o="",s=Math.floor(i/2)-1;return n-e>s&&(a=" ... ",e=n-s+a.length),r-n>s&&(o=" ...",r=n+s-o.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:n-e+a.length}}function N_(t,e){return $n.repeat(" ",e-t.length)+t}function VQ(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,o=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var s="",l,u,h=Math.min(t.line+e.linesAfter,i.length).toString().length,c=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(o-l<0);l++)u=O_(t.buffer,n[o-l],i[o-l],t.position-(n[o]-n[o-l]),c),s=$n.repeat(" ",e.indent)+N_((t.line-l+1).toString(),h)+" | "+u.str+` +`+s;for(u=O_(t.buffer,n[o],i[o],t.position,c),s+=$n.repeat(" ",e.indent)+N_((t.line+1).toString(),h)+" | "+u.str+` `,s+=$n.repeat("-",e.indent+h+3+u.pos)+`^ -`,l=1;l<=e.linesAfter&&!(o+l>=i.length);l++)u=F_(t.buffer,n[o+l],i[o+l],t.position-(n[o]-n[o+l]),c),s+=$n.repeat(" ",e.indent)+O_((t.line+l+1).toString(),h)+" | "+u.str+` -`;return s.replace(/\n$/,"")}var zQ=NQ,VQ=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$Q=["scalar","sequence","mapping"];function GQ(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function HQ(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(VQ.indexOf(r)===-1)throw new Oo('Unknown option "'+r+'" 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(r){return r},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=GQ(e.styleAliases||null),$Q.indexOf(this.kind)===-1)throw new Oo('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Tn=HQ;function JC(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,o){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=o)}),r[i]=n}),r}function qQ(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e=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"]}}),cee=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function fee(t){return!(t===null||!cee.test(t)||t[t.length-1]==="_")}function dee(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var pee=/^[-+]?[0-9]+e/;function vee(t,e){var r;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($n.isNegativeZero(t))return"-0.0";return r=t.toString(10),pee.test(r)?r.replace("e",".e"):r}function gee(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||$n.isNegativeZero(t))}var mee=new Tn("tag:yaml.org,2002:float",{kind:"scalar",resolve:fee,construct:dee,predicate:gee,represent:vee,defaultStyle:"lowercase"}),YE=ZQ.extend({implicit:[QQ,nee,hee,mee]}),yee=YE,XE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ZE=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]))?))?$");function _ee(t){return t===null?!1:XE.exec(t)!==null||ZE.exec(t)!==null}function xee(t){var e,r,n,i,a,o,s,l=0,u=null,h,c,f;if(e=XE.exec(t),e===null&&(e=ZE.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],c=+(e[11]||0),u=(h*60+c)*6e4,e[9]==="-"&&(u=-u)),f=new Date(Date.UTC(r,n,i,a,o,s,l)),u&&f.setTime(f.getTime()-u),f}function bee(t){return t.toISOString()}var See=new Tn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_ee,construct:xee,instanceOf:Date,represent:bee});function wee(t){return t==="<<"||t===null}var Cee=new Tn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:wee}),cS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function Aee(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=cS;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function Tee(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=cS,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}function kee(t){var e="",r=0,n,i,a=t.length,o=cS;for(n=0;n>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function Dee(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Mee=new Tn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Aee,construct:Tee,predicate:Dee,represent:kee}),Lee=Object.prototype.hasOwnProperty,Eee=Object.prototype.toString;function Iee(t){if(t===null)return!0;var e=[],r,n,i,a,o,s=t;for(r=0,n=s.length;r>10)+55296,(t-65536&1023)+56320)}var eI=new Array(256),tI=new Array(256);for(var Xh=0;Xh<256;Xh++)eI[Xh]=t7(Xh)?1:0,tI[Xh]=t7(Xh);function Jee(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Hee,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 rI(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=zQ(r),new Oo(e,r)}function gt(t,e){throw rI(t,e)}function b1(t,e){t.onWarning&&t.onWarning.call(null,rI(t,e))}var r7={YAML:function(e,r,n){var i,a,o;e.version!==null&>(e,"duplication of %YAML directive"),n.length!==1&>(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&>(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&>(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&b1(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,a;n.length!==2&>(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],JE.test(i)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),il.call(e.tagMap,i)&>(e,'there is a previously declared suffix for "'+i+'" tag handle'),QE.test(a)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{gt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a}};function Js(t,e,r,n){var i,a,o,s;if(e1&&(t.result+=$n.repeat(` -`,e-1))}function Qee(t,e,r){var n,i,a,o,s,l,u,h,c=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),oi(d)||bc(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(i=t.input.charCodeAt(t.position+1),oi(i)||r&&bc(i)))return!1;for(t.kind="scalar",t.result="",a=o=t.position,s=!1;d!==0;){if(d===58){if(i=t.input.charCodeAt(t.position+1),oi(i)||r&&bc(i))break}else if(d===35){if(n=t.input.charCodeAt(t.position-1),oi(n))break}else{if(t.position===t.lineStart&&Fy(t)||r&&bc(d))break;if(no(d))if(l=t.line,u=t.lineStart,h=t.lineIndent,Nr(t,!1,-1),t.lineIndent>=e){s=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=u,t.lineIndent=h;break}}s&&(Js(t,a,o,!1),dS(t,t.line-l),a=o=t.position,s=!1),Bu(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return Js(t,a,o,!1),t.result?!0:(t.kind=c,t.result=f,!1)}function ete(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Js(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else no(r)?(Js(t,n,i,!0),dS(t,Nr(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Fy(t)?gt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);gt(t,"unexpected end of the stream within a single quoted scalar")}function tte(t,e){var r,n,i,a,o,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return Js(t,r,t.position,!0),t.position++,!0;if(s===92){if(Js(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),no(s))Nr(t,!1,e);else if(s<256&&eI[s])t.result+=tI[s],t.position++;else if((o=Zee(s))>0){for(i=o,a=0;i>0;i--)s=t.input.charCodeAt(++t.position),(o=Xee(s))>=0?a=(a<<4)+o:gt(t,"expected hexadecimal character");t.result+=Kee(a),t.position++}else gt(t,"unknown escape sequence");r=n=t.position}else no(s)?(Js(t,r,n,!0),dS(t,Nr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Fy(t)?gt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}gt(t,"unexpected end of the stream within a double quoted scalar")}function rte(t,e){var r=!0,n,i,a,o=t.tag,s,l=t.anchor,u,h,c,f,d,v=Object.create(null),g,m,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),b=t.input.charCodeAt(++t.position);b!==0;){if(Nr(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=o,t.anchor=l,t.kind=d?"mapping":"sequence",t.result=s,!0;r?b===44&>(t,"expected the node content, but found ','"):gt(t,"missed comma between flow collection entries"),m=g=y=null,c=f=!1,b===63&&(u=t.input.charCodeAt(t.position+1),oi(u)&&(c=f=!0,t.position++,Nr(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,$c(t,e,_1,!1,!0),m=t.tag,g=t.result,Nr(t,!0,e),b=t.input.charCodeAt(t.position),(f||t.line===n)&&b===58&&(c=!0,b=t.input.charCodeAt(++t.position),Nr(t,!0,e),$c(t,e,_1,!1,!0),y=t.result),d?Sc(t,s,v,m,g,y,n,i,a):c?s.push(Sc(t,null,v,m,g,y,n,i,a)):s.push(g),Nr(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}gt(t,"unexpected end of the stream within a flow collection")}function nte(t,e){var r,n,i=N_,a=!1,o=!1,s=e,l=0,u=!1,h,c;if(c=t.input.charCodeAt(t.position),c===124)n=!1;else if(c===62)n=!0;else return!1;for(t.kind="scalar",t.result="";c!==0;)if(c=t.input.charCodeAt(++t.position),c===43||c===45)N_===i?i=c===43?QC:qee:gt(t,"repeat of a chomping mode identifier");else if((h=jee(c))>=0)h===0?gt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(t,"repeat of an indentation width identifier"):(s=e+h-1,o=!0);else break;if(Bu(c)){do c=t.input.charCodeAt(++t.position);while(Bu(c));if(c===35)do c=t.input.charCodeAt(++t.position);while(!no(c)&&c!==0)}for(;c!==0;){for(fS(t),t.lineIndent=0,c=t.input.charCodeAt(t.position);(!o||t.lineIndents&&(s=t.lineIndent),no(c)){l++;continue}if(t.lineIndent=i.length);l++)u=O_(t.buffer,n[o+l],i[o+l],t.position-(n[o]-n[o+l]),c),s+=$n.repeat(" ",e.indent)+N_((t.line+l+1).toString(),h)+" | "+u.str+` +`;return s.replace(/\n$/,"")}var $Q=VQ,GQ=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],HQ=["scalar","sequence","mapping"];function qQ(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function WQ(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(GQ.indexOf(r)===-1)throw new No('Unknown option "'+r+'" 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(r){return r},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=qQ(e.styleAliases||null),HQ.indexOf(this.kind)===-1)throw new No('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Tn=WQ;function JC(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,o){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=o)}),r[i]=n}),r}function UQ(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(e=0,r=arguments.length;e=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"]}}),dee=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pee(t){return!(t===null||!dee.test(t)||t[t.length-1]==="_")}function vee(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var gee=/^[-+]?[0-9]+e/;function mee(t,e){var r;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($n.isNegativeZero(t))return"-0.0";return r=t.toString(10),gee.test(r)?r.replace("e",".e"):r}function yee(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||$n.isNegativeZero(t))}var _ee=new Tn("tag:yaml.org,2002:float",{kind:"scalar",resolve:pee,construct:vee,predicate:yee,represent:mee,defaultStyle:"lowercase"}),YE=KQ.extend({implicit:[tee,aee,fee,_ee]}),xee=YE,XE=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ZE=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]))?))?$");function bee(t){return t===null?!1:XE.exec(t)!==null||ZE.exec(t)!==null}function See(t){var e,r,n,i,a,o,s,l=0,u=null,h,c,f;if(e=XE.exec(t),e===null&&(e=ZE.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],c=+(e[11]||0),u=(h*60+c)*6e4,e[9]==="-"&&(u=-u)),f=new Date(Date.UTC(r,n,i,a,o,s,l)),u&&f.setTime(f.getTime()-u),f}function wee(t){return t.toISOString()}var Cee=new Tn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bee,construct:See,instanceOf:Date,represent:wee});function Aee(t){return t==="<<"||t===null}var Tee=new Tn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Aee}),cS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function kee(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=cS;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}function Dee(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=cS,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}function Mee(t){var e="",r=0,n,i,a=t.length,o=cS;for(n=0;n>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):i===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):i===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function Lee(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Eee=new Tn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:kee,construct:Dee,predicate:Lee,represent:Mee}),Iee=Object.prototype.hasOwnProperty,Bee=Object.prototype.toString;function Pee(t){if(t===null)return!0;var e=[],r,n,i,a,o,s=t;for(r=0,n=s.length;r>10)+55296,(t-65536&1023)+56320)}var eI=new Array(256),tI=new Array(256);for(var Zh=0;Zh<256;Zh++)eI[Zh]=t7(Zh)?1:0,tI[Zh]=t7(Zh);function ete(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Wee,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 rI(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=$Q(r),new No(e,r)}function gt(t,e){throw rI(t,e)}function b1(t,e){t.onWarning&&t.onWarning.call(null,rI(t,e))}var r7={YAML:function(e,r,n){var i,a,o;e.version!==null&>(e,"duplication of %YAML directive"),n.length!==1&>(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&>(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&>(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&b1(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var i,a;n.length!==2&>(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],JE.test(i)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),il.call(e.tagMap,i)&>(e,'there is a previously declared suffix for "'+i+'" tag handle'),QE.test(a)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{gt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a}};function Js(t,e,r,n){var i,a,o,s;if(e1&&(t.result+=$n.repeat(` +`,e-1))}function tte(t,e,r){var n,i,a,o,s,l,u,h,c=t.kind,f=t.result,d;if(d=t.input.charCodeAt(t.position),oi(d)||wc(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(i=t.input.charCodeAt(t.position+1),oi(i)||r&&wc(i)))return!1;for(t.kind="scalar",t.result="",a=o=t.position,s=!1;d!==0;){if(d===58){if(i=t.input.charCodeAt(t.position+1),oi(i)||r&&wc(i))break}else if(d===35){if(n=t.input.charCodeAt(t.position-1),oi(n))break}else{if(t.position===t.lineStart&&Oy(t)||r&&wc(d))break;if(no(d))if(l=t.line,u=t.lineStart,h=t.lineIndent,zr(t,!1,-1),t.lineIndent>=e){s=!0,d=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=u,t.lineIndent=h;break}}s&&(Js(t,a,o,!1),dS(t,t.line-l),a=o=t.position,s=!1),Pu(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return Js(t,a,o,!1),t.result?!0:(t.kind=c,t.result=f,!1)}function rte(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Js(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else no(r)?(Js(t,n,i,!0),dS(t,zr(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Oy(t)?gt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);gt(t,"unexpected end of the stream within a single quoted scalar")}function nte(t,e){var r,n,i,a,o,s;if(s=t.input.charCodeAt(t.position),s!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(s=t.input.charCodeAt(t.position))!==0;){if(s===34)return Js(t,r,t.position,!0),t.position++,!0;if(s===92){if(Js(t,r,t.position,!0),s=t.input.charCodeAt(++t.position),no(s))zr(t,!1,e);else if(s<256&&eI[s])t.result+=tI[s],t.position++;else if((o=Kee(s))>0){for(i=o,a=0;i>0;i--)s=t.input.charCodeAt(++t.position),(o=jee(s))>=0?a=(a<<4)+o:gt(t,"expected hexadecimal character");t.result+=Qee(a),t.position++}else gt(t,"unknown escape sequence");r=n=t.position}else no(s)?(Js(t,r,n,!0),dS(t,zr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Oy(t)?gt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}gt(t,"unexpected end of the stream within a double quoted scalar")}function ite(t,e){var r=!0,n,i,a,o=t.tag,s,l=t.anchor,u,h,c,f,d,v=Object.create(null),g,m,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,d=!1,s=[];else if(b===123)h=125,d=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),b=t.input.charCodeAt(++t.position);b!==0;){if(zr(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=o,t.anchor=l,t.kind=d?"mapping":"sequence",t.result=s,!0;r?b===44&>(t,"expected the node content, but found ','"):gt(t,"missed comma between flow collection entries"),m=g=y=null,c=f=!1,b===63&&(u=t.input.charCodeAt(t.position+1),oi(u)&&(c=f=!0,t.position++,zr(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,Gc(t,e,_1,!1,!0),m=t.tag,g=t.result,zr(t,!0,e),b=t.input.charCodeAt(t.position),(f||t.line===n)&&b===58&&(c=!0,b=t.input.charCodeAt(++t.position),zr(t,!0,e),Gc(t,e,_1,!1,!0),y=t.result),d?Cc(t,s,v,m,g,y,n,i,a):c?s.push(Cc(t,null,v,m,g,y,n,i,a)):s.push(g),zr(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}gt(t,"unexpected end of the stream within a flow collection")}function ate(t,e){var r,n,i=z_,a=!1,o=!1,s=e,l=0,u=!1,h,c;if(c=t.input.charCodeAt(t.position),c===124)n=!1;else if(c===62)n=!0;else return!1;for(t.kind="scalar",t.result="";c!==0;)if(c=t.input.charCodeAt(++t.position),c===43||c===45)z_===i?i=c===43?QC:Uee:gt(t,"repeat of a chomping mode identifier");else if((h=Jee(c))>=0)h===0?gt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(t,"repeat of an indentation width identifier"):(s=e+h-1,o=!0);else break;if(Pu(c)){do c=t.input.charCodeAt(++t.position);while(Pu(c));if(c===35)do c=t.input.charCodeAt(++t.position);while(!no(c)&&c!==0)}for(;c!==0;){for(fS(t),t.lineIndent=0,c=t.input.charCodeAt(t.position);(!o||t.lineIndents&&(s=t.lineIndent),no(c)){l++;continue}if(t.lineIndente)&&l!==0)gt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(o=t.line,s=t.lineStart,l=t.position),$c(t,e,x1,!0,i)&&(m?v=t.result:g=t.result),m||(Sc(t,c,f,d,v,g,o,s,l),d=v=g=null),Nr(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)gt(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),c=0,f=t.implicitTypes.length;c"),t.result!==null&&v.kind!==t.kind&>(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+v.kind+'", not "'+t.kind+'"'),v.resolve(t.result,t.tag)?(t.result=v.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):gt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function lte(t){var e=t.position,r,n,i,a=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(Nr(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(a=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!oi(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&>(t,"directive name must not be less than one character in length");o!==0;){for(;Bu(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!no(o));break}if(no(o))break;for(r=t.position;o!==0&&!oi(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&fS(t),il.call(r7,n)?r7[n](t,n,i):b1(t,'unknown document directive "'+n+'"')}if(Nr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Nr(t,!0,-1)):a&>(t,"directives end mark is expected"),$c(t,t.lineIndent-1,x1,!1,!0),Nr(t,!0,-1),t.checkLineBreaks&&Uee.test(t.input.slice(e,t.position))&&b1(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Fy(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Nr(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=nI(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;it.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,"");class aI{constructor(e){this.text=e,this.type="graph",this.text+=` -`;const r=_a();try{this.type=By(e,r)}catch(a){this.type="error",this.detectError=a}const n=uS(this.type);ft.debug("Type "+this.type),this.db=n.db,this.renderer=n.renderer,this.parser=n.parser;const i=this.parser.parse.bind(this.parser);this.parser.parse=a=>i(gte(iI(a,this.db,v1))),this.parser.parser.yy=this.db,this.init=n.init,this.parse()}parse(){var e,r,n;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e),(n=this.init)==null||n.call(this,_a()),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}}const pS=async t=>{const e=By(t,_a());try{uS(e)}catch{const n=iK(e);if(!n)throw new iE(`Diagram ${e} not found.`);const{id:i,diagram:a}=await n();y1(i,a)}return new aI(t)};let G4=[];const hSe=t=>{G4.push(t)},mte=()=>{G4.forEach(t=>{t()}),G4=[]},yte="graphics-document document";function _te(t,e){t.attr("role",yte),e!==""&&t.attr("aria-roledescription",e)}function xte(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}const oI=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],bte=5e4,Ste="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",wte="sandbox",Cte="loose",Ate="http://www.w3.org/2000/svg",Tte="http://www.w3.org/1999/xlink",kte="http://www.w3.org/1999/xhtml",Dte="100%",Mte="100%",Lte="border:0;margin:0;",Ete="margin:0",Ite="allow-top-navigation-by-user-activation allow-popups",Bte='The "iframe" tag is not supported by your browser.',Pte=["foreignobject"],Rte=["dominant-baseline"];async function Fte(t,e){hS();try{await pS(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}const Ote=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},Nte=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},a7=(t,e,r=[])=>` -.${t} ${e} { ${r.join(" !important; ")} !important; }`,zte=(t,e,r={})=>{var n;let i="";if(t.themeCSS!==void 0&&(i+=` +`,a?1+l:l),a=!0,o=!0,l=0,r=t.position;!no(c)&&c!==0;)c=t.input.charCodeAt(++t.position);Js(t,r,t.position,!1)}return!0}function i7(t,e){var r,n=t.tag,i=t.anchor,a=[],o,s=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,gt(t,"tab characters must not be used in indentation")),!(l!==45||(o=t.input.charCodeAt(t.position+1),!oi(o))));){if(s=!0,t.position++,zr(t,!0,-1)&&t.lineIndent<=e){a.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Gc(t,e,KE,!1,!0),a.push(t.result),zr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)gt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(o=t.line,s=t.lineStart,l=t.position),Gc(t,e,x1,!0,i)&&(m?v=t.result:g=t.result),m||(Cc(t,c,f,d,v,g,o,s,l),d=v=g=null),zr(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)gt(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),c=0,f=t.implicitTypes.length;c"),t.result!==null&&v.kind!==t.kind&>(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+v.kind+'", not "'+t.kind+'"'),v.resolve(t.result,t.tag)?(t.result=v.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):gt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}function hte(t){var e=t.position,r,n,i,a=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(zr(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(a=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!oi(o);)o=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&>(t,"directive name must not be less than one character in length");o!==0;){for(;Pu(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!no(o));break}if(no(o))break;for(r=t.position;o!==0&&!oi(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}o!==0&&fS(t),il.call(r7,n)?r7[n](t,n,i):b1(t,'unknown document directive "'+n+'"')}if(zr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,zr(t,!0,-1)):a&>(t,"directives end mark is expected"),Gc(t,t.lineIndent-1,x1,!1,!0),zr(t,!0,-1),t.checkLineBreaks&&Xee.test(t.input.slice(e,t.position))&&b1(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Oy(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,zr(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=nI(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;it.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm,"");class aI{constructor(e){this.text=e,this.type="graph",this.text+=` +`;const r=_a();try{this.type=Py(e,r)}catch(a){this.type="error",this.detectError=a}const n=uS(this.type);ft.debug("Type "+this.type),this.db=n.db,this.renderer=n.renderer,this.parser=n.parser;const i=this.parser.parse.bind(this.parser);this.parser.parse=a=>i(yte(iI(a,this.db,v1))),this.parser.parser.yy=this.db,this.init=n.init,this.parse()}parse(){var e,r,n;if(this.detectError)throw this.detectError;(r=(e=this.db).clear)==null||r.call(e),(n=this.init)==null||n.call(this,_a()),this.parser.parse(this.text)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}}const pS=async t=>{const e=Py(t,_a());try{uS(e)}catch{const n=oK(e);if(!n)throw new iE(`Diagram ${e} not found.`);const{id:i,diagram:a}=await n();y1(i,a)}return new aI(t)};let H4=[];const fSe=t=>{H4.push(t)},_te=()=>{H4.forEach(t=>{t()}),H4=[]},xte="graphics-document document";function bte(t,e){t.attr("role",xte),e!==""&&t.attr("aria-roledescription",e)}function Ste(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}const oI=["graph","flowchart","flowchart-v2","flowchart-elk","stateDiagram","stateDiagram-v2"],wte=5e4,Cte="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Ate="sandbox",Tte="loose",kte="http://www.w3.org/2000/svg",Dte="http://www.w3.org/1999/xlink",Mte="http://www.w3.org/1999/xhtml",Lte="100%",Ete="100%",Ite="border:0;margin:0;",Bte="margin:0",Pte="allow-top-navigation-by-user-activation allow-popups",Rte='The "iframe" tag is not supported by your browser.',Fte=["foreignobject"],Ote=["dominant-baseline"];async function Nte(t,e){hS();try{await pS(t)}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}return!0}const zte=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},Vte=function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},a7=(t,e,r=[])=>` +.${t} ${e} { ${r.join(" !important; ")} !important; }`,$te=(t,e,r={})=>{var n;let i="";if(t.themeCSS!==void 0&&(i+=` ${t.themeCSS}`),t.fontFamily!==void 0&&(i+=` :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(i+=` -:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!x_(r)&&oI.includes(e)){const l=t.htmlLabels||((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const u in r){const h=r[u];x_(h.styles)||l.forEach(c=>{i+=a7(h.id,c,h.styles)}),x_(h.textStyles)||(i+=a7(h.id,"tspan",h.textStyles))}}return i},Vte=(t,e,r,n)=>{const i=zte(t,e,r),a=gQ(e,i,t.themeVariables);return rV(iV(`${n}{${a}}`),nV)},$te=(t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Nte(n),n=n.replace(/
/g,"
"),n},Gte=(t="",e)=>{var r,n;const i=(n=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&n.height?e.viewBox.baseVal.height+"px":Mte,a=btoa(''+t+"");return``},o7=(t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Ate);return i&&o.attr("xmlns:xlink",i),o.append("g"),t};function s7(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const Hte=(t,e,r,n)=>{var i,a,o;(i=t.getElementById(e))==null||i.remove(),(a=t.getElementById(r))==null||a.remove(),(o=t.getElementById(n))==null||o.remove()},qte=async function(t,e,r){var n,i,a,o;hS(),g1(),iI(e,{},v1);const s=Tm.detectInit(e);s&&v1(s);const l=_a();ft.debug(l),e.length>((l==null?void 0:l.maxTextSize)??bte)&&(e=Ste),e=e.replace(/\r\n?/g,` -`),e=e.replace(/<(\w+)([^>]*)>/g,(se,ae,ce)=>"<"+ae+ce.replace(/="([^"]*)"/g,"='$1'")+">");const u="#"+t,h="i"+t,c="#"+h,f="d"+t,d="#"+f;let v=Ni("body");const g=l.securityLevel===wte,m=l.securityLevel===Cte,y=l.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const se=s7(Ni(r),h);v=Ni(se.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=Ni(r);o7(v,t,f,`font-family: ${y}`,Tte)}else{if(Hte(document,t,f,h),g){const se=s7(Ni("body"),h);v=Ni(se.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=Ni("body");o7(v,t,f)}e=Ote(e);let b,w;try{b=await pS(e)}catch(se){b=new aI("error"),w=se}const T=v.select(d).node(),M=b.type,D=T.firstChild,P=D.firstChild,O=oI.includes(M)?b.renderer.getClasses(e,b):{},V=Vte(l,M,O,u),$=document.createElement("style");$.innerHTML=V,D.insertBefore($,P);try{await b.renderer.draw(e,t,ZC,b)}catch(se){throw ZJ.draw(e,t,ZC),se}const H=v.select(`${d} svg`),j=(i=(n=b.db).getAccTitle)==null?void 0:i.call(n),q=(o=(a=b.db).getAccDescription)==null?void 0:o.call(a);Ute(M,H,j,q),v.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",kte);let G=v.select(d).node().innerHTML;if(ft.debug("config.arrowMarkerAbsolute",l.arrowMarkerAbsolute),G=$te(G,g,eE(l.arrowMarkerAbsolute)),g){const se=v.select(d+" svg").node();G=Gte(G,se)}else m||(G=f1.sanitize(G,{ADD_TAGS:Pte,ADD_ATTR:Rte}));if(mte(),w)throw w;const K=Ni(g?c:d).node();return K&&"remove"in K&&K.remove(),{svg:G,bindFunctions:b.db.bindFunctions}};function Wte(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),EK(t),t!=null&&t.theme&&t.theme in $o?t.themeVariables=$o[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=$o.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?LK(t):cE();rS(r.logLevel),hS()}function Ute(t,e,r,n){_te(e,t),xte(e,r,n,e.attr("id"))}const Uu=Object.freeze({render:qte,parse:Fte,parseDirective:HE,getDiagramFromText:pS,initialize:Wte,getConfig:_a,setConfig:BK,getSiteConfig:cE,updateSiteConfig:IK,reset:()=>{g1()},globalReset:()=>{g1(Ld)},defaultConfig:Ld});rS(_a().logLevel);g1(_a());const Yte=async()=>{ft.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(zc).map(async([r,{detector:n,loader:i}])=>{if(i)try{uS(r)}catch{try{const{diagram:o,id:s}=await i();y1(s,o,n)}catch(o){throw ft.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete zc[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){ft.error(`Failed to load ${e.length} external diagrams`);for(const r of e)ft.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},Xte=(t,e,r)=>{ft.warn(t),uE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},sI=async function(t={querySelector:".mermaid"}){try{await Zte(t)}catch(e){if(uE(e)&&ft.error(e.str),Xi.parseError&&Xi.parseError(e),!t.suppressErrors)throw ft.error("Use the suppressErrors option to suppress these errors"),e}},Zte=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Uu.getConfig();ft.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");ft.debug(`Found ${i.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(ft.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Uu.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const a=new Tm.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let o;const s=[];for(const l of Array.from(i)){ft.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${a.next()}`;o=l.innerHTML,o=uU(Tm.entityDecode(o)).trim().replace(//gi,"
");const h=Tm.detectInit(o);h&&ft.debug("Detected early reinit: ",h);try{const{svg:c,bindFunctions:f}=await cI(u,o,l);l.innerHTML=c,t&&await t(u),f&&f(l)}catch(c){Xte(c,s,Xi.parseError)}}if(s.length>0)throw s[0]},lI=function(t){Uu.initialize(t)},jte=async function(t,e,r){ft.warn("mermaid.init is deprecated. Please use run instead."),t&&lI(t);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await sI(n)},Kte=async(t,{lazyLoad:e=!0}={})=>{aE(...t),e===!1&&await Yte()},uI=function(){if(Xi.startOnLoad){const{startOnLoad:t}=Uu.getConfig();t&&Xi.run().catch(e=>ft.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*! +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!b_(r)&&oI.includes(e)){const l=t.htmlLabels||((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const u in r){const h=r[u];b_(h.styles)||l.forEach(c=>{i+=a7(h.id,c,h.styles)}),b_(h.textStyles)||(i+=a7(h.id,"tspan",h.textStyles))}}return i},Gte=(t,e,r,n)=>{const i=$te(t,e,r),a=yQ(e,i,t.themeVariables);return rV(iV(`${n}{${a}}`),nV)},Hte=(t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Vte(n),n=n.replace(/
/g,"
"),n},qte=(t="",e)=>{var r,n;const i=(n=(r=e==null?void 0:e.viewBox)==null?void 0:r.baseVal)!=null&&n.height?e.viewBox.baseVal.height+"px":Ete,a=btoa(''+t+"");return``},o7=(t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",kte);return i&&o.attr("xmlns:xlink",i),o.append("g"),t};function s7(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const Wte=(t,e,r,n)=>{var i,a,o;(i=t.getElementById(e))==null||i.remove(),(a=t.getElementById(r))==null||a.remove(),(o=t.getElementById(n))==null||o.remove()},Ute=async function(t,e,r){var n,i,a,o;hS(),g1(),iI(e,{},v1);const s=Tm.detectInit(e);s&&v1(s);const l=_a();ft.debug(l),e.length>((l==null?void 0:l.maxTextSize)??wte)&&(e=Cte),e=e.replace(/\r\n?/g,` +`),e=e.replace(/<(\w+)([^>]*)>/g,(se,ae,ce)=>"<"+ae+ce.replace(/="([^"]*)"/g,"='$1'")+">");const u="#"+t,h="i"+t,c="#"+h,f="d"+t,d="#"+f;let v=Ni("body");const g=l.securityLevel===Ate,m=l.securityLevel===Tte,y=l.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const se=s7(Ni(r),h);v=Ni(se.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=Ni(r);o7(v,t,f,`font-family: ${y}`,Dte)}else{if(Wte(document,t,f,h),g){const se=s7(Ni("body"),h);v=Ni(se.nodes()[0].contentDocument.body),v.node().style.margin=0}else v=Ni("body");o7(v,t,f)}e=zte(e);let b,w;try{b=await pS(e)}catch(se){b=new aI("error"),w=se}const T=v.select(d).node(),M=b.type,D=T.firstChild,P=D.firstChild,O=oI.includes(M)?b.renderer.getClasses(e,b):{},V=Gte(l,M,O,u),$=document.createElement("style");$.innerHTML=V,D.insertBefore($,P);try{await b.renderer.draw(e,t,ZC,b)}catch(se){throw KJ.draw(e,t,ZC),se}const H=v.select(`${d} svg`),j=(i=(n=b.db).getAccTitle)==null?void 0:i.call(n),q=(o=(a=b.db).getAccDescription)==null?void 0:o.call(a);Xte(M,H,j,q),v.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Mte);let G=v.select(d).node().innerHTML;if(ft.debug("config.arrowMarkerAbsolute",l.arrowMarkerAbsolute),G=Hte(G,g,eE(l.arrowMarkerAbsolute)),g){const se=v.select(d+" svg").node();G=qte(G,se)}else m||(G=f1.sanitize(G,{ADD_TAGS:Fte,ADD_ATTR:Ote}));if(_te(),w)throw w;const K=Ni(g?c:d).node();return K&&"remove"in K&&K.remove(),{svg:G,bindFunctions:b.db.bindFunctions}};function Yte(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),BK(t),t!=null&&t.theme&&t.theme in Ho?t.themeVariables=Ho[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ho.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?IK(t):cE();rS(r.logLevel),hS()}function Xte(t,e,r,n){bte(e,t),Ste(e,r,n,e.attr("id"))}const Xu=Object.freeze({render:Ute,parse:Nte,parseDirective:HE,getDiagramFromText:pS,initialize:Yte,getConfig:_a,setConfig:RK,getSiteConfig:cE,updateSiteConfig:PK,reset:()=>{g1()},globalReset:()=>{g1(Ed)},defaultConfig:Ed});rS(_a().logLevel);g1(_a());const Zte=async()=>{ft.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Vc).map(async([r,{detector:n,loader:i}])=>{if(i)try{uS(r)}catch{try{const{diagram:o,id:s}=await i();y1(s,o,n)}catch(o){throw ft.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Vc[r],o}}}))).filter(r=>r.status==="rejected");if(e.length>0){ft.error(`Failed to load ${e.length} external diagrams`);for(const r of e)ft.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},jte=(t,e,r)=>{ft.warn(t),uE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},sI=async function(t={querySelector:".mermaid"}){try{await Kte(t)}catch(e){if(uE(e)&&ft.error(e.str),Xi.parseError&&Xi.parseError(e),!t.suppressErrors)throw ft.error("Use the suppressErrors option to suppress these errors"),e}},Kte=async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Xu.getConfig();ft.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");ft.debug(`Found ${i.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(ft.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Xu.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const a=new Tm.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let o;const s=[];for(const l of Array.from(i)){ft.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${a.next()}`;o=l.innerHTML,o=cU(Tm.entityDecode(o)).trim().replace(//gi,"
");const h=Tm.detectInit(o);h&&ft.debug("Detected early reinit: ",h);try{const{svg:c,bindFunctions:f}=await cI(u,o,l);l.innerHTML=c,t&&await t(u),f&&f(l)}catch(c){jte(c,s,Xi.parseError)}}if(s.length>0)throw s[0]},lI=function(t){Xu.initialize(t)},Jte=async function(t,e,r){ft.warn("mermaid.init is deprecated. Please use run instead."),t&&lI(t);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await sI(n)},Qte=async(t,{lazyLoad:e=!0}={})=>{aE(...t),e===!1&&await Zte()},uI=function(){if(Xi.startOnLoad){const{startOnLoad:t}=Xu.getConfig();t&&Xi.run().catch(e=>ft.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){/*! * Wait for document loaded before starting the execution - */window.addEventListener("load",uI,!1)}const Jte=function(t){Xi.parseError=t},S1=[];let z_=!1;const hI=async()=>{if(!z_){for(z_=!0;S1.length>0;){const t=S1.shift();if(t)try{await t()}catch(e){ft.error("Error executing queue",e)}}z_=!1}},Qte=async(t,e)=>new Promise((r,n)=>{const i=()=>new Promise((a,o)=>{Uu.parse(t,e).then(s=>{a(s),r(s)},s=>{var l;ft.error("Error parsing",s),(l=Xi.parseError)==null||l.call(Xi,s),o(s),n(s)})});S1.push(i),hI().catch(n)}),cI=(t,e,r)=>new Promise((n,i)=>{const a=()=>new Promise((o,s)=>{Uu.render(t,e,r).then(l=>{o(l),n(l)},l=>{var u;ft.error("Error parsing",l),(u=Xi.parseError)==null||u.call(Xi,l),s(l),i(l)})});S1.push(a),hI().catch(i)}),Xi={startOnLoad:!0,mermaidAPI:Uu,parse:Qte,render:cI,init:jte,run:sI,registerExternalDiagrams:Kte,initialize:lI,parseError:void 0,contentLoaded:uI,setParseErrorHandler:Jte,detectType:By},cSe={__name:"MermaidRenderer",props:{content:{type:String,required:!0,default:""}},setup(t){const e=t,{t:r}=sp();Xi.mermaidAPI.initialize({startOnLoad:!1,securityLevel:"loose"});const n=js(),i=js(e.content),a=async()=>{var u;if(!i.value)return;const s=((u=i.value.match(/```mermaid((.|\n)*?)```/))==null?void 0:u[1])||i.value,{svg:l}=await Xi.render("graphDiv",s);n.value.innerHTML=l};B3(()=>{a()}),Su(()=>e.content,()=>{i.value=e.content,a()});const o=()=>{const s=new XMLSerializer().serializeToString(n.value),l=new Blob([s],{type:"image/svg+xml"});iL.saveAs(l,"mermaid.svg")};return(s,l)=>{const u=ii("a-col"),h=ii("a-button"),c=ii("a-row");return Lr(),Pc(c,null,{default:An(()=>[Jr(u,{span:24},{default:An(()=>[mr("div",{class:"mermaid",ref_key:"mermaidRef",ref:n,style:{width:"100%","min-height":"50vh"}},null,512)]),_:1}),Jr(u,{span:24},{default:An(()=>[Jr(h,{onClick:o,type:"primary"},{default:An(()=>[I3(zs(Ks(r)("components.workspace.mindmapRenderer.download_svg")),1)]),_:1})]),_:1})]),_:1})}}};/*! ***************************************************************************** + */window.addEventListener("load",uI,!1)}const ere=function(t){Xi.parseError=t},S1=[];let V_=!1;const hI=async()=>{if(!V_){for(V_=!0;S1.length>0;){const t=S1.shift();if(t)try{await t()}catch(e){ft.error("Error executing queue",e)}}V_=!1}},tre=async(t,e)=>new Promise((r,n)=>{const i=()=>new Promise((a,o)=>{Xu.parse(t,e).then(s=>{a(s),r(s)},s=>{var l;ft.error("Error parsing",s),(l=Xi.parseError)==null||l.call(Xi,s),o(s),n(s)})});S1.push(i),hI().catch(n)}),cI=(t,e,r)=>new Promise((n,i)=>{const a=()=>new Promise((o,s)=>{Xu.render(t,e,r).then(l=>{o(l),n(l)},l=>{var u;ft.error("Error parsing",l),(u=Xi.parseError)==null||u.call(Xi,l),s(l),i(l)})});S1.push(a),hI().catch(i)}),Xi={startOnLoad:!0,mermaidAPI:Xu,parse:tre,render:cI,init:Jte,run:sI,registerExternalDiagrams:Qte,initialize:lI,parseError:void 0,contentLoaded:uI,setParseErrorHandler:ere,detectType:Py},dSe={__name:"MermaidRenderer",props:{content:{type:String,required:!0,default:""}},setup(t){const e=t,{t:r}=lp();Xi.mermaidAPI.initialize({startOnLoad:!1,securityLevel:"loose"});const n=Ks(),i=Ks(e.content),a=async()=>{var u;if(!i.value)return;const s=((u=i.value.match(/```mermaid((.|\n)*?)```/))==null?void 0:u[1])||i.value,{svg:l}=await Xi.render("graphDiv",s);n.value.innerHTML=l};B3(()=>{a()}),wu(()=>e.content,()=>{i.value=e.content,a()});const o=()=>{const s=new XMLSerializer().serializeToString(n.value),l=new Blob([s],{type:"image/svg+xml"});iL.saveAs(l,"mermaid.svg")};return(s,l)=>{const u=Gn("a-col"),h=Gn("a-button"),c=Gn("a-row");return Sr(),Wu(c,null,{default:hn(()=>[Nr(u,{span:24},{default:hn(()=>[mr("div",{class:"mermaid",ref_key:"mermaidRef",ref:n,style:{width:"100%","min-height":"50vh"}},null,512)]),_:1}),Nr(u,{span:24},{default:hn(()=>[Nr(h,{onClick:o,type:"primary"},{default:hn(()=>[xy(Oo(Go(r)("components.workspace.mindmapRenderer.download_svg")),1)]),_:1})]),_:1})]),_:1})}}};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -456,8 +456,8 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var H4=function(t,e){return H4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},H4(t,e)};function pe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");H4(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ere=function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t}(),tre=function(){function t(){this.browser=new ere,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return t}(),uu=new tre;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(uu.wxa=!0,uu.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?uu.worker=!0:typeof navigator>"u"?(uu.node=!0,uu.svgSupported=!0):rre(navigator.userAgent,uu);function rre(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}const zt=uu;var vS=12,fI="sans-serif",al=vS+"px "+fI,nre=20,ire=100,are="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function ore(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function Mre(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,f=h.left,d=h.top;o.push(f,d),l=l&&a&&f===a[c]&&d===a[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?c7(s,o):c7(o,s))}function _I(t){return t.nodeName.toUpperCase()==="CANVAS"}var Lre=/([&<>"'])/g,Ere={"&":"&","<":"<",">":">",'"':""","'":"'"};function ei(t){return t==null?"":(t+"").replace(Lre,function(e,r){return Ere[r]})}var Ire=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$_=[],Bre=zt.browser.firefox&&+zt.browser.version.split(".")[0]<39;function j4(t,e,r,n){return r=r||{},n?d7(t,e,r):Bre&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):d7(t,e,r),r}function d7(t,e,r){if(zt.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(_I(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(Z4($_,t,n,i)){r.zrX=$_[0],r.zrY=$_[1];return}}r.zrX=r.zrY=0}function SS(t){return t||window.event}function Fi(t,e,r){if(e=SS(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&j4(t,o,e,r)}else{j4(t,e,e,r);var a=Pre(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Ire.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Pre(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function K4(t,e,r,n){t.addEventListener(e,r,n)}function Rre(t,e,r,n){t.removeEventListener(e,r,n)}var Zo=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function p7(t){return t.which===2||t.which===3}var Fre=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=v7(n)/v7(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Ore(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function Zi(){return[1,0,0,1,0,0]}function Vy(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wS(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ho(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function lo(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function th(t,e,r){var n=e[0],i=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(r),h=Math.cos(r);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=i*h+s*u,t[3]=-i*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function CS(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function Qc(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function Nre(t){var e=Zi();return wS(e,t),e}var zre=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}();const _t=zre;var og=Math.min,sg=Math.max,Nl=new _t,zl=new _t,Vl=new _t,$l=new _t,i0=new _t,a0=new _t,Vre=function(){function t(e,r,n,i){n<0&&(e=e+n,n=-n),i<0&&(r=r+i,i=-i),this.x=e,this.y=r,this.width=n,this.height=i}return t.prototype.union=function(e){var r=og(e.x,this.x),n=og(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=sg(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=sg(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=Zi();return lo(a,a,[-r.x,-r.y]),CS(a,a,[n,i]),lo(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,f=!(av&&(v=w,gv&&(v=T,y=n.x&&e<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Nl.x=Vl.x=r.x,Nl.y=$l.y=r.y,zl.x=$l.x=r.x+r.width,zl.y=Vl.y=r.y+r.height,Nl.transform(n),$l.transform(n),zl.transform(n),Vl.transform(n),e.x=og(Nl.x,zl.x,Vl.x,$l.x),e.y=og(Nl.y,zl.y,Vl.y,$l.y);var l=sg(Nl.x,zl.x,Vl.x,$l.x),u=sg(Nl.y,zl.y,Vl.y,$l.y);e.width=l-e.x,e.height=u-e.y},t}();const St=Vre;var xI="silent";function $re(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Gre}}function Gre(){Zo(this.event)}var Hre=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ki),o0=function(){function t(e,r){this.x=e,this.y=r}return t}(),qre=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],H_=new St(0,0,0,0),bI=function(t){pe(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new o0(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new Hre,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new Cre(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(W(qre,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=SI(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new o0(n,i):this.findHover(n,i),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new o0(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=$re(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new o0(r,n);if(g7(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new St(r-u,n-u,l,l),c=a.length-1;c>=0;c--){var f=a[c];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(H_.copy(f.getBoundingRect()),f.transform&&H_.applyTransform(f.transform),H_.intersect(h)&&s.push(f))}if(s.length)for(var d=4,v=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function Wre(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?xI:!0}return!1}function g7(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=Wre(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==xI)){e.target=o;break}}}function SI(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}const Ure=bI;var wI=32,s0=7;function Yre(t){for(var e=0;t>=wI;)e|=t&1,t>>=1;return t+e}function m7(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function Xre(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function q_(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+h])>0?o=h+1:l=h}return l}function W_(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+h])<0?l=h:o=h+1}return l}function Zre(t,e){var r=s0,n,i,a=0;t.length;var o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;h(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=s0||P>=s0);if(O)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),v===1){for(y=0;y=0;y--)t[D+y]=t[M+y];t[T]=o[w];return}for(var P=r;;){var O=0,V=0,$=!1;do if(e(o[w],t[b])<0){if(t[T--]=t[b--],O++,V=0,--v===0){$=!0;break}}else if(t[T--]=o[w--],V++,O=0,--m===1){$=!0;break}while((O|V)=0;y--)t[D+y]=t[M+y];if(v===0){$=!0;break}}if(t[T--]=o[w--],--m===1){$=!0;break}if(V=m-q_(t[b],o,0,m,m-1,e),V!==0){for(T-=V,w-=V,m-=V,D=T+1,M=w+1,y=0;y=s0||V>=s0);if($)break;P<0&&(P=0),P+=2}if(r=P,r<1&&(r=1),m===1){for(T-=v,b-=v,D=T+1,M=b+1,y=v-1;y>=0;y--)t[D+y]=t[M+y];t[T]=o[w]}else{if(m===0)throw new Error;for(M=T-(m-1),y=0;ys&&(l=s),y7(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var _i=1,$0=2,gc=4,_7=!1;function U_(){_7||(_7=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function x7(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var jre=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=x7}return t.prototype.traverse=function(e,r){for(var n=0;n0&&(h.__clipPaths=[]),isNaN(h.z)&&(U_(),h.z=0),isNaN(h.z2)&&(U_(),h.z2=0),isNaN(h.zlevel)&&(U_(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,r,n);var f=e.getTextGuideLine();f&&this._updateAndAddDisplayable(f,r,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,r,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();const Kre=jre;var CI;CI=zt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};const J4=CI;var Im={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Im.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Im.bounceIn(t*2)*.5:Im.bounceOut(t*2-1)*.5+.5}};const AI=Im;var lg=Math.pow,Qs=Math.sqrt,A1=1e-8,TI=1e-4,b7=Qs(3),ug=1/3,Za=eh(),$i=eh(),Mc=eh();function qs(t){return t>-A1&&tA1||t<-A1}function Wr(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function S7(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function T1(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,h=s*s-3*o*l,c=s*l-9*o*u,f=l*l-3*s*u,d=0;if(qs(h)&&qs(c))if(qs(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var g=c*c-4*h*f;if(qs(g)){var m=c/h,v=-s/o+m,y=-m/2;v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var b=Qs(g),w=h*s+1.5*o*(-c+b),T=h*s+1.5*o*(-c-b);w<0?w=-lg(-w,ug):w=lg(w,ug),T<0?T=-lg(-T,ug):T=lg(T,ug);var v=(-s-(w+T))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var M=(2*h*s-3*o*c)/(2*Qs(h*h*h)),D=Math.acos(M)/3,P=Qs(h),O=Math.cos(D),v=(-s-2*P*O)/(3*o),y=(-s+P*(O+b7*Math.sin(D)))/(3*o),V=(-s+P*(O-b7*Math.sin(D)))/(3*o);v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y),V>=0&&V<=1&&(a[d++]=V)}}return d}function DI(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(qs(o)){if(kI(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var h=a*a-4*o*s;if(qs(h))i[0]=-a/(2*o);else if(h>0){var c=Qs(h),u=(-a+c)/(2*o),f=(-a-c)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function sl(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,h=(l-s)*i+s,c=(h-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function MI(t,e,r,n,i,a,o,s,l,u,h){var c,f=.005,d=1/0,v,g,m,y;Za[0]=l,Za[1]=u;for(var b=0;b<1;b+=.05)$i[0]=Wr(t,r,i,o,b),$i[1]=Wr(e,n,a,s,b),m=Pu(Za,$i),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*a*s;if(qs(h)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var c=Qs(h),u=(-o+c)/(2*a),f=(-o-c)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function LI(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Pd(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function EI(t,e,r,n,i,a,o,s,l){var u,h=.005,c=1/0;Za[0]=o,Za[1]=s;for(var f=0;f<1;f+=.05){$i[0]=Kr(t,r,i,f),$i[1]=Kr(e,n,a,f);var d=Pu(Za,$i);d=0&&d=1?1:T1(0,n,a,1,l,s)&&Wr(0,i,o,1,s[0])}}}var rne=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ir,this.ondestroy=e.ondestroy||Ir,this.onrestart=e.onrestart||Ir,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Je(e)?e:AI[e]||AS(e)},t}();const nne=rne;var II=function(){function t(e){this.value=e}return t}(),ine=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new II(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),ane=function(){function t(e){this._list=new ine,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new II(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();const dp=ane;var w7={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ga(t){return t=Math.round(t),t<0?0:t>255?255:t}function one(t){return t=Math.round(t),t<0?0:t>360?360:t}function Rd(t){return t<0?0:t>1?1:t}function Y_(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?ga(parseFloat(e)/100*255):ga(parseInt(e,10))}function Ru(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Rd(parseFloat(e)/100):Rd(parseFloat(e))}function X_(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Ws(t,e,r){return t+(e-t)*r}function Ri(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function e5(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var BI=new dp(20),hg=null;function jh(t,e){hg&&e5(hg,e),hg=BI.put(t,hg||e.slice())}function bi(t,e){if(t){e=e||[];var r=BI.get(t);if(r)return e5(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in w7)return e5(e,w7[n]),jh(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Ri(e,0,0,0,1);return}return Ri(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),jh(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ri(e,0,0,0,1);return}return Ri(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),jh(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ri(e,+u[0],+u[1],+u[2],1):Ri(e,0,0,0,1);h=Ru(u.pop());case"rgb":if(u.length>=3)return Ri(e,Y_(u[0]),Y_(u[1]),Y_(u[2]),u.length===3?h:Ru(u[3])),jh(t,e),e;Ri(e,0,0,0,1);return;case"hsla":if(u.length!==4){Ri(e,0,0,0,1);return}return u[3]=Ru(u[3]),t5(u,e),jh(t,e),e;case"hsl":if(u.length!==3){Ri(e,0,0,0,1);return}return t5(u,e),jh(t,e),e;default:return}}Ri(e,0,0,0,1)}}function t5(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Ru(t[1]),i=Ru(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Ri(e,ga(X_(o,a,r+1/3)*255),ga(X_(o,a,r)*255),ga(X_(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function sne(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var h=((a-e)/6+o/2)/o,c=((a-r)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-c:r===a?l=1/3+h-f:n===a&&(l=2/3+c-h),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return t[3]!=null&&d.push(t[3]),d}}function r5(t,e){var r=bi(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return qo(r,r.length===4?"rgba":"rgb")}}function Z_(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=ga(Ws(o[0],s[0],l)),r[1]=ga(Ws(o[1],s[1],l)),r[2]=ga(Ws(o[2],s[2],l)),r[3]=Rd(Ws(o[3],s[3],l)),r}}function lne(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=bi(e[i]),s=bi(e[a]),l=n-i,u=qo([ga(Ws(o[0],s[0],l)),ga(Ws(o[1],s[1],l)),ga(Ws(o[2],s[2],l)),Rd(Ws(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function nd(t,e,r,n){var i=bi(t);if(t)return i=sne(i),e!=null&&(i[0]=one(e)),r!=null&&(i[1]=Ru(r)),n!=null&&(i[2]=Ru(n)),qo(t5(i),"rgba")}function k1(t,e){var r=bi(t);if(r&&e!=null)return r[3]=Rd(e),qo(r,"rgba")}function qo(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function D1(t,e){var r=bi(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var M1=Math.round;function Fd(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=bi(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var C7=1e-4;function Us(t){return t-C7}function cg(t){return M1(t*1e3)/1e3}function n5(t){return M1(t*1e4)/1e4}function une(t){return"matrix("+cg(t[0])+","+cg(t[1])+","+cg(t[2])+","+cg(t[3])+","+n5(t[4])+","+n5(t[5])+")"}var hne={left:"start",right:"end",center:"middle",middle:"middle"};function cne(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function fne(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function dne(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function PI(t){return t&&!!t.image}function pne(t){return t&&!!t.svgElement}function TS(t){return PI(t)||pne(t)}function RI(t){return t.type==="linear"}function FI(t){return t.type==="radial"}function OI(t){return t&&(t.type==="linear"||t.type==="radial")}function $y(t){return"url(#"+t+")"}function NI(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function zI(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*Dm,i=xt(t.scaleX,1),a=xt(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+M1(o*Dm)+"deg, "+M1(s*Dm)+"deg)"),l.join(" ")}var vne=function(){return zt.hasGlobalWindow&&Je(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),i5=Array.prototype.slice;function Po(t,e,r){return(e-t)*r+t}function j_(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=T7,l=r;if(kn(r)){var u=_ne(r);s=u,(u===1&&!$t(r[0])||u===2&&!$t(r[0][0]))&&(o=!0)}else if($t(r)&&!Bd(r))s=dg;else if(ze(r))if(!isNaN(+r))s=dg;else{var h=bi(r);h&&(l=h,s=G0)}else if(Ny(r)){var c=xe({},l);c.colorStops=Ce(r.colorStops,function(d){return{offset:d.offset,color:bi(d.color)}}),RI(r)?s=a5:FI(r)&&(s=o5),l=c}a===0?this.valType=s:(s!==this.valType||s===T7)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:r,percent:0};return n&&(f.easing=n,f.easingFunc=Je(n)?n:AI[n]||AS(n)),i.push(f),f},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=pg(i),u=k7(i),h=0;h=0&&!(o[h].percent<=r);h--);h=f(h,s-2)}else{for(h=c;hr);h++);h=f(h-1,s-2)}v=o[h+1],d=o[h]}if(d&&v){this._lastFr=h,this._lastFrP=r;var m=v.percent-d.percent,y=m===0?1:f((r-d.percent)/m,1);v.easingFunc&&(y=v.easingFunc(y));var b=n?this._additiveValue:u?l0:e[l];if((pg(a)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:v.rawValue;else if(pg(a))a===Pm?j_(b,d[i],v[i],y):gne(b,d[i],v[i],y);else if(k7(a)){var w=d[i],T=v[i],M=a===a5;e[l]={type:M?"linear":"radial",x:Po(w.x,T.x,y),y:Po(w.y,T.y,y),colorStops:Ce(w.colorStops,function(P,O){var V=T.colorStops[O];return{offset:Po(P.offset,V.offset,y),color:Bm(j_([],P.color,V.color,y))}}),global:T.global},M?(e[l].x2=Po(w.x2,T.x2,y),e[l].y2=Po(w.y2,T.y2,y)):e[l].r=Po(w.r,T.r,y)}else if(u)j_(b,d[i],v[i],y),n||(e[l]=Bm(b));else{var D=Po(d[i],v[i],y);n?this._additiveValue=D:e[l]=D}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===dg?e[n]=e[n]+i:r===G0?(bi(e[n],l0),fg(l0,l0,i,1),e[n]=Bm(l0)):r===Pm?fg(e[n],e[n],i,1):r===VI&&A7(e[n],e[n],i,1)},t}(),kS=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){yS("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Lt(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,id(u),i),this._trackKeys.push(s)}l.addKeyframe(e,id(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function wc(){return new Date().getTime()}var bne=function(t){pe(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=wc()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(J4(n),!r._paused&&r.update())}J4(n)},e.prototype.start=function(){this._running||(this._time=wc(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=wc(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=wc()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new kS(r,n.loop);return this.addAnimator(i),i},e}(Ki);const Sne=bne;var wne=300,K_=zt.domSupported,J_=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=Ce(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),D7={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},M7=!1;function s5(t){var e=t.pointerType;return e==="pen"||e==="touch"}function Cne(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function Q_(t){t&&(t.zrByTouch=!0)}function Ane(t,e){return Fi(t.dom,new Tne(t,e),!0)}function $I(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var Tne=function(){function t(e,r){this.stopPropagation=Ir,this.stopImmediatePropagation=Ir,this.preventDefault=Ir,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),ua={mousedown:function(t){t=Fi(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Fi(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Fi(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Fi(this.dom,t);var e=t.toElement||t.relatedTarget;$I(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){M7=!0,t=Fi(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){M7||(t=Fi(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Fi(this.dom,t),Q_(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),ua.mousemove.call(this,t),ua.mousedown.call(this,t)},touchmove:function(t){t=Fi(this.dom,t),Q_(t),this.handler.processGesture(t,"change"),ua.mousemove.call(this,t)},touchend:function(t){t=Fi(this.dom,t),Q_(t),this.handler.processGesture(t,"end"),ua.mouseup.call(this,t),+new Date-+this.__lastTouchMomentI7||t<-I7}var Hl=[],Kh=[],tx=Zi(),rx=Math.abs,Ine=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Gl(this.rotation)||Gl(this.x)||Gl(this.y)||Gl(this.scaleX-1)||Gl(this.scaleY-1)||Gl(this.skewX)||Gl(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(E7(n),this.invTransform=null);return}n=n||Zi(),r?this.getLocalTransform(n):E7(n),e&&(r?Ho(n,e,n):wS(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Hl);var n=Hl[0]<0?-1:1,i=Hl[1]<0?-1:1,a=((Hl[0]-n)*r+n)/Hl[0]||0,o=((Hl[1]-i)*r+i)/Hl[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Zi(),Qc(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(Ho(Kh,e.invTransform,r),r=Kh);var n=this.originX,i=this.originY;(n||i)&&(tx[4]=n,tx[5]=i,Ho(Kh,r,tx),Kh[4]-=n,Kh[5]-=i,r=Kh),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&un(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&un(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&rx(e[0]-1)>1e-10&&rx(e[3]-1)>1e-10?Math.sqrt(rx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){HI(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,h=e.x,c=e.y,f=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var v=n+s,g=i+l;r[4]=-v*a-f*g*o,r[5]=-g*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=f*o,u&&th(r,r,u),r[4]+=n+h,r[5]+=i+c,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),uo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function HI(t,e){for(var r=0;r=0?parseFloat(t)/100*e:parseFloat(t):t}function E1(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,h="left",c="top";if(n instanceof Array)l+=xa(n[0],r.width),u+=xa(n[1],r.height),h=null,c=null;else switch(n){case"left":l-=i,u+=s,h="right",c="middle";break;case"right":l+=i+o,u+=s,c="middle";break;case"top":l+=o/2,u-=i,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+i,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=i,u+=s,c="middle";break;case"insideRight":l+=o-i,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=i,h="center";break;case"insideBottom":l+=o/2,u+=a-i,h="center",c="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,h="right";break;case"insideBottomLeft":l+=i,u+=a-i,c="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,h="right",c="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var nx="__zr_normal__",ix=uo.concat(["ignore"]),Bne=so(uo,function(t,e){return t[e]=!0,t},{ignore:!1}),Jh={},Pne=new St(0,0,0,0),DS=function(){function t(e){this.id=vI(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var h=Pne;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Jh,n,h):E1(Jh,n,h),a.x=Jh.x,a.y=Jh.y,o=Jh.align,s=Jh.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var f=void 0,d=void 0;c==="center"?(f=h.width*.5,d=h.height*.5):(f=xa(c[0],h.width),d=xa(c[1],h.height)),u=!0,a.originX=-a.x+f+(i?0:h.x),a.originY=-a.y+d+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],u||(a.originX=-v[0],a.originY=-v[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,b=void 0,w=void 0;g&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(y),w=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(y),w=!0)),y=y||"#000",(y!==m.fill||b!==m.stroke||w!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=y,m.stroke=b,m.autoStroke=w,m.align=o,m.verticalAlign=s,r.setDefaultTextStyle(m)),r.__dirty|=_i,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?c5:h5},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&bi(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,qo(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},xe(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(nt(e))for(var n=e,i=Lt(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(nx,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===nx,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ct(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){yS("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||i);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,f=this._textGuide;return c&&c.useState(e,r,n,h),f&&f.useState(e,r,n,h),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~_i),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,v);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,f),m&&m.useStates(e,r,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~_i)}},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ct(i,e),o=Ct(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(v,g){r.during(g)});for(var f=0;f0||i.force&&!o.length){var O=void 0,V=void 0,$=void 0;if(s){V={},f&&(O={});for(var T=0;T=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ct(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ct(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i"u"&&typeof self<"u"?hu.worker=!0:typeof navigator>"u"?(hu.node=!0,hu.svgSupported=!0):ire(navigator.userAgent,hu);function ire(t,e){var r=e.browser,n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&+r.version>=9}const zt=hu;var vS=12,fI="sans-serif",al=vS+"px "+fI,are=20,ore=100,sre="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function lre(t){var e={};if(typeof JSON>"u")return e;for(var r=0;r=0)s=o*r.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function Ere(t,e,r){for(var n=r?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,f=h.left,d=h.top;o.push(f,d),l=l&&a&&f===a[c]&&d===a[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=r?c7(s,o):c7(o,s))}function _I(t){return t.nodeName.toUpperCase()==="CANVAS"}var Ire=/([&<>"'])/g,Bre={"&":"&","<":"<",">":">",'"':""","'":"'"};function ti(t){return t==null?"":(t+"").replace(Ire,function(e,r){return Bre[r]})}var Pre=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,G_=[],Rre=zt.browser.firefox&&+zt.browser.version.split(".")[0]<39;function K4(t,e,r,n){return r=r||{},n?d7(t,e,r):Rre&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):d7(t,e,r),r}function d7(t,e,r){if(zt.domSupported&&t.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(_I(t)){var a=t.getBoundingClientRect();r.zrX=n-a.left,r.zrY=i-a.top;return}else if(j4(G_,t,n,i)){r.zrX=G_[0],r.zrY=G_[1];return}}r.zrX=r.zrY=0}function SS(t){return t||window.event}function Fi(t,e,r){if(e=SS(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&K4(t,o,e,r)}else{K4(t,e,e,r);var a=Fre(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Pre.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Fre(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,n=t.deltaY;if(r==null||n==null)return e;var i=Math.abs(n!==0?n:r),a=n>0?-1:n<0?1:r>0?-1:1;return 3*i*a}function J4(t,e,r,n){t.addEventListener(e,r,n)}function Ore(t,e,r,n){t.removeEventListener(e,r,n)}var Ko=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function p7(t){return t.which===2||t.which===3}var Nre=function(){function t(){this._track=[]}return t.prototype.recognize=function(e,r,n){return this._doTrack(e,r,n),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,r,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:r,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=v7(n)/v7(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=zre(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}};function Zi(){return[1,0,0,1,0,0]}function $y(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wS(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Wo(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function lo(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function nh(t,e,r){var n=e[0],i=e[2],a=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(r),h=Math.cos(r);return t[0]=n*h+o*u,t[1]=-n*u+o*h,t[2]=i*h+s*u,t[3]=-i*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function CS(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t}function ef(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}function Vre(t){var e=Zi();return wS(e,t),e}var $re=function(){function t(e,r){this.x=e||0,this.y=r||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,r){return this.x=e,this.y=r,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,r){this.x+=e.x*r,this.y+=e.y*r},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)},t.prototype.distanceSquare=function(e){var r=this.x-e.x,n=this.y-e.y;return r*r+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var r=this.x,n=this.y;return this.x=e[0]*r+e[2]*n+e[4],this.y=e[1]*r+e[3]*n+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,r,n){e.x=r,e.y=n},t.copy=function(e,r){e.x=r.x,e.y=r.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,r){return e.x*r.x+e.y*r.y},t.add=function(e,r,n){e.x=r.x+n.x,e.y=r.y+n.y},t.sub=function(e,r,n){e.x=r.x-n.x,e.y=r.y-n.y},t.scale=function(e,r,n){e.x=r.x*n,e.y=r.y*n},t.scaleAndAdd=function(e,r,n,i){e.x=r.x+n.x*i,e.y=r.y+n.y*i},t.lerp=function(e,r,n,i){var a=1-i;e.x=a*r.x+i*n.x,e.y=a*r.y+i*n.y},t}();const _t=$re;var sg=Math.min,lg=Math.max,Nl=new _t,zl=new _t,Vl=new _t,$l=new _t,i0=new _t,a0=new _t,Gre=function(){function t(e,r,n,i){n<0&&(e=e+n,n=-n),i<0&&(r=r+i,i=-i),this.x=e,this.y=r,this.width=n,this.height=i}return t.prototype.union=function(e){var r=sg(e.x,this.x),n=sg(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=lg(e.x+e.width,this.x+this.width)-r:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=lg(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=r,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var r=this,n=e.width/r.width,i=e.height/r.height,a=Zi();return lo(a,a,[-r.x,-r.y]),CS(a,a,[n,i]),lo(a,a,[e.x,e.y]),a},t.prototype.intersect=function(e,r){if(!e)return!1;e instanceof t||(e=t.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,f=!(av&&(v=w,gv&&(v=T,y=n.x&&e<=n.x+n.width&&r>=n.y&&r<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,r){e.x=r.x,e.y=r.y,e.width=r.width,e.height=r.height},t.applyTransform=function(e,r,n){if(!n){e!==r&&t.copy(e,r);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=r.x*i+o,e.y=r.y*a+s,e.width=r.width*i,e.height=r.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Nl.x=Vl.x=r.x,Nl.y=$l.y=r.y,zl.x=$l.x=r.x+r.width,zl.y=Vl.y=r.y+r.height,Nl.transform(n),$l.transform(n),zl.transform(n),Vl.transform(n),e.x=sg(Nl.x,zl.x,Vl.x,$l.x),e.y=sg(Nl.y,zl.y,Vl.y,$l.y);var l=lg(Nl.x,zl.x,Vl.x,$l.x),u=lg(Nl.y,zl.y,Vl.y,$l.y);e.width=l-e.x,e.height=u-e.y},t}();const St=Gre;var xI="silent";function Hre(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:qre}}function qre(){Ko(this.event)}var Wre=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.handler=null,r}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ki),o0=function(){function t(e,r){this.x=e,this.y=r}return t}(),Ure=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],q_=new St(0,0,0,0),bI=function(t){pe(e,t);function e(r,n,i,a,o){var s=t.call(this)||this;return s._hovered=new o0(0,0),s.storage=r,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new Wre,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new Tre(s),s}return e.prototype.setHandlerProxy=function(r){this.proxy&&this.proxy.dispose(),r&&(W(Ure,function(n){r.on&&r.on(n,this[n],this)},this),r.handler=this),this.proxy=r},e.prototype.mousemove=function(r){var n=r.zrX,i=r.zrY,a=SI(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new o0(n,i):this.findHover(n,i),u=l.target,h=this.proxy;h.setCursor&&h.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",r),this.dispatchToElement(l,"mousemove",r),u&&u!==s&&this.dispatchToElement(l,"mouseover",r)},e.prototype.mouseout=function(r){var n=r.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",r),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:r})},e.prototype.resize=function(){this._hovered=new o0(0,0)},e.prototype.dispatch=function(r,n){var i=this[r];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(r){var n=this.proxy;n.setCursor&&n.setCursor(r)},e.prototype.dispatchToElement=function(r,n,i){r=r||{};var a=r.target;if(!(a&&a.silent)){for(var o="on"+n,s=Hre(n,r,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(r,n,i){var a=this.storage.getDisplayList(),o=new o0(r,n);if(g7(a,o,r,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,h=new St(r-u,n-u,l,l),c=a.length-1;c>=0;c--){var f=a[c];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(q_.copy(f.getBoundingRect()),f.transform&&q_.applyTransform(f.transform),q_.intersect(h)&&s.push(f))}if(s.length)for(var d=4,v=Math.PI/12,g=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,t,e)}});function Yre(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var n=t,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,r))return!1;n.silent&&(i=!0)}var s=n.__hostTarget;n=s||n.parent}return i?xI:!0}return!1}function g7(t,e,r,n,i){for(var a=t.length-1;a>=0;a--){var o=t[a],s=void 0;if(o!==i&&!o.ignore&&(s=Yre(o,r,n))&&(!e.topTarget&&(e.topTarget=o),s!==xI)){e.target=o;break}}}function SI(t,e,r){var n=t.painter;return e<0||e>n.getWidth()||r<0||r>n.getHeight()}const Xre=bI;var wI=32,s0=7;function Zre(t){for(var e=0;t>=wI;)e|=t&1,t>>=1;return t+e}function m7(t,e,r,n){var i=e+1;if(i===r)return 1;if(n(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function jre(t,e,r){for(r--;e>>1,i(a,t[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=a}}function W_(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(t,e[r+h])>0?o=h+1:l=h}return l}function U_(t,e,r,n,i,a){var o=0,s=0,l=1;if(a(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(t,e[r+h])<0?l=h:o=h+1}return l}function Kre(t,e){var r=s0,n,i,a=0;t.length;var o=[];n=[],i=[];function s(d,v){n[a]=d,i[a]=v,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;h(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=s0||P>=s0);if(O)break;M<0&&(M=0),M+=2}if(r=M,r<1&&(r=1),v===1){for(y=0;y=0;y--)t[D+y]=t[M+y];t[T]=o[w];return}for(var P=r;;){var O=0,V=0,$=!1;do if(e(o[w],t[b])<0){if(t[T--]=t[b--],O++,V=0,--v===0){$=!0;break}}else if(t[T--]=o[w--],V++,O=0,--m===1){$=!0;break}while((O|V)=0;y--)t[D+y]=t[M+y];if(v===0){$=!0;break}}if(t[T--]=o[w--],--m===1){$=!0;break}if(V=m-W_(t[b],o,0,m,m-1,e),V!==0){for(T-=V,w-=V,m-=V,D=T+1,M=w+1,y=0;y=s0||V>=s0);if($)break;P<0&&(P=0),P+=2}if(r=P,r<1&&(r=1),m===1){for(T-=v,b-=v,D=T+1,M=b+1,y=v-1;y>=0;y--)t[D+y]=t[M+y];t[T]=o[w]}else{if(m===0)throw new Error;for(M=T-(m-1),y=0;ys&&(l=s),y7(t,r,r+l,r+a,e),a=l}o.pushRun(r,a),o.mergeRuns(),i-=a,r+=a}while(i!==0);o.forceMergeRuns()}}var _i=1,$0=2,yc=4,_7=!1;function Y_(){_7||(_7=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function x7(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Jre=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=x7}return t.prototype.traverse=function(e,r){for(var n=0;n0&&(h.__clipPaths=[]),isNaN(h.z)&&(Y_(),h.z=0),isNaN(h.z2)&&(Y_(),h.z2=0),isNaN(h.zlevel)&&(Y_(),h.zlevel=0),this._displayList[this._displayListLen++]=h}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,r,n);var f=e.getTextGuideLine();f&&this._updateAndAddDisplayable(f,r,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,r,n)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var r=0,n=e.length;r=0&&this._roots.splice(i,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();const Qre=Jre;var CI;CI=zt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};const Q4=CI;var Im={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)))},elasticOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},elasticInOut:function(t){var e,r=.1,n=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=n/4):e=n*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Im.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Im.bounceIn(t*2)*.5:Im.bounceOut(t*2-1)*.5+.5}};const AI=Im;var ug=Math.pow,Qs=Math.sqrt,A1=1e-8,TI=1e-4,b7=Qs(3),hg=1/3,Za=rh(),$i=rh(),Ec=rh();function Ws(t){return t>-A1&&tA1||t<-A1}function Ur(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function S7(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function T1(t,e,r,n,i,a){var o=n+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,h=s*s-3*o*l,c=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Ws(h)&&Ws(c))if(Ws(s))a[0]=0;else{var v=-l/s;v>=0&&v<=1&&(a[d++]=v)}else{var g=c*c-4*h*f;if(Ws(g)){var m=c/h,v=-s/o+m,y=-m/2;v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y)}else if(g>0){var b=Qs(g),w=h*s+1.5*o*(-c+b),T=h*s+1.5*o*(-c-b);w<0?w=-ug(-w,hg):w=ug(w,hg),T<0?T=-ug(-T,hg):T=ug(T,hg);var v=(-s-(w+T))/(3*o);v>=0&&v<=1&&(a[d++]=v)}else{var M=(2*h*s-3*o*c)/(2*Qs(h*h*h)),D=Math.acos(M)/3,P=Qs(h),O=Math.cos(D),v=(-s-2*P*O)/(3*o),y=(-s+P*(O+b7*Math.sin(D)))/(3*o),V=(-s+P*(O-b7*Math.sin(D)))/(3*o);v>=0&&v<=1&&(a[d++]=v),y>=0&&y<=1&&(a[d++]=y),V>=0&&V<=1&&(a[d++]=V)}}return d}function DI(t,e,r,n,i){var a=6*r-12*e+6*t,o=9*e+3*n-3*t-9*r,s=3*e-3*t,l=0;if(Ws(o)){if(kI(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var h=a*a-4*o*s;if(Ws(h))i[0]=-a/(2*o);else if(h>0){var c=Qs(h),u=(-a+c)/(2*o),f=(-a-c)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function sl(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,u=(s-o)*i+o,h=(l-s)*i+s,c=(h-u)*i+u;a[0]=t,a[1]=o,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function MI(t,e,r,n,i,a,o,s,l,u,h){var c,f=.005,d=1/0,v,g,m,y;Za[0]=l,Za[1]=u;for(var b=0;b<1;b+=.05)$i[0]=Ur(t,r,i,o,b),$i[1]=Ur(e,n,a,s,b),m=Ru(Za,$i),m=0&&m=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*a*s;if(Ws(h)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var c=Qs(h),u=(-o+c)/(2*a),f=(-o-c)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function LI(t,e,r){var n=t+r-2*e;return n===0?.5:(t-e)/n}function Rd(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function EI(t,e,r,n,i,a,o,s,l){var u,h=.005,c=1/0;Za[0]=o,Za[1]=s;for(var f=0;f<1;f+=.05){$i[0]=Jr(t,r,i,f),$i[1]=Jr(e,n,a,f);var d=Ru(Za,$i);d=0&&d=1?1:T1(0,n,a,1,l,s)&&Ur(0,i,o,1,s[0])}}}var ine=function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ir,this.ondestroy=e.ondestroy||Ir,this.onrestart=e.onrestart||Ir,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,r){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=r;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Je(e)?e:AI[e]||AS(e)},t}();const ane=ine;var II=function(){function t(e){this.value=e}return t}(),one=function(){function t(){this._len=0}return t.prototype.insert=function(e){var r=new II(e);return this.insertEntry(r),r},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var r=e.prev,n=e.next;r?r.next=n:this.head=n,n?n.prev=r:this.tail=r,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),sne=function(){function t(e){this._list=new one,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,r){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=r:s=new II(r),s.key=e,n.insertEntry(s),i[e]=s}return a},t.prototype.get=function(e){var r=this._map[e],n=this._list;if(r!=null)return r!==n.tail&&(n.remove(r),n.insertEntry(r)),r.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();const pp=sne;var w7={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ga(t){return t=Math.round(t),t<0?0:t>255?255:t}function lne(t){return t=Math.round(t),t<0?0:t>360?360:t}function Fd(t){return t<0?0:t>1?1:t}function X_(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?ga(parseFloat(e)/100*255):ga(parseInt(e,10))}function Fu(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?Fd(parseFloat(e)/100):Fd(parseFloat(e))}function Z_(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function Us(t,e,r){return t+(e-t)*r}function Ri(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function t5(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var BI=new pp(20),cg=null;function Kh(t,e){cg&&t5(cg,e),cg=BI.put(t,cg||e.slice())}function bi(t,e){if(t){e=e||[];var r=BI.get(t);if(r)return t5(e,r);t=t+"";var n=t.replace(/ /g,"").toLowerCase();if(n in w7)return t5(e,w7[n]),Kh(t,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Ri(e,0,0,0,1);return}return Ri(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Kh(t,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Ri(e,0,0,0,1);return}return Ri(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Kh(t,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),h=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ri(e,+u[0],+u[1],+u[2],1):Ri(e,0,0,0,1);h=Fu(u.pop());case"rgb":if(u.length>=3)return Ri(e,X_(u[0]),X_(u[1]),X_(u[2]),u.length===3?h:Fu(u[3])),Kh(t,e),e;Ri(e,0,0,0,1);return;case"hsla":if(u.length!==4){Ri(e,0,0,0,1);return}return u[3]=Fu(u[3]),r5(u,e),Kh(t,e),e;case"hsl":if(u.length!==3){Ri(e,0,0,0,1);return}return r5(u,e),Kh(t,e),e;default:return}}Ri(e,0,0,0,1)}}function r5(t,e){var r=(parseFloat(t[0])%360+360)%360/360,n=Fu(t[1]),i=Fu(t[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Ri(e,ga(Z_(o,a,r+1/3)*255),ga(Z_(o,a,r)*255),ga(Z_(o,a,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function une(t){if(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(e,r,n),a=Math.max(e,r,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var h=((a-e)/6+o/2)/o,c=((a-r)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-c:r===a?l=1/3+h-f:n===a&&(l=2/3+c-h),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return t[3]!=null&&d.push(t[3]),d}}function n5(t,e){var r=bi(t);if(r){for(var n=0;n<3;n++)e<0?r[n]=r[n]*(1-e)|0:r[n]=(255-r[n])*e+r[n]|0,r[n]>255?r[n]=255:r[n]<0&&(r[n]=0);return Uo(r,r.length===4?"rgba":"rgb")}}function j_(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return r[0]=ga(Us(o[0],s[0],l)),r[1]=ga(Us(o[1],s[1],l)),r[2]=ga(Us(o[2],s[2],l)),r[3]=Fd(Us(o[3],s[3],l)),r}}function hne(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var n=t*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=bi(e[i]),s=bi(e[a]),l=n-i,u=Uo([ga(Us(o[0],s[0],l)),ga(Us(o[1],s[1],l)),ga(Us(o[2],s[2],l)),Fd(Us(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function id(t,e,r,n){var i=bi(t);if(t)return i=une(i),e!=null&&(i[0]=lne(e)),r!=null&&(i[1]=Fu(r)),n!=null&&(i[2]=Fu(n)),Uo(r5(i),"rgba")}function k1(t,e){var r=bi(t);if(r&&e!=null)return r[3]=Fd(e),Uo(r,"rgba")}function Uo(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}function D1(t,e){var r=bi(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var M1=Math.round;function Od(t){var e;if(!t||t==="transparent")t="none";else if(typeof t=="string"&&t.indexOf("rgba")>-1){var r=bi(t);r&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])}return{color:t,opacity:e??1}}var C7=1e-4;function Ys(t){return t-C7}function fg(t){return M1(t*1e3)/1e3}function i5(t){return M1(t*1e4)/1e4}function cne(t){return"matrix("+fg(t[0])+","+fg(t[1])+","+fg(t[2])+","+fg(t[3])+","+i5(t[4])+","+i5(t[5])+")"}var fne={left:"start",right:"end",center:"middle",middle:"middle"};function dne(t,e,r){return r==="top"?t+=e/2:r==="bottom"&&(t-=e/2),t}function pne(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}function vne(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}function PI(t){return t&&!!t.image}function gne(t){return t&&!!t.svgElement}function TS(t){return PI(t)||gne(t)}function RI(t){return t.type==="linear"}function FI(t){return t.type==="radial"}function OI(t){return t&&(t.type==="linear"||t.type==="radial")}function Gy(t){return"url(#"+t+")"}function NI(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function zI(t){var e=t.x||0,r=t.y||0,n=(t.rotation||0)*Dm,i=xt(t.scaleX,1),a=xt(t.scaleY,1),o=t.skewX||0,s=t.skewY||0,l=[];return(e||r)&&l.push("translate("+e+"px,"+r+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+M1(o*Dm)+"deg, "+M1(s*Dm)+"deg)"),l.join(" ")}var mne=function(){return zt.hasGlobalWindow&&Je(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}}(),a5=Array.prototype.slice;function Po(t,e,r){return(e-t)*r+t}function K_(t,e,r,n){for(var i=e.length,a=0;an?e:t,a=Math.min(r,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,r,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=T7,l=r;if(kn(r)){var u=bne(r);s=u,(u===1&&!$t(r[0])||u===2&&!$t(r[0][0]))&&(o=!0)}else if($t(r)&&!Pd(r))s=pg;else if(ze(r))if(!isNaN(+r))s=pg;else{var h=bi(r);h&&(l=h,s=G0)}else if(zy(r)){var c=xe({},l);c.colorStops=Ce(r.colorStops,function(d){return{offset:d.offset,color:bi(d.color)}}),RI(r)?s=o5:FI(r)&&(s=s5),l=c}a===0?this.valType=s:(s!==this.valType||s===T7)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:r,percent:0};return n&&(f.easing=n,f.easingFunc=Je(n)?n:AI[n]||AS(n)),i.push(f),f},t.prototype.prepare=function(e,r){var n=this.keyframes;this._needsSort&&n.sort(function(g,m){return g.time-m.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=vg(i),u=k7(i),h=0;h=0&&!(o[h].percent<=r);h--);h=f(h,s-2)}else{for(h=c;hr);h++);h=f(h-1,s-2)}v=o[h+1],d=o[h]}if(d&&v){this._lastFr=h,this._lastFrP=r;var m=v.percent-d.percent,y=m===0?1:f((r-d.percent)/m,1);v.easingFunc&&(y=v.easingFunc(y));var b=n?this._additiveValue:u?l0:e[l];if((vg(a)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[l]=y<1?d.rawValue:v.rawValue;else if(vg(a))a===Pm?K_(b,d[i],v[i],y):yne(b,d[i],v[i],y);else if(k7(a)){var w=d[i],T=v[i],M=a===o5;e[l]={type:M?"linear":"radial",x:Po(w.x,T.x,y),y:Po(w.y,T.y,y),colorStops:Ce(w.colorStops,function(P,O){var V=T.colorStops[O];return{offset:Po(P.offset,V.offset,y),color:Bm(K_([],P.color,V.color,y))}}),global:T.global},M?(e[l].x2=Po(w.x2,T.x2,y),e[l].y2=Po(w.y2,T.y2,y)):e[l].r=Po(w.r,T.r,y)}else if(u)K_(b,d[i],v[i],y),n||(e[l]=Bm(b));else{var D=Po(d[i],v[i],y);n?this._additiveValue=D:e[l]=D}n&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var r=this.valType,n=this.propName,i=this._additiveValue;r===pg?e[n]=e[n]+i:r===G0?(bi(e[n],l0),dg(l0,l0,i,1),e[n]=Bm(l0)):r===Pm?dg(e[n],e[n],i,1):r===VI&&A7(e[n],e[n],i,1)},t}(),kS=function(){function t(e,r,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=r,r&&i){yS("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,r,n){return this.whenWithKeys(e,r,Lt(r),n)},t.prototype.whenWithKeys=function(e,r,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,ad(u),i),this._trackKeys.push(s)}l.addKeyframe(e,ad(r[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var r=e.length,n=0;n0)){this._started=1;for(var r=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},t}();function Ac(){return new Date().getTime()}var wne=function(t){pe(e,t);function e(r){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,r=r||{},n.stage=r.stage||{},n}return e.prototype.addClip=function(r){r.animation&&this.removeClip(r),this._head?(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r):this._head=this._tail=r,r.animation=this},e.prototype.addAnimator=function(r){r.animation=this;var n=r.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(r){if(r.animation){var n=r.prev,i=r.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,r.next=r.prev=r.animation=null}},e.prototype.removeAnimator=function(r){var n=r.getClip();n&&this.removeClip(n),r.animation=null},e.prototype.update=function(r){for(var n=Ac()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,r||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var r=this;this._running=!0;function n(){r._running&&(Q4(n),!r._paused&&r.update())}Q4(n)},e.prototype.start=function(){this._running||(this._time=Ac(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ac(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ac()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var r=this._head;r;){var n=r.next;r.prev=r.next=r.animation=null,r=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(r,n){n=n||{},this.start();var i=new kS(r,n.loop);return this.addAnimator(i),i},e}(Ki);const Cne=wne;var Ane=300,J_=zt.domSupported,Q_=function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],r={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=Ce(t,function(i){var a=i.replace("mouse","pointer");return r.hasOwnProperty(a)?a:i});return{mouse:t,touch:e,pointer:n}}(),D7={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},M7=!1;function l5(t){var e=t.pointerType;return e==="pen"||e==="touch"}function Tne(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function ex(t){t&&(t.zrByTouch=!0)}function kne(t,e){return Fi(t.dom,new Dne(t,e),!0)}function $I(t,e){for(var r=e,n=!1;r&&r.nodeType!==9&&!(n=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return n}var Dne=function(){function t(e,r){this.stopPropagation=Ir,this.stopImmediatePropagation=Ir,this.preventDefault=Ir,this.type=r.type,this.target=this.currentTarget=e.dom,this.pointerType=r.pointerType,this.clientX=r.clientX,this.clientY=r.clientY}return t}(),ua={mousedown:function(t){t=Fi(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Fi(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Fi(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=Fi(this.dom,t);var e=t.toElement||t.relatedTarget;$I(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){M7=!0,t=Fi(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){M7||(t=Fi(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=Fi(this.dom,t),ex(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),ua.mousemove.call(this,t),ua.mousedown.call(this,t)},touchmove:function(t){t=Fi(this.dom,t),ex(t),this.handler.processGesture(t,"change"),ua.mousemove.call(this,t)},touchend:function(t){t=Fi(this.dom,t),ex(t),this.handler.processGesture(t,"end"),ua.mouseup.call(this,t),+new Date-+this.__lastTouchMomentI7||t<-I7}var Hl=[],Jh=[],rx=Zi(),nx=Math.abs,Pne=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return Gl(this.rotation)||Gl(this.x)||Gl(this.y)||Gl(this.scaleX-1)||Gl(this.scaleY-1)||Gl(this.skewX)||Gl(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,r=this.needLocalTransform(),n=this.transform;if(!(r||e)){n&&(E7(n),this.invTransform=null);return}n=n||Zi(),r?this.getLocalTransform(n):E7(n),e&&(r?Wo(n,e,n):wS(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},t.prototype._resolveGlobalScaleRatio=function(e){var r=this.globalScaleRatio;if(r!=null&&r!==1){this.getGlobalScale(Hl);var n=Hl[0]<0?-1:1,i=Hl[1]<0?-1:1,a=((Hl[0]-n)*r+n)/Hl[0]||0,o=((Hl[1]-i)*r+i)/Hl[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Zi(),ef(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,r=[];e;)r.push(e),e=e.parent;for(;e=r.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var r=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),r=Math.sqrt(r),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=r,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,r=this.transform;e&&e.transform&&(Wo(Jh,e.invTransform,r),r=Jh);var n=this.originX,i=this.originY;(n||i)&&(rx[4]=n,rx[5]=i,Wo(Jh,r,rx),Jh[4]-=n,Jh[5]-=i,r=Jh),this.setLocalTransform(r)}},t.prototype.getGlobalScale=function(e){var r=this.transform;return e=e||[],r?(e[0]=Math.sqrt(r[0]*r[0]+r[1]*r[1]),e[1]=Math.sqrt(r[2]*r[2]+r[3]*r[3]),r[0]<0&&(e[0]=-e[0]),r[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,r){var n=[e,r],i=this.invTransform;return i&&cn(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,r){var n=[e,r],i=this.transform;return i&&cn(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&nx(e[0]-1)>1e-10&&nx(e[3]-1)>1e-10?Math.sqrt(nx(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){HI(this,e)},t.getLocalTransform=function(e,r){r=r||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,h=e.x,c=e.y,f=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var v=n+s,g=i+l;r[4]=-v*a-f*g*o,r[5]=-g*o-d*v*a}else r[4]=r[5]=0;return r[0]=a,r[3]=o,r[1]=d*a,r[2]=f*o,u&&nh(r,r,u),r[4]+=n+h,r[5]+=i+c,r},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),uo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function HI(t,e){for(var r=0;r=0?parseFloat(t)/100*e:parseFloat(t):t}function E1(t,e,r){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,h="left",c="top";if(n instanceof Array)l+=xa(n[0],r.width),u+=xa(n[1],r.height),h=null,c=null;else switch(n){case"left":l-=i,u+=s,h="right",c="middle";break;case"right":l+=i+o,u+=s,c="middle";break;case"top":l+=o/2,u-=i,h="center",c="bottom";break;case"bottom":l+=o/2,u+=a+i,h="center";break;case"inside":l+=o/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=i,u+=s,c="middle";break;case"insideRight":l+=o-i,u+=s,h="right",c="middle";break;case"insideTop":l+=o/2,u+=i,h="center";break;case"insideBottom":l+=o/2,u+=a-i,h="center",c="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,h="right";break;case"insideBottomLeft":l+=i,u+=a-i,c="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,h="right",c="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var ix="__zr_normal__",ax=uo.concat(["ignore"]),Rne=so(uo,function(t,e){return t[e]=!0,t},{ignore:!1}),Qh={},Fne=new St(0,0,0,0),DS=function(){function t(e){this.id=vI(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=r,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var r=this._textContent;if(r&&(!r.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var h=Fne;n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),i||h.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Qh,n,h):E1(Qh,n,h),a.x=Qh.x,a.y=Qh.y,o=Qh.align,s=Qh.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var f=void 0,d=void 0;c==="center"?(f=h.width*.5,d=h.height*.5):(f=xa(c[0],h.width),d=xa(c[1],h.height)),u=!0,a.originX=-a.x+f+(i?0:h.x),a.originY=-a.y+d+(i?0:h.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],u||(a.originX=-v[0],a.originY=-v[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,b=void 0,w=void 0;g&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(y),w=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(y),w=!0)),y=y||"#000",(y!==m.fill||b!==m.stroke||w!==m.autoStroke||o!==m.align||s!==m.verticalAlign)&&(l=!0,m.fill=y,m.stroke=b,m.autoStroke=w,m.align=o,m.verticalAlign=s,r.setDefaultTextStyle(m)),r.__dirty|=_i,l&&r.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?f5:c5},t.prototype.getOutsideStroke=function(e){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&bi(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Uo(n,"rgba")},t.prototype.traverse=function(e,r){},t.prototype.attrKV=function(e,r){e==="textConfig"?this.setTextConfig(r):e==="textContent"?this.setTextContent(r):e==="clipPath"?this.setClipPath(r):e==="extra"?(this.extra=this.extra||{},xe(this.extra,r)):this[e]=r},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,r){if(typeof e=="string")this.attrKV(e,r);else if(nt(e))for(var n=e,i=Lt(n),a=0;a0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var r=this.states;return r[e]||(r[e]={}),r[e]},t.prototype.clearStates=function(e){this.useState(ix,!1,e)},t.prototype.useState=function(e,r,n,i){var a=e===ix,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Ct(s,e)>=0&&(r||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){yS("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var h=!!(u&&u.hoverLayer||i);h&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,r,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,f=this._textGuide;return c&&c.useState(e,r,n,h),f&&f.useState(e,r,n,h),a?(this.currentStates=[],this._normalState={}):r?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~_i),u}}},t.prototype.useStates=function(e,r,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,v);var g=this._textContent,m=this._textGuide;g&&g.useStates(e,r,f),m&&m.useStates(e,r,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~_i)}},t.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(r,1),this.useStates(n)}},t.prototype.replaceState=function(e,r,n){var i=this.currentStates.slice(),a=Ct(i,e),o=Ct(i,r)>=0;a>=0?o?i.splice(a,1):i[a]=r:n&&!o&&i.push(r),this.useStates(i)},t.prototype.toggleState=function(e,r){r?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var r={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,r){for(var n=this.animators,i=n.length,a=[],o=0;o0&&r.during&&a[0].during(function(v,g){r.during(g)});for(var f=0;f0||i.force&&!o.length){var O=void 0,V=void 0,$=void 0;if(s){V={},f&&(O={});for(var T=0;T=0&&(i.splice(a,0,r),this._doAdd(r))}return this},e.prototype.replace=function(r,n){var i=Ct(this._children,r);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(r,n){var i=this._children,a=i[n];if(r&&r!==this&&r.parent!==this&&r!==a){i[n]=r,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(r)}return this},e.prototype._doAdd=function(r){r.parent&&r.parent.remove(r),r.parent=this;var n=this.__zr;n&&n!==r.__zr&&r.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(r){var n=this.__zr,i=this._children,a=Ct(i,r);return a<0?this:(i.splice(a,1),r.parent=null,n&&r.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var r=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},t.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this.handler.off(e,r)},t.prototype.trigger=function(e,r){this.handler.trigger(e,r)},t.prototype.clear=function(){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}function Be(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return ze(t)?Hne(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function Tr(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),XI),t=(+t).toFixed(e),r?t:+t}function Wi(t){return t.sort(function(e,r){return e-r}),t}function Ka(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return qne(t)}function qne(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function ZI(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Wne(t,e){var r=so(t,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=Ce(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=Ce(i,function(d){return Math.floor(d)}),s=so(o,function(d,v){return d+v},0),l=Ce(i,function(d,v){return d-o[v]});su&&(u=l[c],h=c);++o[h],l[h]=0,++s}return Ce(o,function(d){return d/n})}function Une(t,e){var r=Math.max(Ka(t),Ka(e)),n=t+e;return r>XI?n:Tr(n,r)}var O7=9007199254740991;function jI(t){var e=Math.PI*2;return(t%e+e)%e}function I1(t){return t>-F7&&t=10&&e++,e}function KI(t,e){var r=MS(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function sx(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function N7(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n=0||a&&Ct(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var yie=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],_ie=Zu(yie),xie=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return _ie(this,e,r)},t}(),d5=new dp(50);function bie(t){if(typeof t=="string"){var e=d5.get(t);return e&&e.image}else return t}function BS(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=d5.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!qy(e)&&a.pending.push(o)):(e=ol.loadImage(t,G7,G7),e.__zrImageSrc=t,d5.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function G7(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},t.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,r){return this.handler.findHover(e,r)},t.prototype.on=function(e,r,n){return this.handler.on(e,r,n),this},t.prototype.off=function(e,r){this.handler.off(e,r)},t.prototype.trigger=function(e,r){this.handler.trigger(e,r)},t.prototype.clear=function(){for(var e=this.storage.getRoots(),r=0;r0){if(t<=i)return o;if(t>=a)return s}else{if(t>=i)return o;if(t<=a)return s}else{if(t===i)return o;if(t===a)return s}return(t-i)/l*u+o}function Be(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return ze(t)?Wne(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function kr(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),XI),t=(+t).toFixed(e),r?t:+t}function Wi(t){return t.sort(function(e,r){return e-r}),t}function Ka(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,r=0;r<15;r++,e*=10)if(Math.round(t*e)/e===t)return r}return Une(t)}function Une(t){var e=t.toString().toLowerCase(),r=e.indexOf("e"),n=r>0?+e.slice(r+1):0,i=r>0?r:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function ZI(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Yne(t,e){var r=so(t,function(d,v){return d+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,e),i=Ce(t,function(d){return(isNaN(d)?0:d)/r*n*100}),a=n*100,o=Ce(i,function(d){return Math.floor(d)}),s=so(o,function(d,v){return d+v},0),l=Ce(i,function(d,v){return d-o[v]});su&&(u=l[c],h=c);++o[h],l[h]=0,++s}return Ce(o,function(d){return d/n})}function Xne(t,e){var r=Math.max(Ka(t),Ka(e)),n=t+e;return r>XI?n:kr(n,r)}var O7=9007199254740991;function jI(t){var e=Math.PI*2;return(t%e+e)%e}function I1(t){return t>-F7&&t=10&&e++,e}function KI(t,e){var r=MS(t),n=Math.pow(10,r),i=t/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,t=a*n,r>=-20?+t.toFixed(r<0?-r:0):t}function lx(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i}function N7(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,n=0;n=0||a&&Ct(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[t[s][0]]=u)}}return o}}var xie=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],bie=Ku(xie),Sie=function(){function t(){}return t.prototype.getAreaStyle=function(e,r){return bie(this,e,r)},t}(),p5=new pp(50);function wie(t){if(typeof t=="string"){var e=p5.get(t);return e&&e.image}else return t}function BS(t,e,r,n,i){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!r)return e;var a=p5.get(t),o={hostEl:r,cb:n,cbPayload:i};return a?(e=a.image,!Wy(e)&&a.pending.push(o)):(e=ol.loadImage(t,G7,G7),e.__zrImageSrc=t,p5.put(t,e.__cachedImgObj={image:e,pending:[o]})),e}else return t;else return e}function G7(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Si(r,e);return u>s&&(r="",u=0),s=t-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function hB(t,e){var r=e.containerWidth,n=e.font,i=e.contentWidth;if(!r)return"";var a=Si(t,n);if(a<=r)return t;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?wie(t,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*i/a):0;t=t.substr(0,s),a=Si(t,n)}return t===""&&(t=e.placeholder),t}function wie(t,e,r,n){for(var i=0,a=0,o=t.length;ad&&u){var v=Math.floor(d/s);c=c.slice(0,v)}if(t&&a&&h!=null)for(var g=uB(h,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;ms&&ux(r,t.substring(s,u),e,o),ux(r,l[2],e,o,l[1]),s=lx.lastIndex}si){M>0?(b.tokens=b.tokens.slice(0,M),m(b,T,w),r.lines=r.lines.slice(0,y+1)):r.lines=r.lines.slice(0,y);break e}var j=P.width,q=j==null||j==="auto";if(typeof j=="string"&&j.charAt(j.length-1)==="%")D.percentWidth=j,h.push(D),D.contentWidth=Si(D.text,$);else{if(q){var G=P.backgroundColor,J=G&&G.image;J&&(J=bie(J),qy(J)&&(D.width=Math.max(D.width,J.width*H/J.height)))}var K=v&&n!=null?n-T:null;K!=null&&K0&&v+n.accumWidth>n.width&&(h=e.split(` +`)}function uB(t,e,r,n){n=n||{};var i=xe({},n);i.font=e,r=xt(r,"..."),i.maxIterations=xt(n.maxIterations,2);var a=i.minChar=xt(n.minChar,0);i.cnCharWidth=Si("国",e);var o=i.ascCharWidth=Si("a",e);i.placeholder=xt(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l=o;l++)s-=o;var u=Si(r,e);return u>s&&(r="",u=0),s=t-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function hB(t,e){var r=e.containerWidth,n=e.font,i=e.contentWidth;if(!r)return"";var a=Si(t,n);if(a<=r)return t;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?Aie(t,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*i/a):0;t=t.substr(0,s),a=Si(t,n)}return t===""&&(t=e.placeholder),t}function Aie(t,e,r,n){for(var i=0,a=0,o=t.length;ad&&u){var v=Math.floor(d/s);c=c.slice(0,v)}if(t&&a&&h!=null)for(var g=uB(h,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m=0;ms&&hx(r,t.substring(s,u),e,o),hx(r,l[2],e,o,l[1]),s=ux.lastIndex}si){M>0?(b.tokens=b.tokens.slice(0,M),m(b,T,w),r.lines=r.lines.slice(0,y+1)):r.lines=r.lines.slice(0,y);break e}var j=P.width,q=j==null||j==="auto";if(typeof j=="string"&&j.charAt(j.length-1)==="%")D.percentWidth=j,h.push(D),D.contentWidth=Si(D.text,$);else{if(q){var G=P.backgroundColor,J=G&&G.image;J&&(J=wie(J),Wy(J)&&(D.width=Math.max(D.width,J.width*H/J.height)))}var K=v&&n!=null?n-T:null;K!=null&&K0&&v+n.accumWidth>n.width&&(h=e.split(` `),u=!0),n.accumWidth=v}else{var g=cB(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,c=g.linesWidths,h=g.lines}}else h=e.split(` -`);for(var m=0;m=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Mie=so(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Lie(t){return Die(t)?!!Mie[t]:!0}function cB(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;cr:i+h+d>r){h?(s||l)&&(v?(s||(s=l,l="",u=0,h=u),a.push(s),o.push(h-u),l+=f,u+=d,s="",h=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=f,h=d)):v?(a.push(l),o.push(u),l=f,u=d):(a.push(f),o.push(d));continue}h+=d,v?(l+=f,u+=d):(l&&(s+=l,l="",u=0),s+=f)}return!a.length&&!s&&(s=t,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),a.length===1&&(h+=i),{accumWidth:h,lines:a,linesWidths:o}}var p5="__zr_style_"+Math.round(Math.random()*10),Fu={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Wy={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Fu[p5]=!0;var q7=["z","z2","invisible"],Eie=["invisible"],Iie=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Lt(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(vg[0]=dx(i)*r+t,vg[1]=fx(i)*n+e,gg[0]=dx(a)*r+t,gg[1]=fx(a)*n+e,u(s,vg,gg),h(l,vg,gg),i=i%Wl,i<0&&(i=i+Wl),a=a%Wl,a<0&&(a=a+Wl),i>a&&!o?a+=Wl:ii&&(mg[0]=dx(d)*r+t,mg[1]=fx(d)*n+e,u(s,mg,s),h(l,mg,l))}var nr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ul=[],Yl=[],Va=[],Ss=[],$a=[],Ga=[],px=Math.min,vx=Math.max,Xl=Math.cos,Zl=Math.sin,Eo=Math.abs,v5=Math.PI,Is=v5*2,gx=typeof Float32Array<"u",u0=[];function mx(t){var e=Math.round(t/v5*1e8)/1e8;return e%2*v5}function fB(t,e){var r=mx(t[0]);r<0&&(r+=Is);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Is?i=r+Is:e&&r-i>=Is?i=r-Is:!e&&r>i?i=r+(Is-mx(r-i)):e&&r0&&(this._ux=Eo(n/L1/e)||0,this._uy=Eo(n/L1/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(nr.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Eo(e-this._xi),i=Eo(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(nr.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(nr.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(nr.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),u0[0]=i,u0[1]=a,fB(u0,o),i=u0[0],a=u0[1];var s=a-i;return this.addData(nr.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Xl(a)*n+e,this._yi=Zl(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(nr.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(nr.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&gx&&(this.data=new Float32Array(r));for(var n=0;nh.length&&(this._expandData(),h=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Va[0]=Va[1]=$a[0]=$a[1]=Number.MAX_VALUE,Ss[0]=Ss[1]=Ga[0]=Ga[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Eo(w)>i||f===r-1)&&(g=Math.sqrt(b*b+w*w),a=m,o=y);break}case nr.C:{var T=e[f++],M=e[f++],m=e[f++],y=e[f++],D=e[f++],P=e[f++];g=Jre(a,o,T,M,m,y,D,P,10),a=D,o=P;break}case nr.Q:{var T=e[f++],M=e[f++],m=e[f++],y=e[f++];g=ene(a,o,T,M,m,y,10),a=m,o=y;break}case nr.A:var O=e[f++],V=e[f++],$=e[f++],H=e[f++],j=e[f++],q=e[f++],G=q+j;f+=1,e[f++],v&&(s=Xl(j)*$+O,l=Zl(j)*H+V),g=vx($,H)*px(Is,Math.abs(q)),a=Xl(G)*$+O,o=Zl(G)*H+V;break;case nr.R:{s=a=e[f++],l=o=e[f++];var J=e[f++],K=e[f++];g=J*2+K*2;break}case nr.Z:{var b=s-a,w=l-o;g=Math.sqrt(b*b+w*w),a=s,o=l;break}}g>=0&&(u[c++]=g,h+=g)}return this._pathLen=h,h},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,h,c,f,d=r<1,v,g,m=0,y=0,b,w=0,T,M;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,g=this._pathLen,b=r*g,!b)))e:for(var D=0;D0&&(e.lineTo(T,M),w=0),P){case nr.M:s=u=n[D++],l=h=n[D++],e.moveTo(u,h);break;case nr.L:{c=n[D++],f=n[D++];var V=Eo(c-u),$=Eo(f-h);if(V>i||$>a){if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;e.lineTo(u*(1-j)+c*j,h*(1-j)+f*j);break e}m+=H}e.lineTo(c,f),u=c,h=f,w=0}else{var q=V*V+$*$;q>w&&(T=c,M=f,w=q)}break}case nr.C:{var G=n[D++],J=n[D++],K=n[D++],se=n[D++],ae=n[D++],ce=n[D++];if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;sl(u,G,K,ae,j,Ul),sl(h,J,se,ce,j,Yl),e.bezierCurveTo(Ul[1],Yl[1],Ul[2],Yl[2],Ul[3],Yl[3]);break e}m+=H}e.bezierCurveTo(G,J,K,se,ae,ce),u=ae,h=ce;break}case nr.Q:{var G=n[D++],J=n[D++],K=n[D++],se=n[D++];if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;Pd(u,G,K,j,Ul),Pd(h,J,se,j,Yl),e.quadraticCurveTo(Ul[1],Yl[1],Ul[2],Yl[2]);break e}m+=H}e.quadraticCurveTo(G,J,K,se),u=K,h=se;break}case nr.A:var ye=n[D++],de=n[D++],De=n[D++],Ie=n[D++],Pe=n[D++],Qe=n[D++],Ke=n[D++],et=!n[D++],qe=De>Ie?De:Ie,lt=Eo(De-Ie)>.001,it=Pe+Qe,Re=!1;if(d){var H=v[y++];m+H>b&&(it=Pe+Qe*(b-m)/H,Re=!0),m+=H}if(lt&&e.ellipse?e.ellipse(ye,de,De,Ie,Ke,Pe,it,et):e.arc(ye,de,qe,Pe,it,et),Re)break e;O&&(s=Xl(Pe)*De+ye,l=Zl(Pe)*Ie+de),u=Xl(it)*De+ye,h=Zl(it)*Ie+de;break;case nr.R:s=u=n[D],l=h=n[D+1],c=n[D++],f=n[D++];var Ae=n[D++],Xt=n[D++];if(d){var H=v[y++];if(m+H>b){var ht=b-m;e.moveTo(c,f),e.lineTo(c+px(ht,Ae),f),ht-=Ae,ht>0&&e.lineTo(c+Ae,f+px(ht,Xt)),ht-=Xt,ht>0&&e.lineTo(c+vx(Ae-ht,0),f+Xt),ht-=Ae,ht>0&&e.lineTo(c,f+vx(Xt-ht,0));break e}m+=H}e.rect(c,f,Ae,Xt);break;case nr.Z:if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;e.lineTo(u*(1-j)+s*j,h*(1-j)+l*j);break e}m+=H}e.closePath(),u=s,h=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=nr,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Os(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>r+c&&u>i+c&&u>o+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||h+ui&&(i+=h0);var f=Math.atan2(l,s);return f<0&&(f+=h0),f>=n&&f<=i||f+h0>=n&&f+h0<=i}function Ro(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var ws=co.CMD,jl=Math.PI*2,zie=1e-4;function Vie(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&$ie(),d=Wr(e,n,a,s,zi[0]),f>1&&(v=Wr(e,n,a,s,zi[1]))),f===2?me&&s>n&&s>a||s=0&&u<=1){for(var h=0,c=Kr(e,n,a,u),f=0;fr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);zn[0]=-l,zn[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=jl-1e-4){n=0,i=jl;var h=a?1:-1;return o>=zn[0]+t&&o<=zn[1]+t?h:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=jl,i+=jl);for(var f=0,d=0;d<2;d++){var v=zn[d];if(v+t>o){var g=Math.atan2(s,v),h=a?1:-1;g<0&&(g=jl+g),(g>=n&&g<=i||g+jl>=n&&g+jl<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Ro(l,u,h,c,n,i))),m&&(l=a[v],u=a[v+1],h=l,c=u),g){case ws.M:h=a[v++],c=a[v++],l=h,u=c;break;case ws.L:if(r){if(Os(l,u,a[v],a[v+1],e,n,i))return!0}else s+=Ro(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case ws.C:if(r){if(Oie(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=Gie(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case ws.Q:if(r){if(dB(l,u,a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=Hie(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case ws.A:var y=a[v++],b=a[v++],w=a[v++],T=a[v++],M=a[v++],D=a[v++];v+=1;var P=!!(1-a[v++]);f=Math.cos(M)*w+y,d=Math.sin(M)*T+b,m?(h=f,c=d):s+=Ro(l,u,f,d,n,i);var O=(n-y)*T/w+y;if(r){if(Nie(y,b,T,M,M+D,P,e,O,i))return!0}else s+=qie(y,b,T,M,M+D,P,O,i);l=Math.cos(M+D)*w+y,u=Math.sin(M+D)*T+b;break;case ws.R:h=l=a[v++],c=u=a[v++];var V=a[v++],$=a[v++];if(f=h+V,d=c+$,r){if(Os(h,c,f,c,e,n,i)||Os(f,c,f,d,e,n,i)||Os(f,d,h,d,e,n,i)||Os(h,d,h,c,e,n,i))return!0}else s+=Ro(f,c,f,d,n,i),s+=Ro(h,d,h,c,n,i);break;case ws.Z:if(r){if(Os(l,u,h,c,e,n,i))return!0}else s+=Ro(l,u,h,c,n,i);l=h,u=c;break}}return!r&&!Vie(u,c)&&(s+=Ro(l,u,h,c,n,i)||0),s!==0}function Wie(t,e,r){return pB(t,0,!1,e,r)}function Uie(t,e,r,n){return pB(t,e,!0,r,n)}var B1=rt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Fu),Yie={style:rt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Wy.style)},yx=uo.concat(["invisible","culling","z","z2","zlevel","parent"]),Xie=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?h5:n>.2?Ene:c5}else if(r)return c5}return h5},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(ze(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=D1(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&gc)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Uie(s,l/u,r,n)))return!0}if(this.hasFill())return Wie(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=gc,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:xe(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&gc)},e.prototype.createStyle=function(r){return zy(B1,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=xe({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=xe({},i.shape),xe(u,n.shape)):(u=xe({},a?this.shape:i.shape),xe(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=xe({},this.shape);for(var h={},c=Lt(u),f=0;f0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return zy(Zie,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=pp(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(ji);vB.prototype.type="tspan";const Nd=vB;var jie=rt({x:0,y:0},Fu),Kie={style:rt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Wy.style)};function Jie(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var gB=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return zy(jie,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=Jie(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Kie},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new St(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ji);gB.prototype.type="image";const dn=gB;function Qie(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,h;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var c;s+l>i&&(c=s+l,s*=i/c,l*=i/c),u+h>i&&(c=u+h,u*=i/c,h*=i/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+h>a&&(c=s+h,s*=a/c,h*=a/c),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+h,n+a),h!==0&&t.arc(r+h,n+a-h,h,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Cc=Math.round;function mB(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Cc(n*2)===Cc(i*2)&&(t.x1=t.x2=Au(n,s,!0)),Cc(a*2)===Cc(o*2)&&(t.y1=t.y2=Au(a,s,!0))),t}}function yB(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Au(n,s,!0),t.y=Au(i,s,!0),t.width=Math.max(Au(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Au(i+o,s,!1)-t.y,o===0?0:1)),t}}function Au(t,e,r){if(!e)return t;var n=Cc(t*2);return(n+Cc(e))%2===0?n/2:(n+(r?1:-1))/2}var eae=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),tae={},_B=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new eae},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=yB(tae,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Qie(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Tt);_B.prototype.type="rect";const Rt=_B;var Z7={fill:"#000"},j7=2,rae={style:rt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Wy.style)},xB=function(t){pe(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Z7,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,j=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),q=o.calculatedLineHeight,G=0;G=0&&(G=D[q],G.align==="right");)this._placeToken(G,r,O,y,j,"right",w),V-=G.width,j-=G.width,q--;for(H+=(a-(H-m)-(b-j)-V)/2;$<=q;)G=D[$],this._placeToken(G,r,O,y,H+G.width/2,"center",w),H+=G.width,$++;y+=O}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var h=r.verticalAlign,c=a+i/2;h==="top"?c=a+r.height/2:h==="bottom"&&(c=a+i-r.height/2);var f=!r.isLineHolder&&_x(u);f&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var d=!!u.backgroundColor,v=r.textPadding;v&&(o=r8(o,s,v),c-=r.height/2-v[0]-r.innerHeight/2);var g=this._getOrCreateChild(Nd),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,b=!1,w=0,T=t8("fill"in u?u.fill:"fill"in n?n.fill:(b=!0,y.fill)),M=e8("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||b)?(w=j7,y.stroke):null),D=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=c,D&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||al,m.opacity=io(u.opacity,n.opacity,1),J7(m,u),M&&(m.lineWidth=io(u.lineWidth,n.lineWidth,w),m.lineDash=xt(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),T&&(m.fill=T);var P=r.contentWidth,O=r.contentHeight;g.setBoundingRect(new St(H0(m.x,P,m.textAlign),mc(m.y,O,m.textBaseline),P,O))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,h=r.borderColor,c=l&&l.image,f=l&&!c,d=r.borderRadius,v=this,g,m;if(f||r.lineHeight||u&&h){g=this._getOrCreateChild(Rt),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(f){var b=g.style;b.fill=l||null,b.fillOpacity=xt(r.fillOpacity,1)}else if(c){m=this._getOrCreateChild(dn),m.onload=function(){v.dirtyStyle()};var w=m.style;w.image=l.image,w.x=i,w.y=a,w.width=o,w.height=s}if(u&&h){var b=g.style;b.lineWidth=u,b.stroke=h,b.strokeOpacity=xt(r.strokeOpacity,1),b.lineDash=r.borderDash,b.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var T=(g||m).style;T.shadowBlur=r.shadowBlur||0,T.shadowColor=r.shadowColor||"transparent",T.shadowOffsetX=r.shadowOffsetX||0,T.shadowOffsetY=r.shadowOffsetY||0,T.opacity=io(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return SB(r)&&(n=[r.fontStyle,r.fontWeight,bB(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&da(n)||r.textFont||r.font},e}(ji),nae={left:!0,right:1,center:1},iae={top:1,bottom:1,middle:1},K7=["fontStyle","fontWeight","fontSize","fontFamily"];function bB(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?vS+"px":t+"px"}function J7(t,e){for(var r=0;r=0,a=!1;if(t instanceof Tt){var o=wB(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Qh(s)||Qh(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=xe({},n),u=xe({},u),u.fill=s):!Qh(u.fill)&&Qh(s)?(a=!0,n=xe({},n),u=xe({},u),u.fill=s8(s)):!Qh(u.stroke)&&Qh(l)&&(a||(n=xe({},n),u=xe({},u)),u.stroke=s8(l)),n.style=u}}if(n&&n.z2==null){a||(n=xe({},n));var h=t.z2EmphasisLift;n.z2=t.z2+(h??tf)}return n}function cae(t,e,r){if(r&&r.z2==null){r=xe({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??oae)}return r}function fae(t,e,r){var n=Ct(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:uae(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=xe({},r),o=xe({opacity:n?i:a.opacity*.1},o),r.style=o),r}function xx(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return hae(this,t,e,r);if(t==="blur")return fae(this,t,r);if(t==="select")return cae(this,t,r)}return r}function ju(t){t.stateProxy=xx;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=xx),r&&(r.stateProxy=xx)}function u8(t,e){!LB(t,e)&&!t.__highByOuter&&rs(t,CB)}function h8(t,e){!LB(t,e)&&!t.__highByOuter&&rs(t,AB)}function Ko(t,e){t.__highByOuter|=1<<(e||0),rs(t,CB)}function Jo(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&rs(t,AB)}function kB(t){rs(t,FS)}function OS(t){rs(t,TB)}function DB(t){rs(t,sae)}function MB(t){rs(t,lae)}function LB(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function EB(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=PS(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){TB(u)}),s&&r.push(a)),o.isBlured=!1}),W(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function m5(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,h){for(var c=0;c0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Nu(t,e,r){Tu(t,!0),rs(t,ju),_5(t,e,r)}function yae(t){Tu(t,!1)}function Sr(t,e,r,n){n?yae(t):Nu(t,e,r)}function _5(t,e,r){var n=dt(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var f8=["emphasis","blur","select"],_ae={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function cn(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=bx(v),s*=bx(v));var g=(i===a?-1:1)*bx((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,m=g*o*d/s,y=g*-s*f/o,b=(t+r)/2+_g(c)*m-yg(c)*y,w=(e+n)/2+yg(c)*m+_g(c)*y,T=g8([1,0],[(f-m)/o,(d-y)/s]),M=[(f-m)/o,(d-y)/s],D=[(-1*f-m)/o,(-1*d-y)/s],P=g8(M,D);if(b5(M,D)<=-1&&(P=c0),b5(M,D)>=1&&(P=0),P<0){var O=Math.round(P/c0*1e6)/1e6;P=c0*2+O%2*c0}h.addData(u,b,w,o,s,T,P,c,a)}var Aae=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Tae=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function kae(t){var e=new co;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=co.CMD,l=t.match(Aae);if(!l)return e;for(var u=0;uG*G+J*J&&(O=$,V=H),{cx:O,cy:V,x0:-h,y0:-c,x1:O*(i/M-1),y1:V*(i/M-1)}}function Pae(t){var e;if(Se(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function Rae(t,e){var r,n=q0(e.r,0),i=q0(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var h=e.cx,c=e.cy,f=!!e.clockwise,d=y8(u-l),v=d>Sx&&d%Sx;if(v>la&&(d=v),!(n>la))t.moveTo(h,c);else if(d>Sx-la)t.moveTo(h+n*tc(l),c+n*Kl(l)),t.arc(h,c,n,l,u,!f),i>la&&(t.moveTo(h+i*tc(u),c+i*Kl(u)),t.arc(h,c,i,u,l,f));else{var g=void 0,m=void 0,y=void 0,b=void 0,w=void 0,T=void 0,M=void 0,D=void 0,P=void 0,O=void 0,V=void 0,$=void 0,H=void 0,j=void 0,q=void 0,G=void 0,J=n*tc(l),K=n*Kl(l),se=i*tc(u),ae=i*Kl(u),ce=d>la;if(ce){var ye=e.cornerRadius;ye&&(r=Pae(ye),g=r[0],m=r[1],y=r[2],b=r[3]);var de=y8(n-i)/2;if(w=Ha(de,y),T=Ha(de,b),M=Ha(de,g),D=Ha(de,m),V=P=q0(w,T),$=O=q0(M,D),(P>la||O>la)&&(H=n*tc(u),j=n*Kl(u),q=i*tc(l),G=i*Kl(l),dla){var lt=Ha(y,V),it=Ha(b,V),Re=xg(q,G,J,K,n,lt,f),Ae=xg(H,j,se,ae,n,it,f);t.moveTo(h+Re.cx+Re.x0,c+Re.cy+Re.y0),V0&&t.arc(h+Re.cx,c+Re.cy,lt,_n(Re.y0,Re.x0),_n(Re.y1,Re.x1),!f),t.arc(h,c,n,_n(Re.cy+Re.y1,Re.cx+Re.x1),_n(Ae.cy+Ae.y1,Ae.cx+Ae.x1),!f),it>0&&t.arc(h+Ae.cx,c+Ae.cy,it,_n(Ae.y1,Ae.x1),_n(Ae.y0,Ae.x0),!f))}else t.moveTo(h+J,c+K),t.arc(h,c,n,l,u,!f);if(!(i>la)||!ce)t.lineTo(h+se,c+ae);else if($>la){var lt=Ha(g,$),it=Ha(m,$),Re=xg(se,ae,H,j,i,-it,f),Ae=xg(J,K,q,G,i,-lt,f);t.lineTo(h+Re.cx+Re.x0,c+Re.cy+Re.y0),$0&&t.arc(h+Re.cx,c+Re.cy,it,_n(Re.y0,Re.x0),_n(Re.y1,Re.x1),!f),t.arc(h,c,i,_n(Re.cy+Re.y1,Re.cx+Re.x1),_n(Ae.cy+Ae.y1,Ae.cx+Ae.x1),f),lt>0&&t.arc(h+Ae.cx,c+Ae.cy,lt,_n(Ae.y1,Ae.x1),_n(Ae.y0,Ae.x0),!f))}else t.lineTo(h+se,c+ae),t.arc(h,c,i,u,l,f)}t.closePath()}}}var Fae=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),VB=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Fae},e.prototype.buildPath=function(r,n){Rae(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Tt);VB.prototype.type="sector";const li=VB;var Oae=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),$B=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Oae},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Tt);$B.prototype.type="ring";const Zy=$B;function Nae(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,h,c;if(n){h=[1/0,1/0],c=[-1/0,-1/0];for(var f=0,d=t.length;f=2){if(n){var a=Nae(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;sQl[1]){if(s=!1,a)return s;var h=Math.abs(Ql[0]-Jl[1]),c=Math.abs(Jl[0]-Ql[1]);Math.min(h,c)>i.len()&&(h0){var c=h.duration,f=h.delay,d=h.easing,v={duration:c,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,v):e.animateTo(r,v)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Gt(t,e,r,n,i,a){HS("update",t,e,r,n,i,a)}function fr(t,e,r,n,i,a){HS("enter",t,e,r,n,i,a)}function Lc(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function b8(t){return!t.isGroup}function ioe(t){return t.shape!=null}function yp(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){b8(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return ioe(o)&&(s.shape=xe({},o.shape)),s}var a=n(t);e.traverse(function(o){if(b8(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Gt(o,l,r,dt(o).dataIndex)}}})}function eP(t,e){return Ce(t,function(r){var n=r[0];n=F1(n,e.x),n=O1(n,e.x+e.width);var i=r[1];return i=F1(i,e.y),i=O1(i,e.y+e.height),[n,i]})}function aoe(t,e){var r=F1(t.x,e.x),n=O1(t.x+t.width,e.x+e.width),i=F1(t.y,e.y),a=O1(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function _p(t,e,r){var n=xe({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),rt(i,r),new dn(n)):Ky(t.replace("path://",""),n,r,"center")}function W0(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=Cx(d,v,h,c)/f;return!(m<0||m>1)}function Cx(t,e,r,n){return t*n-r*e}function ooe(t){return t<=1e-6&&t>=-1e-6}function nf(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=ze(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&W(Lt(l),function(h){He(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=dt(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:rt({content:n,formatterParams:s},i)}}function S8(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function vl(t,e){if(t)if(Se(t))for(var r=0;r=0&&s.push(l)}),s}}function gl(t,e){return bt(bt({},t,!0),e,!0)}const _oe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},xoe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var z1="ZH",WS="EN",Gd=WS,Vm={},US={},lP=zt.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return t.indexOf(z1)>-1?z1:Gd}():Gd;function uP(t,e){t=t.toUpperCase(),US[t]=new ur(e),Vm[t]=e}function boe(t){if(ze(t)){var e=Vm[t.toUpperCase()]||{};return t===z1||t===WS?ot(e):bt(ot(e),ot(Vm[Gd]),!1)}else return bt(ot(t),ot(Vm[Gd]),!1)}function C5(t){return US[t]}function Soe(){return US[Gd]}uP(WS,_oe);uP(z1,xoe);var YS=1e3,XS=YS*60,hd=XS*60,qi=hd*24,k8=qi*365,U0={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},wg="{yyyy}-{MM}-{dd}",D8={year:"{yyyy}",month:"{yyyy}-{MM}",day:wg,hour:wg+" "+U0.hour,minute:wg+" "+U0.minute,second:wg+" "+U0.second,millisecond:U0.none},kx=["year","month","day","hour","minute","second","millisecond"],hP=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Cs(t,e){return t+="","0000".substr(0,e-t.length)+t}function Ec(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function woe(t){return t===Ec(t)}function Coe(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function e2(t,e,r,n){var i=ho(t),a=i[ZS(r)](),o=i[Ic(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[t2(r)](),u=i["get"+(r?"UTC":"")+"Day"](),h=i[Hd(r)](),c=(h-1)%12+1,f=i[r2(r)](),d=i[n2(r)](),v=i[i2(r)](),g=n instanceof ur?n:C5(n||lP)||Soe(),m=g.getModel("time"),y=m.get("month"),b=m.get("monthAbbr"),w=m.get("dayOfWeek"),T=m.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Cs(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Cs(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Cs(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,T[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Cs(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Cs(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Cs(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Cs(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Cs(v,3)).replace(/{S}/g,v+"")}function Aoe(t,e,r,n,i){var a=null;if(ze(r))a=r;else if(Je(r))a=r(t.value,e,{level:t.level});else{var o=xe({},U0);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(Se(a)){var c=t.level==null?0:t.level>=0?t.level:a.length+t.level;c=Math.min(c,a.length-1),a=a[c]}}return e2(new Date(t.value),a,i,n)}function cP(t,e){var r=ho(t),n=r[Ic(e)]()+1,i=r[t2(e)](),a=r[Hd(e)](),o=r[r2(e)](),s=r[n2(e)](),l=r[i2(e)](),u=l===0,h=u&&s===0,c=h&&o===0,f=c&&a===0,d=f&&i===1,v=d&&n===1;return v?"year":d?"month":f?"day":c?"hour":h?"minute":u?"second":"millisecond"}function M8(t,e,r){var n=$t(t)?ho(t):t;switch(e=e||cP(t,r),e){case"year":return n[ZS(r)]();case"half-year":return n[Ic(r)]()>=6?1:0;case"quarter":return Math.floor((n[Ic(r)]()+1)/4);case"month":return n[Ic(r)]();case"day":return n[t2(r)]();case"half-day":return n[Hd(r)]()/24;case"hour":return n[Hd(r)]();case"minute":return n[r2(r)]();case"second":return n[n2(r)]();case"millisecond":return n[i2(r)]()}}function ZS(t){return t?"getUTCFullYear":"getFullYear"}function Ic(t){return t?"getUTCMonth":"getMonth"}function t2(t){return t?"getUTCDate":"getDate"}function Hd(t){return t?"getUTCHours":"getHours"}function r2(t){return t?"getUTCMinutes":"getMinutes"}function n2(t){return t?"getUTCSeconds":"getSeconds"}function i2(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Toe(t){return t?"setUTCFullYear":"setFullYear"}function fP(t){return t?"setUTCMonth":"setMonth"}function dP(t){return t?"setUTCDate":"setDate"}function pP(t){return t?"setUTCHours":"setHours"}function vP(t){return t?"setUTCMinutes":"setMinutes"}function gP(t){return t?"setUTCSeconds":"setSeconds"}function mP(t){return t?"setUTCMilliseconds":"setMilliseconds"}function yP(t){if(!JI(t))return ze(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function _P(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var sf=bS;function A5(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(h){return h&&da(h)?h:"-"}function a(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?ho(t):t;if(isNaN(+l)){if(s)return"-"}else return e2(l,n,r)}if(e==="ordinal")return q4(t)?i(t):$t(t)&&a(t)?t+"":"-";var u=jo(t);return a(u)?yP(u):q4(t)?i(t):typeof t=="boolean"?t+"":"-"}var L8=["a","b","c","d","e","f","g"],Dx=function(t,e){return"{"+t+(e??"")+"}"};function xP(t,e,r){Se(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Ku(t,e){return e=e||"transparent",ze(t)?t:nt(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function V1(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var $m=W,bP=["left","right","top","bottom","width","height"],ku=[["width","left","right"],["height","top","bottom"]];function jS(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var h=l.getBoundingRect(),c=e.childAt(u+1),f=c&&c.getBoundingRect(),d,v;if(t==="horizontal"){var g=h.width+(f?-f.x+h.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=h.height):s=Math.max(s,h.height)}else{var m=h.height+(f?-f.y+h.y:0);v=o+m,v>i||l.newline?(a+=s+r,o=0,v=m,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=d+r:o=v+r)})}var Vu=jS;pt(jS,"vertical");pt(jS,"horizontal");function Moe(t,e,r){var n=e.width,i=e.height,a=Be(t.left,n),o=Be(t.top,i),s=Be(t.right,n),l=Be(t.bottom,i);return(isNaN(a)||isNaN(parseFloat(t.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(t.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.bottom)))&&(l=i),r=sf(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function Vr(t,e,r){r=sf(r||0);var n=e.width,i=e.height,a=Be(t.left,n),o=Be(t.top,i),s=Be(t.right,n),l=Be(t.bottom,i),u=Be(t.width,n),h=Be(t.height,i),c=r[2]+r[0],f=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(h)&&(h=i-l-c-o),d!=null&&(isNaN(u)&&isNaN(h)&&(d>n/i?u=n*.8:h=i*.8),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-h-c),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-f;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-c;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(h)&&(h=i-c-o-(l||0));var v=new St(a+r[3],o+r[0],u,h);return v.margin=r,v}function a2(t,e,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var u;if(l==="raw")u=t.type==="group"?new St(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}var c=Vr(rt({width:u.width,height:u.height},e),r,n),f=o?c.x-u.x:0,d=s?c.y-u.y:0;return l==="raw"?(a.x=f,a.y=d):(a.x+=f,a.y+=d),a===t&&t.markRedraw(),!0}function Loe(t,e){return t[ku[e][0]]!=null||t[ku[e][1]]!=null&&t[ku[e][2]]!=null}function qd(t){var e=t.layoutMode||t.constructor.layoutMode;return nt(e)?e:e?{type:e}:null}function ul(t,e,r){var n=r&&r.ignoreSize;!Se(n)&&(n=[n,n]);var i=o(ku[0],0),a=o(ku[1],1);u(ku[0],t,i),u(ku[1],t,a);function o(h,c){var f={},d=0,v={},g=0,m=2;if($m(h,function(w){v[w]=t[w]}),$m(h,function(w){s(e,w)&&(f[w]=v[w]=e[w]),l(f,w)&&d++,l(v,w)&&g++}),n[c])return l(e,h[1])?v[h[2]]=null:l(e,h[2])&&(v[h[1]]=null),v;if(g===m||!d)return v;if(d>=m)return f;for(var y=0;y=0;l--)s=bt(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return vp(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(ur);lB(uf,ur);Hy(uf);moe(uf);yoe(uf,Ioe);function Ioe(t){var e=[];return W(uf.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=Ce(e,function(r){return Ja(r).main}),t!=="dataset"&&Ct(e,"dataset")<=0&&e.unshift("dataset"),e}const Nt=uf;var wP="";typeof navigator<"u"&&(wP=navigator.platform||"");var rc="rgba(0, 0, 0, 0.2)";const Boe={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:rc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:rc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:rc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:rc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:rc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:rc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:wP.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var CP=Ye(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Ji="original",Dn="arrayRows",Qi="objectRows",go="keyedColumns",el="typedArray",AP="unknown",ao="column",hf="row",ln={Must:1,Might:2,Not:3},TP=Ft();function Poe(t){TP(t).datasetMap=Ye()}function kP(t,e,r){var n={},i=JS(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=TP(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,h,c;t=t.slice(),W(t,function(g,m){var y=nt(g)?g:t[m]={name:g};y.type==="ordinal"&&h==null&&(h=m,c=v(y)),n[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});W(t,function(g,m){var y=g.name,b=v(g);if(h==null){var w=f.valueWayDim;d(n[y],w,b),d(o,w,b),f.valueWayDim+=b}else if(h===m)d(n[y],0,b),d(a,0,b);else{var w=f.categoryWayDim;d(n[y],w,b),d(o,w,b),f.categoryWayDim+=b}});function d(g,m,y){for(var b=0;be)return t[n];return t[r-1]}function LP(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var h=o==null||!n?r:zoe(n,o);if(h=h||r,!(!h||!h.length)){var c=h[l];return i&&(u[i]=c),s.paletteIdx=(l+1)%h.length,c}}function Voe(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Cg,f0,I8,B8="\0_ec_inner",$oe=1,EP=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new ur(a),this._locale=new ur(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=F8(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,F8(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?I8(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&W(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Ye(),u=n&&n.replaceMergeMainTypeMap;Poe(this),W(r,function(c,f){c!=null&&(Nt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ot(c):bt(i[f],c,!0))}),u&&u.each(function(c,f){Nt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Nt.topologicalTravel(s,Nt.getAllClassMainTypes(),h,this);function h(c){var f=Ooe(this,c,er(r[c])),d=a.get(c),v=d?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",g=nB(d,f,v);nie(g,c,Nt),i[c]=null,a.set(c,null),o.set(c,0);var m=[],y=[],b=0,w;W(g,function(T,M){var D=T.existing,P=T.newOption;if(!P)D&&(D.mergeOption({},this),D.optionUpdated({},!1));else{var O=c==="series",V=Nt.getClass(c,T.keyInfo.subType,!O);if(!V)return;if(c==="tooltip"){if(w)return;w=!0}if(D&&D.constructor===V)D.name=T.keyInfo.name,D.mergeOption(P,this),D.optionUpdated(P,!1);else{var $=xe({componentIndex:M},T.keyInfo);D=new V(P,this,this,$),xe(D,$),T.brandNew&&(D.__requireNewView=!0),D.init(P,this,this),D.optionUpdated(null,!0)}}D?(m.push(D.option),y.push(D),b++):(m.push(void 0),y.push(void 0))},this),i[c]=m,a.set(c,y),o.set(c,b),c==="series"&&Cg(this)}this._seriesIndices||Cg(this)},e.prototype.getOption=function(){var r=ot(this.option);return W(r,function(n,i){if(Nt.hasClass(i)){for(var a=er(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Od(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[B8],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function Joe(t,e){return t.join(",")===e.join(",")}const Qoe=Xoe;var oa=W,Wd=nt,O8=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Lx(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=O8.length;r=0;m--){var y=t[m];if(s||(v=y.data.rawIndexOf(y.stackedByDimension,d)),v>=0){var b=y.data.getByRawIndex(y.stackResultDimension,v);if(l==="all"||l==="positive"&&b>0||l==="negative"&&b<0||l==="samesign"&&f>=0&&b>0||l==="samesign"&&f<=0&&b<0){f=Une(f,b),g=b;break}}}return n[0]=f,n[1]=g,n})})}var o2=function(){function t(e){this.data=e.data||(e.sourceFormat===go?{}:[]),this.sourceFormat=e.sourceFormat||AP,this.seriesLayoutBy=e.seriesLayoutBy||ao,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=w)}d[0]=v,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};q8=(e={},e[Dn+"_"+ao]={pure:!0,appendData:a},e[Dn+"_"+hf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Qi]={pure:!0,appendData:a},e[go]={pure:!0,appendData:function(o){var s=this._data;W(o,function(l,u){for(var h=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)h.push(l[c])})}},e[Ji]={appendData:a},e[el]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return Hc(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function X8(t){var e,r;return nt(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function cd(t){return new gse(t)}var gse=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function h(b){return!(b>=1)&&(b=1),b}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,v=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(c||d1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},yse=function(){function t(e,r){if(!$t(r)){var n="";Yt(n)}this._opFn=HP[e],this._rvalFloat=jo(r)}return t.prototype.evaluate=function(e){return $t(e)?this._opFn(e,this._rvalFloat):this._opFn(jo(e),this._rvalFloat)},t}(),qP=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=$t(e)?e:jo(e),i=$t(r)?r:jo(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=ze(e),l=ze(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),_se=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=jo(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=jo(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function xse(t,e){return t==="eq"||t==="ne"?new _se(t==="eq",e):He(HP,t)?new yse(t,e):null}var bse=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return tl(e,r)},t}();function Sse(t,e){var r=new bse,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==ao&&Yt(o);var s=[],l={},u=t.dimensionsDefine;if(u)W(u,function(g,m){var y=g.name,b={index:m,name:y,displayName:g.displayName};if(s.push(b),y!=null){var w="";He(l,y)&&Yt(w),l[y]=b}});else for(var h=0;h65535?Lse:Ese}function nc(){return[1/0,-1/0]}function Ise(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function K8(t,e,r,n,i){var a=YP[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Ce(o,function(b){return b.property}),h=0;hy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,h=0,c=this.count();h=0&&l<0)&&(s=v,l=d,u=0),d===l&&(o[u++]=h))}return o.length=u,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=c&&b<=f||isNaN(b))&&(l[u++]=g),g++}v=!0}else if(a===2){for(var m=d[i[0]],w=d[i[1]],T=e[i[1]][0],M=e[i[1]][1],y=0;y=c&&b<=f||isNaN(b))&&(D>=T&&D<=M||isNaN(D))&&(l[u++]=g),g++}v=!0}}if(!v)if(a===1)for(var y=0;y=c&&b<=f||isNaN(b))&&(l[u++]=P)}else for(var y=0;ye[$][1])&&(O=!1)}O&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),h,c,f,d=new(p0(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;vh&&(h=c,f=T)}H>0&&Hh-v&&(l=h-v,s.length=l);for(var g=0;gc[1]&&(c[1]=y),f[d++]=b}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return tl(r[a],this._dimensions[a])}Bx={arrayRows:e,objectRows:function(r,n,i,a){return tl(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return tl(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),XP=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Ag(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var h=r[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,a=[h._getVersionSign()]}else s=o.get("data",!0),l=Ci(s)?el:Ji,a=[];var c=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=xt(c.seriesLayoutBy,f.seriesLayoutBy)||null,v=xt(c.sourceHeader,f.sourceHeader),g=xt(c.dimensions,f.dimensions),m=d!==f.seriesLayoutBy||!!v!=!!f.sourceHeader||g;i=m?[D5(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:g},l)]:[]}else{var y=e;if(n){var b=this._applyTransform(r);i=b.sourceList,a=b.upstreamSignList}else{var w=y.get("source",!0);i=[D5(w,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&Q8(a)}var o,s=[],l=[];return W(e,function(u){u.prepareSource();var h=u.getSource(i||0),c="";i!=null&&!h&&Q8(c),s.push(h),l.push(u._getVersionSign())}),n?o=Dse(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[use(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var Eie=so(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Iie(t){return Lie(t)?!!Eie[t]:!0}function cB(t,e,r,n,i){for(var a=[],o=[],s="",l="",u=0,h=0,c=0;cr:i+h+d>r){h?(s||l)&&(v?(s||(s=l,l="",u=0,h=u),a.push(s),o.push(h-u),l+=f,u+=d,s="",h=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(h),s=f,h=d)):v?(a.push(l),o.push(u),l=f,u=d):(a.push(f),o.push(d));continue}h+=d,v?(l+=f,u+=d):(l&&(s+=l,l="",u=0),s+=f)}return!a.length&&!s&&(s=t,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(h)),a.length===1&&(h+=i),{accumWidth:h,lines:a,linesWidths:o}}var v5="__zr_style_"+Math.round(Math.random()*10),Ou={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Uy={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ou[v5]=!0;var q7=["z","z2","invisible"],Bie=["invisible"],Pie=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype._init=function(r){for(var n=Lt(r),i=0;i1e-4){s[0]=t-r,s[1]=e-n,l[0]=t+r,l[1]=e+n;return}if(gg[0]=px(i)*r+t,gg[1]=dx(i)*n+e,mg[0]=px(a)*r+t,mg[1]=dx(a)*n+e,u(s,gg,mg),h(l,gg,mg),i=i%Wl,i<0&&(i=i+Wl),a=a%Wl,a<0&&(a=a+Wl),i>a&&!o?a+=Wl:ii&&(yg[0]=px(d)*r+t,yg[1]=dx(d)*n+e,u(s,yg,s),h(l,yg,l))}var nr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ul=[],Yl=[],Va=[],Cs=[],$a=[],Ga=[],vx=Math.min,gx=Math.max,Xl=Math.cos,Zl=Math.sin,Eo=Math.abs,g5=Math.PI,Ps=g5*2,mx=typeof Float32Array<"u",u0=[];function yx(t){var e=Math.round(t/g5*1e8)/1e8;return e%2*g5}function fB(t,e){var r=yx(t[0]);r<0&&(r+=Ps);var n=r-t[0],i=t[1];i+=n,!e&&i-r>=Ps?i=r+Ps:e&&r-i>=Ps?i=r-Ps:!e&&r>i?i=r+(Ps-yx(r-i)):e&&r0&&(this._ux=Eo(n/L1/e)||0,this._uy=Eo(n/L1/r)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,r){return this._drawPendingPt(),this.addData(nr.M,e,r),this._ctx&&this._ctx.moveTo(e,r),this._x0=e,this._y0=r,this._xi=e,this._yi=r,this},t.prototype.lineTo=function(e,r){var n=Eo(e-this._xi),i=Eo(r-this._yi),a=n>this._ux||i>this._uy;if(this.addData(nr.L,e,r),this._ctx&&a&&this._ctx.lineTo(e,r),a)this._xi=e,this._yi=r,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=r,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){return this._drawPendingPt(),this.addData(nr.C,e,r,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,r,n,i,a,o),this._xi=a,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,r,n,i){return this._drawPendingPt(),this.addData(nr.Q,e,r,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,r,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,r,n,i,a,o){this._drawPendingPt(),u0[0]=i,u0[1]=a,fB(u0,o),i=u0[0],a=u0[1];var s=a-i;return this.addData(nr.A,e,r,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,r,n,i,a,o),this._xi=Xl(a)*n+e,this._yi=Zl(a)*n+r,this},t.prototype.arcTo=function(e,r,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,r,n,i,a),this},t.prototype.rect=function(e,r,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,r,n,i),this.addData(nr.R,e,r,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(nr.Z);var e=this._ctx,r=this._x0,n=this._y0;return e&&e.closePath(),this._xi=r,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var r=e.length;!(this.data&&this.data.length===r)&&mx&&(this.data=new Float32Array(r));for(var n=0;nh.length&&(this._expandData(),h=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],r=0;r11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Va[0]=Va[1]=$a[0]=$a[1]=Number.MAX_VALUE,Cs[0]=Cs[1]=Ga[0]=Ga[1]=-Number.MAX_VALUE;var e=this.data,r=0,n=0,i=0,a=0,o;for(o=0;on||Eo(w)>i||f===r-1)&&(g=Math.sqrt(b*b+w*w),a=m,o=y);break}case nr.C:{var T=e[f++],M=e[f++],m=e[f++],y=e[f++],D=e[f++],P=e[f++];g=ene(a,o,T,M,m,y,D,P,10),a=D,o=P;break}case nr.Q:{var T=e[f++],M=e[f++],m=e[f++],y=e[f++];g=rne(a,o,T,M,m,y,10),a=m,o=y;break}case nr.A:var O=e[f++],V=e[f++],$=e[f++],H=e[f++],j=e[f++],q=e[f++],G=q+j;f+=1,e[f++],v&&(s=Xl(j)*$+O,l=Zl(j)*H+V),g=gx($,H)*vx(Ps,Math.abs(q)),a=Xl(G)*$+O,o=Zl(G)*H+V;break;case nr.R:{s=a=e[f++],l=o=e[f++];var J=e[f++],K=e[f++];g=J*2+K*2;break}case nr.Z:{var b=s-a,w=l-o;g=Math.sqrt(b*b+w*w),a=s,o=l;break}}g>=0&&(u[c++]=g,h+=g)}return this._pathLen=h,h},t.prototype.rebuildPath=function(e,r){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,h,c,f,d=r<1,v,g,m=0,y=0,b,w=0,T,M;if(!(d&&(this._pathSegLen||this._calculateLength(),v=this._pathSegLen,g=this._pathLen,b=r*g,!b)))e:for(var D=0;D0&&(e.lineTo(T,M),w=0),P){case nr.M:s=u=n[D++],l=h=n[D++],e.moveTo(u,h);break;case nr.L:{c=n[D++],f=n[D++];var V=Eo(c-u),$=Eo(f-h);if(V>i||$>a){if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;e.lineTo(u*(1-j)+c*j,h*(1-j)+f*j);break e}m+=H}e.lineTo(c,f),u=c,h=f,w=0}else{var q=V*V+$*$;q>w&&(T=c,M=f,w=q)}break}case nr.C:{var G=n[D++],J=n[D++],K=n[D++],se=n[D++],ae=n[D++],ce=n[D++];if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;sl(u,G,K,ae,j,Ul),sl(h,J,se,ce,j,Yl),e.bezierCurveTo(Ul[1],Yl[1],Ul[2],Yl[2],Ul[3],Yl[3]);break e}m+=H}e.bezierCurveTo(G,J,K,se,ae,ce),u=ae,h=ce;break}case nr.Q:{var G=n[D++],J=n[D++],K=n[D++],se=n[D++];if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;Rd(u,G,K,j,Ul),Rd(h,J,se,j,Yl),e.quadraticCurveTo(Ul[1],Yl[1],Ul[2],Yl[2]);break e}m+=H}e.quadraticCurveTo(G,J,K,se),u=K,h=se;break}case nr.A:var ye=n[D++],de=n[D++],De=n[D++],Ie=n[D++],Pe=n[D++],Qe=n[D++],Ke=n[D++],et=!n[D++],qe=De>Ie?De:Ie,lt=Eo(De-Ie)>.001,it=Pe+Qe,Re=!1;if(d){var H=v[y++];m+H>b&&(it=Pe+Qe*(b-m)/H,Re=!0),m+=H}if(lt&&e.ellipse?e.ellipse(ye,de,De,Ie,Ke,Pe,it,et):e.arc(ye,de,qe,Pe,it,et),Re)break e;O&&(s=Xl(Pe)*De+ye,l=Zl(Pe)*Ie+de),u=Xl(it)*De+ye,h=Zl(it)*Ie+de;break;case nr.R:s=u=n[D],l=h=n[D+1],c=n[D++],f=n[D++];var Ae=n[D++],Xt=n[D++];if(d){var H=v[y++];if(m+H>b){var ht=b-m;e.moveTo(c,f),e.lineTo(c+vx(ht,Ae),f),ht-=Ae,ht>0&&e.lineTo(c+Ae,f+vx(ht,Xt)),ht-=Xt,ht>0&&e.lineTo(c+gx(Ae-ht,0),f+Xt),ht-=Ae,ht>0&&e.lineTo(c,f+gx(Xt-ht,0));break e}m+=H}e.rect(c,f,Ae,Xt);break;case nr.Z:if(d){var H=v[y++];if(m+H>b){var j=(b-m)/H;e.lineTo(u*(1-j)+s*j,h*(1-j)+l*j);break e}m+=H}e.closePath(),u=s,h=l}}},t.prototype.clone=function(){var e=new t,r=this.data;return e.data=r.slice?r.slice():Array.prototype.slice.call(r),e._len=this._len,e},t.CMD=nr,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function zs(t,e,r,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>r+c&&u>i+c&&u>o+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>r+u&&s>i+u||sr||h+ui&&(i+=h0);var f=Math.atan2(l,s);return f<0&&(f+=h0),f>=n&&f<=i||f+h0>=n&&f+h0<=i}function Ro(t,e,r,n,i,a){if(a>e&&a>n||ai?s:0}var As=co.CMD,jl=Math.PI*2,$ie=1e-4;function Gie(t,e){return Math.abs(t-e)<$ie}var zn=[-1,-1,-1],zi=[-1,-1];function Hie(){var t=zi[0];zi[0]=zi[1],zi[1]=t}function qie(t,e,r,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u1&&Hie(),d=Ur(e,n,a,s,zi[0]),f>1&&(v=Ur(e,n,a,s,zi[1]))),f===2?me&&s>n&&s>a||s=0&&u<=1){for(var h=0,c=Jr(e,n,a,u),f=0;fr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);zn[0]=-l,zn[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=jl-1e-4){n=0,i=jl;var h=a?1:-1;return o>=zn[0]+t&&o<=zn[1]+t?h:0}if(n>i){var c=n;n=i,i=c}n<0&&(n+=jl,i+=jl);for(var f=0,d=0;d<2;d++){var v=zn[d];if(v+t>o){var g=Math.atan2(s,v),h=a?1:-1;g<0&&(g=jl+g),(g>=n&&g<=i||g+jl>=n&&g+jl<=i)&&(g>Math.PI/2&&g1&&(r||(s+=Ro(l,u,h,c,n,i))),m&&(l=a[v],u=a[v+1],h=l,c=u),g){case As.M:h=a[v++],c=a[v++],l=h,u=c;break;case As.L:if(r){if(zs(l,u,a[v],a[v+1],e,n,i))return!0}else s+=Ro(l,u,a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case As.C:if(r){if(zie(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=qie(l,u,a[v++],a[v++],a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case As.Q:if(r){if(dB(l,u,a[v++],a[v++],a[v],a[v+1],e,n,i))return!0}else s+=Wie(l,u,a[v++],a[v++],a[v],a[v+1],n,i)||0;l=a[v++],u=a[v++];break;case As.A:var y=a[v++],b=a[v++],w=a[v++],T=a[v++],M=a[v++],D=a[v++];v+=1;var P=!!(1-a[v++]);f=Math.cos(M)*w+y,d=Math.sin(M)*T+b,m?(h=f,c=d):s+=Ro(l,u,f,d,n,i);var O=(n-y)*T/w+y;if(r){if(Vie(y,b,T,M,M+D,P,e,O,i))return!0}else s+=Uie(y,b,T,M,M+D,P,O,i);l=Math.cos(M+D)*w+y,u=Math.sin(M+D)*T+b;break;case As.R:h=l=a[v++],c=u=a[v++];var V=a[v++],$=a[v++];if(f=h+V,d=c+$,r){if(zs(h,c,f,c,e,n,i)||zs(f,c,f,d,e,n,i)||zs(f,d,h,d,e,n,i)||zs(h,d,h,c,e,n,i))return!0}else s+=Ro(f,c,f,d,n,i),s+=Ro(h,d,h,c,n,i);break;case As.Z:if(r){if(zs(l,u,h,c,e,n,i))return!0}else s+=Ro(l,u,h,c,n,i);l=h,u=c;break}}return!r&&!Gie(u,c)&&(s+=Ro(l,u,h,c,n,i)||0),s!==0}function Yie(t,e,r){return pB(t,0,!1,e,r)}function Xie(t,e,r,n){return pB(t,e,!0,r,n)}var B1=rt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ou),Zie={style:rt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Uy.style)},_x=uo.concat(["invisible","culling","z","z2","zlevel","parent"]),jie=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.update=function(){var r=this;t.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){r.buildPath(l,r.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<_x.length;++s)i[_x[s]]=this[_x[s]];i.__dirty|=_i}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(r){var n=Lt(r);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a.5?c5:n>.2?Bne:f5}else if(r)return f5}return c5},e.prototype.getInsideTextStroke=function(r){var n=this.style.fill;if(ze(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=D1(r,0)0))},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var r=this._rect,n=this.style,i=!r;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&yc)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),r=o.getBoundingRect()}if(this._rect=r,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=r.clone());if(this.__dirty||i){s.copy(r);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;u=Math.max(u,h??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return r},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect(),o=this.style;if(r=i[0],n=i[1],a.contain(r,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Xie(s,l/u,r,n)))return!0}if(this.hasFill())return Yie(s,r,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=yc,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(r){return this.animate("shape",r)},e.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():r==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(r,n){r==="shape"?this.setShape(n):t.prototype.attrKV.call(this,r,n)},e.prototype.setShape=function(r,n){var i=this.shape;return i||(i=this.shape={}),typeof r=="string"?i[r]=n:xe(i,r),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&yc)},e.prototype.createStyle=function(r){return Vy(B1,r)},e.prototype._innerSaveToNormal=function(r){t.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.shape&&!n.shape&&(n.shape=xe({},this.shape))},e.prototype._applyStateObj=function(r,n,i,a,o,s){t.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=xe({},i.shape),xe(u,n.shape)):(u=xe({},a?this.shape:i.shape),xe(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=xe({},this.shape);for(var h={},c=Lt(u),f=0;f0},e.prototype.hasFill=function(){var r=this.style,n=r.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(r){return Vy(Kie,r)},e.prototype.setBoundingRect=function(r){this._rect=r},e.prototype.getBoundingRect=function(){var r=this.style;if(!this._rect){var n=r.text;n!=null?n+="":n="";var i=vp(n,r.font,r.textAlign,r.textBaseline);if(i.x+=r.x||0,i.y+=r.y||0,this.hasStroke()){var a=r.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var r=e.prototype;r.dirtyRectTolerance=10}(),e}(ji);vB.prototype.type="tspan";const zd=vB;var Jie=rt({x:0,y:0},Ou),Qie={style:rt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Uy.style)};function eae(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var gB=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(r){return Vy(Jie,r)},e.prototype._getSize=function(r){var n=this.style,i=n[r];if(i!=null)return i;var a=eae(n.image)?n.image:this.__image;if(!a)return 0;var o=r==="width"?"height":"width",s=n[o];return s==null?a[r]:a[r]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Qie},e.prototype.getBoundingRect=function(){var r=this.style;return this._rect||(this._rect=new St(r.x||0,r.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ji);gB.prototype.type="image";const vn=gB;function tae(t,e){var r=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,h;i<0&&(r=r+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=h=o:o instanceof Array?o.length===1?s=l=u=h=o[0]:o.length===2?(s=u=o[0],l=h=o[1]):o.length===3?(s=o[0],l=h=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],h=o[3]):s=l=u=h=0;var c;s+l>i&&(c=s+l,s*=i/c,l*=i/c),u+h>i&&(c=u+h,u*=i/c,h*=i/c),l+u>a&&(c=l+u,l*=a/c,u*=a/c),s+h>a&&(c=s+h,s*=a/c,h*=a/c),t.moveTo(r+s,n),t.lineTo(r+i-l,n),l!==0&&t.arc(r+i-l,n+l,l,-Math.PI/2,0),t.lineTo(r+i,n+a-u),u!==0&&t.arc(r+i-u,n+a-u,u,0,Math.PI/2),t.lineTo(r+h,n+a),h!==0&&t.arc(r+h,n+a-h,h,Math.PI/2,Math.PI),t.lineTo(r,n+s),s!==0&&t.arc(r+s,n+s,s,Math.PI,Math.PI*1.5)}var Tc=Math.round;function mB(t,e,r){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;t.x1=n,t.x2=i,t.y1=a,t.y2=o;var s=r&&r.lineWidth;return s&&(Tc(n*2)===Tc(i*2)&&(t.x1=t.x2=Tu(n,s,!0)),Tc(a*2)===Tc(o*2)&&(t.y1=t.y2=Tu(a,s,!0))),t}}function yB(t,e,r){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;t.x=n,t.y=i,t.width=a,t.height=o;var s=r&&r.lineWidth;return s&&(t.x=Tu(n,s,!0),t.y=Tu(i,s,!0),t.width=Math.max(Tu(n+a,s,!1)-t.x,a===0?0:1),t.height=Math.max(Tu(i+o,s,!1)-t.y,o===0?0:1)),t}}function Tu(t,e,r){if(!e)return t;var n=Tc(t*2);return(n+Tc(e))%2===0?n/2:(n+(r?1:-1))/2}var rae=function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t}(),nae={},_B=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new rae},e.prototype.buildPath=function(r,n){var i,a,o,s;if(this.subPixelOptimize){var l=yB(nae,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?tae(r,n):r.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Tt);_B.prototype.type="rect";const Rt=_B;var Z7={fill:"#000"},j7=2,iae={style:rt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Uy.style)},xB=function(t){pe(e,t);function e(r){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Z7,n.attr(r),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var r=0;r0,j=r.width!=null&&(r.overflow==="truncate"||r.overflow==="break"||r.overflow==="breakAll"),q=o.calculatedLineHeight,G=0;G=0&&(G=D[q],G.align==="right");)this._placeToken(G,r,O,y,j,"right",w),V-=G.width,j-=G.width,q--;for(H+=(a-(H-m)-(b-j)-V)/2;$<=q;)G=D[$],this._placeToken(G,r,O,y,H+G.width/2,"center",w),H+=G.width,$++;y+=O}},e.prototype._placeToken=function(r,n,i,a,o,s,l){var u=n.rich[r.styleName]||{};u.text=r.text;var h=r.verticalAlign,c=a+i/2;h==="top"?c=a+r.height/2:h==="bottom"&&(c=a+i-r.height/2);var f=!r.isLineHolder&&xx(u);f&&this._renderBackground(u,n,s==="right"?o-r.width:s==="center"?o-r.width/2:o,c-r.height/2,r.width,r.height);var d=!!u.backgroundColor,v=r.textPadding;v&&(o=r8(o,s,v),c-=r.height/2-v[0]-r.innerHeight/2);var g=this._getOrCreateChild(zd),m=g.createStyle();g.useStyle(m);var y=this._defaultStyle,b=!1,w=0,T=t8("fill"in u?u.fill:"fill"in n?n.fill:(b=!0,y.fill)),M=e8("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!y.autoStroke||b)?(w=j7,y.stroke):null),D=u.textShadowBlur>0||n.textShadowBlur>0;m.text=r.text,m.x=o,m.y=c,D&&(m.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,m.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",m.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,m.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),m.textAlign=s,m.textBaseline="middle",m.font=r.font||al,m.opacity=io(u.opacity,n.opacity,1),J7(m,u),M&&(m.lineWidth=io(u.lineWidth,n.lineWidth,w),m.lineDash=xt(u.lineDash,n.lineDash),m.lineDashOffset=n.lineDashOffset||0,m.stroke=M),T&&(m.fill=T);var P=r.contentWidth,O=r.contentHeight;g.setBoundingRect(new St(H0(m.x,P,m.textAlign),_c(m.y,O,m.textBaseline),P,O))},e.prototype._renderBackground=function(r,n,i,a,o,s){var l=r.backgroundColor,u=r.borderWidth,h=r.borderColor,c=l&&l.image,f=l&&!c,d=r.borderRadius,v=this,g,m;if(f||r.lineHeight||u&&h){g=this._getOrCreateChild(Rt),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=i,y.y=a,y.width=o,y.height=s,y.r=d,g.dirtyShape()}if(f){var b=g.style;b.fill=l||null,b.fillOpacity=xt(r.fillOpacity,1)}else if(c){m=this._getOrCreateChild(vn),m.onload=function(){v.dirtyStyle()};var w=m.style;w.image=l.image,w.x=i,w.y=a,w.width=o,w.height=s}if(u&&h){var b=g.style;b.lineWidth=u,b.stroke=h,b.strokeOpacity=xt(r.strokeOpacity,1),b.lineDash=r.borderDash,b.lineDashOffset=r.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var T=(g||m).style;T.shadowBlur=r.shadowBlur||0,T.shadowColor=r.shadowColor||"transparent",T.shadowOffsetX=r.shadowOffsetX||0,T.shadowOffsetY=r.shadowOffsetY||0,T.opacity=io(r.opacity,n.opacity,1)},e.makeFont=function(r){var n="";return SB(r)&&(n=[r.fontStyle,r.fontWeight,bB(r.fontSize),r.fontFamily||"sans-serif"].join(" ")),n&&da(n)||r.textFont||r.font},e}(ji),aae={left:!0,right:1,center:1},oae={top:1,bottom:1,middle:1},K7=["fontStyle","fontWeight","fontSize","fontFamily"];function bB(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?vS+"px":t+"px"}function J7(t,e){for(var r=0;r=0,a=!1;if(t instanceof Tt){var o=wB(t),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(ec(s)||ec(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=xe({},n),u=xe({},u),u.fill=s):!ec(u.fill)&&ec(s)?(a=!0,n=xe({},n),u=xe({},u),u.fill=s8(s)):!ec(u.stroke)&&ec(l)&&(a||(n=xe({},n),u=xe({},u)),u.stroke=s8(l)),n.style=u}}if(n&&n.z2==null){a||(n=xe({},n));var h=t.z2EmphasisLift;n.z2=t.z2+(h??rf)}return n}function dae(t,e,r){if(r&&r.z2==null){r=xe({},r);var n=t.z2SelectLift;r.z2=t.z2+(n??lae)}return r}function pae(t,e,r){var n=Ct(t.currentStates,e)>=0,i=t.style.opacity,a=n?null:cae(t,["opacity"],e,{opacity:1});r=r||{};var o=r.style||{};return o.opacity==null&&(r=xe({},r),o=xe({opacity:n?i:a.opacity*.1},o),r.style=o),r}function bx(t,e){var r=this.states[t];if(this.style){if(t==="emphasis")return fae(this,t,e,r);if(t==="blur")return pae(this,t,r);if(t==="select")return dae(this,t,r)}return r}function Ju(t){t.stateProxy=bx;var e=t.getTextContent(),r=t.getTextGuideLine();e&&(e.stateProxy=bx),r&&(r.stateProxy=bx)}function u8(t,e){!LB(t,e)&&!t.__highByOuter&&is(t,CB)}function h8(t,e){!LB(t,e)&&!t.__highByOuter&&is(t,AB)}function Qo(t,e){t.__highByOuter|=1<<(e||0),is(t,CB)}function es(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&is(t,AB)}function kB(t){is(t,FS)}function OS(t){is(t,TB)}function DB(t){is(t,uae)}function MB(t){is(t,hae)}function LB(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function EB(t){var e=t.getModel(),r=[],n=[];e.eachComponent(function(i,a){var o=PS(a),s=i==="series",l=s?t.getViewOfSeriesModel(a):t.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){TB(u)}),s&&r.push(a)),o.isBlured=!1}),W(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(r,!1,e)})}function y5(t,e,r,n){var i=n.getModel();r=r||"coordinateSystem";function a(u,h){for(var c=0;c0){var s={dataIndex:o,seriesIndex:r.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function zu(t,e,r){ku(t,!0),is(t,Ju),x5(t,e,r)}function xae(t){ku(t,!1)}function wr(t,e,r,n){n?xae(t):zu(t,e,r)}function x5(t,e,r){var n=dt(t);e!=null?(n.focus=e,n.blurScope=r):n.focus&&(n.focus=null)}var f8=["emphasis","blur","select"],bae={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function dn(t,e,r,n){r=r||"itemStyle";for(var i=0;i1&&(o*=Sx(v),s*=Sx(v));var g=(i===a?-1:1)*Sx((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,m=g*o*d/s,y=g*-s*f/o,b=(t+r)/2+xg(c)*m-_g(c)*y,w=(e+n)/2+_g(c)*m+xg(c)*y,T=g8([1,0],[(f-m)/o,(d-y)/s]),M=[(f-m)/o,(d-y)/s],D=[(-1*f-m)/o,(-1*d-y)/s],P=g8(M,D);if(S5(M,D)<=-1&&(P=c0),S5(M,D)>=1&&(P=0),P<0){var O=Math.round(P/c0*1e6)/1e6;P=c0*2+O%2*c0}h.addData(u,b,w,o,s,T,P,c,a)}var kae=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Dae=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Mae(t){var e=new co;if(!t)return e;var r=0,n=0,i=r,a=n,o,s=co.CMD,l=t.match(kae);if(!l)return e;for(var u=0;uG*G+J*J&&(O=$,V=H),{cx:O,cy:V,x0:-h,y0:-c,x1:O*(i/M-1),y1:V*(i/M-1)}}function Fae(t){var e;if(Se(t)){var r=t.length;if(!r)return t;r===1?e=[t[0],t[0],0,0]:r===2?e=[t[0],t[0],t[1],t[1]]:r===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function Oae(t,e){var r,n=q0(e.r,0),i=q0(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var h=e.cx,c=e.cy,f=!!e.clockwise,d=y8(u-l),v=d>Cx&&d%Cx;if(v>la&&(d=v),!(n>la))t.moveTo(h,c);else if(d>Cx-la)t.moveTo(h+n*rc(l),c+n*Kl(l)),t.arc(h,c,n,l,u,!f),i>la&&(t.moveTo(h+i*rc(u),c+i*Kl(u)),t.arc(h,c,i,u,l,f));else{var g=void 0,m=void 0,y=void 0,b=void 0,w=void 0,T=void 0,M=void 0,D=void 0,P=void 0,O=void 0,V=void 0,$=void 0,H=void 0,j=void 0,q=void 0,G=void 0,J=n*rc(l),K=n*Kl(l),se=i*rc(u),ae=i*Kl(u),ce=d>la;if(ce){var ye=e.cornerRadius;ye&&(r=Fae(ye),g=r[0],m=r[1],y=r[2],b=r[3]);var de=y8(n-i)/2;if(w=Ha(de,y),T=Ha(de,b),M=Ha(de,g),D=Ha(de,m),V=P=q0(w,T),$=O=q0(M,D),(P>la||O>la)&&(H=n*rc(u),j=n*Kl(u),q=i*rc(l),G=i*Kl(l),dla){var lt=Ha(y,V),it=Ha(b,V),Re=bg(q,G,J,K,n,lt,f),Ae=bg(H,j,se,ae,n,it,f);t.moveTo(h+Re.cx+Re.x0,c+Re.cy+Re.y0),V0&&t.arc(h+Re.cx,c+Re.cy,lt,bn(Re.y0,Re.x0),bn(Re.y1,Re.x1),!f),t.arc(h,c,n,bn(Re.cy+Re.y1,Re.cx+Re.x1),bn(Ae.cy+Ae.y1,Ae.cx+Ae.x1),!f),it>0&&t.arc(h+Ae.cx,c+Ae.cy,it,bn(Ae.y1,Ae.x1),bn(Ae.y0,Ae.x0),!f))}else t.moveTo(h+J,c+K),t.arc(h,c,n,l,u,!f);if(!(i>la)||!ce)t.lineTo(h+se,c+ae);else if($>la){var lt=Ha(g,$),it=Ha(m,$),Re=bg(se,ae,H,j,i,-it,f),Ae=bg(J,K,q,G,i,-lt,f);t.lineTo(h+Re.cx+Re.x0,c+Re.cy+Re.y0),$0&&t.arc(h+Re.cx,c+Re.cy,it,bn(Re.y0,Re.x0),bn(Re.y1,Re.x1),!f),t.arc(h,c,i,bn(Re.cy+Re.y1,Re.cx+Re.x1),bn(Ae.cy+Ae.y1,Ae.cx+Ae.x1),f),lt>0&&t.arc(h+Ae.cx,c+Ae.cy,lt,bn(Ae.y1,Ae.x1),bn(Ae.y0,Ae.x0),!f))}else t.lineTo(h+se,c+ae),t.arc(h,c,i,u,l,f)}t.closePath()}}}var Nae=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t}(),VB=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Nae},e.prototype.buildPath=function(r,n){Oae(r,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Tt);VB.prototype.type="sector";const li=VB;var zae=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),$B=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new zae},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.PI*2;r.moveTo(i+n.r,a),r.arc(i,a,n.r,0,o,!1),r.moveTo(i+n.r0,a),r.arc(i,a,n.r0,0,o,!0)},e}(Tt);$B.prototype.type="ring";const jy=$B;function Vae(t,e,r,n){var i=[],a=[],o=[],s=[],l,u,h,c;if(n){h=[1/0,1/0],c=[-1/0,-1/0];for(var f=0,d=t.length;f=2){if(n){var a=Vae(i,n,r,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(r?o:o-1);s++){var l=a[s*2],u=a[s*2+1],h=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;sQl[1]){if(s=!1,a)return s;var h=Math.abs(Ql[0]-Jl[1]),c=Math.abs(Jl[0]-Ql[1]);Math.min(h,c)>i.len()&&(h0){var c=h.duration,f=h.delay,d=h.easing,v={duration:c,delay:f||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:t,during:o};s?e.animateFrom(r,v):e.animateTo(r,v)}else e.stopAnimation(),!s&&e.attr(r),o&&o(1),a&&a()}function Gt(t,e,r,n,i,a){HS("update",t,e,r,n,i,a)}function fr(t,e,r,n,i,a){HS("enter",t,e,r,n,i,a)}function Ic(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function b8(t){return!t.isGroup}function ooe(t){return t.shape!=null}function _p(t,e,r){if(!t||!e)return;function n(o){var s={};return o.traverse(function(l){b8(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return ooe(o)&&(s.shape=xe({},o.shape)),s}var a=n(t);e.traverse(function(o){if(b8(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Gt(o,l,r,dt(o).dataIndex)}}})}function eP(t,e){return Ce(t,function(r){var n=r[0];n=F1(n,e.x),n=O1(n,e.x+e.width);var i=r[1];return i=F1(i,e.y),i=O1(i,e.y+e.height),[n,i]})}function soe(t,e){var r=F1(t.x,e.x),n=O1(t.x+t.width,e.x+e.width),i=F1(t.y,e.y),a=O1(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}}function xp(t,e,r){var n=xe({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(i.image=t.slice(8),rt(i,r),new vn(n)):Jy(t.replace("path://",""),n,r,"center")}function W0(t,e,r,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var m=Ax(d,v,h,c)/f;return!(m<0||m>1)}function Ax(t,e,r,n){return t*n-r*e}function loe(t){return t<=1e-6&&t>=-1e-6}function af(t){var e=t.itemTooltipOption,r=t.componentModel,n=t.itemName,i=ze(e)?{formatter:e}:e,a=r.mainType,o=r.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=t.formatterParamsExtra;l&&W(Lt(l),function(h){He(s,h)||(s[h]=l[h],s.$vars.push(h))});var u=dt(t.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:rt({content:n,formatterParams:s},i)}}function S8(t,e){var r;t.isGroup&&(r=e(t)),r||t.traverse(e)}function vl(t,e){if(t)if(Se(t))for(var r=0;r=0&&s.push(l)}),s}}function gl(t,e){return bt(bt({},t,!0),e,!0)}const boe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},Soe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var z1="ZH",WS="EN",Hd=WS,Vm={},US={},lP=zt.domSupported?function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase();return t.indexOf(z1)>-1?z1:Hd}():Hd;function uP(t,e){t=t.toUpperCase(),US[t]=new ur(e),Vm[t]=e}function woe(t){if(ze(t)){var e=Vm[t.toUpperCase()]||{};return t===z1||t===WS?ot(e):bt(ot(e),ot(Vm[Hd]),!1)}else return bt(ot(t),ot(Vm[Hd]),!1)}function A5(t){return US[t]}function Coe(){return US[Hd]}uP(WS,boe);uP(z1,Soe);var YS=1e3,XS=YS*60,cd=XS*60,qi=cd*24,k8=qi*365,U0={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Cg="{yyyy}-{MM}-{dd}",D8={year:"{yyyy}",month:"{yyyy}-{MM}",day:Cg,hour:Cg+" "+U0.hour,minute:Cg+" "+U0.minute,second:Cg+" "+U0.second,millisecond:U0.none},Dx=["year","month","day","hour","minute","second","millisecond"],hP=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Ts(t,e){return t+="","0000".substr(0,e-t.length)+t}function Bc(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Aoe(t){return t===Bc(t)}function Toe(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function t2(t,e,r,n){var i=ho(t),a=i[ZS(r)](),o=i[Pc(r)]()+1,s=Math.floor((o-1)/3)+1,l=i[r2(r)](),u=i["get"+(r?"UTC":"")+"Day"](),h=i[qd(r)](),c=(h-1)%12+1,f=i[n2(r)](),d=i[i2(r)](),v=i[a2(r)](),g=n instanceof ur?n:A5(n||lP)||Coe(),m=g.getModel("time"),y=m.get("month"),b=m.get("monthAbbr"),w=m.get("dayOfWeek"),T=m.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Ts(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[o-1]).replace(/{MMM}/g,b[o-1]).replace(/{MM}/g,Ts(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ts(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,T[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ts(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Ts(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Ts(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Ts(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Ts(v,3)).replace(/{S}/g,v+"")}function koe(t,e,r,n,i){var a=null;if(ze(r))a=r;else if(Je(r))a=r(t.value,e,{level:t.level});else{var o=xe({},U0);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(Se(a)){var c=t.level==null?0:t.level>=0?t.level:a.length+t.level;c=Math.min(c,a.length-1),a=a[c]}}return t2(new Date(t.value),a,i,n)}function cP(t,e){var r=ho(t),n=r[Pc(e)]()+1,i=r[r2(e)](),a=r[qd(e)](),o=r[n2(e)](),s=r[i2(e)](),l=r[a2(e)](),u=l===0,h=u&&s===0,c=h&&o===0,f=c&&a===0,d=f&&i===1,v=d&&n===1;return v?"year":d?"month":f?"day":c?"hour":h?"minute":u?"second":"millisecond"}function M8(t,e,r){var n=$t(t)?ho(t):t;switch(e=e||cP(t,r),e){case"year":return n[ZS(r)]();case"half-year":return n[Pc(r)]()>=6?1:0;case"quarter":return Math.floor((n[Pc(r)]()+1)/4);case"month":return n[Pc(r)]();case"day":return n[r2(r)]();case"half-day":return n[qd(r)]()/24;case"hour":return n[qd(r)]();case"minute":return n[n2(r)]();case"second":return n[i2(r)]();case"millisecond":return n[a2(r)]()}}function ZS(t){return t?"getUTCFullYear":"getFullYear"}function Pc(t){return t?"getUTCMonth":"getMonth"}function r2(t){return t?"getUTCDate":"getDate"}function qd(t){return t?"getUTCHours":"getHours"}function n2(t){return t?"getUTCMinutes":"getMinutes"}function i2(t){return t?"getUTCSeconds":"getSeconds"}function a2(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Doe(t){return t?"setUTCFullYear":"setFullYear"}function fP(t){return t?"setUTCMonth":"setMonth"}function dP(t){return t?"setUTCDate":"setDate"}function pP(t){return t?"setUTCHours":"setHours"}function vP(t){return t?"setUTCMinutes":"setMinutes"}function gP(t){return t?"setUTCSeconds":"setSeconds"}function mP(t){return t?"setUTCMilliseconds":"setMilliseconds"}function yP(t){if(!JI(t))return ze(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function _P(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,n){return n.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var lf=bS;function T5(t,e,r){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(h){return h&&da(h)?h:"-"}function a(h){return!!(h!=null&&!isNaN(h)&&isFinite(h))}var o=e==="time",s=t instanceof Date;if(o||s){var l=o?ho(t):t;if(isNaN(+l)){if(s)return"-"}else return t2(l,n,r)}if(e==="ordinal")return W4(t)?i(t):$t(t)&&a(t)?t+"":"-";var u=Jo(t);return a(u)?yP(u):W4(t)?i(t):typeof t=="boolean"?t+"":"-"}var L8=["a","b","c","d","e","f","g"],Mx=function(t,e){return"{"+t+(e??"")+"}"};function xP(t,e,r){Se(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=r.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Qu(t,e){return e=e||"transparent",ze(t)?t:nt(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function V1(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location.href=t}else window.open(t,e)}var $m=W,bP=["left","right","top","bottom","width","height"],Du=[["width","left","right"],["height","top","bottom"]];function jS(t,e,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var h=l.getBoundingRect(),c=e.childAt(u+1),f=c&&c.getBoundingRect(),d,v;if(t==="horizontal"){var g=h.width+(f?-f.x+h.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+r,s=h.height):s=Math.max(s,h.height)}else{var m=h.height+(f?-f.y+h.y:0);v=o+m,v>i||l.newline?(a+=s+r,o=0,v=m,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),t==="horizontal"?a=d+r:o=v+r)})}var $u=jS;pt(jS,"vertical");pt(jS,"horizontal");function Eoe(t,e,r){var n=e.width,i=e.height,a=Be(t.left,n),o=Be(t.top,i),s=Be(t.right,n),l=Be(t.bottom,i);return(isNaN(a)||isNaN(parseFloat(t.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(t.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.bottom)))&&(l=i),r=lf(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function $r(t,e,r){r=lf(r||0);var n=e.width,i=e.height,a=Be(t.left,n),o=Be(t.top,i),s=Be(t.right,n),l=Be(t.bottom,i),u=Be(t.width,n),h=Be(t.height,i),c=r[2]+r[0],f=r[1]+r[3],d=t.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(h)&&(h=i-l-c-o),d!=null&&(isNaN(u)&&isNaN(h)&&(d>n/i?u=n*.8:h=i*.8),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-h-c),t.left||t.right){case"center":a=n/2-u/2-r[3];break;case"right":a=n-u-f;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-c;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(h)&&(h=i-c-o-(l||0));var v=new St(a+r[3],o+r[0],u,h);return v.margin=r,v}function o2(t,e,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||t,a.x=t.x,a.y=t.y,!o&&!s)return!1;var u;if(l==="raw")u=t.type==="group"?new St(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}var c=$r(rt({width:u.width,height:u.height},e),r,n),f=o?c.x-u.x:0,d=s?c.y-u.y:0;return l==="raw"?(a.x=f,a.y=d):(a.x+=f,a.y+=d),a===t&&t.markRedraw(),!0}function Ioe(t,e){return t[Du[e][0]]!=null||t[Du[e][1]]!=null&&t[Du[e][2]]!=null}function Wd(t){var e=t.layoutMode||t.constructor.layoutMode;return nt(e)?e:e?{type:e}:null}function ul(t,e,r){var n=r&&r.ignoreSize;!Se(n)&&(n=[n,n]);var i=o(Du[0],0),a=o(Du[1],1);u(Du[0],t,i),u(Du[1],t,a);function o(h,c){var f={},d=0,v={},g=0,m=2;if($m(h,function(w){v[w]=t[w]}),$m(h,function(w){s(e,w)&&(f[w]=v[w]=e[w]),l(f,w)&&d++,l(v,w)&&g++}),n[c])return l(e,h[1])?v[h[2]]=null:l(e,h[2])&&(v[h[1]]=null),v;if(g===m||!d)return v;if(d>=m)return f;for(var y=0;y=0;l--)s=bt(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(r,n){var i=r+"Index",a=r+"Id";return gp(this.ecModel,r,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var r=this;return{left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(r){this.option.zlevel=r},e.protoInitialize=function(){var r=e.prototype;r.type="component",r.id="",r.name="",r.mainType="",r.subType="",r.componentIndex=0}(),e}(ur);lB(hf,ur);qy(hf);_oe(hf);xoe(hf,Poe);function Poe(t){var e=[];return W(hf.getClassesByMainType(t),function(r){e=e.concat(r.dependencies||r.prototype.dependencies||[])}),e=Ce(e,function(r){return Ja(r).main}),t!=="dataset"&&Ct(e,"dataset")<=0&&e.unshift("dataset"),e}const Nt=hf;var wP="";typeof navigator<"u"&&(wP=navigator.platform||"");var nc="rgba(0, 0, 0, 0.2)";const Roe={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:nc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:nc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:nc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:nc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:nc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:nc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:wP.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var CP=Ye(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Ji="original",Dn="arrayRows",Qi="objectRows",go="keyedColumns",el="typedArray",AP="unknown",ao="column",cf="row",un={Must:1,Might:2,Not:3},TP=Ft();function Foe(t){TP(t).datasetMap=Ye()}function kP(t,e,r){var n={},i=JS(e);if(!i||!t)return n;var a=[],o=[],s=e.ecModel,l=TP(s).datasetMap,u=i.uid+"_"+r.seriesLayoutBy,h,c;t=t.slice(),W(t,function(g,m){var y=nt(g)?g:t[m]={name:g};y.type==="ordinal"&&h==null&&(h=m,c=v(y)),n[y.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});W(t,function(g,m){var y=g.name,b=v(g);if(h==null){var w=f.valueWayDim;d(n[y],w,b),d(o,w,b),f.valueWayDim+=b}else if(h===m)d(n[y],0,b),d(a,0,b);else{var w=f.categoryWayDim;d(n[y],w,b),d(o,w,b),f.categoryWayDim+=b}});function d(g,m,y){for(var b=0;be)return t[n];return t[r-1]}function LP(t,e,r,n,i,a,o){a=a||t;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var h=o==null||!n?r:$oe(n,o);if(h=h||r,!(!h||!h.length)){var c=h[l];return i&&(u[i]=c),s.paletteIdx=(l+1)%h.length,c}}function Goe(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Ag,f0,I8,B8="\0_ec_inner",Hoe=1,EP=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i,a,o,s){a=a||{},this.option=null,this._theme=new ur(a),this._locale=new ur(o),this._optionManager=s},e.prototype.setOption=function(r,n,i){var a=F8(n);this._optionManager.setOption(r,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(r,n){return this._resetOption(r,F8(n))},e.prototype._resetOption=function(r,n){var i=!1,a=this._optionManager;if(!r||r==="recreate"){var o=a.mountOption(r==="recreate");!this.option||r==="recreate"?I8(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((r==="timeline"||r==="media")&&this.restoreData(),!r||r==="recreate"||r==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!r||r==="recreate"||r==="media"){var l=a.getMediaOption(this);l.length&&W(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(r){this._mergeOption(r,null)},e.prototype._mergeOption=function(r,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=Ye(),u=n&&n.replaceMergeMainTypeMap;Foe(this),W(r,function(c,f){c!=null&&(Nt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?ot(c):bt(i[f],c,!0))}),u&&u.each(function(c,f){Nt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Nt.topologicalTravel(s,Nt.getAllClassMainTypes(),h,this);function h(c){var f=zoe(this,c,er(r[c])),d=a.get(c),v=d?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",g=nB(d,f,v);aie(g,c,Nt),i[c]=null,a.set(c,null),o.set(c,0);var m=[],y=[],b=0,w;W(g,function(T,M){var D=T.existing,P=T.newOption;if(!P)D&&(D.mergeOption({},this),D.optionUpdated({},!1));else{var O=c==="series",V=Nt.getClass(c,T.keyInfo.subType,!O);if(!V)return;if(c==="tooltip"){if(w)return;w=!0}if(D&&D.constructor===V)D.name=T.keyInfo.name,D.mergeOption(P,this),D.optionUpdated(P,!1);else{var $=xe({componentIndex:M},T.keyInfo);D=new V(P,this,this,$),xe(D,$),T.brandNew&&(D.__requireNewView=!0),D.init(P,this,this),D.optionUpdated(null,!0)}}D?(m.push(D.option),y.push(D),b++):(m.push(void 0),y.push(void 0))},this),i[c]=m,a.set(c,y),o.set(c,b),c==="series"&&Ag(this)}this._seriesIndices||Ag(this)},e.prototype.getOption=function(){var r=ot(this.option);return W(r,function(n,i){if(Nt.hasClass(i)){for(var a=er(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Nd(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,r[i]=a}}),delete r[B8],r},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(r){this._payload=r},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(r,n){var i=this._componentsMap.get(r);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:r==="max"?t<=e:t===e}function ese(t,e){return t.join(",")===e.join(",")}const tse=joe;var oa=W,Ud=nt,O8=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ex(t){var e=t&&t.itemStyle;if(e)for(var r=0,n=O8.length;r=0;m--){var y=t[m];if(s||(v=y.data.rawIndexOf(y.stackedByDimension,d)),v>=0){var b=y.data.getByRawIndex(y.stackResultDimension,v);if(l==="all"||l==="positive"&&b>0||l==="negative"&&b<0||l==="samesign"&&f>=0&&b>0||l==="samesign"&&f<=0&&b<0){f=Xne(f,b),g=b;break}}}return n[0]=f,n[1]=g,n})})}var s2=function(){function t(e){this.data=e.data||(e.sourceFormat===go?{}:[]),this.sourceFormat=e.sourceFormat||AP,this.seriesLayoutBy=e.seriesLayoutBy||ao,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var r=this.dimensionsDefine=e.dimensionsDefine;if(r)for(var n=0;ng&&(g=w)}d[0]=v,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};q8=(e={},e[Dn+"_"+ao]={pure:!0,appendData:a},e[Dn+"_"+cf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Qi]={pure:!0,appendData:a},e[go]={pure:!0,appendData:function(o){var s=this._data;W(o,function(l,u){for(var h=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)h.push(l[c])})}},e[Ji]={appendData:a},e[el]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[m])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,r){return qc(this.getData(r),e)},t.prototype.formatTooltip=function(e,r,n){},t}();function X8(t){var e,r;return nt(t)?t.type&&(r=t):e=t,{text:e,frag:r}}function fd(t){return new yse(t)}var yse=function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var r=this._upstream,n=e&&e.skip;if(this._dirty&&r){var i=this.context;i.data=i.outputData=r.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=h(this._modBy),s=this._modDataCount||0,l=h(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function h(b){return!(b>=1)&&(b=1),b}var c;(this._dirty||a==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(r?this._dueEnd=r._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,v=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(c||d1&&n>0?s:o}};return a;function o(){return e=t?null:le},gte:function(t,e){return t>=e}},xse=function(){function t(e,r){if(!$t(r)){var n="";Yt(n)}this._opFn=HP[e],this._rvalFloat=Jo(r)}return t.prototype.evaluate=function(e){return $t(e)?this._opFn(e,this._rvalFloat):this._opFn(Jo(e),this._rvalFloat)},t}(),qP=function(){function t(e,r){var n=e==="desc";this._resultLT=n?1:-1,r==null&&(r=n?"min":"max"),this._incomparable=r==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,r){var n=$t(e)?e:Jo(e),i=$t(r)?r:Jo(r),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=ze(e),l=ze(r);s&&(n=l?e:0),l&&(i=s?r:0)}return ni?-this._resultLT:0},t}(),bse=function(){function t(e,r){this._rval=r,this._isEQ=e,this._rvalTypeof=typeof r,this._rvalFloat=Jo(r)}return t.prototype.evaluate=function(e){var r=e===this._rval;if(!r){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(r=Jo(e)===this._rvalFloat)}return this._isEQ?r:!r},t}();function Sse(t,e){return t==="eq"||t==="ne"?new bse(t==="eq",e):He(HP,t)?new xse(t,e):null}var wse=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,r){},t.prototype.retrieveValueFromItem=function(e,r){},t.prototype.convertValue=function(e,r){return tl(e,r)},t}();function Cse(t,e){var r=new wse,n=t.data,i=r.sourceFormat=t.sourceFormat,a=t.startIndex,o="";t.seriesLayoutBy!==ao&&Yt(o);var s=[],l={},u=t.dimensionsDefine;if(u)W(u,function(g,m){var y=g.name,b={index:m,name:y,displayName:g.displayName};if(s.push(b),y!=null){var w="";He(l,y)&&Yt(w),l[y]=b}});else for(var h=0;h65535?Ise:Bse}function ic(){return[1/0,-1/0]}function Pse(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function K8(t,e,r,n,i){var a=YP[r||"float"];if(i){var o=t[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;um[1]&&(m[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},t.prototype._initDataFromProvider=function(e,r,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Ce(o,function(b){return b.property}),h=0;hy[1]&&(y[1]=m)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=r,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,r){if(!(r>=0&&r=0&&r=this._rawCount||e<0)return-1;if(!this._indices)return e;var r=this._indices,n=r[e];if(n!=null&&ne)a=o-1;else return o}return-1},t.prototype.indicesOfNearest=function(e,r,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,h=0,c=this.count();h=0&&l<0)&&(s=v,l=d,u=0),d===l&&(o[u++]=h))}return o.length=u,o},t.prototype.getIndices=function(){var e,r=this._indices;if(r){var n=r.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=c&&b<=f||isNaN(b))&&(l[u++]=g),g++}v=!0}else if(a===2){for(var m=d[i[0]],w=d[i[1]],T=e[i[1]][0],M=e[i[1]][1],y=0;y=c&&b<=f||isNaN(b))&&(D>=T&&D<=M||isNaN(D))&&(l[u++]=g),g++}v=!0}}if(!v)if(a===1)for(var y=0;y=c&&b<=f||isNaN(b))&&(l[u++]=P)}else for(var y=0;ye[$][1])&&(O=!1)}O&&(l[u++]=r.getRawIndex(y))}return uy[1]&&(y[1]=m)}}}},t.prototype.lttbDownSample=function(e,r){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/r),u=this.getRawIndex(0),h,c,f,d=new(p0(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var v=1;vh&&(h=c,f=T)}H>0&&Hh-v&&(l=h-v,s.length=l);for(var g=0;gc[1]&&(c[1]=y),f[d++]=b}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},t.prototype.each=function(e,r){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=c)}return o=[s,l],this._extent[e]=o,o},t.prototype.getRawDataItem=function(e){var r=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(r);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function e(r,n,i,a){return tl(r[a],this._dimensions[a])}Px={arrayRows:e,objectRows:function(r,n,i,a){return tl(r[n],this._dimensions[a])},keyedColumns:e,original:function(r,n,i,a){var o=r&&(r.value==null?r:r.value);return tl(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(r,n,i,a){return r[a]}}}(),t}(),XP=function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,r){this._sourceList=e,this._upstreamSignList=r,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,r=this._getUpstreamSourceManagers(),n=!!r.length,i,a;if(Tg(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var h=r[0];h.prepareSource(),u=h.getSource(),s=u.data,l=u.sourceFormat,a=[h._getVersionSign()]}else s=o.get("data",!0),l=Ci(s)?el:Ji,a=[];var c=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=xt(c.seriesLayoutBy,f.seriesLayoutBy)||null,v=xt(c.sourceHeader,f.sourceHeader),g=xt(c.dimensions,f.dimensions),m=d!==f.seriesLayoutBy||!!v!=!!f.sourceHeader||g;i=m?[M5(s,{seriesLayoutBy:d,sourceHeader:v,dimensions:g},l)]:[]}else{var y=e;if(n){var b=this._applyTransform(r);i=b.sourceList,a=b.upstreamSignList}else{var w=y.get("source",!0);i=[M5(w,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},t.prototype._applyTransform=function(e){var r=this._sourceHost,n=r.get("transform",!0),i=r.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&Q8(a)}var o,s=[],l=[];return W(e,function(u){u.prepareSource();var h=u.getSource(i||0),c="";i!=null&&!h&&Q8(c),s.push(h),l.push(u._getVersionSign())}),n?o=Lse(n,s,{datasetIndex:r.componentIndex}):i!=null&&(o=[cse(s[0])]),{sourceList:o,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),r=0;r1||r>0&&!t.noHeader;return W(t.blocks,function(i){var a=JP(i);a>=e&&(e=a+ +(n&&(!a||L5(i)&&!i.noHeader)))}),e}return 0}function Rse(t,e,r,n){var i=e.noHeader,a=Ose(JP(e)),o=[],s=e.blocks||[];Wn(!s||Se(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(He(u,l)){var h=new qP(u[l],null);s.sort(function(v,g){return h.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}W(s,function(v,g){var m=e.valueFormatter,y=KP(v)(m?xe(xe({},t),{valueFormatter:m}):t,v,g>0?a.html:0,n);y!=null&&o.push(y)});var c=t.renderMode==="richText"?o.join(a.richText):E5(o.join(""),i?r:a.html);if(i)return c;var f=A5(e.header,"ordinal",t.useUTC),d=jP(n,t.renderMode).nameStyle;return t.renderMode==="richText"?QP(t,f,d)+a.richText+c:E5('
'+ei(f)+"
"+c,r)}function Fse(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(T){return T=Se(T)?T:[T],Ce(T,function(M,D){return A5(M,Se(d)?d[D]:d,u)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),f=a?"":A5(l,"ordinal",u),d=e.valueType,v=o?[]:h(e.value),g=!s||!a,m=!s&&a,y=jP(n,i),b=y.nameStyle,w=y.valueStyle;return i==="richText"?(s?"":c)+(a?"":QP(t,f,b))+(o?"":Vse(t,v,g,m,w)):E5((s?"":c)+(a?"":Nse(f,!s,b))+(o?"":zse(v,g,m,w)),r)}}function eA(t,e,r,n,i,a){if(t){var o=KP(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function Ose(t){return{html:Bse[t],richText:Pse[t]}}function E5(t,e){var r='
',n="margin: "+e+"px 0 0";return'
'+t+r+"
"}function Nse(t,e,r){var n=e?"margin-left:2px":"";return''+ei(t)+""}function zse(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=Se(t)?t:[t],''+Ce(t,function(o){return ei(o)}).join("  ")+""}function QP(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function Vse(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Se(e)?e.join(" "):e,a)}function eR(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Ku(n)}function tR(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var Px=function(){function t(){this.richTextStyles={},this._nextStyleNameId=QI()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=Doe({color:r,type:e,renderMode:n,markerId:i});return ze(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};Se(r)?W(r,function(a){return xe(n,a)}):xe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function rR(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=Se(s),u=eR(e,r),h,c,f,d;if(o>1||l&&!o){var v=$se(s,e,r,a,u);h=v.inlineValues,c=v.inlineValueTypes,f=v.blocks,d=v.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=h=Hc(i,r,a[0]),c=g.type}else d=h=l?s[0]:s;var m=LS(e),y=m&&e.name||"",b=i.getName(r),w=n?y:b;return Xr("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[Xr("nameValue",{markerType:"item",markerColor:u,name:w,noName:!da(w),value:h,valueType:c})].concat(f||[])})}function $se(t,e,r,n,i){var a=e.getData(),o=so(t,function(c,f,d){var v=a.getDimensionInfo(d);return c=c||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?W(n,function(c){h(Hc(a,r,c),c)}):W(t,h);function h(c,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Xr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var As=Ft();function Tg(t,e){return t.getName(e)||t.getId(e)}var Gm="__universalTransitionEnabled",l2=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=cd({count:Hse,reset:qse}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=As(this).sourceManager=new XP(this);a.prepareSource();var o=this.getInitialData(r,i);rA(o,this),this.dataTask.context.data=o,As(this).dataBeforeProcessed=o,tA(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=qd(this),a=i?lf(r):{},o=this.subType;Nt.hasClass(o)&&(o+="Series"),bt(r,n.getTheme().get(this.subType)),bt(r,this.getDefaultOption()),Yu(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&ul(r,a,i)},e.prototype.mergeOption=function(r,n){r=bt(this.option,r,!0),this.fillDataTextStyle(r.data);var i=qd(this);i&&ul(this.option,r,i);var a=As(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);rA(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,As(this).dataBeforeProcessed=o,tA(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!Ci(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=QS.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Tg(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Gm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){nt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Nt.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Nt);Or(l2,nw);Or(l2,QS);lB(l2,Nt);function tA(t){var e=t.name;LS(t)||(t.name=Gse(t)||e)}function Gse(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return W(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Hse(t){return t.model.getRawData().count()}function qse(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Wse}function Wse(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function rA(t,e){W(C1(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,pt(Use,e))})}function Use(t,e){var r=I5(t);return r&&r.setOutputEnd((e||this).count()),e}function I5(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}const pr=l2;var aw=function(){function t(){this.group=new st,this.uid=of("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();IS(aw);Hy(aw);const wr=aw;function cf(){var t=Ft();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var nR=Ft(),Yse=cf(),ow=function(){function t(){this.group=new st,this.uid=of("viewChart"),this.renderTask=cd({plan:Xse,reset:Zse}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&iA(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&iA(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){vl(this.group,e)},t.markUpdateMethod=function(e,r){nR(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function nA(t,e,r){t&&Vd(t)&&(e==="emphasis"?Ko:Jo)(t,r)}function iA(t,e,r){var n=Xu(t,e),i=e&&e.highlightKey!=null?bae(e.highlightKey):null;n!=null?W(er(n),function(a){nA(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){nA(a,r,i)})}IS(ow);Hy(ow);function Xse(t){return Yse(t.model)}function Zse(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&nR(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),jse[l]}var jse={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const hr=ow;var $1="\0__throttleOriginMethod",aA="\0__throttleRate",oA="\0__throttleType";function u2(t,e,r){var n,i=0,a=0,o=null,s,l,u,h;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var f=function(){for(var d=[],v=0;v=0?c():o=setTimeout(c,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){h=d},f}function ff(t,e,r,n){var i=t[e];if(i){var a=i[$1]||i,o=i[oA],s=i[aA];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=u2(a,r,n==="debounce"),i[$1]=a,i[oA]=n,i[aA]=r}return i}}function Ud(t,e){var r=t[e];r&&r[$1]&&(r.clear&&r.clear(),t[e]=r[$1])}var sA=Ft(),lA={itemStyle:Zu(sP,!0),lineStyle:Zu(oP,!0)},Kse={lineStyle:"stroke",itemStyle:"fill"};function iR(t,e){var r=t.visualStyleMapper||lA[e];return r||(console.warn("Unknown style type '"+e+"'."),lA.itemStyle)}function aR(t,e){var r=t.visualDrawType||Kse[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var Jse={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=iR(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=aR(t,n),u=o[l],h=Je(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||c){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Je(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||Je(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&h)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var g=t.getDataParams(v),m=xe({},o);m[l]=h(g),d.setItemVisual(v,"style",m)}}}},v0=new ur,Qse={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=iR(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){v0.option=l[n];var u=i(v0),h=o.ensureUniqueItemVisual(s,"style");xe(h,u),v0.option.decal&&(o.setItemVisual(s,"decal",v0.option.decal),v0.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},ele={performRawSeries:!0,overallReset:function(t){var e=Ye();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),sA(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=sA(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=aR(r,s);a.each(function(u){var h=a.getRawIndex(u);i[h]=u}),n.each(function(u){var h=i[u],c=a.getItemVisual(h,"colorFromPalette");if(c){var f=a.ensureUniqueItemVisual(h,"style"),d=n.getName(u)||u+"",v=n.count();f[l]=r.getColorFromPalette(d,o,v)}})}})}},kg=Math.PI;function tle(t,e){e=e||{},rt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new st,n=new Rt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Vt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Rt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new $S({shape:{startAngle:-kg/2,endAngle:-kg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:kg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:kg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),h=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:h}),a.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var rle=function(){function t(e,r,n,i){this._stageTaskMap=Ye(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ye();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;W(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Wn(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;W(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),c=h.seriesTaskMap,f=h.overallTask;if(f){var d,v=f.agentStubMap;v.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);v.each(function(m){m.perform(g)}),f.perform(g)&&(a=!0)}else c&&c.each(function(m,y){s(i,m)&&m.dirty();var b=o.getPerformArgs(m,i.block);b.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(b)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ye(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,i).each(h);function h(c){var f=c.uid,d=s.set(f,o&&o.get(f)||cd({plan:sle,reset:lle,count:hle}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||cd({reset:nle});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ye(),u=e.seriesType,h=e.getTargetSeries,c=!0,f=!1,d="";Wn(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):h?h(n,i).each(v):(c=!1,W(n.getSeries(),v));function v(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(f=!0,cd({reset:ile,onDirty:ole})));y.context={model:g,overallProgress:c},y.agent=o,y.__block=c,a._pipe(g,y)}f&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return Je(e)&&(e={overallReset:e,seriesType:cle(e)}),e.uid=of("stageHandler"),r&&(e.visualType=r),e},t}();function nle(t){t.overallReset(t.ecModel,t.api,t.payload)}function ile(t){return t.overallProgress&&ale}function ale(){this.agent.dirty(),this.getDownstream().dirty()}function ole(){this.agent&&this.agent.dirty()}function sle(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function lle(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=er(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Ce(e,function(r,n){return oR(n)}):ule}var ule=oR(0);function oR(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-f.length){var v=u.slice(0,d);v!=="data"&&(r.mainType=v,r[f.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(n[u]=l,h=!0),h||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function h(c,f,d,v){return c[d]==null||f[v||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),B5=["symbol","symbolSize","symbolRotate","symbolOffset"],fA=B5.concat(["symbolKeepAspect"]),vle={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Mu(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function P5(t,e,r){for(var n=e.type==="radial"?Ele(t,e,r):Lle(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:$t(t)?[t]:Se(t)?t:null}function lw(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Ble(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=Ce(r,function(a){return a/i}),n/=i)}return[r,n]}var Ple=new co(!0);function q1(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function dA(t){return typeof t=="string"&&t!=="none"}function W1(t){var e=t.fill;return e!=null&&e!=="none"}function pA(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function vA(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function R5(t,e,r){var n=BS(e.image,e.__image,r);if(qy(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Dm),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function Rle(t,e,r,n){var i,a=q1(r),o=W1(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var h=e.path||Ple,c=e.__dirty;if(!n){var f=r.fill,d=r.stroke,v=o&&!!f.colorStops,g=a&&!!d.colorStops,m=o&&!!f.image,y=a&&!!d.image,b=void 0,w=void 0,T=void 0,M=void 0,D=void 0;(v||g)&&(D=e.getBoundingRect()),v&&(b=c?P5(t,f,D):e.__canvasFillGradient,e.__canvasFillGradient=b),g&&(w=c?P5(t,d,D):e.__canvasStrokeGradient,e.__canvasStrokeGradient=w),m&&(T=c||!e.__canvasFillPattern?R5(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=T),y&&(M=c||!e.__canvasStrokePattern?R5(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=T),v?t.fillStyle=b:m&&(T?t.fillStyle=T:o=!1),g?t.strokeStyle=w:y&&(M?t.strokeStyle=M:a=!1)}var P=e.getGlobalScale();h.setScale(P[0],P[1],e.segmentIgnoreThreshold);var O,V;t.setLineDash&&r.lineDash&&(i=lw(e),O=i[0],V=i[1]);var $=!0;(u||c&gc)&&(h.setDPR(t.dpr),l?h.setContext(null):(h.setContext(t),$=!1),h.reset(),e.buildPath(h,e.shape,n),h.toStatic(),e.pathUpdated()),$&&h.rebuildPath(t,l?s:1),O&&(t.setLineDash(O),t.lineDashOffset=V),n||(r.strokeFirst?(a&&vA(t,r),o&&pA(t,r)):(o&&pA(t,r),a&&vA(t,r))),O&&t.setLineDash([])}function Fle(t,e,r){var n=e.__image=BS(r.image,e.__image,e,e.onload);if(!(!n||!qy(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,h=r.sy||0;t.drawImage(n,u,h,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,h=r.sy,c=o-u,f=s-h;t.drawImage(n,u,h,c,f,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function Ole(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||al,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=lw(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(q1(r)&&t.strokeText(i,r.x,r.y),W1(r)&&t.fillText(i,r.x,r.y)):(W1(r)&&t.fillText(i,r.x,r.y),q1(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var gA=["shadowBlur","shadowOffsetX","shadowOffsetY"],mA=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dR(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){ni(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Fu.opacity:o}(n||e.blend!==r.blend)&&(a||(ni(t,i),a=!0),t.globalCompositeOperation=e.blend||Fu.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[xn]){if(this._disposed){this.id;return}var a,o,s;if(nt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[xn]=!0,!this._model||n){var l=new Qoe(this._api),u=this._theme,h=this._model=new IP;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},O5);var c={seriesTransition:s,optionChanged:!0};if(i)this[Jn]={silent:a,updateParams:c},this[xn]=!1,this.getZr().wakeUp();else{try{ac(this),Ts.update.call(this,null,c)}catch(f){throw this[Jn]=null,this[xn]=!1,f}this._ssr||this._zr.flush(),this[Jn]=null,this[xn]=!1,g0.call(this,a),m0.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||zt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(zt.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return W(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;W(n,function(l){i.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(a.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return W(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(IA[i]){var l=s,u=s,h=-s,c=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();W(dd,function(w,T){if(w.group===i){var M=n?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(ot(r)),D=w.getDom().getBoundingClientRect();l=a(D.left,l),u=a(D.top,u),h=o(D.right,h),c=o(D.bottom,c),f.push({dom:M,left:D.left,top:D.top})}}),l*=d,u*=d,h*=d,c*=d;var v=h-l,g=c-u,m=ol.createCanvas(),y=R7(m,{renderer:n?"svg":"canvas"});if(y.resize({width:v,height:g}),n){var b="";return W(f,function(w){var T=w.left-l,M=w.top-u;b+=''+w.dom+""}),y.painter.getSvgRoot().innerHTML=b,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Rt({shape:{x:0,y:0,width:v,height:g},style:{fill:r.connectedBackgroundColor}})),W(f,function(w){var T=new dn({style:{x:w.left*d-l,y:w.top*d-u,image:w.dom}});y.add(T)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return zx(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return zx(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=od(i,r);return W(o,function(s,l){l.indexOf("Models")>=0&&W(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)a=a||!!h.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=od(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?sw(s,l,n):Sp(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;W(uue,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Du(s,function(v){var g=dt(v);if(g&&g.dataIndex!=null){var m=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=m&&m.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=xe({},g.eventData),!0},!0),l){var h=l.componentType,c=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=l.seriesIndex);var f=h&&c!=null&&o.getComponent(h,c),d=f&&r[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:d},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),W(fd,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),W(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),mle(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&aB(this.getDom(),cw,"");var n=this,i=n._api,a=n._model;W(n._componentsViews,function(o){o.dispose(a,i)}),W(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete dd[n.id]},e.prototype.resize=function(r){if(!this[xn]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Jn]&&(a==null&&(a=this[Jn].silent),i=!0,this[Jn]=null),this[xn]=!0;try{i&&ac(this),Ts.update.call(this,{type:"resize",animation:xe({duration:0},r&&r.animation)})}catch(o){throw this[xn]=!1,o}this[xn]=!1,g0.call(this,a),m0.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(nt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!N5[r]){var i=N5[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=xe({},r);return n.type=fd[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(nt(n)||(n={silent:!!n}),!!U1[r.type]&&this._model){if(this[xn]){this._pendingActions.push(r);return}var i=n.silent;$x.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&zt.browser.weChat&&this._throttledZrFlush(),g0.call(this,i),m0.call(this,i)}},e.prototype.updateLabelLayout=function(){ha.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ac=function(c){var f=c._scheduler;f.restorePipelines(c._model),f.prepareStageTasks(),Nx(c,!0),Nx(c,!1),f.plan()},Nx=function(c,f){for(var d=c._model,v=c._scheduler,g=f?c._componentsViews:c._chartsViews,m=f?c._componentsMap:c._chartsMap,y=c._zr,b=c._api,w=0;wf.get("hoverLayerThreshold")&&!zt.node&&!zt.worker&&f.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=c._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(b){b.states.emphasis&&(b.states.emphasis.hoverLayer=!0)})}})}function o(c,f){var d=c.get("blendMode")||null;f.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function s(c,f){if(!c.preventAutoZ){var d=c.get("z")||0,v=c.get("zlevel")||0;f.eachRendered(function(g){return l(g,d,v,-1/0),!0})}}function l(c,f,d,v){var g=c.getTextContent(),m=c.getTextGuideLine(),y=c.isGroup;if(y)for(var b=c.childrenRef(),w=0;w0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Lc(y))return;if(y instanceof Tt&&Sae(y),y.__dirty){var b=y.prevStates;b&&y.useStates(b)}if(v){y.stateTransition=m;var w=y.getTextContent(),T=y.getTextGuideLine();w&&(w.stateTransition=m),T&&(T.stateTransition=m)}y.__dirty&&i(y)}})}LA=function(c){return new(function(f){pe(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var g=v.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);v=v.parent}},d.prototype.enterEmphasis=function(v,g){Ko(v,g),Ei(c)},d.prototype.leaveEmphasis=function(v,g){Jo(v,g),Ei(c)},d.prototype.enterBlur=function(v){kB(v),Ei(c)},d.prototype.leaveBlur=function(v){OS(v),Ei(c)},d.prototype.enterSelect=function(v){DB(v),Ei(c)},d.prototype.leaveSelect=function(v){MB(v),Ei(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(v){return c.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return c.getViewOfSeriesModel(v)},d}(BP))(c)},DR=function(c){function f(d,v){for(var g=0;g=0)){BA.push(r);var a=uR.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function PR(t,e){N5[t]=e}function mue(t,e,r){var n=Xle("registerMap");n&&n(t,e,r)}var yue=kse;ih(uw,Jse);ih(h2,Qse);ih(h2,ele);ih(uw,vle);ih(h2,gle);ih(SR,Wle);IR(RP);BR(Kle,sse);PR("default",tle);mo({type:Ou,event:Ou,update:Ou},Ir);mo({type:Om,event:Om,update:Om},Ir);mo({type:sd,event:sd,update:sd},Ir);mo({type:Nm,event:Nm,update:Nm},Ir);mo({type:ld,event:ld,update:ld},Ir);ER("light",fle);ER("dark",dle);var PA=[],_ue={registerPreprocessor:IR,registerProcessor:BR,registerPostInit:due,registerPostUpdate:pue,registerUpdateLifecycle:fw,registerAction:mo,registerCoordinateSystem:vue,registerLayout:gue,registerVisual:ih,registerTransform:yue,registerLoading:PR,registerMap:mue,registerImpl:Yle,PRIORITY:oue,ComponentModel:Nt,ComponentView:wr,SeriesModel:pr,ChartView:hr,registerComponentModel:function(t){Nt.registerClass(t)},registerComponentView:function(t){wr.registerClass(t)},registerSeriesModel:function(t){pr.registerClass(t)},registerChartView:function(t){hr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Nt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Gne(t,e)}};function At(t){if(Se(t)){W(t,function(e){At(e)});return}Ct(PA,t)>=0||(PA.push(t),Je(t)&&(t={install:t}),t.install(_ue))}function y0(t){return t==null?0:t.length||1}function RA(t){return t}var xue=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||RA,this._newKeyGetter=i||RA,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var h=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(h,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(h,u),i[l]=null;else if(c===1&&f>1)this._updateOneToMany&&this._updateOneToMany(h,u),i[l]=null;else if(c===1&&f===1)this._update&&this._update(h,u),i[l]=null;else if(c>1&&f>1)this._updateManyToMany&&this._updateManyToMany(h,u),i[l]=null;else if(c>1)for(var d=0;d1)for(var s=0;s30}var _0=nt,ks=Ce,kue=typeof Int32Array>"u"?Array:Int32Array,Due="e\0\0",FA=-1,Mue=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Lue=["_approximateExtent"],OA,Ig,x0,b0,qx,Bg,Wx,Eue=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;FR(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},h=0;h=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Ji;if(l&&!i.pure)for(var u=[],h=e;h0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),Se(a)?a=a.slice():_0(a)&&(a=xe({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,_0(r)?xe(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){_0(e)?xe(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?xe(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;g5(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){W(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:ks(this.dimensions,this._getDimInfo,this),this.hostModel)),qx(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];Je(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(xS(arguments)))})},t.internalField=function(){OA=function(e){var r=e._invertedIndicesMap;W(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new kue(o.categories.length);for(var l=0;l1&&(l+="__ec__"+h),i[r]=l}}}(),t}();const Hn=Eue;function wp(t,e){ew(t)||(t=tw(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ye(),a=[],o=Bue(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&zR(o),l=n===t.dimensionsDefine,u=l?NR(t):OR(n),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,o));for(var c=Ye(h),f=new UP(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function Bue(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return W(e,function(a){var o;nt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Pue(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Rue=function(){function t(e){this.coordSysDims=[],this.axisMap=Ye(),this.categoryAxisMap=Ye(),this.coordSysName=e}return t}();function Fue(t){var e=t.get("coordinateSystem"),r=new Rue(e),n=Oue[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var Oue={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Rr).models[0],a=t.getReferringComponents("yAxis",Rr).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),oc(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),oc(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Rr).models[0];e.coordSysDims=["single"],r.set("single",i),oc(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Rr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),oc(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),oc(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();W(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];r.set(h,u),oc(u)&&(n.set(h,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function oc(t){return t.get("type")==="category"}function Nue(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;zue(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,h,c,f;if(W(a,function(b,w){ze(b)&&(a[w]=b={name:b}),l&&!b.isExtraCoord&&(!n&&!u&&b.ordinalMeta&&(u=b),!h&&b.type!=="ordinal"&&b.type!=="time"&&(!i||i===b.coordDim)&&(h=b))}),h&&!n&&!u&&(n=!0),h){c="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var d=h.coordDim,v=h.type,g=0;W(a,function(b){b.coordDim===d&&g++});var m={name:c,coordDim:d,coordDimIndex:g,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:g+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(f,v),y.storeDimIndex=s.ensureCalculationDimension(c,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:c}}function zue(t){return!FR(t.schema)}function hl(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function VR(t,e){return hl(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Vue(t,e){var r=t.get("coordinateSystem"),n=bp.get(r),i;return e&&e.coordSysDims&&(i=Ce(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=X1(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function $ue(t,e,r){var n,i;return r&&W(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function ns(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=tw(t)):(i=n.getSource(),a=i.sourceFormat===Ji);var o=Fue(e),s=Vue(e,o),l=r.useEncodeDefaulter,u=Je(l)?l:l?pt(kP,s,e):null,h={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=wp(i,h),f=$ue(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),v=Nue(e,{schema:c,store:d}),g=new Hn(c,e);g.setCalculationInfo(v);var m=f!=null&&Gue(i)?function(y,b,w,T){return T===f?w:this.defaultDimValueGetter(y,b,w,T)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function Gue(t){if(t.sourceFormat===Ji){var e=Hue(t.data||[]);return!Se(ef(e))}}function Hue(t){for(var e=0;er[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();Hy($R);const is=$R;var que=0,Wue=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++que}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&Ce(n,Uue);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!ze(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ye(this.categories))},t}();function Uue(t){return nt(t)&&t.value!=null?t.value:t+""}const z5=Wue;function V5(t){return t.type==="interval"||t.type==="log"}function Yue(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=KI(a/e,!0);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=GR(o),l=i.niceTickExtent=[Tr(Math.ceil(t[0]/o)*o,s),Tr(Math.floor(t[1]/o)*o,s)];return Xue(l,t),i}function Ux(t){var e=Math.pow(10,MS(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,Tr(r*e)}function GR(t){return Ka(t)+2}function NA(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function Xue(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),NA(t,0,e),NA(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function c2(t,e){return t>=e[0]&&t<=e[1]}function f2(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function d2(t,e){return t*(e[1]-e[0])+e[0]}var HR=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new z5({})),Se(i)&&(i=new z5({categories:Ce(i,function(a){return nt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:ze(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),c2(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),f2(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(d2(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(is);is.registerClass(HR);const pw=HR;var nu=Tr,qR=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return c2(r,this._extent)},e.prototype.normalize=function(r){return f2(r,this._extent)},e.prototype.scale=function(r){return d2(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=GR(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var h=s.length?s[s.length-1].value:a[1];return i[1]>h&&(r?s.push({value:nu(h+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function YR(t){var e=Kue(t),r=[];return W(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],h=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),f=Math.abs(c[1]-c[0]);s=u?h/f*u:h}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=Be(n.get("barWidth"),s),g=Be(n.get("barMaxWidth"),s),m=Be(n.get("barMinWidth")||(JR(n)?.5:1),s),y=n.get("barGap"),b=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:b,axisKey:gw(a),stackId:vw(n)})}),XR(r)}function XR(t){var e={};W(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=n.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return W(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Lt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Be(s,o),h=Be(n.gap,1),c=n.remainedWidth,f=n.autoWidthCount,d=(c-u)/(f+(f-1)*h);d=Math.max(d,0),W(a,function(y){var b=y.maxWidth,w=y.minWidth;if(y.width){var T=y.width;b&&(T=Math.min(T,b)),w&&(T=Math.max(T,w)),y.width=T,c-=T+h*T,f--}else{var T=d;b&&bT&&(T=w),T!==d&&(y.width=T,c-=T+h*T,f--)}}),d=(c-u)/(f+(f-1)*h),d=Math.max(d,0);var v=0,g;W(a,function(y,b){y.width||(y.width=d),g=y,v+=y.width*(1+h)}),g&&(v-=g.width*h);var m=-v/2;W(a,function(y,b){r[i][b]=r[i][b]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+h)})}),r}function Jue(t,e,r){if(t&&e){var n=t[gw(e)];return n!=null&&r!=null?n[vw(r)]:n}}function ZR(t,e){var r=UR(t,e),n=YR(r);W(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=vw(i),u=n[gw(s)][l],h=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:h,size:c})})}function jR(t){return{seriesType:t,plan:cf(),reset:function(e){if(KR(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),h=r.getCalculationInfo("stackResultDimension"),c=hl(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Que(i,a),v=JR(e),g=e.get("barMinHeight")||0,m=h&&r.getDimensionIndex(h),y=r.getLayout("size"),b=r.getLayout("offset");return{progress:function(w,T){for(var M=w.count,D=v&&Qa(M*3),P=v&&l&&Qa(M*3),O=v&&Qa(M),V=n.master.getRect(),$=f?V.width:V.height,H,j=T.getStore(),q=0;(H=w.next())!=null;){var G=j.get(c?m:o,H),J=j.get(s,H),K=d,se=void 0;c&&(se=+G-j.get(o,H));var ae=void 0,ce=void 0,ye=void 0,de=void 0;if(f){var De=n.dataToPoint([G,J]);if(c){var Ie=n.dataToPoint([se,J]);K=Ie[0]}ae=K,ce=De[1]+b,ye=De[0]-K,de=y,Math.abs(ye)>>1;t[i][1]i&&(this._approxInterval=i);var s=Pg.length,l=Math.min(ehe(Pg,this._approxInterval,0,s),s-1);this._interval=Pg[l][1],this._minLevelUnit=Pg[Math.max(l-1,0)][0]},e.prototype.parse=function(r){return $t(r)?r:+ho(r)},e.prototype.contain=function(r){return c2(this.parse(r),this._extent)},e.prototype.normalize=function(r){return f2(this.parse(r),this._extent)},e.prototype.scale=function(r){return d2(r,this._extent)},e.type="time",e}(cl),Pg=[["second",YS],["minute",XS],["hour",hd],["quarter-day",hd*6],["half-day",hd*12],["day",qi*1.2],["half-week",qi*3.5],["week",qi*7],["month",qi*31],["quarter",qi*95],["half-year",k8/2],["year",k8]];function the(t,e,r,n){var i=ho(e),a=ho(r),o=function(v){return M8(i,v,n)===M8(a,v,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},h=function(){return u()&&o("hour")},c=function(){return h()&&o("minute")},f=function(){return c()&&o("second")},d=function(){return f()&&o("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return f();case"millisecond":return d()}}function rhe(t,e){return t/=qi,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function nhe(t){var e=30*qi;return t/=e,t>6?6:t>3?3:t>2?2:1}function ihe(t){return t/=hd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function zA(t,e){return t/=e?XS:YS,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function ahe(t){return KI(t,!0)}function ohe(t,e,r){var n=new Date(t);switch(Ec(e)){case"year":case"month":n[fP(r)](0);case"day":n[dP(r)](1);case"hour":n[pP(r)](0);case"minute":n[vP(r)](0);case"second":n[gP(r)](0),n[mP(r)](0)}return n.getTime()}function she(t,e,r,n){var i=1e4,a=hP,o=0;function s($,H,j,q,G,J,K){for(var se=new Date(H),ae=H,ce=se[q]();ae1&&J===0&&j.unshift({value:j[0].value-ae})}}for(var J=0;J=n[0]&&b<=n[1]&&c++)}var w=(n[1]-n[0])/e;if(c>w*1.5&&f>w/1.5||(u.push(m),c>w||t===a[d]))break}h=[]}}}for(var T=Jt(Ce(u,function($){return Jt($,function(H){return H.value>=n[0]&&H.value<=n[1]&&!H.notAdd})}),function($){return $.length>0}),M=[],D=T.length-1,d=0;d0;)a*=10;var s=[Tr(hhe(n[0]/a)*a),Tr(uhe(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){pd.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=sa(r)/sa(this.base),c2(r,this._extent)},e.prototype.normalize=function(r){return r=sa(r)/sa(this.base),f2(r,this._extent)},e.prototype.scale=function(r){return r=d2(r,this._extent),Rg(this.base,r)},e.type="log",e}(is),tF=mw.prototype;tF.getMinorTicks=pd.getMinorTicks;tF.getLabel=pd.getLabel;function Fg(t,e){return lhe(t,Ka(e))}is.registerClass(mw);const che=mw;var fhe=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){this[phe[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=dhe[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),dhe={min:"_determinedMin",max:"_determinedMax"},phe={min:"_dataMin",max:"_dataMax"};function rF(t,e,r){var n=t.rawExtentInfo;return n||(n=new fhe(t,e,r),t.rawExtentInfo=n,n)}function Og(t,e){return e==null?null:Bd(e)?NaN:t.parse(e)}function nF(t,e){var r=t.type,n=rF(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=UR("bar",o),l=!1;if(W(s,function(c){l=l||c.getBaseAxis()===e.axis}),l){var u=YR(s),h=vhe(i,a,e,u);i=h.min,a=h.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function vhe(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=Jue(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;W(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;W(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/a,f=h/c-h;return e+=f*(l/u),t-=f*(s/u),{min:t,max:e}}function Wc(t,e){var r=e,n=nF(t,r),i=n.extent,a=r.get("splitNumber");t instanceof che&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function p2(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new pw({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new eF({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(is.getClass(e)||cl)}}function ghe(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Cp(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):ze(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):Je(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(yw(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function yw(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function mhe(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof pw?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Cp(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var h=0;ht[1]&&(t[1]=i[1])})}var Ap=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),xhe=1e-8;function $A(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return She(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return W(o,function(s){s.type==="polygon"?GA(s.exterior,i,a,r):W(s.points,function(l){GA(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new St(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function Ahe(t,e){return t=Che(t),Ce(Jt(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new HA(o[0],o.slice(1)));break;case"MultiPolygon":W(i.coordinates,function(l){l[0]&&a.push(new HA(l[0],l.slice(1)))});break;case"LineString":a.push(new qA([i.coordinates]));break;case"MultiLineString":a.push(new qA(i.coordinates))}var s=new oF(n[e||"name"],a,n.cp);return s.properties=n,s})}var Zd=Ft();function The(t){return t.type==="category"?Dhe(t):Lhe(t)}function khe(t,e){return t.type==="category"?Mhe(t,e):{ticks:Ce(t.scale.getTicks(),function(r){return r.value})}}function Dhe(t){var e=t.getLabelModel(),r=lF(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function lF(t,e){var r=uF(t,"labels"),n=_w(e),i=hF(r,n);if(i)return i;var a,o;return Je(n)?a=dF(t,n):(o=n==="auto"?Ehe(t):n,a=fF(t,o)),cF(r,n,{labels:a,labelCategoryInterval:o})}function Mhe(t,e){var r=uF(t,"ticks"),n=_w(e),i=hF(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),Je(n))a=dF(t,n,!0);else if(n==="auto"){var s=lF(t,t.getLabelModel());o=s.labelCategoryInterval,a=Ce(s.labels,function(l){return l.tickValue})}else o=n,a=fF(t,o,!0);return cF(r,n,{ticks:a,tickCategoryInterval:o})}function Lhe(t){var e=t.scale.getTicks(),r=Cp(t);return{labels:Ce(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function uF(t,e){return Zd(t)[e]||(Zd(t)[e]=[])}function hF(t,e){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),f=0,d=0;l<=a[1];l+=s){var v=0,g=0,m=pp(r({value:l}),e.font,"center","top");v=m.width*1.3,g=m.height*1.3,f=Math.max(f,v,7),d=Math.max(d,g,7)}var y=f/h,b=d/c;isNaN(y)&&(y=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(y,b))),T=Zd(t.model),M=t.getExtent(),D=T.lastAutoInterval,P=T.lastTickCount;return D!=null&&P!=null&&Math.abs(D-w)<=1&&Math.abs(P-o)<=1&&D>w&&T.axisExtent0===M[0]&&T.axisExtent1===M[1]?w=D:(T.lastTickCount=o,T.lastAutoInterval=w,T.axisExtent0=M[0],T.axisExtent1=M[1]),w}function Bhe(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function fF(t,e,r){var n=Cp(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=i.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=iF(t),f=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;f&&u!==a[0]&&g(a[0]);for(var v=u;v<=a[1];v+=l)g(v);d&&v-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m})}return s}function dF(t,e,r){var n=t.scale,i=Cp(t),a=[];return W(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var WA=[0,1],Phe=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return ZI(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),UA(n,i.count())),jt(e,WA,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),UA(n,i.count()));var a=jt(e,n,WA,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=khe(this,r),i=n.ticks,a=Ce(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Rhe(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=Ce(n,function(a){return Ce(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return The(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return Ihe(this)},t}();function UA(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Rhe(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;W(e,function(d){d.coord-=u/2});var h=t.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var c=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0]}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1]});function f(d,v){return d=Tr(d),v=Tr(v),c?d>v:di&&(i+=S0);var d=Math.atan2(s,o);if(d<0&&(d+=S0),d>=n&&d<=i||d+S0>=n&&d+S0<=i)return l[0]=h,l[1]=c,u-r;var v=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,b=(v-o)*(v-o)+(g-s)*(g-s),w=(m-o)*(m-o)+(y-s)*(y-s);return b0){e=e/180*Math.PI,va.fromArray(t[0]),sr.fromArray(t[1]),Er.fromArray(t[2]),_t.sub(eo,va,sr),_t.sub(ja,Er,sr);var r=eo.len(),n=ja.len();if(!(r<.001||n<.001)){eo.scale(1/r),ja.scale(1/n);var i=eo.dot(ja),a=Math.cos(e);if(a1&&_t.copy(Vn,Er),Vn.toArray(t[1])}}}}function $he(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,va.fromArray(t[0]),sr.fromArray(t[1]),Er.fromArray(t[2]),_t.sub(eo,sr,va),_t.sub(ja,Er,sr);var n=eo.len(),i=ja.len();if(!(n<.001||i<.001)){eo.scale(1/n),ja.scale(1/i);var a=eo.dot(e),o=Math.cos(r);if(a=l)_t.copy(Vn,Er);else{Vn.scaleAndAdd(ja,s/Math.tan(Math.PI/2-h));var c=Er.x!==sr.x?(Vn.x-sr.x)/(Er.x-sr.x):(Vn.y-sr.y)/(Er.y-sr.y);if(isNaN(c))return;c<0?_t.copy(Vn,sr):c>1&&_t.copy(Vn,Er)}Vn.toArray(t[1])}}}}function XA(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function Ghe(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=$s(n[0],n[1]),a=$s(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Lm([],n[1],n[0],o/i),l=Lm([],n[1],n[2],o/a),u=Lm([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var h=1;h0&&a&&M(-h/o,0,o);var g=t[0],m=t[o-1],y,b;w(),y<0&&D(-y,.8),b<0&&D(b,.8),w(),T(y,b,1),T(b,y,-1),w(),y<0&&P(-y),b<0&&P(b);function w(){y=g.rect[e]-n,b=i-m.rect[e]-m.rect[r]}function T(O,V,$){if(O<0){var H=Math.min(V,-O);if(H>0){M(H*$,0,o);var j=H+O;j<0&&D(-j*$,1)}else D(-O*$,1)}}function M(O,V,$){O!==0&&(u=!0);for(var H=V;H<$;H++){var j=t[H],q=j.rect;q[e]+=O,j.label[e]+=O}}function D(O,V){for(var $=[],H=0,j=1;j0)for(var j=0;j0;j--){var K=$[j-1]*J;M(-K,j,o)}}}function P(O){var V=O<0?-1:1;O=Math.abs(O);for(var $=Math.ceil(O/(o-1)),H=0;H0?M($,0,H+1):M(-$,o-H-1,o),O-=$,O<=0)return}return u}function Hhe(t,e,r,n){return mF(t,"x","width",e,r,n)}function yF(t,e,r,n){return mF(t,"y","height",e,r,n)}function _F(t){var e=[];t.sort(function(g,m){return m.priority-g.priority});var r=new St(0,0,0,0);function n(g){if(!g.ignore){var m=g.ensureState("emphasis");m.ignore==null&&(m.ignore=!1)}g.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),Ct(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Gt(n,u,r,l)}else if(n.attr(u),!af(n).valueAnimation){var c=xt(n.style.opacity,1);n.style.opacity=0,fr(n,{style:{opacity:c}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};Ng(d,u,zg),Ng(d,n.states.select,zg)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};Ng(v,u,zg),Ng(v,n.states.emphasis,zg)}aP(n,l,h,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Uhe(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Gt(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,fr(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}();const Xhe=Yhe;var jx=Ft();function Zhe(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=jx(r).labelManager;i||(i=jx(r).labelManager=new Xhe),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=jx(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var Kx=Math.sin,Jx=Math.cos,xF=Math.PI,au=Math.PI*2,jhe=180/xF,Khe=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,h=!l,c=Math.abs(u),f=Us(c-au)||(h?u>=au:-u>=au),d=u>0?u%au:u%au+au,v=!1;f?v=!0:Us(c)?v=!1:v=d>=xF==!!h;var g=e+n*Jx(o),m=r+i*Kx(o);this._start&&this._add("M",g,m);var y=Math.round(a*jhe);if(f){var b=1/this._p,w=(h?1:-1)*(au-b);this._add("A",n,i,y,1,+h,e+n*Jx(o+w),r+i*Kx(o+w)),b>.01&&this._add("A",n,i,y,0,+h,g,m)}else{var T=e+n*Jx(s),M=r+i*Kx(s);this._add("A",n,i,y,+v,+h,T,M)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var h=[],c=this._p,f=1;f"}function oce(t){return""}function Sw(t,e){e=e||{};var r=e.newline?` -`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return ace(o,s)+(o!=="style"?ei(l):l||"")+(a?""+r+Ce(a,function(u){return n(u)}).join(r)+r:"")+oce(o)}return n(t)}function sce(t,e,r){r=r||{};var n=r.newline?` -`:"",i=" {"+n,a=n+"}",o=Ce(Lt(t),function(l){return l+i+Ce(Lt(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=Ce(Lt(e),function(l){return"@keyframes "+l+i+Ce(Lt(e[l]),function(u){return u+i+Ce(Lt(e[l][u]),function(h){var c=e[l][u][h];return h==="d"&&(c='path("'+c+'")'),h+":"+c+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function H5(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function jA(t,e,r,n){return Ur("svg","root",{width:t,height:e,xmlns:SF,"xmlns:xlink":wF,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var KA={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},hu="transform-origin";function lce(t,e,r){var n=xe({},t.shape);xe(n,e),t.buildPath(r,n);var i=new bF;return i.reset(NI(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function uce(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[hu]=r+"px "+n+"px")}var hce={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function AF(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function cce(t,e,r){var n=t.shape.paths,i={},a,o;if(W(n,function(l){var u=H5(r.zrId);u.animation=!0,v2(l,{},u,!0);var h=u.cssAnims,c=u.cssNodes,f=Lt(h),d=f.length;if(d){o=f[d-1];var v=h[o];for(var g in v){var m=v[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in c){var b=c[y].animation;b.indexOf(o)>=0&&(a=b)}}}),!!a){e.d=!1;var s=AF(i,r);return a.replace(o,s)}}function JA(t){return ze(t)?KA[t]?"cubic-bezier("+KA[t]+")":AS(t)?t:"":""}function v2(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof GS){var s=cce(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var et=AF(P,r);return et+" "+b[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+r.cssClassIdx++;r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var jd=Math.round;function TF(t){return t&&ze(t.src)}function kF(t){return t&&Je(t.toDataURL)}function ww(t,e,r,n){rce(function(i,a){var o=i==="fill"||i==="stroke";o&&OI(a)?MF(e,t,i,n):o&&TS(a)?LF(r,t,i,n):t[i]=a},e,r,!1),yce(r,t,n)}function QA(t){return Us(t[0]-1)&&Us(t[1])&&Us(t[2])&&Us(t[3]-1)}function fce(t){return Us(t[4])&&Us(t[5])}function Cw(t,e,r){if(e&&!(fce(e)&&QA(e))){var n=r?10:1e4;t.transform=QA(e)?"translate("+jd(e[4]*n)/n+" "+jd(e[5]*n)/n+")":une(e)}}function eT(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Wn(f,m),Wn(d,m)}else if(f==null||d==null){var y=function($,H){if($){var j=$.elm,q=f||H.width,G=d||H.height;$.tag==="pattern"&&(u?(G=1,q/=a.width):h&&(q=1,G/=a.height)),$.attrs.width=q,$.attrs.height=G,j&&(j.setAttribute("width",q),j.setAttribute("height",G))}},b=BS(v,null,t,function($){l||y(D,$),y(c,$)});b&&b.width&&b.height&&(f=f||b.width,d=d||b.height)}c=Ur("image","img",{href:v,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(c=ot(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(c){var w,T;l?w=T=1:u?(T=1,w=o.width/a.width):h?(w=1,T=o.height/a.height):o.patternUnits="userSpaceOnUse",w!=null&&!isNaN(w)&&(o.width=w),T!=null&&!isNaN(T)&&(o.height=T);var M=zI(i);M&&(o.patternTransform=M);var D=Ur("pattern","",o,[c]),P=Sw(D),O=n.patternCache,V=O[P];V||(V=n.zrId+"-p"+n.patternIdx++,O[P]=V,o.id=V,D=n.defs[V]=Ur("pattern",V,o,[c])),e[r]=$y(V)}}function _ce(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=Ur("clipPath",a,o,[DF(t,r)])}e["clip-path"]=$y(a)}function nT(t){return document.createTextNode(t)}function _u(t,e,r){t.insertBefore(e,r)}function iT(t,e){t.removeChild(e)}function aT(t,e){t.appendChild(e)}function EF(t){return t.parentNode}function IF(t){return t.nextSibling}function Qx(t,e){t.textContent=e}var oT=58,xce=120,bce=Ur("","");function q5(t){return t===void 0}function Ya(t){return t!==void 0}function Sce(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function X0(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function Kd(t){var e,r=t.children,n=t.tag;if(Ya(n)){var i=t.elm=CF(n);if(Aw(bce,t),Se(r))for(e=0;ea?(v=r[l+1]==null?null:r[l+1].elm,BF(t,v,r,i,l)):J1(t,e,n,a))}function yc(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(Aw(t,e),q5(e.text)?Ya(n)&&Ya(i)?n!==i&&wce(r,n,i):Ya(i)?(Ya(t.text)&&Qx(r,""),BF(r,null,i,0,i.length-1)):Ya(n)?J1(r,n,0,n.length-1):Ya(t.text)&&Qx(r,""):t.text!==e.text&&(Ya(n)&&J1(r,n,0,n.length-1),Qx(r,e.text)))}function Cce(t,e){if(X0(t,e))yc(t,e);else{var r=t.elm,n=EF(r);Kd(e),n!==null&&(_u(n,e.elm,IF(r)),J1(n,[t],0,0))}return e}var Ace=0,Tce=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=sT(),this.configLayer=sT(),this.storage=r,this._opts=n=xe({},n),this.root=e,this._id="zr"+Ace++,this._oldVNode=jA(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=CF("svg");Aw(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Cce(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return rT(e,H5(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=H5(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress;var o=[],s=this._bgVNode=kce(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=Ur("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=Ce(Lt(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(Ur("defs","defs",{},u)),e.animation){var h=sce(a.cssNodes,a.cssAnims,{newline:!0});if(h){var c=Ur("style","stl",{},[],h);o.push(c)}}return jA(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},Sw(this.renderToVNode({animation:xt(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:xt(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,h=0;h=0&&!(f&&l&&f[g]===l[g]);g--);for(var m=v-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var c=this.__startIndex;c15)break}}G.prevElClipPaths&&y.restore()};if(b)if(b.length===0)O=m.__endIndex;else for(var $=d.dpr,H=0;H0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?Vg:0),this._needsManuallyCompositing),h.__builtin__||yS("ZLevel "+u+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,r(l),a=h),i.__dirty&_i&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(c,f){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,W(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?bt(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(pr);const Nce=Oce;function Uc(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=Hc(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var zce=function(t){pe(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=Fr(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=Vce,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Ko(this.childAt(0))},e.prototype.downplay=function(){Jo(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=o!==this._symbolType,h=a&&a.disableAnimation;if(u){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,c)}else{var f=this.childAt(0);f.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?f.attr(d):Gt(f,d,s,n),ba(f)}if(this._updateCommon(r,n,l,i,a),u){var f=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,fr(f,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,h,c,f,d,v,g,m,y;if(a&&(u=a.emphasisItemStyle,h=a.blurItemStyle,c=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var b=a&&a.itemModel?a.itemModel:r.getItemModel(n),w=b.getModel("emphasis");u=w.getModel("itemStyle").getItemStyle(),c=b.getModel(["select","itemStyle"]).getItemStyle(),h=b.getModel(["blur","itemStyle"]).getItemStyle(),f=w.get("focus"),d=w.get("blurScope"),v=w.get("disabled"),g=Yr(b),m=w.getShallow("scale"),y=b.getShallow("cursor")}var T=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(T||0)*Math.PI/180||0);var M=nh(r.getItemVisual(n,"symbolOffset"),i);M&&(s.x=M[0],s.y=M[1]),y&&s.attr("cursor",y);var D=r.getItemVisual(n,"style"),P=D.fill;if(s instanceof dn){var O=s.style;s.useStyle(xe({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},D))}else s.__isEmptyBrush?s.useStyle(xe({},D)):s.useStyle(D),s.style.decal=null,s.setColor(P,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var V=r.getItemVisual(n,"liftZ"),$=this._z2;V!=null?$==null&&(this._z2=s.z2,s.z2+=V):$!=null&&(s.z2=$,this._z2=null);var H=o&&o.useNameLabel;fn(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:j,inheritColor:P,defaultOpacity:D.opacity});function j(J){return H?r.getName(J):Uc(r,J)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var q=s.ensureState("emphasis");q.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=h;var G=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;q.scaleX=this._sizeX*G,q.scaleY=this._sizeY*G,this.setSymbolScale(1),Sr(this,f,d,v)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=dt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ll(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ll(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return df(r.getItemVisual(n,"symbolSize"))},e}(st);function Vce(t,e){this.parent.drift(t,e)}const Tp=zce;function tb(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function hT(t){return t!=null&&!nt(t)&&(t={isIgnore:t}),t||{}}function cT(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Yr(e),cursorStyle:e.get("cursor")}}var $ce=function(){function t(e){this.group=new st,this._SymbolCtor=e||Tp}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=hT(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=cT(e),u={disableAnimation:s},h=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var f=h(c);if(tb(e,f,c,r)){var d=new o(e,c,l,u);d.setPosition(f),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,f){var d=a.getItemGraphicEl(f),v=h(c);if(!tb(e,v,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(e,c,l,u),d.setPosition(v);else{d.updateData(e,c,l,u);var y={x:v[0],y:v[1]};s?d.attr(y):Gt(d,y,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=h,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=cT(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=hT(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function FF(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function Hce(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function qce(t,e,r,n,i,a,o,s){for(var l=Hce(t,e),u=[],h=[],c=[],f=[],d=[],v=[],g=[],m=RF(i,e,o),y=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w=i||g<0)break;if($u(y,b)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,b),c=y,f=b;else{var w=y-u,T=b-h;if(w*w+T*T<.5){g+=a;continue}if(o>0){for(var M=g+a,D=e[M*2],P=e[M*2+1];D===y&&P===b&&m=n||$u(D,P))d=y,v=b;else{$=D-u,H=P-h;var G=y-u,J=D-y,K=b-h,se=P-b,ae=void 0,ce=void 0;if(s==="x"){ae=Math.abs(G),ce=Math.abs(J);var ye=$>0?1:-1;d=y-ye*ae*o,v=b,j=y+ye*ce*o,q=b}else if(s==="y"){ae=Math.abs(K),ce=Math.abs(se);var de=H>0?1:-1;d=y,v=b-de*ae*o,j=y,q=b+de*ce*o}else ae=Math.sqrt(G*G+K*K),ce=Math.sqrt(J*J+se*se),V=ce/(ce+ae),d=y-$*o*(1-V),v=b-H*o*(1-V),j=y+$*o*V,q=b+H*o*V,j=Ds(j,Ms(D,y)),q=Ds(q,Ms(P,b)),j=Ms(j,Ds(D,y)),q=Ms(q,Ds(P,b)),$=j-y,H=q-b,d=y-$*ae/ce,v=b-H*ae/ce,d=Ds(d,Ms(u,y)),v=Ds(v,Ms(h,b)),d=Ms(d,Ds(u,y)),v=Ms(v,Ds(h,b)),$=y-d,H=b-v,j=y+$*ce/ae,q=b+H*ce/ae}t.bezierCurveTo(c,f,d,v,y,b),c=j,f=q}else t.lineTo(y,b)}u=y,h=b,g+=a}return m}var OF=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),Wce=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new OF},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&$u(i[o*2-2],i[o*2-1]);o--);for(;a=0){var T=u?(v-l)*w+l:(d-s)*w+s;return u?[r,T]:[T,r]}s=d,l=v;break;case o.C:d=a[c++],v=a[c++],g=a[c++],m=a[c++],y=a[c++],b=a[c++];var M=u?T1(s,d,g,y,r,h):T1(l,v,m,b,r,h);if(M>0)for(var D=0;D=0){var T=u?Wr(l,v,m,b,P):Wr(s,d,g,y,P);return u?[r,T]:[T,r]}}s=y,l=b;break}}},e}(Tt),Uce=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(OF),NF=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new Uce},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&$u(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Zce(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=Ce(a.stops,function(w){return{coord:l.toGlobalCoord(l.dataToCoord(w.value)),color:w.color}}),h=u.length,c=a.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var f=Xce(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var v=10,g=f[0].coord-v,m=f[d-1].coord+v,y=m-g;if(y<.001)return"transparent";W(f,function(w){w.offset=(w.coord-g)/y}),f.push({offset:d?f[d-1].offset:.5,color:c[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:c[0]||"transparent"});var b=new mp(0,0,0,0,f,!0);return b[i]=g,b[i+"2"]=m,b}}}function jce(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Kce(a,e))){var o=e.mapDimension(a.dim),s={};return W(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Kce(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function Jce(t,e){return isNaN(t)||isNaN(e)}function Qce(t){for(var e=t.length/2;e>0&&Jce(t[e*2-2],t[e*2-1]);e--);return e-1}function gT(t,e){return[t[e*2],t[e*2+1]]}function efe(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function $F(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var ye=g.getState("emphasis").style;ye.lineWidth=+g.style.lineWidth+1}dt(g).seriesIndex=r.seriesIndex,Sr(g,se,ae,ce);var de=vT(r.get("smooth")),De=r.get("smoothMonotone");if(g.setShape({smooth:de,smoothMonotone:De,connectNulls:O}),m){var Ie=l.getCalculationInfo("stackedOnSeries"),Pe=0;m.useStyle(rt(h.getAreaStyle(),{fill:q,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Ie&&(Pe=vT(Ie.get("smooth"))),m.setShape({smooth:de,stackedOnSmooth:Pe,smoothMonotone:De,connectNulls:O}),cn(m,r,"areaStyle"),dt(m).seriesIndex=r.seriesIndex,Sr(m,se,ae,ce)}var Qe=function(Ke){a._changePolyState(Ke)};l.eachItemGraphicEl(function(Ke){Ke&&(Ke.onHoverStateChange=Qe)}),this._polyline.onHoverStateChange=Qe,this._data=l,this._coordSys=o,this._stackedOnPoints=D,this._points=c,this._step=H,this._valueOrigin=T,r.get("triggerLineEvent")&&(this.packEventData(r,g),m&&this.packEventData(r,m))},e.prototype.packEventData=function(r,n){dt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=Xu(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],c=l[s*2+1];if(isNaN(h)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,c))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new Tp(o,s),u.x=h,u.y=c,u.setZ(f,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=f,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else hr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=Xu(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else hr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;P1(this._polyline,r),n&&P1(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new Wce({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new NF({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,h=u.get("animationDuration");Je(h)&&(h=h(null));var c=u.get("animationDelay")||0,f=Je(c)?c(null):c;r.eachItemGraphicEl(function(d,v){var g=d;if(g){var m=[d.x,d.y],y=void 0,b=void 0,w=void 0;if(i)if(o){var T=i,M=n.pointToCoord(m);a?(y=T.startAngle,b=T.endAngle,w=-M[1]/180*Math.PI):(y=T.r0,b=T.r,w=M[0])}else{var D=i;a?(y=D.x,b=D.x+D.width,w=d.x):(y=D.y+D.height,b=D.y,w=d.y)}var P=b===y?0:(w-y)/(b-y);l&&(P=1-P);var O=Je(c)?c(v):h*P+f,V=g.getSymbolPath(),$=V.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:O}),$&&$.animateFrom({style:{opacity:0}},{duration:300,delay:O}),V.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if($F(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Vt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=Qce(l);h>=0&&(fn(s,Yr(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:h,defaultText:function(c,f,d){return d!=null?PF(o,d):Uc(o,c)},enableTextSetter:!0},tfe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,h=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),v=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),b=m.inverse,w=n.shape,T=b?y?w.x:w.y+w.height:y?w.x+w.width:w.y,M=(y?g:0)*(b?-1:1),D=(y?0:-g)*(b?-1:1),P=y?"x":"y",O=efe(c,T,P),V=O.range,$=V[1]-V[0],H=void 0;if($>=1){if($>1&&!d){var j=gT(c,V[0]);u.attr({x:j[0]+M,y:j[1]+D}),o&&(H=f.getRawValue(V[0]))}else{var j=h.getPointOn(T,P);j&&u.attr({x:j[0]+M,y:j[1]+D});var q=f.getRawValue(V[0]),G=f.getRawValue(V[1]);o&&(H=oB(i,v,q,G,O.t))}a.lastFrameIndex=V[0]}else{var J=r===1||a.lastFrameIndex>0?V[0]:0,j=gT(c,J);o&&(H=f.getRawValue(J)),u.attr({x:j[0]+M,y:j[1]+D})}if(o){var K=af(u);typeof K.setLabelText=="function"&&K.setLabelText(H)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,h=this._polygon,c=r.hostModel,f=qce(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,v=f.stackedOnCurrent,g=f.next,m=f.stackedOnNext;if(o&&(d=Ls(f.current,i,o,l),v=Ls(f.stackedOnCurrent,i,o,l),g=Ls(f.next,i,o,l),m=Ls(f.stackedOnNext,i,o,l)),pT(d,g)>3e3||h&&pT(v,m)>3e3){u.stopAnimation(),u.setShape({points:g}),h&&(h.stopAnimation(),h.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=f.current,u.shape.points=d;var y={shape:{points:g}};f.current!==d&&(y.shape.__points=f.next),u.stopAnimation(),Gt(u,y,c),h&&(h.setShape({points:d,stackedOnPoints:v}),h.stopAnimation(),Gt(h,{shape:{stackedOnPoints:m}},c),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var b=[],w=f.status,T=0;Te&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),c=n.getDevicePixelRatio(),f=Math.abs(h[1]-h[0])*(c||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d));var v=void 0;ze(a)?v=ife[a]:Je(a)&&(v=a),v&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,v,afe))}}}}}function ofe(t){t.registerChartView(nfe),t.registerSeriesModel(Nce),t.registerLayout(Dp("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,GF("line"))}var HF=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ns(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)W(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var v=f.getTicksCoords(),g=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&(g+=1),v.length<2)return;if(v.length===2){s[d]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,w=1,T=0;Tg){b=(M+y)/2;break}T===1&&(w=D-v[0].tickValue)}b==null&&(y?y&&(b=v[v.length-1].coord):b=v[0].coord),s[d]=f.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+h/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(pr);pr.registerClass(HF);const Q1=HF;var sfe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return ns(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=gl(Q1.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Q1);const lfe=sfe;var ufe=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),hfe=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new ufe},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,h=n.startAngle,c=n.endAngle,f=n.clockwise,d=Math.PI*2,v=f?c-hMath.PI/2&&hs)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){$d(a,r,dt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(hr),mT={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=nb(e.x,t.x),s=ib(e.x+e.width,i),l=nb(e.y,t.y),u=ib(e.y+e.height,a),h=si?s:o,e.y=c&&l>a?u:l,e.width=h?0:s-o,e.height=c?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=ib(e.r,t.r),a=nb(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},yT={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new Rt({shape:xe({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var h=u.shape,c=i?"height":"width";h[c]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?ey:li,h=new u({shape:n,z2:1});h.name="item";var c=qF(i);if(h.calculateTextPosition=cfe(c,{isRoundCap:u===ey}),a){var f=h.shape,d=i?"r":"endAngle",v={};f[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?Gt:fr)(h,{shape:v},a)}return h}};function vfe(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function _T(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Gt:fr)(r,{shape:l},e,i,null);var h=e?t.baseAxis.model:null;(o?Gt:fr)(r,{shape:u},h,i)}function xT(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function yfe(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function qF(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function ST(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var h=t.shape,c=Eu(n.getModel("itemStyle"),h,!0);xe(h,c),t.setShape(h)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var f=n.getShallow("cursor");f&&t.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=Yr(n);fn(t,v,{labelFetcher:a,labelDataIndex:r,defaultText:Uc(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,ffe(t,m==="outside"?d:m,qF(o),n.get(["label","rotate"]))}iP(g,v,a.getRawValue(r),function(b){return PF(e,b)});var y=n.getModel(["emphasis"]);Sr(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),cn(t,n),yfe(i)&&(t.style.fill="none",t.style.stroke="none",W(t.states,function(b){b.style&&(b.style.fill=b.style.stroke="none")}))}function _fe(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var xfe=function(){function t(){}return t}(),wT=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new xfe},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h=0?r:null},30,!1);function bfe(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,h=0,c=a.length/3;h=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[h]}return-1}function WF(t,e,r){if(ah(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function Sfe(t,e,r){var n=t.type==="polar"?li:Rt;return new n({shape:WF(e,r,t),silent:!0,z2:0})}const wfe=pfe;function Cfe(t){t.registerChartView(wfe),t.registerSeriesModel(lfe),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,pt(ZR,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,jR("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,GF("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var qg=Math.PI*2,TT=Math.PI/180;function UF(t,e){return Vr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function YF(t,e){var r=UF(t,e),n=t.get("center"),i=t.get("radius");Se(i)||(i=[0,i]);var a=Be(r.width,e.getWidth()),o=Be(r.height,e.getHeight()),s=Math.min(a,o),l=Be(i[0],s/2),u=Be(i[1],s/2),h,c,f=t.coordinateSystem;if(f){var d=f.dataToPoint(n);h=d[0]||0,c=d[1]||0}else Se(n)||(n=[n,n]),h=Be(n[0],a)+r.x,c=Be(n[1],o)+r.y;return{cx:h,cy:c,r0:l,r:u}}function Afe(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=UF(n,r),s=YF(n,r),l=s.cx,u=s.cy,h=s.r,c=s.r0,f=-n.get("startAngle")*TT,d=n.get("minAngle")*TT,v=0;i.each(a,function($){!isNaN($)&&v++});var g=i.getSum(a),m=Math.PI/(g||v)*2,y=n.get("clockwise"),b=n.get("roseType"),w=n.get("stillShowZeroSum"),T=i.getDataExtent(a);T[0]=0;var M=qg,D=0,P=f,O=y?1:-1;if(i.setLayout({viewRect:o,r:h}),i.each(a,function($,H){var j;if(isNaN($)){i.setItemLayout(H,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:c,r:b?NaN:h});return}b!=="area"?j=g===0&&w?m:$*m:j=qg/v,jr?y:m,M=Math.abs(w.label.y-r);if(M>=T.maxY){var D=w.label.x-e-w.len2*i,P=n+w.len,O=Math.abs(D)t.unconstrainedWidth?null:d:null;n.setStyle("width",v)}var g=n.getBoundingRect();a.width=g.width;var m=(n.style.margin||0)+2.1;a.height=g.height+m,a.y-=(a.height-c)/2}}}function ab(t){return t.position==="center"}function Dfe(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*Tfe,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,h=s.x,c=s.y,f=s.height;function d(D){D.ignore=!0}function v(D){if(!D.ignore)return!0;for(var P in D.states)if(D.states[P].ignore===!1)return!0;return!1}e.each(function(D){var P=e.getItemGraphicEl(D),O=P.shape,V=P.getTextContent(),$=P.getTextGuideLine(),H=e.getItemModel(D),j=H.getModel("label"),q=j.get("position")||H.get(["emphasis","label","position"]),G=j.get("distanceToLabelLine"),J=j.get("alignTo"),K=Be(j.get("edgeDistance"),u),se=j.get("bleedMargin"),ae=H.getModel("labelLine"),ce=ae.get("length");ce=Be(ce,u);var ye=ae.get("length2");if(ye=Be(ye,u),Math.abs(O.endAngle-O.startAngle)0?"right":"left":De>0?"left":"right"}var Zt=Math.PI,Mt=0,Cr=j.get("rotate");if($t(Cr))Mt=Cr*(Zt/180);else if(q==="center")Mt=0;else if(Cr==="radial"||Cr===!0){var dr=De<0?-de+Zt:-de;Mt=dr}else if(Cr==="tangential"&&q!=="outside"&&q!=="outer"){var Kt=Math.atan2(De,Ie);Kt<0&&(Kt=Zt*2+Kt);var Mn=Ie>0;Mn&&(Kt=Zt+Kt),Mt=Kt-Zt}if(a=!!Mt,V.x=Pe,V.y=Qe,V.rotation=Mt,V.setStyle({verticalAlign:"middle"}),qe){V.setStyle({align:et});var tn=V.states.select;tn&&(tn.x+=V.x,tn.y+=V.y)}else{var Gr=V.getBoundingRect().clone();Gr.applyTransform(V.getComputedTransform());var Ln=(V.style.margin||0)+2.1;Gr.y-=Ln/2,Gr.height+=Ln,r.push({label:V,labelLine:$,position:q,len:ce,len2:ye,minTurnAngle:ae.get("minTurnAngle"),maxSurfaceAngle:ae.get("maxSurfaceAngle"),surfaceNormal:new _t(De,Ie),linePoints:Ke,textAlign:et,labelDistance:G,labelAlignTo:J,edgeDistance:K,bleedMargin:se,rect:Gr,unconstrainedWidth:Gr.width,labelStyleWidth:V.style.width})}P.setTextConfig({inside:qe})}}),!a&&t.get("avoidLabelOverlap")&&kfe(r,n,i,l,u,f,h,c);for(var g=0;g0){for(var h=o.getItemLayout(0),c=1;isNaN(h&&h.startAngle)&&c=a.r0}},e.type="pie",e}(hr);const Efe=Lfe;function pf(t,e,r){e=Se(e)&&{coordDimensions:e}||xe({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=wp(n,e).dimensions,a=new Hn(i,t);return a.initData(n,r),a}var Ife=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}();const Lp=Ife;var Bfe=Ft(),Pfe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lp(Ge(this.getData,this),Ge(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return pf(this,{coordDimensions:["value"],encodeDefaulter:pt(KS,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=Bfe(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=Wne(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Yu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(pr);const Rfe=Pfe;function Ffe(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!($t(o)&&!isNaN(o)&&o<0)})}}}function Ofe(t){t.registerChartView(Efe),t.registerSeriesModel(Rfe),fR("pie",t.registerAction),t.registerLayout(pt(Afe,"pie")),t.registerProcessor(Mp("pie")),t.registerProcessor(Ffe("pie"))}var Nfe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return ns(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(pr);const zfe=Nfe;var ZF=4,Vfe=function(){function t(){}return t}(),$fe=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new Vfe},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var h=u*2,c=a[h]-s/2,f=a[h+1]-l/2;if(r>=c&&n>=f&&r<=c+s&&n<=f+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,h=-1/0,c=-1/0,f=0;f=0&&(u.dataIndex=c+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const Hfe=Gfe;var qfe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Dp("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Hfe:new kp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(hr);const Wfe=qfe;var Ufe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Nt);const Yfe=Ufe;var U5=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Rr).models[0]},e.type="cartesian2dAxis",e}(Nt);Or(U5,Ap);var jF={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Xfe=bt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jF),Tw=bt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},jF),Zfe=bt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Tw),jfe=rt({logBase:10},Tw);const KF={category:Xfe,value:Tw,time:Zfe,log:jfe};var Kfe={value:1,category:1,time:1,log:1};function Yc(t,e,r,n){W(Kfe,function(i,a){var o=bt(bt({},KF[a],!0),n,!0),s=function(l){pe(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=e+"Axis."+a,h}return u.prototype.mergeDefaultAndTheme=function(h,c){var f=qd(this),d=f?lf(h):{},v=c.getTheme();bt(h,v.get(a+"Axis")),bt(h,this.getDefaultOption()),h.type=DT(h),f&&ul(h,d,f)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=z5.createByAxisModel(this))},u.prototype.getCategories=function(h){var c=this.option;if(c.type==="category")return h?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",DT)}function DT(t){return t.type||(t.data?"category":"value")}var Jfe=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return Ce(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Jt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}();const Qfe=Jfe;var Y5=["x","y"];function MT(t){return t.type==="interval"||t.type==="time"}var e0e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=Y5,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!MT(r)||!MT(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,c=(s[1]-o[1])/u,f=o[0]-i[0]*h,d=o[1]-a[0]*c,v=this._transform=[h,0,0,c,f,d];this._invTransform=Qc([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new St(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return un(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return un(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1]),a=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-i,s=Math.max(n[0],n[1])-a;return new St(i,a,o,s)},e}(Qfe),t0e=function(t){pe(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(Aa);const r0e=t0e;function X5(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],f={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,v=u==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));v[f.onZero]=Math.max(Math.min(g,v[1]),v[0])}a.position=[u==="y"?v[f[l]]:c[0],u==="x"?v[f[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=o?v[f[s]]-v[f.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Qr(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function LT(t){return t.get("coordinateSystem")==="cartesian2d"}function ET(t){var e={xAxisModel:null,yAxisModel:null};return W(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,Rr).models[0];e[n]=a}),e}var ob=Math.log;function JF(t,e,r){var n=cl.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=nF(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if(t.type==="log"){var f=ob(t.base);u=[ob(u[0])/f,ob(u[1])/f]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:c});var d=n.getExtent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var v=n.getInterval.call(t),g=u[0],m=u[1];if(h&&c)v=(m-g)/o;else if(h)for(m=u[0]+v*o;mu[0]&&isFinite(g)&&isFinite(u[0]);)v=Ux(v),g=u[1]-v*o;else{var y=t.getTicks().length-1;y>o&&(v=Ux(v));var b=v*o;m=Math.ceil(u[1]/v)*v,g=Tr(m-b),g<0&&u[0]>=0?(g=0,m=Tr(b)):m>0&&u[1]<=0&&(m=0,g=-Tr(b))}var w=(i[0].value-a[0].value)/s,T=(i[o].value-a[o].value)/s;n.setExtent.call(t,g+v*w,m+v*T),n.setInterval.call(t,v),(w||T)&&n.setNiceExtent.call(t,g+v,m-v)}var n0e=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Y5,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Lt(o),u=l.length;if(u){for(var h=[],c=u-1;c>=0;c--){var f=+l[c],d=o[f],v=d.model,g=d.scale;V5(g)&&v.get("alignTicks")&&v.get("interval")==null?h.push(d):(Wc(g,v),V5(g)&&(s=d))}h.length&&(s||(s=h.pop(),Wc(s.scale,s.model)),W(h,function(m){JF(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};W(n.x,function(o){IT(n,"y",o,a)}),W(n.y,function(o){IT(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=Vr(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(W(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=mhe(u);if(h){var c=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[c]-=h[c]+f,u.position==="top"?o.y+=h.height+f:u.position==="left"&&(o.x+=h.width+f)}}}),l()),W(this._coordsList,function(u){u.calcAffineTransform()});function l(){W(s,function(u){var h=u.isHorizontal(),c=h?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(c[f],c[1-f]),i0e(u,h?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}nt(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):I1(i-Ys)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),PT={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(un(s,s,o),un(l,l,o));var h=xe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new en({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Gc(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var f=e.get(["axisLine","symbol"]);if(f!=null){var d=e.get(["axisLine","symbolSize"]);ze(f)&&(f=[f,f]),(ze(d)||$t(d))&&(d=[d,d]);var v=nh(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],m=d[1];W([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,b){if(f[b]!=="none"&&f[b]!=null){var w=Fr(f[b],-g/2,-m/2,g,m,h.stroke,!0),T=y.r+y.offset,M=u?l:s;w.attr({rotation:y.rotate,x:M[0]+T*Math.cos(t.rotation),y:M[1]-T*Math.sin(t.rotation),silent:!0,z2:11}),r.add(w)}})}}},axisTickLabel:function(t,e,r,n){var i=l0e(r,n,e,t),a=h0e(r,n,e,t);if(s0e(e,a,i),u0e(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=gF(Ce(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));_F(o)}},axisName:function(t,e,r,n){var i=Qr(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),h=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-h*l:a==="end"?u[1]+h*l:(u[0]+u[1])/2,FT(a)?t.labelOffset+o*l:0],f,d=e.get("nameRotate");d!=null&&(d=d*Ys/180);var v;FT(a)?f=Gu.innerTextLayout(t.rotation,d??t.rotation,o):(f=o0e(t.rotation,a,d||0,u),v=t.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(f.rotation)),!isFinite(v)&&(v=null)));var g=s.getFont(),m=e.get("nameTruncate",!0)||{},y=m.ellipsis,b=Qr(t.nameTruncateMaxWidth,m.maxWidth,v),w=new Vt({x:c[0],y:c[1],rotation:f.rotation,silent:Gu.isLabelSilent(e),style:lr(s,{text:i,font:g,overflow:"truncate",width:b,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(nf({el:w,componentModel:e,itemName:i}),w.__fullText=i,w.anid="name",e.get("triggerEvent")){var T=Gu.makeAxisEventDataBase(e);T.targetType="axisName",T.name=i,dt(w).eventData=T}n.add(w),w.updateTransform(),r.add(w),w.decomposeTransform()}}};function o0e(t,e,r,n){var i=jI(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return I1(i-Ys/2)?(o=l?"bottom":"top",a="center"):I1(i-Ys*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iYs/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function s0e(t,e,r){if(!iF(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],h=r[1],c=r[r.length-1],f=r[r.length-2];n===!1?(Ii(a),Ii(u)):RT(a,o)&&(n?(Ii(o),Ii(h)):(Ii(a),Ii(u))),i===!1?(Ii(s),Ii(c)):RT(l,s)&&(i?(Ii(l),Ii(f)):(Ii(s),Ii(c)))}}function Ii(t){t&&(t.ignore=!0)}function RT(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=Vy([]);return th(i,i,-t.rotation),r.applyTransform(Ho([],i,t.getLocalTransform())),n.applyTransform(Ho([],i,e.getLocalTransform())),r.intersect(n)}}function FT(t){return t==="middle"||t==="center"}function QF(t,e,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||t===e}function g0e(t){var e=kw(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=Z5(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var g=l;v.color!=null&&(g=rt({color:v.color},l));var m=bt(ot(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:g,triggerEvent:f},!1);if(ze(h)){var y=m.name;m.name=h.replace("{value}",y??"")}else Je(h)&&(m.name=h(m.name,m));var b=new ur(m,null,this.ecModel);return Or(b,Ap.prototype),b.mainType="radar",b.componentIndex=this.componentIndex,b},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:bt({lineStyle:{color:"#bbb"}},w0.axisLine),axisLabel:Wg(w0.axisLabel,!1),axisTick:Wg(w0.axisTick,!1),splitLine:Wg(w0.splitLine,!0),splitArea:Wg(w0.splitArea,!0),indicator:[]},e}(Nt);const I0e=E0e;var B0e=["axisLine","axisTickLabel","axisName"],P0e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes(),a=Ce(i,function(o){var s=o.model.get("showName")?o.name:"",l=new es(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});W(a,function(o){W(B0e,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),c=s.get("show"),f=l.get("color"),d=u.get("color"),v=Se(f)?f:[f],g=Se(d)?d:[d],m=[],y=[];function b(J,K,se){var ae=se%K.length;return J[ae]=J[ae]||[],ae}if(a==="circle")for(var w=i[0].getTicksCoords(),T=n.cx,M=n.cy,D=0;D3?1.4:o>1?1.2:1.1,h=a>0?u:1/u;ub(this,"zoom","zoomOnMouseWheel",r,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(i){var c=Math.abs(a),f=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);ub(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(r){if(!GT(this._zr,"globalPan")){var n=r.pinchScale>1?1.1:1/1.1;ub(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e}(Ki);function ub(t,e,r,n,i){t.pointerChecker&&t.pointerChecker(n,i.originX,i.originY)&&(Zo(n.event),aO(t,e,r,n,i))}function aO(t,e,r,n,i){i.isAvailableBehavior=Ge(qm,null,r,n),t.trigger(e,i)}function qm(t,e,r){var n=r[t];return!t||n&&(!ze(n)||e.event[n+"Key"])}const Ep=q0e;function Mw(t,e,r){var n=t.target;n.x+=e,n.y+=r,n.dirty()}function Lw(t,e,r,n){var i=t.target,a=t.zoomLimit,o=t.zoom=t.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/t.zoom;t.zoom=o,i.x-=(r-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var W0e={axisPointer:1,tooltip:1,brush:1};function m2(t,e,r){var n=e.getComponentByElement(t.topTarget),i=n&&n.coordinateSystem;return n&&n!==r&&!W0e.hasOwnProperty(n.mainType)&&i&&i.model!==r}function oO(t){if(ze(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}var r=t;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var hb,ty={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},HT=Lt(ty),ry={"alignment-baseline":"textBaseline","stop-color":"stopColor"},qT=Lt(ry),U0e=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(e,r){r=r||{};var n=oO(e);this._defsUsePending=[];var i=new st;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),yi(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;Z0e(this._defs,this._defsUsePending),this._defsUsePending=[];var h,c;if(o){var f=y2(o);f.length>=4&&(h={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(h&&s!=null&&l!=null&&(c=lO(h,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new st,i.add(d),d.scaleX=d.scaleY=c.scale,d.x=c.x,d.y=c.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Rt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:h,viewBoxTransform:c,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var h=hb[s];if(h&&He(hb,s)){l=h.call(this,e,r);var c=e.getAttribute("name");if(c){var f={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=WT[s];if(d&&He(WT,s)){var v=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=v)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new Nd({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),Y0e(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){hb={g:function(e,r){var n=new st;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new Rt;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new fo;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new en;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new VS;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=XT(n));var a=new ui({shape:{points:i||[]},silent:!0});return Bi(r,a),yi(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=XT(n));var a=new hi({shape:{points:i||[]},silent:!0});return Bi(r,a),yi(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new dn;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new st;return Bi(r,s),yi(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new st;return Bi(r,s),yi(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=FB(n);return Bi(r,i),yi(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),WT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new mp(e,r,n,i);return UT(t,a),YT(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new ZB(e,r,n);return UT(t,i),YT(t,i),i}};function UT(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function YT(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};sO(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Bi(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),rt(e.__inheritedStyle,t.__inheritedStyle))}function XT(t){for(var e=y2(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=y2(o);switch(i=i||Zi(),s){case"translate":lo(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":CS(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":th(i,i,-parseFloat(l[0])*cb);break;case"skewX":var u=Math.tan(parseFloat(l[0])*cb);Ho(i,[1,0,u,1,0,0],i);break;case"skewY":var h=Math.tan(parseFloat(l[0])*cb);Ho(i,[1,h,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var jT=/([^\s:;]+)\s*:\s*([^:;]+)/g;function sO(t,e,r){var n=t.getAttribute("style");if(n){jT.lastIndex=0;for(var i;(i=jT.exec(n))!=null;){var a=i[1],o=He(ty,a)?ty[a]:null;o&&(e[o]=i[2]);var s=He(ry,a)?ry[a]:null;s&&(r[s]=i[2])}}}function Q0e(t,e,r){for(var n=0;n0,m={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=Ye(),n=Ye(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function h(d,v){return v&&(d=v(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function c(d){for(var v=[],g=!u&&l&&l.project,m=0;m=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;fn(e,Yr(n),{labelFetcher:f,labelDataIndex:c,defaultText:r},d);var v=e.getTextContent();if(v&&(uO(v).ignore=v.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function t9(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):dt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function r9(t,e,r,n,i){t.data||nf({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function n9(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Sr(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&xae(e,i,r),o}function i9(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),W(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(pr);const bde=xde;function Sde(t,e){var r={};return W(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,h=0;h1?(T.width=w,T.height=w/m):(T.height=w,T.width=w*m),T.y=b[1]-T.height/2,T.x=b[0]-T.width/2;else{var M=t.getBoxLayoutParams();M.aspect=m,T=Vr(M,{width:v,height:g})}this.setViewRect(T.x,T.y,T.width,T.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}function kde(t,e){W(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var Dde=function(){function t(){this.dimensions=cO}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new l9(l+s,l,xe({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=u9,u.resize(o,r)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),W(a,function(o,s){var l=Ce(o,function(h){return h.get("nameMap")}),u=new l9(s,s,xe({nameMap:_S(l)},i(o[0])));u.zoomLimit=Qr.apply(null,Ce(o,function(h){return h.get("scaleLimit")})),n.push(u),u.resize=u9,u.resize(o[0],r),W(o,function(h){h.coordinateSystem=u,kde(u,h)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=Ye(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function Ode(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){Vde(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=$de(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Nde(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function c9(t){return arguments.length?t:qde}function Z0(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function zde(t,e){return Vr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Vde(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function $de(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,h=o.hierNode.modifier,c=s.hierNode.modifier;s=fb(s),a=db(a),s&&a;){i=fb(i),o=db(o),i.hierNode.ancestor=t;var f=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);f>0&&(Hde(Gde(s,t,r),t,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!fb(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=c-l),a&&!db(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-h,r=t)}return r}function fb(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function db(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Gde(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Hde(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function qde(t,e){return t.parentNode===e.parentNode?1:2}var Wde=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Ude=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Wde},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,h=u==="TB"||u==="BT"?0:1,c=1-h,f=Be(n.forkPosition,1),d=[];d[h]=o[h],d[c]=o[c]+(l[c]-o[c])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[h]=s[h],r.lineTo(d[0],d[1]),d[h]=l[h],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var v=1;vb.x,M||(T=T-Math.PI));var P=M?"left":"right",O=s.getModel("label"),V=O.get("rotate"),$=V*(Math.PI/180),H=m.getTextContent();H&&(m.setTextConfig({position:O.get("position")||P,rotation:V==null?-T:$,origin:"center"}),H.setStyle("verticalAlign","middle"))}var j=s.get(["emphasis","focus"]),q=j==="relative"?C1(o.getAncestorsIndices(),o.getDescendantIndices()):j==="ancestor"?o.getAncestorsIndices():j==="descendant"?o.getDescendantIndices():null;q&&(dt(r).focus=q),Xde(i,o,h,r,v,d,g,n),r.__edge&&(r.onHoverStateChange=function(G){if(G!=="blur"){var J=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);J&&J.hoverState===gp||P1(r.__edge,G)}})}function Xde(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),f=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new jy({shape:J5(h,c,f,i,i)})),Gt(g,{shape:J5(h,c,f,a,o)},t));else if(u==="polyline"&&h==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],b=0;br&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(ze(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function yO(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Rw(t,e){var r=yO(t);return Ct(r,e)>=0}function _2(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var ape=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new ur(i,this,this.ecModel),o=Pw.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(f,d){var v=o.getNodeByDataIndex(d);return v&&v.children.length&&v.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=r.expandAndCollapse,h=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=h}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Xr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=_2(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(pr);const ope=ape;function spe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function lpe(t,e){t.eachSeriesByType("tree",function(r){upe(r,e)})}function upe(t,e){var r=zde(t,e);t.layoutInfo=r;var n=t.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(r.height,r.width)/2,o=c9(function(w,T){return(w.parentNode===T.parentNode?1:2)/w.depth})):(i=r.width,a=r.height,o=c9());var s=t.getData().tree.root,l=s.children[0];if(l){Fde(s),spe(l,Ode,o),s.hierNode.modifier=-l.hierNode.prelim,A0(l,Nde);var u=l,h=l,c=l;A0(l,function(w){var T=w.getLayout().x;Th.getLayout().x&&(h=w),w.depth>c.depth&&(c=w)});var f=u===h?1:o(u,h)/2,d=f-u.getLayout().x,v=0,g=0,m=0,y=0;if(n==="radial")v=i/(h.getLayout().x+f+d),g=a/(c.depth-1||1),A0(l,function(w){m=(w.getLayout().x+d)*v,y=(w.depth-1)*g;var T=Z0(m,y);w.setLayout({x:T.x,y:T.y,rawX:m,rawY:y},!0)});else{var b=t.getOrient();b==="RL"||b==="LR"?(g=a/(h.getLayout().x+f+d),v=i/(c.depth-1||1),A0(l,function(w){y=(w.getLayout().x+d)*g,m=b==="LR"?(w.depth-1)*v:i-(w.depth-1)*v,w.setLayout({x:m,y},!0)})):(b==="TB"||b==="BT")&&(v=i/(h.getLayout().x+f+d),g=a/(c.depth-1||1),A0(l,function(w){m=(w.getLayout().x+d)*v,y=b==="TB"?(w.depth-1)*g:a-(w.depth-1)*g,w.setLayout({x:m,y},!0)}))}}}function hpe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");xe(s,o)})})}function cpe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=Iw(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function fpe(t){t.registerChartView(Zde),t.registerSeriesModel(ope),t.registerLayout(lpe),t.registerVisual(hpe),cpe(t)}var g9=["treemapZoomToNode","treemapRender","treemapMove"];function dpe(t){for(var e=0;e1;)a=a.parentNode;var o=k5(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var ppe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};xO(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new ur({itemStyle:o},this,n);a=r.levels=vpe(a,n);var l=Ce(a||[],function(c){return new ur(c,s,n)},this),u=Pw.createTree(i,this,h);function h(c){c.wrapMethod("getItemModel",function(f,d){var v=u.getNodeByDataIndex(d),g=v?l[v.depth]:null;return f.parentModel=g||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Xr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=_2(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},xe(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=Ye(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){_O(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(pr);function xO(t){var e=0;W(t.children,function(n){xO(n);var i=n.value;Se(i)&&(i=i[0]),e+=i});var r=t.value;Se(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),Se(t.value)?t.value[0]=r:t.value=r}function vpe(t,e){var r=er(e.get("color")),n=er(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;W(t,function(s){var l=new ur(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}const gpe=ppe;var mpe=8,m9=8,pb=5,ype=function(){function t(e){this.group=new st,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:r.getWidth(),height:r.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,u),this._renderContent(e,c,s,l,u,h,i),a2(o,c.pos,c.box)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=zr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+mpe*2,r.emptyItemWidth);r.totalWidth+=s+m9,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s){for(var l=0,u=r.emptyItemWidth,h=e.get(["breadcrumb","height"]),c=Moe(r.pos,r.box),f=r.totalWidth,d=r.renderList,v=i.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,b=m.width,w=m.text;f>c.width&&(f-=b-u,b=u,w=null);var T=new ui({shape:{points:_pe(l,0,b,h,g===d.length-1,g===0)},style:rt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Vt({style:lr(a,{text:w})}),textConfig:{position:"inside"},z2:tf*1e4,onclick:pt(s,y)});T.disableLabelAnimation=!0,T.getTextContent().ensureState("emphasis").style=lr(o,{text:w}),T.ensureState("emphasis").style=v,Sr(T,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(T),xpe(T,e,y),l+=b+m9}},t.prototype.remove=function(){this.group.removeAll()},t}();function _pe(t,e,r,n,i,a){var o=[[i?t:t-pb,e],[t+r,e],[t+r,e+n],[i?t:t-pb,e+n]];return!a&&o.splice(2,0,[t+r+pb,e+n/2]),!i&&o.push([t,e+n/2]),o}function xpe(t,e,r){dt(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&_2(r,e)}}const bpe=ype;var Spe=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;i_9||Math.abs(r.dy)>_9)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new St(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,i-=l.y;var u=Zi();lo(u,u,[-n,-i]),CS(u,u,[r.scale,r.scale]),lo(u,u,[n,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&V1(u,h)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new bpe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(Rw(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=T0(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(hr);function T0(){return{nodeGroup:[],background:[],content:[]}}function Dpe(t,e,r,n,i,a,o,s,l,u){if(!o)return;var h=o.getLayout(),c=t.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var d=h.width,v=h.height,g=h.borderWidth,m=h.invisible,y=o.getRawIndex(),b=s&&s.getRawIndex(),w=o.viewChildren,T=h.upperHeight,M=w&&w.length,D=f.getModel("itemStyle"),P=f.getModel(["emphasis","itemStyle"]),O=f.getModel(["blur","itemStyle"]),V=f.getModel(["select","itemStyle"]),$=D.get("borderRadius")||0,H=Pe("nodeGroup",Q5);if(!H)return;if(l.add(H),H.x=h.x||0,H.y=h.y||0,H.markRedraw(),ny(H).nodeWidth=d,ny(H).nodeHeight=v,h.isAboveViewRoot)return H;var j=Pe("background",y9,u,Ape);j&&ce(H,j,M&&h.upperLabelHeight);var q=f.getModel("emphasis"),G=q.get("focus"),J=q.get("blurScope"),K=q.get("disabled"),se=G==="ancestor"?o.getAncestorsIndices():G==="descendant"?o.getDescendantIndices():G;if(M)Vd(H)&&Tu(H,!1),j&&(Tu(j,!K),c.setItemGraphicEl(o.dataIndex,j),_5(j,se,J));else{var ae=Pe("content",y9,u,Tpe);ae&&ye(H,ae),j.disableMorphing=!0,j&&Vd(j)&&Tu(j,!1),Tu(H,!K),c.setItemGraphicEl(o.dataIndex,H),_5(H,se,J)}return H;function ce(et,qe,lt){var it=dt(qe);if(it.dataIndex=o.dataIndex,it.seriesIndex=t.seriesIndex,qe.setShape({x:0,y:0,width:d,height:v,r:$}),m)de(qe);else{qe.invisible=!1;var Re=o.getVisual("style"),Ae=Re.stroke,Xt=S9(D);Xt.fill=Ae;var ht=fu(P);ht.fill=P.get("borderColor");var Zt=fu(O);Zt.fill=O.get("borderColor");var Mt=fu(V);if(Mt.fill=V.get("borderColor"),lt){var Cr=d-2*g;De(qe,Ae,Re.opacity,{x:g,y:0,width:Cr,height:T})}else qe.removeTextContent();qe.setStyle(Xt),qe.ensureState("emphasis").style=ht,qe.ensureState("blur").style=Zt,qe.ensureState("select").style=Mt,ju(qe)}et.add(qe)}function ye(et,qe){var lt=dt(qe);lt.dataIndex=o.dataIndex,lt.seriesIndex=t.seriesIndex;var it=Math.max(d-2*g,0),Re=Math.max(v-2*g,0);if(qe.culling=!0,qe.setShape({x:g,y:g,width:it,height:Re,r:$}),m)de(qe);else{qe.invisible=!1;var Ae=o.getVisual("style"),Xt=Ae.fill,ht=S9(D);ht.fill=Xt,ht.decal=Ae.decal;var Zt=fu(P),Mt=fu(O),Cr=fu(V);De(qe,Xt,Ae.opacity,null),qe.setStyle(ht),qe.ensureState("emphasis").style=Zt,qe.ensureState("blur").style=Mt,qe.ensureState("select").style=Cr,ju(qe)}et.add(qe)}function de(et){!et.invisible&&a.push(et)}function De(et,qe,lt,it){var Re=f.getModel(it?b9:x9),Ae=zr(f.get("name"),null),Xt=Re.getShallow("show");fn(et,Yr(f,it?b9:x9),{defaultText:Xt?Ae:null,inheritColor:qe,defaultOpacity:lt,labelFetcher:t,labelDataIndex:o.dataIndex});var ht=et.getTextContent();if(ht){var Zt=ht.style,Mt=bS(Zt.padding||0);it&&(et.setTextConfig({layoutRect:it}),ht.disableLabelLayout=!0),ht.beforeUpdate=function(){var dr=Math.max((it?it.width:et.shape.width)-Mt[1]-Mt[3],0),Kt=Math.max((it?it.height:et.shape.height)-Mt[0]-Mt[2],0);(Zt.width!==dr||Zt.height!==Kt)&&ht.setStyle({width:dr,height:Kt})},Zt.truncateMinChar=2,Zt.lineOverflow="truncate",Ie(Zt,it,h);var Cr=ht.getState("emphasis");Ie(Cr?Cr.style:null,it,h)}}function Ie(et,qe,lt){var it=et?et.text:null;if(!qe&<.isLeafRoot&&it!=null){var Re=t.get("drillDownIcon",!0);et.text=Re?Re+" "+it:it}}function Pe(et,qe,lt,it){var Re=b!=null&&r[et][b],Ae=i[et];return Re?(r[et][b]=null,Qe(Ae,Re)):m||(Re=new qe,Re instanceof ji&&(Re.z2=Mpe(lt,it)),Ke(Ae,Re)),e[et][y]=Re}function Qe(et,qe){var lt=et[y]={};qe instanceof Q5?(lt.oldX=qe.x,lt.oldY=qe.y):lt.oldShape=xe({},qe.shape)}function Ke(et,qe){var lt=et[y]={},it=o.parentNode,Re=qe instanceof st;if(it&&(!n||n.direction==="drillDown")){var Ae=0,Xt=0,ht=i.background[it.getRawIndex()];!n&&ht&&ht.oldShape&&(Ae=ht.oldShape.width,Xt=ht.oldShape.height),Re?(lt.oldX=0,lt.oldY=Xt):lt.oldShape={x:Ae,y:Xt,width:0,height:0}}lt.fadein=!Re}}function Mpe(t,e){return t*Cpe+e}const Lpe=kpe;var ep=W,Epe=nt,iy=-1,Fw=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ot(e);this.type=n,this.mappingMethod=r,this._normalizeData=Ppe[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(vb(i),Ipe(i)):r==="category"?i.categories?Bpe(i):vb(i,!0):(Wn(r!=="linear"||i.dataExtent),vb(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return Ge(this._normalizeData,this)},t.listVisualTypes=function(){return Lt(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){nt(e)?W(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=Se(e)?[]:nt(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&ep(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(Se(e))e=e.slice();else if(Epe(e)){var r=[];ep(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function vb(t,e){var r=t.visual,n=[];nt(r)?ep(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),bO(t,n)}function Yg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:e3([0,1])}}function w9(t){var e=this.option.visual;return e[Math.round(jt(t,[0,1],[0,e.length-1],!0))]||{}}function k0(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function j0(t){var e=this.option.visual;return e[this.option.loop&&t!==iy?t%e.length:t]}function du(){return this.option.visual[0]}function e3(t){return{linear:function(e){return jt(e,t,this.option.visual,!0)},category:j0,piecewise:function(e,r){var n=t3.call(this,r);return n==null&&(n=jt(e,t,this.option.visual,!0)),n},fixed:du}}function t3(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=Fw.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function bO(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=Ce(e,function(r){var n=bi(r);return n||[0,0,0,1]})),e}var Ppe={linear:function(t){return jt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=Fw.findPieceIndex(t,e,!0);if(r!=null)return jt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??iy},fixed:Ir};function Xg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=Vpe(i,l,g,m,v,n);wO(g,y,r,n)}})}}}function Ope(t,e,r){var n=xe({},e),i=r.designatedVisualItemStyle;return W(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function C9(t){var e=gb(t,"color");if(e){var r=gb(t,"colorAlpha"),n=gb(t,"colorSaturation");return n&&(e=nd(e,null,null,n)),r&&(e=k1(e,r)),e}}function Npe(t,e){return e!=null?nd(e,null,null,t):null}function gb(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function zpe(t,e,r,n,i,a){if(!(!a||!a.length)){var o=mb(e,"color")||i.color!=null&&i.color!=="none"&&(mb(e,"colorAlpha")||mb(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(h==="index"||h==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new hn(c);return SO(f).drColorMappingBy=h,f}}}function mb(t,e){var r=t.get(e);return Se(r)&&r.length?{name:e,range:r}:null}function Vpe(t,e,r,n,i,a){var o=xe({},e);if(i){var s=i.type,l=s==="color"&&SO(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var tp=Math.max,ay=Math.min,A9=Qr,Ow=W,CO=["itemStyle","borderWidth"],$pe=["itemStyle","gapWidth"],Gpe=["upperLabel","show"],Hpe=["upperLabel","height"];const qpe={seriesType:"treemap",reset:function(t,e,r,n){var i=r.getWidth(),a=r.getHeight(),o=t.option,s=Vr(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=Be(A9(s.width,l[0]),i),h=Be(A9(s.height,l[1]),a),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],d=Qd(n,f,t),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,g=t.getViewRoot(),m=yO(g);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?jpe(t,d,g,u,h):v?[v.width,v.height]:[u,h],b=o.sort;b&&b!=="asc"&&b!=="desc"&&(b="desc");var w={squareRatio:o.squareRatio,sort:b,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var T={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};g.setLayout(T),AO(g,w,!1,0),T=g.getLayout(),Ow(m,function(D,P){var O=(m[P+1]||g).getValue();D.setLayout(xe({dataExtent:[O,O],borderWidth:0,upperHeight:0},T))})}var M=t.getData().tree.root;M.setLayout(Kpe(s,v,d),!0),t.setLayoutInfo(s),TO(M,new St(-s.x,-s.y,i,a),m,g,0)}};function AO(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(CO),u=s.get($pe)/2,h=kO(s),c=Math.max(l,h),f=l-u,d=c-u;t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),i=tp(i-2*f,0),a=tp(a-f-d,0);var v=i*a,g=Wpe(t,s,v,e,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=ay(i,a),b=1/0,w=[];w.area=0;for(var T=0,M=g.length;T=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Zpe(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?tp(u*n/l,l/(u*i)):1/0}function T9(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],h=e?t.area/e:0;(i||h>r[l[o]])&&(h=r[l[o]]);for(var c=0,f=t.length;cO7&&(u=O7),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(M[0]=-M[0],M[1]=-M[1]);var P=T[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var O=-Math.atan2(T[1],T[0]);c[0].8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+h[0],a.y=-f[1]*b+h[1],v=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*P+h[0],a.y=h[1]+V,v=T[0]<0?"right":"left",a.originX=-y*P,a.originY=-V;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=D[0],a.y=D[1]+V,v="center",a.originY=-V;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*P+c[0],a.y=c[1]+V,v=T[0]>=0?"right":"left",a.originX=y*P,a.originY=-V;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||v})}},e}(st);const $w=gve;var mve=function(){function t(e){this.group=new st,this._LineCtor=e||$w}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=I9(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=I9(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!yve(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function I9(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:Yr(e)}}function B9(t){return isNaN(t[0])||isNaN(t[1])}function Sb(t){return t&&!B9(t[0])&&!B9(t[1])}const Gw=mve;var wb=[],Cb=[],Ab=[],uc=Kr,Tb=Pu,P9=Math.abs;function R9(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,h=.1;h<=.9;h+=.1){wb[0]=uc(n[0],i[0],a[0],h),wb[1]=uc(n[1],i[1],a[1],h);var c=P9(Tb(wb,e)-l);c=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function kb(t,e){var r=[],n=Pd,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Go(u[0]),Go(u[1])],u[2]&&u.__original.push(Go(u[2])));var f=u.__original;if(u[2]!=null){if(Nn(i[0],f[0]),Nn(i[1],f[2]),Nn(i[2],f[1]),h&&h!=="none"){var d=J0(s.node1),v=R9(i,f[0],d*e);n(i[0][0],i[1][0],i[2][0],v,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],v,r),i[0][1]=r[3],i[1][1]=r[4]}if(c&&c!=="none"){var d=J0(s.node2),v=R9(i,f[1],d*e);n(i[0][0],i[1][0],i[2][0],v,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],v,r),i[1][1]=r[1],i[2][1]=r[2]}Nn(u[0],i[0]),Nn(u[1],i[2]),Nn(u[2],i[1])}else{if(Nn(a[0],f[0]),Nn(a[1],f[1]),Cu(o,a[1],a[0]),Jc(o,o),h&&h!=="none"){var d=J0(s.node1);W4(a[0],a[0],o,d*e)}if(c&&c!=="none"){var d=J0(s.node2);W4(a[1],a[1],o,-d*e)}Nn(u[0],a[0]),Nn(u[1],a[1])}})}function F9(t){return t.type==="view"}var _ve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new kp,a=new Gw,o=this.group;this._controller=new Ep(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem;this._model=r;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(F9(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):Gt(u,h,r)}kb(r.getGraph(),K0(r));var c=r.getData();s.updateData(c);var f=r.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(r,n,i),clearTimeout(this._layoutTimeout);var d=r.forceLayout,v=r.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,v);var g=r.get("layout");c.graph.eachNode(function(w){var T=w.dataIndex,M=w.getGraphicEl(),D=w.getModel();if(M){M.off("drag").off("dragend");var P=D.get("draggable");P&&M.on("drag",function(V){switch(g){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,v),d.setFixed(T),c.setItemLayout(T,[M.x,M.y]);break;case"circular":c.setItemLayout(T,[M.x,M.y]),w.setLayout({fixed:!0},!0),Vw(r,"symbolSize",w,[V.offsetX,V.offsetY]),a.updateLayout(r);break;case"none":default:c.setItemLayout(T,[M.x,M.y]),zw(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){d&&d.setUnfixed(T)}),M.setDraggable(P,!!D.get("cursor"));var O=D.get(["emphasis","focus"]);O==="adjacency"&&(dt(M).focus=w.getAdjacentDataIndices())}}),c.graph.eachEdge(function(w){var T=w.getGraphicEl(),M=w.getModel().get(["emphasis","focus"]);T&&M==="adjacency"&&(dt(T).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var m=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),y=c.getLayout("cx"),b=c.getLayout("cy");c.graph.eachNode(function(w){EO(w,m,y,b)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n){var i=this;(function a(){r.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(r,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(h,c)&&!m2(u,i,r)}),!F9(r.coordinateSystem)){o.disable();return}o.enable(r.get("roam")),s.zoomLimit=r.get("scaleLimit"),s.zoom=r.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Mw(s,u.dx,u.dy),i.dispatchAction({seriesId:r.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Lw(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:r.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),kb(r.getGraph(),K0(r)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=K0(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){kb(r.getGraph(),K0(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(hr);const xve=_ve;function hc(t){return"_EC_"+t}var bve=function(){function t(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(e,r){e=e==null?""+r:""+e;var n=this._nodesMap;if(!n[hc(e)]){var i=new pu(e,r);return i.hostGraph=this,this.nodes.push(i),n[hc(e)]=i,i}},t.prototype.getNodeByIndex=function(e){var r=this.data.getRawIndex(e);return this.nodes[r]},t.prototype.getNodeById=function(e){return this._nodesMap[hc(e)]},t.prototype.addEdge=function(e,r,n){var i=this._nodesMap,a=this._edgesMap;if($t(e)&&(e=this.nodes[e]),$t(r)&&(r=this.nodes[r]),e instanceof pu||(e=i[hc(e)]),r instanceof pu||(r=i[hc(r)]),!(!e||!r)){var o=e.id+"-"+r.id,s=new BO(e,r,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),r.inEdges.push(s)),e.edges.push(s),e!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},t.prototype.getEdgeByIndex=function(e){var r=this.edgeData.getRawIndex(e);return this.edges[r]},t.prototype.getEdge=function(e,r){e instanceof pu&&(e=e.id),r instanceof pu&&(r=r.id);var n=this._edgesMap;return this._directed?n[e+"-"+r]:n[e+"-"+r]||n[r+"-"+e]},t.prototype.eachNode=function(e,r){for(var n=this.nodes,i=n.length,a=0;a=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof pu||(r=this._nodesMap[hc(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Or(pu,PO("hostGraph","data"));Or(BO,PO("hostGraph","edgeData"));const Sve=bve;function RO(t,e,r,n,i){for(var a=new Sve(n),o=0;o "+f)),u++)}var d=r.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar")v=ns(t,r);else{var g=bp.get(d),m=g?g.dimensions||[]:[];Ct(m,"value")<0&&m.concat(["value"]);var y=wp(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;v=new Hn(y,r),v.initData(t)}var b=new Hn(["value"],r);return b.initData(l,s),i&&i(v,b),gO({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:b},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var wve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Lp(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Yu(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){ive(this);var s=RO(a,i,this,!0,l);return W(s.edges,function(u){ave(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(v){var g=o._categoriesModels,m=v.getShallow("category"),y=g[m];return y&&(y.parentModel=v.parentModel,v.parentModel=y),v});var c=ur.prototype.getModel;function f(v,g){var m=c.call(this,v,g);return m.resolveParentPath=d,m}h.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=f,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var g=v.slice();return v[0]==="label"?g[0]="edgeLabel":v[1]==="label"&&(g[1]="edgeLabel"),g}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),Xr("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var c=rR({series:this,dataIndex:r,multipleSeries:n});return c},e.prototype._updateCategoriesData=function(){var r=Ce(this.option.categories||[],function(i){return i.value!=null?i:xe({value:0},i)}),n=new Hn(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pr);const Cve=wve;var Ave={type:"graphRoam",event:"graphRoam",update:"none"};function Tve(t){t.registerChartView(xve),t.registerSeriesModel(Cve),t.registerProcessor(Qpe),t.registerVisual(eve),t.registerVisual(tve),t.registerLayout(ove),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,lve),t.registerLayout(hve),t.registerCoordinateSystem("graphView",{dimensions:Ip.dimensions,create:fve}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ir),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ir),t.registerAction(Ave,function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=i.coordinateSystem,o=Iw(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var kve=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),Dve=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new kve},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),h=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,h),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,h)},e}(Tt);const Mve=Dve;function Lve(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=Be(r[0],e.getWidth()),s=Be(r[1],e.getHeight()),l=Be(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function jg(t,e){var r=t==null?"":t+"";return e&&(ze(e)?r=e.replace("{value}",r):Je(e)&&(r=e(t))),r}var Eve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Lve(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,h=-r.get("endAngle")/180*Math.PI,c=r.getModel("axisLine"),f=c.get("roundCap"),d=f?ey:li,v=c.get("show"),g=c.getModel("lineStyle"),m=g.get("width"),y=[u,h];fB(y,!l),u=y[0],h=y[1];for(var b=h-u,w=u,T=[],M=0;v&&M=V&&($===0?0:a[$-1][0])Math.PI/2&&(Pe+=Math.PI)):Ie==="tangential"?Pe=-O-Math.PI/2:$t(Ie)&&(Pe=Ie*Math.PI/180),Pe===0?c.add(new Vt({style:lr(w,{text:ce,x:de,y:De,verticalAlign:J<-.8?"top":J>.8?"bottom":"middle",align:G<-.4?"left":G>.4?"right":"center"},{inheritColor:ye}),silent:!0})):c.add(new Vt({style:lr(w,{text:ce,x:de,y:De,verticalAlign:"middle",align:"center"},{inheritColor:ye}),silent:!0,originX:de,originY:De,rotation:Pe}))}if(b.get("show")&&K!==T){var se=b.get("distance");se=se?se+h:h;for(var Qe=0;Qe<=M;Qe++){G=Math.cos(O),J=Math.sin(O);var Ke=new en({shape:{x1:G*(v-se)+f,y1:J*(v-se)+d,x2:G*(v-P-se)+f,y2:J*(v-P-se)+d},silent:!0,style:j});j.stroke==="auto"&&Ke.setStyle({stroke:a((K+Qe/M)/T)}),c.add(Ke),O+=$}O-=$}else O+=V}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,h){var c=this.group,f=this._data,d=this._progressEls,v=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),b=r.getData(),w=b.mapDimension("value"),T=+r.get("min"),M=+r.get("max"),D=[T,M],P=[s,l];function O($,H){var j=b.getItemModel($),q=j.getModel("pointer"),G=Be(q.get("width"),o.r),J=Be(q.get("length"),o.r),K=r.get(["pointer","icon"]),se=q.get("offsetCenter"),ae=Be(se[0],o.r),ce=Be(se[1],o.r),ye=q.get("keepAspect"),de;return K?de=Fr(K,ae-G/2,ce-J,G,J,null,ye):de=new Mve({shape:{angle:-Math.PI/2,width:G,r:J,x:ae,y:ce}}),de.rotation=-(H+Math.PI/2),de.x=o.cx,de.y=o.cy,de}function V($,H){var j=m.get("roundCap"),q=j?ey:li,G=m.get("overlap"),J=G?m.get("width"):h/b.count(),K=G?o.r-J:o.r-($+1)*J,se=G?o.r:o.r-$*J,ae=new q({shape:{startAngle:s,endAngle:H,cx:o.cx,cy:o.cy,clockwise:u,r0:K,r:se}});return G&&(ae.z2=M-b.get(w,$)%M),ae}(y||g)&&(b.diff(f).add(function($){var H=b.get(w,$);if(g){var j=O($,s);fr(j,{rotation:-((isNaN(+H)?P[0]:jt(H,D,P,!0))+Math.PI/2)},r),c.add(j),b.setItemGraphicEl($,j)}if(y){var q=V($,s),G=m.get("clip");fr(q,{shape:{endAngle:jt(H,D,P,G)}},r),c.add(q),g5(r.seriesIndex,b.dataType,$,q),v[$]=q}}).update(function($,H){var j=b.get(w,$);if(g){var q=f.getItemGraphicEl(H),G=q?q.rotation:s,J=O($,G);J.rotation=G,Gt(J,{rotation:-((isNaN(+j)?P[0]:jt(j,D,P,!0))+Math.PI/2)},r),c.add(J),b.setItemGraphicEl($,J)}if(y){var K=d[H],se=K?K.shape.endAngle:s,ae=V($,se),ce=m.get("clip");Gt(ae,{shape:{endAngle:jt(j,D,P,ce)}},r),c.add(ae),g5(r.seriesIndex,b.dataType,$,ae),v[$]=ae}}).execute(),b.each(function($){var H=b.getItemModel($),j=H.getModel("emphasis"),q=j.get("focus"),G=j.get("blurScope"),J=j.get("disabled");if(g){var K=b.getItemGraphicEl($),se=b.getItemVisual($,"style"),ae=se.fill;if(K instanceof dn){var ce=K.style;K.useStyle(xe({image:ce.image,x:ce.x,y:ce.y,width:ce.width,height:ce.height},se))}else K.useStyle(se),K.type!=="pointer"&&K.setColor(ae);K.setStyle(H.getModel(["pointer","itemStyle"]).getItemStyle()),K.style.fill==="auto"&&K.setStyle("fill",a(jt(b.get(w,$),D,[0,1],!0))),K.z2EmphasisLift=0,cn(K,H),Sr(K,q,G,J)}if(y){var ye=v[$];ye.useStyle(b.getItemVisual($,"style")),ye.setStyle(H.getModel(["progress","itemStyle"]).getItemStyle()),ye.z2EmphasisLift=0,cn(ye,H),Sr(ye,q,G,J)}}),this._progressEls=v)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),h=Fr(s,n.cx-o/2+Be(l[0],n.r),n.cy-o/2+Be(l[1],n.r),o,o,null,u);h.z2=i.get("showAbove")?1:0,h.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),h=+r.get("min"),c=+r.get("max"),f=new st,d=[],v=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new Vt({silent:!0}),v[y]=new Vt({silent:!0})}).update(function(y,b){d[y]=s._titleEls[b],v[y]=s._detailEls[b]}).execute(),l.each(function(y){var b=l.getItemModel(y),w=l.get(u,y),T=new st,M=a(jt(w,[h,c],[0,1],!0)),D=b.getModel("title");if(D.get("show")){var P=D.get("offsetCenter"),O=o.cx+Be(P[0],o.r),V=o.cy+Be(P[1],o.r),$=d[y];$.attr({z2:m?0:2,style:lr(D,{x:O,y:V,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:M})}),T.add($)}var H=b.getModel("detail");if(H.get("show")){var j=H.get("offsetCenter"),q=o.cx+Be(j[0],o.r),G=o.cy+Be(j[1],o.r),J=Be(H.get("width"),o.r),K=Be(H.get("height"),o.r),se=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:M,$=v[y],ae=H.get("formatter");$.attr({z2:m?0:2,style:lr(H,{x:q,y:G,text:jg(w,ae),width:isNaN(J)?null:J,height:isNaN(K)?null:K,align:"center",verticalAlign:"middle"},{inheritColor:se})}),iP($,{normal:H},w,function(ye){return jg(ye,ae)}),g&&aP($,y,l,r,{getFormattedLabel:function(ye,de,De,Ie,Pe,Qe){return jg(Qe?Qe.interpolatedValue:w,ae)}}),T.add($)}f.add(T)}),this.group.add(f),this._titleEls=d,this._detailEls=v},e.type="gauge",e}(hr);const Ive=Eve;var Bve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return pf(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(pr);const Pve=Bve;function Rve(t){t.registerChartView(Ive),t.registerSeriesModel(Pve)}var Fve=["itemStyle","opacity"],Ove=function(t){pe(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new hi,s=new Vt;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),h=s.get(Fve);h=h??1,i||ba(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,fr(a,{style:{opacity:h}},o,n)):Gt(a,{style:{opacity:h},shape:{points:l.points}},o,n),cn(a,s),this._updateLabel(r,n),Sr(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),h=u.label,c=r.getItemVisual(n,"style"),f=c.fill;fn(o,Yr(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:c.opacity,defaultText:r.getName(n)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),i.setTextConfig({local:!0,inside:!!h.inside,insideStroke:f,outsideFill:f});var d=h.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new _t(d[0][0],d[0][1]):null},Gt(o,{style:{x:h.x,y:h.y}},s,n),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),xw(i,bw(l),{stroke:f})},e}(ui),Nve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new Ove(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(a,l),s.add(h),a.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);$d(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(hr);const zve=Nve;var Vve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lp(Ge(this.getData,this),Ge(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return pf(this,{coordDimensions:["value"],encodeDefaulter:pt(KS,this)})},e.prototype._defaultLabelLine=function(r){Yu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pr);const $ve=Vve;function Gve(t,e){return Vr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Hve(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();olge)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Mb(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function Mb(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}const cge=uge;var fge=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&bt(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){W(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=Jt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);W(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Nt);const dge=fge;var pge=function(t){pe(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Aa);const vge=pge;function sh(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=cc(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=cc(s,[0,o]),i=a=cc(s,[i,a]),n=0}e[0]=cc(e[0],r),e[1]=cc(e[1],r);var l=Lb(e,n);e[n]+=t;var u=i||0,h=r.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=cc(e[n],h);var c;return c=Lb(e,n),i!=null&&(c.sign!==l.sign||c.spana&&(e[1-n]=e[n]+c.sign*a),e}function Lb(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function cc(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var Eb=W,OO=Math.min,NO=Math.max,z9=Math.floor,gge=Math.ceil,V9=Tr,mge=Math.PI,yge=function(){function t(e,r,n){this.type="parallel",this._axesMap=Ye(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;Eb(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),h=this._axesMap.set(o,new vge(o,p2(u),[0,0],u.get("type"),l)),c=h.type==="category";h.onBand=c&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();Eb(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Wc(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){this._rect=Vr(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,h=Kg(e.get("axisExpandWidth"),l),c=Kg(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow"),v;if(d)v=Kg(d[1]-d[0],l),d[1]=d[0]+v;else{v=Kg(h*(c-1),l);var g=e.get("axisExpandCenter")||z9(u/2);d=[h*g-v/2],d[1]=d[0]+v}var m=(s-v)/(u-c);m<3&&(m=0);var y=[z9(V9(d[0]/h,1))+1,gge(V9(d[1]/h,1))-1],b=m/h*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:h,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:b}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Eb(n,function(o,s){var l=(i.axisExpandable?xge:_ge)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},h={horizontal:mge/2,vertical:0},c=[u[a].x+e.x,u[a].y+e.y],f=h[a],d=Zi();th(d,d,f),lo(d,d,c),this._axesLayout[o]={position:c,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];W(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),h=n;ha*(1-c[0])?(u="jump",l=s-a*(1-c[2])):(l=s-a*c[1])>=0&&(l=s-a*(1-c[1]))<=0&&(l=0),l*=r.axisExpandWidth/h,l?sh(l,i,o,"all"):u="none";else{var d=i[1]-i[0],v=o[1]*s/d;i=[NO(0,v-d/2)],i[1]=OO(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Kg(t,e){return OO(NO(t,e[0]),e[1])}function _ge(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function xge(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,h;return t=0;i--)Wi(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;akge}function WO(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function UO(t,e,r,n){var i=new st;return i.add(new Rt({name:"main",style:Uw(r),silent:!0,draggable:!0,cursor:"move",drift:pt(q9,t,e,i,["n","s","w","e"]),ondragend:pt(Qu,e,{isEnd:!0})})),W(n,function(a){i.add(new Rt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pt(q9,t,e,i,a),ondragend:pt(Qu,e,{isEnd:!0})}))}),i}function YO(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=Xc(i,Dge),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,h=r[0][1],c=r[1][1],f=h-a+i/2,d=c-a+i/2,v=h-o,g=c-s,m=v+i,y=g+i;Bo(t,e,"main",o,s,v,g),n.transformable&&(Bo(t,e,"w",l,u,a,y),Bo(t,e,"e",f,u,a,y),Bo(t,e,"n",l,u,m,a),Bo(t,e,"s",l,d,m,a),Bo(t,e,"nw",l,u,a,a),Bo(t,e,"ne",f,u,a,a),Bo(t,e,"sw",l,d,a,a),Bo(t,e,"se",f,d,a,a))}function o3(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(Uw(r)),i.attr({silent:!n,cursor:n?"move":"default"}),W([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?s3(t,a[0]):Rge(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Lge[s]+"-resize":null})})}function Bo(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(Oge(Yw(t,e,[[n,i],[n+a,i+o]])))}function Uw(t){return rt({strokeNoScale:!0},t.brushStyle)}function XO(t,e,r,n){var i=[np(t,r),np(e,n)],a=[Xc(t,r),Xc(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Pge(t){return zu(t.group)}function s3(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=Jy(r[e],Pge(t));return n[i]}function Rge(t,e){var r=[s3(t,e[0]),s3(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function q9(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=ZO(e,i,a);W(n,function(u){var h=Mge[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=t.fromRectRange(XO(s[0][0],s[1][0],s[0][1],s[1][1])),Hw(e,r),Qu(e,{isEnd:!1})}function Fge(t,e,r,n){var i=e.__brushOption.range,a=ZO(t,r,n);W(i,function(o){o[0]+=a[0],o[1]+=a[1]}),Hw(t,e),Qu(t,{isEnd:!1})}function ZO(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function Yw(t,e,r){var n=qO(t,e);return n&&n!==Ju?n.clipPath(r,t._transform):ot(r)}function Oge(t){var e=np(t[0][0],t[1][0]),r=np(t[0][1],t[1][1]),n=Xc(t[0][0],t[1][0]),i=Xc(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function Nge(t,e,r){if(!(!t._brushType||Vge(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=Ww(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var b2={lineX:Y9(0),lineY:Y9(1),rect:{createCover:function(t,e){function r(n){return n}return UO({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=WO(t);return XO(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){YO(t,e,r,n)},updateCommon:o3,contain:u3},polygon:{createCover:function(t,e){var r=new st;return r.add(new hi({name:"main",style:Uw(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new ui({name:"main",draggable:!0,drift:pt(Fge,t,e),ondragend:pt(Qu,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:Yw(t,e,r)})},updateCommon:o3,contain:u3}};function Y9(t){return{createCover:function(e,r){return UO({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=WO(e),n=np(r[0][t],r[1][t]),i=Xc(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=qO(e,r);if(o!==Ju&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),YO(e,r,l,i)},updateCommon:o3,contain:u3}}const Xw=Ige;function KO(t){return t=Zw(t),function(e){return eP(e,t)}}function JO(t,e){return t=Zw(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function QO(t,e,r){var n=Zw(t);return function(i,a){return n.contain(a[0],a[1])&&!m2(i,e,r)}}function Zw(t){return St.create(t)}var $ge=["axisLine","axisTickLabel","axisName"],Gge=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new Xw(n.getZr())).on("brush",Ge(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!Hge(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new st,this.group.add(this._axisGroup),!!r.get("show")){var s=Wge(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),h=u.width,c=r.axis.dim,f=l.getAxisLayout(c),d=xe({strokeContainThreshold:h},f),v=new es(r,d);W($ge,v.add,v),this._axisGroup.add(v.getGroup()),this._refreshBrushController(d,u,r,s,h,i),yp(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),c=St.create({x:l[0],y:-o/2,width:u,height:o});c.x-=h,c.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:KO(c),isTargetByCursor:QO(c,s,a),getLinearBrushOtherExtent:JO(c,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(qge(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=Ce(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(wr);function Hge(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function qge(t){var e=t.axis;return Ce(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function Wge(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}const Uge=Gge;var Yge={type:"axisAreaSelect",event:"axisAreaSelected"};function Xge(t){t.registerAction(Yge,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var Zge={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function eN(t){t.registerComponentView(cge),t.registerComponentModel(dge),t.registerCoordinateSystem("parallel",Cge),t.registerPreprocessor(age),t.registerComponentModel($9),t.registerComponentView(Uge),Yc(t,"parallel",$9,Zge),Xge(t)}function jge(t){At(eN),t.registerChartView(Kve),t.registerSeriesModel(tge),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,ige)}var Kge=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),Jge=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Kge},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){Ko(this)},e.prototype.downplay=function(){Jo(this)},e}(Tt),Qge=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._focusAdjacencyDisabled=!1,r}return e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this.group,l=r.layoutInfo,u=l.width,h=l.height,c=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(v){var g=new Jge,m=dt(g);m.dataIndex=v.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=v.getModel(),b=y.getModel("lineStyle"),w=b.get("curveness"),T=v.node1.getLayout(),M=v.node1.getModel(),D=M.get("localX"),P=M.get("localY"),O=v.node2.getLayout(),V=v.node2.getModel(),$=V.get("localX"),H=V.get("localY"),j=v.getLayout(),q,G,J,K,se,ae,ce,ye;g.shape.extent=Math.max(1,j.dy),g.shape.orient=d,d==="vertical"?(q=(D!=null?D*u:T.x)+j.sy,G=(P!=null?P*h:T.y)+T.dy,J=($!=null?$*u:O.x)+j.ty,K=H!=null?H*h:O.y,se=q,ae=G*(1-w)+K*w,ce=J,ye=G*w+K*(1-w)):(q=(D!=null?D*u:T.x)+T.dx,G=(P!=null?P*h:T.y)+j.sy,J=$!=null?$*u:O.x,K=(H!=null?H*h:O.y)+j.ty,se=q*(1-w)+J*w,ae=G,ce=q*w+J*(1-w),ye=K),g.setShape({x1:q,y1:G,x2:J,y2:K,cpx1:se,cpy1:ae,cpx2:ce,cpy2:ye}),g.useStyle(b.getItemStyle()),X9(g.style,d,v);var de=""+y.get("value"),De=Yr(y,"edgeLabel");fn(g,De,{labelFetcher:{getFormattedLabel:function(Qe,Ke,et,qe,lt,it){return r.getFormattedLabel(Qe,Ke,"edge",qe,io(lt,De.normal&&De.normal.get("formatter"),de),it)}},labelDataIndex:v.dataIndex,defaultText:de}),g.setTextConfig({position:"inside"});var Ie=y.getModel("emphasis");cn(g,y,"lineStyle",function(Qe){var Ke=Qe.getItemStyle();return X9(Ke,d,v),Ke}),s.add(g),f.setItemGraphicEl(v.dataIndex,g);var Pe=Ie.get("focus");Sr(g,Pe==="adjacency"?v.getAdjacentDataIndices():Pe==="trajectory"?v.getTrajectoryDataIndices():Pe,Ie.get("blurScope"),Ie.get("disabled"))}),o.eachNode(function(v){var g=v.getLayout(),m=v.getModel(),y=m.get("localX"),b=m.get("localY"),w=m.getModel("emphasis"),T=new Rt({shape:{x:y!=null?y*u:g.x,y:b!=null?b*h:g.y,width:g.dx,height:g.dy},style:m.getModel("itemStyle").getItemStyle(),z2:10});fn(T,Yr(m),{labelFetcher:{getFormattedLabel:function(D,P){return r.getFormattedLabel(D,P,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),T.disableLabelAnimation=!0,T.setStyle("fill",v.getVisual("color")),T.setStyle("decal",v.getVisual("style").decal),cn(T,m),s.add(T),c.setItemGraphicEl(v.dataIndex,T),dt(T).dataType="node";var M=w.get("focus");Sr(T,M==="adjacency"?v.getAdjacentDataIndices():M==="trajectory"?v.getTrajectoryDataIndices():M,w.get("blurScope"),w.get("disabled"))}),c.eachItemGraphicEl(function(v,g){var m=c.getItemModel(g);m.get("draggable")&&(v.drift=function(y,b){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=b,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:c.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/h})},v.ondragend=function(){a._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(eme(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(hr);function X9(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");ze(n)&&ze(i)&&(t.fill=new mp(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function eme(t,e,r){var n=new Rt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return fr(n,{shape:{width:t.width+20}},e,r),n}const tme=Qge;var rme=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links,a=r.data||r.nodes,o=r.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new ur(o[l],this,n));if(a&&i){var u=RO(a,i,this,!0,h);return u.data}function h(c,f){c.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getData().getItemLayout(v);if(m){var y=m.depth,b=g.levelModels[y];b&&(d.parentModel=b)}return d}),f.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(v),y=m.node1.getLayout();if(y){var b=y.depth,w=g.levelModels[b];w&&(d.parentModel=w)}return d})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Xr("nameValue",{name:u,value:l,noValue:a(l)})}else{var h=this.getGraph().getNodeByIndex(r),c=h.getLayout().value,f=this.getDataParams(r,i).data.name;return Xr("nameValue",{name:f!=null?f+"":null,value:c,noValue:a(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(pr);const nme=rme;function ime(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=ame(r,e);r.layoutInfo=a;var o=a.width,s=a.height,l=r.getGraph(),u=l.nodes,h=l.edges;sme(u);var c=Jt(u,function(g){return g.getLayout().value===0}),f=c.length!==0?0:r.get("layoutIterations"),d=r.get("orient"),v=r.get("nodeAlign");ome(u,h,n,i,o,s,f,d,v)})}function ame(t,e){return Vr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function ome(t,e,r,n,i,a,o,s,l){lme(t,e,r,i,a,s,l),fme(t,e,a,i,n,o,s),bme(t,s)}function sme(t){W(t,function(e){var r=rl(e.outEdges,oy),n=rl(e.inEdges,oy),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function lme(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],h=[],c=0,f=0;f=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:c},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var b=0;bc-1?d:c-1;o&&o!=="left"&&ume(t,o,a,P);var O=a==="vertical"?(i-r)/P:(n-r)/P;cme(t,O,a)}function tN(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function ume(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,vme(s,l,o),Ib(s,i,r,n,o),xme(s,l,o),Ib(s,i,r,n,o)}function dme(t,e){var r=[],n=e==="vertical"?"y":"x",i=f5(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),W(i.keys,function(a){r.push(i.buckets.get(a))}),r}function pme(t,e,r,n,i,a){var o=1/0;W(t,function(s){var l=s.length,u=0;W(s,function(c){u+=c.getLayout().value});var h=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;h0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]+l.getLayout()[f]+e;var v=i==="vertical"?n:r;if(u=h-e-v,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var d=c-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+e-h,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]}})}function vme(t,e,r){W(t.slice().reverse(),function(n){W(n,function(i){if(i.outEdges.length){var a=rl(i.outEdges,gme,r)/rl(i.outEdges,oy);if(isNaN(a)){var o=i.outEdges.length;a=o?rl(i.outEdges,mme,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-fl(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-fl(i,r))*e;i.setLayout({y:l},!0)}}})})}function gme(t,e){return fl(t.node2,e)*t.getValue()}function mme(t,e){return fl(t.node2,e)}function yme(t,e){return fl(t.node1,e)*t.getValue()}function _me(t,e){return fl(t.node1,e)}function fl(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function oy(t){return t.getValue()}function rl(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),W(n,function(s){var l=new hn({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&W(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function wme(t){t.registerChartView(tme),t.registerSeriesModel(nme),t.registerLayout(ime),t.registerVisual(Sme),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var rN=function(){function t(){}return t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],h=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[h],f=u[1-h],d=[i,a],v=d[h].get("type"),g=d[1-h].get("type"),m=e.data;if(m&&l){var y=[];W(m,function(T,M){var D;Se(T)?(D=T.slice(),T.unshift(M)):Se(T.value)?(D=xe({},T),D.value=D.value.slice(),T.value.unshift(M)):D=T,y.push(D)}),e.data=y}var b=this.defaultValueDimensions,w=[{name:c,type:X1(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:X1(g),dimsDef:b.slice()}];return pf(this,{coordDimensions:w,dimensionsCount:b.length+1,encodeDefaulter:pt(kP,w,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),nN=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(pr);Or(nN,rN,!0);const Cme=nN;var Ame=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var h=a.getItemLayout(u),c=Z9(h,a,u,l,!0);a.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,h){var c=s.getItemGraphicEl(h);if(!a.hasValue(u)){o.remove(c);return}var f=a.getItemLayout(u);c?(ba(c),iN(f,c,a,u)):c=Z9(f,a,u,l),o.add(c),a.setItemGraphicEl(u,c)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(hr),Tme=function(){function t(){}return t}(),kme=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Tme},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var T=[y,w];n.push(T)}}}return{boxData:r,outliers:n}}var Rme={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Dn){var n="";Yt(n)}var i=Pme(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Fme(t){t.registerSeriesModel(Cme),t.registerChartView(Mme),t.registerLayout(Lme),t.registerTransform(Rme)}var Ome=["color","borderColor"],Nme=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){vl(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(h){if(n.hasValue(h)){var c=n.getItemLayout(h);if(s&&j9(u,c))return;var f=Bb(c,h,!0);fr(f,{shape:{points:c.ends}},r,h),Pb(f,n,h,o),a.add(f),n.setItemGraphicEl(h,f)}}).update(function(h,c){var f=i.getItemGraphicEl(c);if(!n.hasValue(h)){a.remove(f);return}var d=n.getItemLayout(h);if(s&&j9(u,d)){a.remove(f);return}f?(Gt(f,{shape:{points:d.ends}},r,h),ba(f)):f=Bb(d),Pb(f,n,h,o),a.add(f),n.setItemGraphicEl(h,f)}).remove(function(h){var c=i.getItemGraphicEl(h);c&&a.remove(c)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),K9(r,this.group);var n=r.get("clip",!0)?g2(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=Bb(s);Pb(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){K9(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(hr),zme=function(){function t(){}return t}(),Vme=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new zme},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(Tt);function Bb(t,e,r){var n=t.ends;return new Vme({shape:{points:r?$me(n,t):n},z2:100})}function j9(t,e){for(var r=!0,n=0;n0?"borderColor":"borderColor0"])||r.get(["itemStyle",t>0?"color":"color0"]);t===0&&(i=r.get(["itemStyle","borderColorDoji"]));var a=r.getModel("itemStyle").getItemStyle(Ome);e.useStyle(a),e.style.fill=null,e.style.stroke=i}const Hme=Nme;var aN=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(pr);Or(aN,rN,!0);const qme=aN;function Wme(t){!t||!Se(t.series)||W(t.series,function(e){nt(e)&&e.type==="k"&&(e.type="candlestick")})}var Ume=["itemStyle","borderColor"],Yme=["itemStyle","borderColor0"],Xme=["itemStyle","borderColorDoji"],Zme=["itemStyle","color"],jme=["itemStyle","color0"],Kme={seriesType:"candlestick",plan:cf(),performRawSeries:!0,reset:function(t,e){function r(a,o){return o.get(a>0?Zme:jme)}function n(a,o){return o.get(a===0?Xme:a>0?Ume:Yme)}if(!e.isSeriesFiltered(t)){var i=t.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,h=l.getItemStyle();h.fill=r(u,l),h.stroke=n(u,l)||h.fill;var c=o.ensureUniqueItemVisual(s,"style");xe(c,h)}}}}}};const Jme=Kme;var Qme={seriesType:"candlestick",plan:cf(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),n=e1e(t,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=Ce(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],h=l[1],c=l[2],f=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:t.pipelineContext.large?v:d};function d(g,m){for(var y,b=m.getStore();(y=g.next())!=null;){var w=b.get(s,y),T=b.get(u,y),M=b.get(h,y),D=b.get(c,y),P=b.get(f,y),O=Math.min(T,M),V=Math.max(T,M),$=se(O,w),H=se(V,w),j=se(D,w),q=se(P,w),G=[];ae(G,H,0),ae(G,$,1),G.push(ye(q),ye(H),ye(j),ye($));var J=m.getItemModel(y),K=!!J.get(["itemStyle","borderColorDoji"]);m.setItemLayout(y,{sign:J9(b,y,T,M,h,K),initBaseline:T>M?H[a]:$[a],ends:G,brushRect:ce(D,P,w)})}function se(de,De){var Ie=[];return Ie[i]=De,Ie[a]=de,isNaN(De)||isNaN(de)?[NaN,NaN]:e.dataToPoint(Ie)}function ae(de,De,Ie){var Pe=De.slice(),Qe=De.slice();Pe[i]=zm(Pe[i]+n/2,1,!1),Qe[i]=zm(Qe[i]-n/2,1,!0),Ie?de.push(Pe,Qe):de.push(Qe,Pe)}function ce(de,De,Ie){var Pe=se(de,Ie),Qe=se(De,Ie);return Pe[i]-=n/2,Qe[i]-=n/2,{x:Pe[0],y:Pe[1],width:n,height:Qe[1]-Pe[1]}}function ye(de){return de[i]=zm(de[i],1),de}}function v(g,m){for(var y=Qa(g.count*4),b=0,w,T=[],M=[],D,P=m.getStore(),O=!!t.get(["itemStyle","borderColorDoji"]);(D=g.next())!=null;){var V=P.get(s,D),$=P.get(u,D),H=P.get(h,D),j=P.get(c,D),q=P.get(f,D);if(isNaN(V)||isNaN(j)||isNaN(q)){y[b++]=NaN,b+=3;continue}y[b++]=J9(P,D,$,H,h,O),T[i]=V,T[a]=j,w=e.dataToPoint(T,null,M),y[b++]=w?w[0]:NaN,y[b++]=w?w[1]:NaN,T[a]=q,w=e.dataToPoint(T,null,M),y[b++]=w?w[1]:NaN}m.setLayout("largePoints",y)}}};function J9(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function e1e(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=Be(xt(t.get("barMaxWidth"),i),i),o=Be(xt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?Be(s,i):Math.max(Math.min(i/2,a),o)}const t1e=Qme;function r1e(t){t.registerChartView(Hme),t.registerSeriesModel(qme),t.registerPreprocessor(Wme),t.registerVisual(Jme),t.registerLayout(t1e)}function Q9(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var n1e=function(t){pe(e,t);function e(r,n){var i=t.call(this)||this,a=new Tp(r,n),o=new st;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;Je(c)?f=c(i):f=c,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return $s(r.__p1,r.__cp1)+$s(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Kr,h=Q4;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var c=r.__t<1?h(n[0],a[0],i[0],o):h(i[0],a[0],n[0],1-o),f=r.__t<1?h(n[1],a[1],i[1],o):h(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var h=(n-a[l])/(a[l+1]-a[l]),c=i[l],f=i[l+1];r.x=c[0]*(1-h)+h*f[0],r.y=c[1]*(1-h)+h*f[1];var d=r.__t<1?f[0]-c[0]:c[0]-f[0],v=r.__t<1?f[1]-c[1]:c[1]-f[1];r.rotation=-Math.atan2(v,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(oN);const d1e=f1e;var p1e=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),v1e=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new p1e},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+c)/2-(h-f)*a,v=(h+f)/2-(c-u)*a;r.quadraticCurveTo(d,v,c,f)}else r.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var c=a[u++],f=a[u++],d=1;d0){var m=(c+v)/2-(f-g)*o,y=(f+g)/2-(v-c)*o;if(dB(c,f,m,y,v,g,s,r,n))return l}else if(Os(c,f,v,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const m1e=g1e;var y1e={seriesType:"lines",plan:cf(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,h=i.start;h0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var c=r.get("clip",!0)&&g2(r.coordinateSystem,!1,r);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=lN.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new m1e:new Gw(o?a?d1e:sN:a?oN:$w),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(hr);const x1e=_1e;var b1e=typeof Uint32Array>"u"?Array:Uint32Array,S1e=typeof Float64Array>"u"?Array:Float64Array;function ek(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=Ce(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),_S([i,r[0],r[1]])}))}var w1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],ek(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(ek(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=C1(this._flatCoords,n.flatCoords),this._flatCoordsOffset=C1(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(pr);const C1e=w1e;function Jg(t){return t instanceof Array||(t=[t,t]),t}var A1e={seriesType:"lines",reset:function(t){var e=Jg(t.get("symbol")),r=Jg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Jg(s.getShallow("symbol",!0)),u=Jg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};const T1e=A1e;function k1e(t){t.registerChartView(x1e),t.registerSeriesModel(C1e),t.registerLayout(lN),t.registerVisual(T1e)}var D1e=256,M1e=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ol.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),h=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),d=e.length;c.width=r,c.height=n;for(var v=0;v0){var j=o(w)?l:u;w>0&&(w=w*$+O),M[D++]=j[H],M[D++]=j[H+1],M[D++]=j[H+2],M[D++]=j[H+3]*w*256}else D+=4}return f.putImageData(T,0,0),c},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ol.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();const L1e=M1e;function E1e(t,e,r){var n=t[1]-t[0];e=Ce(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function tk(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var B1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(r,i,0,r.getData().count()):tk(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(tk(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){vl(this._progressiveEls||this.group,r)},e.prototype._renderOnCartesianAndCalendar=function(r,n,i,a,o){var s=r.coordinateSystem,l=ah(s,"cartesian2d"),u,h,c,f;if(l){var d=s.getAxis("x"),v=s.getAxis("y");u=d.getBandWidth()+.5,h=v.getBandWidth()+.5,c=d.scale.getExtent(),f=v.scale.getExtent()}for(var g=this.group,m=r.getData(),y=r.getModel(["emphasis","itemStyle"]).getItemStyle(),b=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),M=Yr(r),D=r.getModel("emphasis"),P=D.get("focus"),O=D.get("blurScope"),V=D.get("disabled"),$=l?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],H=i;Hc[1]||Jf[1])continue;var K=s.dataToPoint([G,J]);j=new Rt({shape:{x:K[0]-u/2,y:K[1]-h/2,width:u,height:h},style:q})}else{if(isNaN(m.get($[1],H)))continue;j=new Rt({z2:1,shape:s.dataToRect([m.get($[0],H)]).contentShape,style:q})}if(m.hasItemOption){var se=m.getItemModel(H),ae=se.getModel("emphasis");y=ae.getModel("itemStyle").getItemStyle(),b=se.getModel(["blur","itemStyle"]).getItemStyle(),w=se.getModel(["select","itemStyle"]).getItemStyle(),T=se.get(["itemStyle","borderRadius"]),P=ae.get("focus"),O=ae.get("blurScope"),V=ae.get("disabled"),M=Yr(se)}j.shape.r=T;var ce=r.getRawValue(H),ye="-";ce&&ce[2]!=null&&(ye=ce[2]+""),fn(j,M,{labelFetcher:r,labelDataIndex:H,defaultOpacity:q.opacity,defaultText:ye}),j.ensureState("emphasis").style=y,j.ensureState("blur").style=b,j.ensureState("select").style=w,Sr(j,P,O,V),j.incremental=o,o&&(j.states.emphasis.hoverLayer=!0),g.add(j),m.setItemGraphicEl(H,j),this._progressiveEls&&this._progressiveEls.push(j)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new L1e;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var h=r.getViewRect().clone(),c=r.getRoamTransform();h.applyTransform(c);var f=Math.max(h.x,0),d=Math.max(h.y,0),v=Math.min(h.width+h.x,a.getWidth()),g=Math.min(h.height+h.y,a.getHeight()),m=v-f,y=g-d,b=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],w=l.mapArray(b,function(P,O,V){var $=r.dataToPoint([P,O]);return $[0]-=f,$[1]-=d,$.push(V),$}),T=i.getExtent(),M=i.type==="visualMap.continuous"?I1e(T,i.option.range):E1e(T,i.getPieceList(),i.option.selected);u.update(w,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},M);var D=new dn({style:{width:m,height:y,x:f,y:d,image:u.canvas},silent:!0});this.group.add(D)},e.type="heatmap",e}(hr);const P1e=B1e;var R1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return ns(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=bp.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(pr);const F1e=R1e;function O1e(t){t.registerChartView(P1e),t.registerSeriesModel(F1e)}var N1e=["itemStyle","borderWidth"],rk=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Ob=new fo,z1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),c=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:h,valueDim:rk[+h],categoryDim:rk[1-+h]};return o.diff(s).add(function(d){if(o.hasValue(d)){var v=ik(o,d),g=nk(o,d,v,f),m=ak(o,f,g);o.setItemGraphicEl(d,m),a.add(m),sk(m,f,g)}}).update(function(d,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(d)){a.remove(g);return}var m=ik(o,d),y=nk(o,d,m,f),b=pN(o,y);g&&b!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(d,null),g=null),g?U1e(g,f,y):g=ak(o,f,y,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=y,a.add(g),sk(g,f,y)}).remove(function(d){var v=s.getItemGraphicEl(d);v&&ok(s,d,v.__pictorialSymbolMeta.animationModel,v)}).execute(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){ok(a,dt(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(hr);function nk(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=r.get("symbolPatternSize")||2,c=r.isAnimationEnabled(),f={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?r:null,hoverScale:c&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};V1e(r,a,i,n,f),$1e(t,e,i,a,o,f.boundingLength,f.pxSign,h,n,f),G1e(r,f.symbolScale,u,n,f);var d=f.symbolSize,v=nh(r.get("symbolOffset"),d);return H1e(r,d,i,a,o,v,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function V1e(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),h;if(Se(o)){var c=[Nb(s,o[0])-l,Nb(s,o[1])-l];c[1]0?1:-1}function Nb(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function $1e(t,e,r,n,i,a,o,s,l,u){var h=l.valueDim,c=l.categoryDim,f=Math.abs(r[c.wh]),d=t.getItemVisual(e,"symbolSize"),v;Se(d)?v=d.slice():d==null?v=["100%","100%"]:v=[d,d],v[c.index]=Be(v[c.index],f),v[h.index]=Be(v[h.index],n?f:Math.abs(a)),u.symbolSize=v;var g=u.symbolScale=[v[0]/s,v[1]/s];g[h.index]*=(l.isHorizontal?-1:1)*o}function G1e(t,e,r,n,i){var a=t.get(N1e)||0;a&&(Ob.attr({scaleX:e[0],scaleY:e[1],rotation:r}),Ob.updateTransform(),a/=Ob.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function H1e(t,e,r,n,i,a,o,s,l,u,h,c){var f=h.categoryDim,d=h.valueDim,v=c.pxSign,g=Math.max(e[d.index]+s,0),m=g;if(n){var y=Math.abs(l),b=Qr(t.get("symbolMargin"),"15%")+"",w=!1;b.lastIndexOf("!")===b.length-1&&(w=!0,b=b.slice(0,b.length-1));var T=Be(b,e[d.index]),M=Math.max(g+T*2,0),D=w?0:T*2,P=JI(n),O=P?n:lk((y+D)/M),V=y-O*g;T=V/2/(w?O:Math.max(O-1,1)),M=g+T*2,D=w?0:T*2,!P&&n!=="fixed"&&(O=u?lk((Math.abs(u)+D)/M):0),m=O*M-D,c.repeatTimes=O,c.symbolMargin=T}var $=v*(m/2),H=c.pathPosition=[];H[f.index]=r[f.wh]/2,H[d.index]=o==="start"?$:o==="end"?l-$:l/2,a&&(H[0]+=a[0],H[1]+=a[1]);var j=c.bundlePosition=[];j[f.index]=r[f.xy],j[d.index]=r[d.xy];var q=c.barRectShape=xe({},r);q[d.wh]=v*Math.max(Math.abs(r[d.wh]),Math.abs(H[d.index]+$)),q[f.wh]=r[f.wh];var G=c.clipShape={};G[f.xy]=-r[f.xy],G[f.wh]=h.ecSize[f.wh],G[d.xy]=0,G[d.wh]=r[d.wh]}function uN(t){var e=t.symbolPatternSize,r=Fr(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function hN(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,h=0,c=a[e.valueDim.index]+o+r.symbolMargin*2;for(jw(t,function(g){g.__pictorialAnimationIndex=h,g.__pictorialRepeatTimes=u,h0:y<0)&&(b=u-1-g),m[l.index]=c*(b-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function cN(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?Bc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=uN(r),i.add(a),Bc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function fN(t,e,r){var n=xe({},e.barRectShape),i=t.__pictorialBarRect;i?Bc(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new Rt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function dN(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=xe({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Gt(i,{shape:a},s,l);else{a[o.wh]=0,i=new Rt({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],xp[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function ik(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=q1e,r.isAnimationEnabled=W1e,r}function q1e(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function W1e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ak(t,e,r,n){var i=new st,a=new st;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?hN(i,e,r):cN(i,e,r),fN(i,r,n),dN(i,e,r,n),i.__pictorialShapeStr=pN(t,r),i.__pictorialSymbolMeta=r,i}function U1e(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Gt(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?hN(t,e,r,!0):cN(t,e,r,!0),fN(t,r,!0),dN(t,e,r,!0)}function ok(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];jw(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),W(a,function(o){ll(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function pN(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function jw(t,e,r){W(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function Bc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&xp[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function sk(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),h=a.get("focus"),c=a.get("blurScope"),f=a.get("scale");jw(t,function(g){if(g instanceof dn){var m=g.style;g.useStyle(xe({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,f&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=e.valueDim.posDesc[+(r.boundingLength>0)],v=t.__pictorialBarRect;fn(v,Yr(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Uc(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),Sr(t,h,c,a.get("disabled"))}function lk(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const Y1e=z1e;var X1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=gl(Q1.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Q1);const Z1e=X1e;function j1e(t){t.registerChartView(Y1e),t.registerSeriesModel(Z1e),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,pt(ZR,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,jR("pictorialBar"))}var K1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),h=u.rect,c=u.boundaryGap;s.x=0,s.y=h.y+c[0];function f(m){return m.name}var d=new Qo(this._layersSeries||[],l,f,f),v=[];d.add(Ge(g,this,"add")).update(Ge(g,this,"update")).remove(Ge(g,this,"remove")).execute();function g(m,y,b){var w=o._layers;if(m==="remove"){s.remove(w[y]);return}for(var T=[],M=[],D,P=l[y].indices,O=0;Oa&&(a=s),n.push(s)}for(var u=0;ua&&(a=c)}return{y0:i,max:a}}function iye(t){t.registerChartView(Q1e),t.registerSeriesModel(tye),t.registerLayout(rye),t.registerProcessor(Mp("themeRiver"))}var aye=2,oye=4,sye=function(t){pe(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=aye,o.textConfig={inside:!0},dt(o).seriesIndex=n.seriesIndex;var s=new Vt({z2:oye,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;dt(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),h=n.getLayout(),c=xe({},h);c.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=qc(d,o));var v=Eu(l.getModel("itemStyle"),c,!0);xe(c,v),W(Un,function(b){var w=s.ensureState(b),T=l.getModel([b,"itemStyle"]);w.style=T.getItemStyle();var M=Eu(T,c);M&&(w.shape=M)}),r?(s.setShape(c),s.shape.r=h.r0,fr(s,{shape:{r:h.r}},i,n.dataIndex)):(Gt(s,{shape:c},i),ba(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;Sr(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),c=this,f=c.getTextContent(),d=this.node.dataIndex,v=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(v!=null&&Math.abs(s)Math.PI/2?"right":"left"):!j||j==="center"?(s===2*Math.PI&&o.r0===0?$=0:$=(o.r+o.r0)/2,j="center"):j==="left"?($=o.r0+H,l>Math.PI/2&&(j="right")):j==="right"&&($=o.r-H,l>Math.PI/2&&(j="left")),T.style.align=j,T.style.verticalAlign=m(b,"verticalAlign")||"middle",T.x=$*u+o.cx,T.y=$*h+o.cy;var q=m(b,"rotate"),G=0;q==="radial"?(G=pa(-l),G>Math.PI/2&&GMath.PI/2?G-=Math.PI:G<-Math.PI/2&&(G+=Math.PI)):$t(q)&&(G=q*Math.PI/180),T.rotation=pa(G)});function m(y,b){var w=y.get(b);return w??a.get(b)}f.dirtyStyle()},e}(li);const hk=sye;var h3="sunburstRootToNode",ck="sunburstHighlight",lye="sunburstUnhighlight";function uye(t){t.registerAction({type:h3,update:"updateView"},function(e,r){r.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i,a){var o=Qd(e,[h3],i);if(o){var s=i.getViewRoot();s&&(e.direction=Rw(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),t.registerAction({type:ck,update:"none"},function(e,r,n){e=xe({},e),r.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(a){var o=Qd(e,[ck],a);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(xe(e,{type:"highlight"}))}),t.registerAction({type:lye,update:"updateView"},function(e,r,n){e=xe({},e),n.dispatchAction(xe(e,{type:"downplay"}))})}var hye=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),h=this.group,c=r.get("renderLabelForZeroData"),f=[];u.eachNode(function(b){f.push(b)});var d=this._oldChildren||[];v(f,d),y(l,u),this._initEvents(),this._oldChildren=f;function v(b,w){if(b.length===0&&w.length===0)return;new Qo(w,b,T,T).add(M).update(M).remove(pt(M,null)).execute();function T(D){return D.getId()}function M(D,P){var O=D==null?null:b[D],V=P==null?null:w[P];g(O,V)}}function g(b,w){if(!c&&b&&!b.getValue()&&(b=null),b!==l&&w!==l){if(w&&w.piece)b?(w.piece.updateData(!1,b,r,n,i),s.setItemGraphicEl(b.dataIndex,w.piece)):m(w);else if(b){var T=new hk(b,r,n,i);h.add(T),s.setItemGraphicEl(b.dataIndex,T)}}}function m(b){b&&b.piece&&(h.remove(b.piece),b.piece=null)}function y(b,w){w.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,b,r,n,i):(o.virtualPiece=new hk(b,r,n,i),h.add(o.virtualPiece)),w.piece.off("click"),o.virtualPiece.on("click",function(T){o._rootToNode(w.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";V1(u,h)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:h3,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(hr);const cye=hye;var fye=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};vN(i);var a=this._levelModels=Ce(r.levels||[],function(l){return new ur(l,this,n)},this),o=Pw.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var c=o.getNodeByDataIndex(h),f=a[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=_2(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){_O(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(pr);function vN(t){var e=0;W(t.children,function(n){vN(n);var i=n.value;Se(i)&&(i=i[0]),e+=i});var r=t.value;Se(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),Se(t.value)?t.value[0]=r:t.value=r}const dye=fye;var fk=Math.PI/180;function pye(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");Se(a)||(a=[0,a]),Se(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=Be(i[0],o),h=Be(i[1],s),c=Be(a[0],l/2),f=Be(a[1],l/2),d=-n.get("startAngle")*fk,v=n.get("minAngle")*fk,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,b=n.get("sort");b!=null&&gN(m,b);var w=0;W(m.children,function(K){!isNaN(K.getValue())&&w++});var T=m.getValue(),M=Math.PI/(T||w)*2,D=m.depth>0,P=m.height-(D?-1:1),O=(f-c)/(P||1),V=n.get("clockwise"),$=n.get("stillShowZeroSum"),H=V?1:-1,j=function(K,se){if(K){var ae=se;if(K!==g){var ce=K.getValue(),ye=T===0&&$?M:ce*M;ye1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&ze(s)&&(s=r5(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");xe(u,l)})})}function mye(t){t.registerChartView(cye),t.registerSeriesModel(dye),t.registerLayout(pt(pye,"sunburst")),t.registerProcessor(pt(Mp,"sunburst")),t.registerVisual(gye),uye(t)}var dk={color:"fill",borderColor:"stroke"},yye={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Wo=Ft(),_ye=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return ns(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=Wo(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(pr);const xye=_ye;function bye(t,e){return e=e||[0,0],Ce(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function Sye(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:Ge(bye,t)}}}function wye(t,e){return e=e||[0,0],Ce([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function Cye(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:Ge(wye,t)}}}function Aye(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function Tye(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:Ge(Aye,t)}}}function kye(t,e){return e=e||[0,0],Ce(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function Dye(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Ge(kye,t)}}}function Mye(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)}}}}function mN(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||He(t,"text")))}function yN(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},He(n,"text")&&(o.text=n.text),He(n,"rich")&&(o.rich=n.rich),He(n,"textFill")&&(o.fill=n.textFill),He(n,"textStroke")&&(o.stroke=n.textStroke),He(n,"fontFamily")&&(o.fontFamily=n.fontFamily),He(n,"fontSize")&&(o.fontSize=n.fontSize),He(n,"fontStyle")&&(o.fontStyle=n.fontStyle),He(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=He(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),He(n,"textPosition")&&(i.position=n.textPosition),He(n,"textOffset")&&(i.offset=n.textOffset),He(n,"textRotation")&&(i.rotation=n.textRotation),He(n,"textDistance")&&(i.distance=n.textDistance)}return pk(o,t),W(o.rich,function(l){pk(l,l)}),{textConfig:i,textContent:a}}function pk(t,e){e&&(e.font=e.textFont||e.font,He(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),He(e,"textAlign")&&(t.align=e.textAlign),He(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),He(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),He(e,"textWidth")&&(t.width=e.textWidth),He(e,"textHeight")&&(t.height=e.textHeight),He(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),He(e,"textPadding")&&(t.padding=e.textPadding),He(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),He(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),He(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),He(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),He(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),He(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),He(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function vk(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||"#000";gk(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||"#fff",!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||"#000"),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,W(e.rich,function(s){gk(s,s)}),n}function gk(t,e){e&&(He(e,"fill")&&(t.textFill=e.fill),He(e,"stroke")&&(t.textStroke=e.fill),He(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),He(e,"font")&&(t.font=e.font),He(e,"fontStyle")&&(t.fontStyle=e.fontStyle),He(e,"fontWeight")&&(t.fontWeight=e.fontWeight),He(e,"fontSize")&&(t.fontSize=e.fontSize),He(e,"fontFamily")&&(t.fontFamily=e.fontFamily),He(e,"align")&&(t.textAlign=e.align),He(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),He(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),He(e,"width")&&(t.textWidth=e.width),He(e,"height")&&(t.textHeight=e.height),He(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),He(e,"padding")&&(t.textPadding=e.padding),He(e,"borderColor")&&(t.textBorderColor=e.borderColor),He(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),He(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),He(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),He(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),He(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),He(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),He(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),He(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),He(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),He(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var _N={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},mk=Lt(_N);so(uo,function(t,e){return t[e]=1,t},{});uo.join(", ");var sy=["","style","shape","extra"],Zc=Ft();function Kw(t,e,r,n,i){var a=t+"Animation",o=rf(t,n,i)||{},s=Zc(e).userDuring;return o.duration>0&&(o.during=s?Ge(Pye,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),xe(o,r[a]),o}function Wm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=Zc(t),u=e.style;l.userDuring=e.during;var h={},c={};if(Fye(t,e,c),_k("shape",e,c),_k("extra",e,c),!a&&s&&(Rye(t,e,h),yk("shape",t,e,h),yk("extra",t,e,h),Oye(t,e,u,h)),c.style=u,Lye(t,c,o),Iye(t,e),s)if(a){var f={};W(sy,function(v){var g=v?e[v]:e;g&&g.enterFrom&&(v&&(f[v]=f[v]||{}),xe(v?f[v]:f,g.enterFrom))});var d=Kw("enter",t,e,r,i);d.duration>0&&t.animateFrom(f,d)}else Eye(t,e,i||0,r,h);xN(t,e),u?t.dirty():t.markRedraw()}function xN(t,e){for(var r=Zc(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function Iye(t,e){He(e,"silent")&&(t.silent=e.silent),He(e,"ignore")&&(t.ignore=e.ignore),t instanceof ji&&He(e,"invisible")&&(t.invisible=e.invisible),t instanceof Tt&&He(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Wa={},Bye={setTransform:function(t,e){return Wa.el[t]=e,this},getTransform:function(t){return Wa.el[t]},setShape:function(t,e){var r=Wa.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Wa.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Wa.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Wa.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Wa.el.extra||(Wa.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Wa.el.extra;if(e)return e[t]}};function Pye(){var t=this,e=t.el;if(e){var r=Zc(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Wa.el=e,n(Bye)}}function yk(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),Hu(l))xe(o,a);else for(var u=er(l),h=0;h=0){!o&&(o=n[t]={});for(var d=Lt(a),h=0;h=0)){var f=t.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var v=Lt(r),u=0;u=0?e.getStore().get(se,J):void 0}var ae=e.get(K.name,J),ce=K&&K.ordinalMeta;return ce?ce.categories[ae]:ae}function D(G,J){J==null&&(J=u);var K=e.getItemVisual(J,"style"),se=K&&K.fill,ae=K&&K.opacity,ce=b(J,Xs).getItemStyle();se!=null&&(ce.fill=se),ae!=null&&(ce.opacity=ae);var ye={inheritColor:ze(se)?se:"#000"},de=w(J,Xs),De=lr(de,null,ye,!1,!0);De.text=de.getShallow("show")?xt(t.getFormattedLabel(J,Xs),Uc(e,J)):null;var Ie=N1(de,ye,!1);return V(G,ce),ce=vk(ce,De,Ie),G&&O(ce,G),ce.legacy=!0,ce}function P(G,J){J==null&&(J=u);var K=b(J,Uo).getItemStyle(),se=w(J,Uo),ae=lr(se,null,null,!0,!0);ae.text=se.getShallow("show")?io(t.getFormattedLabel(J,Uo),t.getFormattedLabel(J,Xs),Uc(e,J)):null;var ce=N1(se,null,!0);return V(G,K),K=vk(K,ae,ce),G&&O(K,G),K.legacy=!0,K}function O(G,J){for(var K in J)He(J,K)&&(G[K]=J[K])}function V(G,J){G&&(G.textFill&&(J.textFill=G.textFill),G.textPosition&&(J.textPosition=G.textPosition))}function $(G,J){if(J==null&&(J=u),He(dk,G)){var K=e.getItemVisual(J,"style");return K?K[dk[G]]:null}if(He(yye,G))return e.getItemVisual(J,G)}function H(G){if(a.type==="cartesian2d"){var J=a.getBaseAxis();return jue(rt({axis:J},G))}}function j(){return r.getCurrentSeriesIndices()}function q(G){return nP(G,r)}}function Xye(t){var e={};return W(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function Gb(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=r6(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&Sr(s,n.focus,n.blurScope,n.emphasisDisabled),s}function r6(t,e,r,n,i,a){var o=-1,s=e;e&&CN(e,n,i)&&(o=Ct(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=e6(n),s&&Hye(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Pi.normal.cfg=Pi.normal.conOpt=Pi.emphasis.cfg=Pi.emphasis.conOpt=Pi.blur.cfg=Pi.blur.conOpt=Pi.select.cfg=Pi.select.conOpt=null,Pi.isLegacy=!1,jye(u,r,n,i,l,Pi),Zye(u,r,n,i,l),t6(t,u,r,n,Pi,i,l),He(n,"info")&&(Wo(u).info=n.info);for(var h=0;h=0?a.replaceAt(u,o):a.add(u),u}function CN(t,e,r){var n=Wo(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&t2e(a)&&AN(a)!==n.customPathData||i==="image"&&He(o,"image")&&o.image!==n.customImagePath}function Zye(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&CN(o,a,n)&&(o=null),o||(o=e6(a),t.setClipPath(o)),t6(null,o,e,a,null,n,i)}}function jye(t,e,r,n,i,a){if(!t.isGroup){bk(r,null,a),bk(r,Uo,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=t.getTextContent();if(o===!1)h&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=e6(o),t.setTextContent(h)),t6(null,h,e,o,null,n,i);for(var c=o&&o.style,f=0;f=h;d--){var v=e.childAt(d);Jye(e,v,i)}}}function Jye(t,e,r){e&&S2(e,Wo(t).option,r)}function Qye(t){new Qo(t.oldChildren,t.newChildren,Sk,Sk,t).add(wk).update(wk).remove(e2e).execute()}function Sk(t,e){var r=t&&t.name;return r??$ye+e}function wk(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;r6(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function e2e(t){var e=this.context,r=e.oldChildren[t];r&&S2(r,Wo(r).option,e.seriesModel)}function AN(t){return t&&(t.pathData||t.d)}function t2e(t){return t&&(He(t,"pathData")||He(t,"d"))}function r2e(t){t.registerChartView(Wye),t.registerSeriesModel(xye)}var xu=Ft(),Ck=ot,Hb=Ge,n2e=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new st,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var f=pt(Ak,r,c);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}kk(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=kw(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=xu(e).pointerEl=new xp[a.type](Ck(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=xu(e).labelEl=new Vt(Ck(r.label));e.add(a),Tk(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=xu(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=xu(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),Tk(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=_p(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Zo(u.event)},onmousedown:Hb(this._onHandleDragMove,this,0,0),drift:Hb(this._onHandleDragMove,this),ondragend:Hb(this._onHandleDragEnd,this)}),n.add(i)),kk(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");Se(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,ff(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){Ak(this._axisPointerModel,!r&&this._moveAnimation,this._handle,qb(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(qb(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(qb(i)),xu(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Ud(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function Ak(t,e,r,n){TN(xu(r).lastProp,n)||(xu(r).lastProp=n,e?Gt(r,n,t):(r.stopAnimation(),r.attr(n)))}function TN(t,e){if(nt(t)&&nt(e)){var r=!0;return W(e,function(n,i){r=r&&TN(t[i],n)}),!!r}else return t===e}function Tk(t,e){t[e.get(["label","show"])?"show":"hide"]()}function qb(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function kk(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}const i6=n2e;function a6(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function kN(t,e,r,n,i){var a=r.get("value"),o=DN(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=sf(s.get("padding")||0),u=s.getFont(),h=pp(o,u),c=i.position,f=h.width+l[1]+l[3],d=h.height+l[0]+l[2],v=i.align;v==="right"&&(c[0]-=f),v==="center"&&(c[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),i2e(c,f,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:lr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function i2e(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function DN(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:yw(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};W(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,c=u&&u.getDataParams(h);c&&s.seriesData.push(c)}),ze(o)?a=o.replace("{value}",a):Je(o)&&(a=o(s))}return a}function o6(t,e,r){var n=Zi();return th(n,n,r.rotation),lo(n,n,r.position),ma([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function MN(t,e,r,n,i,a){var o=es.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),kN(e,n,i,a,{position:o6(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function s6(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function LN(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function Dk(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var a2e=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),h=Mk(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=a6(a),d=o2e[u](s,c,h);d.style=f,r.graphicKey=d.type,r.pointer=d}var v=X5(l.model,i);MN(n,r,v,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=X5(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=o6(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Mk(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,c=[r.x,r.y];c[h]+=n[h],c[h]=Math.min(l[1],c[h]),c[h]=Math.max(l[0],c[h]);var f=(u[1]+u[0])/2,d=[f,f];d[h]=c[h];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[h]}},e}(i6);function Mk(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var o2e={line:function(t,e,r){var n=s6([e,r[0]],[e,r[1]],Lk(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:LN([e-n/2,r[0]],[n,i],Lk(t))}}};function Lk(t){return t.dim==="x"?0:1}const s2e=a2e;var l2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Nt);const u2e=l2e;var Vo=Ft(),h2e=W;function EN(t,e,r){if(!zt.node){var n=e.getZr();Vo(n).records||(Vo(n).records={}),c2e(n,e);var i=Vo(n).records[t]||(Vo(n).records[t]={});i.handler=r}}function c2e(t,e){if(Vo(t).initialized)return;Vo(t).initialized=!0,r("click",pt(Ek,"click")),r("mousemove",pt(Ek,"mousemove")),r("globalout",d2e);function r(n,i){t.on(n,function(a){var o=p2e(e);h2e(Vo(t).records,function(s){s&&i(s,a,o.dispatchAction)}),f2e(o.pendings,e)})}}function f2e(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function d2e(t,e,r){t.handler("leave",null,r)}function Ek(t,e,r,n){e.handler(t,r,n)}function p2e(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function d3(t,e){if(!zt.node){var r=e.getZr(),n=(Vo(r).records||{})[t];n&&(Vo(r).records[t]=null)}}var v2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";EN("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){d3("axisPointer",n)},e.prototype.dispose=function(r,n){d3("axisPointer",n)},e.type="axisPointer",e}(wr);const g2e=v2e;function IN(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Xu(a,t);if(o==null||o<0||Se(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,f=u.dim,d=c==="x"||c==="radius"?1:0,v=a.mapDimension(f),g=[];g[d]=a.get(v,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(Ce(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var Ik=Ft();function m2e(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||Ge(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Um(i)&&(i=IN({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Um(i),u=a.axesInfo,h=s.axesInfo,c=n==="leave"||Um(i),f={},d={},v={list:[],map:{}},g={showPointer:pt(_2e,d),showTooltip:pt(x2e,v)};W(s.coordSysMap,function(y,b){var w=l||y.containPoint(i);W(s.coordSysAxesInfo[b],function(T,M){var D=T.axis,P=C2e(u,T);if(!c&&w&&(!u||P)){var O=P&&P.value;O==null&&!l&&(O=D.pointToData(i)),O!=null&&Bk(T,O,g,!1,f)}})});var m={};return W(h,function(y,b){var w=y.linkGroup;w&&!d[b]&&W(w.axesInfo,function(T,M){var D=d[M];if(T!==y&&D){var P=D.value;w.mapper&&(P=y.axis.scale.parse(w.mapper(P,Pk(T),Pk(y)))),m[y.key]=P}})}),W(m,function(y,b){Bk(h[b],y,g,!0,f)}),b2e(d,h,f),S2e(v,i,t,o),w2e(h,o,r),f}}function Bk(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=y2e(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&xe(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function y2e(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return W(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(n),c,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(h,t,r);f=d.dataIndices,c=d.nestestValue}else{if(f=l.getData().indicesOfNearest(h[0],t,r.type==="category"?.5:null),!f.length)return;c=l.getData().get(h[0],f[0])}if(!(c==null||!isFinite(c))){var v=t-c,g=Math.abs(v);g<=o&&((g=0&&s<0)&&(o=g,s=v,i=c,a.length=0),W(f,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function _2e(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function x2e(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Jd(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function b2e(t,e,r){var n=r.axesInfo=[];W(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function S2e(t,e,r,n){if(Um(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function w2e(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=Ik(n)[i]||{},o=Ik(n)[i]={};W(t,function(u,h){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&W(c.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];W(a,function(u,h){!o[h]&&l.push(u)}),W(o,function(u,h){!a[h]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function C2e(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Pk(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Um(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Bp(t){oh.registerAxisPointerClass("CartesianAxisPointer",s2e),t.registerComponentModel(u2e),t.registerComponentView(g2e),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!Se(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=c0e(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},m2e)}function A2e(t){At(iO),At(Bp)}var T2e=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),c=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=a6(a),v=D2e[f](s,l,c,h);v.style=d,r.graphicKey=v.type,r.pointer=v}var g=a.get(["label","margin"]),m=k2e(n,i,a,l,g);kN(r,i,a,o,m)},e}(i6);function k2e(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,h,c;if(a.dim==="radius"){var f=Zi();th(f,f,s),lo(f,f,[n.cx,n.cy]),u=ma([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,v=es.innerTextLayout(s,d*Math.PI/180,-1);h=v.textAlign,c=v.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;h=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",c=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:c}}var D2e={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:s6(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:Dk(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:Dk(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}};const M2e=T2e;var L2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Nt);const E2e=L2e;var l6=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Rr).models[0]},e.type="polarAxis",e}(Nt);Or(l6,Ap);var I2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(l6),B2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(l6),u6=function(t){pe(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(Aa);u6.prototype.dataToRadius=Aa.prototype.dataToCoord;u6.prototype.radiusToData=Aa.prototype.coordToData;const P2e=u6;var R2e=Ft(),h6=function(t){pe(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),h=pp(s==null?"":s+"",n.getFont(),"center","top"),c=Math.max(h.height,7),f=c/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),v=R2e(r.model),g=v.lastAutoInterval,m=v.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(v.lastTickCount=o,v.lastAutoInterval=d),d},e}(Aa);h6.prototype.dataToAngle=Aa.prototype.dataToCoord;h6.prototype.angleToData=Aa.prototype.coordToData;const F2e=h6;var BN=["radius","angle"],O2e=function(){function t(e){this.dimensions=BN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new P2e,this._angleAxis=new F2e,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)])},t.prototype.pointToData=function(e,r){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],r),this._angleAxis.angleToData(n[1],r)]},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,h=us;)u+=h*360;return[l,u]},t.prototype.coordToPoint=function(e){var r=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*r+this.cx,a=-Math.sin(n)*r+this.cy;return[i,a]},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,h=l*l+u*u-1e-4,c=this.r,f=this.r0;return h<=c*c&&h>=f*f}}},t.prototype.convertToPixel=function(e,r,n){var i=Rk(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=Rk(r);return i===this?this.pointToData(n):null},t}();function Rk(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}const N2e=O2e;function z2e(t,e,r){var n=e.get("center"),i=r.getWidth(),a=r.getHeight();t.cx=Be(n[0],i),t.cy=Be(n[1],a);var o=t.getRadiusAxis(),s=Math.min(i,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:Se(l)||(l=[0,l]);var u=[Be(l[0],s),Be(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function V2e(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();W(Z1(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),W(Z1(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Wc(n.scale,n.model),Wc(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function $2e(t){return t.mainType==="angleAxis"}function Fk(t,e){if(t.type=e.get("type"),t.scale=p2(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),$2e(e)){t.inverse=t.inverse!==e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t,t.model=e}var G2e={dimensions:BN,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new N2e(i+"");a.update=V2e;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");Fk(o,l),Fk(s,u),z2e(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Rr).models[0];n.coordinateSystem=i.coordinateSystem}}),r}};const H2e=G2e;var q2e=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Qg(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function em(t){var e=t.getRadiusAxis();return e.inverse?0:1}function Ok(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var W2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=Ce(i.getViewLabels(),function(h){h=ot(h);var c=i.scale,f=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=i.dataToCoord(f),h});Ok(u),Ok(s),W(q2e,function(h){r.get([h,"show"])&&(!i.scale.isBlank()||h==="axisLine")&&U2e[h](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(oh),U2e={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=em(r),l=s?0:1,u;a[l]===0?u=new fo({shape:{cx:r.cx,cy:r.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new Zy({shape:{cx:r.cx,cy:r.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,t.add(u)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[em(r)],u=Ce(n,function(h){return new en({shape:Qg(r,[l,l+s],h.coord)})});t.add(Hi(u,{style:rt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[em(r)],h=[],c=0;cy?"left":"right",T=Math.abs(m[1]-b)/g<.3?"middle":m[1]>b?"top":"bottom";if(s&&s[v]){var M=s[v];nt(M)&&M.textStyle&&(d=new ur(M.textStyle,l,l.ecModel))}var D=new Vt({silent:es.isLabelSilent(e),style:lr(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:w,verticalAlign:T})});if(t.add(D),h){var P=es.makeAxisEventDataBase(e);P.targetType="axisLabel",P.value=c.rawLabel,dt(D).eventData=P}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c=0?"p":"n",q=P;M&&(n[h][H]||(n[h][H]={p:P,n:P}),q=n[h][H][j]);var G=void 0,J=void 0,K=void 0,se=void 0;if(v.dim==="radius"){var ae=v.dataToCoord($)-P,ce=l.dataToCoord(H);Math.abs(ae)=se})}}})}function t_e(t){var e={};W(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=RN(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=c.stacks;e[l]=c;var d=PN(n);f[d]||c.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var v=Be(n.get("barWidth"),h),g=Be(n.get("barMaxWidth"),h),m=n.get("barGap"),y=n.get("barCategoryGap");v&&!f[d].width&&(v=Math.min(c.remainedWidth,v),f[d].width=v,c.remainedWidth-=v),g&&(f[d].maxWidth=g),m!=null&&(c.gap=m),y!=null&&(c.categoryGap=y)});var r={};return W(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=Be(n.categoryGap,o),l=Be(n.gap,1),u=n.remainedWidth,h=n.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),W(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e){var r=this.getAxis();return[r.coordToData(r.toLocalCoord(e[r.orient==="horizontal"?0:1]))]},t.prototype.dataToPoint=function(e){var r=this.getAxis(),n=this.getRect(),i=[],a=r.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[a]=r.toGlobalCoord(r.dataToCoord(+e)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(e,r,n){var i=Nk(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=Nk(r);return i===this?this.pointToData(n):null},t}();function Nk(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function p_e(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new d_e(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Rr).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var v_e={create:p_e,dimensions:ON};const g_e=v_e;var zk=["x","y"],m_e=["width","height"],y_e=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=Ub(l,1-hy(s)),h=l.dataToPoint(n)[0],c=a.get("type");if(c&&c!=="none"){var f=a6(a),d=__e[c](s,h,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var v=p3(i);MN(n,r,v,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=p3(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=o6(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=hy(o),u=Ub(s,l),h=[r.x,r.y];h[l]+=n[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var c=Ub(s,1-l),f=(c[1]+c[0])/2,d=[f,f];return d[l]=h[l],{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(i6),__e={line:function(t,e,r){var n=s6([e,r[0]],[e,r[1]],hy(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:LN([e-n/2,r[0]],[n,i],hy(t))}}};function hy(t){return t.isHorizontal()?0:1}function Ub(t,e){var r=t.getRect();return[r[zk[e]],r[zk[e]]+r[m_e[e]]]}const x_e=y_e;var b_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(wr);function S_e(t){At(Bp),oh.registerAxisPointerClass("SingleAxisPointer",x_e),t.registerComponentView(b_e),t.registerComponentView(h_e),t.registerComponentModel(Wb),Yc(t,"single",Wb,Wb.defaultOption),t.registerCoordinateSystem("single",g_e)}var w_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=lf(r);t.prototype.init.apply(this,arguments),Vk(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),Vk(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Nt);function Vk(t,e){var r=t.cellSize,n;Se(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=Ce([0,1],function(a){return Loe(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});ul(t,e,{type:"box",ignoreSize:i})}const C_e=w_e;var A_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var h=a.dataToRect([u],!1).tl,c=new Rt({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});i.add(c)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=n.start,f=0;c.time<=n.end.time;f++){v(c.formatedDate),f===0&&(c=s.getDateInfo(n.start.y+"-"+n.start.m));var d=c.date;d.setMonth(d.getMonth()+1),c=s.getDateInfo(d)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new hi({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),h=a.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return ze(r)&&r?koe(r,n):Je(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(a==="left"||a==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[h,u[f][1]],bottom:[h,u[1-f][1]],left:[u[1-f][0],c],right:[u[f][0],c]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:v},y=this._formatterLabel(g,m),b=new Vt({z2:30,style:lr(o,{text:y})});b.attr(this._yearTextPositionControl(b,d[l],i,l,s)),a.add(b)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],h=r[1];return i==="horizontal"?(h=h+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||ze(s))&&(s&&(n=C5(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=h==="center",g=0;g=i.start.time&&n.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/Yb)-Math.floor(r[0].time/Yb)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var h=Math.floor((i+r[0].day+6)/7),c=n?-h+1:h-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:h,nthWeek:c,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i);n.push(a),i.coordinateSystem=a}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},t.dimensions=["time","value"],t}();function $k(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}const D_e=k_e;function M_e(t){t.registerComponentModel(C_e),t.registerComponentView(T_e),t.registerCoordinateSystem("calendar",D_e)}function L_e(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function Gk(t,e){var r;return W(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function E_e(t,e,r){var n=xe({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(bt(i,n,!0),ul(i,n,{ignoreSize:!0}),SP(r,i),tm(r,i),tm(r,i,"shape"),tm(r,i,"style"),tm(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var NN=["transition","enterFrom","leaveTo"],I_e=NN.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function tm(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?NN:I_e,i=0;i=0;h--){var c=i[h],f=zr(c.id,null),d=f!=null?o.get(f):null;if(d){var v=d.parent,y=Vi(v),b=v===a?{width:s,height:l}:{width:y.width,height:y.height},w={},T=a2(d,c,b,null,{hv:c.hv,boundingMode:c.bounding},w);if(!Vi(d).isNew&&T){for(var M=c.transition,D={},P=0;P=0)?D[O]=V:d[O]=V}Gt(d,D,r,0)}else d.attr(w)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Ym(i,Vi(i).option,n,r._lastGraphicModel)}),this._elMap=Ye()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(wr);function v3(t){var e=He(Hk,t)?Hk[t]:qS(t),r=new e({});return Vi(r).type=t,r}function qk(t,e,r,n){var i=v3(r);return e.add(i),n.set(t,i),Vi(i).id=t,Vi(i).isNew=!0,i}function Ym(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Ym(a,e,r,n)}),S2(t,e,n),r.removeKey(Vi(t).id))}function Wk(t,e,r,n){t.isGroup||W([["cursor",ji.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];He(e,a)?t[a]=xt(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),W(Lt(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=Je(a)?a:null}}),He(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function F_e(t){return t=xe({},t),W(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(bP),function(e){delete t[e]}),t}function O_e(t,e,r){var n=dt(t).eventData;!t.silent&&!t.ignore&&!n&&(n=dt(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function N_e(t){t.registerComponentModel(P_e),t.registerComponentView(R_e),t.registerPreprocessor(function(e){var r=e.graphic;Se(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var Uk=["x","y","radius","angle","single"],z_e=["cartesian2d","polar","singleAxis"];function V_e(t){var e=t.get("coordinateSystem");return Ct(z_e,e)>=0}function Zs(t){return t+"Axis"}function $_e(t,e){var r=Ye(),n=[],i=Ye();t.eachComponent({mainType:"dataZoom",query:e},function(h){i.get(h.uid)||s(h)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(h){!i.get(h.uid)&&l(h)&&(s(h),a=!0)}function s(h){i.set(h.uid,!0),n.push(h),u(h)}function l(h){var c=!1;return h.eachTargetAxis(function(f,d){var v=r.get(f);v&&v[d]&&(c=!0)}),c}function u(h){h.eachTargetAxis(function(c,f){(r.get(c)||r.set(c,[]))[f]=!0})}return n}function zN(t){var e=t.ecModel,r={infoList:[],infoMap:Ye()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(Zs(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var Xb=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),G_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=Yk(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=Yk(r);bt(this.option,r,!0),bt(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;W([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=Ye(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return W(Uk,function(i){var a=this.getReferringComponents(Zs(i),sie);if(a.specified){n=!0;var o=new Xb;W(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===n}});l(s,"single")}function l(u,h){var c=u[0];if(c){var f=new Xb;if(f.add(c.componentIndex),r.set(h,f),a=!1,h==="x"||h==="y"){var d=c.getReferringComponents("grid",Rr).models[0];d&&W(u,function(v){c.componentIndex!==v.componentIndex&&d===v.getReferringComponents("grid",Rr).models[0]&&f.add(v.componentIndex)})}}}a&&W(Uk,function(u){if(a){var h=i.findComponents({mainType:Zs(u),filter:function(f){return f.get("type",!0)==="category"}});if(h[0]){var c=new Xb;c.add(h[0].componentIndex),r.set(u,c),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");W([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(Zs(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){W(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(Zs(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;W([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;W(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(w&&!T&&!M)return!0;w&&(m=!0),T&&(v=!0),M&&(g=!0)}return m&&v&&g})}else _c(h,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var v={};v[d]=o,u.selectRange(v)}});_c(h,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;_c(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=jt(n[0]+o,n,[0,100],!0):a!=null&&(o=jt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=ZI(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function Z_e(t,e,r){var n=[1/0,-1/0];_c(r,function(o){_he(n,o.getData(),e)});var i=t.getAxisModel(),a=rF(i.axis.scale,i,n).calculate();return[a.min,a.max]}const j_e=X_e;var K_e={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(Zs(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new j_e(i,a,s,t),r.push(o.__dzAxisProxy))});var n=Ye();return W(r,function(i){W(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};const J_e=K_e;function Q_e(t){t.registerAction("dataZoom",function(e,r){var n=$_e(r,e);W(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Zk=!1;function f6(t){Zk||(Zk=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,J_e),Q_e(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function exe(t){t.registerComponentModel(q_e),t.registerComponentView(Y_e),f6(t)}var Gi=function(){function t(){}return t}(),VN={};function xc(t,e){VN[t]=e}function $N(t){return VN[t]}var txe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;W(this.option.feature,function(n,i){var a=$N(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),bt(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Nt);const rxe=txe;function nxe(t,e,r){var n=e.getBoxLayoutParams(),i=e.get("padding"),a={width:r.getWidth(),height:r.getHeight()},o=Vr(n,a,i);Vu(e.get("orient"),t,e.get("itemGap"),o.width,o.height),a2(t,n,a,i)}function GN(t,e){var r=sf(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new Rt({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var ixe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},h=this._features||(this._features={}),c=[];W(u,function(v,g){c.push(g)}),new Qo(this._featureNames||[],c).add(f).update(f).remove(pt(f,null)).execute(),this._featureNames=c;function f(v,g){var m=c[v],y=c[g],b=u[m],w=new ur(b,r,r.ecModel),T;if(a&&a.newTitle!=null&&a.featureName===m&&(b.title=a.newTitle),m&&!y){if(axe(m))T={onclick:w.option.onclick,featureName:m};else{var M=$N(m);if(!M)return;T=new M}h[m]=T}else if(T=h[y],!T)return;T.uid=of("toolbox-feature"),T.model=w,T.ecModel=n,T.api=i;var D=T instanceof Gi;if(!m&&y){D&&T.dispose&&T.dispose(n,i);return}if(!w.get("show")||D&&T.unusable){D&&T.remove&&T.remove(n,i);return}d(w,T,m),w.setIconStatus=function(P,O){var V=this.option,$=this.iconPaths;V.iconStatus=V.iconStatus||{},V.iconStatus[P]=O,$[P]&&(O==="emphasis"?Ko:Jo)($[P])},T instanceof Gi&&T.render&&T.render(w,n,i,a)}function d(v,g,m){var y=v.getModel("iconStyle"),b=v.getModel(["emphasis","iconStyle"]),w=g instanceof Gi&&g.getIcons?g.getIcons():v.get("icon"),T=v.get("title")||{},M,D;ze(w)?(M={},M[m]=w):M=w,ze(T)?(D={},D[m]=T):D=T;var P=v.iconPaths={};W(M,function(O,V){var $=_p(O,{},{x:-s/2,y:-s/2,width:s,height:s});$.setStyle(y.getItemStyle());var H=$.ensureState("emphasis");H.style=b.getItemStyle();var j=new Vt({style:{text:D[V],align:b.get("textAlign"),borderRadius:b.get("textBorderRadius"),padding:b.get("textPadding"),fill:null},ignore:!0});$.setTextContent(j),nf({el:$,componentModel:r,itemName:V,formatterParamsExtra:{title:D[V]}}),$.__title=D[V],$.on("mouseover",function(){var q=b.getItemStyle(),G=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";j.setStyle({fill:b.get("textFill")||q.fill||q.stroke||"#000",backgroundColor:b.get("textBackgroundColor")}),$.setTextConfig({position:b.get("textPosition")||G}),j.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){v.get(["iconStatus",V])!=="emphasis"&&i.leaveEmphasis(this),j.hide()}),(v.get(["iconStatus",V])==="emphasis"?Ko:Jo)($),o.add($),$.on("click",Ge(g.onclick,g,n,i,V)),P[V]=$})}nxe(o,r,i),o.add(GN(o.getBoundingRect(),r)),l||o.eachChild(function(v){var g=v.__title,m=v.ensureState("emphasis"),y=m.textConfig||(m.textConfig={}),b=v.getTextContent(),w=b&&b.ensureState("emphasis");if(w&&!Je(w)&&g){var T=w.style||(w.style={}),M=pp(g,Vt.makeFont(T)),D=v.x+o.x,P=v.y+o.y+s,O=!1;P+M.height>i.getHeight()&&(y.position="top",O=!0);var V=O?-5-M.height:s+10;D+M.width/2>i.getWidth()?(y.position=["100%",V],T.align="right"):D-M.width/2<0&&(y.position=[0,V],T.align="left")}})},e.prototype.updateView=function(r,n,i,a){W(this._features,function(o){o instanceof Gi&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){W(this._features,function(i){i instanceof Gi&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){W(this._features,function(i){i instanceof Gi&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(wr);function axe(t){return t.indexOf("my")===0}const oxe=ixe;var sxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=zt.browser;if(Je(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=a+"."+s,h.target="_blank",h.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,v=o?decodeURIComponent(f[1]):f[1];d&&(v=window.atob(v));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,y=new Uint8Array(m);m--;)y[m]=v.charCodeAt(m);var b=new Blob([y]);window.navigator.msSaveOrOpenBlob(b,g)}else{var w=document.createElement("iframe");document.body.appendChild(w);var T=w.contentWindow,M=T.document;M.open("image/svg+xml","replace"),M.write(v),M.close(),T.focus(),M.execCommand("SaveAs",!0,g),document.body.removeChild(w)}}else{var D=i.get("lang"),P='',O=window.open();O.document.write(P),O.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Gi);const lxe=sxe;var jk="__ec_magicType_stack__",uxe=[["line","bar"],["stack"]],hxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return W(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(Kk[i]){var s={series:[]},l=function(c){var f=c.subType,d=c.id,v=Kk[i](f,d,c,a);v&&(rt(v,c.option),s.series.push(v));var g=c.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,b=y+"Axis",w=c.getReferringComponents(b,Rr).models[0],T=w.componentIndex;s[b]=s[b]||[];for(var M=0;M<=T;M++)s[b][T]=s[b][T]||{};s[b][T].boundaryGap=i==="bar"}}};W(uxe,function(c){Ct(c,i)>=0&&W(c,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=i;i==="stack"&&(u=bt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),n.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Gi),Kk={line:function(t,e,r,n){if(t==="bar")return bt({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return bt({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===jk;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),bt({id:e,stack:i?"":jk},n.get(["option","stack"])||{},!0)}};mo({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});const cxe=hxe;var w2=new Array(60).join("-"),jc=" ";function fxe(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function dxe(t){var e=[];return W(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(Ce(r.series,function(d){return d.name})),l=[i.model.getCategories()];W(r.series,function(d){var v=d.getRawData();l.push(d.getRawData().mapArray(v.mapDimension(o),function(g){return g}))});for(var u=[s.join(jc)],h=0;h1||r>0&&!t.noHeader;return W(t.blocks,function(i){var a=JP(i);a>=e&&(e=a+ +(n&&(!a||E5(i)&&!i.noHeader)))}),e}return 0}function Ose(t,e,r,n){var i=e.noHeader,a=zse(JP(e)),o=[],s=e.blocks||[];Un(!s||Se(s)),s=s||[];var l=t.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(He(u,l)){var h=new qP(u[l],null);s.sort(function(v,g){return h.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}W(s,function(v,g){var m=e.valueFormatter,y=KP(v)(m?xe(xe({},t),{valueFormatter:m}):t,v,g>0?a.html:0,n);y!=null&&o.push(y)});var c=t.renderMode==="richText"?o.join(a.richText):I5(o.join(""),i?r:a.html);if(i)return c;var f=T5(e.header,"ordinal",t.useUTC),d=jP(n,t.renderMode).nameStyle;return t.renderMode==="richText"?QP(t,f,d)+a.richText+c:I5('
'+ti(f)+"
"+c,r)}function Nse(t,e,r,n){var i=t.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(T){return T=Se(T)?T:[T],Ce(T,function(M,D){return T5(M,Se(d)?d[D]:d,u)})};if(!(a&&o)){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),f=a?"":T5(l,"ordinal",u),d=e.valueType,v=o?[]:h(e.value),g=!s||!a,m=!s&&a,y=jP(n,i),b=y.nameStyle,w=y.valueStyle;return i==="richText"?(s?"":c)+(a?"":QP(t,f,b))+(o?"":Gse(t,v,g,m,w)):I5((s?"":c)+(a?"":Vse(f,!s,b))+(o?"":$se(v,g,m,w)),r)}}function eA(t,e,r,n,i,a){if(t){var o=KP(t),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:e,valueFormatter:t.valueFormatter};return o(s,t,0,a)}}function zse(t){return{html:Rse[t],richText:Fse[t]}}function I5(t,e){var r='
',n="margin: "+e+"px 0 0";return'
'+t+r+"
"}function Vse(t,e,r){var n=e?"margin-left:2px":"";return''+ti(t)+""}function $se(t,e,r,n){var i=r?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return t=Se(t)?t:[t],''+Ce(t,function(o){return ti(o)}).join("  ")+""}function QP(t,e,r){return t.markupStyleCreator.wrapRichTextStyle(e,r)}function Gse(t,e,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Se(e)?e.join(" "):e,a)}function eR(t,e){var r=t.getData().getItemVisual(e,"style"),n=r[t.visualDrawType];return Qu(n)}function tR(t,e){var r=t.get("padding");return r??(e==="richText"?[8,10]:10)}var Rx=function(){function t(){this.richTextStyles={},this._nextStyleNameId=QI()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,r,n){var i=n==="richText"?this._generateStyleName():null,a=Loe({color:r,type:e,renderMode:n,markerId:i});return ze(a)?a:(this.richTextStyles[i]=a.style,a.content)},t.prototype.wrapRichTextStyle=function(e,r){var n={};Se(r)?W(r,function(a){return xe(n,a)}):xe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},t}();function rR(t){var e=t.series,r=t.dataIndex,n=t.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(r),l=Se(s),u=eR(e,r),h,c,f,d;if(o>1||l&&!o){var v=Hse(s,e,r,a,u);h=v.inlineValues,c=v.inlineValueTypes,f=v.blocks,d=v.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=h=qc(i,r,a[0]),c=g.type}else d=h=l?s[0]:s;var m=LS(e),y=m&&e.name||"",b=i.getName(r),w=n?y:b;return Zr("section",{header:y,noHeader:n||!m,sortParam:d,blocks:[Zr("nameValue",{markerType:"item",markerColor:u,name:w,noName:!da(w),value:h,valueType:c})].concat(f||[])})}function Hse(t,e,r,n,i){var a=e.getData(),o=so(t,function(c,f,d){var v=a.getDimensionInfo(d);return c=c||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?W(n,function(c){h(qc(a,r,c),c)}):W(t,h);function h(c,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Zr("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:c,valueType:d.type})):(s.push(c),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var ks=Ft();function kg(t,e){return t.getName(e)||t.getId(e)}var Gm="__universalTransitionEnabled",u2=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return e.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=fd({count:Wse,reset:Use}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=ks(this).sourceManager=new XP(this);a.prepareSource();var o=this.getInitialData(r,i);rA(o,this),this.dataTask.context.data=o,ks(this).dataBeforeProcessed=o,tA(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(r,n){var i=Wd(this),a=i?uf(r):{},o=this.subType;Nt.hasClass(o)&&(o+="Series"),bt(r,n.getTheme().get(this.subType)),bt(r,this.getDefaultOption()),Zu(r,"label",["show"]),this.fillDataTextStyle(r.data),i&&ul(r,a,i)},e.prototype.mergeOption=function(r,n){r=bt(this.option,r,!0),this.fillDataTextStyle(r.data);var i=Wd(this);i&&ul(this.option,r,i);var a=ks(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(r,n);rA(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,ks(this).dataBeforeProcessed=o,tA(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(r){if(r&&!Ci(r))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(r,n,i){var a=this.ecModel,o=QS.prototype.getColorFromPalette.call(this,r,n,i);return o||(o=a.getColorFromPalette(r,n,i)),o},e.prototype.coordDimToDataDim=function(r){return this.getRawData().mapDimensionsAll(r)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(r,n){this._innerSelect(this.getData(n),r)},e.prototype.unselect=function(r,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(r,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[kg(a,r)])&&!a.getItemModel(r).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Gm])return!0;var r=this.option.universalTransition;return r?r===!0?!0:r&&r.enabled:!1},e.prototype._innerSelect=function(r,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){nt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,h=0;h0&&this._innerSelect(r,n)}},e.registerClass=function(r){return Nt.registerClass(r)},e.protoInitialize=function(){var r=e.prototype;r.type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",r.visualDrawType="fill"}(),e}(Nt);Or(u2,nw);Or(u2,QS);lB(u2,Nt);function tA(t){var e=t.name;LS(t)||(t.name=qse(t)||e)}function qse(t){var e=t.getRawData(),r=e.mapDimensionsAll("seriesName"),n=[];return W(r,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function Wse(t){return t.model.getRawData().count()}function Use(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Yse}function Yse(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function rA(t,e){W(C1(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(r){t.wrapMethod(r,pt(Xse,e))})}function Xse(t,e){var r=B5(t);return r&&r.setOutputEnd((e||this).count()),e}function B5(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var n=r.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(t.uid))}return n}}const pr=u2;var aw=function(){function t(){this.group=new st,this.uid=sf("viewComponent")}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){},t.prototype.updateLayout=function(e,r,n,i){},t.prototype.updateVisual=function(e,r,n,i){},t.prototype.toggleBlurSeries=function(e,r,n){},t.prototype.eachRendered=function(e){var r=this.group;r&&r.traverse(e)},t}();IS(aw);qy(aw);const Cr=aw;function ff(){var t=Ft();return function(e){var r=t(e),n=e.pipelineContext,i=!!r.large,a=!!r.progressiveRender,o=r.large=!!(n&&n.large),s=r.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var nR=Ft(),Zse=ff(),ow=function(){function t(){this.group=new st,this.uid=sf("viewChart"),this.renderTask=fd({plan:jse,reset:Kse}),this.renderTask.context={view:this}}return t.prototype.init=function(e,r){},t.prototype.render=function(e,r,n,i){},t.prototype.highlight=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&iA(a,i,"emphasis")},t.prototype.downplay=function(e,r,n,i){var a=e.getData(i&&i.dataType);a&&iA(a,i,"normal")},t.prototype.remove=function(e,r){this.group.removeAll()},t.prototype.dispose=function(e,r){},t.prototype.updateView=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateLayout=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.updateVisual=function(e,r,n,i){this.render(e,r,n,i)},t.prototype.eachRendered=function(e){vl(this.group,e)},t.markUpdateMethod=function(e,r){nR(e).updateMethod=r},t.protoInitialize=function(){var e=t.prototype;e.type="chart"}(),t}();function nA(t,e,r){t&&$d(t)&&(e==="emphasis"?Qo:es)(t,r)}function iA(t,e,r){var n=ju(t,e),i=e&&e.highlightKey!=null?wae(e.highlightKey):null;n!=null?W(er(n),function(a){nA(t.getItemGraphicEl(a),r,i)}):t.eachItemGraphicEl(function(a){nA(a,r,i)})}IS(ow);qy(ow);function jse(t){return Zse(t.model)}function Kse(t){var e=t.model,r=t.ecModel,n=t.api,i=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=i&&nR(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,r,n,i),Jse[l]}var Jse={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const hr=ow;var $1="\0__throttleOriginMethod",aA="\0__throttleRate",oA="\0__throttleType";function h2(t,e,r){var n,i=0,a=0,o=null,s,l,u,h;e=e||0;function c(){a=new Date().getTime(),o=null,t.apply(l,u||[])}var f=function(){for(var d=[],v=0;v=0?c():o=setTimeout(c,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){h=d},f}function df(t,e,r,n){var i=t[e];if(i){var a=i[$1]||i,o=i[oA],s=i[aA];if(s!==r||o!==n){if(r==null||!n)return t[e]=a;i=t[e]=h2(a,r,n==="debounce"),i[$1]=a,i[oA]=n,i[aA]=r}return i}}function Yd(t,e){var r=t[e];r&&r[$1]&&(r.clear&&r.clear(),t[e]=r[$1])}var sA=Ft(),lA={itemStyle:Ku(sP,!0),lineStyle:Ku(oP,!0)},Qse={lineStyle:"stroke",itemStyle:"fill"};function iR(t,e){var r=t.visualStyleMapper||lA[e];return r||(console.warn("Unknown style type '"+e+"'."),lA.itemStyle)}function aR(t,e){var r=t.visualDrawType||Qse[e];return r||(console.warn("Unknown style type '"+e+"'."),"fill")}var ele={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=t.getModel(n),a=iR(t,n),o=a(i),s=i.getShallow("decal");s&&(r.setVisual("decal",s),s.dirty=!0);var l=aR(t,n),u=o[l],h=Je(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||h||c){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[l]||(o[l]=f,r.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Je(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||Je(o.stroke)?f:o.stroke}if(r.setVisual("style",o),r.setVisual("drawType",l),!e.isSeriesFiltered(t)&&h)return r.setVisual("colorFromPalette",!1),{dataEach:function(d,v){var g=t.getDataParams(v),m=xe({},o);m[l]=h(g),d.setItemVisual(v,"style",m)}}}},v0=new ur,tle={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var r=t.getData(),n=t.visualStyleAccessPath||"itemStyle",i=iR(t,n),a=r.getVisual("drawType");return{dataEach:r.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){v0.option=l[n];var u=i(v0),h=o.ensureUniqueItemVisual(s,"style");xe(h,u),v0.option.decal&&(o.setItemVisual(s,"decal",v0.option.decal),v0.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},rle={performRawSeries:!0,overallReset:function(t){var e=Ye();t.eachSeries(function(r){var n=r.getColorBy();if(!r.isColorBySeries()){var i=r.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),sA(r).scope=a}}),t.eachSeries(function(r){if(!(r.isColorBySeries()||t.isSeriesFiltered(r))){var n=r.getRawData(),i={},a=r.getData(),o=sA(r).scope,s=r.visualStyleAccessPath||"itemStyle",l=aR(r,s);a.each(function(u){var h=a.getRawIndex(u);i[h]=u}),n.each(function(u){var h=i[u],c=a.getItemVisual(h,"colorFromPalette");if(c){var f=a.ensureUniqueItemVisual(h,"style"),d=n.getName(u)||u+"",v=n.count();f[l]=r.getColorFromPalette(d,o,v)}})}})}},Dg=Math.PI;function nle(t,e){e=e||{},rt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var r=new st,n=new Rt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});r.add(n);var i=new Vt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Rt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});r.add(a);var o;return e.showSpinner&&(o=new $S({shape:{startAngle:-Dg/2,endAngle:-Dg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Dg*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Dg*3/2}).delay(300).start("circularInOut"),r.add(o)),r.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),h=t.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:h}),a.setShape({x:u-l,y:h-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r}var ile=function(){function t(e,r,n,i){this._stageTaskMap=Ye(),this.ecInstance=e,this.api=r,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(e,r){e.restoreData(r),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},t.prototype.getPerformArgs=function(e,r){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!r&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,r){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&r.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},t.prototype.restorePipelines=function(e){var r=this,n=r._pipelineMap=Ye();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),r._pipe(i,i.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,r=this.api.getModel(),n=this.api;W(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Un(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,r,n),i.overallReset&&this._createOverallStageTask(i,a,r,n)},this)},t.prototype.prepareView=function(e,r,n,i){var a=e.renderTask,o=a.context;o.model=r,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(r,a)},t.prototype.performDataProcessorTasks=function(e,r){this._performStageTasks(this._dataProcessorHandlers,e,r,{block:!0})},t.prototype.performVisualTasks=function(e,r,n){this._performStageTasks(this._visualHandlers,e,r,n)},t.prototype._performStageTasks=function(e,r,n,i){i=i||{};var a=!1,o=this;W(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var h=o._stageTaskMap.get(l.uid),c=h.seriesTaskMap,f=h.overallTask;if(f){var d,v=f.agentStubMap;v.each(function(m){s(i,m)&&(m.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);v.each(function(m){m.perform(g)}),f.perform(g)&&(a=!0)}else c&&c.each(function(m,y){s(i,m)&&m.dirty();var b=o.getPerformArgs(m,i.block);b.skip=!l.performRawSeries&&r.isSeriesFiltered(m.context.model),o.updatePayload(m,n),m.perform(b)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},t.prototype.performSeriesTasks=function(e){var r;e.eachSeries(function(n){r=n.dataTask.perform()||r}),this.unfinished=r||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var r=e.tail;do{if(r.__block){e.blockIndex=r.__idxInPipeline;break}r=r.getUpstream()}while(r)})},t.prototype.updatePayload=function(e,r){r!=="remain"&&(e.context.payload=r)},t.prototype._createSeriesStageTask=function(e,r,n,i){var a=this,o=r.seriesTaskMap,s=r.seriesTaskMap=Ye(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(h):l?n.eachRawSeriesByType(l,h):u&&u(n,i).each(h);function h(c){var f=c.uid,d=s.set(f,o&&o.get(f)||fd({plan:ule,reset:hle,count:fle}));d.context={model:c,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(c,d)}},t.prototype._createOverallStageTask=function(e,r,n,i){var a=this,o=r.overallTask=r.overallTask||fd({reset:ale});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=Ye(),u=e.seriesType,h=e.getTargetSeries,c=!0,f=!1,d="";Un(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,v):h?h(n,i).each(v):(c=!1,W(n.getSeries(),v));function v(g){var m=g.uid,y=l.set(m,s&&s.get(m)||(f=!0,fd({reset:ole,onDirty:lle})));y.context={model:g,overallProgress:c},y.agent=o,y.__block=c,a._pipe(g,y)}f&&o.dirty()},t.prototype._pipe=function(e,r){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=r),i.tail&&i.tail.pipe(r),i.tail=r,r.__idxInPipeline=i.count++,r.__pipeline=i},t.wrapStageHandler=function(e,r){return Je(e)&&(e={overallReset:e,seriesType:dle(e)}),e.uid=sf("stageHandler"),r&&(e.visualType=r),e},t}();function ale(t){t.overallReset(t.ecModel,t.api,t.payload)}function ole(t){return t.overallProgress&&sle}function sle(){this.agent.dirty(),this.getDownstream().dirty()}function lle(){this.agent&&this.agent.dirty()}function ule(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function hle(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=er(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Ce(e,function(r,n){return oR(n)}):cle}var cle=oR(0);function oR(t){return function(e,r){var n=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-f.length){var v=u.slice(0,d);v!=="data"&&(r.mainType=v,r[f.toLowerCase()]=l,h=!0)}}s.hasOwnProperty(u)&&(n[u]=l,h=!0),h||(i[u]=l)})}return{cptQuery:r,dataQuery:n,otherQuery:i}},t.prototype.filter=function(e,r){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=r.cptQuery,u=r.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,r.otherQuery,i,a));function h(c,f,d,v){return c[d]==null||f[v||d]===c[d]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),P5=["symbol","symbolSize","symbolRotate","symbolOffset"],fA=P5.concat(["symbolKeepAspect"]),mle={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData();if(t.legendIcon&&r.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Lu(l)?l:.5;var u=t.createRadialGradient(o,s,0,o,s,l);return u}function R5(t,e,r){for(var n=e.type==="radial"?Ble(t,e,r):Ile(t,e,r),i=e.colorStops,a=0;a0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:$t(t)?[t]:Se(t)?t:null}function lw(t){var e=t.style,r=e.lineDash&&e.lineWidth>0&&Rle(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(r){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&i!==1&&(r=Ce(r,function(a){return a/i}),n/=i)}return[r,n]}var Fle=new co(!0);function q1(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function dA(t){return typeof t=="string"&&t!=="none"}function W1(t){var e=t.fill;return e!=null&&e!=="none"}function pA(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r}else t.fill()}function vA(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var r=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r}else t.stroke()}function F5(t,e,r){var n=BS(e.image,e.__image,r);if(Wy(n)){var i=t.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Dm),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function Ole(t,e,r,n){var i,a=q1(r),o=W1(r),s=r.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var h=e.path||Fle,c=e.__dirty;if(!n){var f=r.fill,d=r.stroke,v=o&&!!f.colorStops,g=a&&!!d.colorStops,m=o&&!!f.image,y=a&&!!d.image,b=void 0,w=void 0,T=void 0,M=void 0,D=void 0;(v||g)&&(D=e.getBoundingRect()),v&&(b=c?R5(t,f,D):e.__canvasFillGradient,e.__canvasFillGradient=b),g&&(w=c?R5(t,d,D):e.__canvasStrokeGradient,e.__canvasStrokeGradient=w),m&&(T=c||!e.__canvasFillPattern?F5(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=T),y&&(M=c||!e.__canvasStrokePattern?F5(t,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=T),v?t.fillStyle=b:m&&(T?t.fillStyle=T:o=!1),g?t.strokeStyle=w:y&&(M?t.strokeStyle=M:a=!1)}var P=e.getGlobalScale();h.setScale(P[0],P[1],e.segmentIgnoreThreshold);var O,V;t.setLineDash&&r.lineDash&&(i=lw(e),O=i[0],V=i[1]);var $=!0;(u||c&yc)&&(h.setDPR(t.dpr),l?h.setContext(null):(h.setContext(t),$=!1),h.reset(),e.buildPath(h,e.shape,n),h.toStatic(),e.pathUpdated()),$&&h.rebuildPath(t,l?s:1),O&&(t.setLineDash(O),t.lineDashOffset=V),n||(r.strokeFirst?(a&&vA(t,r),o&&pA(t,r)):(o&&pA(t,r),a&&vA(t,r))),O&&t.setLineDash([])}function Nle(t,e,r){var n=e.__image=BS(r.image,e.__image,e,e.onload);if(!(!n||!Wy(n))){var i=r.x||0,a=r.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),r.sWidth&&r.sHeight){var u=r.sx||0,h=r.sy||0;t.drawImage(n,u,h,r.sWidth,r.sHeight,i,a,o,s)}else if(r.sx&&r.sy){var u=r.sx,h=r.sy,c=o-u,f=s-h;t.drawImage(n,u,h,c,f,i,a,o,s)}else t.drawImage(n,i,a,o,s)}}function zle(t,e,r){var n,i=r.text;if(i!=null&&(i+=""),i){t.font=r.font||al,t.textAlign=r.textAlign,t.textBaseline=r.textBaseline;var a=void 0,o=void 0;t.setLineDash&&r.lineDash&&(n=lw(e),a=n[0],o=n[1]),a&&(t.setLineDash(a),t.lineDashOffset=o),r.strokeFirst?(q1(r)&&t.strokeText(i,r.x,r.y),W1(r)&&t.fillText(i,r.x,r.y)):(W1(r)&&t.fillText(i,r.x,r.y),q1(r)&&t.strokeText(i,r.x,r.y)),a&&t.setLineDash([])}}var gA=["shadowBlur","shadowOffsetX","shadowOffsetY"],mA=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dR(t,e,r,n,i){var a=!1;if(!n&&(r=r||{},e===r))return!1;if(n||e.opacity!==r.opacity){ii(t,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(o)?Ou.opacity:o}(n||e.blend!==r.blend)&&(a||(ii(t,i),a=!0),t.globalCompositeOperation=e.blend||Ou.blend);for(var s=0;s0&&r.unfinished);r.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(r,n,i){if(!this[Sn]){if(this._disposed){this.id;return}var a,o,s;if(nt(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Sn]=!0,!this._model||n){var l=new tse(this._api),u=this._theme,h=this._model=new IP;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,u,this._locale,l)}this._model.setOption(r,{replaceMerge:o},N5);var c={seriesTransition:s,optionChanged:!0};if(i)this[Qn]={silent:a,updateParams:c},this[Sn]=!1,this.getZr().wakeUp();else{try{oc(this),Ds.update.call(this,null,c)}catch(f){throw this[Qn]=null,this[Sn]=!1,f}this._ssr||this._zr.flush(),this[Qn]=null,this[Sn]=!1,g0.call(this,a),m0.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||zt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(r){return this.renderToCanvas(r)},e.prototype.renderToCanvas=function(r){r=r||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:r.backgroundColor||this._model.get("backgroundColor"),pixelRatio:r.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(r){r=r||{};var n=this._zr.painter;return n.renderToString({useViewBox:r.useViewBox})},e.prototype.getSvgDataURL=function(){if(zt.svgSupported){var r=this._zr,n=r.storage.getDisplayList();return W(n,function(i){i.stopAnimation(null,!0)}),r.painter.toDataURL()}},e.prototype.getDataURL=function(r){if(this._disposed){this.id;return}r=r||{};var n=r.excludeComponents,i=this._model,a=[],o=this;W(n,function(l){i.eachComponent({mainType:l},function(u){var h=o._componentsMap[u.__viewId];h.group.ignore||(a.push(h),h.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(r).toDataURL("image/"+(r&&r.type||"png"));return W(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(r){if(this._disposed){this.id;return}var n=r.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(IA[i]){var l=s,u=s,h=-s,c=-s,f=[],d=r&&r.pixelRatio||this.getDevicePixelRatio();W(pd,function(w,T){if(w.group===i){var M=n?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(ot(r)),D=w.getDom().getBoundingClientRect();l=a(D.left,l),u=a(D.top,u),h=o(D.right,h),c=o(D.bottom,c),f.push({dom:M,left:D.left,top:D.top})}}),l*=d,u*=d,h*=d,c*=d;var v=h-l,g=c-u,m=ol.createCanvas(),y=R7(m,{renderer:n?"svg":"canvas"});if(y.resize({width:v,height:g}),n){var b="";return W(f,function(w){var T=w.left-l,M=w.top-u;b+=''+w.dom+""}),y.painter.getSvgRoot().innerHTML=b,r.connectedBackgroundColor&&y.painter.setBackgroundColor(r.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return r.connectedBackgroundColor&&y.add(new Rt({shape:{x:0,y:0,width:v,height:g},style:{fill:r.connectedBackgroundColor}})),W(f,function(w){var T=new vn({style:{x:w.left*d-l,y:w.top*d-u,image:w.dom}});y.add(T)}),y.refreshImmediately(),m.toDataURL("image/"+(r&&r.type||"png"))}else return this.getDataURL(r)},e.prototype.convertToPixel=function(r,n){return Vx(this,"convertToPixel",r,n)},e.prototype.convertFromPixel=function(r,n){return Vx(this,"convertFromPixel",r,n)},e.prototype.containPixel=function(r,n){if(this._disposed){this.id;return}var i=this._model,a,o=sd(i,r);return W(o,function(s,l){l.indexOf("Models")>=0&&W(s,function(u){var h=u.coordinateSystem;if(h&&h.containPoint)a=a||!!h.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(a=a||c.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(r,n){var i=this._model,a=sd(i,r,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?sw(s,l,n):wp(s,n)},e.prototype.getViewOfComponentModel=function(r){return this._componentsMap[r.__viewId]},e.prototype.getViewOfSeriesModel=function(r){return this._chartsMap[r.__viewId]},e.prototype._initEvents=function(){var r=this;W(cue,function(n){var i=function(a){var o=r.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Mu(s,function(v){var g=dt(v);if(g&&g.dataIndex!=null){var m=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=m&&m.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=xe({},g.eventData),!0},!0),l){var h=l.componentType,c=l.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=l.seriesIndex);var f=h&&c!=null&&o.getComponent(h,c),d=f&&r[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=a,l.type=n,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:d},r.trigger(n,l)}};i.zrEventfulCallAtLast=!0,r._zr.on(n,i,r)}),W(dd,function(n,i){r._messageCenter.on(i,function(a){this.trigger(i,a)},r)}),W(["selectchanged"],function(n){r._messageCenter.on(n,function(i){this.trigger(n,i)},r)}),_le(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var r=this.getDom();r&&aB(this.getDom(),cw,"");var n=this,i=n._api,a=n._model;W(n._componentsViews,function(o){o.dispose(a,i)}),W(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete pd[n.id]},e.prototype.resize=function(r){if(!this[Sn]){if(this._disposed){this.id;return}this._zr.resize(r);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=r&&r.silent;this[Qn]&&(a==null&&(a=this[Qn].silent),i=!0,this[Qn]=null),this[Sn]=!0;try{i&&oc(this),Ds.update.call(this,{type:"resize",animation:xe({duration:0},r&&r.animation)})}catch(o){throw this[Sn]=!1,o}this[Sn]=!1,g0.call(this,a),m0.call(this,a)}}},e.prototype.showLoading=function(r,n){if(this._disposed){this.id;return}if(nt(r)&&(n=r,r=""),r=r||"default",this.hideLoading(),!!z5[r]){var i=z5[r](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(r){var n=xe({},r);return n.type=dd[r.type],n},e.prototype.dispatchAction=function(r,n){if(this._disposed){this.id;return}if(nt(n)||(n={silent:!!n}),!!U1[r.type]&&this._model){if(this[Sn]){this._pendingActions.push(r);return}var i=n.silent;Gx.call(this,r,i);var a=n.flush;a?this._zr.flush():a!==!1&&zt.browser.weChat&&this._throttledZrFlush(),g0.call(this,i),m0.call(this,i)}},e.prototype.updateLabelLayout=function(){ha.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(r){if(this._disposed){this.id;return}var n=r.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(r),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){oc=function(c){var f=c._scheduler;f.restorePipelines(c._model),f.prepareStageTasks(),zx(c,!0),zx(c,!1),f.plan()},zx=function(c,f){for(var d=c._model,v=c._scheduler,g=f?c._componentsViews:c._chartsViews,m=f?c._componentsMap:c._chartsMap,y=c._zr,b=c._api,w=0;wf.get("hoverLayerThreshold")&&!zt.node&&!zt.worker&&f.eachSeries(function(m){if(!m.preventUsingHoverLayer){var y=c._chartsMap[m.__viewId];y.__alive&&y.eachRendered(function(b){b.states.emphasis&&(b.states.emphasis.hoverLayer=!0)})}})}function o(c,f){var d=c.get("blendMode")||null;f.eachRendered(function(v){v.isGroup||(v.style.blend=d)})}function s(c,f){if(!c.preventAutoZ){var d=c.get("z")||0,v=c.get("zlevel")||0;f.eachRendered(function(g){return l(g,d,v,-1/0),!0})}}function l(c,f,d,v){var g=c.getTextContent(),m=c.getTextGuideLine(),y=c.isGroup;if(y)for(var b=c.childrenRef(),w=0;w0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Ic(y))return;if(y instanceof Tt&&Cae(y),y.__dirty){var b=y.prevStates;b&&y.useStates(b)}if(v){y.stateTransition=m;var w=y.getTextContent(),T=y.getTextGuideLine();w&&(w.stateTransition=m),T&&(T.stateTransition=m)}y.__dirty&&i(y)}})}LA=function(c){return new(function(f){pe(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(v){for(;v;){var g=v.__ecComponentInfo;if(g!=null)return c._model.getComponent(g.mainType,g.index);v=v.parent}},d.prototype.enterEmphasis=function(v,g){Qo(v,g),Ei(c)},d.prototype.leaveEmphasis=function(v,g){es(v,g),Ei(c)},d.prototype.enterBlur=function(v){kB(v),Ei(c)},d.prototype.leaveBlur=function(v){OS(v),Ei(c)},d.prototype.enterSelect=function(v){DB(v),Ei(c)},d.prototype.leaveSelect=function(v){MB(v),Ei(c)},d.prototype.getModel=function(){return c.getModel()},d.prototype.getViewOfComponentModel=function(v){return c.getViewOfComponentModel(v)},d.prototype.getViewOfSeriesModel=function(v){return c.getViewOfSeriesModel(v)},d}(BP))(c)},DR=function(c){function f(d,v){for(var g=0;g=0)){BA.push(r);var a=uR.wrapStageHandler(r,i);a.__prio=e,a.__raw=r,t.push(a)}}function PR(t,e){z5[t]=e}function _ue(t,e,r){var n=jle("registerMap");n&&n(t,e,r)}var xue=Mse;oh(uw,ele);oh(c2,tle);oh(c2,rle);oh(uw,mle);oh(c2,yle);oh(SR,Yle);IR(RP);BR(Qle,use);PR("default",nle);mo({type:Nu,event:Nu,update:Nu},Ir);mo({type:Om,event:Om,update:Om},Ir);mo({type:ld,event:ld,update:ld},Ir);mo({type:Nm,event:Nm,update:Nm},Ir);mo({type:ud,event:ud,update:ud},Ir);ER("light",ple);ER("dark",vle);var PA=[],bue={registerPreprocessor:IR,registerProcessor:BR,registerPostInit:vue,registerPostUpdate:gue,registerUpdateLifecycle:fw,registerAction:mo,registerCoordinateSystem:mue,registerLayout:yue,registerVisual:oh,registerTransform:xue,registerLoading:PR,registerMap:_ue,registerImpl:Zle,PRIORITY:lue,ComponentModel:Nt,ComponentView:Cr,SeriesModel:pr,ChartView:hr,registerComponentModel:function(t){Nt.registerClass(t)},registerComponentView:function(t){Cr.registerClass(t)},registerSeriesModel:function(t){pr.registerClass(t)},registerChartView:function(t){hr.registerClass(t)},registerSubTypeDefaulter:function(t,e){Nt.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){qne(t,e)}};function At(t){if(Se(t)){W(t,function(e){At(e)});return}Ct(PA,t)>=0||(PA.push(t),Je(t)&&(t={install:t}),t.install(bue))}function y0(t){return t==null?0:t.length||1}function RA(t){return t}var Sue=function(){function t(e,r,n,i,a,o){this._old=e,this._new=r,this._oldKeyGetter=n||RA,this._newKeyGetter=i||RA,this.context=a,this._diffModeMultiple=o==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,r=this._new,n={},i=new Array(e.length),a=new Array(r.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(r,n,a,"_newKeyGetter");for(var o=0;o1){var h=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(h,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},t.prototype._executeMultiple=function(){var e=this._old,r=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(r,i,o,"_newKeyGetter");for(var s=0;s1&&f===1)this._updateManyToOne&&this._updateManyToOne(h,u),i[l]=null;else if(c===1&&f>1)this._updateOneToMany&&this._updateOneToMany(h,u),i[l]=null;else if(c===1&&f===1)this._update&&this._update(h,u),i[l]=null;else if(c>1&&f>1)this._updateManyToMany&&this._updateManyToMany(h,u),i[l]=null;else if(c>1)for(var d=0;d1)for(var s=0;s30}var _0=nt,Ms=Ce,Mue=typeof Int32Array>"u"?Array:Int32Array,Lue="e\0\0",FA=-1,Eue=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Iue=["_approximateExtent"],OA,Bg,x0,b0,Wx,Pg,Ux,Bue=function(){function t(e,r){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;FR(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},h=0;h=r)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Ji;if(l&&!i.pure)for(var u=[],h=e;h0},t.prototype.ensureUniqueItemVisual=function(e,r){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[r];return a==null&&(a=this.getVisual(r),Se(a)?a=a.slice():_0(a)&&(a=xe({},a)),i[r]=a),a},t.prototype.setItemVisual=function(e,r,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,_0(r)?xe(i,r):i[r]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,r){_0(e)?xe(this._layout,e):this._layout[e]=r},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,r,n){this._itemLayouts[e]=n?xe(this._itemLayouts[e]||{},r):r},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,r){var n=this.hostModel&&this.hostModel.seriesIndex;m5(n,this.dataType,e,r),this._graphicEls[e]=r},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,r){W(this._graphicEls,function(n,i){n&&e&&e.call(r,n,i)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Ms(this.dimensions,this._getDimInfo,this),this.hostModel)),Wx(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,r){var n=this[e];Je(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return r.apply(this,[i].concat(xS(arguments)))})},t.internalField=function(){OA=function(e){var r=e._invertedIndicesMap;W(r,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=r[i]=new Mue(o.categories.length);for(var l=0;l1&&(l+="__ec__"+h),i[r]=l}}}(),t}();const qn=Bue;function Cp(t,e){ew(t)||(t=tw(t)),e=e||{};var r=e.coordDimensions||[],n=e.dimensionsDefine||t.dimensionsDefine||[],i=Ye(),a=[],o=Rue(t,r,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&zR(o),l=n===t.dimensionsDefine,u=l?NR(t):OR(n),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,o));for(var c=Ye(h),f=new UP(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function Rue(t,e,r,n){var i=Math.max(t.dimensionsDetectedCount||1,e.length,r.length,n||0);return W(e,function(a){var o;nt(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function Fue(t,e,r){if(r||e.hasKey(t)){for(var n=0;e.hasKey(t+n);)n++;t+=n}return e.set(t,!0),t}var Oue=function(){function t(e){this.coordSysDims=[],this.axisMap=Ye(),this.categoryAxisMap=Ye(),this.coordSysName=e}return t}();function Nue(t){var e=t.get("coordinateSystem"),r=new Oue(e),n=zue[e];if(n)return n(t,r,r.axisMap,r.categoryAxisMap),r}var zue={cartesian2d:function(t,e,r,n){var i=t.getReferringComponents("xAxis",Rr).models[0],a=t.getReferringComponents("yAxis",Rr).models[0];e.coordSysDims=["x","y"],r.set("x",i),r.set("y",a),sc(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),sc(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,r,n){var i=t.getReferringComponents("singleAxis",Rr).models[0];e.coordSysDims=["single"],r.set("single",i),sc(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,r,n){var i=t.getReferringComponents("polar",Rr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],r.set("radius",a),r.set("angle",o),sc(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),sc(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,r,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,r,n){var i=t.ecModel,a=i.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();W(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),h=o[l];r.set(h,u),sc(u)&&(n.set(h,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function sc(t){return t.get("type")==="category"}function Vue(t,e,r){r=r||{};var n=r.byIndex,i=r.stackedCoordDimension,a,o,s;$ue(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(t&&t.get("stack")),u,h,c,f;if(W(a,function(b,w){ze(b)&&(a[w]=b={name:b}),l&&!b.isExtraCoord&&(!n&&!u&&b.ordinalMeta&&(u=b),!h&&b.type!=="ordinal"&&b.type!=="time"&&(!i||i===b.coordDim)&&(h=b))}),h&&!n&&!u&&(n=!0),h){c="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var d=h.coordDim,v=h.type,g=0;W(a,function(b){b.coordDim===d&&g++});var m={name:c,coordDim:d,coordDimIndex:g,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:g+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(m.storeDimIndex=s.ensureCalculationDimension(f,v),y.storeDimIndex=s.ensureCalculationDimension(c,v)),o.appendCalculationDimension(m),o.appendCalculationDimension(y)):(a.push(m),a.push(y))}return{stackedDimension:h&&h.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:c}}function $ue(t){return!FR(t.schema)}function hl(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function VR(t,e){return hl(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Gue(t,e){var r=t.get("coordinateSystem"),n=Sp.get(r),i;return e&&e.coordSysDims&&(i=Ce(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=X1(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function Hue(t,e,r){var n,i;return r&&W(t,function(a,o){var s=a.coordDim,l=r.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(t[n].otherDims.itemName=0),n}function as(t,e,r){r=r||{};var n=e.getSourceManager(),i,a=!1;t?(a=!0,i=tw(t)):(i=n.getSource(),a=i.sourceFormat===Ji);var o=Nue(e),s=Gue(e,o),l=r.useEncodeDefaulter,u=Je(l)?l:l?pt(kP,s,e):null,h={coordDimensions:s,generateCoord:r.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},c=Cp(i,h),f=Hue(c.dimensions,r.createInvertedIndices,o),d=a?null:n.getSharedDataStore(c),v=Vue(e,{schema:c,store:d}),g=new qn(c,e);g.setCalculationInfo(v);var m=f!=null&&que(i)?function(y,b,w,T){return T===f?w:this.defaultDimValueGetter(y,b,w,T)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,m),g}function que(t){if(t.sourceFormat===Ji){var e=Wue(t.data||[]);return!Se(tf(e))}}function Wue(t){for(var e=0;er[1]&&(r[1]=e[1])},t.prototype.unionExtentFromData=function(e,r){this.unionExtent(e.getApproximateExtent(r))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,r){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(r)||(n[1]=r)},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t}();qy($R);const os=$R;var Uue=0,Yue=function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++Uue}return t.createByAxisModel=function(e){var r=e.option,n=r.data,i=n&&Ce(n,Xue);return new t({categories:i,needCollect:!i,deduplication:r.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var r,n=this._needCollect;if(!ze(e)&&!n)return e;if(n&&!this._deduplication)return r=this.categories.length,this.categories[r]=e,r;var i=this._getOrCreateMap();return r=i.get(e),r==null&&(n?(r=this.categories.length,this.categories[r]=e,i.set(e,r)):r=NaN),r},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ye(this.categories))},t}();function Xue(t){return nt(t)&&t.value!=null?t.value:t+""}const V5=Yue;function $5(t){return t.type==="interval"||t.type==="log"}function Zue(t,e,r,n){var i={},a=t[1]-t[0],o=i.interval=KI(a/e,!0);r!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=GR(o),l=i.niceTickExtent=[kr(Math.ceil(t[0]/o)*o,s),kr(Math.floor(t[1]/o)*o,s)];return jue(l,t),i}function Yx(t){var e=Math.pow(10,MS(t)),r=t/e;return r?r===2?r=3:r===3?r=5:r*=2:r=1,kr(r*e)}function GR(t){return Ka(t)+2}function NA(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function jue(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),NA(t,0,e),NA(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function f2(t,e){return t>=e[0]&&t<=e[1]}function d2(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function p2(t,e){return t*(e[1]-e[0])+e[0]}var HR=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new V5({})),Se(i)&&(i=new V5({categories:Ce(i,function(a){return nt(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(r){return r==null?NaN:ze(r)?this._ordinalMeta.getOrdinal(r):Math.round(r)},e.prototype.contain=function(r){return r=this.parse(r),f2(r,this._extent)&&this._ordinalMeta.categories[r]!=null},e.prototype.normalize=function(r){return r=this._getTickNumber(this.parse(r)),d2(r,this._extent)},e.prototype.scale=function(r){return r=Math.round(p2(r,this._extent)),this.getRawOrdinalNumber(r)},e.prototype.getTicks=function(){for(var r=[],n=this._extent,i=n[0];i<=n[1];)r.push({value:i}),i++;return r},e.prototype.getMinorTicks=function(r){},e.prototype.setSortInfo=function(r){if(r==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=r.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&r=0&&r=r},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(os);os.registerClass(HR);const pw=HR;var nu=kr,qR=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="interval",r._interval=0,r._intervalPrecision=2,r}return e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return f2(r,this._extent)},e.prototype.normalize=function(r){return d2(r,this._extent)},e.prototype.scale=function(r){return p2(r,this._extent)},e.prototype.setExtent=function(r,n){var i=this._extent;isNaN(r)||(i[0]=parseFloat(r)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(r){var n=this._extent;r[0]n[1]&&(n[1]=r[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(r){this._interval=r,this._niceExtent=this._extent.slice(),this._intervalPrecision=GR(r)},e.prototype.getTicks=function(r){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var h=s.length?s[s.length-1].value:a[1];return i[1]>h&&(r?s.push({value:nu(h+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(r){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}r[n]=a}}return r}function YR(t){var e=Que(t),r=[];return W(t,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],h=Math.abs(o[1]-o[0]),c=a.scale.getExtent(),f=Math.abs(c[1]-c[0]);s=u?h/f*u:h}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var v=Be(n.get("barWidth"),s),g=Be(n.get("barMaxWidth"),s),m=Be(n.get("barMinWidth")||(JR(n)?.5:1),s),y=n.get("barGap"),b=n.get("barCategoryGap");r.push({bandWidth:s,barWidth:v,barMaxWidth:g,barMinWidth:m,barGap:y,barCategoryGap:b,axisKey:gw(a),stackId:vw(n)})}),XR(r)}function XR(t){var e={};W(t,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=n.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var v=n.barCategoryGap;v!=null&&(s.categoryGap=v)});var r={};return W(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Lt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Be(s,o),h=Be(n.gap,1),c=n.remainedWidth,f=n.autoWidthCount,d=(c-u)/(f+(f-1)*h);d=Math.max(d,0),W(a,function(y){var b=y.maxWidth,w=y.minWidth;if(y.width){var T=y.width;b&&(T=Math.min(T,b)),w&&(T=Math.max(T,w)),y.width=T,c-=T+h*T,f--}else{var T=d;b&&bT&&(T=w),T!==d&&(y.width=T,c-=T+h*T,f--)}}),d=(c-u)/(f+(f-1)*h),d=Math.max(d,0);var v=0,g;W(a,function(y,b){y.width||(y.width=d),g=y,v+=y.width*(1+h)}),g&&(v-=g.width*h);var m=-v/2;W(a,function(y,b){r[i][b]=r[i][b]||{bandWidth:o,offset:m,width:y.width},m+=y.width*(1+h)})}),r}function ehe(t,e,r){if(t&&e){var n=t[gw(e)];return n!=null&&r!=null?n[vw(r)]:n}}function ZR(t,e){var r=UR(t,e),n=YR(r);W(r,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=vw(i),u=n[gw(s)][l],h=u.offset,c=u.width;a.setLayout({bandWidth:u.bandWidth,offset:h,size:c})})}function jR(t){return{seriesType:t,plan:ff(),reset:function(e){if(KR(e)){var r=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=r.getDimensionIndex(r.mapDimension(a.dim)),s=r.getDimensionIndex(r.mapDimension(i.dim)),l=e.get("showBackground",!0),u=r.mapDimension(a.dim),h=r.getCalculationInfo("stackResultDimension"),c=hl(r,u)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=the(i,a),v=JR(e),g=e.get("barMinHeight")||0,m=h&&r.getDimensionIndex(h),y=r.getLayout("size"),b=r.getLayout("offset");return{progress:function(w,T){for(var M=w.count,D=v&&Qa(M*3),P=v&&l&&Qa(M*3),O=v&&Qa(M),V=n.master.getRect(),$=f?V.width:V.height,H,j=T.getStore(),q=0;(H=w.next())!=null;){var G=j.get(c?m:o,H),J=j.get(s,H),K=d,se=void 0;c&&(se=+G-j.get(o,H));var ae=void 0,ce=void 0,ye=void 0,de=void 0;if(f){var De=n.dataToPoint([G,J]);if(c){var Ie=n.dataToPoint([se,J]);K=Ie[0]}ae=K,ce=De[1]+b,ye=De[0]-K,de=y,Math.abs(ye)>>1;t[i][1]i&&(this._approxInterval=i);var s=Rg.length,l=Math.min(rhe(Rg,this._approxInterval,0,s),s-1);this._interval=Rg[l][1],this._minLevelUnit=Rg[Math.max(l-1,0)][0]},e.prototype.parse=function(r){return $t(r)?r:+ho(r)},e.prototype.contain=function(r){return f2(this.parse(r),this._extent)},e.prototype.normalize=function(r){return d2(this.parse(r),this._extent)},e.prototype.scale=function(r){return p2(r,this._extent)},e.type="time",e}(cl),Rg=[["second",YS],["minute",XS],["hour",cd],["quarter-day",cd*6],["half-day",cd*12],["day",qi*1.2],["half-week",qi*3.5],["week",qi*7],["month",qi*31],["quarter",qi*95],["half-year",k8/2],["year",k8]];function nhe(t,e,r,n){var i=ho(e),a=ho(r),o=function(v){return M8(i,v,n)===M8(a,v,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},h=function(){return u()&&o("hour")},c=function(){return h()&&o("minute")},f=function(){return c()&&o("second")},d=function(){return f()&&o("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return h();case"minute":return c();case"second":return f();case"millisecond":return d()}}function ihe(t,e){return t/=qi,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function ahe(t){var e=30*qi;return t/=e,t>6?6:t>3?3:t>2?2:1}function ohe(t){return t/=cd,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function zA(t,e){return t/=e?XS:YS,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function she(t){return KI(t,!0)}function lhe(t,e,r){var n=new Date(t);switch(Bc(e)){case"year":case"month":n[fP(r)](0);case"day":n[dP(r)](1);case"hour":n[pP(r)](0);case"minute":n[vP(r)](0);case"second":n[gP(r)](0),n[mP(r)](0)}return n.getTime()}function uhe(t,e,r,n){var i=1e4,a=hP,o=0;function s($,H,j,q,G,J,K){for(var se=new Date(H),ae=H,ce=se[q]();ae1&&J===0&&j.unshift({value:j[0].value-ae})}}for(var J=0;J=n[0]&&b<=n[1]&&c++)}var w=(n[1]-n[0])/e;if(c>w*1.5&&f>w/1.5||(u.push(m),c>w||t===a[d]))break}h=[]}}}for(var T=Jt(Ce(u,function($){return Jt($,function(H){return H.value>=n[0]&&H.value<=n[1]&&!H.notAdd})}),function($){return $.length>0}),M=[],D=T.length-1,d=0;d0;)a*=10;var s=[kr(fhe(n[0]/a)*a),kr(che(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(r){vd.calcNiceExtent.call(this,r),this._fixMin=r.fixMin,this._fixMax=r.fixMax},e.prototype.parse=function(r){return r},e.prototype.contain=function(r){return r=sa(r)/sa(this.base),f2(r,this._extent)},e.prototype.normalize=function(r){return r=sa(r)/sa(this.base),d2(r,this._extent)},e.prototype.scale=function(r){return r=p2(r,this._extent),Fg(this.base,r)},e.type="log",e}(os),tF=mw.prototype;tF.getMinorTicks=vd.getMinorTicks;tF.getLabel=vd.getLabel;function Og(t,e){return hhe(t,Ka(e))}os.registerClass(mw);const dhe=mw;var phe=function(){function t(e,r,n){this._prepareParams(e,r,n)}return t.prototype._prepareParams=function(e,r,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!h&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,h=!0),{min:s,max:l,minFixed:u,maxFixed:h,isBlank:c}},t.prototype.modifyDataMinMax=function(e,r){this[ghe[e]]=r},t.prototype.setDeterminedMinMax=function(e,r){var n=vhe[e];this[n]=r},t.prototype.freeze=function(){this.frozen=!0},t}(),vhe={min:"_determinedMin",max:"_determinedMax"},ghe={min:"_dataMin",max:"_dataMax"};function rF(t,e,r){var n=t.rawExtentInfo;return n||(n=new phe(t,e,r),t.rawExtentInfo=n,n)}function Ng(t,e){return e==null?null:Pd(e)?NaN:t.parse(e)}function nF(t,e){var r=t.type,n=rF(t,e,t.getExtent()).calculate();t.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&r==="time"){var s=UR("bar",o),l=!1;if(W(s,function(c){l=l||c.getBaseAxis()===e.axis}),l){var u=YR(s),h=mhe(i,a,e,u);i=h.min,a=h.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function mhe(t,e,r,n){var i=r.axis.getExtent(),a=i[1]-i[0],o=ehe(n,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;W(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;W(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/a,f=h/c-h;return e+=f*(l/u),t-=f*(s/u),{min:t,max:e}}function Uc(t,e){var r=e,n=nF(t,r),i=n.extent,a=r.get("splitNumber");t instanceof dhe&&(t.base=r.get("logBase"));var o=t.type,s=r.get("interval"),l=o==="interval"||o==="time";t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?r.get("minInterval"):null,maxInterval:l?r.get("maxInterval"):null}),s!=null&&t.setInterval&&t.setInterval(s)}function v2(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new pw({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new eF({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(os.getClass(e)||cl)}}function yhe(t){var e=t.scale.getExtent(),r=e[0],n=e[1];return!(r>0&&n>0||r<0&&n<0)}function Ap(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return t.scale.type==="time"?function(n){return function(i,a){return t.scale.getFormattedLabel(i,a,n)}}(e):ze(e)?function(n){return function(i){var a=t.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):Je(e)?function(n){return function(i,a){return r!=null&&(a=i.value-r),n(yw(t,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return t.scale.getLabel(n)}}function yw(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function _he(t){var e=t.model,r=t.scale;if(!(!e.get(["axisLabel","show"])||r.isBlank())){var n,i,a=r.getExtent();r instanceof pw?i=r.count():(n=r.getTicks(),i=n.length);var o=t.getLabelModel(),s=Ap(t),l,u=1;i>40&&(u=Math.ceil(i/40));for(var h=0;ht[1]&&(t[1]=i[1])})}var Tp=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t}(),She=1e-8;function $A(t,e){return Math.abs(t-e)i&&(n=o,i=l)}if(n)return Che(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(r){var n=this._rect;if(n&&!r)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return W(o,function(s){s.type==="polygon"?GA(s.exterior,i,a,r):W(s.points,function(l){GA(l,i,a,r)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new St(i[0],i[1],a[0]-i[0],a[1]-i[1]),r||(this._rect=n),n},e.prototype.contain=function(r){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(r[0],r[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/r,l/r])}return n}function khe(t,e){return t=The(t),Ce(Jt(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var n=r.properties,i=r.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new HA(o[0],o.slice(1)));break;case"MultiPolygon":W(i.coordinates,function(l){l[0]&&a.push(new HA(l[0],l.slice(1)))});break;case"LineString":a.push(new qA([i.coordinates]));break;case"MultiLineString":a.push(new qA(i.coordinates))}var s=new oF(n[e||"name"],a,n.cp);return s.properties=n,s})}var jd=Ft();function Dhe(t){return t.type==="category"?Lhe(t):Ihe(t)}function Mhe(t,e){return t.type==="category"?Ehe(t,e):{ticks:Ce(t.scale.getTicks(),function(r){return r.value})}}function Lhe(t){var e=t.getLabelModel(),r=lF(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function lF(t,e){var r=uF(t,"labels"),n=_w(e),i=hF(r,n);if(i)return i;var a,o;return Je(n)?a=dF(t,n):(o=n==="auto"?Bhe(t):n,a=fF(t,o)),cF(r,n,{labels:a,labelCategoryInterval:o})}function Ehe(t,e){var r=uF(t,"ticks"),n=_w(e),i=hF(r,n);if(i)return i;var a,o;if((!e.get("show")||t.scale.isBlank())&&(a=[]),Je(n))a=dF(t,n,!0);else if(n==="auto"){var s=lF(t,t.getLabelModel());o=s.labelCategoryInterval,a=Ce(s.labels,function(l){return l.tickValue})}else o=n,a=fF(t,o,!0);return cF(r,n,{ticks:a,tickCategoryInterval:o})}function Ihe(t){var e=t.scale.getTicks(),r=Ap(t);return{labels:Ce(e,function(n,i){return{level:n.level,formattedLabel:r(n,i),rawLabel:t.scale.getLabel(n),tickValue:n.value}})}}function uF(t,e){return jd(t)[e]||(jd(t)[e]=[])}function hF(t,e){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),f=0,d=0;l<=a[1];l+=s){var v=0,g=0,m=vp(r({value:l}),e.font,"center","top");v=m.width*1.3,g=m.height*1.3,f=Math.max(f,v,7),d=Math.max(d,g,7)}var y=f/h,b=d/c;isNaN(y)&&(y=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(y,b))),T=jd(t.model),M=t.getExtent(),D=T.lastAutoInterval,P=T.lastTickCount;return D!=null&&P!=null&&Math.abs(D-w)<=1&&Math.abs(P-o)<=1&&D>w&&T.axisExtent0===M[0]&&T.axisExtent1===M[1]?w=D:(T.lastTickCount=o,T.lastAutoInterval=w,T.axisExtent0=M[0],T.axisExtent1=M[1]),w}function Rhe(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function fF(t,e,r){var n=Ap(t),i=t.scale,a=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=i.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=iF(t),f=o.get("showMinLabel")||c,d=o.get("showMaxLabel")||c;f&&u!==a[0]&&g(a[0]);for(var v=u;v<=a[1];v+=l)g(v);d&&v-l!==a[1]&&g(a[1]);function g(m){var y={value:m};s.push(r?m:{formattedLabel:n(y),rawLabel:i.getLabel(y),tickValue:m})}return s}function dF(t,e,r){var n=t.scale,i=Ap(t),a=[];return W(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(r?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var WA=[0,1],Fhe=function(){function t(e,r,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=r,this._extent=n||[0,0]}return t.prototype.contain=function(e){var r=this._extent,n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return e>=n&&e<=i},t.prototype.containData=function(e){return this.scale.contain(e)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return ZI(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,r){var n=this._extent;n[0]=e,n[1]=r},t.prototype.dataToCoord=function(e,r){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),UA(n,i.count())),jt(e,WA,n,r)},t.prototype.coordToData=function(e,r){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),UA(n,i.count()));var a=jt(e,n,WA,r);return this.scale.scale(a)},t.prototype.pointToData=function(e,r){},t.prototype.getTicksCoords=function(e){e=e||{};var r=e.tickModel||this.getTickModel(),n=Mhe(this,r),i=n.ticks,a=Ce(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=r.get("alignWithLabel");return Ohe(this,a,o,e.clamp),a},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),r=e.get("splitNumber");r>0&&r<100||(r=5);var n=this.scale.getMinorTicks(r),i=Ce(n,function(a){return Ce(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},t.prototype.getViewLabels=function(){return Dhe(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,r=this.scale.getExtent(),n=r[1]-r[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return Phe(this)},t}();function UA(t,e){var r=t[1]-t[0],n=e,i=r/n/2;t[0]+=i,t[1]-=i}function Ohe(t,e,r,n){var i=e.length;if(!t.onBand||r||!i)return;var a=t.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;W(e,function(d){d.coord-=u/2});var h=t.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var c=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0]}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1]});function f(d,v){return d=kr(d),v=kr(v),c?d>v:di&&(i+=S0);var d=Math.atan2(s,o);if(d<0&&(d+=S0),d>=n&&d<=i||d+S0>=n&&d+S0<=i)return l[0]=h,l[1]=c,u-r;var v=r*Math.cos(n)+t,g=r*Math.sin(n)+e,m=r*Math.cos(i)+t,y=r*Math.sin(i)+e,b=(v-o)*(v-o)+(g-s)*(g-s),w=(m-o)*(m-o)+(y-s)*(y-s);return b0){e=e/180*Math.PI,va.fromArray(t[0]),sr.fromArray(t[1]),Er.fromArray(t[2]),_t.sub(eo,va,sr),_t.sub(ja,Er,sr);var r=eo.len(),n=ja.len();if(!(r<.001||n<.001)){eo.scale(1/r),ja.scale(1/n);var i=eo.dot(ja),a=Math.cos(e);if(a1&&_t.copy(Vn,Er),Vn.toArray(t[1])}}}}function Hhe(t,e,r){if(r<=180&&r>0){r=r/180*Math.PI,va.fromArray(t[0]),sr.fromArray(t[1]),Er.fromArray(t[2]),_t.sub(eo,sr,va),_t.sub(ja,Er,sr);var n=eo.len(),i=ja.len();if(!(n<.001||i<.001)){eo.scale(1/n),ja.scale(1/i);var a=eo.dot(e),o=Math.cos(r);if(a=l)_t.copy(Vn,Er);else{Vn.scaleAndAdd(ja,s/Math.tan(Math.PI/2-h));var c=Er.x!==sr.x?(Vn.x-sr.x)/(Er.x-sr.x):(Vn.y-sr.y)/(Er.y-sr.y);if(isNaN(c))return;c<0?_t.copy(Vn,sr):c>1&&_t.copy(Vn,Er)}Vn.toArray(t[1])}}}}function XA(t,e,r,n){var i=r==="normal",a=i?t:t.ensureState(r);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?t.useStyle(s):a.style=s}function qhe(t,e){var r=e.smooth,n=e.points;if(n)if(t.moveTo(n[0][0],n[0][1]),r>0&&n.length>=3){var i=Gs(n[0],n[1]),a=Gs(n[1],n[2]);if(!i||!a){t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*r,s=Lm([],n[1],n[0],o/i),l=Lm([],n[1],n[2],o/a),u=Lm([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var h=1;h0&&a&&M(-h/o,0,o);var g=t[0],m=t[o-1],y,b;w(),y<0&&D(-y,.8),b<0&&D(b,.8),w(),T(y,b,1),T(b,y,-1),w(),y<0&&P(-y),b<0&&P(b);function w(){y=g.rect[e]-n,b=i-m.rect[e]-m.rect[r]}function T(O,V,$){if(O<0){var H=Math.min(V,-O);if(H>0){M(H*$,0,o);var j=H+O;j<0&&D(-j*$,1)}else D(-O*$,1)}}function M(O,V,$){O!==0&&(u=!0);for(var H=V;H<$;H++){var j=t[H],q=j.rect;q[e]+=O,j.label[e]+=O}}function D(O,V){for(var $=[],H=0,j=1;j0)for(var j=0;j0;j--){var K=$[j-1]*J;M(-K,j,o)}}}function P(O){var V=O<0?-1:1;O=Math.abs(O);for(var $=Math.ceil(O/(o-1)),H=0;H0?M($,0,H+1):M(-$,o-H-1,o),O-=$,O<=0)return}return u}function Whe(t,e,r,n){return mF(t,"x","width",e,r,n)}function yF(t,e,r,n){return mF(t,"y","height",e,r,n)}function _F(t){var e=[];t.sort(function(g,m){return m.priority-g.priority});var r=new St(0,0,0,0);function n(g){if(!g.ignore){var m=g.ensureState("emphasis");m.ignore==null&&(m.ignore=!1)}g.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),Ct(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Gt(n,u,r,l)}else if(n.attr(u),!of(n).valueAnimation){var c=xt(n.style.opacity,1);n.style.opacity=0,fr(n,{style:{opacity:c}},r,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};zg(d,u,Vg),zg(d,n.states.select,Vg)}if(n.states.emphasis){var v=a.oldLayoutEmphasis={};zg(v,u,Vg),zg(v,n.states.emphasis,Vg)}aP(n,l,h,r,r)}if(i&&!i.ignore&&!i.invisible){var a=Xhe(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Gt(i,{shape:g},r)):(i.setShape(g),i.style.strokePercent=0,fr(i,{style:{strokePercent:1}},r)),a.oldLayout=g}},t}();const jhe=Zhe;var Kx=Ft();function Khe(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){var i=Kx(r).labelManager;i||(i=Kx(r).labelManager=new jhe),i.clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(e,r,n){var i=Kx(r).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(r.getViewOfSeriesModel(a))}),i.updateLayoutConfig(r),i.layout(r),i.processLabelsOverall()})}var Jx=Math.sin,Qx=Math.cos,xF=Math.PI,au=Math.PI*2,Jhe=180/xF,Qhe=function(){function t(){}return t.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},t.prototype.moveTo=function(e,r){this._add("M",e,r)},t.prototype.lineTo=function(e,r){this._add("L",e,r)},t.prototype.bezierCurveTo=function(e,r,n,i,a,o){this._add("C",e,r,n,i,a,o)},t.prototype.quadraticCurveTo=function(e,r,n,i){this._add("Q",e,r,n,i)},t.prototype.arc=function(e,r,n,i,a,o){this.ellipse(e,r,n,n,0,i,a,o)},t.prototype.ellipse=function(e,r,n,i,a,o,s,l){var u=s-o,h=!l,c=Math.abs(u),f=Ys(c-au)||(h?u>=au:-u>=au),d=u>0?u%au:u%au+au,v=!1;f?v=!0:Ys(c)?v=!1:v=d>=xF==!!h;var g=e+n*Qx(o),m=r+i*Jx(o);this._start&&this._add("M",g,m);var y=Math.round(a*Jhe);if(f){var b=1/this._p,w=(h?1:-1)*(au-b);this._add("A",n,i,y,1,+h,e+n*Qx(o+w),r+i*Jx(o+w)),b>.01&&this._add("A",n,i,y,0,+h,g,m)}else{var T=e+n*Qx(s),M=r+i*Jx(s);this._add("A",n,i,y,+v,+h,T,M)}},t.prototype.rect=function(e,r,n,i){this._add("M",e,r),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(e,r,n,i,a,o,s,l,u){for(var h=[],c=this._p,f=1;f"}function lce(t){return""}function Sw(t,e){e=e||{};var r=e.newline?` +`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return sce(o,s)+(o!=="style"?ti(l):l||"")+(a?""+r+Ce(a,function(u){return n(u)}).join(r)+r:"")+lce(o)}return n(t)}function uce(t,e,r){r=r||{};var n=r.newline?` +`:"",i=" {"+n,a=n+"}",o=Ce(Lt(t),function(l){return l+i+Ce(Lt(t[l]),function(u){return u+":"+t[l][u]+";"}).join(n)+a}).join(n),s=Ce(Lt(e),function(l){return"@keyframes "+l+i+Ce(Lt(e[l]),function(u){return u+i+Ce(Lt(e[l][u]),function(h){var c=e[l][u][h];return h==="d"&&(c='path("'+c+'")'),h+":"+c+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function q5(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function jA(t,e,r,n){return Yr("svg","root",{width:t,height:e,xmlns:SF,"xmlns:xlink":wF,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+t+" "+e:!1},r)}var KA={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},cu="transform-origin";function hce(t,e,r){var n=xe({},t.shape);xe(n,e),t.buildPath(r,n);var i=new bF;return i.reset(NI(t)),r.rebuildPath(i,1),i.generateStr(),i.getStr()}function cce(t,e){var r=e.originX,n=e.originY;(r||n)&&(t[cu]=r+"px "+n+"px")}var fce={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function AF(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function dce(t,e,r){var n=t.shape.paths,i={},a,o;if(W(n,function(l){var u=q5(r.zrId);u.animation=!0,g2(l,{},u,!0);var h=u.cssAnims,c=u.cssNodes,f=Lt(h),d=f.length;if(d){o=f[d-1];var v=h[o];for(var g in v){var m=v[g];i[g]=i[g]||{d:""},i[g].d+=m.d||""}for(var y in c){var b=c[y].animation;b.indexOf(o)>=0&&(a=b)}}}),!!a){e.d=!1;var s=AF(i,r);return a.replace(o,s)}}function JA(t){return ze(t)?KA[t]?"cubic-bezier("+KA[t]+")":AS(t)?t:"":""}function g2(t,e,r,n){var i=t.animators,a=i.length,o=[];if(t instanceof GS){var s=dce(t,e,r);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var et=AF(P,r);return et+" "+b[0]+" both"}}for(var m in l){var s=g(l[m]);s&&o.push(s)}if(o.length){var y=r.zrId+"-cls-"+r.cssClassIdx++;r.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Kd=Math.round;function TF(t){return t&&ze(t.src)}function kF(t){return t&&Je(t.toDataURL)}function ww(t,e,r,n){ice(function(i,a){var o=i==="fill"||i==="stroke";o&&OI(a)?MF(e,t,i,n):o&&TS(a)?LF(r,t,i,n):t[i]=a},e,r,!1),xce(r,t,n)}function QA(t){return Ys(t[0]-1)&&Ys(t[1])&&Ys(t[2])&&Ys(t[3]-1)}function pce(t){return Ys(t[4])&&Ys(t[5])}function Cw(t,e,r){if(e&&!(pce(e)&&QA(e))){var n=r?10:1e4;t.transform=QA(e)?"translate("+Kd(e[4]*n)/n+" "+Kd(e[5]*n)/n+")":cne(e)}}function eT(t,e,r){for(var n=t.points,i=[],a=0;a"u"){var m="Image width/height must been given explictly in svg-ssr renderer.";Un(f,m),Un(d,m)}else if(f==null||d==null){var y=function($,H){if($){var j=$.elm,q=f||H.width,G=d||H.height;$.tag==="pattern"&&(u?(G=1,q/=a.width):h&&(q=1,G/=a.height)),$.attrs.width=q,$.attrs.height=G,j&&(j.setAttribute("width",q),j.setAttribute("height",G))}},b=BS(v,null,t,function($){l||y(D,$),y(c,$)});b&&b.width&&b.height&&(f=f||b.width,d=d||b.height)}c=Yr("image","img",{href:v,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(c=ot(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(c){var w,T;l?w=T=1:u?(T=1,w=o.width/a.width):h?(w=1,T=o.height/a.height):o.patternUnits="userSpaceOnUse",w!=null&&!isNaN(w)&&(o.width=w),T!=null&&!isNaN(T)&&(o.height=T);var M=zI(i);M&&(o.patternTransform=M);var D=Yr("pattern","",o,[c]),P=Sw(D),O=n.patternCache,V=O[P];V||(V=n.zrId+"-p"+n.patternIdx++,O[P]=V,o.id=V,D=n.defs[V]=Yr("pattern",V,o,[c])),e[r]=Gy(V)}}function bce(t,e,r){var n=r.clipPathCache,i=r.defs,a=n[t.id];if(!a){a=r.zrId+"-c"+r.clipPathIdx++;var o={id:a};n[t.id]=a,i[a]=Yr("clipPath",a,o,[DF(t,r)])}e["clip-path"]=Gy(a)}function nT(t){return document.createTextNode(t)}function xu(t,e,r){t.insertBefore(e,r)}function iT(t,e){t.removeChild(e)}function aT(t,e){t.appendChild(e)}function EF(t){return t.parentNode}function IF(t){return t.nextSibling}function eb(t,e){t.textContent=e}var oT=58,Sce=120,wce=Yr("","");function W5(t){return t===void 0}function Ya(t){return t!==void 0}function Cce(t,e,r){for(var n={},i=e;i<=r;++i){var a=t[i].key;a!==void 0&&(n[a]=i)}return n}function X0(t,e){var r=t.key===e.key,n=t.tag===e.tag;return n&&r}function Jd(t){var e,r=t.children,n=t.tag;if(Ya(n)){var i=t.elm=CF(n);if(Aw(wce,t),Se(r))for(e=0;ea?(v=r[l+1]==null?null:r[l+1].elm,BF(t,v,r,i,l)):J1(t,e,n,a))}function xc(t,e){var r=e.elm=t.elm,n=t.children,i=e.children;t!==e&&(Aw(t,e),W5(e.text)?Ya(n)&&Ya(i)?n!==i&&Ace(r,n,i):Ya(i)?(Ya(t.text)&&eb(r,""),BF(r,null,i,0,i.length-1)):Ya(n)?J1(r,n,0,n.length-1):Ya(t.text)&&eb(r,""):t.text!==e.text&&(Ya(n)&&J1(r,n,0,n.length-1),eb(r,e.text)))}function Tce(t,e){if(X0(t,e))xc(t,e);else{var r=t.elm,n=EF(r);Jd(e),n!==null&&(xu(n,e.elm,IF(r)),J1(n,[t],0,0))}return e}var kce=0,Dce=function(){function t(e,r,n){if(this.type="svg",this.refreshHover=sT(),this.configLayer=sT(),this.storage=r,this._opts=n=xe({},n),this.root=e,this._id="zr"+kce++,this._oldVNode=jA(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=CF("svg");Aw(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Tce(this._oldVNode,e),this._oldVNode=e}},t.prototype.renderOneToVNode=function(e){return rT(e,q5(this._id))},t.prototype.renderToVNode=function(e){e=e||{};var r=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=q5(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress;var o=[],s=this._bgVNode=Mce(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=Yr("g","main",{},[]);this._paintList(r,a,l?l.children:o),l&&o.push(l);var u=Ce(Lt(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(Yr("defs","defs",{},u)),e.animation){var h=uce(a.cssNodes,a.cssAnims,{newline:!0});if(h){var c=Yr("style","stl",{},[],h);o.push(c)}}return jA(n,i,o,e.useViewBox)},t.prototype.renderToString=function(e){return e=e||{},Sw(this.renderToVNode({animation:xt(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:xt(e.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(e,r,n){for(var i=e.length,a=[],o=0,s,l,u=0,h=0;h=0&&!(f&&l&&f[g]===l[g]);g--);for(var m=v-1;m>g;m--)o--,s=a[o-1];for(var y=g+1;y=s)}}for(var c=this.__startIndex;c15)break}}G.prevElClipPaths&&y.restore()};if(b)if(b.length===0)O=m.__endIndex;else for(var $=d.dpr,H=0;H0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=r,!r.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(r.dom,u.nextSibling):o.appendChild(r.dom)}else o.firstChild?o.insertBefore(r.dom,o.firstChild):o.appendChild(r.dom);r.__painter=this}},t.prototype.eachLayer=function(e,r){for(var n=this._zlevelList,i=0;i0?$g:0),this._needsManuallyCompositing),h.__builtin__||yS("ZLevel "+u+" has been used by unkown layer "+h.id),h!==a&&(h.__used=!0,h.__startIndex!==l&&(h.__dirty=!0),h.__startIndex=l,h.incremental?h.__drawIndex=-1:h.__drawIndex=l,r(l),a=h),i.__dirty&_i&&!i.__inHover&&(h.__dirty=!0,h.incremental&&h.__drawIndex<0&&(h.__drawIndex=l))}r(l),this.eachBuiltinLayer(function(c,f){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,W(this._layers,function(r){r.setUnpainted()})},t.prototype.configLayer=function(e,r){if(r){var n=this._layerConfig;n[e]?bt(n[e],r,!0):n[e]=r;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(pr);const Vce=zce;function Yc(t,e){var r=t.mapDimensionsAll("defaultedLabel"),n=r.length;if(n===1){var i=qc(t,e,r[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var $ce=function(t){pe(e,t);function e(r,n,i,a){var o=t.call(this)||this;return o.updateData(r,n,i,a),o}return e.prototype._createSymbol=function(r,n,i,a,o){this.removeAll();var s=Fr(r,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=Gce,this._symbolType=r,this.add(s)},e.prototype.stopSymbolAnimation=function(r){this.childAt(0).stopAnimation(null,r)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Qo(this.childAt(0))},e.prototype.downplay=function(){es(this.childAt(0))},e.prototype.setZ=function(r,n){var i=this.childAt(0);i.zlevel=r,i.z=n},e.prototype.setDraggable=function(r,n){var i=this.childAt(0);i.draggable=r,i.cursor=!n&&r?"move":i.cursor},e.prototype.updateData=function(r,n,i,a){this.silent=!1;var o=r.getItemVisual(n,"symbol")||"circle",s=r.hostModel,l=e.getSymbolSize(r,n),u=o!==this._symbolType,h=a&&a.disableAnimation;if(u){var c=r.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,r,n,l,c)}else{var f=this.childAt(0);f.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?f.attr(d):Gt(f,d,s,n),ba(f)}if(this._updateCommon(r,n,l,i,a),u){var f=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,fr(f,d,s,n)}}h&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(r,n,i,a,o){var s=this.childAt(0),l=r.hostModel,u,h,c,f,d,v,g,m,y;if(a&&(u=a.emphasisItemStyle,h=a.blurItemStyle,c=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,m=a.hoverScale,y=a.cursorStyle,v=a.emphasisDisabled),!a||r.hasItemOption){var b=a&&a.itemModel?a.itemModel:r.getItemModel(n),w=b.getModel("emphasis");u=w.getModel("itemStyle").getItemStyle(),c=b.getModel(["select","itemStyle"]).getItemStyle(),h=b.getModel(["blur","itemStyle"]).getItemStyle(),f=w.get("focus"),d=w.get("blurScope"),v=w.get("disabled"),g=Xr(b),m=w.getShallow("scale"),y=b.getShallow("cursor")}var T=r.getItemVisual(n,"symbolRotate");s.attr("rotation",(T||0)*Math.PI/180||0);var M=ah(r.getItemVisual(n,"symbolOffset"),i);M&&(s.x=M[0],s.y=M[1]),y&&s.attr("cursor",y);var D=r.getItemVisual(n,"style"),P=D.fill;if(s instanceof vn){var O=s.style;s.useStyle(xe({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},D))}else s.__isEmptyBrush?s.useStyle(xe({},D)):s.useStyle(D),s.style.decal=null,s.setColor(P,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var V=r.getItemVisual(n,"liftZ"),$=this._z2;V!=null?$==null&&(this._z2=s.z2,s.z2+=V):$!=null&&(s.z2=$,this._z2=null);var H=o&&o.useNameLabel;pn(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:j,inheritColor:P,defaultOpacity:D.opacity});function j(J){return H?r.getName(J):Yc(r,J)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var q=s.ensureState("emphasis");q.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=h;var G=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;q.scaleX=this._sizeX*G,q.scaleY=this._sizeY*G,this.setSymbolScale(1),wr(this,f,d,v)},e.prototype.setSymbolScale=function(r){this.scaleX=this.scaleY=r},e.prototype.fadeOut=function(r,n,i){var a=this.childAt(0),o=dt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&ll(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();ll(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:r,removeOpt:s})},e.getSymbolSize=function(r,n){return pf(r.getItemVisual(n,"symbolSize"))},e}(st);function Gce(t,e){this.parent.drift(t,e)}const kp=$ce;function rb(t,e,r,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(r))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&t.getItemVisual(r,"symbol")!=="none"}function hT(t){return t!=null&&!nt(t)&&(t={isIgnore:t}),t||{}}function cT(t){var e=t.hostModel,r=e.getModel("emphasis");return{emphasisItemStyle:r.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:r.get("focus"),blurScope:r.get("blurScope"),emphasisDisabled:r.get("disabled"),hoverScale:r.get("scale"),labelStatesModels:Xr(e),cursorStyle:e.get("cursor")}}var Hce=function(){function t(e){this.group=new st,this._SymbolCtor=e||kp}return t.prototype.updateData=function(e,r){this._progressiveEls=null,r=hT(r);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=r.disableAnimation,l=cT(e),u={disableAnimation:s},h=r.getSymbolPoint||function(c){return e.getItemLayout(c)};a||n.removeAll(),e.diff(a).add(function(c){var f=h(c);if(rb(e,f,c,r)){var d=new o(e,c,l,u);d.setPosition(f),e.setItemGraphicEl(c,d),n.add(d)}}).update(function(c,f){var d=a.getItemGraphicEl(f),v=h(c);if(!rb(e,v,c,r)){n.remove(d);return}var g=e.getItemVisual(c,"symbol")||"circle",m=d&&d.getSymbolType&&d.getSymbolType();if(!d||m&&m!==g)n.remove(d),d=new o(e,c,l,u),d.setPosition(v);else{d.updateData(e,c,l,u);var y={x:v[0],y:v[1]};s?d.attr(y):Gt(d,y,i)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(c){var f=a.getItemGraphicEl(c);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=h,this._data=e},t.prototype.updateLayout=function(){var e=this,r=this._data;r&&r.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=cT(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r,n){this._progressiveEls=[],n=hT(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?r=n[0]:n[1]<0&&(r=n[1]),r}function FF(t,e,r,n){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=r.get(t.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function Wce(t,e){var r=[];return e.diff(t).add(function(n){r.push({cmd:"+",idx:n})}).update(function(n,i){r.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){r.push({cmd:"-",idx:n})}).execute(),r}function Uce(t,e,r,n,i,a,o,s){for(var l=Wce(t,e),u=[],h=[],c=[],f=[],d=[],v=[],g=[],m=RF(i,e,o),y=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w=i||g<0)break;if(Gu(y,b)){if(l){g+=a;continue}break}if(g===r)t[a>0?"moveTo":"lineTo"](y,b),c=y,f=b;else{var w=y-u,T=b-h;if(w*w+T*T<.5){g+=a;continue}if(o>0){for(var M=g+a,D=e[M*2],P=e[M*2+1];D===y&&P===b&&m=n||Gu(D,P))d=y,v=b;else{$=D-u,H=P-h;var G=y-u,J=D-y,K=b-h,se=P-b,ae=void 0,ce=void 0;if(s==="x"){ae=Math.abs(G),ce=Math.abs(J);var ye=$>0?1:-1;d=y-ye*ae*o,v=b,j=y+ye*ce*o,q=b}else if(s==="y"){ae=Math.abs(K),ce=Math.abs(se);var de=H>0?1:-1;d=y,v=b-de*ae*o,j=y,q=b+de*ce*o}else ae=Math.sqrt(G*G+K*K),ce=Math.sqrt(J*J+se*se),V=ce/(ce+ae),d=y-$*o*(1-V),v=b-H*o*(1-V),j=y+$*o*V,q=b+H*o*V,j=Ls(j,Es(D,y)),q=Ls(q,Es(P,b)),j=Es(j,Ls(D,y)),q=Es(q,Ls(P,b)),$=j-y,H=q-b,d=y-$*ae/ce,v=b-H*ae/ce,d=Ls(d,Es(u,y)),v=Ls(v,Es(h,b)),d=Es(d,Ls(u,y)),v=Es(v,Ls(h,b)),$=y-d,H=b-v,j=y+$*ce/ae,q=b+H*ce/ae}t.bezierCurveTo(c,f,d,v,y,b),c=j,f=q}else t.lineTo(y,b)}u=y,h=b,g+=a}return m}var OF=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),Yce=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new OF},e.prototype.buildPath=function(r,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Gu(i[o*2-2],i[o*2-1]);o--);for(;a=0){var T=u?(v-l)*w+l:(d-s)*w+s;return u?[r,T]:[T,r]}s=d,l=v;break;case o.C:d=a[c++],v=a[c++],g=a[c++],m=a[c++],y=a[c++],b=a[c++];var M=u?T1(s,d,g,y,r,h):T1(l,v,m,b,r,h);if(M>0)for(var D=0;D=0){var T=u?Ur(l,v,m,b,P):Ur(s,d,g,y,P);return u?[r,T]:[T,r]}}s=y,l=b;break}}},e}(Tt),Xce=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(OF),NF=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new Xce},e.prototype.buildPath=function(r,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Gu(i[s*2-2],i[s*2-1]);s--);for(;oe){a?r.push(o(a,l,e)):i&&r.push(o(i,l,0),o(i,l,e));break}else i&&(r.push(o(i,l,0)),i=null),r.push(l),a=l}return r}function Kce(t,e,r){var n=t.getVisual("visualMeta");if(!(!n||!n.length||!t.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=t.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=Ce(a.stops,function(w){return{coord:l.toGlobalCoord(l.dataToCoord(w.value)),color:w.color}}),h=u.length,c=a.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var f=jce(u,i==="x"?r.getWidth():r.getHeight()),d=f.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var v=10,g=f[0].coord-v,m=f[d-1].coord+v,y=m-g;if(y<.001)return"transparent";W(f,function(w){w.offset=(w.coord-g)/y}),f.push({offset:d?f[d-1].offset:.5,color:c[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:c[0]||"transparent"});var b=new yp(0,0,0,0,f,!0);return b[i]=g,b[i+"2"]=m,b}}}function Jce(t,e,r){var n=t.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=r.getAxesByScale("ordinal")[0];if(a&&!(i&&Qce(a,e))){var o=e.mapDimension(a.dim),s={};return W(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Qce(t,e){var r=t.getExtent(),n=Math.abs(r[1]-r[0])/t.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function efe(t,e){return isNaN(t)||isNaN(e)}function tfe(t){for(var e=t.length/2;e>0&&efe(t[e*2-2],t[e*2-1]);e--);return e-1}function gT(t,e){return[t[e*2],t[e*2+1]]}function rfe(t,e,r){for(var n=t.length/2,i=r==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function $F(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&r.get(["emphasis","lineStyle","width"])==="bolder"){var ye=g.getState("emphasis").style;ye.lineWidth=+g.style.lineWidth+1}dt(g).seriesIndex=r.seriesIndex,wr(g,se,ae,ce);var de=vT(r.get("smooth")),De=r.get("smoothMonotone");if(g.setShape({smooth:de,smoothMonotone:De,connectNulls:O}),m){var Ie=l.getCalculationInfo("stackedOnSeries"),Pe=0;m.useStyle(rt(h.getAreaStyle(),{fill:q,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),Ie&&(Pe=vT(Ie.get("smooth"))),m.setShape({smooth:de,stackedOnSmooth:Pe,smoothMonotone:De,connectNulls:O}),dn(m,r,"areaStyle"),dt(m).seriesIndex=r.seriesIndex,wr(m,se,ae,ce)}var Qe=function(Ke){a._changePolyState(Ke)};l.eachItemGraphicEl(function(Ke){Ke&&(Ke.onHoverStateChange=Qe)}),this._polyline.onHoverStateChange=Qe,this._data=l,this._coordSys=o,this._stackedOnPoints=D,this._points=c,this._step=H,this._valueOrigin=T,r.get("triggerLineEvent")&&(this.packEventData(r,g),m&&this.packEventData(r,m))},e.prototype.packEventData=function(r,n){dt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"line"}},e.prototype.highlight=function(r,n,i,a){var o=r.getData(),s=ju(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var h=l[s*2],c=l[s*2+1];if(isNaN(h)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(h,c))return;var f=r.get("zlevel")||0,d=r.get("z")||0;u=new kp(o,s),u.x=h,u.y=c,u.setZ(f,d);var v=u.getSymbolPath().getTextContent();v&&(v.zlevel=f,v.z=d,v.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else hr.prototype.highlight.call(this,r,n,i,a)},e.prototype.downplay=function(r,n,i,a){var o=r.getData(),s=ju(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else hr.prototype.downplay.call(this,r,n,i,a)},e.prototype._changePolyState=function(r){var n=this._polygon;P1(this._polyline,r),n&&P1(n,r)},e.prototype._newPolyline=function(r){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new Yce({shape:{points:r},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(r,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new NF({shape:{points:r,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(r,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=r.hostModel,h=u.get("animationDuration");Je(h)&&(h=h(null));var c=u.get("animationDelay")||0,f=Je(c)?c(null):c;r.eachItemGraphicEl(function(d,v){var g=d;if(g){var m=[d.x,d.y],y=void 0,b=void 0,w=void 0;if(i)if(o){var T=i,M=n.pointToCoord(m);a?(y=T.startAngle,b=T.endAngle,w=-M[1]/180*Math.PI):(y=T.r0,b=T.r,w=M[0])}else{var D=i;a?(y=D.x,b=D.x+D.width,w=d.x):(y=D.y+D.height,b=D.y,w=d.y)}var P=b===y?0:(w-y)/(b-y);l&&(P=1-P);var O=Je(c)?c(v):h*P+f,V=g.getSymbolPath(),$=V.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:O}),$&&$.animateFrom({style:{opacity:0}},{duration:300,delay:O}),V.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(r,n,i){var a=r.getModel("endLabel");if($F(r)){var o=r.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Vt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var h=tfe(l);h>=0&&(pn(s,Xr(r,"endLabel"),{inheritColor:i,labelFetcher:r,labelDataIndex:h,defaultText:function(c,f,d){return d!=null?PF(o,d):Yc(o,c)},enableTextSetter:!0},nfe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(r,n,i,a,o,s,l){var u=this._endLabel,h=this._polyline;if(u){r<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var c=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),v=s.get("precision"),g=s.get("distance")||0,m=l.getBaseAxis(),y=m.isHorizontal(),b=m.inverse,w=n.shape,T=b?y?w.x:w.y+w.height:y?w.x+w.width:w.y,M=(y?g:0)*(b?-1:1),D=(y?0:-g)*(b?-1:1),P=y?"x":"y",O=rfe(c,T,P),V=O.range,$=V[1]-V[0],H=void 0;if($>=1){if($>1&&!d){var j=gT(c,V[0]);u.attr({x:j[0]+M,y:j[1]+D}),o&&(H=f.getRawValue(V[0]))}else{var j=h.getPointOn(T,P);j&&u.attr({x:j[0]+M,y:j[1]+D});var q=f.getRawValue(V[0]),G=f.getRawValue(V[1]);o&&(H=oB(i,v,q,G,O.t))}a.lastFrameIndex=V[0]}else{var J=r===1||a.lastFrameIndex>0?V[0]:0,j=gT(c,J);o&&(H=f.getRawValue(J)),u.attr({x:j[0]+M,y:j[1]+D})}if(o){var K=of(u);typeof K.setLabelText=="function"&&K.setLabelText(H)}}},e.prototype._doUpdateAnimation=function(r,n,i,a,o,s,l){var u=this._polyline,h=this._polygon,c=r.hostModel,f=Uce(this._data,r,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,v=f.stackedOnCurrent,g=f.next,m=f.stackedOnNext;if(o&&(d=Is(f.current,i,o,l),v=Is(f.stackedOnCurrent,i,o,l),g=Is(f.next,i,o,l),m=Is(f.stackedOnNext,i,o,l)),pT(d,g)>3e3||h&&pT(v,m)>3e3){u.stopAnimation(),u.setShape({points:g}),h&&(h.stopAnimation(),h.setShape({points:g,stackedOnPoints:m}));return}u.shape.__points=f.current,u.shape.points=d;var y={shape:{points:g}};f.current!==d&&(y.shape.__points=f.next),u.stopAnimation(),Gt(u,y,c),h&&(h.setShape({points:d,stackedOnPoints:v}),h.stopAnimation(),Gt(h,{shape:{stackedOnPoints:m}},c),u.shape.points!==h.shape.points&&(h.shape.points=u.shape.points));for(var b=[],w=f.status,T=0;Te&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),h=l.getExtent(),c=n.getDevicePixelRatio(),f=Math.abs(h[1]-h[0])*(c||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d));var v=void 0;ze(a)?v=ofe[a]:Je(a)&&(v=a),v&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,v,sfe))}}}}}function lfe(t){t.registerChartView(afe),t.registerSeriesModel(Vce),t.registerLayout(Mp("line",!0)),t.registerVisual({seriesType:"line",reset:function(e){var r=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=r.getVisual("style").fill),r.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,GF("line"))}var HF=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return as(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(r,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(r),s=a.dataToPoint(o);if(i)W(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var v=f.getTicksCoords(),g=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&(g+=1),v.length<2)return;if(v.length===2){s[d]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,w=1,T=0;Tg){b=(M+y)/2;break}T===1&&(w=D-v[0].tickValue)}b==null&&(y?y&&(b=v[v.length-1].coord):b=v[0].coord),s[d]=f.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),h=l.getLayout("size"),c=a.getBaseAxis().isHorizontal()?0:1;s[c]+=u+h/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(pr);pr.registerClass(HF);const Q1=HF;var ufe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(){return as(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var r=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>r&&(r=n),r},e.prototype.brushSelector=function(r,n,i){return i.rect(n.getItemLayout(r))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=gl(Q1.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Q1);const hfe=ufe;var cfe=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t}(),ffe=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new cfe},e.prototype.buildPath=function(r,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,h=n.startAngle,c=n.endAngle,f=n.clockwise,d=Math.PI*2,v=f?c-hMath.PI/2&&hs)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(r,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(r.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(r,n,i,a){if(this._isOrderChangedWithinSameData(r,n,i)){var o=this._dataSort(r,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(r,n,i){var a=n.baseAxis,o=this._dataSort(r,a,function(s){return r.get(r.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(r,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(r,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(r){this._onRendered&&(r.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(r){var n=this.group,i=this._data;r&&r.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Gd(a,r,dt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(hr),mT={cartesian2d:function(t,e){var r=e.width<0?-1:1,n=e.height<0?-1:1;r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,a=t.y+t.height,o=ib(e.x,t.x),s=ab(e.x+e.width,i),l=ib(e.y,t.y),u=ab(e.y+e.height,a),h=si?s:o,e.y=c&&l>a?u:l,e.width=h?0:s-o,e.height=c?0:u-l,r<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var r=e.r0<=e.r?1:-1;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}var i=ab(e.r,t.r),a=ib(e.r0,t.r0);e.r=i,e.r0=a;var o=i-a<0;if(r<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},yT={cartesian2d:function(t,e,r,n,i,a,o,s,l){var u=new Rt({shape:xe({},n),z2:1});if(u.__dataIndex=r,u.name="item",a){var h=u.shape,c=i?"height":"width";h[c]=0}return u},polar:function(t,e,r,n,i,a,o,s,l){var u=!i&&l?ey:li,h=new u({shape:n,z2:1});h.name="item";var c=qF(i);if(h.calculateTextPosition=dfe(c,{isRoundCap:u===ey}),a){var f=h.shape,d=i?"r":"endAngle",v={};f[d]=i?n.r0:n.startAngle,v[d]=n[d],(s?Gt:fr)(h,{shape:v},a)}return h}};function mfe(t,e){var r=t.get("realtimeSort",!0),n=e.getBaseAxis();if(r&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function _T(t,e,r,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Gt:fr)(r,{shape:l},e,i,null);var h=e?t.baseAxis.model:null;(o?Gt:fr)(r,{shape:u},h,i)}function xT(t,e){for(var r=0;r0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(t,e,r){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function xfe(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function qF(t){return function(e){var r=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+r;default:return n}}}(t)}function ST(t,e,r,n,i,a,o,s){var l=e.getItemVisual(r,"style");if(s){if(!a.get("roundCap")){var h=t.shape,c=Iu(n.getModel("itemStyle"),h,!0);xe(h,c),t.setShape(h)}}else{var u=n.get(["itemStyle","borderRadius"])||0;t.setShape("r",u)}t.useStyle(l);var f=n.getShallow("cursor");f&&t.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",v=Xr(n);pn(t,v,{labelFetcher:a,labelDataIndex:r,defaultText:Yc(a.getData(),r),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=t.getTextContent();if(s&&g){var m=n.get(["label","position"]);t.textConfig.inside=m==="middle"?!0:null,pfe(t,m==="outside"?d:m,qF(o),n.get(["label","rotate"]))}iP(g,v,a.getRawValue(r),function(b){return PF(e,b)});var y=n.getModel(["emphasis"]);wr(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),dn(t,n),xfe(i)&&(t.style.fill="none",t.style.stroke="none",W(t.states,function(b){b.style&&(b.style.fill=b.style.stroke="none")}))}function bfe(t,e){var r=t.get(["itemStyle","borderColor"]);if(!r||r==="none")return 0;var n=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var Sfe=function(){function t(){}return t}(),wT=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new Sfe},e.prototype.buildPath=function(r,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,h=0;h=0?r:null},30,!1);function wfe(t,e,r){for(var n=t.baseDimIdx,i=1-n,a=t.shape.points,o=t.largeDataIndices,s=[],l=[],u=t.barWidth,h=0,c=a.length/3;h=s[0]&&e<=s[0]+l[0]&&r>=s[1]&&r<=s[1]+l[1])return o[h]}return-1}function WF(t,e,r){if(sh(r,"cartesian2d")){var n=e,i=r.getArea();return{x:t?n.x:i.x,y:t?i.y:n.y,width:t?n.width:i.width,height:t?i.height:n.height}}else{var i=r.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:a.r0,r:t?i.r:a.r,startAngle:t?a.startAngle:0,endAngle:t?a.endAngle:Math.PI*2}}}function Cfe(t,e,r){var n=t.type==="polar"?li:Rt;return new n({shape:WF(e,r,t),silent:!0,z2:0})}const Afe=gfe;function Tfe(t){t.registerChartView(Afe),t.registerSeriesModel(hfe),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,pt(ZR,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,jR("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,GF("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,r){var n=e.componentType||"series";r.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var Wg=Math.PI*2,TT=Math.PI/180;function UF(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function YF(t,e){var r=UF(t,e),n=t.get("center"),i=t.get("radius");Se(i)||(i=[0,i]);var a=Be(r.width,e.getWidth()),o=Be(r.height,e.getHeight()),s=Math.min(a,o),l=Be(i[0],s/2),u=Be(i[1],s/2),h,c,f=t.coordinateSystem;if(f){var d=f.dataToPoint(n);h=d[0]||0,c=d[1]||0}else Se(n)||(n=[n,n]),h=Be(n[0],a)+r.x,c=Be(n[1],o)+r.y;return{cx:h,cy:c,r0:l,r:u}}function kfe(t,e,r){e.eachSeriesByType(t,function(n){var i=n.getData(),a=i.mapDimension("value"),o=UF(n,r),s=YF(n,r),l=s.cx,u=s.cy,h=s.r,c=s.r0,f=-n.get("startAngle")*TT,d=n.get("minAngle")*TT,v=0;i.each(a,function($){!isNaN($)&&v++});var g=i.getSum(a),m=Math.PI/(g||v)*2,y=n.get("clockwise"),b=n.get("roseType"),w=n.get("stillShowZeroSum"),T=i.getDataExtent(a);T[0]=0;var M=Wg,D=0,P=f,O=y?1:-1;if(i.setLayout({viewRect:o,r:h}),i.each(a,function($,H){var j;if(isNaN($)){i.setItemLayout(H,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:c,r:b?NaN:h});return}b!=="area"?j=g===0&&w?m:$*m:j=Wg/v,jr?y:m,M=Math.abs(w.label.y-r);if(M>=T.maxY){var D=w.label.x-e-w.len2*i,P=n+w.len,O=Math.abs(D)t.unconstrainedWidth?null:d:null;n.setStyle("width",v)}var g=n.getBoundingRect();a.width=g.width;var m=(n.style.margin||0)+2.1;a.height=g.height+m,a.y-=(a.height-c)/2}}}function ob(t){return t.position==="center"}function Lfe(t){var e=t.getData(),r=[],n,i,a=!1,o=(t.get("minShowLabelAngle")||0)*Dfe,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,h=s.x,c=s.y,f=s.height;function d(D){D.ignore=!0}function v(D){if(!D.ignore)return!0;for(var P in D.states)if(D.states[P].ignore===!1)return!0;return!1}e.each(function(D){var P=e.getItemGraphicEl(D),O=P.shape,V=P.getTextContent(),$=P.getTextGuideLine(),H=e.getItemModel(D),j=H.getModel("label"),q=j.get("position")||H.get(["emphasis","label","position"]),G=j.get("distanceToLabelLine"),J=j.get("alignTo"),K=Be(j.get("edgeDistance"),u),se=j.get("bleedMargin"),ae=H.getModel("labelLine"),ce=ae.get("length");ce=Be(ce,u);var ye=ae.get("length2");if(ye=Be(ye,u),Math.abs(O.endAngle-O.startAngle)0?"right":"left":De>0?"left":"right"}var Zt=Math.PI,Mt=0,Ar=j.get("rotate");if($t(Ar))Mt=Ar*(Zt/180);else if(q==="center")Mt=0;else if(Ar==="radial"||Ar===!0){var dr=De<0?-de+Zt:-de;Mt=dr}else if(Ar==="tangential"&&q!=="outside"&&q!=="outer"){var Kt=Math.atan2(De,Ie);Kt<0&&(Kt=Zt*2+Kt);var Mn=Ie>0;Mn&&(Kt=Zt+Kt),Mt=Kt-Zt}if(a=!!Mt,V.x=Pe,V.y=Qe,V.rotation=Mt,V.setStyle({verticalAlign:"middle"}),qe){V.setStyle({align:et});var tn=V.states.select;tn&&(tn.x+=V.x,tn.y+=V.y)}else{var Hr=V.getBoundingRect().clone();Hr.applyTransform(V.getComputedTransform());var Ln=(V.style.margin||0)+2.1;Hr.y-=Ln/2,Hr.height+=Ln,r.push({label:V,labelLine:$,position:q,len:ce,len2:ye,minTurnAngle:ae.get("minTurnAngle"),maxSurfaceAngle:ae.get("maxSurfaceAngle"),surfaceNormal:new _t(De,Ie),linePoints:Ke,textAlign:et,labelDistance:G,labelAlignTo:J,edgeDistance:K,bleedMargin:se,rect:Hr,unconstrainedWidth:Hr.width,labelStyleWidth:V.style.width})}P.setTextConfig({inside:qe})}}),!a&&t.get("avoidLabelOverlap")&&Mfe(r,n,i,l,u,f,h,c);for(var g=0;g0){for(var h=o.getItemLayout(0),c=1;isNaN(h&&h.startAngle)&&c=a.r0}},e.type="pie",e}(hr);const Bfe=Ife;function vf(t,e,r){e=Se(e)&&{coordDimensions:e}||xe({encodeDefine:t.getEncode()},e);var n=t.getSource(),i=Cp(n,e).dimensions,a=new qn(i,t);return a.initData(n,r),a}var Pfe=function(){function t(e,r){this._getDataWithEncodedVisual=e,this._getRawData=r}return t.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},t.prototype.containName=function(e){var r=this._getRawData();return r.indexOfName(e)>=0},t.prototype.indexOfName=function(e){var r=this._getDataWithEncodedVisual();return r.indexOfName(e)},t.prototype.getItemVisual=function(e,r){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,r)},t}();const Ep=Pfe;var Rfe=Ft(),Ffe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ep(Ge(this.getData,this),Ge(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return vf(this,{coordDimensions:["value"],encodeDefaulter:pt(KS,this)})},e.prototype.getDataParams=function(r){var n=this.getData(),i=Rfe(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=Yne(o,n.hostModel.get("percentPrecision"))}var s=t.prototype.getDataParams.call(this,r);return s.percent=a[r]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(r){Zu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(pr);const Ofe=Ffe;function Nfe(t){return{seriesType:t,reset:function(e,r){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!($t(o)&&!isNaN(o)&&o<0)})}}}function zfe(t){t.registerChartView(Bfe),t.registerSeriesModel(Ofe),fR("pie",t.registerAction),t.registerLayout(pt(kfe,"pie")),t.registerProcessor(Lp("pie")),t.registerProcessor(Nfe("pie"))}var Vfe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.getInitialData=function(r,n){return as(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(r,n,i){return i.point(n.getItemLayout(r))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(pr);const $fe=Vfe;var ZF=4,Gfe=function(){function t(){}return t}(),Hfe=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new Gfe},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(r,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=r.getContext?r.getContext():r,u=l&&a[0]=0;u--){var h=u*2,c=a[h]-s/2,f=a[h+1]-l/2;if(r>=c&&n>=f&&r<=c+s&&n<=f+l)return u}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,h=-1/0,c=-1/0,f=0;f=0&&(u.dataIndex=c+(e.startIndex||0))})},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const Wfe=qfe;var Ufe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.updateData(a,{clipShape:this._getClipShape(r)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateSymbolDraw(a,r);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._symbolDraw.incrementalUpdate(r,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=r.end===n.getData().count()},e.prototype.updateTransform=function(r,n,i){var a=r.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Mp("").reset(r,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(r){this._symbolDraw&&this._symbolDraw.eachRendered(r)},e.prototype._getClipShape=function(r){var n=r.coordinateSystem,i=n&&n.getArea&&n.getArea();return r.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(r,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Wfe:new Dp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(hr);const Yfe=Ufe;var Xfe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Nt);const Zfe=Xfe;var Y5=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Rr).models[0]},e.type="cartesian2dAxis",e}(Nt);Or(Y5,Tp);var jF={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},jfe=bt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jF),Tw=bt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},jF),Kfe=bt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Tw),Jfe=rt({logBase:10},Tw);const KF={category:jfe,value:Tw,time:Kfe,log:Jfe};var Qfe={value:1,category:1,time:1,log:1};function Xc(t,e,r,n){W(Qfe,function(i,a){var o=bt(bt({},KF[a],!0),n,!0),s=function(l){pe(u,l);function u(){var h=l!==null&&l.apply(this,arguments)||this;return h.type=e+"Axis."+a,h}return u.prototype.mergeDefaultAndTheme=function(h,c){var f=Wd(this),d=f?uf(h):{},v=c.getTheme();bt(h,v.get(a+"Axis")),bt(h,this.getDefaultOption()),h.type=DT(h),f&&ul(h,d,f)},u.prototype.optionUpdated=function(){var h=this.option;h.type==="category"&&(this.__ordinalMeta=V5.createByAxisModel(this))},u.prototype.getCategories=function(h){var c=this.option;if(c.type==="category")return h?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(r);t.registerComponentModel(s)}),t.registerSubTypeDefaulter(e+"Axis",DT)}function DT(t){return t.type||(t.data?"category":"value")}var e0e=function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return Ce(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Jt(this.getAxes(),function(r){return r.scale.type===e})},t.prototype.addAxis=function(e){var r=e.dim;this._axes[r]=e,this._dimList.push(r)},t}();const t0e=e0e;var X5=["x","y"];function MT(t){return t.type==="interval"||t.type==="time"}var r0e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="cartesian2d",r.dimensions=X5,r}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var r=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!MT(r)||!MT(n))){var i=r.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var h=(s[0]-o[0])/l,c=(s[1]-o[1])/u,f=o[0]-i[0]*h,d=o[1]-a[0]*c,v=this._transform=[h,0,0,c,f,d];this._invTransform=ef([],v)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(r){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(r[0]))&&i.contain(i.toLocalCoord(r[1]))},e.prototype.containData=function(r){return this.getAxis("x").containData(r[0])&&this.getAxis("y").containData(r[1])},e.prototype.containZone=function(r,n){var i=this.dataToPoint(r),a=this.dataToPoint(n),o=this.getArea(),s=new St(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(r,n,i){i=i||[];var a=r[0],o=r[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return cn(i,r,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(r,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(r[0]),u=a.parse(r[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(r,n){var i=[];if(this._invTransform)return cn(i,r,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(r[0]),n),i[1]=o.coordToData(o.toLocalCoord(r[1]),n),i},e.prototype.getOtherAxis=function(r){return this.getAxis(r.dim==="x"?"y":"x")},e.prototype.getArea=function(){var r=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1]),a=Math.min(n[0],n[1]),o=Math.max(r[0],r[1])-i,s=Math.max(n[0],n[1])-a;return new St(i,a,o,s)},e}(t0e),n0e=function(t){pe(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var r=this.position;return r==="top"||r==="bottom"},e.prototype.getGlobalExtent=function(r){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),r&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(r,n){return this.coordToData(this.toLocalCoord(r[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(r){if(this.type!=="category")return!1;this.model.option.categorySortInfo=r,this.scale.setSortInfo(r)},e}(Aa);const i0e=n0e;function Z5(t,e,r){r=r||{};var n=t.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],f={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,v=u==="x"?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));v[f.onZero]=Math.max(Math.min(g,v[1]),v[0])}a.position=[u==="y"?v[f[l]]:c[0],u==="x"?v[f[l]]:c[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=m[s],a.labelOffset=o?v[f[s]]-v[f.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Qr(r.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function LT(t){return t.get("coordinateSystem")==="cartesian2d"}function ET(t){var e={xAxisModel:null,yAxisModel:null};return W(e,function(r,n){var i=n.replace(/Model$/,""),a=t.getReferringComponents(i,Rr).models[0];e[n]=a}),e}var sb=Math.log;function JF(t,e,r){var n=cl.prototype,i=n.getTicks.call(r),a=n.getTicks.call(r,!0),o=i.length-1,s=n.getInterval.call(r),l=nF(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if(t.type==="log"){var f=sb(t.base);u=[sb(u[0])/f,sb(u[1])/f]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:o,fixMin:h,fixMax:c});var d=n.getExtent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var v=n.getInterval.call(t),g=u[0],m=u[1];if(h&&c)v=(m-g)/o;else if(h)for(m=u[0]+v*o;mu[0]&&isFinite(g)&&isFinite(u[0]);)v=Yx(v),g=u[1]-v*o;else{var y=t.getTicks().length-1;y>o&&(v=Yx(v));var b=v*o;m=Math.ceil(u[1]/v)*v,g=kr(m-b),g<0&&u[0]>=0?(g=0,m=kr(b)):m>0&&u[1]<=0&&(m=0,g=-kr(b))}var w=(i[0].value-a[0].value)/s,T=(i[o].value-a[o].value)/s;n.setExtent.call(t,g+v*w,m+v*T),n.setInterval.call(t,v),(w||T)&&n.setNiceExtent.call(t,g+v,m-v)}var a0e=function(){function t(e,r,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=X5,this._initCartesian(e,r,n),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,r){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=Lt(o),u=l.length;if(u){for(var h=[],c=u-1;c>=0;c--){var f=+l[c],d=o[f],v=d.model,g=d.scale;$5(g)&&v.get("alignTicks")&&v.get("interval")==null?h.push(d):(Uc(g,v),$5(g)&&(s=d))}h.length&&(s||(s=h.pop(),Uc(s.scale,s.model)),W(h,function(m){JF(m.scale,m.model,s.scale)}))}}i(n.x),i(n.y);var a={};W(n.x,function(o){IT(n,"y",o,a)}),W(n.y,function(o){IT(n,"x",o,a)}),this.resize(this.model,r)},t.prototype.resize=function(e,r,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=$r(i,{width:r.getWidth(),height:r.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(W(s,function(u){if(!u.model.get(["axisLabel","inside"])){var h=_he(u);if(h){var c=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[c]-=h[c]+f,u.position==="top"?o.y+=h.height+f:u.position==="left"&&(o.x+=h.width+f)}}}),l()),W(this._coordsList,function(u){u.calcAffineTransform()});function l(){W(s,function(u){var h=u.isHorizontal(),c=h?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(c[f],c[1-f]),o0e(u,h?o.x:o.y)})}},t.prototype.getAxis=function(e,r){var n=this._axesMap[e];if(n!=null)return n[r||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,r){if(e!=null&&r!=null){var n="x"+e+"y"+r;return this._coordsMap[n]}nt(e)&&(r=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):I1(i-Xs)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},t.makeAxisEventDataBase=function(e){var r={componentType:e.mainType,componentIndex:e.componentIndex};return r[e.mainType+"Index"]=e.componentIndex,r},t.isLabelSilent=function(e){var r=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||r&&r.show)},t}(),PT={axisLine:function(t,e,r,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(cn(s,s,o),cn(l,l,o));var h=xe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new en({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Hc(c.shape,c.style.lineWidth),c.anid="line",r.add(c);var f=e.get(["axisLine","symbol"]);if(f!=null){var d=e.get(["axisLine","symbolSize"]);ze(f)&&(f=[f,f]),(ze(d)||$t(d))&&(d=[d,d]);var v=ah(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],m=d[1];W([{rotate:t.rotation+Math.PI/2,offset:v[0],r:0},{rotate:t.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,b){if(f[b]!=="none"&&f[b]!=null){var w=Fr(f[b],-g/2,-m/2,g,m,h.stroke,!0),T=y.r+y.offset,M=u?l:s;w.attr({rotation:y.rotate,x:M[0]+T*Math.cos(t.rotation),y:M[1]-T*Math.sin(t.rotation),silent:!0,z2:11}),r.add(w)}})}}},axisTickLabel:function(t,e,r,n){var i=h0e(r,n,e,t),a=f0e(r,n,e,t);if(u0e(e,a,i),c0e(r,n,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=gF(Ce(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));_F(o)}},axisName:function(t,e,r,n){var i=Qr(t.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),h=u[0]>u[1]?-1:1,c=[a==="start"?u[0]-h*l:a==="end"?u[1]+h*l:(u[0]+u[1])/2,FT(a)?t.labelOffset+o*l:0],f,d=e.get("nameRotate");d!=null&&(d=d*Xs/180);var v;FT(a)?f=Hu.innerTextLayout(t.rotation,d??t.rotation,o):(f=l0e(t.rotation,a,d||0,u),v=t.axisNameAvailableWidth,v!=null&&(v=Math.abs(v/Math.sin(f.rotation)),!isFinite(v)&&(v=null)));var g=s.getFont(),m=e.get("nameTruncate",!0)||{},y=m.ellipsis,b=Qr(t.nameTruncateMaxWidth,m.maxWidth,v),w=new Vt({x:c[0],y:c[1],rotation:f.rotation,silent:Hu.isLabelSilent(e),style:lr(s,{text:i,font:g,overflow:"truncate",width:b,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(af({el:w,componentModel:e,itemName:i}),w.__fullText=i,w.anid="name",e.get("triggerEvent")){var T=Hu.makeAxisEventDataBase(e);T.targetType="axisName",T.name=i,dt(w).eventData=T}n.add(w),w.updateTransform(),r.add(w),w.decomposeTransform()}}};function l0e(t,e,r,n){var i=jI(r-t),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return I1(i-Xs/2)?(o=l?"bottom":"top",a="center"):I1(i-Xs*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iXs/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function u0e(t,e,r){if(!iF(t.axis)){var n=t.get(["axisLabel","showMinLabel"]),i=t.get(["axisLabel","showMaxLabel"]);e=e||[],r=r||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],h=r[1],c=r[r.length-1],f=r[r.length-2];n===!1?(Ii(a),Ii(u)):RT(a,o)&&(n?(Ii(o),Ii(h)):(Ii(a),Ii(u))),i===!1?(Ii(s),Ii(c)):RT(l,s)&&(i?(Ii(l),Ii(f)):(Ii(s),Ii(c)))}}function Ii(t){t&&(t.ignore=!0)}function RT(t,e){var r=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!r||!n)){var i=$y([]);return nh(i,i,-t.rotation),r.applyTransform(Wo([],i,t.getLocalTransform())),n.applyTransform(Wo([],i,e.getLocalTransform())),r.intersect(n)}}function FT(t){return t==="middle"||t==="center"}function QF(t,e,r,n,i){for(var a=[],o=[],s=[],l=0;l=0||t===e}function y0e(t){var e=kw(t);if(e){var r=e.axisPointerModel,n=e.axis.scale,i=r.option,a=r.get("status"),o=r.get("value");o!=null&&(o=n.parse(o));var s=j5(r);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var g=l;v.color!=null&&(g=rt({color:v.color},l));var m=bt(ot(v),{boundaryGap:r,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:v.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:g,triggerEvent:f},!1);if(ze(h)){var y=m.name;m.name=h.replace("{value}",y??"")}else Je(h)&&(m.name=h(m.name,m));var b=new ur(m,null,this.ecModel);return Or(b,Tp.prototype),b.mainType="radar",b.componentIndex=this.componentIndex,b},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:bt({lineStyle:{color:"#bbb"}},w0.axisLine),axisLabel:Ug(w0.axisLabel,!1),axisTick:Ug(w0.axisTick,!1),splitLine:Ug(w0.splitLine,!0),splitArea:Ug(w0.splitArea,!0),indicator:[]},e}(Nt);const P0e=B0e;var R0e=["axisLine","axisTickLabel","axisName"],F0e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll(),this._buildAxes(r),this._buildSplitLineAndArea(r)},e.prototype._buildAxes=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes(),a=Ce(i,function(o){var s=o.model.get("showName")?o.name:"",l=new rs(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});W(a,function(o){W(R0e,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(r){var n=r.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=r.get("shape"),o=r.getModel("splitLine"),s=r.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),h=o.get("show"),c=s.get("show"),f=l.get("color"),d=u.get("color"),v=Se(f)?f:[f],g=Se(d)?d:[d],m=[],y=[];function b(J,K,se){var ae=se%K.length;return J[ae]=J[ae]||[],ae}if(a==="circle")for(var w=i[0].getTicksCoords(),T=n.cx,M=n.cy,D=0;D3?1.4:o>1?1.2:1.1,h=a>0?u:1/u;hb(this,"zoom","zoomOnMouseWheel",r,{scale:h,originX:s,originY:l,isAvailableBehavior:null})}if(i){var c=Math.abs(a),f=(a>0?1:-1)*(c>3?.4:c>1?.15:.05);hb(this,"scrollMove","moveOnMouseWheel",r,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(r){if(!GT(this._zr,"globalPan")){var n=r.pinchScale>1?1.1:1/1.1;hb(this,"zoom",null,r,{scale:n,originX:r.pinchX,originY:r.pinchY,isAvailableBehavior:null})}},e}(Ki);function hb(t,e,r,n,i){t.pointerChecker&&t.pointerChecker(n,i.originX,i.originY)&&(Ko(n.event),aO(t,e,r,n,i))}function aO(t,e,r,n,i){i.isAvailableBehavior=Ge(qm,null,r,n),t.trigger(e,i)}function qm(t,e,r){var n=r[t];return!t||n&&(!ze(n)||e.event[n+"Key"])}const Ip=U0e;function Mw(t,e,r){var n=t.target;n.x+=e,n.y+=r,n.dirty()}function Lw(t,e,r,n){var i=t.target,a=t.zoomLimit,o=t.zoom=t.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/t.zoom;t.zoom=o,i.x-=(r-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var Y0e={axisPointer:1,tooltip:1,brush:1};function y2(t,e,r){var n=e.getComponentByElement(t.topTarget),i=n&&n.coordinateSystem;return n&&n!==r&&!Y0e.hasOwnProperty(n.mainType)&&i&&i.model!==r}function oO(t){if(ze(t)){var e=new DOMParser;t=e.parseFromString(t,"text/xml")}var r=t;for(r.nodeType===9&&(r=r.firstChild);r.nodeName.toLowerCase()!=="svg"||r.nodeType!==1;)r=r.nextSibling;return r}var cb,ty={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},HT=Lt(ty),ry={"alignment-baseline":"textBaseline","stop-color":"stopColor"},qT=Lt(ry),X0e=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(e,r){r=r||{};var n=oO(e);this._defsUsePending=[];var i=new st;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||r.width),l=parseFloat(n.getAttribute("height")||r.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),yi(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;K0e(this._defs,this._defsUsePending),this._defsUsePending=[];var h,c;if(o){var f=_2(o);f.length>=4&&(h={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(h&&s!=null&&l!=null&&(c=lO(h,{x:0,y:0,width:s,height:l}),!r.ignoreViewBox)){var d=i;i=new st,i.add(d),d.scaleX=d.scaleY=c.scale,d.x=c.x,d.y=c.y}return!r.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Rt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:h,viewBoxTransform:c,named:a}},t.prototype._parseNode=function(e,r,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=r;else{if(!a){var h=cb[s];if(h&&He(cb,s)){l=h.call(this,e,r);var c=e.getAttribute("name");if(c){var f={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});r.add(l)}}var d=WT[s];if(d&&He(WT,s)){var v=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=v)}}if(l&&l.isGroup)for(var m=e.firstChild;m;)m.nodeType===1?this._parseNode(m,l,n,u,a,o):m.nodeType===3&&o&&this._parseText(m,l),m=m.nextSibling},t.prototype._parseText=function(e,r){var n=new zd({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),Z0e(n,r);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,r.add(n),n},t.internalField=function(){cb={g:function(e,r){var n=new st;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n},rect:function(e,r){var n=new Rt;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,r){var n=new fo;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,r){var n=new en;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,r){var n=new VS;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,r){var n=e.getAttribute("points"),i;n&&(i=XT(n));var a=new ui({shape:{points:i||[]},silent:!0});return Bi(r,a),yi(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,r){var n=e.getAttribute("points"),i;n&&(i=XT(n));var a=new hi({shape:{points:i||[]},silent:!0});return Bi(r,a),yi(e,a,this._defsUsePending,!1,!1),a},image:function(e,r){var n=new vn;return Bi(r,n),yi(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,r){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new st;return Bi(r,s),yi(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,r){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new st;return Bi(r,s),yi(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,r){var n=e.getAttribute("d")||"",i=FB(n);return Bi(r,i),yi(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),t}(),WT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),a=new yp(e,r,n,i);return UT(t,a),YT(t,a),a},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),i=new ZB(e,r,n);return UT(t,i),YT(t,i),i}};function UT(t,e){var r=t.getAttribute("gradientUnits");r==="userSpaceOnUse"&&(e.global=!0)}function YT(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1&&r.nodeName.toLocaleLowerCase()==="stop"){var n=r.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};sO(r,a,a);var o=a.stopColor||r.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}r=r.nextSibling}}function Bi(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),rt(e.__inheritedStyle,t.__inheritedStyle))}function XT(t){for(var e=_2(t),r=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=_2(o);switch(i=i||Zi(),s){case"translate":lo(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":CS(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":nh(i,i,-parseFloat(l[0])*fb);break;case"skewX":var u=Math.tan(parseFloat(l[0])*fb);Wo(i,[1,0,u,1,0,0],i);break;case"skewY":var h=Math.tan(parseFloat(l[0])*fb);Wo(i,[1,h,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var jT=/([^\s:;]+)\s*:\s*([^:;]+)/g;function sO(t,e,r){var n=t.getAttribute("style");if(n){jT.lastIndex=0;for(var i;(i=jT.exec(n))!=null;){var a=i[1],o=He(ty,a)?ty[a]:null;o&&(e[o]=i[2]);var s=He(ry,a)?ry[a]:null;s&&(r[s]=i[2])}}}function tde(t,e,r){for(var n=0;n0,m={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,r,n),this._updateMapSelectHandler(e,u,n,i)},t.prototype._buildGeoJSON=function(e){var r=this._regionsGroupByName=Ye(),n=Ye(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function h(d,v){return v&&(d=v(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function c(d){for(var v=[],g=!u&&l&&l.project,m=0;m=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;pn(e,Xr(n),{labelFetcher:f,labelDataIndex:c,defaultText:r},d);var v=e.getTextContent();if(v&&(uO(v).ignore=v.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function t9(t,e,r,n,i,a){t.data?t.data.setItemGraphicEl(a,e):dt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:r,region:n&&n.option||{}}}function r9(t,e,r,n,i){t.data||af({el:e,componentModel:i,itemName:r,itemTooltipOption:n.get("tooltip")})}function n9(t,e,r,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return wr(e,o,a.get("blurScope"),a.get("disabled")),t.isGeo&&Sae(e,i,r),o}function i9(t,e,r){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!r&&s.polygonStart(),W(t,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(pr);const wde=Sde;function Cde(t,e){var r={};return W(t,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);r[o]=r[o]||[],isNaN(i)||r[o].push(i)})}),t[0].map(t[0].mapDimension("value"),function(n,i){for(var a="ec-"+t[0].getName(i),o=0,s=1/0,l=-1/0,u=r[a].length,h=0;h1?(T.width=w,T.height=w/m):(T.height=w,T.width=w*m),T.y=b[1]-T.height/2,T.x=b[0]-T.width/2;else{var M=t.getBoxLayoutParams();M.aspect=m,T=$r(M,{width:v,height:g})}this.setViewRect(T.x,T.y,T.width,T.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}function Mde(t,e){W(e.get("geoCoord"),function(r,n){t.addGeoCoord(n,r)})}var Lde=function(){function t(){this.dimensions=cO}return t.prototype.create=function(e,r){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new l9(l+s,l,xe({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=u9,u.resize(o,r)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),W(a,function(o,s){var l=Ce(o,function(h){return h.get("nameMap")}),u=new l9(s,s,xe({nameMap:_S(l)},i(o[0])));u.zoomLimit=Qr.apply(null,Ce(o,function(h){return h.get("scaleLimit")})),n.push(u),u.resize=u9,u.resize(o[0],r),W(o,function(h){h.coordinateSystem=u,Mde(u,h)})}),n},t.prototype.getFilledRegions=function(e,r,n,i){for(var a=(e||[]).slice(),o=Ye(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(s)}}function zde(t,e){var r=t.isExpand?t.children:[],n=t.parentNode.children,i=t.hierNode.i?n[t.hierNode.i-1]:null;if(r.length){Gde(t);var a=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=Hde(t,i,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Vde(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function c9(t){return arguments.length?t:Ude}function Z0(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function $de(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Gde(t){for(var e=t.children,r=e.length,n=0,i=0;--r>=0;){var a=e[r];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function Hde(t,e,r,n){if(e){for(var i=t,a=t,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,h=o.hierNode.modifier,c=s.hierNode.modifier;s=db(s),a=pb(a),s&&a;){i=db(i),o=pb(o),i.hierNode.ancestor=t;var f=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);f>0&&(Wde(qde(s,t,r),t,f),u+=f,l+=f),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!db(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=c-l),a&&!pb(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-h,r=t)}return r}function db(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function pb(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function qde(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function Wde(t,e,r){var n=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=n}function Ude(t,e){return t.parentNode===e.parentNode?1:2}var Yde=function(){function t(){this.parentPoint=[],this.childPoints=[]}return t}(),Xde=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Yde},e.prototype.buildPath=function(r,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){r.moveTo(o[0],o[1]),r.lineTo(s[0],s[1]);return}var u=n.orient,h=u==="TB"||u==="BT"?0:1,c=1-h,f=Be(n.forkPosition,1),d=[];d[h]=o[h],d[c]=o[c]+(l[c]-o[c])*f,r.moveTo(o[0],o[1]),r.lineTo(d[0],d[1]),r.moveTo(s[0],s[1]),d[h]=s[h],r.lineTo(d[0],d[1]),d[h]=l[h],r.lineTo(d[0],d[1]),r.lineTo(l[0],l[1]);for(var v=1;vb.x,M||(T=T-Math.PI));var P=M?"left":"right",O=s.getModel("label"),V=O.get("rotate"),$=V*(Math.PI/180),H=m.getTextContent();H&&(m.setTextConfig({position:O.get("position")||P,rotation:V==null?-T:$,origin:"center"}),H.setStyle("verticalAlign","middle"))}var j=s.get(["emphasis","focus"]),q=j==="relative"?C1(o.getAncestorsIndices(),o.getDescendantIndices()):j==="ancestor"?o.getAncestorsIndices():j==="descendant"?o.getDescendantIndices():null;q&&(dt(r).focus=q),jde(i,o,h,r,v,d,g,n),r.__edge&&(r.onHoverStateChange=function(G){if(G!=="blur"){var J=o.parentNode&&t.getItemGraphicEl(o.parentNode.dataIndex);J&&J.hoverState===mp||P1(r.__edge,G)}})}function jde(t,e,r,n,i,a,o,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),f=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),v=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(g||(g=n.__edge=new Ky({shape:Q5(h,c,f,i,i)})),Gt(g,{shape:Q5(h,c,f,a,o)},t));else if(u==="polyline"&&h==="orthogonal"&&e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var m=e.children,y=[],b=0;br&&(r=i.height)}this.height=r+1},t.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var r=0,n=this.children,i=n.length;r=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,r)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(e){if(!(this.dataIndex<0)){var r=this.hostTree,n=r.data.getItemModel(this.dataIndex);return n.getModel(e)}},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(e,r){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,r)},t.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,r=0;r=0){var n=r.getData().tree.root,i=t.targetNode;if(ze(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=t.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function yO(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function Rw(t,e){var r=yO(t);return Ct(r,e)>=0}function x2(t,e){for(var r=[];t;){var n=t.dataIndex;r.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return r.reverse(),r}var spe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.hasSymbolVisual=!0,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r){var n={name:r.name,children:r.data},i=r.leaves||{},a=new ur(i,this,this.ecModel),o=Pw.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(f,d){var v=o.getNodeByDataIndex(d);return v&&v.children.length&&v.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=r.expandAndCollapse,h=u&&r.initialTreeDepth>=0?r.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var f=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=f&&f.collapsed!=null?!f.collapsed:c.depth<=h}),o.data},e.prototype.getOrient=function(){var r=this.get("orient");return r==="horizontal"?r="LR":r==="vertical"&&(r="TB"),r},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.formatTooltip=function(r,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(r),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Zr("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=x2(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(pr);const lpe=spe;function upe(t,e,r){for(var n=[t],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)r.push(i[a])}}function hpe(t,e){t.eachSeriesByType("tree",function(r){cpe(r,e)})}function cpe(t,e){var r=$de(t,e);t.layoutInfo=r;var n=t.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(r.height,r.width)/2,o=c9(function(w,T){return(w.parentNode===T.parentNode?1:2)/w.depth})):(i=r.width,a=r.height,o=c9());var s=t.getData().tree.root,l=s.children[0];if(l){Nde(s),upe(l,zde,o),s.hierNode.modifier=-l.hierNode.prelim,A0(l,Vde);var u=l,h=l,c=l;A0(l,function(w){var T=w.getLayout().x;Th.getLayout().x&&(h=w),w.depth>c.depth&&(c=w)});var f=u===h?1:o(u,h)/2,d=f-u.getLayout().x,v=0,g=0,m=0,y=0;if(n==="radial")v=i/(h.getLayout().x+f+d),g=a/(c.depth-1||1),A0(l,function(w){m=(w.getLayout().x+d)*v,y=(w.depth-1)*g;var T=Z0(m,y);w.setLayout({x:T.x,y:T.y,rawX:m,rawY:y},!0)});else{var b=t.getOrient();b==="RL"||b==="LR"?(g=a/(h.getLayout().x+f+d),v=i/(c.depth-1||1),A0(l,function(w){y=(w.getLayout().x+d)*g,m=b==="LR"?(w.depth-1)*v:i-(w.depth-1)*v,w.setLayout({x:m,y},!0)})):(b==="TB"||b==="BT")&&(v=i/(h.getLayout().x+f+d),g=a/(c.depth-1||1),A0(l,function(w){m=(w.getLayout().x+d)*v,y=b==="TB"?(w.depth-1)*g:a-(w.depth-1)*g,w.setLayout({x:m,y},!0)}))}}}function fpe(t){t.eachSeriesByType("tree",function(e){var r=e.getData(),n=r.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=r.ensureUniqueItemVisual(i.dataIndex,"style");xe(s,o)})})}function dpe(t){t.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,r,n){r.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=Iw(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function ppe(t){t.registerChartView(Kde),t.registerSeriesModel(lpe),t.registerLayout(hpe),t.registerVisual(fpe),dpe(t)}var g9=["treemapZoomToNode","treemapRender","treemapMove"];function vpe(t){for(var e=0;e1;)a=a.parentNode;var o=D5(t.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var gpe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.preventUsingHoverLayer=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};xO(i);var a=r.levels||[],o=this.designatedVisualItemStyle={},s=new ur({itemStyle:o},this,n);a=r.levels=mpe(a,n);var l=Ce(a||[],function(c){return new ur(c,s,n)},this),u=Pw.createTree(i,this,h);function h(c){c.wrapMethod("getItemModel",function(f,d){var v=u.getNodeByDataIndex(d),g=v?l[v.depth]:null;return f.parentModel=g||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(r,n,i){var a=this.getData(),o=this.getRawValue(r),s=a.getName(r);return Zr("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treeAncestors=x2(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(r){this.layoutInfo=this.layoutInfo||{},xe(this.layoutInfo,r)},e.prototype.mapIdToIndex=function(r){var n=this._idIndexMap;n||(n=this._idIndexMap=Ye(),this._idIndexMapCount=0);var i=n.get(r);return i==null&&n.set(r,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){_O(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(pr);function xO(t){var e=0;W(t.children,function(n){xO(n);var i=n.value;Se(i)&&(i=i[0]),e+=i});var r=t.value;Se(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),Se(t.value)?t.value[0]=r:t.value=r}function mpe(t,e){var r=er(e.get("color")),n=er(e.get(["aria","decal","decals"]));if(r){t=t||[];var i,a;W(t,function(s){var l=new ur(s),u=l.get("color"),h=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||h&&h!=="none")&&(a=!0)});var o=t[0]||(t[0]={});return i||(o.color=r.slice()),!a&&n&&(o.decal=n.slice()),t}}const ype=gpe;var _pe=8,m9=8,vb=5,xpe=function(){function t(e){this.group=new st,e.add(this.group)}return t.prototype.render=function(e,r,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),h=l.getModel(["itemStyle","textStyle"]),c={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:r.getWidth(),height:r.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,u),this._renderContent(e,c,s,l,u,h,i),o2(o,c.pos,c.box)}},t.prototype._prepare=function(e,r,n){for(var i=e;i;i=i.parentNode){var a=Vr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+_pe*2,r.emptyItemWidth);r.totalWidth+=s+m9,r.renderList.push({node:i,text:a,width:s})}},t.prototype._renderContent=function(e,r,n,i,a,o,s){for(var l=0,u=r.emptyItemWidth,h=e.get(["breadcrumb","height"]),c=Eoe(r.pos,r.box),f=r.totalWidth,d=r.renderList,v=i.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var m=d[g],y=m.node,b=m.width,w=m.text;f>c.width&&(f-=b-u,b=u,w=null);var T=new ui({shape:{points:bpe(l,0,b,h,g===d.length-1,g===0)},style:rt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Vt({style:lr(a,{text:w})}),textConfig:{position:"inside"},z2:rf*1e4,onclick:pt(s,y)});T.disableLabelAnimation=!0,T.getTextContent().ensureState("emphasis").style=lr(o,{text:w}),T.ensureState("emphasis").style=v,wr(T,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(T),Spe(T,e,y),l+=b+m9}},t.prototype.remove=function(){this.group.removeAll()},t}();function bpe(t,e,r,n,i,a){var o=[[i?t:t-vb,e],[t+r,e],[t+r,e+n],[i?t:t-vb,e+n]];return!a&&o.splice(2,0,[t+r+vb,e+n/2]),!i&&o.push([t,e+n/2]),o}function Spe(t,e,r){dt(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&x2(r,e)}}const wpe=xpe;var Cpe=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(e,r,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:r,duration:n,delay:i,easing:a}),!0)},t.prototype.finished=function(e){return this._finishedCallback=e,this},t.prototype.start=function(){for(var e=this,r=this._storage.length,n=function(){r--,r<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;i_9||Math.abs(r.dy)>_9)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+r.dx,y:i.y+r.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(r){var n=r.originX,i=r.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new St(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;n-=l.x,i-=l.y;var u=Zi();lo(u,u,[-n,-i]),CS(u,u,[r.scale,r.scale]),lo(u,u,[n,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(r){var n=this;r.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),h=l.get("target",!0)||"blank";u&&V1(u,h)}}}}},this)},e.prototype._renderBreadcrumb=function(r,n,i){var a=this;i||(i=r.get("leafDepth",!0)!=null?{node:r.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:r.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new wpe(this.group))).render(r,n,i.node,function(o){a._state!=="animating"&&(Rw(r.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=T0(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(r){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype._rootToNode=function(r){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:r.node})},e.prototype.findTarget=function(r,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(r,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(hr);function T0(){return{nodeGroup:[],background:[],content:[]}}function Lpe(t,e,r,n,i,a,o,s,l,u){if(!o)return;var h=o.getLayout(),c=t.getData(),f=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var d=h.width,v=h.height,g=h.borderWidth,m=h.invisible,y=o.getRawIndex(),b=s&&s.getRawIndex(),w=o.viewChildren,T=h.upperHeight,M=w&&w.length,D=f.getModel("itemStyle"),P=f.getModel(["emphasis","itemStyle"]),O=f.getModel(["blur","itemStyle"]),V=f.getModel(["select","itemStyle"]),$=D.get("borderRadius")||0,H=Pe("nodeGroup",e3);if(!H)return;if(l.add(H),H.x=h.x||0,H.y=h.y||0,H.markRedraw(),ny(H).nodeWidth=d,ny(H).nodeHeight=v,h.isAboveViewRoot)return H;var j=Pe("background",y9,u,kpe);j&&ce(H,j,M&&h.upperLabelHeight);var q=f.getModel("emphasis"),G=q.get("focus"),J=q.get("blurScope"),K=q.get("disabled"),se=G==="ancestor"?o.getAncestorsIndices():G==="descendant"?o.getDescendantIndices():G;if(M)$d(H)&&ku(H,!1),j&&(ku(j,!K),c.setItemGraphicEl(o.dataIndex,j),x5(j,se,J));else{var ae=Pe("content",y9,u,Dpe);ae&&ye(H,ae),j.disableMorphing=!0,j&&$d(j)&&ku(j,!1),ku(H,!K),c.setItemGraphicEl(o.dataIndex,H),x5(H,se,J)}return H;function ce(et,qe,lt){var it=dt(qe);if(it.dataIndex=o.dataIndex,it.seriesIndex=t.seriesIndex,qe.setShape({x:0,y:0,width:d,height:v,r:$}),m)de(qe);else{qe.invisible=!1;var Re=o.getVisual("style"),Ae=Re.stroke,Xt=S9(D);Xt.fill=Ae;var ht=du(P);ht.fill=P.get("borderColor");var Zt=du(O);Zt.fill=O.get("borderColor");var Mt=du(V);if(Mt.fill=V.get("borderColor"),lt){var Ar=d-2*g;De(qe,Ae,Re.opacity,{x:g,y:0,width:Ar,height:T})}else qe.removeTextContent();qe.setStyle(Xt),qe.ensureState("emphasis").style=ht,qe.ensureState("blur").style=Zt,qe.ensureState("select").style=Mt,Ju(qe)}et.add(qe)}function ye(et,qe){var lt=dt(qe);lt.dataIndex=o.dataIndex,lt.seriesIndex=t.seriesIndex;var it=Math.max(d-2*g,0),Re=Math.max(v-2*g,0);if(qe.culling=!0,qe.setShape({x:g,y:g,width:it,height:Re,r:$}),m)de(qe);else{qe.invisible=!1;var Ae=o.getVisual("style"),Xt=Ae.fill,ht=S9(D);ht.fill=Xt,ht.decal=Ae.decal;var Zt=du(P),Mt=du(O),Ar=du(V);De(qe,Xt,Ae.opacity,null),qe.setStyle(ht),qe.ensureState("emphasis").style=Zt,qe.ensureState("blur").style=Mt,qe.ensureState("select").style=Ar,Ju(qe)}et.add(qe)}function de(et){!et.invisible&&a.push(et)}function De(et,qe,lt,it){var Re=f.getModel(it?b9:x9),Ae=Vr(f.get("name"),null),Xt=Re.getShallow("show");pn(et,Xr(f,it?b9:x9),{defaultText:Xt?Ae:null,inheritColor:qe,defaultOpacity:lt,labelFetcher:t,labelDataIndex:o.dataIndex});var ht=et.getTextContent();if(ht){var Zt=ht.style,Mt=bS(Zt.padding||0);it&&(et.setTextConfig({layoutRect:it}),ht.disableLabelLayout=!0),ht.beforeUpdate=function(){var dr=Math.max((it?it.width:et.shape.width)-Mt[1]-Mt[3],0),Kt=Math.max((it?it.height:et.shape.height)-Mt[0]-Mt[2],0);(Zt.width!==dr||Zt.height!==Kt)&&ht.setStyle({width:dr,height:Kt})},Zt.truncateMinChar=2,Zt.lineOverflow="truncate",Ie(Zt,it,h);var Ar=ht.getState("emphasis");Ie(Ar?Ar.style:null,it,h)}}function Ie(et,qe,lt){var it=et?et.text:null;if(!qe&<.isLeafRoot&&it!=null){var Re=t.get("drillDownIcon",!0);et.text=Re?Re+" "+it:it}}function Pe(et,qe,lt,it){var Re=b!=null&&r[et][b],Ae=i[et];return Re?(r[et][b]=null,Qe(Ae,Re)):m||(Re=new qe,Re instanceof ji&&(Re.z2=Epe(lt,it)),Ke(Ae,Re)),e[et][y]=Re}function Qe(et,qe){var lt=et[y]={};qe instanceof e3?(lt.oldX=qe.x,lt.oldY=qe.y):lt.oldShape=xe({},qe.shape)}function Ke(et,qe){var lt=et[y]={},it=o.parentNode,Re=qe instanceof st;if(it&&(!n||n.direction==="drillDown")){var Ae=0,Xt=0,ht=i.background[it.getRawIndex()];!n&&ht&&ht.oldShape&&(Ae=ht.oldShape.width,Xt=ht.oldShape.height),Re?(lt.oldX=0,lt.oldY=Xt):lt.oldShape={x:Ae,y:Xt,width:0,height:0}}lt.fadein=!Re}}function Epe(t,e){return t*Tpe+e}const Ipe=Mpe;var tp=W,Bpe=nt,iy=-1,Fw=function(){function t(e){var r=e.mappingMethod,n=e.type,i=this.option=ot(e);this.type=n,this.mappingMethod=r,this._normalizeData=Fpe[r];var a=t.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[r],r==="piecewise"?(gb(i),Ppe(i)):r==="category"?i.categories?Rpe(i):gb(i,!0):(Un(r!=="linear"||i.dataExtent),gb(i))}return t.prototype.mapValueToVisual=function(e){var r=this._normalizeData(e);return this._normalizedToVisual(r,e)},t.prototype.getNormalizer=function(){return Ge(this._normalizeData,this)},t.listVisualTypes=function(){return Lt(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(e,r,n){nt(e)?W(e,r,n):r.call(n,e)},t.mapVisual=function(e,r,n){var i,a=Se(e)?[]:nt(e)?{}:(i=!0,null);return t.eachVisual(e,function(o,s){var l=r.call(n,o,s);i?a=l:a[s]=l}),a},t.retrieveVisuals=function(e){var r={},n;return e&&tp(t.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(r[a]=e[a],n=!0)}),n?r:null},t.prepareVisualTypes=function(e){if(Se(e))e=e.slice();else if(Bpe(e)){var r=[];tp(e,function(n,i){r.push(i)}),e=r}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},t.dependsOn=function(e,r){return r==="color"?!!(e&&e.indexOf(r)===0):e===r},t.findPieceIndex=function(e,r,n){for(var i,a=1/0,o=0,s=r.length;o=0;a--)n[a]==null&&(delete r[e[a]],e.pop())}function gb(t,e){var r=t.visual,n=[];nt(r)?tp(r,function(a){n.push(a)}):r!=null&&n.push(r);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(t.type)&&(n[1]=n[0]),bO(t,n)}function Xg(t){return{applyVisual:function(e,r,n){var i=this.mapValueToVisual(e);n("color",t(r("color"),i))},_normalizedToVisual:t3([0,1])}}function w9(t){var e=this.option.visual;return e[Math.round(jt(t,[0,1],[0,e.length-1],!0))]||{}}function k0(t){return function(e,r,n){n(t,this.mapValueToVisual(e))}}function j0(t){var e=this.option.visual;return e[this.option.loop&&t!==iy?t%e.length:t]}function pu(){return this.option.visual[0]}function t3(t){return{linear:function(e){return jt(e,t,this.option.visual,!0)},category:j0,piecewise:function(e,r){var n=r3.call(this,r);return n==null&&(n=jt(e,t,this.option.visual,!0)),n},fixed:pu}}function r3(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var n=Fw.findPieceIndex(t,r),i=r[n];if(i&&i.visual)return i.visual[this.type]}}function bO(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=Ce(e,function(r){var n=bi(r);return n||[0,0,0,1]})),e}var Fpe={linear:function(t){return jt(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=Fw.findPieceIndex(t,e,!0);if(r!=null)return jt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??iy},fixed:Ir};function Zg(t,e,r){return t?e<=r:e=r.length||g===r[g.depth]){var y=Gpe(i,l,g,m,v,n);wO(g,y,r,n)}})}}}function zpe(t,e,r){var n=xe({},e),i=r.designatedVisualItemStyle;return W(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=t.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function C9(t){var e=mb(t,"color");if(e){var r=mb(t,"colorAlpha"),n=mb(t,"colorSaturation");return n&&(e=id(e,null,null,n)),r&&(e=k1(e,r)),e}}function Vpe(t,e){return e!=null?id(e,null,null,t):null}function mb(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function $pe(t,e,r,n,i,a){if(!(!a||!a.length)){var o=yb(e,"color")||i.color!=null&&i.color!=="none"&&(yb(e,"colorAlpha")||yb(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(h==="index"||h==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var f=new fn(c);return SO(f).drColorMappingBy=h,f}}}function yb(t,e){var r=t.get(e);return Se(r)&&r.length?{name:e,range:r}:null}function Gpe(t,e,r,n,i,a){var o=xe({},e);if(i){var s=i.type,l=s==="color"&&SO(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var rp=Math.max,ay=Math.min,A9=Qr,Ow=W,CO=["itemStyle","borderWidth"],Hpe=["itemStyle","gapWidth"],qpe=["upperLabel","show"],Wpe=["upperLabel","height"];const Upe={seriesType:"treemap",reset:function(t,e,r,n){var i=r.getWidth(),a=r.getHeight(),o=t.option,s=$r(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=Be(A9(s.width,l[0]),i),h=Be(A9(s.height,l[1]),a),c=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],d=ep(n,f,t),v=c==="treemapRender"||c==="treemapMove"?n.rootRect:null,g=t.getViewRoot(),m=yO(g);if(c!=="treemapMove"){var y=c==="treemapZoomToNode"?Jpe(t,d,g,u,h):v?[v.width,v.height]:[u,h],b=o.sort;b&&b!=="asc"&&b!=="desc"&&(b="desc");var w={squareRatio:o.squareRatio,sort:b,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var T={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};g.setLayout(T),AO(g,w,!1,0),T=g.getLayout(),Ow(m,function(D,P){var O=(m[P+1]||g).getValue();D.setLayout(xe({dataExtent:[O,O],borderWidth:0,upperHeight:0},T))})}var M=t.getData().tree.root;M.setLayout(Qpe(s,v,d),!0),t.setLayoutInfo(s),TO(M,new St(-s.x,-s.y,i,a),m,g,0)}};function AO(t,e,r,n){var i,a;if(!t.isRemoved()){var o=t.getLayout();i=o.width,a=o.height;var s=t.getModel(),l=s.get(CO),u=s.get(Hpe)/2,h=kO(s),c=Math.max(l,h),f=l-u,d=c-u;t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),i=rp(i-2*f,0),a=rp(a-f-d,0);var v=i*a,g=Ype(t,s,v,e,r,n);if(g.length){var m={x:f,y:d,width:i,height:a},y=ay(i,a),b=1/0,w=[];w.area=0;for(var T=0,M=g.length;T=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function Kpe(t,e,r){for(var n=0,i=1/0,a=0,o=void 0,s=t.length;an&&(n=o));var l=t.area*t.area,u=e*e*r;return l?rp(u*n/l,l/(u*i)):1/0}function T9(t,e,r,n,i){var a=e===r.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=r[s[a]],h=e?t.area/e:0;(i||h>r[l[o]])&&(h=r[l[o]]);for(var c=0,f=t.length;cO7&&(u=O7),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(M[0]=-M[0],M[1]=-M[1]);var P=T[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var O=-Math.atan2(T[1],T[0]);c[0].8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*y+h[0],a.y=-f[1]*b+h[1],v=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*P+h[0],a.y=h[1]+V,v=T[0]<0?"right":"left",a.originX=-y*P,a.originY=-V;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=D[0],a.y=D[1]+V,v="center",a.originY=-V;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*P+c[0],a.y=c[1]+V,v=T[0]>=0?"right":"left",a.originX=y*P,a.originY=-V;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||v})}},e}(st);const $w=yve;var _ve=function(){function t(e){this.group=new st,this._LineCtor=e||$w}return t.prototype.updateData=function(e){var r=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=I9(e);e.diff(a).add(function(s){r._doAdd(e,s,o)}).update(function(s,l){r._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},t.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(r,n){r.updateLayout(e,n)},this)},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=I9(e),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,r){this._progressiveEls=[];function n(s){!s.isGroup&&!xve(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function I9(t){var e=t.hostModel,r=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:r.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:r.get("disabled"),blurScope:r.get("blurScope"),focus:r.get("focus"),labelStatesModels:Xr(e)}}function B9(t){return isNaN(t[0])||isNaN(t[1])}function wb(t){return t&&!B9(t[0])&&!B9(t[1])}const Gw=_ve;var Cb=[],Ab=[],Tb=[],hc=Jr,kb=Ru,P9=Math.abs;function R9(t,e,r){for(var n=t[0],i=t[1],a=t[2],o=1/0,s,l=r*r,u=.1,h=.1;h<=.9;h+=.1){Cb[0]=hc(n[0],i[0],a[0],h),Cb[1]=hc(n[1],i[1],a[1],h);var c=P9(kb(Cb,e)-l);c=0?s=s+u:s=s-u:v>=0?s=s-u:s=s+u}return s}function Db(t,e){var r=[],n=Rd,i=[[],[],[]],a=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[qo(u[0]),qo(u[1])],u[2]&&u.__original.push(qo(u[2])));var f=u.__original;if(u[2]!=null){if(Nn(i[0],f[0]),Nn(i[1],f[2]),Nn(i[2],f[1]),h&&h!=="none"){var d=J0(s.node1),v=R9(i,f[0],d*e);n(i[0][0],i[1][0],i[2][0],v,r),i[0][0]=r[3],i[1][0]=r[4],n(i[0][1],i[1][1],i[2][1],v,r),i[0][1]=r[3],i[1][1]=r[4]}if(c&&c!=="none"){var d=J0(s.node2),v=R9(i,f[1],d*e);n(i[0][0],i[1][0],i[2][0],v,r),i[1][0]=r[1],i[2][0]=r[2],n(i[0][1],i[1][1],i[2][1],v,r),i[1][1]=r[1],i[2][1]=r[2]}Nn(u[0],i[0]),Nn(u[1],i[2]),Nn(u[2],i[1])}else{if(Nn(a[0],f[0]),Nn(a[1],f[1]),Au(o,a[1],a[0]),Qc(o,o),h&&h!=="none"){var d=J0(s.node1);U4(a[0],a[0],o,d*e)}if(c&&c!=="none"){var d=J0(s.node2);U4(a[1],a[1],o,-d*e)}Nn(u[0],a[0]),Nn(u[1],a[1])}})}function F9(t){return t.type==="view"}var bve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){var i=new Dp,a=new Gw,o=this.group;this._controller=new Ip(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(r,n,i){var a=this,o=r.coordinateSystem;this._model=r;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(F9(o)){var h={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(h):Gt(u,h,r)}Db(r.getGraph(),K0(r));var c=r.getData();s.updateData(c);var f=r.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(r,n,i),clearTimeout(this._layoutTimeout);var d=r.forceLayout,v=r.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,v);var g=r.get("layout");c.graph.eachNode(function(w){var T=w.dataIndex,M=w.getGraphicEl(),D=w.getModel();if(M){M.off("drag").off("dragend");var P=D.get("draggable");P&&M.on("drag",function(V){switch(g){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,v),d.setFixed(T),c.setItemLayout(T,[M.x,M.y]);break;case"circular":c.setItemLayout(T,[M.x,M.y]),w.setLayout({fixed:!0},!0),Vw(r,"symbolSize",w,[V.offsetX,V.offsetY]),a.updateLayout(r);break;case"none":default:c.setItemLayout(T,[M.x,M.y]),zw(r.getGraph(),r),a.updateLayout(r);break}}).on("dragend",function(){d&&d.setUnfixed(T)}),M.setDraggable(P,!!D.get("cursor"));var O=D.get(["emphasis","focus"]);O==="adjacency"&&(dt(M).focus=w.getAdjacentDataIndices())}}),c.graph.eachEdge(function(w){var T=w.getGraphicEl(),M=w.getModel().get(["emphasis","focus"]);T&&M==="adjacency"&&(dt(T).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var m=r.get("layout")==="circular"&&r.get(["circular","rotateLabel"]),y=c.getLayout("cx"),b=c.getLayout("cy");c.graph.eachNode(function(w){EO(w,m,y,b)}),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(r,n){var i=this;(function a(){r.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(r,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,h,c){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(h,c)&&!y2(u,i,r)}),!F9(r.coordinateSystem)){o.disable();return}o.enable(r.get("roam")),s.zoomLimit=r.get("scaleLimit"),s.zoom=r.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){Mw(s,u.dx,u.dy),i.dispatchAction({seriesId:r.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Lw(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:r.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),Db(r.getGraph(),K0(r)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var r=this._model,n=r.getData(),i=K0(r);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(r){Db(r.getGraph(),K0(r)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(r,n){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(hr);const Sve=bve;function cc(t){return"_EC_"+t}var wve=function(){function t(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(e,r){e=e==null?""+r:""+e;var n=this._nodesMap;if(!n[cc(e)]){var i=new vu(e,r);return i.hostGraph=this,this.nodes.push(i),n[cc(e)]=i,i}},t.prototype.getNodeByIndex=function(e){var r=this.data.getRawIndex(e);return this.nodes[r]},t.prototype.getNodeById=function(e){return this._nodesMap[cc(e)]},t.prototype.addEdge=function(e,r,n){var i=this._nodesMap,a=this._edgesMap;if($t(e)&&(e=this.nodes[e]),$t(r)&&(r=this.nodes[r]),e instanceof vu||(e=i[cc(e)]),r instanceof vu||(r=i[cc(r)]),!(!e||!r)){var o=e.id+"-"+r.id,s=new BO(e,r,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),r.inEdges.push(s)),e.edges.push(s),e!==r&&r.edges.push(s),this.edges.push(s),a[o]=s,s}},t.prototype.getEdgeByIndex=function(e){var r=this.edgeData.getRawIndex(e);return this.edges[r]},t.prototype.getEdge=function(e,r){e instanceof vu&&(e=e.id),r instanceof vu&&(r=r.id);var n=this._edgesMap;return this._directed?n[e+"-"+r]:n[e+"-"+r]||n[r+"-"+e]},t.prototype.eachNode=function(e,r){for(var n=this.nodes,i=n.length,a=0;a=0&&e.call(r,n[a],a)},t.prototype.eachEdge=function(e,r){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(r,n[a],a)},t.prototype.breadthFirstTraverse=function(e,r,n,i){if(r instanceof vu||(r=this._nodesMap[cc(r)]),!!r){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&this[t][e].setItemVisual(this.dataIndex,r,n)},getVisual:function(r){return this[t][e].getItemVisual(this.dataIndex,r)},setLayout:function(r,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}Or(vu,PO("hostGraph","data"));Or(BO,PO("hostGraph","edgeData"));const Cve=wve;function RO(t,e,r,n,i){for(var a=new Cve(n),o=0;o "+f)),u++)}var d=r.get("coordinateSystem"),v;if(d==="cartesian2d"||d==="polar")v=as(t,r);else{var g=Sp.get(d),m=g?g.dimensions||[]:[];Ct(m,"value")<0&&m.concat(["value"]);var y=Cp(t,{coordDimensions:m,encodeDefine:r.getEncode()}).dimensions;v=new qn(y,r),v.initData(t)}var b=new qn(["value"],r);return b.initData(l,s),i&&i(v,b),gO({mainData:v,struct:a,structAttr:"graph",datas:{node:v,edge:b},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Ave=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Ep(i,i),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(r.edges||r.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(r){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Zu(r,"edgeLabel",["show"])},e.prototype.getInitialData=function(r,n){var i=r.edges||r.links||[],a=r.data||r.nodes||[],o=this;if(a&&i){ove(this);var s=RO(a,i,this,!0,l);return W(s.edges,function(u){sve(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,h){u.wrapMethod("getItemModel",function(v){var g=o._categoriesModels,m=v.getShallow("category"),y=g[m];return y&&(y.parentModel=v.parentModel,v.parentModel=y),v});var c=ur.prototype.getModel;function f(v,g){var m=c.call(this,v,g);return m.resolveParentPath=d,m}h.wrapMethod("getItemModel",function(v){return v.resolveParentPath=d,v.getModel=f,v});function d(v){if(v&&(v[0]==="label"||v[1]==="label")){var g=v.slice();return v[0]==="label"?g[0]="edgeLabel":v[1]==="label"&&(g[1]="edgeLabel"),g}return v}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(r,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(r,i),s=a.graph.getEdgeByIndex(r),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),h=[];return l!=null&&h.push(l),u!=null&&h.push(u),Zr("nameValue",{name:h.join(" > "),value:o.value,noValue:o.value==null})}var c=rR({series:this,dataIndex:r,multipleSeries:n});return c},e.prototype._updateCategoriesData=function(){var r=Ce(this.option.categories||[],function(i){return i.value!=null?i:xe({value:0},i)}),n=new qn(["value"],this);n.initData(r),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(r){this.option.zoom=r},e.prototype.setCenter=function(r){this.option.center=r},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pr);const Tve=Ave;var kve={type:"graphRoam",event:"graphRoam",update:"none"};function Dve(t){t.registerChartView(Sve),t.registerSeriesModel(Tve),t.registerProcessor(tve),t.registerVisual(rve),t.registerVisual(nve),t.registerLayout(lve),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,hve),t.registerLayout(fve),t.registerCoordinateSystem("graphView",{dimensions:Bp.dimensions,create:pve}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ir),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ir),t.registerAction(kve,function(e,r,n){r.eachComponent({mainType:"series",query:e},function(i){var a=i.coordinateSystem,o=Iw(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var Mve=function(){function t(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return t}(),Lve=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new Mve},e.prototype.buildPath=function(r,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),h=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,r.moveTo(u,h),r.lineTo(n.x+i(l)*s,n.y+a(l)*s),r.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),r.lineTo(n.x-i(l)*s,n.y-a(l)*s),r.lineTo(u,h)},e}(Tt);const Eve=Lve;function Ive(t,e){var r=t.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=Be(r[0],e.getWidth()),s=Be(r[1],e.getHeight()),l=Be(t.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Kg(t,e){var r=t==null?"":t+"";return e&&(ze(e)?r=e.replace("{value}",r):Je(e)&&(r=e(t))),r}var Bve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeAll();var a=r.get(["axisLine","lineStyle","color"]),o=Ive(r,i);this._renderMain(r,n,i,a,o),this._data=r.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(r,n,i,a,o){var s=this.group,l=r.get("clockwise"),u=-r.get("startAngle")/180*Math.PI,h=-r.get("endAngle")/180*Math.PI,c=r.getModel("axisLine"),f=c.get("roundCap"),d=f?ey:li,v=c.get("show"),g=c.getModel("lineStyle"),m=g.get("width"),y=[u,h];fB(y,!l),u=y[0],h=y[1];for(var b=h-u,w=u,T=[],M=0;v&&M=V&&($===0?0:a[$-1][0])Math.PI/2&&(Pe+=Math.PI)):Ie==="tangential"?Pe=-O-Math.PI/2:$t(Ie)&&(Pe=Ie*Math.PI/180),Pe===0?c.add(new Vt({style:lr(w,{text:ce,x:de,y:De,verticalAlign:J<-.8?"top":J>.8?"bottom":"middle",align:G<-.4?"left":G>.4?"right":"center"},{inheritColor:ye}),silent:!0})):c.add(new Vt({style:lr(w,{text:ce,x:de,y:De,verticalAlign:"middle",align:"center"},{inheritColor:ye}),silent:!0,originX:de,originY:De,rotation:Pe}))}if(b.get("show")&&K!==T){var se=b.get("distance");se=se?se+h:h;for(var Qe=0;Qe<=M;Qe++){G=Math.cos(O),J=Math.sin(O);var Ke=new en({shape:{x1:G*(v-se)+f,y1:J*(v-se)+d,x2:G*(v-P-se)+f,y2:J*(v-P-se)+d},silent:!0,style:j});j.stroke==="auto"&&Ke.setStyle({stroke:a((K+Qe/M)/T)}),c.add(Ke),O+=$}O-=$}else O+=V}},e.prototype._renderPointer=function(r,n,i,a,o,s,l,u,h){var c=this.group,f=this._data,d=this._progressEls,v=[],g=r.get(["pointer","show"]),m=r.getModel("progress"),y=m.get("show"),b=r.getData(),w=b.mapDimension("value"),T=+r.get("min"),M=+r.get("max"),D=[T,M],P=[s,l];function O($,H){var j=b.getItemModel($),q=j.getModel("pointer"),G=Be(q.get("width"),o.r),J=Be(q.get("length"),o.r),K=r.get(["pointer","icon"]),se=q.get("offsetCenter"),ae=Be(se[0],o.r),ce=Be(se[1],o.r),ye=q.get("keepAspect"),de;return K?de=Fr(K,ae-G/2,ce-J,G,J,null,ye):de=new Eve({shape:{angle:-Math.PI/2,width:G,r:J,x:ae,y:ce}}),de.rotation=-(H+Math.PI/2),de.x=o.cx,de.y=o.cy,de}function V($,H){var j=m.get("roundCap"),q=j?ey:li,G=m.get("overlap"),J=G?m.get("width"):h/b.count(),K=G?o.r-J:o.r-($+1)*J,se=G?o.r:o.r-$*J,ae=new q({shape:{startAngle:s,endAngle:H,cx:o.cx,cy:o.cy,clockwise:u,r0:K,r:se}});return G&&(ae.z2=M-b.get(w,$)%M),ae}(y||g)&&(b.diff(f).add(function($){var H=b.get(w,$);if(g){var j=O($,s);fr(j,{rotation:-((isNaN(+H)?P[0]:jt(H,D,P,!0))+Math.PI/2)},r),c.add(j),b.setItemGraphicEl($,j)}if(y){var q=V($,s),G=m.get("clip");fr(q,{shape:{endAngle:jt(H,D,P,G)}},r),c.add(q),m5(r.seriesIndex,b.dataType,$,q),v[$]=q}}).update(function($,H){var j=b.get(w,$);if(g){var q=f.getItemGraphicEl(H),G=q?q.rotation:s,J=O($,G);J.rotation=G,Gt(J,{rotation:-((isNaN(+j)?P[0]:jt(j,D,P,!0))+Math.PI/2)},r),c.add(J),b.setItemGraphicEl($,J)}if(y){var K=d[H],se=K?K.shape.endAngle:s,ae=V($,se),ce=m.get("clip");Gt(ae,{shape:{endAngle:jt(j,D,P,ce)}},r),c.add(ae),m5(r.seriesIndex,b.dataType,$,ae),v[$]=ae}}).execute(),b.each(function($){var H=b.getItemModel($),j=H.getModel("emphasis"),q=j.get("focus"),G=j.get("blurScope"),J=j.get("disabled");if(g){var K=b.getItemGraphicEl($),se=b.getItemVisual($,"style"),ae=se.fill;if(K instanceof vn){var ce=K.style;K.useStyle(xe({image:ce.image,x:ce.x,y:ce.y,width:ce.width,height:ce.height},se))}else K.useStyle(se),K.type!=="pointer"&&K.setColor(ae);K.setStyle(H.getModel(["pointer","itemStyle"]).getItemStyle()),K.style.fill==="auto"&&K.setStyle("fill",a(jt(b.get(w,$),D,[0,1],!0))),K.z2EmphasisLift=0,dn(K,H),wr(K,q,G,J)}if(y){var ye=v[$];ye.useStyle(b.getItemVisual($,"style")),ye.setStyle(H.getModel(["progress","itemStyle"]).getItemStyle()),ye.z2EmphasisLift=0,dn(ye,H),wr(ye,q,G,J)}}),this._progressEls=v)},e.prototype._renderAnchor=function(r,n){var i=r.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),h=Fr(s,n.cx-o/2+Be(l[0],n.r),n.cy-o/2+Be(l[1],n.r),o,o,null,u);h.z2=i.get("showAbove")?1:0,h.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(r,n,i,a,o){var s=this,l=r.getData(),u=l.mapDimension("value"),h=+r.get("min"),c=+r.get("max"),f=new st,d=[],v=[],g=r.isAnimationEnabled(),m=r.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){d[y]=new Vt({silent:!0}),v[y]=new Vt({silent:!0})}).update(function(y,b){d[y]=s._titleEls[b],v[y]=s._detailEls[b]}).execute(),l.each(function(y){var b=l.getItemModel(y),w=l.get(u,y),T=new st,M=a(jt(w,[h,c],[0,1],!0)),D=b.getModel("title");if(D.get("show")){var P=D.get("offsetCenter"),O=o.cx+Be(P[0],o.r),V=o.cy+Be(P[1],o.r),$=d[y];$.attr({z2:m?0:2,style:lr(D,{x:O,y:V,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:M})}),T.add($)}var H=b.getModel("detail");if(H.get("show")){var j=H.get("offsetCenter"),q=o.cx+Be(j[0],o.r),G=o.cy+Be(j[1],o.r),J=Be(H.get("width"),o.r),K=Be(H.get("height"),o.r),se=r.get(["progress","show"])?l.getItemVisual(y,"style").fill:M,$=v[y],ae=H.get("formatter");$.attr({z2:m?0:2,style:lr(H,{x:q,y:G,text:Kg(w,ae),width:isNaN(J)?null:J,height:isNaN(K)?null:K,align:"center",verticalAlign:"middle"},{inheritColor:se})}),iP($,{normal:H},w,function(ye){return Kg(ye,ae)}),g&&aP($,y,l,r,{getFormattedLabel:function(ye,de,De,Ie,Pe,Qe){return Kg(Qe?Qe.interpolatedValue:w,ae)}}),T.add($)}f.add(T)}),this.group.add(f),this._titleEls=d,this._detailEls=v},e.type="gauge",e}(hr);const Pve=Bve;var Rve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="itemStyle",r}return e.prototype.getInitialData=function(r,n){return vf(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(pr);const Fve=Rve;function Ove(t){t.registerChartView(Pve),t.registerSeriesModel(Fve)}var Nve=["itemStyle","opacity"],zve=function(t){pe(e,t);function e(r,n){var i=t.call(this)||this,a=i,o=new hi,s=new Vt;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(r,n,!0),i}return e.prototype.updateData=function(r,n,i){var a=this,o=r.hostModel,s=r.getItemModel(n),l=r.getItemLayout(n),u=s.getModel("emphasis"),h=s.get(Nve);h=h??1,i||ba(a),a.useStyle(r.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,fr(a,{style:{opacity:h}},o,n)):Gt(a,{style:{opacity:h},shape:{points:l.points}},o,n),dn(a,s),this._updateLabel(r,n),wr(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=r.hostModel,l=r.getItemModel(n),u=r.getItemLayout(n),h=u.label,c=r.getItemVisual(n,"style"),f=c.fill;pn(o,Xr(l),{labelFetcher:r.hostModel,labelDataIndex:n,defaultOpacity:c.opacity,defaultText:r.getName(n)},{normal:{align:h.textAlign,verticalAlign:h.verticalAlign}}),i.setTextConfig({local:!0,inside:!!h.inside,insideStroke:f,outsideFill:f});var d=h.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new _t(d[0][0],d[0][1]):null},Gt(o,{style:{x:h.x,y:h.y}},s,n),o.attr({rotation:h.rotation,originX:h.x,originY:h.y,z2:10}),xw(i,bw(l),{stroke:f})},e}(ui),Vve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreLabelLineUpdate=!0,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new zve(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var h=o.getItemGraphicEl(u);h.updateData(a,l),s.add(h),a.setItemGraphicEl(l,h)}).remove(function(l){var u=o.getItemGraphicEl(l);Gd(u,r,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(hr);const $ve=Vve;var Gve=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Ep(Ge(this.getData,this),Ge(this.getRawData,this)),this._defaultLabelLine(r)},e.prototype.getInitialData=function(r,n){return vf(this,{coordDimensions:["value"],encodeDefaulter:pt(KS,this)})},e.prototype._defaultLabelLine=function(r){Zu(r,"labelLine",["show"]);var n=r.labelLine,i=r.emphasis.labelLine;n.show=n.show&&r.label.show,i.show=i.show&&r.emphasis.label.show},e.prototype.getDataParams=function(r){var n=this.getData(),i=t.prototype.getDataParams.call(this,r),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,r)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(pr);const Hve=Gve;function qve(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Wve(t,e){for(var r=t.mapDimension("value"),n=t.mapArray(r,function(l){return l}),i=[],a=e==="ascending",o=0,s=t.count();ohge)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Lb(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=r.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function Lb(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}const dge=cge;var pge=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(r){var n=this.option;r&&bt(n,r,!0),this._initDimensions()},e.prototype.contains=function(r,n){var i=r.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(r){W(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){r.hasOwnProperty(n)&&(this.option[n]=r[n])},this)},e.prototype._initDimensions=function(){var r=this.dimensions=[],n=this.parallelAxisIndex=[],i=Jt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);W(i,function(a){r.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Nt);const vge=pge;var gge=function(t){pe(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Aa);const mge=gge;function uh(t,e,r,n,i,a){t=t||0;var o=r[1]-r[0];if(i!=null&&(i=fc(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=fc(s,[0,o]),i=a=fc(s,[i,a]),n=0}e[0]=fc(e[0],r),e[1]=fc(e[1],r);var l=Eb(e,n);e[n]+=t;var u=i||0,h=r.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=fc(e[n],h);var c;return c=Eb(e,n),i!=null&&(c.sign!==l.sign||c.spana&&(e[1-n]=e[n]+c.sign*a),e}function Eb(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function fc(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var Ib=W,OO=Math.min,NO=Math.max,z9=Math.floor,yge=Math.ceil,V9=kr,_ge=Math.PI,xge=function(){function t(e,r,n){this.type="parallel",this._axesMap=Ye(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,r,n)}return t.prototype._init=function(e,r,n){var i=e.dimensions,a=e.parallelAxisIndex;Ib(i,function(o,s){var l=a[s],u=r.getComponent("parallelAxis",l),h=this._axesMap.set(o,new mge(o,v2(u),[0,0],u.get("type"),l)),c=h.type==="category";h.onBand=c&&u.get("boundaryGap"),h.inverse=u.get("inverse"),u.axis=h,h.model=u,h.coordinateSystem=u.coordinateSystem=this},this)},t.prototype.update=function(e,r){this._updateAxesFromSeries(this._model,e)},t.prototype.containPoint=function(e){var r=this._makeLayoutInfo(),n=r.axisBase,i=r.layoutBase,a=r.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+r.axisLength&&s>=i&&s<=i+r.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(e,r){r.eachSeries(function(n){if(e.contains(n,r)){var i=n.getData();Ib(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),Uc(o.scale,o.model)},this)}},this)},t.prototype.resize=function(e,r){this._rect=$r(e.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var e=this._model,r=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=r[i[o]],l=[0,s],u=this.dimensions.length,h=Jg(e.get("axisExpandWidth"),l),c=Jg(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow"),v;if(d)v=Jg(d[1]-d[0],l),d[1]=d[0]+v;else{v=Jg(h*(c-1),l);var g=e.get("axisExpandCenter")||z9(u/2);d=[h*g-v/2],d[1]=d[0]+v}var m=(s-v)/(u-c);m<3&&(m=0);var y=[z9(V9(d[0]/h,1))+1,yge(V9(d[1]/h,1))-1],b=m/h*d[0];return{layout:a,pixelDimIndex:o,layoutBase:r[n[o]],layoutLength:s,axisBase:r[n[1-o]],axisLength:r[i[1-o]],axisExpandable:f,axisExpandWidth:h,axisCollapseWidth:m,axisExpandWindow:d,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:b}},t.prototype._layoutAxes=function(){var e=this._rect,r=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;r.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Ib(n,function(o,s){var l=(i.axisExpandable?Sge:bge)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},h={horizontal:_ge/2,vertical:0},c=[u[a].x+e.x,u[a].y+e.y],f=h[a],d=Zi();nh(d,d,f),lo(d,d,c),this._axesLayout[o]={position:c,rotation:f,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(e){return this._axesMap.get(e)},t.prototype.dataToPoint=function(e,r){return this.axisCoordToPoint(this._axesMap.get(r).dataToCoord(e),r)},t.prototype.eachActiveState=function(e,r,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];W(o,function(m){s.push(e.mapDimension(m)),l.push(a.get(m).model)});for(var u=this.hasAxisBrushed(),h=n;ha*(1-c[0])?(u="jump",l=s-a*(1-c[2])):(l=s-a*c[1])>=0&&(l=s-a*(1-c[1]))<=0&&(l=0),l*=r.axisExpandWidth/h,l?uh(l,i,o,"all"):u="none";else{var d=i[1]-i[0],v=o[1]*s/d;i=[NO(0,v-d/2)],i[1]=OO(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},t}();function Jg(t,e){return OO(NO(t,e[0]),e[1])}function bge(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function Sge(t,e){var r=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,h;return t=0;i--)Wi(n[i])},e.prototype.getActiveState=function(r){var n=this.activeIntervals;if(!n.length)return"normal";if(r==null||isNaN(+r))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=r&&r<=i[1])return"active"}else for(var a=0,o=n.length;aMge}function WO(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function UO(t,e,r,n){var i=new st;return i.add(new Rt({name:"main",style:Uw(r),silent:!0,draggable:!0,cursor:"move",drift:pt(q9,t,e,i,["n","s","w","e"]),ondragend:pt(th,e,{isEnd:!0})})),W(n,function(a){i.add(new Rt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pt(q9,t,e,i,a),ondragend:pt(th,e,{isEnd:!0})}))}),i}function YO(t,e,r,n){var i=n.brushStyle.lineWidth||0,a=Zc(i,Lge),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,h=r[0][1],c=r[1][1],f=h-a+i/2,d=c-a+i/2,v=h-o,g=c-s,m=v+i,y=g+i;Bo(t,e,"main",o,s,v,g),n.transformable&&(Bo(t,e,"w",l,u,a,y),Bo(t,e,"e",f,u,a,y),Bo(t,e,"n",l,u,m,a),Bo(t,e,"s",l,d,m,a),Bo(t,e,"nw",l,u,a,a),Bo(t,e,"ne",f,u,a,a),Bo(t,e,"sw",l,d,a,a),Bo(t,e,"se",f,d,a,a))}function s3(t,e){var r=e.__brushOption,n=r.transformable,i=e.childAt(0);i.useStyle(Uw(r)),i.attr({silent:!n,cursor:n?"move":"default"}),W([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?l3(t,a[0]):Oge(t,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?Ige[s]+"-resize":null})})}function Bo(t,e,r,n,i,a,o){var s=e.childOfName(r);s&&s.setShape(zge(Yw(t,e,[[n,i],[n+a,i+o]])))}function Uw(t){return rt({strokeNoScale:!0},t.brushStyle)}function XO(t,e,r,n){var i=[ip(t,r),ip(e,n)],a=[Zc(t,r),Zc(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function Fge(t){return Vu(t.group)}function l3(t,e){var r={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=Qy(r[e],Fge(t));return n[i]}function Oge(t,e){var r=[l3(t,e[0]),l3(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}function q9(t,e,r,n,i,a){var o=r.__brushOption,s=t.toRectRange(o.range),l=ZO(e,i,a);W(n,function(u){var h=Ege[u];s[h[0]][h[1]]+=l[h[0]]}),o.range=t.fromRectRange(XO(s[0][0],s[1][0],s[0][1],s[1][1])),Hw(e,r),th(e,{isEnd:!1})}function Nge(t,e,r,n){var i=e.__brushOption.range,a=ZO(t,r,n);W(i,function(o){o[0]+=a[0],o[1]+=a[1]}),Hw(t,e),th(t,{isEnd:!1})}function ZO(t,e,r){var n=t.group,i=n.transformCoordToLocal(e,r),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function Yw(t,e,r){var n=qO(t,e);return n&&n!==eh?n.clipPath(r,t._transform):ot(r)}function zge(t){var e=ip(t[0][0],t[1][0]),r=ip(t[0][1],t[1][1]),n=Zc(t[0][0],t[1][0]),i=Zc(t[0][1],t[1][1]);return{x:e,y:r,width:n-e,height:i-r}}function Vge(t,e,r){if(!(!t._brushType||Gge(t,e.offsetX,e.offsetY))){var n=t._zr,i=t._covers,a=Ww(t,e,r);if(!t._dragging)for(var o=0;on.getWidth()||r<0||r>n.getHeight()}var S2={lineX:Y9(0),lineY:Y9(1),rect:{createCover:function(t,e){function r(n){return n}return UO({toRectRange:r,fromRectRange:r},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){var e=WO(t);return XO(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,n){YO(t,e,r,n)},updateCommon:s3,contain:h3},polygon:{createCover:function(t,e){var r=new st;return r.add(new hi({name:"main",style:Uw(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new ui({name:"main",draggable:!0,drift:pt(Nge,t,e),ondragend:pt(th,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,n){e.childAt(0).setShape({points:Yw(t,e,r)})},updateCommon:s3,contain:h3}};function Y9(t){return{createCover:function(e,r){return UO({toRectRange:function(n){var i=[n,[0,100]];return t&&i.reverse(),i},fromRectRange:function(n){return n[t]}},e,r,[[["w"],["e"]],[["n"],["s"]]][t])},getCreatingRange:function(e){var r=WO(e),n=ip(r[0][t],r[1][t]),i=Zc(r[0][t],r[1][t]);return[n,i]},updateCoverShape:function(e,r,n,i){var a,o=qO(e,r);if(o!==eh&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(t);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,a];t&&l.reverse(),YO(e,r,l,i)},updateCommon:s3,contain:h3}}const Xw=Pge;function KO(t){return t=Zw(t),function(e){return eP(e,t)}}function JO(t,e){return t=Zw(t),function(r){var n=e??r,i=n?t.width:t.height,a=n?t.x:t.y;return[a,a+(i||0)]}}function QO(t,e,r){var n=Zw(t);return function(i,a){return n.contain(a[0],a[1])&&!y2(i,e,r)}}function Zw(t){return St.create(t)}var Hge=["axisLine","axisTickLabel","axisName"],qge=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){t.prototype.init.apply(this,arguments),(this._brushController=new Xw(n.getZr())).on("brush",Ge(this._onBrush,this))},e.prototype.render=function(r,n,i,a){if(!Wge(r,n,a)){this.axisModel=r,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new st,this.group.add(this._axisGroup),!!r.get("show")){var s=Yge(r,n),l=s.coordinateSystem,u=r.getAreaSelectStyle(),h=u.width,c=r.axis.dim,f=l.getAxisLayout(c),d=xe({strokeContainThreshold:h},f),v=new rs(r,d);W(Hge,v.add,v),this._axisGroup.add(v.getGroup()),this._refreshBrushController(d,u,r,s,h,i),_p(o,this._axisGroup,r)}}},e.prototype._refreshBrushController=function(r,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,Math.abs(u)*.1),c=St.create({x:l[0],y:-o/2,width:u,height:o});c.x-=h,c.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:r.rotation,x:r.position[0],y:r.position[1]}).setPanels([{panelId:"pl",clipPath:KO(c),isTargetByCursor:QO(c,s,a),getLinearBrushOtherExtent:JO(c,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(Uge(i))},e.prototype._onBrush=function(r){var n=r.areas,i=this.axisModel,a=i.axis,o=Ce(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Cr);function Wge(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function Uge(t){var e=t.axis;return Ce(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function Yge(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}const Xge=qge;var Zge={type:"axisAreaSelect",event:"axisAreaSelected"};function jge(t){t.registerAction(Zge,function(e,r){r.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,r){r.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var Kge={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function eN(t){t.registerComponentView(dge),t.registerComponentModel(vge),t.registerCoordinateSystem("parallel",Tge),t.registerPreprocessor(sge),t.registerComponentModel($9),t.registerComponentView(Xge),Xc(t,"parallel",$9,Kge),jge(t)}function Jge(t){At(eN),t.registerChartView(Qve),t.registerSeriesModel(nge),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,oge)}var Qge=function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return t}(),eme=function(t){pe(e,t);function e(r){return t.call(this,r)||this}return e.prototype.getDefaultShape=function(){return new Qge},e.prototype.buildPath=function(r,n){var i=n.extent;r.moveTo(n.x1,n.y1),r.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(r.lineTo(n.x2+i,n.y2),r.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(r.lineTo(n.x2,n.y2+i),r.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),r.closePath()},e.prototype.highlight=function(){Qo(this)},e.prototype.downplay=function(){es(this)},e}(Tt),tme=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._focusAdjacencyDisabled=!1,r}return e.prototype.render=function(r,n,i){var a=this,o=r.getGraph(),s=this.group,l=r.layoutInfo,u=l.width,h=l.height,c=r.getData(),f=r.getData("edge"),d=r.get("orient");this._model=r,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(v){var g=new eme,m=dt(g);m.dataIndex=v.dataIndex,m.seriesIndex=r.seriesIndex,m.dataType="edge";var y=v.getModel(),b=y.getModel("lineStyle"),w=b.get("curveness"),T=v.node1.getLayout(),M=v.node1.getModel(),D=M.get("localX"),P=M.get("localY"),O=v.node2.getLayout(),V=v.node2.getModel(),$=V.get("localX"),H=V.get("localY"),j=v.getLayout(),q,G,J,K,se,ae,ce,ye;g.shape.extent=Math.max(1,j.dy),g.shape.orient=d,d==="vertical"?(q=(D!=null?D*u:T.x)+j.sy,G=(P!=null?P*h:T.y)+T.dy,J=($!=null?$*u:O.x)+j.ty,K=H!=null?H*h:O.y,se=q,ae=G*(1-w)+K*w,ce=J,ye=G*w+K*(1-w)):(q=(D!=null?D*u:T.x)+T.dx,G=(P!=null?P*h:T.y)+j.sy,J=$!=null?$*u:O.x,K=(H!=null?H*h:O.y)+j.ty,se=q*(1-w)+J*w,ae=G,ce=q*w+J*(1-w),ye=K),g.setShape({x1:q,y1:G,x2:J,y2:K,cpx1:se,cpy1:ae,cpx2:ce,cpy2:ye}),g.useStyle(b.getItemStyle()),X9(g.style,d,v);var de=""+y.get("value"),De=Xr(y,"edgeLabel");pn(g,De,{labelFetcher:{getFormattedLabel:function(Qe,Ke,et,qe,lt,it){return r.getFormattedLabel(Qe,Ke,"edge",qe,io(lt,De.normal&&De.normal.get("formatter"),de),it)}},labelDataIndex:v.dataIndex,defaultText:de}),g.setTextConfig({position:"inside"});var Ie=y.getModel("emphasis");dn(g,y,"lineStyle",function(Qe){var Ke=Qe.getItemStyle();return X9(Ke,d,v),Ke}),s.add(g),f.setItemGraphicEl(v.dataIndex,g);var Pe=Ie.get("focus");wr(g,Pe==="adjacency"?v.getAdjacentDataIndices():Pe==="trajectory"?v.getTrajectoryDataIndices():Pe,Ie.get("blurScope"),Ie.get("disabled"))}),o.eachNode(function(v){var g=v.getLayout(),m=v.getModel(),y=m.get("localX"),b=m.get("localY"),w=m.getModel("emphasis"),T=new Rt({shape:{x:y!=null?y*u:g.x,y:b!=null?b*h:g.y,width:g.dx,height:g.dy},style:m.getModel("itemStyle").getItemStyle(),z2:10});pn(T,Xr(m),{labelFetcher:{getFormattedLabel:function(D,P){return r.getFormattedLabel(D,P,"node")}},labelDataIndex:v.dataIndex,defaultText:v.id}),T.disableLabelAnimation=!0,T.setStyle("fill",v.getVisual("color")),T.setStyle("decal",v.getVisual("style").decal),dn(T,m),s.add(T),c.setItemGraphicEl(v.dataIndex,T),dt(T).dataType="node";var M=w.get("focus");wr(T,M==="adjacency"?v.getAdjacentDataIndices():M==="trajectory"?v.getTrajectoryDataIndices():M,w.get("blurScope"),w.get("disabled"))}),c.eachItemGraphicEl(function(v,g){var m=c.getItemModel(g);m.get("draggable")&&(v.drift=function(y,b){a._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=b,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:r.id,dataIndex:c.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/h})},v.ondragend=function(){a._focusAdjacencyDisabled=!1},v.draggable=!0,v.cursor="move")}),!this._data&&r.isAnimationEnabled()&&s.setClipPath(rme(s.getBoundingRect(),r,function(){s.removeClipPath()})),this._data=r.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(hr);function X9(t,e,r){switch(t.fill){case"source":t.fill=r.node1.getVisual("color"),t.decal=r.node1.getVisual("style").decal;break;case"target":t.fill=r.node2.getVisual("color"),t.decal=r.node2.getVisual("style").decal;break;case"gradient":var n=r.node1.getVisual("color"),i=r.node2.getVisual("color");ze(n)&&ze(i)&&(t.fill=new yp(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function rme(t,e,r){var n=new Rt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return fr(n,{shape:{width:t.width+20}},e,r),n}const nme=tme;var ime=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){var i=r.edges||r.links,a=r.data||r.nodes,o=r.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new ur(o[l],this,n));if(a&&i){var u=RO(a,i,this,!0,h);return u.data}function h(c,f){c.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getData().getItemLayout(v);if(m){var y=m.depth,b=g.levelModels[y];b&&(d.parentModel=b)}return d}),f.wrapMethod("getItemModel",function(d,v){var g=d.parentModel,m=g.getGraph().getEdgeByIndex(v),y=m.node1.getLayout();if(y){var b=y.depth,w=g.levelModels[b];w&&(d.parentModel=w)}return d})}},e.prototype.setNodePosition=function(r,n){var i=this.option.data||this.option.nodes,a=i[r];a.localX=n[0],a.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(r,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(r,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Zr("nameValue",{name:u,value:l,noValue:a(l)})}else{var h=this.getGraph().getNodeByIndex(r),c=h.getLayout().value,f=this.getDataParams(r,i).data.name;return Zr("nameValue",{name:f!=null?f+"":null,value:c,noValue:a(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(r,n){var i=t.prototype.getDataParams.call(this,r,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(r),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(pr);const ame=ime;function ome(t,e){t.eachSeriesByType("sankey",function(r){var n=r.get("nodeWidth"),i=r.get("nodeGap"),a=sme(r,e);r.layoutInfo=a;var o=a.width,s=a.height,l=r.getGraph(),u=l.nodes,h=l.edges;ume(u);var c=Jt(u,function(g){return g.getLayout().value===0}),f=c.length!==0?0:r.get("layoutIterations"),d=r.get("orient"),v=r.get("nodeAlign");lme(u,h,n,i,o,s,f,d,v)})}function sme(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function lme(t,e,r,n,i,a,o,s,l){hme(t,e,r,i,a,s,l),pme(t,e,a,i,n,o,s),wme(t,s)}function ume(t){W(t,function(e){var r=rl(e.outEdges,oy),n=rl(e.inEdges,oy),i=e.getValue()||0,a=Math.max(r,n,i);e.setLayout({value:a},!0)})}function hme(t,e,r,n,i,a,o){for(var s=[],l=[],u=[],h=[],c=0,f=0;f=0;y&&m.depth>d&&(d=m.depth),g.setLayout({depth:y?m.depth:c},!0),a==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var b=0;bc-1?d:c-1;o&&o!=="left"&&cme(t,o,a,P);var O=a==="vertical"?(i-r)/P:(n-r)/P;dme(t,O,a)}function tN(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function cme(t,e,r,n){if(e==="right"){for(var i=[],a=t,o=0;a.length;){for(var s=0;s0;a--)l*=.99,mme(s,l,o),Bb(s,i,r,n,o),Sme(s,l,o),Bb(s,i,r,n,o)}function vme(t,e){var r=[],n=e==="vertical"?"y":"x",i=d5(t,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),W(i.keys,function(a){r.push(i.buckets.get(a))}),r}function gme(t,e,r,n,i,a){var o=1/0;W(t,function(s){var l=s.length,u=0;W(s,function(c){u+=c.getLayout().value});var h=a==="vertical"?(n-(l-1)*i)/u:(r-(l-1)*i)/u;h0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]+l.getLayout()[f]+e;var v=i==="vertical"?n:r;if(u=h-e-v,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s;for(var d=c-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+e-h,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[a]}})}function mme(t,e,r){W(t.slice().reverse(),function(n){W(n,function(i){if(i.outEdges.length){var a=rl(i.outEdges,yme,r)/rl(i.outEdges,oy);if(isNaN(a)){var o=i.outEdges.length;a=o?rl(i.outEdges,_me,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(a-fl(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-fl(i,r))*e;i.setLayout({y:l},!0)}}})})}function yme(t,e){return fl(t.node2,e)*t.getValue()}function _me(t,e){return fl(t.node2,e)}function xme(t,e){return fl(t.node1,e)*t.getValue()}function bme(t,e){return fl(t.node1,e)}function fl(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function oy(t){return t.getValue()}function rl(t,e,r){for(var n=0,i=t.length,a=-1;++ao&&(o=l)}),W(n,function(s){var l=new fn({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get(["itemStyle","color"]);h!=null?(s.setVisual("color",h),s.setVisual("style",{fill:h})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&W(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Ame(t){t.registerChartView(nme),t.registerSeriesModel(ame),t.registerLayout(ome),t.registerVisual(Cme),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,r){r.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var rN=function(){function t(){}return t.prototype.getInitialData=function(e,r){var n,i=r.getComponent("xAxis",this.get("xAxisIndex")),a=r.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],h=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[h],f=u[1-h],d=[i,a],v=d[h].get("type"),g=d[1-h].get("type"),m=e.data;if(m&&l){var y=[];W(m,function(T,M){var D;Se(T)?(D=T.slice(),T.unshift(M)):Se(T.value)?(D=xe({},T),D.value=D.value.slice(),T.value.unshift(M)):D=T,y.push(D)}),e.data=y}var b=this.defaultValueDimensions,w=[{name:c,type:X1(v),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:X1(g),dimsDef:b.slice()}];return vf(this,{coordDimensions:w,dimensionsCount:b.length+1,encodeDefaulter:pt(kP,w,this)})},t.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},t}(),nN=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],r.visualDrawType="stroke",r}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(pr);Or(nN,rN,!0);const Tme=nN;var kme=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=r.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var h=a.getItemLayout(u),c=Z9(h,a,u,l,!0);a.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,h){var c=s.getItemGraphicEl(h);if(!a.hasValue(u)){o.remove(c);return}var f=a.getItemLayout(u);c?(ba(c),iN(f,c,a,u)):c=Z9(f,a,u,l),o.add(c),a.setItemGraphicEl(u,c)}).remove(function(u){var h=s.getItemGraphicEl(u);h&&o.remove(h)}).execute(),this._data=a},e.prototype.remove=function(r){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(hr),Dme=function(){function t(){}return t}(),Mme=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new Dme},e.prototype.buildPath=function(r,n){var i=n.points,a=0;for(r.moveTo(i[a][0],i[a][1]),a++;a<4;a++)r.lineTo(i[a][0],i[a][1]);for(r.closePath();ag){var T=[y,w];n.push(T)}}}return{boxData:r,outliers:n}}var Ome={type:"echarts:boxplot",transform:function(e){var r=e.upstream;if(r.sourceFormat!==Dn){var n="";Yt(n)}var i=Fme(r.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function Nme(t){t.registerSeriesModel(Tme),t.registerChartView(Eme),t.registerLayout(Ime),t.registerTransform(Ome)}var zme=["color","borderColor"],Vme=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(r),this._isLargeDraw?this._renderLarge(r):this._renderNormal(r)},e.prototype.incrementalPrepareRender=function(r,n,i){this._clear(),this._updateDrawMode(r)},e.prototype.incrementalRender=function(r,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(r,n):this._incrementalRenderNormal(r,n)},e.prototype.eachRendered=function(r){vl(this._progressiveEls||this.group,r)},e.prototype._updateDrawMode=function(r){var n=r.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(r){var n=r.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=r.get("clip",!0),l=r.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(h){if(n.hasValue(h)){var c=n.getItemLayout(h);if(s&&j9(u,c))return;var f=Pb(c,h,!0);fr(f,{shape:{points:c.ends}},r,h),Rb(f,n,h,o),a.add(f),n.setItemGraphicEl(h,f)}}).update(function(h,c){var f=i.getItemGraphicEl(c);if(!n.hasValue(h)){a.remove(f);return}var d=n.getItemLayout(h);if(s&&j9(u,d)){a.remove(f);return}f?(Gt(f,{shape:{points:d.ends}},r,h),ba(f)):f=Pb(d),Rb(f,n,h,o),a.add(f),n.setItemGraphicEl(h,f)}).remove(function(h){var c=i.getItemGraphicEl(h);c&&a.remove(c)}).execute(),this._data=n},e.prototype._renderLarge=function(r){this._clear(),K9(r,this.group);var n=r.get("clip",!0)?m2(r.coordinateSystem,!1,r):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(r,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=r.next())!=null;){var s=i.getItemLayout(o),l=Pb(s);Rb(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(r,n){K9(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(r){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(hr),$me=function(){function t(){}return t}(),Gme=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new $me},e.prototype.buildPath=function(r,n){var i=n.points;this.__simpleBox?(r.moveTo(i[4][0],i[4][1]),r.lineTo(i[6][0],i[6][1])):(r.moveTo(i[0][0],i[0][1]),r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]),r.lineTo(i[3][0],i[3][1]),r.closePath(),r.moveTo(i[4][0],i[4][1]),r.lineTo(i[5][0],i[5][1]),r.moveTo(i[6][0],i[6][1]),r.lineTo(i[7][0],i[7][1]))},e}(Tt);function Pb(t,e,r){var n=t.ends;return new Gme({shape:{points:r?Hme(n,t):n},z2:100})}function j9(t,e){for(var r=!0,n=0;n0?"borderColor":"borderColor0"])||r.get(["itemStyle",t>0?"color":"color0"]);t===0&&(i=r.get(["itemStyle","borderColorDoji"]));var a=r.getModel("itemStyle").getItemStyle(zme);e.useStyle(a),e.style.fill=null,e.style.stroke=i}const Wme=Vme;var aN=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],r}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(r,n,i){var a=n.getItemLayout(r);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(pr);Or(aN,rN,!0);const Ume=aN;function Yme(t){!t||!Se(t.series)||W(t.series,function(e){nt(e)&&e.type==="k"&&(e.type="candlestick")})}var Xme=["itemStyle","borderColor"],Zme=["itemStyle","borderColor0"],jme=["itemStyle","borderColorDoji"],Kme=["itemStyle","color"],Jme=["itemStyle","color0"],Qme={seriesType:"candlestick",plan:ff(),performRawSeries:!0,reset:function(t,e){function r(a,o){return o.get(a>0?Kme:Jme)}function n(a,o){return o.get(a===0?jme:a>0?Xme:Zme)}if(!e.isSeriesFiltered(t)){var i=t.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,h=l.getItemStyle();h.fill=r(u,l),h.stroke=n(u,l)||h.fill;var c=o.ensureUniqueItemVisual(s,"style");xe(c,h)}}}}}};const e1e=Qme;var t1e={seriesType:"candlestick",plan:ff(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),n=r1e(t,r),i=0,a=1,o=["x","y"],s=r.getDimensionIndex(r.mapDimension(o[i])),l=Ce(r.mapDimensionsAll(o[a]),r.getDimensionIndex,r),u=l[0],h=l[1],c=l[2],f=l[3];if(r.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:t.pipelineContext.large?v:d};function d(g,m){for(var y,b=m.getStore();(y=g.next())!=null;){var w=b.get(s,y),T=b.get(u,y),M=b.get(h,y),D=b.get(c,y),P=b.get(f,y),O=Math.min(T,M),V=Math.max(T,M),$=se(O,w),H=se(V,w),j=se(D,w),q=se(P,w),G=[];ae(G,H,0),ae(G,$,1),G.push(ye(q),ye(H),ye(j),ye($));var J=m.getItemModel(y),K=!!J.get(["itemStyle","borderColorDoji"]);m.setItemLayout(y,{sign:J9(b,y,T,M,h,K),initBaseline:T>M?H[a]:$[a],ends:G,brushRect:ce(D,P,w)})}function se(de,De){var Ie=[];return Ie[i]=De,Ie[a]=de,isNaN(De)||isNaN(de)?[NaN,NaN]:e.dataToPoint(Ie)}function ae(de,De,Ie){var Pe=De.slice(),Qe=De.slice();Pe[i]=zm(Pe[i]+n/2,1,!1),Qe[i]=zm(Qe[i]-n/2,1,!0),Ie?de.push(Pe,Qe):de.push(Qe,Pe)}function ce(de,De,Ie){var Pe=se(de,Ie),Qe=se(De,Ie);return Pe[i]-=n/2,Qe[i]-=n/2,{x:Pe[0],y:Pe[1],width:n,height:Qe[1]-Pe[1]}}function ye(de){return de[i]=zm(de[i],1),de}}function v(g,m){for(var y=Qa(g.count*4),b=0,w,T=[],M=[],D,P=m.getStore(),O=!!t.get(["itemStyle","borderColorDoji"]);(D=g.next())!=null;){var V=P.get(s,D),$=P.get(u,D),H=P.get(h,D),j=P.get(c,D),q=P.get(f,D);if(isNaN(V)||isNaN(j)||isNaN(q)){y[b++]=NaN,b+=3;continue}y[b++]=J9(P,D,$,H,h,O),T[i]=V,T[a]=j,w=e.dataToPoint(T,null,M),y[b++]=w?w[0]:NaN,y[b++]=w?w[1]:NaN,T[a]=q,w=e.dataToPoint(T,null,M),y[b++]=w?w[1]:NaN}m.setLayout("largePoints",y)}}};function J9(t,e,r,n,i,a){var o;return r>n?o=-1:r0?t.get(i,e-1)<=n?1:-1:1,o}function r1e(t,e){var r=t.getBaseAxis(),n,i=r.type==="category"?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=Be(xt(t.get("barMaxWidth"),i),i),o=Be(xt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?Be(s,i):Math.max(Math.min(i/2,a),o)}const n1e=t1e;function i1e(t){t.registerChartView(Wme),t.registerSeriesModel(Ume),t.registerPreprocessor(Yme),t.registerVisual(e1e),t.registerLayout(n1e)}function Q9(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}var a1e=function(t){pe(e,t);function e(r,n){var i=t.call(this)||this,a=new kp(r,n),o=new st;return i.add(a),i.add(o),i.updateData(r,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(r){for(var n=r.symbolType,i=r.color,a=r.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/h*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;Je(c)?f=c(i):f=c,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(r,n,i,a,o){if(n>0){r.__t=0;var s=this,l=r.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(r)});a||l.done(function(){s.remove(r)}),l.start()}},e.prototype._getLineLength=function(r){return Gs(r.__p1,r.__cp1)+Gs(r.__cp1,r.__p2)},e.prototype._updateAnimationPoints=function(r,n){r.__p1=n[0],r.__p2=n[1],r.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(r,n,i){this.childAt(0).updateData(r,n,i),this._updateEffectSymbol(r,n)},e.prototype._updateSymbolPosition=function(r){var n=r.__p1,i=r.__p2,a=r.__cp1,o=r.__t<1?r.__t:2-r.__t,s=[r.x,r.y],l=s.slice(),u=Jr,h=e5;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var c=r.__t<1?h(n[0],a[0],i[0],o):h(i[0],a[0],n[0],1-o),f=r.__t<1?h(n[1],a[1],i[1],o):h(i[1],a[1],n[1],1-o);r.rotation=-Math.atan2(f,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(r.__lastT!==void 0&&r.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var h=(n-a[l])/(a[l+1]-a[l]),c=i[l],f=i[l+1];r.x=c[0]*(1-h)+h*f[0],r.y=c[1]*(1-h)+h*f[1];var d=r.__t<1?f[0]-c[0]:c[0]-f[0],v=r.__t<1?f[1]-c[1]:c[1]-f[1];r.rotation=-Math.atan2(v,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,r.ignore=!1}},e}(oN);const v1e=p1e;var g1e=function(){function t(){this.polyline=!1,this.curveness=0,this.segs=[]}return t}(),m1e=function(t){pe(e,t);function e(r){var n=t.call(this,r)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new g1e},e.prototype.buildPath=function(r,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){r.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+c)/2-(h-f)*a,v=(h+f)/2-(c-u)*a;r.quadraticCurveTo(d,v,c,f)}else r.lineTo(c,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(r,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var c=a[u++],f=a[u++],d=1;d0){var m=(c+v)/2-(f-g)*o,y=(f+g)/2-(v-c)*o;if(dB(c,f,m,y,v,g,s,r,n))return l}else if(zs(c,f,v,g,s,r,n))return l;l++}return-1},e.prototype.contain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();if(r=i[0],n=i[1],a.contain(r,n)){var o=this.hoverDataIdx=this.findDataIndex(r,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var r=this._rect;if(!r){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}();const _1e=y1e;var x1e={seriesType:"lines",plan:ff(),reset:function(t){var e=t.coordinateSystem;if(e){var r=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(r){for(var u=0,h=i.start;h0&&(h||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var c=r.get("clip",!0)&&m2(r.coordinateSystem,!1,r);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(r,n,i){var a=r.getData(),o=this._updateLineDraw(a,r);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(r,n,i){this._lineDraw.incrementalUpdate(r,n.getData()),this._finished=r.end===n.getData().count()},e.prototype.eachRendered=function(r){this._lineDraw&&this._lineDraw.eachRendered(r)},e.prototype.updateTransform=function(r,n,i){var a=r.getData(),o=r.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=lN.reset(r,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(r,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new _1e:new Gw(o?a?v1e:sN:a?oN:$w),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(r){return!!r.get(["effect","show"])},e.prototype._clearLayer=function(r){var n=r.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(r,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(r,n){this.remove(r,n)},e.type="lines",e}(hr);const S1e=b1e;var w1e=typeof Uint32Array>"u"?Array:Uint32Array,C1e=typeof Float64Array>"u"?Array:Float64Array;function ek(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=Ce(e,function(r){var n=[r[0].coord,r[1].coord],i={coords:n};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),_S([i,r[0],r[1]])}))}var A1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.visualStyleAccessPath="lineStyle",r.visualDrawType="stroke",r}return e.prototype.init=function(r){r.data=r.data||[],ek(r);var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(r){if(ek(r),r.data){var n=this._processFlatCoordsArray(r.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(r.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(r){var n=this._processFlatCoordsArray(r.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=C1(this._flatCoords,n.flatCoords),this._flatCoordsOffset=C1(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),r.data=new Float32Array(n.count)),this.getRawData().appendData(r.data)},e.prototype._getCoordsFromItemModel=function(r){var n=this.getData().getItemModel(r),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(r){return this._flatCoordsOffset?this._flatCoordsOffset[r*2+1]:this._getCoordsFromItemModel(r).length},e.prototype.getLineCoords=function(r,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[r*2],a=this._flatCoordsOffset[r*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var r=this.option.progressive;return r??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var r=this.option.progressiveThreshold;return r??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var r=this.getModel("effect"),n=r.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:r.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(pr);const T1e=A1e;function Qg(t){return t instanceof Array||(t=[t,t]),t}var k1e={seriesType:"lines",reset:function(t){var e=Qg(t.get("symbol")),r=Qg(t.get("symbolSize")),n=t.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]);function i(a,o){var s=a.getItemModel(o),l=Qg(s.getShallow("symbol",!0)),u=Qg(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};const D1e=k1e;function M1e(t){t.registerChartView(S1e),t.registerSeriesModel(T1e),t.registerLayout(lN),t.registerVisual(D1e)}var L1e=256,E1e=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ol.createCanvas();this.canvas=e}return t.prototype.update=function(e,r,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),h=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),d=e.length;c.width=r,c.height=n;for(var v=0;v0){var j=o(w)?l:u;w>0&&(w=w*$+O),M[D++]=j[H],M[D++]=j[H+1],M[D++]=j[H+2],M[D++]=j[H+3]*w*256}else D+=4}return f.putImageData(T,0,0),c},t.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ol.createCanvas()),r=this.pointSize+this.blurSize,n=r*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-r,r,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},t.prototype._getGradient=function(e,r){for(var n=this._gradientPixels,i=n[r]||(n[r]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},t}();const I1e=E1e;function B1e(t,e,r){var n=t[1]-t[0];e=Ce(e,function(o){return{interval:[(o.interval[0]-t[0])/n,(o.interval[1]-t[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function tk(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}var R1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===r&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=r.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(r,i,0,r.getData().count()):tk(o)&&this._renderOnGeo(o,r,a,i)},e.prototype.incrementalPrepareRender=function(r,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(r,n,i,a){var o=n.coordinateSystem;o&&(tk(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,r.start,r.end,!0)))},e.prototype.eachRendered=function(r){vl(this._progressiveEls||this.group,r)},e.prototype._renderOnCartesianAndCalendar=function(r,n,i,a,o){var s=r.coordinateSystem,l=sh(s,"cartesian2d"),u,h,c,f;if(l){var d=s.getAxis("x"),v=s.getAxis("y");u=d.getBandWidth()+.5,h=v.getBandWidth()+.5,c=d.scale.getExtent(),f=v.scale.getExtent()}for(var g=this.group,m=r.getData(),y=r.getModel(["emphasis","itemStyle"]).getItemStyle(),b=r.getModel(["blur","itemStyle"]).getItemStyle(),w=r.getModel(["select","itemStyle"]).getItemStyle(),T=r.get(["itemStyle","borderRadius"]),M=Xr(r),D=r.getModel("emphasis"),P=D.get("focus"),O=D.get("blurScope"),V=D.get("disabled"),$=l?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],H=i;Hc[1]||Jf[1])continue;var K=s.dataToPoint([G,J]);j=new Rt({shape:{x:K[0]-u/2,y:K[1]-h/2,width:u,height:h},style:q})}else{if(isNaN(m.get($[1],H)))continue;j=new Rt({z2:1,shape:s.dataToRect([m.get($[0],H)]).contentShape,style:q})}if(m.hasItemOption){var se=m.getItemModel(H),ae=se.getModel("emphasis");y=ae.getModel("itemStyle").getItemStyle(),b=se.getModel(["blur","itemStyle"]).getItemStyle(),w=se.getModel(["select","itemStyle"]).getItemStyle(),T=se.get(["itemStyle","borderRadius"]),P=ae.get("focus"),O=ae.get("blurScope"),V=ae.get("disabled"),M=Xr(se)}j.shape.r=T;var ce=r.getRawValue(H),ye="-";ce&&ce[2]!=null&&(ye=ce[2]+""),pn(j,M,{labelFetcher:r,labelDataIndex:H,defaultOpacity:q.opacity,defaultText:ye}),j.ensureState("emphasis").style=y,j.ensureState("blur").style=b,j.ensureState("select").style=w,wr(j,P,O,V),j.incremental=o,o&&(j.states.emphasis.hoverLayer=!0),g.add(j),m.setItemGraphicEl(H,j),this._progressiveEls&&this._progressiveEls.push(j)}},e.prototype._renderOnGeo=function(r,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new I1e;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var h=r.getViewRect().clone(),c=r.getRoamTransform();h.applyTransform(c);var f=Math.max(h.x,0),d=Math.max(h.y,0),v=Math.min(h.width+h.x,a.getWidth()),g=Math.min(h.height+h.y,a.getHeight()),m=v-f,y=g-d,b=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],w=l.mapArray(b,function(P,O,V){var $=r.dataToPoint([P,O]);return $[0]-=f,$[1]-=d,$.push(V),$}),T=i.getExtent(),M=i.type==="visualMap.continuous"?P1e(T,i.option.range):B1e(T,i.getPieceList(),i.option.selected);u.update(w,m,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},M);var D=new vn({style:{width:m,height:y,x:f,y:d,image:u.canvas},silent:!0});this.group.add(D)},e.type="heatmap",e}(hr);const F1e=R1e;var O1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.getInitialData=function(r,n){return as(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var r=Sp.get(this.get("coordinateSystem"));if(r&&r.dimensions)return r.dimensions[0]==="lng"&&r.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(pr);const N1e=O1e;function z1e(t){t.registerChartView(F1e),t.registerSeriesModel(N1e)}var V1e=["itemStyle","borderWidth"],rk=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Nb=new fo,$1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group,o=r.getData(),s=this._data,l=r.coordinateSystem,u=l.getBaseAxis(),h=u.isHorizontal(),c=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:r,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:h,valueDim:rk[+h],categoryDim:rk[1-+h]};return o.diff(s).add(function(d){if(o.hasValue(d)){var v=ik(o,d),g=nk(o,d,v,f),m=ak(o,f,g);o.setItemGraphicEl(d,m),a.add(m),sk(m,f,g)}}).update(function(d,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(d)){a.remove(g);return}var m=ik(o,d),y=nk(o,d,m,f),b=pN(o,y);g&&b!==g.__pictorialShapeStr&&(a.remove(g),o.setItemGraphicEl(d,null),g=null),g?X1e(g,f,y):g=ak(o,f,y,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=y,a.add(g),sk(g,f,y)}).remove(function(d){var v=s.getItemGraphicEl(d);v&&ok(s,d,v.__pictorialSymbolMeta.animationModel,v)}).execute(),this._data=o,this.group},e.prototype.remove=function(r,n){var i=this.group,a=this._data;r.get("animation")?a&&a.eachItemGraphicEl(function(o){ok(a,dt(o).dataIndex,r,o)}):i.removeAll()},e.type="pictorialBar",e}(hr);function nk(t,e,r,n){var i=t.getItemLayout(e),a=r.get("symbolRepeat"),o=r.get("symbolClip"),s=r.get("symbolPosition")||"start",l=r.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=r.get("symbolPatternSize")||2,c=r.isAnimationEnabled(),f={dataIndex:e,layout:i,itemModel:r,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:r.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?r:null,hoverScale:c&&r.get(["emphasis","scale"]),z2:r.getShallow("z",!0)||0};G1e(r,a,i,n,f),H1e(t,e,i,a,o,f.boundingLength,f.pxSign,h,n,f),q1e(r,f.symbolScale,u,n,f);var d=f.symbolSize,v=ah(r.get("symbolOffset"),d);return W1e(r,d,i,a,o,v,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function G1e(t,e,r,n,i){var a=n.valueDim,o=t.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(r[a.wh]<=0),h;if(Se(o)){var c=[zb(s,o[0])-l,zb(s,o[1])-l];c[1]0?1:-1}function zb(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function H1e(t,e,r,n,i,a,o,s,l,u){var h=l.valueDim,c=l.categoryDim,f=Math.abs(r[c.wh]),d=t.getItemVisual(e,"symbolSize"),v;Se(d)?v=d.slice():d==null?v=["100%","100%"]:v=[d,d],v[c.index]=Be(v[c.index],f),v[h.index]=Be(v[h.index],n?f:Math.abs(a)),u.symbolSize=v;var g=u.symbolScale=[v[0]/s,v[1]/s];g[h.index]*=(l.isHorizontal?-1:1)*o}function q1e(t,e,r,n,i){var a=t.get(V1e)||0;a&&(Nb.attr({scaleX:e[0],scaleY:e[1],rotation:r}),Nb.updateTransform(),a/=Nb.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function W1e(t,e,r,n,i,a,o,s,l,u,h,c){var f=h.categoryDim,d=h.valueDim,v=c.pxSign,g=Math.max(e[d.index]+s,0),m=g;if(n){var y=Math.abs(l),b=Qr(t.get("symbolMargin"),"15%")+"",w=!1;b.lastIndexOf("!")===b.length-1&&(w=!0,b=b.slice(0,b.length-1));var T=Be(b,e[d.index]),M=Math.max(g+T*2,0),D=w?0:T*2,P=JI(n),O=P?n:lk((y+D)/M),V=y-O*g;T=V/2/(w?O:Math.max(O-1,1)),M=g+T*2,D=w?0:T*2,!P&&n!=="fixed"&&(O=u?lk((Math.abs(u)+D)/M):0),m=O*M-D,c.repeatTimes=O,c.symbolMargin=T}var $=v*(m/2),H=c.pathPosition=[];H[f.index]=r[f.wh]/2,H[d.index]=o==="start"?$:o==="end"?l-$:l/2,a&&(H[0]+=a[0],H[1]+=a[1]);var j=c.bundlePosition=[];j[f.index]=r[f.xy],j[d.index]=r[d.xy];var q=c.barRectShape=xe({},r);q[d.wh]=v*Math.max(Math.abs(r[d.wh]),Math.abs(H[d.index]+$)),q[f.wh]=r[f.wh];var G=c.clipShape={};G[f.xy]=-r[f.xy],G[f.wh]=h.ecSize[f.wh],G[d.xy]=0,G[d.wh]=r[d.wh]}function uN(t){var e=t.symbolPatternSize,r=Fr(t.symbolType,-e/2,-e/2,e,e);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function hN(t,e,r,n){var i=t.__pictorialBundle,a=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,h=0,c=a[e.valueDim.index]+o+r.symbolMargin*2;for(jw(t,function(g){g.__pictorialAnimationIndex=h,g.__pictorialRepeatTimes=u,h0:y<0)&&(b=u-1-g),m[l.index]=c*(b-u/2+.5)+s[l.index],{x:m[0],y:m[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation}}}function cN(t,e,r,n){var i=t.__pictorialBundle,a=t.__pictorialMainPath;a?Rc(a,null,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:r.symbolScale[0],scaleY:r.symbolScale[1],rotation:r.rotation},r,n):(a=t.__pictorialMainPath=uN(r),i.add(a),Rc(a,{x:r.pathPosition[0],y:r.pathPosition[1],scaleX:0,scaleY:0,rotation:r.rotation},{scaleX:r.symbolScale[0],scaleY:r.symbolScale[1]},r,n))}function fN(t,e,r){var n=xe({},e.barRectShape),i=t.__pictorialBarRect;i?Rc(i,null,{shape:n},e,r):(i=t.__pictorialBarRect=new Rt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,t.add(i))}function dN(t,e,r,n){if(r.symbolClip){var i=t.__pictorialClipPath,a=xe({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)Gt(i,{shape:a},s,l);else{a[o.wh]=0,i=new Rt({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],bp[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function ik(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=U1e,r.isAnimationEnabled=Y1e,r}function U1e(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Y1e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ak(t,e,r,n){var i=new st,a=new st;return i.add(a),i.__pictorialBundle=a,a.x=r.bundlePosition[0],a.y=r.bundlePosition[1],r.symbolRepeat?hN(i,e,r):cN(i,e,r),fN(i,r,n),dN(i,e,r,n),i.__pictorialShapeStr=pN(t,r),i.__pictorialSymbolMeta=r,i}function X1e(t,e,r){var n=r.animationModel,i=r.dataIndex,a=t.__pictorialBundle;Gt(a,{x:r.bundlePosition[0],y:r.bundlePosition[1]},n,i),r.symbolRepeat?hN(t,e,r,!0):cN(t,e,r,!0),fN(t,r,!0),dN(t,e,r,!0)}function ok(t,e,r,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];jw(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(r=null),W(a,function(o){ll(o,{scaleX:0,scaleY:0},r,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function pN(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function jw(t,e,r){W(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(r,n)})}function Rc(t,e,r,n,i,a){e&&t.attr(e),n.symbolClip&&!i?r&&t.attr(r):r&&bp[i?"updateProps":"initProps"](t,r,n.animationModel,n.dataIndex,a)}function sk(t,e,r){var n=r.dataIndex,i=r.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),h=a.get("focus"),c=a.get("blurScope"),f=a.get("scale");jw(t,function(g){if(g instanceof vn){var m=g.style;g.useStyle(xe({image:m.image,x:m.x,y:m.y,width:m.width,height:m.height},r.style))}else g.useStyle(r.style);var y=g.ensureState("emphasis");y.style=o,f&&(y.scaleX=g.scaleX*1.1,y.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=r.z2});var d=e.valueDim.posDesc[+(r.boundingLength>0)],v=t.__pictorialBarRect;pn(v,Xr(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Yc(e.seriesModel.getData(),n),inheritColor:r.style.fill,defaultOpacity:r.style.opacity,defaultOutsidePosition:d}),wr(t,h,c,a.get("disabled"))}function lk(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}const Z1e=$1e;var j1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.hasSymbolVisual=!0,r.defaultSymbol="roundRect",r}return e.prototype.getInitialData=function(r){return r.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=gl(Q1.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Q1);const K1e=j1e;function J1e(t){t.registerChartView(Z1e),t.registerSeriesModel(K1e),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,pt(ZR,"pictorialBar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,jR("pictorialBar"))}var Q1e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._layers=[],r}return e.prototype.render=function(r,n,i){var a=r.getData(),o=this,s=this.group,l=r.getLayerSeries(),u=a.getLayout("layoutInfo"),h=u.rect,c=u.boundaryGap;s.x=0,s.y=h.y+c[0];function f(m){return m.name}var d=new ts(this._layersSeries||[],l,f,f),v=[];d.add(Ge(g,this,"add")).update(Ge(g,this,"update")).remove(Ge(g,this,"remove")).execute();function g(m,y,b){var w=o._layers;if(m==="remove"){s.remove(w[y]);return}for(var T=[],M=[],D,P=l[y].indices,O=0;Oa&&(a=s),n.push(s)}for(var u=0;ua&&(a=c)}return{y0:i,max:a}}function oye(t){t.registerChartView(tye),t.registerSeriesModel(nye),t.registerLayout(iye),t.registerProcessor(Lp("themeRiver"))}var sye=2,lye=4,uye=function(t){pe(e,t);function e(r,n,i,a){var o=t.call(this)||this;o.z2=sye,o.textConfig={inside:!0},dt(o).seriesIndex=n.seriesIndex;var s=new Vt({z2:lye,silent:r.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,r,n,i,a),o}return e.prototype.updateData=function(r,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;dt(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),h=n.getLayout(),c=xe({},h);c.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=Wc(d,o));var v=Iu(l.getModel("itemStyle"),c,!0);xe(c,v),W(Yn,function(b){var w=s.ensureState(b),T=l.getModel([b,"itemStyle"]);w.style=T.getItemStyle();var M=Iu(T,c);M&&(w.shape=M)}),r?(s.setShape(c),s.shape.r=h.r0,fr(s,{shape:{r:h.r}},i,n.dataIndex)):(Gt(s,{shape:c},i),ba(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var m=u.get("focus"),y=m==="ancestor"?n.getAncestorsIndices():m==="descendant"?n.getDescendantIndices():m;wr(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(r){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),h=Math.sin(l),c=this,f=c.getTextContent(),d=this.node.dataIndex,v=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(v!=null&&Math.abs(s)Math.PI/2?"right":"left"):!j||j==="center"?(s===2*Math.PI&&o.r0===0?$=0:$=(o.r+o.r0)/2,j="center"):j==="left"?($=o.r0+H,l>Math.PI/2&&(j="right")):j==="right"&&($=o.r-H,l>Math.PI/2&&(j="left")),T.style.align=j,T.style.verticalAlign=m(b,"verticalAlign")||"middle",T.x=$*u+o.cx,T.y=$*h+o.cy;var q=m(b,"rotate"),G=0;q==="radial"?(G=pa(-l),G>Math.PI/2&&GMath.PI/2?G-=Math.PI:G<-Math.PI/2&&(G+=Math.PI)):$t(q)&&(G=q*Math.PI/180),T.rotation=pa(G)});function m(y,b){var w=y.get(b);return w??a.get(b)}f.dirtyStyle()},e}(li);const hk=uye;var c3="sunburstRootToNode",ck="sunburstHighlight",hye="sunburstUnhighlight";function cye(t){t.registerAction({type:c3,update:"updateView"},function(e,r){r.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i,a){var o=ep(e,[c3],i);if(o){var s=i.getViewRoot();s&&(e.direction=Rw(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),t.registerAction({type:ck,update:"none"},function(e,r,n){e=xe({},e),r.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(a){var o=ep(e,[ck],a);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(xe(e,{type:"highlight"}))}),t.registerAction({type:hye,update:"updateView"},function(e,r,n){e=xe({},e),n.dispatchAction(xe(e,{type:"downplay"}))})}var fye=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i,a){var o=this;this.seriesModel=r,this.api=i,this.ecModel=n;var s=r.getData(),l=s.tree.root,u=r.getViewRoot(),h=this.group,c=r.get("renderLabelForZeroData"),f=[];u.eachNode(function(b){f.push(b)});var d=this._oldChildren||[];v(f,d),y(l,u),this._initEvents(),this._oldChildren=f;function v(b,w){if(b.length===0&&w.length===0)return;new ts(w,b,T,T).add(M).update(M).remove(pt(M,null)).execute();function T(D){return D.getId()}function M(D,P){var O=D==null?null:b[D],V=P==null?null:w[P];g(O,V)}}function g(b,w){if(!c&&b&&!b.getValue()&&(b=null),b!==l&&w!==l){if(w&&w.piece)b?(w.piece.updateData(!1,b,r,n,i),s.setItemGraphicEl(b.dataIndex,w.piece)):m(w);else if(b){var T=new hk(b,r,n,i);h.add(T),s.setItemGraphicEl(b.dataIndex,T)}}}function m(b){b&&b.piece&&(h.remove(b.piece),b.piece=null)}function y(b,w){w.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,b,r,n,i):(o.virtualPiece=new hk(b,r,n,i),h.add(o.virtualPiece)),w.piece.off("click"),o.virtualPiece.on("click",function(T){o._rootToNode(w.parentNode)})):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var r=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=r.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")r._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var h=l.get("target",!0)||"_blank";V1(u,h)}}i=!0}})})},e.prototype._rootToNode=function(r){r!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:c3,from:this.uid,seriesId:this.seriesModel.id,targetNode:r})},e.prototype.containPoint=function(r,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=r[0]-a.cx,s=r[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(hr);const dye=fye;var pye=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.ignoreStyleOnData=!0,r}return e.prototype.getInitialData=function(r,n){var i={name:r.name,children:r.data};vN(i);var a=this._levelModels=Ce(r.levels||[],function(l){return new ur(l,this,n)},this),o=Pw.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,h){var c=o.getNodeByDataIndex(h),f=a[c.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(r){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(r);return n.treePathInfo=x2(i,this),n},e.prototype.getLevelModel=function(r){return this._levelModels&&this._levelModels[r.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(r){r?this._viewRoot=r:r=this._viewRoot;var n=this.getRawData().tree.root;(!r||r!==n&&!n.contains(r))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){_O(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(pr);function vN(t){var e=0;W(t.children,function(n){vN(n);var i=n.value;Se(i)&&(i=i[0]),e+=i});var r=t.value;Se(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),Se(t.value)?t.value[0]=r:t.value=r}const vye=pye;var fk=Math.PI/180;function gye(t,e,r){e.eachSeriesByType(t,function(n){var i=n.get("center"),a=n.get("radius");Se(a)||(a=[0,a]),Se(i)||(i=[i,i]);var o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=Be(i[0],o),h=Be(i[1],s),c=Be(a[0],l/2),f=Be(a[1],l/2),d=-n.get("startAngle")*fk,v=n.get("minAngle")*fk,g=n.getData().tree.root,m=n.getViewRoot(),y=m.depth,b=n.get("sort");b!=null&&gN(m,b);var w=0;W(m.children,function(K){!isNaN(K.getValue())&&w++});var T=m.getValue(),M=Math.PI/(T||w)*2,D=m.depth>0,P=m.height-(D?-1:1),O=(f-c)/(P||1),V=n.get("clockwise"),$=n.get("stillShowZeroSum"),H=V?1:-1,j=function(K,se){if(K){var ae=se;if(K!==g){var ce=K.getValue(),ye=T===0&&$?M:ce*M;ye1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&ze(s)&&(s=n5(s,(n.depth-1)/(a-1)*.5)),s}t.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=r(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");xe(u,l)})})}function _ye(t){t.registerChartView(dye),t.registerSeriesModel(vye),t.registerLayout(pt(gye,"sunburst")),t.registerProcessor(pt(Lp,"sunburst")),t.registerVisual(yye),cye(t)}var dk={color:"fill",borderColor:"stroke"},xye={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Yo=Ft(),bye=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(r,n){return as(null,this)},e.prototype.getDataParams=function(r,n,i){var a=t.prototype.getDataParams.call(this,r,n);return i&&(a.info=Yo(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(pr);const Sye=bye;function wye(t,e){return e=e||[0,0],Ce(["x","y"],function(r,n){var i=this.getAxis(r),a=e[n],o=t[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function Cye(t){var e=t.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:Ge(wye,t)}}}function Aye(t,e){return e=e||[0,0],Ce([0,1],function(r){var n=e[r],i=t[r]/2,a=[],o=[];return a[r]=n-i,o[r]=n+i,a[1-r]=o[1-r]=e[1-r],Math.abs(this.dataToPoint(a)[r]-this.dataToPoint(o)[r])},this)}function Tye(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(r){return t.dataToPoint(r)},size:Ge(Aye,t)}}}function kye(t,e){var r=this.getAxis(),n=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return r.type==="category"?r.getBandWidth():Math.abs(r.dataToCoord(n-i)-r.dataToCoord(n+i))}function Dye(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(r){return t.dataToPoint(r)},size:Ge(kye,t)}}}function Mye(t,e){return e=e||[0,0],Ce(["Radius","Angle"],function(r,n){var i="get"+r+"Axis",a=this[i](),o=e[n],s=t[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return r==="Angle"&&(l=l*Math.PI/180),l},this)}function Lye(t){var e=t.getRadiusAxis(),r=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Ge(Mye,t)}}}function Eye(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(n,i){return t.dataToPoint(n,i)}}}}function mN(t,e,r,n){return t&&(t.legacy||t.legacy!==!1&&!r&&!n&&e!=="tspan"&&(e==="text"||He(t,"text")))}function yN(t,e,r){var n=t,i,a,o;if(e==="text")o=n;else{o={},He(n,"text")&&(o.text=n.text),He(n,"rich")&&(o.rich=n.rich),He(n,"textFill")&&(o.fill=n.textFill),He(n,"textStroke")&&(o.stroke=n.textStroke),He(n,"fontFamily")&&(o.fontFamily=n.fontFamily),He(n,"fontSize")&&(o.fontSize=n.fontSize),He(n,"fontStyle")&&(o.fontStyle=n.fontStyle),He(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=He(n,"textPosition");r?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),He(n,"textPosition")&&(i.position=n.textPosition),He(n,"textOffset")&&(i.offset=n.textOffset),He(n,"textRotation")&&(i.rotation=n.textRotation),He(n,"textDistance")&&(i.distance=n.textDistance)}return pk(o,t),W(o.rich,function(l){pk(l,l)}),{textConfig:i,textContent:a}}function pk(t,e){e&&(e.font=e.textFont||e.font,He(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),He(e,"textAlign")&&(t.align=e.textAlign),He(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),He(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),He(e,"textWidth")&&(t.width=e.textWidth),He(e,"textHeight")&&(t.height=e.textHeight),He(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),He(e,"textPadding")&&(t.padding=e.textPadding),He(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),He(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),He(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),He(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),He(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),He(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),He(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function vk(t,e,r){var n=t;n.textPosition=n.textPosition||r.position||"inside",r.offset!=null&&(n.textOffset=r.offset),r.rotation!=null&&(n.textRotation=r.rotation),r.distance!=null&&(n.textDistance=r.distance);var i=n.textPosition.indexOf("inside")>=0,a=t.fill||"#000";gk(n,e);var o=n.textFill==null;return i?o&&(n.textFill=r.insideFill||"#fff",!n.textStroke&&r.insideStroke&&(n.textStroke=r.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=t.fill||r.outsideFill||"#000"),!n.textStroke&&r.outsideStroke&&(n.textStroke=r.outsideStroke)),n.text=e.text,n.rich=e.rich,W(e.rich,function(s){gk(s,s)}),n}function gk(t,e){e&&(He(e,"fill")&&(t.textFill=e.fill),He(e,"stroke")&&(t.textStroke=e.fill),He(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),He(e,"font")&&(t.font=e.font),He(e,"fontStyle")&&(t.fontStyle=e.fontStyle),He(e,"fontWeight")&&(t.fontWeight=e.fontWeight),He(e,"fontSize")&&(t.fontSize=e.fontSize),He(e,"fontFamily")&&(t.fontFamily=e.fontFamily),He(e,"align")&&(t.textAlign=e.align),He(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),He(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),He(e,"width")&&(t.textWidth=e.width),He(e,"height")&&(t.textHeight=e.height),He(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),He(e,"padding")&&(t.textPadding=e.padding),He(e,"borderColor")&&(t.textBorderColor=e.borderColor),He(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),He(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),He(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),He(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),He(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),He(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),He(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),He(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),He(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),He(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var _N={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},mk=Lt(_N);so(uo,function(t,e){return t[e]=1,t},{});uo.join(", ");var sy=["","style","shape","extra"],jc=Ft();function Kw(t,e,r,n,i){var a=t+"Animation",o=nf(t,n,i)||{},s=jc(e).userDuring;return o.duration>0&&(o.during=s?Ge(Fye,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=t),xe(o,r[a]),o}function Wm(t,e,r,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=r.isAnimationEnabled(),l=jc(t),u=e.style;l.userDuring=e.during;var h={},c={};if(Nye(t,e,c),_k("shape",e,c),_k("extra",e,c),!a&&s&&(Oye(t,e,h),yk("shape",t,e,h),yk("extra",t,e,h),zye(t,e,u,h)),c.style=u,Iye(t,c,o),Pye(t,e),s)if(a){var f={};W(sy,function(v){var g=v?e[v]:e;g&&g.enterFrom&&(v&&(f[v]=f[v]||{}),xe(v?f[v]:f,g.enterFrom))});var d=Kw("enter",t,e,r,i);d.duration>0&&t.animateFrom(f,d)}else Bye(t,e,i||0,r,h);xN(t,e),u?t.dirty():t.markRedraw()}function xN(t,e){for(var r=jc(t).leaveToProps,n=0;n0&&t.animateFrom(i,a)}}function Pye(t,e){He(e,"silent")&&(t.silent=e.silent),He(e,"ignore")&&(t.ignore=e.ignore),t instanceof ji&&He(e,"invisible")&&(t.invisible=e.invisible),t instanceof Tt&&He(e,"autoBatch")&&(t.autoBatch=e.autoBatch)}var Wa={},Rye={setTransform:function(t,e){return Wa.el[t]=e,this},getTransform:function(t){return Wa.el[t]},setShape:function(t,e){var r=Wa.el,n=r.shape||(r.shape={});return n[t]=e,r.dirtyShape&&r.dirtyShape(),this},getShape:function(t){var e=Wa.el.shape;if(e)return e[t]},setStyle:function(t,e){var r=Wa.el,n=r.style;return n&&(n[t]=e,r.dirtyStyle&&r.dirtyStyle()),this},getStyle:function(t){var e=Wa.el.style;if(e)return e[t]},setExtra:function(t,e){var r=Wa.el.extra||(Wa.el.extra={});return r[t]=e,this},getExtra:function(t){var e=Wa.el.extra;if(e)return e[t]}};function Fye(){var t=this,e=t.el;if(e){var r=jc(e).userDuring,n=t.userDuring;if(r!==n){t.el=t.userDuring=null;return}Wa.el=e,n(Rye)}}function yk(t,e,r,n){var i=r[t];if(i){var a=e[t],o;if(a){var s=r.transition,l=i.transition;if(l)if(!o&&(o=n[t]={}),qu(l))xe(o,a);else for(var u=er(l),h=0;h=0){!o&&(o=n[t]={});for(var d=Lt(a),h=0;h=0)){var f=t.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var v=Lt(r),u=0;u=0?e.getStore().get(se,J):void 0}var ae=e.get(K.name,J),ce=K&&K.ordinalMeta;return ce?ce.categories[ae]:ae}function D(G,J){J==null&&(J=u);var K=e.getItemVisual(J,"style"),se=K&&K.fill,ae=K&&K.opacity,ce=b(J,Zs).getItemStyle();se!=null&&(ce.fill=se),ae!=null&&(ce.opacity=ae);var ye={inheritColor:ze(se)?se:"#000"},de=w(J,Zs),De=lr(de,null,ye,!1,!0);De.text=de.getShallow("show")?xt(t.getFormattedLabel(J,Zs),Yc(e,J)):null;var Ie=N1(de,ye,!1);return V(G,ce),ce=vk(ce,De,Ie),G&&O(ce,G),ce.legacy=!0,ce}function P(G,J){J==null&&(J=u);var K=b(J,Xo).getItemStyle(),se=w(J,Xo),ae=lr(se,null,null,!0,!0);ae.text=se.getShallow("show")?io(t.getFormattedLabel(J,Xo),t.getFormattedLabel(J,Zs),Yc(e,J)):null;var ce=N1(se,null,!0);return V(G,K),K=vk(K,ae,ce),G&&O(K,G),K.legacy=!0,K}function O(G,J){for(var K in J)He(J,K)&&(G[K]=J[K])}function V(G,J){G&&(G.textFill&&(J.textFill=G.textFill),G.textPosition&&(J.textPosition=G.textPosition))}function $(G,J){if(J==null&&(J=u),He(dk,G)){var K=e.getItemVisual(J,"style");return K?K[dk[G]]:null}if(He(xye,G))return e.getItemVisual(J,G)}function H(G){if(a.type==="cartesian2d"){var J=a.getBaseAxis();return Jue(rt({axis:J},G))}}function j(){return r.getCurrentSeriesIndices()}function q(G){return nP(G,r)}}function jye(t){var e={};return W(t.dimensions,function(r){var n=t.getDimensionInfo(r);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=t.getDimensionIndex(r)}}),e}function Hb(t,e,r,n,i,a,o){if(!n){a.remove(e);return}var s=r6(t,e,r,n,i,a);return s&&o.setItemGraphicEl(r,s),s&&wr(s,n.focus,n.blurScope,n.emphasisDisabled),s}function r6(t,e,r,n,i,a){var o=-1,s=e;e&&CN(e,n,i)&&(o=Ct(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=e6(n),s&&Wye(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),Pi.normal.cfg=Pi.normal.conOpt=Pi.emphasis.cfg=Pi.emphasis.conOpt=Pi.blur.cfg=Pi.blur.conOpt=Pi.select.cfg=Pi.select.conOpt=null,Pi.isLegacy=!1,Jye(u,r,n,i,l,Pi),Kye(u,r,n,i,l),t6(t,u,r,n,Pi,i,l),He(n,"info")&&(Yo(u).info=n.info);for(var h=0;h=0?a.replaceAt(u,o):a.add(u),u}function CN(t,e,r){var n=Yo(t),i=e.type,a=e.shape,o=e.style;return r.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&n2e(a)&&AN(a)!==n.customPathData||i==="image"&&He(o,"image")&&o.image!==n.customImagePath}function Kye(t,e,r,n,i){var a=r.clipPath;if(a===!1)t&&t.getClipPath()&&t.removeClipPath();else if(a){var o=t.getClipPath();o&&CN(o,a,n)&&(o=null),o||(o=e6(a),t.setClipPath(o)),t6(null,o,e,a,null,n,i)}}function Jye(t,e,r,n,i,a){if(!t.isGroup){bk(r,null,a),bk(r,Xo,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var h=t.getTextContent();if(o===!1)h&&t.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},h?h.clearStates():(h=e6(o),t.setTextContent(h)),t6(null,h,e,o,null,n,i);for(var c=o&&o.style,f=0;f=h;d--){var v=e.childAt(d);e2e(e,v,i)}}}function e2e(t,e,r){e&&w2(e,Yo(t).option,r)}function t2e(t){new ts(t.oldChildren,t.newChildren,Sk,Sk,t).add(wk).update(wk).remove(r2e).execute()}function Sk(t,e){var r=t&&t.name;return r??Hye+e}function wk(t,e){var r=this.context,n=t!=null?r.newChildren[t]:null,i=e!=null?r.oldChildren[e]:null;r6(r.api,i,r.dataIndex,n,r.seriesModel,r.group)}function r2e(t){var e=this.context,r=e.oldChildren[t];r&&w2(r,Yo(r).option,e.seriesModel)}function AN(t){return t&&(t.pathData||t.d)}function n2e(t){return t&&(He(t,"pathData")||He(t,"d"))}function i2e(t){t.registerChartView(Yye),t.registerSeriesModel(Sye)}var bu=Ft(),Ck=ot,qb=Ge,a2e=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,r,n,i){var a=r.get("value"),o=r.get("status");if(this._axisModel=e,this._axisPointerModel=r,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,r,n);var h=u.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var c=this._moveAnimation=this.determineAnimation(e,r);if(!s)s=this._group=new st,this.createPointerEl(s,u,e,r),this.createLabelEl(s,u,e,r),n.getZr().add(s);else{var f=pt(Ak,r,c);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,r)}kk(s,r,!0),this._renderHandle(a)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,r){var n=r.get("animation"),i=e.axis,a=i.type==="category",o=r.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=kw(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},t.prototype.makeElOption=function(e,r,n,i,a){},t.prototype.createPointerEl=function(e,r,n,i){var a=r.pointer;if(a){var o=bu(e).pointerEl=new bp[a.type](Ck(r.pointer));e.add(o)}},t.prototype.createLabelEl=function(e,r,n,i){if(r.label){var a=bu(e).labelEl=new Vt(Ck(r.label));e.add(a),Tk(a,i)}},t.prototype.updatePointerEl=function(e,r,n){var i=bu(e).pointerEl;i&&r.pointer&&(i.setStyle(r.pointer.style),n(i,{shape:r.pointer.shape}))},t.prototype.updateLabelEl=function(e,r,n,i){var a=bu(e).labelEl;a&&(a.setStyle(r.label.style),n(a,{x:r.label.x,y:r.label.y}),Tk(a,i))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var r=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=r.getModel("handle"),o=r.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=xp(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ko(u.event)},onmousedown:qb(this._onHandleDragMove,this,0,0),drift:qb(this._onHandleDragMove,this),ondragend:qb(this._onHandleDragEnd,this)}),n.add(i)),kk(i,r,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");Se(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,df(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},t.prototype._moveHandleToValue=function(e,r){Ak(this._axisPointerModel,!r&&this._moveAnimation,this._handle,Wb(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,r){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Wb(n),[e,r],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Wb(i)),bu(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var r=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:r.cursorPoint[0],y:r.cursorPoint[1],tooltipOption:r.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var r=e.getZr(),n=this._group,i=this._handle;r&&n&&(this._lastGraphicKey=null,n&&r.remove(n),i&&r.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Yd(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,r,n){return n=n||0,{x:e[n],y:e[1-n],width:r[n],height:r[1-n]}},t}();function Ak(t,e,r,n){TN(bu(r).lastProp,n)||(bu(r).lastProp=n,e?Gt(r,n,t):(r.stopAnimation(),r.attr(n)))}function TN(t,e){if(nt(t)&&nt(e)){var r=!0;return W(e,function(n,i){r=r&&TN(t[i],n)}),!!r}else return t===e}function Tk(t,e){t[e.get(["label","show"])?"show":"hide"]()}function Wb(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function kk(t,e,r){var n=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=r)})}const i6=a2e;function a6(t){var e=t.get("type"),r=t.getModel(e+"Style"),n;return e==="line"?(n=r.getLineStyle(),n.fill=null):e==="shadow"&&(n=r.getAreaStyle(),n.stroke=null),n}function kN(t,e,r,n,i){var a=r.get("value"),o=DN(a,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),s=r.getModel("label"),l=lf(s.get("padding")||0),u=s.getFont(),h=vp(o,u),c=i.position,f=h.width+l[1]+l[3],d=h.height+l[0]+l[2],v=i.align;v==="right"&&(c[0]-=f),v==="center"&&(c[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(c[1]-=d),g==="middle"&&(c[1]-=d/2),o2e(c,f,d,n);var m=s.get("backgroundColor");(!m||m==="auto")&&(m=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:lr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:m}),z2:10}}function o2e(t,e,r,n){var i=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,a)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function DN(t,e,r,n,i){t=e.scale.parse(t);var a=e.scale.getLabel({value:t},{precision:i.precision}),o=i.formatter;if(o){var s={value:yw(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};W(n,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,c=u&&u.getDataParams(h);c&&s.seriesData.push(c)}),ze(o)?a=o.replace("{value}",a):Je(o)&&(a=o(s))}return a}function o6(t,e,r){var n=Zi();return nh(n,n,r.rotation),lo(n,n,r.position),ma([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],n)}function MN(t,e,r,n,i,a){var o=rs.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get(["label","margin"]),kN(e,n,i,a,{position:o6(n.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function s6(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function LN(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function Dk(t,e,r,n,i,a){return{cx:t,cy:e,r0:r,r:n,startAngle:i,endAngle:a,clockwise:!0}}var s2e=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),h=Mk(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=a6(a),d=l2e[u](s,c,h);d.style=f,r.graphicKey=d.type,r.pointer=d}var v=Z5(l.model,i);MN(n,r,v,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=Z5(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=o6(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Mk(s,o).getOtherAxis(o).getGlobalExtent(),h=o.dim==="x"?0:1,c=[r.x,r.y];c[h]+=n[h],c[h]=Math.min(l[1],c[h]),c[h]=Math.max(l[0],c[h]);var f=(u[1]+u[0])/2,d=[f,f];d[h]=c[h];var v=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:r.rotation,cursorPoint:d,tooltipOption:v[h]}},e}(i6);function Mk(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var l2e={line:function(t,e,r){var n=s6([e,r[0]],[e,r[1]],Lk(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:LN([e-n/2,r[0]],[n,i],Lk(t))}}};function Lk(t){return t.dim==="x"?0:1}const u2e=s2e;var h2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Nt);const c2e=h2e;var $o=Ft(),f2e=W;function EN(t,e,r){if(!zt.node){var n=e.getZr();$o(n).records||($o(n).records={}),d2e(n,e);var i=$o(n).records[t]||($o(n).records[t]={});i.handler=r}}function d2e(t,e){if($o(t).initialized)return;$o(t).initialized=!0,r("click",pt(Ek,"click")),r("mousemove",pt(Ek,"mousemove")),r("globalout",v2e);function r(n,i){t.on(n,function(a){var o=g2e(e);f2e($o(t).records,function(s){s&&i(s,a,o.dispatchAction)}),p2e(o.pendings,e)})}}function p2e(t,e){var r=t.showTip.length,n=t.hideTip.length,i;r?i=t.showTip[r-1]:n&&(i=t.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function v2e(t,e,r){t.handler("leave",null,r)}function Ek(t,e,r,n){e.handler(t,r,n)}function g2e(t){var e={showTip:[],hideTip:[]},r=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=r,t.dispatchAction(n))};return{dispatchAction:r,pendings:e}}function p3(t,e){if(!zt.node){var r=e.getZr(),n=($o(r).records||{})[t];n&&($o(r).records[t]=null)}}var m2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=n.getComponent("tooltip"),o=r.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";EN("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(r,n){p3("axisPointer",n)},e.prototype.dispose=function(r,n){p3("axisPointer",n)},e.type="axisPointer",e}(Cr);const y2e=m2e;function IN(t,e){var r=[],n=t.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=ju(a,t);if(o==null||o<0||Se(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u),c=h.dim,f=u.dim,d=c==="x"||c==="radius"?1:0,v=a.mapDimension(f),g=[];g[d]=a.get(v,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),r=l.dataToPoint(g)||[]}else r=l.dataToPoint(a.getValues(Ce(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var Ik=Ft();function _2e(t,e,r){var n=t.currTrigger,i=[t.x,t.y],a=t,o=t.dispatchAction||Ge(r.dispatchAction,r),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Um(i)&&(i=IN({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Um(i),u=a.axesInfo,h=s.axesInfo,c=n==="leave"||Um(i),f={},d={},v={list:[],map:{}},g={showPointer:pt(b2e,d),showTooltip:pt(S2e,v)};W(s.coordSysMap,function(y,b){var w=l||y.containPoint(i);W(s.coordSysAxesInfo[b],function(T,M){var D=T.axis,P=T2e(u,T);if(!c&&w&&(!u||P)){var O=P&&P.value;O==null&&!l&&(O=D.pointToData(i)),O!=null&&Bk(T,O,g,!1,f)}})});var m={};return W(h,function(y,b){var w=y.linkGroup;w&&!d[b]&&W(w.axesInfo,function(T,M){var D=d[M];if(T!==y&&D){var P=D.value;w.mapper&&(P=y.axis.scale.parse(w.mapper(P,Pk(T),Pk(y)))),m[y.key]=P}})}),W(m,function(y,b){Bk(h[b],y,g,!0,f)}),w2e(d,h,f),C2e(v,i,t,o),A2e(h,o,r),f}}function Bk(t,e,r,n,i){var a=t.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!t.involveSeries){r.showPointer(t,e);return}var o=x2e(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&xe(i,s[0]),!n&&t.snap&&a.containData(l)&&l!=null&&(e=l),r.showPointer(t,e,s),r.showTooltip(t,o,l)}}function x2e(t,e){var r=e.axis,n=r.dim,i=t,a=[],o=Number.MAX_VALUE,s=-1;return W(e.seriesModels,function(l,u){var h=l.getData().mapDimensionsAll(n),c,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(h,t,r);f=d.dataIndices,c=d.nestestValue}else{if(f=l.getData().indicesOfNearest(h[0],t,r.type==="category"?.5:null),!f.length)return;c=l.getData().get(h[0],f[0])}if(!(c==null||!isFinite(c))){var v=t-c,g=Math.abs(v);g<=o&&((g=0&&s<0)&&(o=g,s=v,i=c,a.length=0),W(f,function(m){a.push({seriesIndex:l.seriesIndex,dataIndexInside:m,dataIndex:l.getData().getRawIndex(m)})}))}}),{payloadBatch:a,snapToValue:i}}function b2e(t,e,r,n){t[e.key]={value:r,payloadBatch:n}}function S2e(t,e,r,n){var i=r.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Qd(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function w2e(t,e,r){var n=r.axesInfo=[];W(e,function(i,a){var o=i.axisPointerModel.option,s=t[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function C2e(t,e,r,n){if(Um(e)||!t.list.length){n({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function A2e(t,e,r){var n=r.getZr(),i="axisPointerLastHighlights",a=Ik(n)[i]||{},o=Ik(n)[i]={};W(t,function(u,h){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&W(c.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];W(a,function(u,h){!o[h]&&l.push(u)}),W(o,function(u,h){!a[h]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function T2e(t,e){for(var r=0;r<(t||[]).length;r++){var n=t[r];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Pk(t){var e=t.axis.model,r={},n=r.axisDim=t.axis.dim;return r.axisIndex=r[n+"AxisIndex"]=e.componentIndex,r.axisName=r[n+"AxisName"]=e.name,r.axisId=r[n+"AxisId"]=e.id,r}function Um(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Pp(t){lh.registerAxisPointerClass("CartesianAxisPointer",u2e),t.registerComponentModel(c2e),t.registerComponentView(y2e),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var r=e.axisPointer.link;r&&!Se(r)&&(e.axisPointer.link=[r])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,r){e.getComponent("axisPointer").coordSysAxesInfo=d0e(e,r)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},_2e)}function k2e(t){At(iO),At(Pp)}var D2e=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),h=u.getExtent(),c=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=a6(a),v=L2e[f](s,l,c,h);v.style=d,r.graphicKey=v.type,r.pointer=v}var g=a.get(["label","margin"]),m=M2e(n,i,a,l,g);kN(r,i,a,o,m)},e}(i6);function M2e(t,e,r,n,i){var a=e.axis,o=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,h,c;if(a.dim==="radius"){var f=Zi();nh(f,f,s),lo(f,f,[n.cx,n.cy]),u=ma([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,v=rs.innerTextLayout(s,d*Math.PI/180,-1);h=v.textAlign,c=v.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var m=n.cx,y=n.cy;h=Math.abs(u[0]-m)/g<.3?"center":u[0]>m?"left":"right",c=Math.abs(u[1]-y)/g<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:h,verticalAlign:c}}var L2e={line:function(t,e,r,n){return t.dim==="angle"?{type:"Line",shape:s6(e.coordToPoint([n[0],r]),e.coordToPoint([n[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,n){var i=Math.max(1,t.getBandWidth()),a=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:Dk(e.cx,e.cy,n[0],n[1],(-r-i/2)*a,(-r+i/2)*a)}:{type:"Sector",shape:Dk(e.cx,e.cy,r-i/2,r+i/2,0,Math.PI*2)}}};const E2e=D2e;var I2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.findAxisModel=function(r){var n,i=this.ecModel;return i.eachComponent(r,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Nt);const B2e=I2e;var l6=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Rr).models[0]},e.type="polarAxis",e}(Nt);Or(l6,Tp);var P2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="angleAxis",e}(l6),R2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="radiusAxis",e}(l6),u6=function(t){pe(e,t);function e(r,n){return t.call(this,"radius",r,n)||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e}(Aa);u6.prototype.dataToRadius=Aa.prototype.dataToCoord;u6.prototype.radiusToData=Aa.prototype.coordToData;const F2e=u6;var O2e=Ft(),h6=function(t){pe(e,t);function e(r,n){return t.call(this,"angle",r,n||[0,360])||this}return e.prototype.pointToData=function(r,n){return this.polar.pointToData(r,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var r=this,n=r.getLabelModel(),i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=r.dataToCoord(s+1)-r.dataToCoord(s),u=Math.abs(l),h=vp(s==null?"":s+"",n.getFont(),"center","top"),c=Math.max(h.height,7),f=c/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),v=O2e(r.model),g=v.lastAutoInterval,m=v.lastTickCount;return g!=null&&m!=null&&Math.abs(g-d)<=1&&Math.abs(m-o)<=1&&g>d?d=g:(v.lastTickCount=o,v.lastAutoInterval=d),d},e}(Aa);h6.prototype.dataToAngle=Aa.prototype.dataToCoord;h6.prototype.angleToData=Aa.prototype.coordToData;const N2e=h6;var BN=["radius","angle"],z2e=function(){function t(e){this.dimensions=BN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new F2e,this._angleAxis=new N2e,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(e){var r=this.pointToCoord(e);return this._radiusAxis.contain(r[0])&&this._angleAxis.contain(r[1])},t.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},t.prototype.getAxis=function(e){var r="_"+e+"Axis";return this[r]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(e){var r=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&r.push(n),i.scale.type===e&&r.push(i),r},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(e){var r=this._angleAxis;return e===r?this._radiusAxis:r},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(e){var r=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[r],otherAxes:[this.getOtherAxis(r)]}},t.prototype.dataToPoint=function(e,r){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],r),this._angleAxis.dataToAngle(e[1],r)])},t.prototype.pointToData=function(e,r){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],r),this._angleAxis.angleToData(n[1],r)]},t.prototype.pointToCoord=function(e){var r=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(r*r+n*n);r/=l,n/=l;for(var u=Math.atan2(-n,r)/Math.PI*180,h=us;)u+=h*360;return[l,u]},t.prototype.coordToPoint=function(e){var r=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*r+this.cx,a=-Math.sin(n)*r+this.cy;return[i,a]},t.prototype.getArea=function(){var e=this.getAngleAxis(),r=this.getRadiusAxis(),n=r.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,h=l*l+u*u-1e-4,c=this.r,f=this.r0;return h<=c*c&&h>=f*f}}},t.prototype.convertToPixel=function(e,r,n){var i=Rk(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=Rk(r);return i===this?this.pointToData(n):null},t}();function Rk(t){var e=t.seriesModel,r=t.polarModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}const V2e=z2e;function $2e(t,e,r){var n=e.get("center"),i=r.getWidth(),a=r.getHeight();t.cx=Be(n[0],i),t.cy=Be(n[1],a);var o=t.getRadiusAxis(),s=Math.min(i,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:Se(l)||(l=[0,l]);var u=[Be(l[0],s),Be(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function G2e(t,e){var r=this,n=r.getAngleAxis(),i=r.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();W(Z1(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),W(Z1(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),Uc(n.scale,n.model),Uc(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function H2e(t){return t.mainType==="angleAxis"}function Fk(t,e){if(t.type=e.get("type"),t.scale=v2(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),H2e(e)){t.inverse=t.inverse!==e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t,t.model=e}var q2e={dimensions:BN,create:function(t,e){var r=[];return t.eachComponent("polar",function(n,i){var a=new V2e(i+"");a.update=G2e;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");Fk(o,l),Fk(s,u),$2e(a,n,e),r.push(a),n.coordinateSystem=a,a.model=n}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",Rr).models[0];n.coordinateSystem=i.coordinateSystem}}),r}};const W2e=q2e;var U2e=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function em(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function tm(t){var e=t.getRadiusAxis();return e.inverse?0:1}function Ok(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}var Y2e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.axisPointerClass="PolarAxisPointer",r}return e.prototype.render=function(r,n){if(this.group.removeAll(),!!r.get("show")){var i=r.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=Ce(i.getViewLabels(),function(h){h=ot(h);var c=i.scale,f=c.type==="ordinal"?c.getRawOrdinalNumber(h.tickValue):h.tickValue;return h.coord=i.dataToCoord(f),h});Ok(u),Ok(s),W(U2e,function(h){r.get([h,"show"])&&(!i.scale.isBlank()||h==="axisLine")&&X2e[h](this.group,r,a,s,l,o,u)},this)}},e.type="angleAxis",e}(lh),X2e={axisLine:function(t,e,r,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=tm(r),l=s?0:1,u;a[l]===0?u=new fo({shape:{cx:r.cx,cy:r.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):u=new jy({shape:{cx:r.cx,cy:r.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0}),u.style.fill=null,t.add(u)},axisTick:function(t,e,r,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[tm(r)],u=Ce(n,function(h){return new en({shape:em(r,[l,l+s],h.coord)})});t.add(Hi(u,{style:rt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,r,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[tm(r)],h=[],c=0;cy?"left":"right",T=Math.abs(m[1]-b)/g<.3?"middle":m[1]>b?"top":"bottom";if(s&&s[v]){var M=s[v];nt(M)&&M.textStyle&&(d=new ur(M.textStyle,l,l.ecModel))}var D=new Vt({silent:rs.isLabelSilent(e),style:lr(d,{x:m[0],y:m[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:w,verticalAlign:T})});if(t.add(D),h){var P=rs.makeAxisEventDataBase(e);P.targetType="axisLabel",P.value=c.rawLabel,dt(D).eventData=P}},this)},splitLine:function(t,e,r,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;c=0?"p":"n",q=P;M&&(n[h][H]||(n[h][H]={p:P,n:P}),q=n[h][H][j]);var G=void 0,J=void 0,K=void 0,se=void 0;if(v.dim==="radius"){var ae=v.dataToCoord($)-P,ce=l.dataToCoord(H);Math.abs(ae)=se})}}})}function n_e(t){var e={};W(t,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=RN(o,s),u=s.getExtent(),h=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),c=e[l]||{bandWidth:h,remainedWidth:h,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=c.stacks;e[l]=c;var d=PN(n);f[d]||c.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var v=Be(n.get("barWidth"),h),g=Be(n.get("barMaxWidth"),h),m=n.get("barGap"),y=n.get("barCategoryGap");v&&!f[d].width&&(v=Math.min(c.remainedWidth,v),f[d].width=v,c.remainedWidth-=v),g&&(f[d].maxWidth=g),m!=null&&(c.gap=m),y!=null&&(c.categoryGap=y)});var r={};return W(e,function(n,i){r[i]={};var a=n.stacks,o=n.bandWidth,s=Be(n.categoryGap,o),l=Be(n.gap,1),u=n.remainedWidth,h=n.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),W(a,function(g,m){var y=g.maxWidth;y&&y=r.y&&e[1]<=r.y+r.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=r.y&&e[0]<=r.y+r.height},t.prototype.pointToData=function(e){var r=this.getAxis();return[r.coordToData(r.toLocalCoord(e[r.orient==="horizontal"?0:1]))]},t.prototype.dataToPoint=function(e){var r=this.getAxis(),n=this.getRect(),i=[],a=r.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[a]=r.toGlobalCoord(r.dataToCoord(+e)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(e,r,n){var i=Nk(r);return i===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,r,n){var i=Nk(r);return i===this?this.pointToData(n):null},t}();function Nk(t){var e=t.seriesModel,r=t.singleAxisModel;return r&&r.coordinateSystem||e&&e.coordinateSystem}function g_e(t,e){var r=[];return t.eachComponent("singleAxis",function(n,i){var a=new v_e(n,t,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,r.push(a)}),t.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",Rr).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),r}var m_e={create:g_e,dimensions:ON};const y_e=m_e;var zk=["x","y"],__e=["width","height"],x_e=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(r,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=Yb(l,1-hy(s)),h=l.dataToPoint(n)[0],c=a.get("type");if(c&&c!=="none"){var f=a6(a),d=b_e[c](s,h,u);d.style=f,r.graphicKey=d.type,r.pointer=d}var v=v3(i);MN(n,r,v,i,a,o)},e.prototype.getHandleTransform=function(r,n,i){var a=v3(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=o6(n.axis,r,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(r,n,i,a){var o=i.axis,s=o.coordinateSystem,l=hy(o),u=Yb(s,l),h=[r.x,r.y];h[l]+=n[l],h[l]=Math.min(u[1],h[l]),h[l]=Math.max(u[0],h[l]);var c=Yb(s,1-l),f=(c[1]+c[0])/2,d=[f,f];return d[l]=h[l],{x:h[0],y:h[1],rotation:r.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(i6),b_e={line:function(t,e,r){var n=s6([e,r[0]],[e,r[1]],hy(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,r){var n=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:LN([e-n/2,r[0]],[n,i],hy(t))}}};function hy(t){return t.isHorizontal()?0:1}function Yb(t,e){var r=t.getRect();return[r[zk[e]],r[zk[e]]+r[__e[e]]]}const S_e=x_e;var w_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="single",e}(Cr);function C_e(t){At(Pp),lh.registerAxisPointerClass("SingleAxisPointer",S_e),t.registerComponentView(w_e),t.registerComponentView(f_e),t.registerComponentModel(Ub),Xc(t,"single",Ub,Ub.defaultOption),t.registerCoordinateSystem("single",y_e)}var A_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n,i){var a=uf(r);t.prototype.init.apply(this,arguments),Vk(r,a)},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),Vk(this.option,r)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Nt);function Vk(t,e){var r=t.cellSize,n;Se(r)?n=r:n=t.cellSize=[r,r],n.length===1&&(n[1]=n[0]);var i=Ce([0,1],function(a){return Ioe(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});ul(t,e,{type:"box",ignoreSize:i})}const T_e=A_e;var k_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){var a=this.group;a.removeAll();var o=r.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(r,s,a),this._renderLines(r,s,l,a),this._renderYearText(r,s,l,a),this._renderMonthText(r,u,l,a),this._renderWeekText(r,u,s,l,a)},e.prototype._renderDayRect=function(r,n,i){for(var a=r.coordinateSystem,o=r.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var h=a.dataToRect([u],!1).tl,c=new Rt({shape:{x:h[0],y:h[1],width:s,height:l},cursor:"default",style:o});i.add(c)}},e.prototype._renderLines=function(r,n,i,a){var o=this,s=r.coordinateSystem,l=r.getModel(["splitLine","lineStyle"]).getLineStyle(),u=r.get(["splitLine","show"]),h=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=n.start,f=0;c.time<=n.end.time;f++){v(c.formatedDate),f===0&&(c=s.getDateInfo(n.start.y+"-"+n.start.m));var d=c.date;d.setMonth(d.getMonth()+1),c=s.getDateInfo(d)}v(s.getNextNDay(n.end.time,1).formatedDate);function v(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var m=o._getLinePointsOfOneWeek(r,g,i);o._tlpoints.push(m[0]),o._blpoints.push(m[m.length-1]),u&&o._drawSplitline(m,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,h,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,h,i),l,a)},e.prototype._getEdgesPoints=function(r,n,i){var a=[r[0].slice(),r[r.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(r,n,i){var a=new hi({z2:20,shape:{points:r},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(r,n,i){for(var a=r.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),h=a.dataToRect([u.time],!1);s[2*u.day]=h.tl,s[2*u.day+1]=h[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(r,n){return ze(r)&&r?Moe(r,n):Je(r)?r(n):n.nameMap},e.prototype._yearTextPositionControl=function(r,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var h=0;return(a==="left"||a==="right")&&(h=Math.PI/2),{rotation:h,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(r,n,i,a){var o=r.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],h=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[h,u[f][1]],bottom:[h,u[1-f][1]],left:[u[1-f][0],c],right:[u[f][0],c]},v=n.start.y;+n.end.y>+n.start.y&&(v=v+"-"+n.end.y);var g=o.get("formatter"),m={start:n.start.y,end:n.end.y,nameMap:v},y=this._formatterLabel(g,m),b=new Vt({z2:30,style:lr(o,{text:y})});b.attr(this._yearTextPositionControl(b,d[l],i,l,s)),a.add(b)}},e.prototype._monthTextPositionControl=function(r,n,i,a,o){var s="left",l="top",u=r[0],h=r[1];return i==="horizontal"?(h=h+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:h,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(r,n,i,a){var o=r.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),h=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||ze(s))&&(s&&(n=A5(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var v=h==="center",g=0;g=i.start.time&&n.times.end.time&&r.reverse(),r},t.prototype._getRangeInfo=function(e){var r=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;r[0].time>r[1].time&&(n=!0,r.reverse());var i=Math.floor(r[1].time/Xb)-Math.floor(r[0].time/Xb)+1,a=new Date(r[0].time),o=a.getDate(),s=r[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-r[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-r[1].time)*u>0;)i-=u,a.setDate(l-u);var h=Math.floor((i+r[0].day+6)/7),c=n?-h+1:h-1;return n&&r.reverse(),{range:[r[0].formatedDate,r[1].formatedDate],start:r[0],end:r[1],allDay:i,weeks:h,nthWeek:c,fweek:r[0].day,lweek:r[1].day}},t.prototype._getDateByWeeksAndDay=function(e,r,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ri.lweek)return null;var a=(e-1)*7-i.fweek+r,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},t.create=function(e,r){var n=[];return e.eachComponent("calendar",function(i){var a=new t(i);n.push(a),i.coordinateSystem=a}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},t.dimensions=["time","value"],t}();function $k(t){var e=t.calendarModel,r=t.seriesModel,n=e?e.coordinateSystem:r?r.coordinateSystem:null;return n}const L_e=M_e;function E_e(t){t.registerComponentModel(T_e),t.registerComponentView(D_e),t.registerCoordinateSystem("calendar",L_e)}function I_e(t,e){var r=t.existing;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function Gk(t,e){var r;return W(e,function(n){t[n]!=null&&t[n]!=="auto"&&(r=!0)}),r}function B_e(t,e,r){var n=xe({},r),i=t[e],a=r.$action||"merge";a==="merge"?i?(bt(i,n,!0),ul(i,n,{ignoreSize:!0}),SP(r,i),rm(r,i),rm(r,i,"shape"),rm(r,i,"style"),rm(r,i,"extra"),r.clipPath=i.clipPath):t[e]=n:a==="replace"?t[e]=n:a==="remove"&&i&&(t[e]=null)}var NN=["transition","enterFrom","leaveTo"],P_e=NN.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function rm(t,e,r){if(r&&(!t[r]&&e[r]&&(t[r]={}),t=t[r],e=e[r]),!(!t||!e))for(var n=r?NN:P_e,i=0;i=0;h--){var c=i[h],f=Vr(c.id,null),d=f!=null?o.get(f):null;if(d){var v=d.parent,y=Vi(v),b=v===a?{width:s,height:l}:{width:y.width,height:y.height},w={},T=o2(d,c,b,null,{hv:c.hv,boundingMode:c.bounding},w);if(!Vi(d).isNew&&T){for(var M=c.transition,D={},P=0;P=0)?D[O]=V:d[O]=V}Gt(d,D,r,0)}else d.attr(w)}}},e.prototype._clear=function(){var r=this,n=this._elMap;n.each(function(i){Ym(i,Vi(i).option,n,r._lastGraphicModel)}),this._elMap=Ye()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Cr);function g3(t){var e=He(Hk,t)?Hk[t]:qS(t),r=new e({});return Vi(r).type=t,r}function qk(t,e,r,n){var i=g3(r);return e.add(i),n.set(t,i),Vi(i).id=t,Vi(i).isNew=!0,i}function Ym(t,e,r,n){var i=t&&t.parent;i&&(t.type==="group"&&t.traverse(function(a){Ym(a,e,r,n)}),w2(t,e,n),r.removeKey(Vi(t).id))}function Wk(t,e,r,n){t.isGroup||W([["cursor",ji.prototype.cursor],["zlevel",n||0],["z",r||0],["z2",0]],function(i){var a=i[0];He(e,a)?t[a]=xt(e[a],i[1]):t[a]==null&&(t[a]=i[1])}),W(Lt(e),function(i){if(i.indexOf("on")===0){var a=e[i];t[i]=Je(a)?a:null}}),He(e,"draggable")&&(t.draggable=e.draggable),e.name!=null&&(t.name=e.name),e.id!=null&&(t.id=e.id)}function N_e(t){return t=xe({},t),W(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(bP),function(e){delete t[e]}),t}function z_e(t,e,r){var n=dt(t).eventData;!t.silent&&!t.ignore&&!n&&(n=dt(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),n&&(n.info=r.info)}function V_e(t){t.registerComponentModel(F_e),t.registerComponentView(O_e),t.registerPreprocessor(function(e){var r=e.graphic;Se(r)?!r[0]||!r[0].elements?e.graphic=[{elements:r}]:e.graphic=[e.graphic[0]]:r&&!r.elements&&(e.graphic=[{elements:[r]}])})}var Uk=["x","y","radius","angle","single"],$_e=["cartesian2d","polar","singleAxis"];function G_e(t){var e=t.get("coordinateSystem");return Ct($_e,e)>=0}function js(t){return t+"Axis"}function H_e(t,e){var r=Ye(),n=[],i=Ye();t.eachComponent({mainType:"dataZoom",query:e},function(h){i.get(h.uid)||s(h)});var a;do a=!1,t.eachComponent("dataZoom",o);while(a);function o(h){!i.get(h.uid)&&l(h)&&(s(h),a=!0)}function s(h){i.set(h.uid,!0),n.push(h),u(h)}function l(h){var c=!1;return h.eachTargetAxis(function(f,d){var v=r.get(f);v&&v[d]&&(c=!0)}),c}function u(h){h.eachTargetAxis(function(c,f){(r.get(c)||r.set(c,[]))[f]=!0})}return n}function zN(t){var e=t.ecModel,r={infoList:[],infoMap:Ye()};return t.eachTargetAxis(function(n,i){var a=e.getComponent(js(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=r.infoMap.get(s);l||(l={model:o,axisModels:[]},r.infoList.push(l),r.infoMap.set(s,l)),l.axisModels.push(a)}}}),r}var Zb=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},t}(),q_e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._autoThrottle=!0,r._noTarget=!0,r._rangePropMode=["percent","percent"],r}return e.prototype.init=function(r,n,i){var a=Yk(r);this.settledOption=a,this.mergeDefaultAndTheme(r,i),this._doInit(a)},e.prototype.mergeOption=function(r){var n=Yk(r);bt(this.option,r,!0),bt(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(r){var n=this.option;this._setDefaultThrottle(r),this._updateRangeUse(r);var i=this.settledOption;W([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var r=this.get("orient",!0),n=this._targetAxisInfoMap=Ye(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=r||this._makeAutoOrientByTargetAxis():(this._orient=r||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(r){var n=!1;return W(Uk,function(i){var a=this.getReferringComponents(js(i),uie);if(a.specified){n=!0;var o=new Zb;W(a.models,function(s){o.add(s.componentIndex)}),r.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(r,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(h){return h.get("orient",!0)===n}});l(s,"single")}function l(u,h){var c=u[0];if(c){var f=new Zb;if(f.add(c.componentIndex),r.set(h,f),a=!1,h==="x"||h==="y"){var d=c.getReferringComponents("grid",Rr).models[0];d&&W(u,function(v){c.componentIndex!==v.componentIndex&&d===v.getReferringComponents("grid",Rr).models[0]&&f.add(v.componentIndex)})}}}a&&W(Uk,function(u){if(a){var h=i.findComponents({mainType:js(u),filter:function(f){return f.get("type",!0)==="category"}});if(h[0]){var c=new Zb;c.add(h[0].componentIndex),r.set(u,c),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var r;return this.eachTargetAxis(function(n){!r&&(r=n)},this),r==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(r){if(r.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(r){var n=this._rangePropMode,i=this.get("rangeMode");W([["start","startValue"],["end","endValue"]],function(a,o){var s=r[a[0]]!=null,l=r[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var r;return this.eachTargetAxis(function(n,i){r==null&&(r=this.ecModel.getComponent(js(n),i))},this),r},e.prototype.eachTargetAxis=function(r,n){this._targetAxisInfoMap.each(function(i,a){W(i.indexList,function(o){r.call(n,a,o)})})},e.prototype.getAxisProxy=function(r,n){var i=this.getAxisModel(r,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(r,n){var i=this._targetAxisInfoMap.get(r);if(i&&i.indexMap[n])return this.ecModel.getComponent(js(r),n)},e.prototype.setRawRange=function(r){var n=this.option,i=this.settledOption;W([["start","startValue"],["end","endValue"]],function(a){(r[a[0]]!=null||r[a[1]]!=null)&&(n[a[0]]=i[a[0]]=r[a[0]],n[a[1]]=i[a[1]]=r[a[1]])},this),this._updateRangeUse(r)},e.prototype.setCalculatedRange=function(r){var n=this.option;W(["start","startValue","end","endValue"],function(i){n[i]=r[i]})},e.prototype.getPercentRange=function(){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataPercentWindow()},e.prototype.getValueRange=function(r,n){if(r==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(r,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(r){if(r)return r.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(w&&!T&&!M)return!0;w&&(m=!0),T&&(v=!0),M&&(g=!0)}return m&&v&&g})}else bc(h,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var v={};v[d]=o,u.selectRange(v)}});bc(h,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},t.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},r=this._dataZoomModel,n=this._dataExtent;bc(["min","max"],function(i){var a=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=jt(n[0]+o,n,[0,100],!0):a!=null&&(o=jt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var e=this.getAxisModel(),r=this._percentWindow,n=this._valueWindow;if(r){var i=ZI(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;r[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),r[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},t}();function K_e(t,e,r){var n=[1/0,-1/0];bc(r,function(o){bhe(n,o.getData(),e)});var i=t.getAxisModel(),a=rF(i.axis.scale,i,n).calculate();return[a.min,a.max]}const J_e=j_e;var Q_e={getTargetSeries:function(t){function e(i){t.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=t.getComponent(js(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var r=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new J_e(i,a,s,t),r.push(o.__dzAxisProxy))});var n=Ye();return W(r,function(i){W(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(t,e){t.eachComponent("dataZoom",function(r){r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).reset(r)}),r.eachTargetAxis(function(n,i){r.getAxisProxy(n,i).filterData(r,e)})}),t.eachComponent("dataZoom",function(r){var n=r.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();r.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};const exe=Q_e;function txe(t){t.registerAction("dataZoom",function(e,r){var n=H_e(r,e);W(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Zk=!1;function f6(t){Zk||(Zk=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,exe),txe(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function rxe(t){t.registerComponentModel(U_e),t.registerComponentView(Z_e),f6(t)}var Gi=function(){function t(){}return t}(),VN={};function Sc(t,e){VN[t]=e}function $N(t){return VN[t]}var nxe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var r=this.ecModel;W(this.option.feature,function(n,i){var a=$N(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(r)),bt(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Nt);const ixe=nxe;function axe(t,e,r){var n=e.getBoxLayoutParams(),i=e.get("padding"),a={width:r.getWidth(),height:r.getHeight()},o=$r(n,a,i);$u(e.get("orient"),t,e.get("itemGap"),o.width,o.height),o2(t,n,a,i)}function GN(t,e){var r=lf(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new Rt({shape:{x:t.x-r[3],y:t.y-r[0],width:t.width+r[1]+r[3],height:t.height+r[0]+r[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),t}var oxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){var o=this.group;if(o.removeAll(),!r.get("show"))return;var s=+r.get("itemSize"),l=r.get("orient")==="vertical",u=r.get("feature")||{},h=this._features||(this._features={}),c=[];W(u,function(v,g){c.push(g)}),new ts(this._featureNames||[],c).add(f).update(f).remove(pt(f,null)).execute(),this._featureNames=c;function f(v,g){var m=c[v],y=c[g],b=u[m],w=new ur(b,r,r.ecModel),T;if(a&&a.newTitle!=null&&a.featureName===m&&(b.title=a.newTitle),m&&!y){if(sxe(m))T={onclick:w.option.onclick,featureName:m};else{var M=$N(m);if(!M)return;T=new M}h[m]=T}else if(T=h[y],!T)return;T.uid=sf("toolbox-feature"),T.model=w,T.ecModel=n,T.api=i;var D=T instanceof Gi;if(!m&&y){D&&T.dispose&&T.dispose(n,i);return}if(!w.get("show")||D&&T.unusable){D&&T.remove&&T.remove(n,i);return}d(w,T,m),w.setIconStatus=function(P,O){var V=this.option,$=this.iconPaths;V.iconStatus=V.iconStatus||{},V.iconStatus[P]=O,$[P]&&(O==="emphasis"?Qo:es)($[P])},T instanceof Gi&&T.render&&T.render(w,n,i,a)}function d(v,g,m){var y=v.getModel("iconStyle"),b=v.getModel(["emphasis","iconStyle"]),w=g instanceof Gi&&g.getIcons?g.getIcons():v.get("icon"),T=v.get("title")||{},M,D;ze(w)?(M={},M[m]=w):M=w,ze(T)?(D={},D[m]=T):D=T;var P=v.iconPaths={};W(M,function(O,V){var $=xp(O,{},{x:-s/2,y:-s/2,width:s,height:s});$.setStyle(y.getItemStyle());var H=$.ensureState("emphasis");H.style=b.getItemStyle();var j=new Vt({style:{text:D[V],align:b.get("textAlign"),borderRadius:b.get("textBorderRadius"),padding:b.get("textPadding"),fill:null},ignore:!0});$.setTextContent(j),af({el:$,componentModel:r,itemName:V,formatterParamsExtra:{title:D[V]}}),$.__title=D[V],$.on("mouseover",function(){var q=b.getItemStyle(),G=l?r.get("right")==null&&r.get("left")!=="right"?"right":"left":r.get("bottom")==null&&r.get("top")!=="bottom"?"bottom":"top";j.setStyle({fill:b.get("textFill")||q.fill||q.stroke||"#000",backgroundColor:b.get("textBackgroundColor")}),$.setTextConfig({position:b.get("textPosition")||G}),j.ignore=!r.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){v.get(["iconStatus",V])!=="emphasis"&&i.leaveEmphasis(this),j.hide()}),(v.get(["iconStatus",V])==="emphasis"?Qo:es)($),o.add($),$.on("click",Ge(g.onclick,g,n,i,V)),P[V]=$})}axe(o,r,i),o.add(GN(o.getBoundingRect(),r)),l||o.eachChild(function(v){var g=v.__title,m=v.ensureState("emphasis"),y=m.textConfig||(m.textConfig={}),b=v.getTextContent(),w=b&&b.ensureState("emphasis");if(w&&!Je(w)&&g){var T=w.style||(w.style={}),M=vp(g,Vt.makeFont(T)),D=v.x+o.x,P=v.y+o.y+s,O=!1;P+M.height>i.getHeight()&&(y.position="top",O=!0);var V=O?-5-M.height:s+10;D+M.width/2>i.getWidth()?(y.position=["100%",V],T.align="right"):D-M.width/2<0&&(y.position=[0,V],T.align="left")}})},e.prototype.updateView=function(r,n,i,a){W(this._features,function(o){o instanceof Gi&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(r,n){W(this._features,function(i){i instanceof Gi&&i.remove&&i.remove(r,n)}),this.group.removeAll()},e.prototype.dispose=function(r,n){W(this._features,function(i){i instanceof Gi&&i.dispose&&i.dispose(r,n)})},e.type="toolbox",e}(Cr);function sxe(t){return t.indexOf("my")===0}const lxe=oxe;var uxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){var i=this.model,a=i.get("name")||r.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||r.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=zt.browser;if(Je(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var h=document.createElement("a");h.download=a+"."+s,h.target="_blank",h.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,v=o?decodeURIComponent(f[1]):f[1];d&&(v=window.atob(v));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var m=v.length,y=new Uint8Array(m);m--;)y[m]=v.charCodeAt(m);var b=new Blob([y]);window.navigator.msSaveOrOpenBlob(b,g)}else{var w=document.createElement("iframe");document.body.appendChild(w);var T=w.contentWindow,M=T.document;M.open("image/svg+xml","replace"),M.write(v),M.close(),T.focus(),M.execCommand("SaveAs",!0,g),document.body.removeChild(w)}}else{var D=i.get("lang"),P='',O=window.open();O.document.write(P),O.document.title=a}},e.getDefaultOption=function(r){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:r.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:r.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Gi);const hxe=uxe;var jk="__ec_magicType_stack__",cxe=[["line","bar"],["stack"]],fxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getIcons=function(){var r=this.model,n=r.get("icon"),i={};return W(r.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(r){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:r.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(r,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(Kk[i]){var s={series:[]},l=function(c){var f=c.subType,d=c.id,v=Kk[i](f,d,c,a);v&&(rt(v,c.option),s.series.push(v));var g=c.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var m=g.getAxesByScale("ordinal")[0];if(m){var y=m.dim,b=y+"Axis",w=c.getReferringComponents(b,Rr).models[0],T=w.componentIndex;s[b]=s[b]||[];for(var M=0;M<=T;M++)s[b][T]=s[b][T]||{};s[b][T].boundaryGap=i==="bar"}}};W(cxe,function(c){Ct(c,i)>=0&&W(c,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),r.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,h=i;i==="stack"&&(u=bt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(h="tiled")),n.dispatchAction({type:"changeMagicType",currentType:h,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Gi),Kk={line:function(t,e,r,n){if(t==="bar")return bt({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(t,e,r,n){if(t==="line")return bt({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(t,e,r,n){var i=r.get("stack")===jk;if(t==="line"||t==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),bt({id:e,stack:i?"":jk},n.get(["option","stack"])||{},!0)}};mo({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});const dxe=fxe;var C2=new Array(60).join("-"),Kc=" ";function pxe(t){var e={},r=[],n=[];return t.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:n}}function vxe(t){var e=[];return W(t,function(r,n){var i=r.categoryAxis,a=r.valueAxis,o=a.dim,s=[" "].concat(Ce(r.series,function(d){return d.name})),l=[i.model.getCategories()];W(r.series,function(d){var v=d.getRawData();l.push(d.getRawData().mapArray(v.mapDimension(o),function(g){return g}))});for(var u=[s.join(Kc)],h=0;h=0)return!0}var g3=new RegExp("["+jc+"]+","g");function mxe(t){for(var e=t.split(/\n+/g),r=cy(e.shift()).split(g3),n=[],i=Ce(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Cxe(t){var e=d6(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return HN(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function Axe(t){qN(t).snapshots=null}function Txe(t){return d6(t).length}function d6(t){var e=qN(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var kxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){Axe(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Gi);mo({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});const Dxe=kxe;var Mxe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Lxe=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=Jk(r,e);W(Exe,function(o,s){(!n||!n.include||Ct(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Zb[n.brushType](0,a,i);n.__rangeOffset={offset:rD[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){W(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&W(a.coordSyses,function(o){var s=Zb[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){W(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Zb[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?rD[n.brushType](a.values,o.offset,Ixe(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return Ce(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:KO(i),isTargetByCursor:QO(i,e,n.coordSysModel),getLinearBrushOtherExtent:JO(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ct(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=Jk(r,e),a=0;at[1]&&t.reverse(),t}function Jk(t,e){return od(t,e,{includeMainTypes:Mxe})}var Exe={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=Ye(),o={},s={};!r&&!n&&!i||(W(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),W(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),W(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,h=[];W(u.getCartesians(),function(c,f){(Ct(r,c.getAxis("x").model)>=0||Ct(n,c.getAxis("y").model)>=0)&&h.push(c)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:eD.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){W(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:eD.geo})})}},Qk=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],eD={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(zu(t)),e}},Zb={lineX:pt(tD,0),lineY:pt(tD,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[m3([i[0],a[0]]),m3([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=Ce(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function tD(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=m3(Ce([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var rD={lineX:pt(nD,0),lineY:pt(nD,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return Ce(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function nD(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function Ixe(t,e){var r=iD(t),n=iD(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function iD(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const p6=Lxe;var y3=W,Bxe=rie("toolbox-dataZoom_"),Pxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new Xw(i.getZr()),this._brushController.on("brush",Ge(this._onBrush,this)).mount()),Oxe(r,n,this,a,i),Fxe(r,n)},e.prototype.onclick=function(r,n,i){Rxe[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new p6(v6(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,h,c){if(c.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",c,h[0]),s("y",c,h[1])):s({lineX:"x",lineY:"y"}[f],c,h)}}),wxe(a,i),this._dispatchZoomAction(i);function s(u,h,c){var f=h.getAxis(u),d=f.model,v=l(u,d,a),g=v.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(c=sh(0,c.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),v&&(i[v.id]={dataZoomId:v.id,startValue:c[0],endValue:c[1]})}function l(u,h,c){var f;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var v=d.getAxisModel(u,h.componentIndex);v&&(f=d)}),f}},e.prototype._dispatchZoomAction=function(r){var n=[];y3(r,function(i,a){n.push(ot(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(Gi),Rxe={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Cxe(this.ecModel))}};function v6(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Fxe(t,e){t.setIconStatus("back",Txe(e)>1?"emphasis":"normal")}function Oxe(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new p6(v6(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}Foe("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=v6(n),o=od(t,a);y3(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),y3(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var c=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Bxe+u+c};f[h]=c,i.push(f)}return i});const Nxe=Pxe;function zxe(t){t.registerComponentModel(rxe),t.registerComponentView(oxe),xc("saveAsImage",lxe),xc("magicType",cxe),xc("dataView",Sxe),xc("dataZoom",Nxe),xc("restore",Dxe),At(exe)}var Vxe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Nt);const $xe=Vxe;function WN(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function UN(t){if(zt.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var h=u*Math.PI/180,c=o+i,f=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'
'}function Xxe(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=zt.transformSupported?","+g6+n:",left"+n+",top"+n),qxe+":"+i}function aD(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!zt.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=zt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+g6+":"+o+";":[["top",0],["left",0],[YN,o]]}function Zxe(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),W(["decoration","align"],function(l){var u=t.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function jxe(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),l=t.get("shadowOffsetX"),u=t.get("shadowOffsetY"),h=t.getModel("textStyle"),c=tR(t,"html"),f=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+f),e&&i&&n.push(Xxe(i,r)),a&&n.push("background-color:"+a),W(["width","color","radius"],function(d){var v="border-"+d,g=_P(v),m=t.get(g);m!=null&&n.push(v+":"+m+(d==="color"?"":"px"))}),n.push(Zxe(h)),c!=null&&n.push("padding:"+sf(c).join("px ")+"px"),n.join(";")+";"}function oD(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&kre(t,o,document.body,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Kxe=function(){function t(e,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,zt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;oD(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):e.appendChild(i),this._container=e;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,h=a.painter.getViewportRoot();Fi(h,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){var r=this._container,n=Hxe(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Wxe+jxe(e,!this._firstShow,this._longHide)+aD(a[0],a[1],!0)+("border-color:"+Ku(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(ze(a)&&n.get("trigger")==="item"&&!WN(n)&&(s=Yxe(n,i,a)),ze(e))o.innerHTML=e+s;else if(e){o.innerHTML="",Se(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||zt.node||!i.getDom())){var o=uD(a,i);this._ticket="";var s=a.dataByCoordSys,l=obe(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=tbe;h.x=a.x,h.y=a.y,h.update(),dt(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=IN(a,n),f=c.point[0],d=c.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(uD(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var h=u.getData(),c=D0([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;Du(i,function(u){if(dt(u).dataIndex!=null)return s=u,!0;if(dt(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=Ge(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=D0([n.tooltipOption],a),l=this._renderMode,u=[],h=Xr("section",{blocks:[],noHeader:!0}),c=[],f=new Px;W(r,function(b){W(b.dataByAxis,function(w){var T=i.getComponent(w.axisDim+"Axis",w.axisIndex),M=w.value;if(!(!T||M==null)){var D=DN(M,T.axis,i,w.seriesDataIndices,w.valueLabelOpt),P=Xr("section",{header:D,noHeader:!da(D),sortBlocks:!0,blocks:[]});h.blocks.push(P),W(w.seriesDataIndices,function(O){var V=i.getSeriesByIndex(O.seriesIndex),$=O.dataIndexInside,H=V.getDataParams($);if(!(H.dataIndex<0)){H.axisDim=w.axisDim,H.axisIndex=w.axisIndex,H.axisType=w.axisType,H.axisId=w.axisId,H.axisValue=yw(T.axis,{value:M}),H.axisValueLabel=D,H.marker=f.makeTooltipMarker("item",Ku(H.color),l);var j=X8(V.formatTooltip($,!0,null)),q=j.frag;if(q){var G=D0([V],a).get("valueFormatter");P.blocks.push(G?xe({valueFormatter:G},q):q)}j.text&&c.push(j.text),u.push(H)}})}})}),h.blocks.reverse(),c.reverse();var d=n.position,v=s.get("order"),g=eA(h,f,l,v,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var m=l==="richText"?` +`),meta:e.meta}}function cy(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function yxe(t){var e=t.slice(0,t.indexOf(` +`));if(e.indexOf(Kc)>=0)return!0}var m3=new RegExp("["+Kc+"]+","g");function _xe(t){for(var e=t.split(/\n+/g),r=cy(e.shift()).split(m3),n=[],i=Ce(r,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=r[a];if(o[i])break}if(a<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function Txe(t){var e=d6(t),r=e[e.length-1];e.length>1&&e.pop();var n={};return HN(r,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function kxe(t){qN(t).snapshots=null}function Dxe(t){return d6(t).length}function d6(t){var e=qN(t);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Mxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onclick=function(r,n){kxe(r),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(r){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:r.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Gi);mo({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});const Lxe=Mxe;var Exe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Ixe=function(){function t(e,r,n){var i=this;this._targetInfoList=[];var a=Jk(r,e);W(Bxe,function(o,s){(!n||!n.include||Ct(n.include,s)>=0)&&o(a,i._targetInfoList)})}return t.prototype.setOutputRanges=function(e,r){return this.matchOutputRanges(e,r,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=jb[n.brushType](0,a,i);n.__rangeOffset={offset:rD[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},t.prototype.matchOutputRanges=function(e,r,n){W(e,function(i){var a=this.findTargetInfo(i,r);a&&a!==!0&&W(a.coordSyses,function(o){var s=jb[i.brushType](1,o,i.range,!0);n(i,s.values,o,r)})},this)},t.prototype.setInputRanges=function(e,r){W(e,function(n){var i=this.findTargetInfo(n,r);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=jb[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?rD[n.brushType](a.values,o.offset,Pxe(a.xyMinMax,o.xyMinMax)):a.values}},this)},t.prototype.makePanelOpts=function(e,r){return Ce(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:r?r(n):null,clipPath:KO(i),isTargetByCursor:QO(i,e,n.coordSysModel),getLinearBrushOtherExtent:JO(i)}})},t.prototype.controlSeries=function(e,r,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Ct(i.coordSyses,r.coordinateSystem)>=0},t.prototype.findTargetInfo=function(e,r){for(var n=this._targetInfoList,i=Jk(r,e),a=0;at[1]&&t.reverse(),t}function Jk(t,e){return sd(t,e,{includeMainTypes:Exe})}var Bxe={grid:function(t,e){var r=t.xAxisModels,n=t.yAxisModels,i=t.gridModels,a=Ye(),o={},s={};!r&&!n&&!i||(W(r,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),W(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),W(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,h=[];W(u.getCartesians(),function(c,f){(Ct(r,c.getAxis("x").model)>=0||Ct(n,c.getAxis("y").model)>=0)&&h.push(c)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:eD.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){W(t.geoModels,function(r){var n=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:n,coordSyses:[n],getPanelRect:eD.geo})})}},Qk=[function(t,e){var r=t.xAxisModel,n=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],eD={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Vu(t)),e}},jb={lineX:pt(tD,0),lineY:pt(tD,1),rect:function(t,e,r,n){var i=t?e.pointToData([r[0][0],r[1][0]],n):e.dataToPoint([r[0][0],r[1][0]],n),a=t?e.pointToData([r[0][1],r[1][1]],n):e.dataToPoint([r[0][1],r[1][1]],n),o=[y3([i[0],a[0]]),y3([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,r,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=Ce(r,function(o){var s=t?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function tD(t,e,r,n){var i=r.getAxis(["x","y"][t]),a=y3(Ce([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[t]=a,o[1-t]=[NaN,NaN],{values:a,xyMinMax:o}}var rD={lineX:pt(nD,0),lineY:pt(nD,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return Ce(t,function(n,i){return[n[0]-r[0]*e[i][0],n[1]-r[1]*e[i][1]]})}};function nD(t,e,r,n){return[e[0]-n[t]*r[0],e[1]-n[t]*r[1]]}function Pxe(t,e){var r=iD(t),n=iD(e),i=[r[0]/n[0],r[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function iD(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}const p6=Ixe;var _3=W,Rxe=iie("toolbox-dataZoom_"),Fxe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i,a){this._brushController||(this._brushController=new Xw(i.getZr()),this._brushController.on("brush",Ge(this._onBrush,this)).mount()),zxe(r,n,this,a,i),Nxe(r,n)},e.prototype.onclick=function(r,n,i){Oxe[i].call(this)},e.prototype.remove=function(r,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(r,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(r){var n=r.areas;if(!r.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new p6(v6(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,h,c){if(c.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",c,h[0]),s("y",c,h[1])):s({lineX:"x",lineY:"y"}[f],c,h)}}),Axe(a,i),this._dispatchZoomAction(i);function s(u,h,c){var f=h.getAxis(u),d=f.model,v=l(u,d,a),g=v.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(c=uh(0,c.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),v&&(i[v.id]={dataZoomId:v.id,startValue:c[0],endValue:c[1]})}function l(u,h,c){var f;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var v=d.getAxisModel(u,h.componentIndex);v&&(f=d)}),f}},e.prototype._dispatchZoomAction=function(r){var n=[];_3(r,function(i,a){n.push(ot(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(r){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:r.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(Gi),Oxe={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Txe(this.ecModel))}};function v6(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function Nxe(t,e){t.setIconStatus("back",Dxe(e)>1?"emphasis":"normal")}function zxe(t,e,r,n,i){var a=r._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),r._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var o=new p6(v6(t),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});r._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}Noe("dataZoom",function(t){var e=t.getComponent("toolbox",0),r=["feature","dataZoom"];if(!e||e.get(r)==null)return;var n=e.getModel(r),i=[],a=v6(n),o=sd(t,a);_3(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),_3(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,h){var c=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:Rxe+u+c};f[h]=c,i.push(f)}return i});const Vxe=Fxe;function $xe(t){t.registerComponentModel(ixe),t.registerComponentView(lxe),Sc("saveAsImage",hxe),Sc("magicType",dxe),Sc("dataView",Cxe),Sc("dataZoom",Vxe),Sc("restore",Lxe),At(rxe)}var Gxe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Nt);const Hxe=Gxe;function WN(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function UN(t){if(zt.domSupported){for(var e=document.documentElement.style,r=0,n=t.length;r-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var h=u*Math.PI/180,c=o+i,f=c*Math.abs(Math.cos(h))+c*Math.abs(Math.sin(h)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-c)/2)*100)/100;s+=";"+a+":-"+d+"px";var v=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+v,"border-right:"+v,"background-color:"+n+";"];return'
'}function jxe(t,e){var r="cubic-bezier(0.23,1,0.32,1)",n=" "+t/2+"s "+r,i="opacity"+n+",visibility"+n;return e||(n=" "+t+"s "+r,i+=zt.transformSupported?","+g6+n:",left"+n+",top"+n),Uxe+":"+i}function aD(t,e,r){var n=t.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!zt.transformSupported)return r?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=zt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return r?"top:0;left:0;"+g6+":"+o+";":[["top",0],["left",0],[YN,o]]}function Kxe(t){var e=[],r=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px");var i=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,o=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),W(["decoration","align"],function(l){var u=t.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function Jxe(t,e,r){var n=[],i=t.get("transitionDuration"),a=t.get("backgroundColor"),o=t.get("shadowBlur"),s=t.get("shadowColor"),l=t.get("shadowOffsetX"),u=t.get("shadowOffsetY"),h=t.getModel("textStyle"),c=tR(t,"html"),f=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+f),e&&i&&n.push(jxe(i,r)),a&&n.push("background-color:"+a),W(["width","color","radius"],function(d){var v="border-"+d,g=_P(v),m=t.get(g);m!=null&&n.push(v+":"+m+(d==="color"?"":"px"))}),n.push(Kxe(h)),c!=null&&n.push("padding:"+lf(c).join("px ")+"px"),n.join(";")+";"}function oD(t,e,r,n,i){var a=e&&e.painter;if(r){var o=a&&a.getViewportRoot();o&&Mre(t,o,document.body,n,i)}else{t[0]=n,t[1]=i;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Qxe=function(){function t(e,r,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,zt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=r.getZr(),o=this._appendToBody=n&&n.appendToBody;oD(this._styleCoord,a,o,r.getWidth()/2,r.getHeight()/2),o?document.body.appendChild(i):e.appendChild(i),this._container=e;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,h=a.painter.getViewportRoot();Fi(h,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(e){var r=this._container,n=Wxe(r,"position"),i=r.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative");var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},t.prototype.show=function(e,r){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=Yxe+Jxe(e,!this._firstShow,this._longHide)+aD(a[0],a[1],!0)+("border-color:"+Qu(r)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,r,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(ze(a)&&n.get("trigger")==="item"&&!WN(n)&&(s=Zxe(n,i,a)),ze(e))o.innerHTML=e+s;else if(e){o.innerHTML="",Se(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var r=this._tooltipModel,n=this._ecModel,i=this._api,a=r.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(r,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(r,n,i,a){if(!(a.from===this.uid||zt.node||!i.getDom())){var o=uD(a,i);this._ticket="";var s=a.dataByCoordSys,l=lbe(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var h=nbe;h.x=a.x,h.y=a.y,h.update(),dt(h).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:h},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(r,n,i,a))return;var c=IN(a,n),f=c.point[0],d=c.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:c.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(r,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(uD(a,i))},e.prototype._manuallyAxisShowTip=function(r,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var h=u.getData(),c=D0([h.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(r,n){var i=r.target,a=this._tooltipModel;if(a){this._lastX=r.offsetX,this._lastY=r.offsetY;var o=r.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,r);else if(i){this._lastDataByCoordSys=null;var s,l;Mu(i,function(u){if(dt(u).dataIndex!=null)return s=u,!0;if(dt(u).tooltipConfig!=null)return l=u,!0},!0),s?this._showSeriesItemTooltip(r,s,n):l?this._showComponentItemTooltip(r,l,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(r,n){var i=r.get("showDelay");n=Ge(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(r,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=D0([n.tooltipOption],a),l=this._renderMode,u=[],h=Zr("section",{blocks:[],noHeader:!0}),c=[],f=new Rx;W(r,function(b){W(b.dataByAxis,function(w){var T=i.getComponent(w.axisDim+"Axis",w.axisIndex),M=w.value;if(!(!T||M==null)){var D=DN(M,T.axis,i,w.seriesDataIndices,w.valueLabelOpt),P=Zr("section",{header:D,noHeader:!da(D),sortBlocks:!0,blocks:[]});h.blocks.push(P),W(w.seriesDataIndices,function(O){var V=i.getSeriesByIndex(O.seriesIndex),$=O.dataIndexInside,H=V.getDataParams($);if(!(H.dataIndex<0)){H.axisDim=w.axisDim,H.axisIndex=w.axisIndex,H.axisType=w.axisType,H.axisId=w.axisId,H.axisValue=yw(T.axis,{value:M}),H.axisValueLabel=D,H.marker=f.makeTooltipMarker("item",Qu(H.color),l);var j=X8(V.formatTooltip($,!0,null)),q=j.frag;if(q){var G=D0([V],a).get("valueFormatter");P.blocks.push(G?xe({valueFormatter:G},q):q)}j.text&&c.push(j.text),u.push(H)}})}})}),h.blocks.reverse(),c.reverse();var d=n.position,v=s.get("order"),g=eA(h,f,l,v,i.get("useUTC"),s.get("textStyle"));g&&c.unshift(g);var m=l==="richText"?` -`:"
",y=c.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,f)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=dt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,c=o.dataType,f=u.getData(c),d=this._renderMode,v=r.positionDefault,g=D0([f.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(h,c),b=new Px;y.marker=b.makeTooltipMarker("item",Ku(y.color),d);var w=X8(u.formatTooltip(h,!1,c)),T=g.get("order"),M=g.get("valueFormatter"),D=w.frag,P=D?eA(M?xe({valueFormatter:M},D):D,b,d,T,a.get("useUTC"),g.get("textStyle")):w.text,O="item_"+u.name+"_"+h;this._showOrMove(g,function(){this._showTooltipContent(g,P,y,O,r.offsetX,r.offsetY,r.position,r.target,b)}),i({type:"showTip",dataIndexInside:h,dataIndex:f.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=dt(n),o=a.tooltipConfig,s=o.option||{};if(ze(s)){var l=s;s={content:l,formatter:l}}var u=[s],h=this._ecModel.getComponent(a.componentMainType,a.componentIndex);h&&u.push(h),u.push({formatter:s.content});var c=r.positionDefault,f=D0(u,this._tooltipModel,c?{position:c}:null),d=f.get("content"),v=Math.random()+"",g=new Px;this._showOrMove(f,function(){var m=ot(f.get("formatterParams")||{});this._showTooltipContent(f,d,m,v,r.offsetX,r.offsetY,r.position,n,g)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,h){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=v.color;if(f)if(ze(f)){var m=r.ecModel.get("useUTC"),y=Se(i)?i[0]:i,b=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=f,b&&(d=e2(y.axisValue,d,m)),d=xP(d,i,!0)}else if(Je(f)){var w=Ge(function(T,M){T===this._ticket&&(c.setContent(M,h,r,g,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,d=f(i,a,w)}else d=f;c.setContent(d,h,r,g,l),c.show(r,g),this._updatePosition(r,l,o,s,c,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||Se(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!Se(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Je(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,h],contentSize:c.slice()})),Se(n))i=Be(n[0],u),a=Be(n[1],h);else if(nt(n)){var g=n;g.width=c[0],g.height=c[1];var m=Vr(g,{width:u,height:h});i=m.x,a=m.y,f=null,d=null}else if(ze(n)&&l){var y=abe(n,v,c,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=nbe(i,a,o,u,h,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=hD(f)?c[0]/2:f==="right"?c[0]:0),d&&(a-=hD(d)?c[1]/2:d==="bottom"?c[1]:0),WN(r)){var y=ibe(i,a,o,u,h);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&W(i,function(s,l){var u=s.dataByAxis||[],h=r[l]||{},c=h.dataByAxis||[];o=o&&u.length===c.length,o&&W(u,function(f,d){var v=c[d]||{},g=f.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&f.value===v.value&&f.axisType===v.axisType&&f.axisId===v.axisId&&g.length===m.length,o&&W(g,function(y,b){var w=m[b];o=o&&y.seriesIndex===w.seriesIndex&&y.dataIndex===w.dataIndex}),a&&W(f.seriesDataIndices,function(y){var b=y.seriesIndex,w=n[b],T=a[b];w&&T&&T.data!==w.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){zt.node||!n.getDom()||(Ud(this,"_updatePosition"),this._tooltipContent.dispose(),d3("itemTooltip",n))},e.type="tooltip",e}(wr);function D0(t,e,r){var n=e.ecModel,i;r?(i=new ur(r,n,n),i=new ur(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof ur&&(o=o.get("tooltip",!0)),ze(o)&&(o={formatter:o}),o&&(i=new ur(o,i,n)))}return i}function uD(t,e){return t.dispatchAction||Ge(e.dispatchAction,e)}function nbe(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function ibe(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function abe(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o,l=e.y+h/2-a/2;break;case"right":s=e.x+u+o,l=e.y+h/2-a/2}return[s,l]}function hD(t){return t==="center"||t==="middle"}function obe(t,e,r){var n=ES(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=vp(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=dt(u).tooltipConfig;if(h&&h.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const sbe=rbe;function lbe(t){At(Bp),t.registerComponentModel($xe),t.registerComponentView(sbe),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ir),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ir)}var ube=["rect","polygon","keep","clear"];function hbe(t,e){var r=er(t?t.brush:[]);if(r.length){var n=[];W(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;Se(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),cbe(s),e&&!s.length&&s.push.apply(s,ube)}}function cbe(t){var e={};W(t,function(r){e[r]=1}),t.length=0,W(e,function(r,n){t.push(n)})}var cD=W;function fD(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function _3(t,e,r){var n={};return cD(e,function(a){var o=n[a]=i();cD(t[a],function(s,l){if(hn.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new hn(u),l==="opacity"&&(u=ot(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new hn(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function ZN(t,e,r){var n;W(r,function(i){e.hasOwnProperty(i)&&fD(e[i])&&(n=!0)}),n&&W(r,function(i){e.hasOwnProperty(i)&&fD(e[i])?t[i]=ot(e[i]):delete t[i]})}function fbe(t,e,r,n,i,a){var o={};W(t,function(c){var f=hn.prepareVisualTypes(e[c]);o[c]=f});var s;function l(c){return sw(r,s,c)}function u(c,f){cR(r,s,c,f)}a==null?r.each(h):r.each([a],h);function h(c,f){s=a==null?c:f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var v=n.call(i,c),g=e[v],m=o[v],y=0,b=m.length;ye[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&mD(e)}};function mD(t){return new St(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var xbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new Xw(n.getZr())).on("brush",Ge(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){jN(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ot(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ot(i),$from:n})},e.type="brush",e}(wr);const bbe=xbe;var Sbe="#ddd",wbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&ZN(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:Sbe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=Ce(r,function(n){return yD(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=yD(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Nt);function yD(t,e){return bt({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ur(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const Cbe=wbe;var Abe=["rect","polygon","lineX","lineY","keep","clear"],Tbe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,W(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return W(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:Abe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Gi);const kbe=Tbe;function Dbe(t){t.registerComponentView(bbe),t.registerComponentModel(Cbe),t.registerPreprocessor(hbe),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,vbe),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ir),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ir),xc("brush",kbe)}var Mbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Nt),Lbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=xt(r.get("textBaseline"),r.get("textVerticalAlign")),h=new Vt({style:lr(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=h.getBoundingRect(),f=r.get("subtext"),d=new Vt({style:lr(s,{text:f,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);h.silent=!v&&!m,d.silent=!g&&!m,v&&h.on("click",function(){V1(v,"_"+r.get("target"))}),g&&d.on("click",function(){V1(g,"_"+r.get("subtarget"))}),dt(h).eventData=dt(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(h),f&&a.add(d);var y=a.getBoundingRect(),b=r.getBoxLayoutParams();b.width=y.width,b.height=y.height;var w=Vr(b,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?w.x+=w.width:l==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),a.x=w.x,a.y=w.y,a.markRedraw();var T={align:l,verticalAlign:u};h.setStyle(T),d.setStyle(T),y=a.getBoundingRect();var M=w.margin,D=r.getItemStyle(["color","opacity"]);D.fill=r.get("backgroundColor");var P=new Rt({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:D,subPixelOptimize:!0,silent:!0});a.add(P)}},e.type="title",e}(wr);function Ebe(t){t.registerComponentModel(Mbe),t.registerComponentView(Lbe)}var Ibe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],W(n,function(u,h){var c=zr(ef(u),""),f;nt(u)?(f=ot(u),f.value=h):f=h,o.push(f),a.push(c)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Hn([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Nt);const _D=Ibe;var KN=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=gl(_D.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(_D);Or(KN,nw.prototype);const Bbe=KN;var Pbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(wr);const Rbe=Pbe;var Fbe=function(t){pe(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Aa);const Obe=Fbe;var Kb=Math.PI,xD=Ft(),Nbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return Xr("nameValue",{noName:!0,value:h})},W(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Vbe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Kb/2},c=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),v=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,m=v+g,y=r.get(["label","rotate"])||0;y=y*Kb/180;var b,w,T,M=f.get("position",!0),D=d&&f.get("showPlayBtn",!0),P=d&&f.get("showPrevBtn",!0),O=d&&f.get("showNextBtn",!0),V=0,$=c;M==="left"||M==="bottom"?(D&&(b=[0,0],V+=m),P&&(w=[V,0],V+=m),O&&(T=[$-v,0],$-=m)):(D&&(b=[$-v,0],$-=m),P&&(w=[0,0],V+=m),O&&(T=[$-v,0],$-=m));var H=[V,$];return r.get("inverse")&&H.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:h[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:b,prevBtnPosition:w,nextBtnPosition:T,axisExtent:H,controlSize:v,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Zi(),l=o.x,u=o.y+o.height;lo(s,s,[-l,-u]),th(s,s,-Kb/2),lo(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=b(o),c=b(i.getBoundingRect()),f=b(a.getBoundingRect()),d=[i.x,i.y],v=[a.x,a.y];v[0]=d[0]=h[0][0];var g=r.labelPosOpt;if(g==null||ze(g)){var m=g==="+"?0:1;w(d,c,h,1,m),w(v,f,h,1,1-m)}else{var m=g>=0?0:1;w(d,c,h,1,m),v[1]=d[1]+g}i.setPosition(d),a.setPosition(v),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(T){T.originX=h[0][0]-T.x,T.originY=h[1][0]-T.y}function b(T){return[[T.x,T.x+T.width],[T.y,T.y+T.height]]}function w(T,M,D,P,O){T[P]+=D[P][O]-M[P][O]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=zbe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new Obe("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new st;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new en({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:xe({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new en({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:rt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],W(l,function(u){var h=i.dataToCoord(u.value),c=s.getItemModel(u.value),f=c.getModel("itemStyle"),d=c.getModel(["emphasis","itemStyle"]),v=c.getModel(["progress","itemStyle"]),g={x:h,y:0,onclick:Ge(o._changeTimeline,o,u.value)},m=bD(c,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),Nu(m);var y=dt(m);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],W(u,function(h){var c=h.tickValue,f=l.getItemModel(c),d=f.getModel("label"),v=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),m=i.dataToCoord(h.tickValue),y=new Vt({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:Ge(o._changeTimeline,o,c),silent:!1,style:lr(d,{text:h.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=lr(v),y.ensureState("progress").style=lr(g),n.add(y),Nu(y),xD(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),h=a.getPlayState(),c=a.get("inverse",!0);f(r.nextBtnPosition,"next",Ge(this._changeTimeline,this,c?"-":"+")),f(r.prevBtnPosition,"prev",Ge(this._changeTimeline,this,c?"+":"-")),f(r.playPosition,h?"stop":"play",Ge(this._handlePlayClick,this,!h),!0);function f(d,v,g,m){if(d){var y=xa(xt(a.get(["controlStyle",v+"BtnSize"]),o),o),b=[0,-y/2,y,y],w=$be(a,v+"Icon",b,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});w.ensureState("emphasis").style=u,n.add(w),Nu(w)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=Ge(u._handlePointerDrag,u),c.ondragend=Ge(u._handlePointerDragend,u),SD(c,u._progressLine,s,i,a,!0)},onUpdate:function(c){SD(c,u._progressLine,s,i,a)}};this._currentPointer=bD(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Wi(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[a]=+o[a].toFixed(f)),[o,c]}var Jb={min:pt(im,"min"),max:pt(im,"max"),average:pt(im,"average"),median:pt(im,"median")};function ap(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!Zbe(e)&&!Se(e.coord)&&Se(i)){var a=QN(e,r,n,t);if(e=ot(e),e.type&&Jb[e.type]&&a.baseAxis&&a.valueAxis){var o=Ct(i,a.baseAxis.dim),s=Ct(i,a.valueAxis.dim),l=Jb[e.type](r,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!Se(i))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)Jb[u[h]]&&(u[h]=y6(r,r.mapDimension(i[h]),u[h]));return e}}function QN(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(jbe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function jbe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function op(t,e){return t&&t.containData&&e.coord&&!b3(e)?t.containData(e.coord):!0}function Kbe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!b3(e)&&!b3(r)?t.containZone(e.coord,r.coord):!0}function ez(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return tl(o,e[a])}:function(r,n,i,a){return tl(r.value,e[a])}}function y6(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var Qb=Ft(),Jbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=Ye()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){Qb(s).keep=!1}),n.eachSeries(function(s){var l=pl.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!Qb(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(r){Qb(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;W(r,function(a){var o=pl.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?kB(l):OS(l))})}})},e.type="marker",e}(wr);const _6=Jbe;function CD(t,e,r){var n=e.coordinateSystem;t.each(function(i){var a=t.getItemModel(i),o,s=Be(a.get("x"),r.getWidth()),l=Be(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(n){var u=t.get(n.dimensions[0],i),h=t.get(n.dimensions[1],i);o=n.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(i,o)})}var Qbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=pl.getMarkerModelFromSeries(a,"markPoint");o&&(CD(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new kp),c=e4e(o,r,n);n.setData(c),CD(n.getData(),r,a),c.each(function(f){var d=c.getItemModel(f),v=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),b=d.getShallow("symbolKeepAspect");if(Je(v)||Je(g)||Je(m)||Je(y)){var w=n.getRawValue(f),T=n.getDataParams(f);Je(v)&&(v=v(w,T)),Je(g)&&(g=g(w,T)),Je(m)&&(m=m(w,T)),Je(y)&&(y=y(w,T))}var M=d.getModel("itemStyle").getItemStyle(),D=Sp(l,"color");M.fill||(M.fill=D),c.setItemVisual(f,{symbol:v,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:b,style:M})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(f){f.traverse(function(d){dt(d).dataModel=n})}),this.markKeep(h),h.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(_6);function e4e(t,e,r){var n;t?n=Ce(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return xe(xe({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Hn(n,r),a=Ce(r.get("data"),pt(ap,e));t&&(a=Jt(a,pt(op,t)));var o=ez(!!t,n);return i.initData(a,null,o),i}const t4e=Qbe;function r4e(t){t.registerComponentModel(Xbe),t.registerComponentView(t4e),t.registerPreprocessor(function(e){m6(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var n4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(pl);const i4e=n4e;var am=Ft(),a4e=function(t,e,r,n){var i=t.getData(),a;if(Se(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Qr(n.yAxis,n.xAxis);else{var u=QN(n,i,e,t);s=u.valueAxis;var h=VR(i,u.valueDataDim);l=y6(i,h,o)}var c=s.dim==="x"?0:1,f=1-c,d=ot(n),v={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,v.coord[f]=1/0;var g=r.get("precision");g>=0&&$t(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[c]=v.coord[c]=l,a=[d,v,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[ap(t,a[0]),ap(t,a[1]),xe({},a[2])];return m[2].type=m[2].type||null,bt(m[2],m[0]),bt(m[2],m[1]),m};function fy(t){return!isNaN(t)&&!isFinite(t)}function AD(t,e,r,n){var i=1-t,a=n.dimensions[t];return fy(e[i])&&fy(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function o4e(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(AD(1,r,n,t)||AD(0,r,n,t)))return!0}return op(t,e[0])&&op(t,e[1])}function e4(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=Be(o.get("x"),i.getWidth()),u=Be(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),f=t.get(h[1],e);s=a.dataToPoint([c,f])}if(ah(a,"cartesian2d")){var d=a.getAxis("x"),v=a.getAxis("y"),h=a.dimensions;fy(t.get(h[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):fy(t.get(h[1],e))&&(s[1]=v.toGlobalCoord(v.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var s4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=pl.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=am(o).from,u=am(o).to;l.each(function(h){e4(l,h,!0,a,i),e4(u,h,!1,a,i)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Gw);this.group.add(h.group);var c=l4e(o,r,n),f=c.from,d=c.to,v=c.line;am(n).from=f,am(n).to=d,n.setData(v);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),b=n.get("symbolOffset");Se(g)||(g=[g,g]),Se(m)||(m=[m,m]),Se(y)||(y=[y,y]),Se(b)||(b=[b,b]),c.from.each(function(T){w(f,T,!0),w(d,T,!1)}),v.each(function(T){var M=v.getItemModel(T).getModel("lineStyle").getLineStyle();v.setItemLayout(T,[f.getItemLayout(T),d.getItemLayout(T)]),M.stroke==null&&(M.stroke=f.getItemVisual(T,"style").fill),v.setItemVisual(T,{fromSymbolKeepAspect:f.getItemVisual(T,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(T,"symbolOffset"),fromSymbolRotate:f.getItemVisual(T,"symbolRotate"),fromSymbolSize:f.getItemVisual(T,"symbolSize"),fromSymbol:f.getItemVisual(T,"symbol"),toSymbolKeepAspect:d.getItemVisual(T,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(T,"symbolOffset"),toSymbolRotate:d.getItemVisual(T,"symbolRotate"),toSymbolSize:d.getItemVisual(T,"symbolSize"),toSymbol:d.getItemVisual(T,"symbol"),style:M})}),h.updateData(v),c.line.eachItemGraphicEl(function(T){dt(T).dataModel=n,T.traverse(function(M){dt(M).dataModel=n})});function w(T,M,D){var P=T.getItemModel(M);e4(T,M,D,r,a);var O=P.getModel("itemStyle").getItemStyle();O.fill==null&&(O.fill=Sp(l,"color")),T.setItemVisual(M,{symbolKeepAspect:P.get("symbolKeepAspect"),symbolOffset:xt(P.get("symbolOffset",!0),b[D?0:1]),symbolRotate:xt(P.get("symbolRotate",!0),y[D?0:1]),symbolSize:xt(P.get("symbolSize"),m[D?0:1]),symbol:xt(P.get("symbol",!0),g[D?0:1]),style:O})}this.markKeep(h),h.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(_6);function l4e(t,e,r){var n;t?n=Ce(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return xe(xe({},h),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Hn(n,r),a=new Hn(n,r),o=new Hn([],r),s=Ce(r.get("data"),pt(a4e,e,t,r));t&&(s=Jt(s,pt(o4e,t)));var l=ez(!!t,n);return i.initData(Ce(s,function(u){return u[0]}),null,l),a.initData(Ce(s,function(u){return u[1]}),null,l),o.initData(Ce(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}const u4e=s4e;function h4e(t){t.registerComponentModel(i4e),t.registerComponentView(u4e),t.registerPreprocessor(function(e){m6(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var c4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(pl);const f4e=c4e;var om=Ft(),d4e=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=ap(t,i),s=ap(t,a),l=o.coord,u=s.coord;l[0]=Qr(l[0],-1/0),l[1]=Qr(l[1],-1/0),u[0]=Qr(u[0],1/0),u[1]=Qr(u[1],1/0);var h=_S([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function dy(t){return!isNaN(t)&&!isFinite(t)}function TD(t,e,r,n){var i=1-t;return dy(e[i])&&dy(r[i])}function p4e(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return ah(t,"cartesian2d")?r&&n&&(TD(1,r,n)||TD(0,r,n))?!0:Kbe(t,i,a):op(t,i)||op(t,a)}function kD(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=Be(o.get(r[0]),i.getWidth()),u=Be(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var h=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),f=a.clampData(h),d=a.clampData(c),v=[];r[0]==="x0"?v[0]=f[0]>d[0]?c[0]:h[0]:v[0]=f[0]>d[0]?h[0]:c[0],r[1]==="y0"?v[1]=f[1]>d[1]?c[1]:h[1]:v[1]=f[1]>d[1]?h[1]:c[1],s=n.getMarkerPosition(v,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(ah(a,"cartesian2d")){var b=a.getAxis("x"),w=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);dy(g)?s[0]=b.toGlobalCoord(b.getExtent()[r[0]==="x0"?0:1]):dy(m)&&(s[1]=w.toGlobalCoord(w.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var DD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],v4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=pl.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Ce(DD,function(c){return kD(s,l,c,a,i)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new st});this.group.add(h.group),this.markKeep(h);var c=g4e(o,r,n);n.setData(c),c.each(function(f){var d=Ce(DD,function(O){return kD(c,f,O,r,a)}),v=o.getAxis("x").scale,g=o.getAxis("y").scale,m=v.getExtent(),y=g.getExtent(),b=[v.parse(c.get("x0",f)),v.parse(c.get("x1",f))],w=[g.parse(c.get("y0",f)),g.parse(c.get("y1",f))];Wi(b),Wi(w);var T=!(m[0]>b[1]||m[1]w[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Nt);const S3=x4e;var fc=pt,w3=W,sm=st,b4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new sm),this.group.add(this._selectorGroup=new sm),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var h=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},f=r.get("padding"),d=Vr(h,c,f),v=this.layoutInner(r,o,d,a,l,u),g=Vr(rt({width:v.width,height:v.height},h),c,f);this.group.x=g.x-v.x,this.group.y=g.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=GN(v,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),h=Ye(),c=n.get("selectedMode"),f=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&f.push(d.id)}),w3(n.getData(),function(d,v){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` -`)){var m=new sm;m.newline=!0,u.add(m);return}var y=i.getSeriesByName(g)[0];if(!h.get(g))if(y){var b=y.getData(),w=b.getVisual("legendLineStyle")||{},T=b.getVisual("legendIcon"),M=b.getVisual("style"),D=this._createItem(y,g,v,d,n,r,w,M,T,c,a);D.on("click",fc(MD,g,null,a,f)).on("mouseover",fc(C3,y.name,null,a,f)).on("mouseout",fc(A3,y.name,null,a,f)),h.set(g,!0)}else i.eachRawSeries(function(P){if(!h.get(g)&&P.legendVisualProvider){var O=P.legendVisualProvider;if(!O.containName(g))return;var V=O.indexOfName(g),$=O.getItemVisual(V,"style"),H=O.getItemVisual(V,"legendIcon"),j=bi($.fill);j&&j[3]===0&&(j[3]=.2,$=xe(xe({},$),{fill:qo(j,"rgba")}));var q=this._createItem(P,g,v,d,n,r,{},$,H,c,a);q.on("click",fc(MD,null,g,a,f)).on("mouseover",fc(C3,null,g,a,f)).on("mouseout",fc(A3,null,g,a,f)),h.set(g,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();w3(r,function(u){var h=u.type,c=new Vt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);fn(c,{normal:f,emphasis:d},{defaultText:u.title}),Nu(c)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,h,c,f){var d=r.visualDrawType,v=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),b=a.get("symbolKeepAspect"),w=a.get("icon");h=w||h||"roundRect";var T=S4e(h,a,l,u,d,m,f),M=new sm,D=a.getModel("textStyle");if(Je(r.getLegendIcon)&&(!w||w==="inherit"))M.add(r.getLegendIcon({itemWidth:v,itemHeight:g,icon:h,iconRotate:y,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:b}));else{var P=w==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;M.add(w4e({itemWidth:v,itemHeight:g,icon:h,iconRotate:P,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:b}))}var O=s==="left"?v+5:-5,V=s,$=o.get("formatter"),H=n;ze($)&&$?H=$.replace("{name}",n??""):Je($)&&(H=$(n));var j=m?D.getTextColor():a.get("inactiveColor");M.add(new Vt({style:lr(D,{text:H,x:O,y:g/2,fill:j,align:V,verticalAlign:"middle"},{inheritColor:j})}));var q=new Rt({shape:M.getBoundingRect(),invisible:!0}),G=a.getModel("tooltip");return G.get("show")&&nf({el:q,componentModel:o,itemName:n,itemTooltipOption:G.option}),M.add(q),M.eachChild(function(J){J.silent=!0}),q.silent=!c,this.getContentGroup().add(M),Nu(M),M.__legendDataIndex=i,M},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Vu(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),c=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){Vu("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],v=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",b=g===0?"y":"x";s==="end"?d[g]+=h[m]+v:c[g]+=f[m]+v,d[1-g]+=h[y]/2-f[y]/2,u.x=d[0],u.y=d[1],l.x=c[0],l.y=c[1];var w={x:0,y:0};return w[m]=h[m]+v+f[m],w[y]=Math.max(h[y],f[y]),w[b]=Math.min(0,f[b]+d[1-g]),w}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(wr);function S4e(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),w3(m,function(b,w){m[w]==="inherit"&&(m[w]=y[w])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:qc(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth=v==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function w4e(t){var e=t.icon||"roundRect",r=Fr(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function MD(t,e,r,n){A3(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),C3(t,e,r,n)}function tz(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-d.x,-d.y];n||(m[a]=h[u]);var y=[0,0],b=[-v.x,-v.y],w=xt(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var T=r.get("pageButtonPosition",!0);T==="end"?b[a]+=i[o]-v[o]:y[a]+=v[o]+w}b[1-a]+=d[s]/2-v[s]/2,h.setPosition(m),c.setPosition(y),f.setPosition(b);var M={x:0,y:0};if(M[o]=g?i[o]:d[o],M[s]=Math.max(d[s],v[s]),M[l]=Math.min(0,v[l]+b[1-a]),c.__rectSize=i[o],g){var D={x:0,y:0};D[o]=Math.max(i[o]-v[o]-w,0),D[s]=M[s],c.setClipPath(new Rt({shape:D})),c.__rectSize=D[o]}else f.eachChild(function(O){O.attr({invisible:!0,silent:!0})});var P=this._getPageInfo(r);return P.pageIndex!=null&&Gt(h,{x:P.contentPosition[0],y:P.contentPosition[1]},g?r:null),this._updatePageInfoView(r,P),M},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;W(["pagePrev","pageNext"],function(h){var c=h+"DataIndex",f=n[c]!=null,d=i.childOfName(h);d&&(d.setStyle("fill",f?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",ze(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=t4[o],l=r4[o],u=this._findTargetItemIndex(n),h=i.children(),c=h[u],f=h.length,d=f?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return v;var g=T(c);v.contentPosition[o]=-g.s;for(var m=u+1,y=g,b=g,w=null;m<=f;++m)w=T(h[m]),(!w&&b.e>y.s+a||w&&!M(w,y.s))&&(b.i>y.i?y=b:y=w,y&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=y.i),++v.pageCount)),b=w;for(var m=u-1,y=g,b=g,w=null;m>=-1;--m)w=T(h[m]),(!w||!M(b,w.s))&&y.i=P&&D.s<=P+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(rz);const M4e=D4e;function L4e(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function E4e(t){At(nz),t.registerComponentModel(k4e),t.registerComponentView(M4e),L4e(t)}function I4e(t){At(nz),At(E4e)}var B4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=gl(ip.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(ip);const P4e=B4e;var x6=Ft();function R4e(t,e,r){x6(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function F4e(t,e){for(var r=x6(t).coordSysRecordMap,n=r.keys(),i=0;in[r+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function $4e(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=x6(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=Ye());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=zN(a);W(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,O4e(r,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=Ye());h.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){iz(i,a);return}var h=V4e(l);o.enable(h.controlType,h.opt),o.setPointerChecker(a.containsPoint),ff(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var G4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),R4e(i,r,{pan:Ge(n4.pan,this),zoom:Ge(n4.zoom,this),scrollMove:Ge(n4.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){F4e(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(c6),n4={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=i4[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(sh(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:ID(function(t,e,r,n,i,a){var o=i4[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:ID(function(t,e,r,n,i,a){var o=i4[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function ID(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(sh(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var i4={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};const H4e=G4e;function az(t){f6(t),t.registerComponentModel(P4e),t.registerComponentView(H4e),$4e(t)}var q4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=gl(ip.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(ip);const W4e=q4e;var E0=Rt,BD=7,U4e=1,a4=30,Y4e=7,I0="horizontal",PD="vertical",X4e=5,Z4e=["line","bar","candlestick","scatter"],j4e={easing:"cubicOut",duration:100,delay:0},K4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=Ge(this._onBrush,this),this._onBrushEnd=Ge(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),ff(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Ud(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new st;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Y4e:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===I0?{right:s.width-o.x-o.width,top:s.height-a4-BD-a,width:o.width,height:a4}:{right:BD,top:o.y,width:a4,height:o.height},u=lf(r.option);W(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var h=Vr(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===PD&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===I0&&!o?{scaleY:l?1:-1,scaleX:1}:i===I0&&o?{scaleY:l?1:-1,scaleX:-1}:i===PD&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new E0({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new E0({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Ge(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var c=o.getDataExtent(l),f=(c[1]-c[0])*.3;c=[c[0]-f,c[1]+f];var d=[0,n[1]],v=[0,n[0]],g=[[n[0],0],[0,0]],m=[],y=v[1]/(o.count()-1),b=0,w=Math.round(o.count()/n[0]),T;o.each([l],function(V,$){if(w>0&&$%w){b+=y;return}var H=V==null||isNaN(V)||V==="",j=H?0:jt(V,c,d,!0);H&&!T&&$?(g.push([g[g.length-1][0],0]),m.push([m[m.length-1][0],0])):!H&&T&&(g.push([b,0]),m.push([b,0])),g.push([b,j]),m.push([b,j]),b+=y,T=H}),u=this._shadowPolygonPts=g,h=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var M=this.dataZoomModel;function D(V){var $=M.getModel(V?"selectedDataBackground":"dataBackground"),H=new st,j=new ui({shape:{points:u},segmentIgnoreThreshold:1,style:$.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),q=new hi({shape:{points:h},segmentIgnoreThreshold:1,style:$.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return H.add(j),H.add(q),H}for(var P=0;P<3;P++){var O=D(P===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();W(l,function(u){if(!i&&!(n!==!0&&Ct(Z4e,u.get("type"))<0)){var h=a.getComponent(Zs(o),s).axis,c=J4e(o),f,d=u.coordinateSystem;c!=null&&d.getOtherAxis&&(f=d.getOtherAxis(h).inverse),c=u.getData().mapDimension(c),i={thisAxis:h,series:u,thisDim:o,otherDim:c,otherAxisInverse:f}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,c=l.get("brushSelect"),f=n.filler=new E0({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new E0({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:U4e,fill:"rgba(0,0,0,0)"}})),W([0,1],function(w){var T=l.get("handleIcon");!H1[T]&&T.indexOf("path://")<0&&T.indexOf("image://")<0&&(T="path://"+T);var M=Fr(T,-1,0,2,2,null,!0);M.attr({cursor:RD(this._orient),draggable:!0,drift:Ge(this._onDragMove,this,w),ondragend:Ge(this._onDragEnd,this),onmouseover:Ge(this._showDataInfo,this,!0),onmouseout:Ge(this._showDataInfo,this,!1),z2:5});var D=M.getBoundingRect(),P=l.get("handleSize");this._handleHeight=Be(P,this._size[1]),this._handleWidth=D.width/D.height*this._handleHeight,M.setStyle(l.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Nu(M);var O=l.get("handleColor");O!=null&&(M.style.fill=O),o.add(i[w]=M);var V=l.getModel("textStyle");r.add(a[w]=new Vt({silent:!0,invisible:!0,style:lr(V,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:V.getTextColor(),font:V.getFont()}),z2:10}))},this);var d=f;if(c){var v=Be(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Rt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,y=n.moveHandleIcon=Fr(l.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);y.silent=!0,y.y=s[1]+v/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var b=Math.min(s[1]/2,Math.max(v,10));d=n.moveZone=new Rt({invisible:!0,shape:{y:s[1]-b,height:v+b}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:RD(this._orient),drift:Ge(this._onDragMove,this,"all"),ondragstart:Ge(this._showDataInfo,this,!0),ondragend:Ge(this._onDragEnd,this),onmouseover:Ge(this._showDataInfo,this,!0),onmouseout:Ge(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[jt(r[0],[0,100],n,!0),jt(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];sh(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?jt(s.minSpan,l,o,!0):null,s.maxSpan!=null?jt(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=Wi([jt(a[0],o,l,!0),jt(a[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Wi(i.slice()),o=this._size;W([0,1],function(d){var v=n.handles[d],g=this._handleHeight;v.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],h=0;hn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new _t(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Wi([jt(i.x,o,s,!0),jt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(Zo(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new E0({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),h=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:c[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?j4e:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=zN(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(c6);function J4e(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function RD(t){return t==="vertical"?"ns-resize":"ew-resize"}const Q4e=K4e;function oz(t){t.registerComponentModel(W4e),t.registerComponentView(Q4e),f6(t)}function e5e(t){At(az),At(oz)}var t5e={get:function(t,e,r){var n=ot((r5e[t]||{})[e]);return r&&Se(n)?n[n.length-1]:n}},r5e={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const sz=t5e;var FD=hn.mapVisual,n5e=hn.eachVisual,i5e=Se,OD=W,a5e=Wi,o5e=jt,s5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&ZN(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=Ge(r,this),this.controllerVisuals=_3(this.option.controller,n,r),this.targetVisuals=_3(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=er(r),n},e.prototype.eachTargetSeries=function(r,n){W(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],Se(r)&&(r=r.slice(),u=!0);var h=n?r:u?[c(r[0]),c(r[1])]:c(r);if(ze(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(Je(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+h[1]:r[1]===s[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function c(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=a5e([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});bt(a,i),bt(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),h.call(this,o);function l(c){i5e(n.color)&&!c.inRange&&(c.inRange={color:n.color.slice().reverse()}),c.inRange=c.inRange||{color:r.get("gradientColor")}}function u(c,f,d){var v=c[f],g=c[d];v&&!g&&(g=c[d]={},OD(v,function(m,y){if(hn.isValidType(y)){var b=sz.get(y,"inactive",s);b!=null&&(g[y]=b,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function h(c){var f=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,d=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";OD(this.stateList,function(y){var b=this.itemSize,w=c[y];w||(w=c[y]={color:s?v:[v]}),w.symbol==null&&(w.symbol=f&&ot(f)||(s?m:[m])),w.symbolSize==null&&(w.symbolSize=d&&ot(d)||(s?b[0]:[b[0],b[0]])),w.symbol=FD(w.symbol,function(D){return D==="none"?m:D});var T=w.symbolSize;if(T!=null){var M=-1/0;n5e(T,function(D){D>M&&(M=D)}),w.symbolSize=FD(T,function(D){return o5e(D,[0,M],[0,b[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Nt);const py=s5e;var ND=[20,140],l5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=ND[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=ND[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):Se(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),W(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Wi((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=zD(this,"outOfRange",this.getExtent()),i=zD(this,"inRange",this.option.range.slice()),a=[];function o(d,v){a.push({value:d,color:r(d,v)})}for(var s=0,l=0,u=i.length,h=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new st(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();c5e([0,1],function(h){var c=o[h];c.setStyle("fill",n.handlesColor[h]),c.y=r[h];var f=Ua(r[h],[0,l[1]],u,!0),d=this.getControllerVisual(f,"symbolSize");c.scaleX=c.scaleY=d/l[0],c.x=l[0]-d/2;var v=ma(i.handleLabelPoints[h],zu(c,this.group));s[h].setStyle({x:v[0],y:v[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,c=h.indicator;if(c){c.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",f),v=this.getControllerVisual(r,"symbolSize"),g=Ua(r,s,u,!0),m=l[0]-v/2,y={x:c.x,y:c.y};c.y=g,c.x=m;var b=ma(h.indicatorLabelPoint,zu(c,this.group)),w=h.indicatorLabel;w.attr("invisible",!1);var T=this._applyTransform("left",h.mainGroup),M=this._orient,D=M==="horizontal";w.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:D?T:"middle",align:D?"center":T});var P={x:m,y:g,style:{fill:d}},O={style:{x:b[0],y:b[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var V={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(P,V),w.animateTo(O,V)}else c.attr(P),w.attr(O);this._firstShowIndicator=!1;var $=this._shapes.handleLabels;if($)for(var H=0;H<$.length;H++)this._api.enterBlur($[H])}},e.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=$D(o4(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=$D(o4(o[0],r),o[1]);var l=v5e(i,s,o),u=[r-l,r+l],h=Ua(r,o,s,!0),c=[Ua(u[0],o,s,!0),Ua(u[1],o,s,!0)];u[0]o[1]&&(c[1]=1/0),n&&(c[0]===-1/0?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||HD(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var v=aie(f,d);this._dispatchHighDown("downplay",Xm(v[0],i)),this._dispatchHighDown("highlight",Xm(v[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Du(r.target,function(l){var u=dt(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function x5e(t,e,r,n){for(var i=e.targetVisuals[n],a=hn.prepareVisualTypes(i),o={color:Sp(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(m5e,y5e),W(_5e,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(b5e))}function cz(t){t.registerComponentModel(u5e),t.registerComponentView(g5e),hz(t)}var S5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],w5e[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ot(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Ce(this._pieceList,function(l){return l=ot(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=hn.listVisualTypes(),a=this.isCategory();W(r.pieces,function(s){W(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),W(n,function(s,l){var u=!1;W(this.stateList,function(h){u=u||o(r,h,l)||o(r.target,h,l)},this),!u&&W(this.stateList,function(h){(r[h]||(r[h]={}))[l]=sz.get(l,h==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,W(a,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var s=!1;W(a,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ot(r)},e.prototype.getValueState=function(r){var n=hn.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=hn.findPieceIndex(l,i);h===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(h,c){var f=a.getRepresentValue({interval:h});c||(c=a.getValueState(f));var d=r(f,c);h[0]===-1/0?i[0]=d:h[1]===1/0?i[1]=d:n.push({value:h[0],color:d},{value:h[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return W(s,function(h){var c=h.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=gl(py.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(py),w5e={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function YD(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}const C5e=S5e;var A5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,h=this._getViewData(),c=h.endsText,f=Qr(n.get("showLabel",!0),!c);c&&this._renderEndsText(r,c[0],u,f,l),W(h.viewPieceList,function(d){var v=d.piece,g=new st;g.onclick=Ge(this._onItemClick,this,v),this._enableHoverLink(g,d.indexInModelPieceList);var m=n.getRepresentValue(v);if(this._createItemSymbol(g,m,[0,0,u[0],u[1]]),f){var y=this.visualMapModel.getValueState(m);g.add(new Vt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}r.add(g)},this),c&&this._renderEndsText(r,c[1],u,f,l),Vu(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Xm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return uz(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new st,l=this.visualMapModel.textStyleModel;s.add(new Vt({style:lr(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=Ce(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i){r.add(Fr(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ot(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,W(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(lz);const T5e=A5e;function fz(t){t.registerComponentModel(C5e),t.registerComponentView(T5e),hz(t)}function k5e(t){At(cz),At(fz)}var D5e={label:{enabled:!0},decal:{show:!1}},XD=Ft(),M5e={};function L5e(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ot(D5e);bt(n.label,t.getLocaleModel().get("aria"),!1),bt(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),h=u.get("show");if(h){var c=Ye();t.eachSeries(function(f){if(!f.isColorBySeries()){var d=c.get(f.type);d||(d={},c.set(f.type,d)),XD(f).scope=d}}),t.eachRawSeries(function(f){if(t.isSeriesFiltered(f))return;if(Je(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var b=k5(f.ecModel,f.name,M5e,t.getSeriesCount()),w=d.getVisual("decal");d.setVisual("decal",T(w,b))}else{var v=f.getRawData(),g={},m=XD(f).scope;d.each(function(M){var D=d.getRawIndex(M);g[D]=M});var y=v.count();v.each(function(M){var D=g[M],P=v.getName(M)||M+"",O=k5(f.ecModel,P,m,y),V=d.getItemVisual(D,"decal");d.setItemVisual(D,"decal",T(V,O))})}function T(M,D){var P=M?xe(xe({},D),M):D;return P.dirty=!0,P}})}}function a(){var u=t.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=rt(h.option,u),!!h.get("enabled")){var c=e.getZr().dom;if(h.get("description")){c.setAttribute("aria-label",h.get("description"));return}var f=t.getSeriesCount(),d=h.get(["data","maxCount"])||10,v=h.get(["series","maxCount"])||10,g=Math.min(f,v),m;if(!(f<1)){var y=s();if(y){var b=h.get(["general","withTitle"]);m=o(b,{title:y})}else m=h.get(["general","withoutTitle"]);var w=[],T=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(T,{seriesCount:f}),t.eachSeries(function(O,V){if(V1?h.get(["series","multiple",j]):h.get(["series","single",j]),$=o($,{seriesId:O.seriesIndex,seriesName:O.get("name"),seriesType:l(O.subType)});var q=O.getData();if(q.count()>d){var G=h.get(["data","partialData"]);$+=o(G,{displayCnt:d})}else $+=h.get(["data","allData"]);for(var J=h.get(["data","separator","middle"]),K=h.get(["data","separator","end"]),se=[],ae=0;ae":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},B5e=function(){function t(e){var r=this._condVal=ze(e)?new RegExp(e):gre(e)?e:null;if(r==null){var n="";Yt(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return ze(r)?this._condVal.test(e):$t(r)?this._condVal.test(e+""):!1},t}(),P5e=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),R5e=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[q,G]}function h(q,G,J,K){Tc(q,J)&&Tc(G,K)||i.push(q,G,J,K,J,K)}function c(q,G,J,K,se,ae){var ce=Math.abs(G-q),ye=Math.tan(ce/4)*4/3,de=GO:H2&&n.push(i),n}function k3(t,e,r,n,i,a,o,s,l,u){if(Tc(t,r)&&Tc(e,n)&&Tc(i,o)&&Tc(a,s)){l.push(o,s);return}var h=2/u,c=h*h,f=o-t,d=s-e,v=Math.sqrt(f*f+d*d);f/=v,d/=v;var g=r-t,m=n-e,y=i-o,b=a-s,w=g*g+m*m,T=y*y+b*b;if(w=0&&O=0){l.push(o,s);return}var V=[],$=[];sl(t,r,i,o,.5,V),sl(e,n,a,s,.5,$),k3(V[0],$[0],V[1],$[1],V[2],$[2],V[3],$[3],l,u),k3(V[4],$[4],V[5],$[5],V[6],$[6],V[7],$[7],l,u)}function Z5e(t,e){var r=T3(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),c=pz([l,u],h?0:1,e),f=(h?s:u)/c.length,d=0;di,o=pz([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",h=a?"y":"x",c=t[s]/o.length,f=0;f1?null:new _t(g*l+t,g*u+e)}function J5e(t,e,r){var n=new _t;_t.sub(n,r,e),n.normalize();var i=new _t;_t.sub(i,t,e);var a=i.dot(n);return a}function pc(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function Q5e(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=h.x=s+a/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+a),Q5e(e,u,h)}function vy(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);vy(t,a[0],i,n),vy(t,a[1],r-i,n)}return n}function e3e(t,e){for(var r=[],n=0;n0)for(var M=n/r,D=-n/2;D<=n/2;D+=M){for(var P=Math.sin(D),O=Math.cos(D),V=0,w=0;w0;u/=2){var h=0,c=0;(t&u)>0&&(h=1),(e&u)>0&&(c=1),s+=u*u*(3*h^c),c===0&&(h===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function yy(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=Ce(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(h,e),r=Math.min(c,r),n=Math.max(h,n),i=Math.max(c,i),[h,c]}),o=Ce(a,function(s,l){return{cp:s,z:u3e(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function mz(t){return n3e(t.path,t.count)}function D3(){return{fromIndividuals:[],toIndividuals:[],count:0}}function h3e(t,e,r){var n=[];function i(M){for(var D=0;D=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var f3e={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;nM(t)&&(u=t,h=e),nM(e)&&(u=e,h=t);function c(y,b,w,T,M){var D=y.many,P=y.one;if(D.length===1&&!M){var O=b?D[0]:P,V=b?P:D[0];if(gy(O))c({many:[O],one:V},!0,w,T,!0);else{var $=s?rt({delay:s(w,T)},l):l;S6(O,V,$),a(O,V,O,V,$)}}else for(var H=rt({dividePath:f3e[r],individualDelay:s&&function(se,ae,ce,ye){return s(se+w,T)}},l),j=b?h3e(D,P,H):c3e(P,D,H),q=j.fromIndividuals,G=j.toIndividuals,J=q.length,K=0;Ke.length,d=u?iM(h,u):iM(f?e:t,[f?t:e]),v=0,g=0;gyz))for(var i=n.getIndices(),a=p3e(n),o=0;o0&&T.group.traverse(function(D){D instanceof Tt&&!D.animators.length&&D.animateFrom({style:{opacity:0}},M)})})}function oM(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function sM(t){return Se(t)?t.sort().join(","):t}function Ns(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function m3e(t,e){var r=Ye(),n=Ye(),i=Ye();return W(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=oM(a),h=sM(u);n.set(h,{dataGroupId:s,data:l}),Se(u)&&W(u,function(c){i.set(c,{key:h,dataGroupId:s,data:l})})}),W(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=oM(a),u=sM(l),h=n.get(u);if(h)r.set(u,{oldSeries:[{dataGroupId:h.dataGroupId,divide:Ns(h.data),data:h.data}],newSeries:[{dataGroupId:o,divide:Ns(s),data:s}]});else if(Se(l)){var c=[];W(l,function(v){var g=n.get(v);g.data&&c.push({dataGroupId:g.dataGroupId,divide:Ns(g.data),data:g.data})}),c.length&&r.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Ns(s)}]})}else{var f=i.get(l);if(f){var d=r.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:Ns(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Ns(s)})}}}}),r}function lM(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ns(e.oldData[s]),dim:o.dimension})}),W(er(t.to),function(o){var s=lM(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ns(l),dim:o.dimension})}}),i.length>0&&a.length>0&&_z(i,a,n)}function _3e(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){W(er(n.seriesTransition),function(i){W(er(i.to),function(a){for(var o=n.updatedSeries,s=0;sdiv{width:100%;height:100%} -`,{});var F3e=function(){if(B0!=null)return B0;if(typeof HTMLElement>"u"||typeof customElements>"u")return B0=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { +`:"
",y=c.join(m);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],d,null,f)})},e.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=dt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,h=o.dataIndex,c=o.dataType,f=u.getData(c),d=this._renderMode,v=r.positionDefault,g=D0([f.getItemModel(h),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),m=g.get("trigger");if(!(m!=null&&m!=="item")){var y=u.getDataParams(h,c),b=new Rx;y.marker=b.makeTooltipMarker("item",Qu(y.color),d);var w=X8(u.formatTooltip(h,!1,c)),T=g.get("order"),M=g.get("valueFormatter"),D=w.frag,P=D?eA(M?xe({valueFormatter:M},D):D,b,d,T,a.get("useUTC"),g.get("textStyle")):w.text,O="item_"+u.name+"_"+h;this._showOrMove(g,function(){this._showTooltipContent(g,P,y,O,r.offsetX,r.offsetY,r.position,r.target,b)}),i({type:"showTip",dataIndexInside:h,dataIndex:f.getRawIndex(h),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(r,n,i){var a=dt(n),o=a.tooltipConfig,s=o.option||{};if(ze(s)){var l=s;s={content:l,formatter:l}}var u=[s],h=this._ecModel.getComponent(a.componentMainType,a.componentIndex);h&&u.push(h),u.push({formatter:s.content});var c=r.positionDefault,f=D0(u,this._tooltipModel,c?{position:c}:null),d=f.get("content"),v=Math.random()+"",g=new Rx;this._showOrMove(f,function(){var m=ot(f.get("formatterParams")||{});this._showTooltipContent(f,d,m,v,r.offsetX,r.offsetY,r.position,n,g)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,h){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var f=r.get("formatter");l=l||r.get("position");var d=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),g=v.color;if(f)if(ze(f)){var m=r.ecModel.get("useUTC"),y=Se(i)?i[0]:i,b=y&&y.axisType&&y.axisType.indexOf("time")>=0;d=f,b&&(d=t2(y.axisValue,d,m)),d=xP(d,i,!0)}else if(Je(f)){var w=Ge(function(T,M){T===this._ticket&&(c.setContent(M,h,r,g,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,d=f(i,a,w)}else d=f;c.setContent(d,h,r,g,l),c.show(r,g),this._updatePosition(r,l,o,s,c,i,u)}},e.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||Se(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!Se(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),h=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),f=r.get("align"),d=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),Je(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,h],contentSize:c.slice()})),Se(n))i=Be(n[0],u),a=Be(n[1],h);else if(nt(n)){var g=n;g.width=c[0],g.height=c[1];var m=$r(g,{width:u,height:h});i=m.x,a=m.y,f=null,d=null}else if(ze(n)&&l){var y=sbe(n,v,c,r.get("borderWidth"));i=y[0],a=y[1]}else{var y=abe(i,a,o,u,h,f?null:20,d?null:20);i=y[0],a=y[1]}if(f&&(i-=hD(f)?c[0]/2:f==="right"?c[0]:0),d&&(a-=hD(d)?c[1]/2:d==="bottom"?c[1]:0),WN(r)){var y=obe(i,a,o,u,h);i=y[0],a=y[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&W(i,function(s,l){var u=s.dataByAxis||[],h=r[l]||{},c=h.dataByAxis||[];o=o&&u.length===c.length,o&&W(u,function(f,d){var v=c[d]||{},g=f.seriesDataIndices||[],m=v.seriesDataIndices||[];o=o&&f.value===v.value&&f.axisType===v.axisType&&f.axisId===v.axisId&&g.length===m.length,o&&W(g,function(y,b){var w=m[b];o=o&&y.seriesIndex===w.seriesIndex&&y.dataIndex===w.dataIndex}),a&&W(f.seriesDataIndices,function(y){var b=y.seriesIndex,w=n[b],T=a[b];w&&T&&T.data!==w.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},e.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},e.prototype.dispose=function(r,n){zt.node||!n.getDom()||(Yd(this,"_updatePosition"),this._tooltipContent.dispose(),p3("itemTooltip",n))},e.type="tooltip",e}(Cr);function D0(t,e,r){var n=e.ecModel,i;r?(i=new ur(r,n,n),i=new ur(e.option,i,n)):i=e;for(var a=t.length-1;a>=0;a--){var o=t[a];o&&(o instanceof ur&&(o=o.get("tooltip",!0)),ze(o)&&(o={formatter:o}),o&&(i=new ur(o,i,n)))}return i}function uD(t,e){return t.dispatchAction||Ge(e.dispatchAction,e)}function abe(t,e,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(t+l+a+2>n?t-=l+a:t+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function obe(t,e,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return t=Math.min(t+o,n)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function sbe(t,e,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o,l=e.y+h/2-a/2;break;case"right":s=e.x+u+o,l=e.y+h/2-a/2}return[s,l]}function hD(t){return t==="center"||t==="middle"}function lbe(t,e,r){var n=ES(t).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=gp(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=r.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var h=dt(u).tooltipConfig;if(h&&h.name===t.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const ube=ibe;function hbe(t){At(Pp),t.registerComponentModel(Hxe),t.registerComponentView(ube),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ir),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ir)}var cbe=["rect","polygon","keep","clear"];function fbe(t,e){var r=er(t?t.brush:[]);if(r.length){var n=[];W(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=t&&t.toolbox;Se(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),dbe(s),e&&!s.length&&s.push.apply(s,cbe)}}function dbe(t){var e={};W(t,function(r){e[r]=1}),t.length=0,W(e,function(r,n){t.push(n)})}var cD=W;function fD(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function x3(t,e,r){var n={};return cD(e,function(a){var o=n[a]=i();cD(t[a],function(s,l){if(fn.isValidType(l)){var u={type:l,visual:s};r&&r(u,a),o[l]=new fn(u),l==="opacity"&&(u=ot(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new fn(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function ZN(t,e,r){var n;W(r,function(i){e.hasOwnProperty(i)&&fD(e[i])&&(n=!0)}),n&&W(r,function(i){e.hasOwnProperty(i)&&fD(e[i])?t[i]=ot(e[i]):delete t[i]})}function pbe(t,e,r,n,i,a){var o={};W(t,function(c){var f=fn.prepareVisualTypes(e[c]);o[c]=f});var s;function l(c){return sw(r,s,c)}function u(c,f){cR(r,s,c,f)}a==null?r.each(h):r.each([a],h);function h(c,f){s=a==null?c:f;var d=r.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var v=n.call(i,c),g=e[v],m=o[v],y=0,b=m.length;ye[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&mD(e)}};function mD(t){return new St(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Sbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.ecModel=r,this.api=n,this.model,(this._brushController=new Xw(n.getZr())).on("brush",Ge(this._onBrush,this)).mount()},e.prototype.render=function(r,n,i,a){this.model=r,this._updateController(r,n,i,a)},e.prototype.updateTransform=function(r,n,i,a){jN(n),this._updateController(r,n,i,a)},e.prototype.updateVisual=function(r,n,i,a){this.updateTransform(r,n,i,a)},e.prototype.updateView=function(r,n,i,a){this._updateController(r,n,i,a)},e.prototype._updateController=function(r,n,i,a){(!a||a.$from!==r.id)&&this._brushController.setPanels(r.brushTargetManager.makePanelOpts(i)).enableBrush(r.brushOption).updateCovers(r.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(r){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(r.areas,this.ecModel);(!r.isEnd||r.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:ot(i),$from:n}),r.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:ot(i),$from:n})},e.type="brush",e}(Cr);const wbe=Sbe;var Cbe="#ddd",Abe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.areas=[],r.brushOption={},r}return e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&ZN(i,r,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:Cbe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(r){r&&(this.areas=Ce(r,function(n){return yD(this.option,n)},this))},e.prototype.setBrushOption=function(r){this.brushOption=yD(this.option,r),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Nt);function yD(t,e){return bt({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ur(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}const Tbe=Abe;var kbe=["rect","polygon","lineX","lineY","keep","clear"],Dbe=function(t){pe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(r,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,W(r.get("type",!0),function(l){r.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(r,n,i){this.render(r,n,i)},e.prototype.getIcons=function(){var r=this.model,n=r.get("icon",!0),i={};return W(r.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(r,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(r){var n={show:!0,type:kbe.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:r.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Gi);const Mbe=Dbe;function Lbe(t){t.registerComponentView(wbe),t.registerComponentModel(Tbe),t.registerPreprocessor(fbe),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,mbe),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,r){r.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ir),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ir),Sc("brush",Mbe)}var Ebe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode={type:"box",ignoreSize:!0},r}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Nt),Ibe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.render=function(r,n,i){if(this.group.removeAll(),!!r.get("show")){var a=this.group,o=r.getModel("textStyle"),s=r.getModel("subtextStyle"),l=r.get("textAlign"),u=xt(r.get("textBaseline"),r.get("textVerticalAlign")),h=new Vt({style:lr(o,{text:r.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=h.getBoundingRect(),f=r.get("subtext"),d=new Vt({style:lr(s,{text:f,fill:s.getTextColor(),y:c.height+r.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),v=r.get("link"),g=r.get("sublink"),m=r.get("triggerEvent",!0);h.silent=!v&&!m,d.silent=!g&&!m,v&&h.on("click",function(){V1(v,"_"+r.get("target"))}),g&&d.on("click",function(){V1(g,"_"+r.get("subtarget"))}),dt(h).eventData=dt(d).eventData=m?{componentType:"title",componentIndex:r.componentIndex}:null,a.add(h),f&&a.add(d);var y=a.getBoundingRect(),b=r.getBoxLayoutParams();b.width=y.width,b.height=y.height;var w=$r(b,{width:i.getWidth(),height:i.getHeight()},r.get("padding"));l||(l=r.get("left")||r.get("right"),l==="middle"&&(l="center"),l==="right"?w.x+=w.width:l==="center"&&(w.x+=w.width/2)),u||(u=r.get("top")||r.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?w.y+=w.height:u==="middle"&&(w.y+=w.height/2),u=u||"top"),a.x=w.x,a.y=w.y,a.markRedraw();var T={align:l,verticalAlign:u};h.setStyle(T),d.setStyle(T),y=a.getBoundingRect();var M=w.margin,D=r.getItemStyle(["color","opacity"]);D.fill=r.get("backgroundColor");var P=new Rt({shape:{x:y.x-M[3],y:y.y-M[0],width:y.width+M[1]+M[3],height:y.height+M[0]+M[2],r:r.get("borderRadius")},style:D,subPixelOptimize:!0,silent:!0});a.add(P)}},e.type="title",e}(Cr);function Bbe(t){t.registerComponentModel(Ebe),t.registerComponentView(Ibe)}var Pbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.layoutMode="box",r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i),this._initData()},e.prototype.mergeOption=function(r){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(r){r==null&&(r=this.option.currentIndex);var n=this._data.count();this.option.loop?r=(r%n+n)%n:(r>=n&&(r=n-1),r<0&&(r=0)),this.option.currentIndex=r},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(r){this.option.autoPlay=!!r},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var r=this.option,n=r.data||[],i=r.axisType,a=this._names=[],o;i==="category"?(o=[],W(n,function(u,h){var c=Vr(tf(u),""),f;nt(u)?(f=ot(u),f.value=h):f=h,o.push(f),a.push(c)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new qn([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Nt);const _D=Pbe;var KN=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline.slider",e.defaultOption=gl(_D.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(_D);Or(KN,nw.prototype);const Rbe=KN;var Fbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="timeline",e}(Cr);const Obe=Fbe;var Nbe=function(t){pe(e,t);function e(r,n,i,a){var o=t.call(this,r,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Aa);const zbe=Nbe;var Jb=Math.PI,xD=Ft(),Vbe=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(r,n){this.api=n},e.prototype.render=function(r,n,i){if(this.model=r,this.api=i,this.ecModel=n,this.group.removeAll(),r.get("show",!0)){var a=this._layout(r,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,r);r.formatTooltip=function(u){var h=l.scale.getLabel({value:u});return Zr("nameValue",{noName:!0,value:h})},W(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,r)},this),this._renderAxisLabel(a,s,l,r),this._position(a,r)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(r,n){var i=r.get(["label","position"]),a=r.get("orient"),o=Gbe(r,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:Jb/2},c=a==="vertical"?o.height:o.width,f=r.getModel("controlStyle"),d=f.get("show",!0),v=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,m=v+g,y=r.get(["label","rotate"])||0;y=y*Jb/180;var b,w,T,M=f.get("position",!0),D=d&&f.get("showPlayBtn",!0),P=d&&f.get("showPrevBtn",!0),O=d&&f.get("showNextBtn",!0),V=0,$=c;M==="left"||M==="bottom"?(D&&(b=[0,0],V+=m),P&&(w=[V,0],V+=m),O&&(T=[$-v,0],$-=m)):(D&&(b=[$-v,0],$-=m),P&&(w=[0,0],V+=m),O&&(T=[$-v,0],$-=m));var H=[V,$];return r.get("inverse")&&H.reverse(),{viewRect:o,mainLength:c,orient:a,rotation:h[a],labelRotation:y,labelPosOpt:s,labelAlign:r.get(["label","align"])||l[a],labelBaseline:r.get(["label","verticalAlign"])||r.get(["label","baseline"])||u[a],playPosition:b,prevBtnPosition:w,nextBtnPosition:T,axisExtent:H,controlSize:v,controlGap:g}},e.prototype._position=function(r,n){var i=this._mainGroup,a=this._labelGroup,o=r.viewRect;if(r.orient==="vertical"){var s=Zi(),l=o.x,u=o.y+o.height;lo(s,s,[-l,-u]),nh(s,s,-Jb/2),lo(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var h=b(o),c=b(i.getBoundingRect()),f=b(a.getBoundingRect()),d=[i.x,i.y],v=[a.x,a.y];v[0]=d[0]=h[0][0];var g=r.labelPosOpt;if(g==null||ze(g)){var m=g==="+"?0:1;w(d,c,h,1,m),w(v,f,h,1,1-m)}else{var m=g>=0?0:1;w(d,c,h,1,m),v[1]=d[1]+g}i.setPosition(d),a.setPosition(v),i.rotation=a.rotation=r.rotation,y(i),y(a);function y(T){T.originX=h[0][0]-T.x,T.originY=h[1][0]-T.y}function b(T){return[[T.x,T.x+T.width],[T.y,T.y+T.height]]}function w(T,M,D,P,O){T[P]+=D[P][O]-M[P][O]}},e.prototype._createAxis=function(r,n){var i=n.getData(),a=n.get("axisType"),o=$be(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new zbe("value",o,r.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(r){var n=this[r]=new st;return this.group.add(n),n},e.prototype._renderAxisLine=function(r,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new en({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:xe({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new en({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:rt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(r,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],W(l,function(u){var h=i.dataToCoord(u.value),c=s.getItemModel(u.value),f=c.getModel("itemStyle"),d=c.getModel(["emphasis","itemStyle"]),v=c.getModel(["progress","itemStyle"]),g={x:h,y:0,onclick:Ge(o._changeTimeline,o,u.value)},m=bD(c,f,n,g);m.ensureState("emphasis").style=d.getItemStyle(),m.ensureState("progress").style=v.getItemStyle(),zu(m);var y=dt(m);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=a):y.dataIndex=y.dataModel=null,o._tickSymbols.push(m)})},e.prototype._renderAxisLabel=function(r,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],W(u,function(h){var c=h.tickValue,f=l.getItemModel(c),d=f.getModel("label"),v=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),m=i.dataToCoord(h.tickValue),y=new Vt({x:m,y:0,rotation:r.labelRotation-r.rotation,onclick:Ge(o._changeTimeline,o,c),silent:!1,style:lr(d,{text:h.formattedLabel,align:r.labelAlign,verticalAlign:r.labelBaseline})});y.ensureState("emphasis").style=lr(v),y.ensureState("progress").style=lr(g),n.add(y),zu(y),xD(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(r,n,i,a){var o=r.controlSize,s=r.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),h=a.getPlayState(),c=a.get("inverse",!0);f(r.nextBtnPosition,"next",Ge(this._changeTimeline,this,c?"-":"+")),f(r.prevBtnPosition,"prev",Ge(this._changeTimeline,this,c?"+":"-")),f(r.playPosition,h?"stop":"play",Ge(this._handlePlayClick,this,!h),!0);function f(d,v,g,m){if(d){var y=xa(xt(a.get(["controlStyle",v+"BtnSize"]),o),o),b=[0,-y/2,y,y],w=Hbe(a,v+"Icon",b,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:m?-s:0,rectHover:!0,style:l,onclick:g});w.ensureState("emphasis").style=u,n.add(w),zu(w)}}},e.prototype._renderCurrentPointer=function(r,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,h={onCreate:function(c){c.draggable=!0,c.drift=Ge(u._handlePointerDrag,u),c.ondragend=Ge(u._handlePointerDragend,u),SD(c,u._progressLine,s,i,a,!0)},onUpdate:function(c){SD(c,u._progressLine,s,i,a)}};this._currentPointer=bD(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(r){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:r,from:this.uid})},e.prototype._handlePointerDrag=function(r,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(r){this._pointerChangeTimeline([r.offsetX,r.offsetY],!0)},e.prototype._pointerChangeTimeline=function(r,n){var i=this._toAxisCoord(r)[0],a=this._axis,o=Wi(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[a]=+o[a].toFixed(f)),[o,c]}var Qb={min:pt(am,"min"),max:pt(am,"max"),average:pt(am,"average"),median:pt(am,"median")};function op(t,e){if(e){var r=t.getData(),n=t.coordinateSystem,i=n&&n.dimensions;if(!Kbe(e)&&!Se(e.coord)&&Se(i)){var a=QN(e,r,n,t);if(e=ot(e),e.type&&Qb[e.type]&&a.baseAxis&&a.valueAxis){var o=Ct(i,a.baseAxis.dim),s=Ct(i,a.valueAxis.dim),l=Qb[e.type](r,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!Se(i))e.coord=[];else for(var u=e.coord,h=0;h<2;h++)Qb[u[h]]&&(u[h]=y6(r,r.mapDimension(i[h]),u[h]));return e}}function QN(t,e,r,n){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(Jbe(n,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function Jbe(t,e){var r=t.getData().getDimensionInfo(e);return r&&r.coordDim}function sp(t,e){return t&&t.containData&&e.coord&&!S3(e)?t.containData(e.coord):!0}function Qbe(t,e,r){return t&&t.containZone&&e.coord&&r.coord&&!S3(e)&&!S3(r)?t.containZone(e.coord,r.coord):!0}function ez(t,e){return t?function(r,n,i,a){var o=a<2?r.coord&&r.coord[a]:r.value;return tl(o,e[a])}:function(r,n,i,a){return tl(r.value,e[a])}}function y6(t,e,r){if(r==="average"){var n=0,i=0;return t.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return r==="median"?t.getMedian(e):t.getDataExtent(e)[r==="max"?1:0]}var e4=Ft(),e4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.init=function(){this.markerGroupMap=Ye()},e.prototype.render=function(r,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){e4(s).keep=!1}),n.eachSeries(function(s){var l=pl.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!e4(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(r){e4(r).keep=!0},e.prototype.toggleBlurSeries=function(r,n){var i=this;W(r,function(a){var o=pl.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?kB(l):OS(l))})}})},e.type="marker",e}(Cr);const _6=e4e;function CD(t,e,r){var n=e.coordinateSystem;t.each(function(i){var a=t.getItemModel(i),o,s=Be(a.get("x"),r.getWidth()),l=Be(a.get("y"),r.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(n){var u=t.get(n.dimensions[0],i),h=t.get(n.dimensions[1],i);o=n.dataToPoint([u,h])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(i,o)})}var t4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=pl.getMarkerModelFromSeries(a,"markPoint");o&&(CD(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Dp),c=r4e(o,r,n);n.setData(c),CD(n.getData(),r,a),c.each(function(f){var d=c.getItemModel(f),v=d.getShallow("symbol"),g=d.getShallow("symbolSize"),m=d.getShallow("symbolRotate"),y=d.getShallow("symbolOffset"),b=d.getShallow("symbolKeepAspect");if(Je(v)||Je(g)||Je(m)||Je(y)){var w=n.getRawValue(f),T=n.getDataParams(f);Je(v)&&(v=v(w,T)),Je(g)&&(g=g(w,T)),Je(m)&&(m=m(w,T)),Je(y)&&(y=y(w,T))}var M=d.getModel("itemStyle").getItemStyle(),D=wp(l,"color");M.fill||(M.fill=D),c.setItemVisual(f,{symbol:v,symbolSize:g,symbolRotate:m,symbolOffset:y,symbolKeepAspect:b,style:M})}),h.updateData(c),this.group.add(h.group),c.eachItemGraphicEl(function(f){f.traverse(function(d){dt(d).dataModel=n})}),this.markKeep(h),h.group.silent=n.get("silent")||r.get("silent")},e.type="markPoint",e}(_6);function r4e(t,e,r){var n;t?n=Ce(t&&t.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return xe(xe({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new qn(n,r),a=Ce(r.get("data"),pt(op,e));t&&(a=Jt(a,pt(sp,t)));var o=ez(!!t,n);return i.initData(a,null,o),i}const n4e=t4e;function i4e(t){t.registerComponentModel(jbe),t.registerComponentView(n4e),t.registerPreprocessor(function(e){m6(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var a4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(pl);const o4e=a4e;var om=Ft(),s4e=function(t,e,r,n){var i=t.getData(),a;if(Se(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Qr(n.yAxis,n.xAxis);else{var u=QN(n,i,e,t);s=u.valueAxis;var h=VR(i,u.valueDataDim);l=y6(i,h,o)}var c=s.dim==="x"?0:1,f=1-c,d=ot(n),v={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,v.coord[f]=1/0;var g=r.get("precision");g>=0&&$t(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[c]=v.coord[c]=l,a=[d,v,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var m=[op(t,a[0]),op(t,a[1]),xe({},a[2])];return m[2].type=m[2].type||null,bt(m[2],m[0]),bt(m[2],m[1]),m};function fy(t){return!isNaN(t)&&!isFinite(t)}function AD(t,e,r,n){var i=1-t,a=n.dimensions[t];return fy(e[i])&&fy(r[i])&&e[t]===r[t]&&n.getAxis(a).containData(e[t])}function l4e(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,n=e[1].coord;if(r&&n&&(AD(1,r,n,t)||AD(0,r,n,t)))return!0}return sp(t,e[0])&&sp(t,e[1])}function t4(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=Be(o.get("x"),i.getWidth()),u=Be(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),f=t.get(h[1],e);s=a.dataToPoint([c,f])}if(sh(a,"cartesian2d")){var d=a.getAxis("x"),v=a.getAxis("y"),h=a.dimensions;fy(t.get(h[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[r?0:1]):fy(t.get(h[1],e))&&(s[1]=v.toGlobalCoord(v.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}var u4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=pl.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=om(o).from,u=om(o).to;l.each(function(h){t4(l,h,!0,a,i),t4(u,h,!1,a,i)}),s.each(function(h){s.setItemLayout(h,[l.getItemLayout(h),u.getItemLayout(h)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,new Gw);this.group.add(h.group);var c=h4e(o,r,n),f=c.from,d=c.to,v=c.line;om(n).from=f,om(n).to=d,n.setData(v);var g=n.get("symbol"),m=n.get("symbolSize"),y=n.get("symbolRotate"),b=n.get("symbolOffset");Se(g)||(g=[g,g]),Se(m)||(m=[m,m]),Se(y)||(y=[y,y]),Se(b)||(b=[b,b]),c.from.each(function(T){w(f,T,!0),w(d,T,!1)}),v.each(function(T){var M=v.getItemModel(T).getModel("lineStyle").getLineStyle();v.setItemLayout(T,[f.getItemLayout(T),d.getItemLayout(T)]),M.stroke==null&&(M.stroke=f.getItemVisual(T,"style").fill),v.setItemVisual(T,{fromSymbolKeepAspect:f.getItemVisual(T,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(T,"symbolOffset"),fromSymbolRotate:f.getItemVisual(T,"symbolRotate"),fromSymbolSize:f.getItemVisual(T,"symbolSize"),fromSymbol:f.getItemVisual(T,"symbol"),toSymbolKeepAspect:d.getItemVisual(T,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(T,"symbolOffset"),toSymbolRotate:d.getItemVisual(T,"symbolRotate"),toSymbolSize:d.getItemVisual(T,"symbolSize"),toSymbol:d.getItemVisual(T,"symbol"),style:M})}),h.updateData(v),c.line.eachItemGraphicEl(function(T){dt(T).dataModel=n,T.traverse(function(M){dt(M).dataModel=n})});function w(T,M,D){var P=T.getItemModel(M);t4(T,M,D,r,a);var O=P.getModel("itemStyle").getItemStyle();O.fill==null&&(O.fill=wp(l,"color")),T.setItemVisual(M,{symbolKeepAspect:P.get("symbolKeepAspect"),symbolOffset:xt(P.get("symbolOffset",!0),b[D?0:1]),symbolRotate:xt(P.get("symbolRotate",!0),y[D?0:1]),symbolSize:xt(P.get("symbolSize"),m[D?0:1]),symbol:xt(P.get("symbol",!0),g[D?0:1]),style:O})}this.markKeep(h),h.group.silent=n.get("silent")||r.get("silent")},e.type="markLine",e}(_6);function h4e(t,e,r){var n;t?n=Ce(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return xe(xe({},h),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new qn(n,r),a=new qn(n,r),o=new qn([],r),s=Ce(r.get("data"),pt(s4e,e,t,r));t&&(s=Jt(s,pt(l4e,t)));var l=ez(!!t,n);return i.initData(Ce(s,function(u){return u[0]}),null,l),a.initData(Ce(s,function(u){return u[1]}),null,l),o.initData(Ce(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}const c4e=u4e;function f4e(t){t.registerComponentModel(o4e),t.registerComponentView(c4e),t.registerPreprocessor(function(e){m6(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var d4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.createMarkerModelFromSeries=function(r,n,i){return new e(r,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(pl);const p4e=d4e;var sm=Ft(),v4e=function(t,e,r,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=op(t,i),s=op(t,a),l=o.coord,u=s.coord;l[0]=Qr(l[0],-1/0),l[1]=Qr(l[1],-1/0),u[0]=Qr(u[0],1/0),u[1]=Qr(u[1],1/0);var h=_S([{},o,s]);return h.coord=[o.coord,s.coord],h.x0=o.x,h.y0=o.y,h.x1=s.x,h.y1=s.y,h}};function dy(t){return!isNaN(t)&&!isFinite(t)}function TD(t,e,r,n){var i=1-t;return dy(e[i])&&dy(r[i])}function g4e(t,e){var r=e.coord[0],n=e.coord[1],i={coord:r,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return sh(t,"cartesian2d")?r&&n&&(TD(1,r,n)||TD(0,r,n))?!0:Qbe(t,i,a):sp(t,i)||sp(t,a)}function kD(t,e,r,n,i){var a=n.coordinateSystem,o=t.getItemModel(e),s,l=Be(o.get(r[0]),i.getWidth()),u=Be(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var h=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),f=a.clampData(h),d=a.clampData(c),v=[];r[0]==="x0"?v[0]=f[0]>d[0]?c[0]:h[0]:v[0]=f[0]>d[0]?h[0]:c[0],r[1]==="y0"?v[1]=f[1]>d[1]?c[1]:h[1]:v[1]=f[1]>d[1]?h[1]:c[1],s=n.getMarkerPosition(v,r,!0)}else{var g=t.get(r[0],e),m=t.get(r[1],e),y=[g,m];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(sh(a,"cartesian2d")){var b=a.getAxis("x"),w=a.getAxis("y"),g=t.get(r[0],e),m=t.get(r[1],e);dy(g)?s[0]=b.toGlobalCoord(b.getExtent()[r[0]==="x0"?0:1]):dy(m)&&(s[1]=w.toGlobalCoord(w.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var DD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],m4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.updateTransform=function(r,n,i){n.eachSeries(function(a){var o=pl.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Ce(DD,function(c){return kD(s,l,c,a,i)});s.setItemLayout(l,u);var h=s.getItemGraphicEl(l);h.setShape("points",u)})}},this)},e.prototype.renderSeries=function(r,n,i,a){var o=r.coordinateSystem,s=r.id,l=r.getData(),u=this.markerGroupMap,h=u.get(s)||u.set(s,{group:new st});this.group.add(h.group),this.markKeep(h);var c=y4e(o,r,n);n.setData(c),c.each(function(f){var d=Ce(DD,function(O){return kD(c,f,O,r,a)}),v=o.getAxis("x").scale,g=o.getAxis("y").scale,m=v.getExtent(),y=g.getExtent(),b=[v.parse(c.get("x0",f)),v.parse(c.get("x1",f))],w=[g.parse(c.get("y0",f)),g.parse(c.get("y1",f))];Wi(b),Wi(w);var T=!(m[0]>b[1]||m[1]w[1]||y[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Nt);const w3=S4e;var dc=pt,C3=W,lm=st,w4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.newlineDisabled=!1,r}return e.prototype.init=function(){this.group.add(this._contentGroup=new lm),this.group.add(this._selectorGroup=new lm),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(r,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!r.get("show",!0)){var o=r.get("align"),s=r.get("orient");(!o||o==="auto")&&(o=r.get("left")==="right"&&s==="vertical"?"right":"left");var l=r.get("selector",!0),u=r.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,r,n,i,l,s,u);var h=r.getBoxLayoutParams(),c={width:i.getWidth(),height:i.getHeight()},f=r.get("padding"),d=$r(h,c,f),v=this.layoutInner(r,o,d,a,l,u),g=$r(rt({width:v.width,height:v.height},h),c,f);this.group.x=g.x-v.x,this.group.y=g.y-v.y,this.group.markRedraw(),this.group.add(this._backgroundEl=GN(v,r))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this.getContentGroup(),h=Ye(),c=n.get("selectedMode"),f=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&f.push(d.id)}),C3(n.getData(),function(d,v){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var m=new lm;m.newline=!0,u.add(m);return}var y=i.getSeriesByName(g)[0];if(!h.get(g))if(y){var b=y.getData(),w=b.getVisual("legendLineStyle")||{},T=b.getVisual("legendIcon"),M=b.getVisual("style"),D=this._createItem(y,g,v,d,n,r,w,M,T,c,a);D.on("click",dc(MD,g,null,a,f)).on("mouseover",dc(A3,y.name,null,a,f)).on("mouseout",dc(T3,y.name,null,a,f)),h.set(g,!0)}else i.eachRawSeries(function(P){if(!h.get(g)&&P.legendVisualProvider){var O=P.legendVisualProvider;if(!O.containName(g))return;var V=O.indexOfName(g),$=O.getItemVisual(V,"style"),H=O.getItemVisual(V,"legendIcon"),j=bi($.fill);j&&j[3]===0&&(j[3]=.2,$=xe(xe({},$),{fill:Uo(j,"rgba")}));var q=this._createItem(P,g,v,d,n,r,{},$,H,c,a);q.on("click",dc(MD,null,g,a,f)).on("mouseover",dc(A3,null,g,a,f)).on("mouseout",dc(T3,null,g,a,f)),h.set(g,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();C3(r,function(u){var h=u.type,c=new Vt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:h==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);pn(c,{normal:f,emphasis:d},{defaultText:u.title}),zu(c)})},e.prototype._createItem=function(r,n,i,a,o,s,l,u,h,c,f){var d=r.visualDrawType,v=o.get("itemWidth"),g=o.get("itemHeight"),m=o.isSelected(n),y=a.get("symbolRotate"),b=a.get("symbolKeepAspect"),w=a.get("icon");h=w||h||"roundRect";var T=C4e(h,a,l,u,d,m,f),M=new lm,D=a.getModel("textStyle");if(Je(r.getLegendIcon)&&(!w||w==="inherit"))M.add(r.getLegendIcon({itemWidth:v,itemHeight:g,icon:h,iconRotate:y,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:b}));else{var P=w==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;M.add(A4e({itemWidth:v,itemHeight:g,icon:h,iconRotate:P,itemStyle:T.itemStyle,lineStyle:T.lineStyle,symbolKeepAspect:b}))}var O=s==="left"?v+5:-5,V=s,$=o.get("formatter"),H=n;ze($)&&$?H=$.replace("{name}",n??""):Je($)&&(H=$(n));var j=m?D.getTextColor():a.get("inactiveColor");M.add(new Vt({style:lr(D,{text:H,x:O,y:g/2,fill:j,align:V,verticalAlign:"middle"},{inheritColor:j})}));var q=new Rt({shape:M.getBoundingRect(),invisible:!0}),G=a.getModel("tooltip");return G.get("show")&&af({el:q,componentModel:o,itemName:n,itemTooltipOption:G.option}),M.add(q),M.eachChild(function(J){J.silent=!0}),q.silent=!c,this.getContentGroup().add(M),zu(M),M.__legendDataIndex=i,M},e.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();$u(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var h=l.getBoundingRect(),c=[-h.x,-h.y];if(u.markRedraw(),l.markRedraw(),o){$u("horizontal",u,r.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],v=r.get("selectorButtonGap",!0),g=r.getOrient().index,m=g===0?"width":"height",y=g===0?"height":"width",b=g===0?"y":"x";s==="end"?d[g]+=h[m]+v:c[g]+=f[m]+v,d[1-g]+=h[y]/2-f[y]/2,u.x=d[0],u.y=d[1],l.x=c[0],l.y=c[1];var w={x:0,y:0};return w[m]=h[m]+v+f[m],w[y]=Math.max(h[y],f[y]),w[b]=Math.min(0,f[b]+d[1-g]),w}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Cr);function C4e(t,e,r,n,i,a,o){function s(m,y){m.lineWidth==="auto"&&(m.lineWidth=y.lineWidth>0?2:0),C3(m,function(b,w){m[w]==="inherit"&&(m[w]=y[w])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=t.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:Wc(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[h]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(s(d,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var v=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth=v==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function A4e(t){var e=t.icon||"roundRect",r=Fr(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);return r.setStyle(t.itemStyle),r.rotation=(t.iconRotate||0)*Math.PI/180,r.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function MD(t,e,r,n){T3(t,e,r,n),r.dispatchAction({type:"legendToggleSelect",name:t??e}),A3(t,e,r,n)}function tz(t){for(var e=t.getZr().storage.getDisplayList(),r,n=0,i=e.length;ni[o],m=[-d.x,-d.y];n||(m[a]=h[u]);var y=[0,0],b=[-v.x,-v.y],w=xt(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var T=r.get("pageButtonPosition",!0);T==="end"?b[a]+=i[o]-v[o]:y[a]+=v[o]+w}b[1-a]+=d[s]/2-v[s]/2,h.setPosition(m),c.setPosition(y),f.setPosition(b);var M={x:0,y:0};if(M[o]=g?i[o]:d[o],M[s]=Math.max(d[s],v[s]),M[l]=Math.min(0,v[l]+b[1-a]),c.__rectSize=i[o],g){var D={x:0,y:0};D[o]=Math.max(i[o]-v[o]-w,0),D[s]=M[s],c.setClipPath(new Rt({shape:D})),c.__rectSize=D[o]}else f.eachChild(function(O){O.attr({invisible:!0,silent:!0})});var P=this._getPageInfo(r);return P.pageIndex!=null&&Gt(h,{x:P.contentPosition[0],y:P.contentPosition[1]},g?r:null),this._updatePageInfoView(r,P),M},e.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;W(["pagePrev","pageNext"],function(h){var c=h+"DataIndex",f=n[c]!=null,d=i.childOfName(h);d&&(d.setStyle("fill",f?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",ze(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(r){var n=r.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=r.getOrient().index,s=r4[o],l=n4[o],u=this._findTargetItemIndex(n),h=i.children(),c=h[u],f=h.length,d=f?1:0,v={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return v;var g=T(c);v.contentPosition[o]=-g.s;for(var m=u+1,y=g,b=g,w=null;m<=f;++m)w=T(h[m]),(!w&&b.e>y.s+a||w&&!M(w,y.s))&&(b.i>y.i?y=b:y=w,y&&(v.pageNextDataIndex==null&&(v.pageNextDataIndex=y.i),++v.pageCount)),b=w;for(var m=u-1,y=g,b=g,w=null;m>=-1;--m)w=T(h[m]),(!w||!M(b,w.s))&&y.i=P&&D.s<=P+a}},e.prototype._findTargetItemIndex=function(r){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===r&&(n=s)}),n??a},e.type="legend.scroll",e}(rz);const E4e=L4e;function I4e(t){t.registerAction("legendScroll","legendscroll",function(e,r){var n=e.scrollDataIndex;n!=null&&r.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function B4e(t){At(nz),t.registerComponentModel(M4e),t.registerComponentView(E4e),I4e(t)}function P4e(t){At(nz),At(B4e)}var R4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.inside",e.defaultOption=gl(ap.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(ap);const F4e=R4e;var x6=Ft();function O4e(t,e,r){x6(t).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=r)})}function N4e(t,e){for(var r=x6(t).coordSysRecordMap,n=r.keys(),i=0;in[r+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function H4e(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(e,r){var n=x6(r),i=n.coordSysRecordMap||(n.coordSysRecordMap=Ye());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=zN(a);W(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,z4e(r,s.model)),h=u.dataZoomInfoMap||(u.dataZoomInfoMap=Ye());h.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){iz(i,a);return}var h=G4e(l);o.enable(h.controlType,h.opt),o.setPointerChecker(a.containsPoint),df(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var q4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type="dataZoom.inside",r}return e.prototype.render=function(r,n,i){if(t.prototype.render.apply(this,arguments),r.noTarget()){this._clear();return}this.range=r.getPercentRange(),O4e(i,r,{pan:Ge(i4.pan,this),zoom:Ge(i4.zoom,this),scrollMove:Ge(i4.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){N4e(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(c6),i4={zoom:function(t,e,r,n){var i=this.range,a=i.slice(),o=t.axisModels[0];if(o){var s=a4[e](null,[n.originX,n.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(uh(0,a,[0,100],0,h.minSpan,h.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:ID(function(t,e,r,n,i,a){var o=a4[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:ID(function(t,e,r,n,i,a){var o=a4[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*a.scrollDelta})};function ID(t){return function(e,r,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,r,n,i);if(uh(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var a4={grid:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],a.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,r,n,i){var a=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,r,n,i){var a=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};const W4e=q4e;function az(t){f6(t),t.registerComponentModel(F4e),t.registerComponentView(W4e),H4e(t)}var U4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=gl(ap.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(ap);const Y4e=U4e;var E0=Rt,BD=7,X4e=1,o4=30,Z4e=7,I0="horizontal",PD="vertical",j4e=5,K4e=["line","bar","candlestick","scatter"],J4e={easing:"cubicOut",duration:100,delay:0},Q4e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._displayables={},r}return e.prototype.init=function(r,n){this.api=n,this._onBrush=Ge(this._onBrush,this),this._onBrushEnd=Ge(this._onBrushEnd,this)},e.prototype.render=function(r,n,i,a){if(t.prototype.render.apply(this,arguments),df(this,"_dispatchZoomAction",r.get("throttle"),"fixRate"),this._orient=r.getOrient(),r.get("show")===!1){this.group.removeAll();return}if(r.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Yd(this,"_dispatchZoomAction");var r=this.api.getZr();r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var r=this.group;r.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new st;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),r.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var r=this.dataZoomModel,n=this.api,i=r.get("brushSelect"),a=i?Z4e:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===I0?{right:s.width-o.x-o.width,top:s.height-o4-BD-a,width:o.width,height:o4}:{right:BD,top:o.y,width:o4,height:o.height},u=uf(r.option);W(["right","top","width","height"],function(c){u[c]==="ph"&&(u[c]=l[c])});var h=$r(u,s);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===PD&&this._size.reverse()},e.prototype._positionGroup=function(){var r=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===I0&&!o?{scaleY:l?1:-1,scaleX:1}:i===I0&&o?{scaleY:l?1:-1,scaleX:-1}:i===PD&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=r.getBoundingRect([s]);r.x=n.x-u.x,r.y=n.y-u.y,r.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var r=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=r.get("brushSelect");i.add(new E0({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:r.get("backgroundColor")},z2:-40}));var o=new E0({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Ge(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var r=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!r)return;var n=this._size,i=this._shadowSize||[],a=r.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():r.otherDim;if(l==null)return;var u=this._shadowPolygonPts,h=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var c=o.getDataExtent(l),f=(c[1]-c[0])*.3;c=[c[0]-f,c[1]+f];var d=[0,n[1]],v=[0,n[0]],g=[[n[0],0],[0,0]],m=[],y=v[1]/(o.count()-1),b=0,w=Math.round(o.count()/n[0]),T;o.each([l],function(V,$){if(w>0&&$%w){b+=y;return}var H=V==null||isNaN(V)||V==="",j=H?0:jt(V,c,d,!0);H&&!T&&$?(g.push([g[g.length-1][0],0]),m.push([m[m.length-1][0],0])):!H&&T&&(g.push([b,0]),m.push([b,0])),g.push([b,j]),m.push([b,j]),b+=y,T=H}),u=this._shadowPolygonPts=g,h=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var M=this.dataZoomModel;function D(V){var $=M.getModel(V?"selectedDataBackground":"dataBackground"),H=new st,j=new ui({shape:{points:u},segmentIgnoreThreshold:1,style:$.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),q=new hi({shape:{points:h},segmentIgnoreThreshold:1,style:$.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return H.add(j),H.add(q),H}for(var P=0;P<3;P++){var O=D(P===1);this._displayables.sliderGroup.add(O),this._displayables.dataShadowSegs.push(O)}},e.prototype._prepareDataShadowInfo=function(){var r=this.dataZoomModel,n=r.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return r.eachTargetAxis(function(o,s){var l=r.getAxisProxy(o,s).getTargetSeriesModels();W(l,function(u){if(!i&&!(n!==!0&&Ct(K4e,u.get("type"))<0)){var h=a.getComponent(js(o),s).axis,c=e5e(o),f,d=u.coordinateSystem;c!=null&&d.getOtherAxis&&(f=d.getOtherAxis(h).inverse),c=u.getData().mapDimension(c),i={thisAxis:h,series:u,thisDim:o,otherDim:c,otherAxisInverse:f}}},this)},this),i}},e.prototype._renderHandle=function(){var r=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,c=l.get("brushSelect"),f=n.filler=new E0({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new E0({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:X4e,fill:"rgba(0,0,0,0)"}})),W([0,1],function(w){var T=l.get("handleIcon");!H1[T]&&T.indexOf("path://")<0&&T.indexOf("image://")<0&&(T="path://"+T);var M=Fr(T,-1,0,2,2,null,!0);M.attr({cursor:RD(this._orient),draggable:!0,drift:Ge(this._onDragMove,this,w),ondragend:Ge(this._onDragEnd,this),onmouseover:Ge(this._showDataInfo,this,!0),onmouseout:Ge(this._showDataInfo,this,!1),z2:5});var D=M.getBoundingRect(),P=l.get("handleSize");this._handleHeight=Be(P,this._size[1]),this._handleWidth=D.width/D.height*this._handleHeight,M.setStyle(l.getModel("handleStyle").getItemStyle()),M.style.strokeNoScale=!0,M.rectHover=!0,M.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),zu(M);var O=l.get("handleColor");O!=null&&(M.style.fill=O),o.add(i[w]=M);var V=l.getModel("textStyle");r.add(a[w]=new Vt({silent:!0,invisible:!0,style:lr(V,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:V.getTextColor(),font:V.getFont()}),z2:10}))},this);var d=f;if(c){var v=Be(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Rt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:v}}),m=v*.8,y=n.moveHandleIcon=Fr(l.get("moveHandleIcon"),-m/2,-m/2,m,m,"#fff",!0);y.silent=!0,y.y=s[1]+v/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var b=Math.min(s[1]/2,Math.max(v,10));d=n.moveZone=new Rt({invisible:!0,shape:{y:s[1]-b,height:v+b}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(d)}d.attr({draggable:!0,cursor:RD(this._orient),drift:Ge(this._onDragMove,this,"all"),ondragstart:Ge(this._showDataInfo,this,!0),ondragend:Ge(this._onDragEnd,this),onmouseover:Ge(this._showDataInfo,this,!0),onmouseout:Ge(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var r=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[jt(r[0],[0,100],n,!0),jt(r[1],[0,100],n,!0)]},e.prototype._updateInterval=function(r,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];uh(n,a,o,i.get("zoomLock")?"all":r,s.minSpan!=null?jt(s.minSpan,l,o,!0):null,s.maxSpan!=null?jt(s.maxSpan,l,o,!0):null);var u=this._range,h=this._range=Wi([jt(a[0],o,l,!0),jt(a[1],o,l,!0)]);return!u||u[0]!==h[0]||u[1]!==h[1]},e.prototype._updateView=function(r){var n=this._displayables,i=this._handleEnds,a=Wi(i.slice()),o=this._size;W([0,1],function(d){var v=n.handles[d],g=this._handleHeight;v.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],h=0;hn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(r){var n=r.offsetX,i=r.offsetY;this._brushStart=new _t(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(r){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Wi([jt(i.x,o,s,!0),jt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(r){this._brushing&&(Ko(r.event),this._updateBrushRect(r.offsetX,r.offsetY))},e.prototype._updateBrushRect=function(r,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new E0({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(r,n),h=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:h[0],y:0,width:u[0]-h[0],height:c[1]})},e.prototype._dispatchZoomAction=function(r){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:r?J4e:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var r,n=zN(this.dataZoomModel).infoList;if(!r&&n.length){var i=n[0].model.coordinateSystem;r=i.getRect&&i.getRect()}if(!r){var a=this.api.getWidth(),o=this.api.getHeight();r={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return r},e.type="dataZoom.slider",e}(c6);function e5e(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function RD(t){return t==="vertical"?"ns-resize":"ew-resize"}const t5e=Q4e;function oz(t){t.registerComponentModel(Y4e),t.registerComponentView(t5e),f6(t)}function r5e(t){At(az),At(oz)}var n5e={get:function(t,e,r){var n=ot((i5e[t]||{})[e]);return r&&Se(n)?n[n.length-1]:n}},i5e={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const sz=n5e;var FD=fn.mapVisual,a5e=fn.eachVisual,o5e=Se,OD=W,s5e=Wi,l5e=jt,u5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r.stateList=["inRange","outOfRange"],r.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],r.layoutMode={type:"box",ignoreSize:!0},r.dataBound=[-1/0,1/0],r.targetVisuals={},r.controllerVisuals={},r}return e.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},e.prototype.optionUpdated=function(r,n){var i=this.option;!n&&ZN(i,r,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(r){var n=this.stateList;r=Ge(r,this),this.controllerVisuals=x3(this.option.controller,n,r),this.targetVisuals=x3(this.option.target,n,r)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var r=this.option.seriesIndex,n=[];return r==null||r==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=er(r),n},e.prototype.eachTargetSeries=function(r,n){W(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&r.call(n,a)},this)},e.prototype.isTargetSeries=function(r){var n=!1;return this.eachTargetSeries(function(i){i===r&&(n=!0)}),n},e.prototype.formatValueText=function(r,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],Se(r)&&(r=r.slice(),u=!0);var h=n?r:u?[c(r[0]),c(r[1])]:c(r);if(ze(l))return l.replace("{value}",u?h[0]:h).replace("{value2}",u?h[1]:h);if(Je(l))return u?l(r[0],r[1]):l(r);if(u)return r[0]===s[0]?i[0]+" "+h[1]:r[1]===s[1]?i[1]+" "+h[0]:h[0]+" - "+h[1];return h;function c(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var r=this.option,n=s5e([r.min,r.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(r){var n=this.option.dimension;if(n!=null)return r.getDimensionIndex(n);for(var i=r.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=r.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var r=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});bt(a,i),bt(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),h.call(this,o);function l(c){o5e(n.color)&&!c.inRange&&(c.inRange={color:n.color.slice().reverse()}),c.inRange=c.inRange||{color:r.get("gradientColor")}}function u(c,f,d){var v=c[f],g=c[d];v&&!g&&(g=c[d]={},OD(v,function(m,y){if(fn.isValidType(y)){var b=sz.get(y,"inactive",s);b!=null&&(g[y]=b,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function h(c){var f=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,d=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,v=this.get("inactiveColor"),g=this.getItemSymbol(),m=g||"roundRect";OD(this.stateList,function(y){var b=this.itemSize,w=c[y];w||(w=c[y]={color:s?v:[v]}),w.symbol==null&&(w.symbol=f&&ot(f)||(s?m:[m])),w.symbolSize==null&&(w.symbolSize=d&&ot(d)||(s?b[0]:[b[0],b[0]])),w.symbol=FD(w.symbol,function(D){return D==="none"?m:D});var T=w.symbolSize;if(T!=null){var M=-1/0;a5e(T,function(D){D>M&&(M=D)}),w.symbolSize=FD(T,function(D){return l5e(D,[0,M],[0,b[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(r){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(r){return null},e.prototype.getVisualMeta=function(r){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Nt);const py=u5e;var ND=[20,140],h5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var r=this.itemSize;(r[0]==null||isNaN(r[0]))&&(r[0]=ND[0]),(r[1]==null||isNaN(r[1]))&&(r[1]=ND[1])},e.prototype._resetRange=function(){var r=this.getExtent(),n=this.option.range;!n||n.auto?(r.auto=1,this.option.range=r):Se(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],r[0]),n[1]=Math.min(n[1],r[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),W(this.stateList,function(r){var n=this.option.controller[r].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(r){this.option.range=r.slice(),this._resetRange()},e.prototype.getSelected=function(){var r=this.getExtent(),n=Wi((this.get("range")||[]).slice());return n[0]>r[1]&&(n[0]=r[1]),n[1]>r[1]&&(n[1]=r[1]),n[0]=i[1]||r<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){r[0]<=s&&s<=r[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(r){var n=zD(this,"outOfRange",this.getExtent()),i=zD(this,"inRange",this.option.range.slice()),a=[];function o(d,v){a.push({value:d,color:r(d,v)})}for(var s=0,l=0,u=i.length,h=n.length;lr[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(r[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(r,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],r[0]],[i[0],r[0]],[i[0],r[1]],[i[0]-n[1],r[1]]]},e.prototype._createBarGroup=function(r){var n=this._orient,i=this.visualMapModel.get("inverse");return new st(n==="horizontal"&&!i?{scaleX:r==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:r==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:r==="left"?1:-1,scaleY:-1}:{scaleX:r==="left"?1:-1})},e.prototype._updateHandle=function(r,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();d5e([0,1],function(h){var c=o[h];c.setStyle("fill",n.handlesColor[h]),c.y=r[h];var f=Ua(r[h],[0,l[1]],u,!0),d=this.getControllerVisual(f,"symbolSize");c.scaleX=c.scaleY=d/l[0],c.x=l[0]-d/2;var v=ma(i.handleLabelPoints[h],Vu(c,this.group));s[h].setStyle({x:v[0],y:v[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(r,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],h=this._shapes,c=h.indicator;if(c){c.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(r,"color",f),v=this.getControllerVisual(r,"symbolSize"),g=Ua(r,s,u,!0),m=l[0]-v/2,y={x:c.x,y:c.y};c.y=g,c.x=m;var b=ma(h.indicatorLabelPoint,Vu(c,this.group)),w=h.indicatorLabel;w.attr("invisible",!1);var T=this._applyTransform("left",h.mainGroup),M=this._orient,D=M==="horizontal";w.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:D?T:"middle",align:D?"center":T});var P={x:m,y:g,style:{fill:d}},O={style:{x:b[0],y:b[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var V={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(P,V),w.animateTo(O,V)}else c.attr(P),w.attr(O);this._firstShowIndicator=!1;var $=this._shapes.handleLabels;if($)for(var H=0;H<$.length;H++)this._api.enterBlur($[H])}},e.prototype._enableHoverLinkToSeries=function(){var r=this;this._shapes.mainGroup.on("mousemove",function(n){if(r._hovering=!0,!r._dragging){var i=r.visualMapModel.itemSize,a=r._applyTransform([n.offsetX,n.offsetY],r._shapes.mainGroup,!0,!0);a[1]=$D(s4(0,a[1]),i[1]),r._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){r._hovering=!1,!r._dragging&&r._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var r=this.api.getZr();this.visualMapModel.option.hoverLink?(r.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),r.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(r,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();r=$D(s4(o[0],r),o[1]);var l=m5e(i,s,o),u=[r-l,r+l],h=Ua(r,o,s,!0),c=[Ua(u[0],o,s,!0),Ua(u[1],o,s,!0)];u[0]o[1]&&(c[1]=1/0),n&&(c[0]===-1/0?this._showIndicator(h,c[1],"< ",l):c[1]===1/0?this._showIndicator(h,c[0],"> ",l):this._showIndicator(h,h,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||HD(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(c));var v=sie(f,d);this._dispatchHighDown("downplay",Xm(v[0],i)),this._dispatchHighDown("highlight",Xm(v[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(r){var n;if(Mu(r.target,function(l){var u=dt(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var r=this._shapes;r.indicator&&r.indicator.attr("invisible",!0),r.indicatorLabel&&r.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),t.getData().setVisual("visualMeta",n)}}];function S5e(t,e,r,n){for(var i=e.targetVisuals[n],a=fn.prepareVisualTypes(i),o={color:wp(t.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),t.registerAction(_5e,x5e),W(b5e,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(w5e))}function cz(t){t.registerComponentModel(c5e),t.registerComponentView(y5e),hz(t)}var C5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r._pieceList=[],r}return e.prototype.optionUpdated=function(r,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],A5e[this._mode].call(this,this._pieceList),this._resetSelected(r,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=ot(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Ce(this._pieceList,function(l){return l=ot(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var r=this.option,n={},i=fn.listVisualTypes(),a=this.isCategory();W(r.pieces,function(s){W(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),W(n,function(s,l){var u=!1;W(this.stateList,function(h){u=u||o(r,h,l)||o(r.target,h,l)},this),!u&&W(this.stateList,function(h){(r[h]||(r[h]={}))[l]=sz.get(l,h==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(r,n){var i=this.option,a=this._pieceList,o=(n?i:r).selected||{};if(i.selected=o,W(a,function(l,u){var h=this.getSelectedMapKey(l);o.hasOwnProperty(h)||(o[h]=!0)},this),i.selectedMode==="single"){var s=!1;W(a,function(l,u){var h=this.getSelectedMapKey(l);o[h]&&(s?o[h]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(r){return this._mode==="categories"?r.value+"":r.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var r=this.option;return r.pieces&&r.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(r){this.option.selected=ot(r)},e.prototype.getValueState=function(r){var n=fn.findPieceIndex(r,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(r){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var h=fn.findPieceIndex(l,i);h===r&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(r){var n;if(this.isCategory())n=r.value;else if(r.value!=null)n=r.value;else{var i=r.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(r){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(h,c){var f=a.getRepresentValue({interval:h});c||(c=a.getValueState(f));var d=r(f,c);h[0]===-1/0?i[0]=d:h[1]===1/0?i[1]=d:n.push({value:h[0],color:d},{value:h[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return W(s,function(h){var c=h.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=gl(py.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(py),A5e={splitNumber:function(t){var e=this.option,r=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(r)!==a&&r<5;)r++;e.precision=r,a=+a.toFixed(r),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function YD(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}const T5e=C5e;var k5e=function(t){pe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=e.type,r}return e.prototype.doRender=function(){var r=this.group;r.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,h=this._getViewData(),c=h.endsText,f=Qr(n.get("showLabel",!0),!c);c&&this._renderEndsText(r,c[0],u,f,l),W(h.viewPieceList,function(d){var v=d.piece,g=new st;g.onclick=Ge(this._onItemClick,this,v),this._enableHoverLink(g,d.indexInModelPieceList);var m=n.getRepresentValue(v);if(this._createItemSymbol(g,m,[0,0,u[0],u[1]]),f){var y=this.visualMapModel.getValueState(m);g.add(new Vt({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:v.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}r.add(g)},this),c&&this._renderEndsText(r,c[1],u,f,l),$u(n.get("orient"),r,n.get("itemGap")),this.renderBackground(r),this.positionGroup(r)},e.prototype._enableHoverLink=function(r,n){var i=this;r.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Xm(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var r=this.visualMapModel,n=r.option;if(n.orient==="vertical")return uz(r,this.api,r.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(r,n,i,a,o){if(n){var s=new st,l=this.visualMapModel.textStyleModel;s.add(new Vt({style:lr(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),r.add(s)}},e.prototype._getViewData=function(){var r=this.visualMapModel,n=Ce(r.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=r.get("text"),a=r.get("orient"),o=r.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(r,n,i){r.add(Fr(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(r){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=ot(i.selected),s=n.getSelectedMapKey(r);a==="single"||a===!0?(o[s]=!0,W(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(lz);const D5e=k5e;function fz(t){t.registerComponentModel(T5e),t.registerComponentView(D5e),hz(t)}function M5e(t){At(cz),At(fz)}var L5e={label:{enabled:!0},decal:{show:!1}},XD=Ft(),E5e={};function I5e(t,e){var r=t.getModel("aria");if(!r.get("enabled"))return;var n=ot(L5e);bt(n.label,t.getLocaleModel().get("aria"),!1),bt(r.option,n,!1),i(),a();function i(){var u=r.getModel("decal"),h=u.get("show");if(h){var c=Ye();t.eachSeries(function(f){if(!f.isColorBySeries()){var d=c.get(f.type);d||(d={},c.set(f.type,d)),XD(f).scope=d}}),t.eachRawSeries(function(f){if(t.isSeriesFiltered(f))return;if(Je(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var b=D5(f.ecModel,f.name,E5e,t.getSeriesCount()),w=d.getVisual("decal");d.setVisual("decal",T(w,b))}else{var v=f.getRawData(),g={},m=XD(f).scope;d.each(function(M){var D=d.getRawIndex(M);g[D]=M});var y=v.count();v.each(function(M){var D=g[M],P=v.getName(M)||M+"",O=D5(f.ecModel,P,m,y),V=d.getItemVisual(D,"decal");d.setItemVisual(D,"decal",T(V,O))})}function T(M,D){var P=M?xe(xe({},D),M):D;return P.dirty=!0,P}})}}function a(){var u=t.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=rt(h.option,u),!!h.get("enabled")){var c=e.getZr().dom;if(h.get("description")){c.setAttribute("aria-label",h.get("description"));return}var f=t.getSeriesCount(),d=h.get(["data","maxCount"])||10,v=h.get(["series","maxCount"])||10,g=Math.min(f,v),m;if(!(f<1)){var y=s();if(y){var b=h.get(["general","withTitle"]);m=o(b,{title:y})}else m=h.get(["general","withoutTitle"]);var w=[],T=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);m+=o(T,{seriesCount:f}),t.eachSeries(function(O,V){if(V1?h.get(["series","multiple",j]):h.get(["series","single",j]),$=o($,{seriesId:O.seriesIndex,seriesName:O.get("name"),seriesType:l(O.subType)});var q=O.getData();if(q.count()>d){var G=h.get(["data","partialData"]);$+=o(G,{displayCnt:d})}else $+=h.get(["data","allData"]);for(var J=h.get(["data","separator","middle"]),K=h.get(["data","separator","end"]),se=[],ae=0;ae":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},R5e=function(){function t(e){var r=this._condVal=ze(e)?new RegExp(e):yre(e)?e:null;if(r==null){var n="";Yt(n)}}return t.prototype.evaluate=function(e){var r=typeof e;return ze(r)?this._condVal.test(e):$t(r)?this._condVal.test(e+""):!1},t}(),F5e=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),O5e=function(){function t(){}return t.prototype.evaluate=function(){for(var e=this.children,r=0;r2&&n.push(i),i=[q,G]}function h(q,G,J,K){Dc(q,J)&&Dc(G,K)||i.push(q,G,J,K,J,K)}function c(q,G,J,K,se,ae){var ce=Math.abs(G-q),ye=Math.tan(ce/4)*4/3,de=GO:H2&&n.push(i),n}function D3(t,e,r,n,i,a,o,s,l,u){if(Dc(t,r)&&Dc(e,n)&&Dc(i,o)&&Dc(a,s)){l.push(o,s);return}var h=2/u,c=h*h,f=o-t,d=s-e,v=Math.sqrt(f*f+d*d);f/=v,d/=v;var g=r-t,m=n-e,y=i-o,b=a-s,w=g*g+m*m,T=y*y+b*b;if(w=0&&O=0){l.push(o,s);return}var V=[],$=[];sl(t,r,i,o,.5,V),sl(e,n,a,s,.5,$),D3(V[0],$[0],V[1],$[1],V[2],$[2],V[3],$[3],l,u),D3(V[4],$[4],V[5],$[5],V[6],$[6],V[7],$[7],l,u)}function K5e(t,e){var r=k3(t),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),c=pz([l,u],h?0:1,e),f=(h?s:u)/c.length,d=0;di,o=pz([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",h=a?"y":"x",c=t[s]/o.length,f=0;f1?null:new _t(g*l+t,g*u+e)}function e3e(t,e,r){var n=new _t;_t.sub(n,r,e),n.normalize();var i=new _t;_t.sub(i,t,e);var a=i.dot(n);return a}function vc(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function t3e(t,e,r){for(var n=t.length,i=[],a=0;ao?(u.x=h.x=s+a/2,u.y=l,h.y=l+o):(u.y=h.y=l+o/2,u.x=s,h.x=s+a),t3e(e,u,h)}function vy(t,e,r,n){if(r===1)n.push(e);else{var i=Math.floor(r/2),a=t(e);vy(t,a[0],i,n),vy(t,a[1],r-i,n)}return n}function r3e(t,e){for(var r=[],n=0;n0)for(var M=n/r,D=-n/2;D<=n/2;D+=M){for(var P=Math.sin(D),O=Math.cos(D),V=0,w=0;w0;u/=2){var h=0,c=0;(t&u)>0&&(h=1),(e&u)>0&&(c=1),s+=u*u*(3*h^c),c===0&&(h===1&&(t=u-1-t,e=u-1-e),l=t,t=e,e=l)}return s}function yy(t){var e=1/0,r=1/0,n=-1/0,i=-1/0,a=Ce(t,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),h=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(h,e),r=Math.min(c,r),n=Math.max(h,n),i=Math.max(c,i),[h,c]}),o=Ce(a,function(s,l){return{cp:s,z:c3e(s[0],s[1],e,r,n,i),path:t[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function mz(t){return a3e(t.path,t.count)}function M3(){return{fromIndividuals:[],toIndividuals:[],count:0}}function f3e(t,e,r){var n=[];function i(M){for(var D=0;D=0;i--)if(!r[i].many.length){var l=r[s].many;if(l.length<=1)if(s)s=0;else return r;var a=l.length,u=Math.ceil(a/2);r[i].many=l.slice(u,a),r[s].many=l.slice(0,u),s++}return r}var p3e={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,h;nM(t)&&(u=t,h=e),nM(e)&&(u=e,h=t);function c(y,b,w,T,M){var D=y.many,P=y.one;if(D.length===1&&!M){var O=b?D[0]:P,V=b?P:D[0];if(gy(O))c({many:[O],one:V},!0,w,T,!0);else{var $=s?rt({delay:s(w,T)},l):l;S6(O,V,$),a(O,V,O,V,$)}}else for(var H=rt({dividePath:p3e[r],individualDelay:s&&function(se,ae,ce,ye){return s(se+w,T)}},l),j=b?f3e(D,P,H):d3e(P,D,H),q=j.fromIndividuals,G=j.toIndividuals,J=q.length,K=0;Ke.length,d=u?iM(h,u):iM(f?e:t,[f?t:e]),v=0,g=0;gyz))for(var i=n.getIndices(),a=g3e(n),o=0;o0&&T.group.traverse(function(D){D instanceof Tt&&!D.animators.length&&D.animateFrom({style:{opacity:0}},M)})})}function oM(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function sM(t){return Se(t)?t.sort().join(","):t}function Vs(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function _3e(t,e){var r=Ye(),n=Ye(),i=Ye();return W(t.oldSeries,function(a,o){var s=t.oldDataGroupIds[o],l=t.oldData[o],u=oM(a),h=sM(u);n.set(h,{dataGroupId:s,data:l}),Se(u)&&W(u,function(c){i.set(c,{key:h,dataGroupId:s,data:l})})}),W(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=oM(a),u=sM(l),h=n.get(u);if(h)r.set(u,{oldSeries:[{dataGroupId:h.dataGroupId,divide:Vs(h.data),data:h.data}],newSeries:[{dataGroupId:o,divide:Vs(s),data:s}]});else if(Se(l)){var c=[];W(l,function(v){var g=n.get(v);g.data&&c.push({dataGroupId:g.dataGroupId,divide:Vs(g.data),data:g.data})}),c.length&&r.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Vs(s)}]})}else{var f=i.get(l);if(f){var d=r.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:Vs(f.data)}],newSeries:[]},r.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Vs(s)})}}}}),r}function lM(t,e){for(var r=0;r=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Vs(e.oldData[s]),dim:o.dimension})}),W(er(t.to),function(o){var s=lM(r.updatedSeries,o);if(s>=0){var l=r.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Vs(l),dim:o.dimension})}}),i.length>0&&a.length>0&&_z(i,a,n)}function b3e(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){W(er(n.seriesTransition),function(i){W(er(i.to),function(a){for(var o=n.updatedSeries,s=0;sdiv{width:100%;height:100%} +`,{});var N3e=function(){if(B0!=null)return B0;if(typeof HTMLElement>"u"||typeof customElements>"u")return B0=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { __dispose = null; disconnectedCallback() { @@ -517,4 +517,4 @@ PERFORMANCE OF THIS SOFTWARE. if (customElements.get(tag) == null) { customElements.define(tag, EChartsElement); } -`)(bz)}catch{return B0=!1}return B0=!0}(),Sz="ecTheme",O3e="ecInitOptions",N3e="ecUpdateOptions",z3e=aV({name:"echarts",props:Fo(Fo({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},E3e),R3e),emits:{},inheritAttrs:!1,setup:function(t,e){var r=e.attrs,n=Wv(),i=Wv(),a=Wv(),o=Wv(),s=Uv(Sz,null),l=Uv(O3e,null),u=Uv(N3e,null),h=oV(t),c=h.autoresize,f=h.manualUpdate,d=h.loading,v=h.loadingOptions,g=Wh(function(){return o.value||t.option||null}),m=Wh(function(){return t.theme||um(s,{})}),y=Wh(function(){return t.initOptions||um(l,{})}),b=Wh(function(){return t.updateOptions||um(u,{})}),w=Wh(function(){return function(V){var $={};for(var H in V)B3e(H)||($[H]=V[H]);return $}(r)}),T=sV().proxy.$listeners;function M(V){if(i.value){var $=a.value=cue(i.value,m.value,y.value);t.group&&($.group=t.group);var H=T;H||(H={},Object.keys(r).filter(function(q){return q.indexOf("on")===0&&q.length>2}).forEach(function(q){var G=q.charAt(2).toLowerCase()+q.slice(3);G.substring(G.length-4)==="Once"&&(G="~".concat(G.substring(0,G.length-4))),H[G]=r[q]})),Object.keys(H).forEach(function(q){var G=H[q];if(G){var J=q.toLowerCase();J.charAt(0)==="~"&&(J=J.substring(1),G.__once__=!0);var K=$;if(J.indexOf("zr:")===0&&(K=$.getZr(),J=J.substring(3)),G.__once__){delete G.__once__;var se=G;G=function(){for(var ae=[],ce=0;ce{let s=o;if(typeof o=="string")try{s=JSON.parse(o)}catch(l){console.log(l),s={}}return s.toolbox={show:!0,feature:{saveAsImage:{show:!0,title:r("components.workspace.echartsRenderer.download_image"),type:"png",pixelRatio:2}}},s},a=js(i(n.value));return Su(()=>e.option,()=>{n.value=e.option,a.value=i(n.value)}),hV(Sz,"light"),(o,s)=>{const l=ii("a-col"),u=ii("a-row");return Lr(),Pc(u,null,{default:An(()=>[Jr(l,{span:24},{default:An(()=>[Jr(Ks(z3e),{class:"chart",option:a.value,"update-options":{notMerge:!0},style:{width:"100%","min-height":"50vh"}},null,8,["option"])]),_:1})]),_:1})}}};export{rK as $,BK as A,yL as B,mU as C,Dt as D,oo as E,Tm as F,ed as G,$E as H,GE as I,FE as J,kZ as K,qj as L,bV as M,qE as N,wQ as O,xK as P,U3 as Q,_L as R,wi as S,ai as T,cp as U,eX as V,SL as W,X3e as X,qJ as Y,rSe as Z,H3e as _,q3e as a,HE as a0,MK as a1,aS as a2,jj as a3,Y3 as a4,Fs as a5,Td as a6,kC as a7,sX as a8,hSe as a9,aK as aa,yK as ab,fV as ac,mV as ad,Ly as ae,Ld as af,Nte as ag,yQ as ah,fp as ai,vt as aj,wt as ak,K3 as al,K3e as am,eSe as an,PC as ao,BC as ap,tSe as aq,Q3e as ar,Z3e as as,j3e as at,iSe as au,nSe as av,J3e as aw,uU as ax,X6 as ay,Y6 as az,U3e as b,Y3e as c,cSe as d,fSe as e,VE as f,NE as g,zE as h,_a as i,Dd as j,Cn as k,p1 as l,Uu as m,Ni as n,ft as o,LE as p,nS as q,AK as r,OE as s,aL as t,CZ as u,mK as v,wK as w,eE as x,hK as y,YJ as z}; +`)(bz)}catch{return B0=!1}return B0=!0}(),Sz="ecTheme",z3e="ecInitOptions",V3e="ecUpdateOptions",$3e=aV({name:"echarts",props:Fo(Fo({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},B3e),O3e),emits:{},inheritAttrs:!1,setup:function(t,e){var r=e.attrs,n=Uv(),i=Uv(),a=Uv(),o=Uv(),s=Yv(Sz,null),l=Yv(z3e,null),u=Yv(V3e,null),h=oV(t),c=h.autoresize,f=h.manualUpdate,d=h.loading,v=h.loadingOptions,g=lu(function(){return o.value||t.option||null}),m=lu(function(){return t.theme||hm(s,{})}),y=lu(function(){return t.initOptions||hm(l,{})}),b=lu(function(){return t.updateOptions||hm(u,{})}),w=lu(function(){return function(V){var $={};for(var H in V)R3e(H)||($[H]=V[H]);return $}(r)}),T=sV().proxy.$listeners;function M(V){if(i.value){var $=a.value=due(i.value,m.value,y.value);t.group&&($.group=t.group);var H=T;H||(H={},Object.keys(r).filter(function(q){return q.indexOf("on")===0&&q.length>2}).forEach(function(q){var G=q.charAt(2).toLowerCase()+q.slice(3);G.substring(G.length-4)==="Once"&&(G="~".concat(G.substring(0,G.length-4))),H[G]=r[q]})),Object.keys(H).forEach(function(q){var G=H[q];if(G){var J=q.toLowerCase();J.charAt(0)==="~"&&(J=J.substring(1),G.__once__=!0);var K=$;if(J.indexOf("zr:")===0&&(K=$.getZr(),J=J.substring(3)),G.__once__){delete G.__once__;var se=G;G=function(){for(var ae=[],ce=0;ce{let s=o;if(typeof o=="string")try{s=JSON.parse(o)}catch(l){console.log(l),s={}}return s.toolbox={show:!0,feature:{saveAsImage:{show:!0,title:r("components.workspace.echartsRenderer.download_image"),type:"png",pixelRatio:2}}},s},a=Ks(i(n.value));return wu(()=>e.option,()=>{n.value=e.option,a.value=i(n.value)}),hV(Sz,"light"),(o,s)=>{const l=Gn("a-col"),u=Gn("a-row");return Sr(),Wu(u,null,{default:hn(()=>[Nr(l,{span:24},{default:hn(()=>[Nr(Go($3e),{class:"chart",option:a.value,"update-options":{notMerge:!0},style:{width:"100%","min-height":"50vh"}},null,8,["option"])]),_:1})]),_:1})}}},vSe={__name:"TextOutput",props:{text:{type:String,default:""},renderMarkdown:{type:Boolean,default:!1}},setup(t){const e=t,r=lu(()=>typeof e.text=="string"?e.text:JSON.stringify(e.text));return(n,i)=>{const a=Gn("a-typography-paragraph"),o=cV("highlight");return t.renderMarkdown?(Sr(),ln(Q0,{key:0},[mc(Nr(Go(fV),{source:r.value,class:"markdown-body custom-hljs"},null,8,["source"]),[[o]]),Nr(a,{copyable:{text:r.value}},null,8,["copyable"])],64)):(Sr(),Wu(a,{key:1,copyable:{text:r.value}},{default:hn(()=>[xy(Oo(r.value),1)]),_:1},8,["copyable"]))}}};export{iSe as $,ZJ as A,RK as B,yL as C,_U as D,Dt as E,oo as F,Tm as G,td as H,$E as I,GE as J,FE as K,MZ as L,wV as M,Uj as N,qE as O,AQ as P,SK as Q,U3 as R,wi as S,_L as T,ai as U,fp as V,rX as W,SL as X,j3e as Y,UJ as Z,W3e as _,U3e as a,iK as a0,HE as a1,EK as a2,aS as a3,Jj as a4,Y3 as a5,Ns as a6,kd as a7,kC as a8,uX as a9,Y6 as aA,fSe as aa,sK as ab,xK as ac,pV as ad,_V as ae,Ey as af,Ed as ag,Vte as ah,xQ as ai,dp as aj,vt as ak,wt as al,K3 as am,Q3e as an,rSe as ao,PC as ap,BC as aq,nSe as ar,tSe as as,K3e as at,J3e as au,oSe as av,aSe as aw,eSe as ax,cU as ay,X6 as az,vSe as b,X3e as c,Z3e as d,dSe as e,pSe as f,NE as g,VE as h,zE as i,_a as j,Md as k,An as l,Xu as m,p1 as n,Ni as o,ft as p,LE as q,nS as r,OE as s,kK as t,aL as u,TZ as v,AK as w,_K as x,eE as y,fK as z}; diff --git a/backend/web/assets/UploaderFieldUse-71f49711.js b/backend/web/assets/UploaderFieldUse-71f49711.js deleted file mode 100644 index 52113245..00000000 --- a/backend/web/assets/UploaderFieldUse-71f49711.js +++ /dev/null @@ -1 +0,0 @@ -import{c as n,A as V,Z as F,_ as P,U as S,P as s,o as U,K as C,x as a,u,R as m,H as f,b0 as H,a_ as j,a2 as b}from"./index-51905ea3.js";var B={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"};const z=B;function g(o){for(var t=1;t{const i=e.value.indexOf(r);e.value.splice(i,1)},h=async()=>{try{(await window.pywebview.api.open_file_dialog(t.multiple)).forEach(i=>{b.success(l("components.workspace.uploaderFieldUse.upload_success",{file:i})),e.value.push(i),!t.multiple&&e.value.length>1&&e.value.splice(0,1)})}catch(r){console.log(r),b.error(l("components.workspace.uploaderFieldUse.upload_failed"))}};return(r,i)=>{const v=s("a-button"),d=s("a-col"),y=s("a-typography-link"),O=s("a-typography-text"),x=s("a-list-item-meta"),w=s("a-list-item"),k=s("a-list"),I=s("a-row");return U(),C(I,{gutter:[16,16]},{default:a(()=>[n(d,{span:24},{default:a(()=>[n(v,{type:"primary",block:"",onClick:h},{icon:a(()=>[n(u(D))]),default:a(()=>[m(" "+f(u(l)("components.workspace.uploaderFieldUse.upload")),1)]),_:1})]),_:1}),n(d,{span:24},{default:a(()=>[n(k,{"data-source":e.value},{renderItem:a(({item:_})=>[n(w,null,{actions:a(()=>[n(y,{onClick:M=>c(_)},{default:a(()=>[n(u(H))]),_:2},1032,["onClick"])]),default:a(()=>[n(x,null,{title:a(()=>[n(O,null,{default:a(()=>[m(f(_),1)]),_:2},1024)]),avatar:a(()=>[n(u(j))]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])]),_:1})]),_:1})}}};export{$ as _}; diff --git a/backend/web/assets/UploaderFieldUse-7351b05e.js b/backend/web/assets/UploaderFieldUse-7351b05e.js new file mode 100644 index 00000000..16c8f559 --- /dev/null +++ b/backend/web/assets/UploaderFieldUse-7351b05e.js @@ -0,0 +1 @@ +import{c as n,A as V,$ as F,a0 as P,U as S,P as s,o as U,K as C,x as a,u,R as m,H as f,b0 as H,a_ as j,a4 as b}from"./index-ef7aa48c.js";var B={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"};const $=B;function g(o){for(var t=1;t{const i=e.value.indexOf(r);e.value.splice(i,1)},h=async()=>{try{(await window.pywebview.api.open_file_dialog(t.multiple)).forEach(i=>{b.success(l("components.workspace.uploaderFieldUse.upload_success",{file:i})),e.value.push(i),!t.multiple&&e.value.length>1&&e.value.splice(0,1)})}catch(r){console.log(r),b.error(l("components.workspace.uploaderFieldUse.upload_failed"))}};return(r,i)=>{const v=s("a-button"),d=s("a-col"),y=s("a-typography-link"),O=s("a-typography-text"),x=s("a-list-item-meta"),w=s("a-list-item"),k=s("a-list"),I=s("a-row");return U(),C(I,{gutter:[16,16]},{default:a(()=>[n(d,{span:24},{default:a(()=>[n(v,{type:"primary",block:"",onClick:h},{icon:a(()=>[n(u(A))]),default:a(()=>[m(" "+f(u(l)("components.workspace.uploaderFieldUse.upload")),1)]),_:1})]),_:1}),n(d,{span:24},{default:a(()=>[n(k,{"data-source":e.value},{renderItem:a(({item:_})=>[n(w,null,{actions:a(()=>[n(y,{onClick:D=>c(_)},{default:a(()=>[n(u(H))]),_:2},1032,["onClick"])]),default:a(()=>[n(x,null,{title:a(()=>[n(O,null,{default:a(()=>[m(f(_),1)]),_:2},1024)]),avatar:a(()=>[n(u(j))]),_:2},1024)]),_:2},1024)]),_:1},8,["data-source"])]),_:1})]),_:1})}}};export{N as _}; diff --git a/backend/web/assets/WorkflowEditor-0cc440c6.js b/backend/web/assets/WorkflowEditor-0cc440c6.js deleted file mode 100644 index 99e8e55b..00000000 --- a/backend/web/assets/WorkflowEditor-0cc440c6.js +++ /dev/null @@ -1,51 +0,0 @@ -import{c as m,A as ru,d as n_,a as Le,r as oe,b as ye,o as M,e as se,f as Ve,u as O,n as en,g as gv,i as oi,h as vv,w as Me,p as ro,j as Dl,t as st,k as yv,l as Ov,m as zt,q as wv,s as _v,v as Vn,x as v,F as Te,y as rt,z as xs,B as bv,C as fo,D as su,E as sa,G as Qe,H as pe,I as Oe,J as mt,K as H,L as Ie,M as Ci,N as cd,O as Ki,P as C,Q as hd,R as ge,S as _o,T as i_,U as Ee,V as o_,W as Af,X as Rl,Y as r_,Z as xv,_ as lu,$ as Ji,a0 as Sv,a1 as la,a2 as To,a3 as dd,a4 as fd,a5 as s_,a6 as Df,a7 as Ic,a8 as l_,a9 as a_,aa as u_,ab as c_,ac as h_,ad as zs,ae as Rf,af as d_,ag as f_,ah as p_}from"./index-51905ea3.js";import{_ as lr}from"./_plugin-vue_export-helper-c27b6911.js";import{I as po}from"./index-fb7c1fe5.js";import{_ as m_}from"./QuestionPopover-c8fa17cc.js";import{_ as pd,M as g_,a as v_,b as y_,c as O_,d as w_,e as __}from"./EchartsRenderer-3d08027d.js";import{A as kv}from"./AddOne-dbc3bffb.js";import{u as Ss}from"./userDatabase-87373af7.js";import{_ as b_}from"./MarkdownEditor-38e43a8d.js";import{_ as Tv}from"./UploaderFieldUse-71f49711.js";import{d as x_}from"./database-adffb067.js";import{u as S_}from"./stringify-ec884b6d.js";var k_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};const T_=k_;function qf(t){for(var e=1;e({nodeMessages:[],nodeMessagesCount:0}),actions:{push(t){this.nodeMessages.push(t),this.nodeMessagesCount=this.nodeMessages.length},pop(){const t=this.nodeMessages.pop();return this.nodeMessagesCount=this.nodeMessages.length,t}}});function ks(t){return gv()?(Dl(t),!0):!1}function Re(t){return typeof t=="function"?t():O(t)}const Cv=typeof window<"u",Y_=t=>typeof t<"u",$v=()=>{};function j_(t,e){function n(...i){return new Promise((o,r)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(o).catch(r)})}return n}const Ev=t=>t();function F_(t=Ev){const e=oe(!0);function n(){e.value=!1}function i(){e.value=!0}const o=(...r)=>{e.value&&t(...r)};return{isActive:yv(e),pause:n,resume:i,eventFilter:o}}function Vf(t,e=!1,n="Timeout"){return new Promise((i,o)=>{setTimeout(e?()=>o(n):i,t)})}function Vc(...t){if(t.length!==1)return st(...t);const e=t[0];return typeof e=="function"?yv(Ov(()=>({get:e,set:$v}))):oe(e)}var H_=Object.defineProperty,G_=Object.defineProperties,Z_=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertySymbols,K_=Object.prototype.hasOwnProperty,J_=Object.prototype.propertyIsEnumerable,Wf=(t,e,n)=>e in t?H_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eb=(t,e)=>{for(var n in e||(e={}))K_.call(e,n)&&Wf(t,n,e[n]);if(Bf)for(var n of Bf(e))J_.call(e,n)&&Wf(t,n,e[n]);return t},tb=(t,e)=>G_(t,Z_(e));function nb(t){if(!xs(t))return bv(t);const e=Array.isArray(t.value)?new Array(t.value.length):{};for(const n in t.value)e[n]=Ov(()=>({get(){return t.value[n]},set(i){if(Array.isArray(t.value)){const o=[...t.value];o[n]=i,t.value=o}else{const o=tb(eb({},t.value),{[n]:i});Object.setPrototypeOf(o,t.value),t.value=o}}}));return e}function Bc(t,e=!1){function n(h,{flush:d="sync",deep:f=!1,timeout:p,throwOnTimeout:g}={}){let w=null;const y=[new Promise(_=>{w=Me(t,T=>{h(T)!==e&&(w==null||w(),_(T))},{flush:d,deep:f,immediate:!0})})];return p!=null&&y.push(Vf(p,g).then(()=>Re(t)).finally(()=>w==null?void 0:w())),Promise.race(y)}function i(h,d){if(!xs(h))return n(T=>T===h,d);const{flush:f="sync",deep:p=!1,timeout:g,throwOnTimeout:w}=d??{};let y=null;const _=[new Promise(T=>{y=Me([t,h],([b,k])=>{e!==(b===k)&&(y==null||y(),T(b))},{flush:f,deep:p,immediate:!0})})];return g!=null&&_.push(Vf(g,w).then(()=>Re(t)).finally(()=>(y==null||y(),Re(t)))),Promise.race(_)}function o(h){return n(d=>!!d,h)}function r(h){return i(null,h)}function s(h){return i(void 0,h)}function l(h){return n(Number.isNaN,h)}function a(h,d){return n(f=>{const p=Array.from(f);return p.includes(h)||p.includes(Re(h))},d)}function u(h){return c(1,h)}function c(h=1,d){let f=-1;return n(()=>(f+=1,f>=h),d)}return Array.isArray(Re(t))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return Bc(t,!e)}}:{toMatch:n,toBe:i,toBeTruthy:o,toBeNull:r,toBeNaN:l,toBeUndefined:s,changed:u,changedTimes:c,get not(){return Bc(t,!e)}}}function $i(t){return Bc(t)}var Lf=Object.getOwnPropertySymbols,ib=Object.prototype.hasOwnProperty,ob=Object.prototype.propertyIsEnumerable,rb=(t,e)=>{var n={};for(var i in t)ib.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Lf)for(var i of Lf(t))e.indexOf(i)<0&&ob.call(t,i)&&(n[i]=t[i]);return n};function sb(t,e,n={}){const i=n,{eventFilter:o=Ev}=i,r=rb(i,["eventFilter"]);return Me(t,j_(o,e),r)}var lb=Object.defineProperty,ab=Object.defineProperties,ub=Object.getOwnPropertyDescriptors,aa=Object.getOwnPropertySymbols,Mv=Object.prototype.hasOwnProperty,Av=Object.prototype.propertyIsEnumerable,zf=(t,e,n)=>e in t?lb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cb=(t,e)=>{for(var n in e||(e={}))Mv.call(e,n)&&zf(t,n,e[n]);if(aa)for(var n of aa(e))Av.call(e,n)&&zf(t,n,e[n]);return t},hb=(t,e)=>ab(t,ub(e)),db=(t,e)=>{var n={};for(var i in t)Mv.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&aa)for(var i of aa(t))e.indexOf(i)<0&&Av.call(t,i)&&(n[i]=t[i]);return n};function vo(t,e,n={}){const i=n,{eventFilter:o}=i,r=db(i,["eventFilter"]),{eventFilter:s,pause:l,resume:a,isActive:u}=F_(o);return{stop:sb(t,e,hb(cb({},r),{eventFilter:s})),pause:l,resume:a,isActive:u}}function Wc(t){var e;const n=Re(t);return(e=n==null?void 0:n.$el)!=null?e:n}const wd=Cv?window:void 0;function _d(...t){let e,n,i,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,o]=t,e=wd):[e,n,i,o]=t,!e)return $v;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],s=()=>{r.forEach(c=>c()),r.length=0},l=(c,h,d,f)=>(c.addEventListener(h,d,f),()=>c.removeEventListener(h,d,f)),a=Me(()=>[Wc(e),Re(o)],([c,h])=>{s(),c&&r.push(...n.flatMap(d=>i.map(f=>l(c,d,f,h))))},{immediate:!0,flush:"post"}),u=()=>{a(),s()};return ks(u),u}function fb(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function Xf(...t){let e,n,i={};t.length===3?(e=t[0],n=t[1],i=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],i=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:o=wd,eventName:r="keydown",passive:s=!1,dedupe:l=!1}=i,a=fb(e);return _d(o,r,u=>{u.repeat&&Re(l)||a(u)&&n(u)},s)}function pb(){const t=oe(!1);return fo()&&Vn(()=>{t.value=!0}),t}function mb(t){const e=pb();return ye(()=>(e.value,!!t()))}function gb(t){return JSON.parse(JSON.stringify(t))}var Uf=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,yb=Object.prototype.propertyIsEnumerable,Ob=(t,e)=>{var n={};for(var i in t)vb.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Uf)for(var i of Uf(t))e.indexOf(i)<0&&yb.call(t,i)&&(n[i]=t[i]);return n};function wb(t,e,n={}){const i=n,{window:o=wd}=i,r=Ob(i,["window"]);let s;const l=mb(()=>o&&"ResizeObserver"in o),a=()=>{s&&(s.disconnect(),s=void 0)},u=ye(()=>Array.isArray(t)?t.map(d=>Wc(d)):[Wc(t)]),c=Me(u,d=>{if(a(),l.value&&o){s=new ResizeObserver(e);for(const f of d)f&&s.observe(f,r)}},{immediate:!0,flush:"post",deep:!0}),h=()=>{a(),c()};return ks(h),{isSupported:l,stop:h}}function qr(t,e,n,i={}){var o,r,s;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:h,shouldEmit:d}=i,f=fo(),p=n||(f==null?void 0:f.emit)||((o=f==null?void 0:f.$emit)==null?void 0:o.bind(f))||((s=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(f==null?void 0:f.proxy));let g=u;e||(e="modelValue"),g=u||g||`update:${e.toString()}`;const w=T=>l?typeof l=="function"?l(T):gb(T):T,y=()=>Y_(t[e])?w(t[e]):h,_=T=>{d?d(T)&&p(g,T):p(g,T)};if(a){const T=y(),b=oe(T);return Me(()=>t[e],k=>b.value=w(k)),Me(b,k=>{(k!==t[e]||c)&&_(k)},{deep:c}),b}else return ye({get(){return y()},set(T){_(T)}})}var _b={value:()=>{}};function au(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ql.prototype=au.prototype={constructor:ql,on:function(t,e){var n=this._,i=bb(t+"",n),o,r=-1,s=i.length;if(arguments.length<2){for(;++r0)for(var n=new Array(o),i=0,o,r;i=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),jf.hasOwnProperty(e)?{space:jf[e],local:t}:t}function Sb(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Lc&&e.documentElement.namespaceURI===Lc?e.createElement(t):e.createElementNS(n,t)}}function kb(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Dv(t){var e=uu(t);return(e.local?kb:Sb)(e)}function Tb(){}function bd(t){return t==null?Tb:function(){return this.querySelector(t)}}function Pb(t){typeof t!="function"&&(t=bd(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=T&&(T=_+1);!(k=w[T])&&++T=0;)(s=i[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function Kb(t){t||(t=Jb);function e(h,d){return h&&d?t(h.__data__,d.__data__):!h-!d}for(var n=this._groups,i=n.length,o=new Array(i),r=0;re?1:t>=e?0:NaN}function ex(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function tx(){return Array.from(this)}function nx(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?fx:typeof e=="function"?mx:px)(t,e,n??"")):jo(this.node(),t)}function jo(t,e){return t.style.getPropertyValue(e)||Iv(t).getComputedStyle(t,null).getPropertyValue(e)}function vx(t){return function(){delete this[t]}}function yx(t,e){return function(){this[t]=e}}function Ox(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function wx(t,e){return arguments.length>1?this.each((e==null?vx:typeof e=="function"?Ox:yx)(t,e)):this.node()[t]}function Vv(t){return t.trim().split(/^|\s+/)}function xd(t){return t.classList||new Bv(t)}function Bv(t){this._node=t,this._names=Vv(t.getAttribute("class")||"")}Bv.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function Wv(t,e){for(var n=xd(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function Fx(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,r;n()=>t;function zc(t,{sourceEvent:e,subject:n,target:i,identifier:o,active:r,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}zc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function oS(t){return!t.ctrlKey&&!t.button}function rS(){return this.parentNode}function sS(t,e){return e??{x:t.x,y:t.y}}function lS(){return navigator.maxTouchPoints||"ontouchstart"in this}function aS(){var t=oS,e=rS,n=sS,i=lS,o={},r=au("start","drag","end"),s=0,l,a,u,c,h=0;function d(b){b.on("mousedown.drag",f).filter(i).on("touchstart.drag",w).on("touchmove.drag",y,iS).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(b,k){if(!(c||!t.call(this,b,k))){var x=T(this,e.call(this,b,k),b,k,"mouse");x&&(pn(b.view).on("mousemove.drag",p,Fr).on("mouseup.drag",g,Fr),Uv(b.view),Iu(b),u=!1,l=b.clientX,a=b.clientY,x("start",b))}}function p(b){if(qo(b),!u){var k=b.clientX-l,x=b.clientY-a;u=k*k+x*x>h}o.mouse("drag",b)}function g(b){pn(b.view).on("mousemove.drag mouseup.drag",null),Yv(b.view,u),qo(b),o.mouse("end",b)}function w(b,k){if(t.call(this,b,k)){var x=b.changedTouches,$=e.call(this,b,k),L=x.length,V,R;for(V=0;V>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Us(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Us(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=cS.exec(t))?new Vt(e[1],e[2],e[3],1):(e=hS.exec(t))?new Vt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=dS.exec(t))?Us(e[1],e[2],e[3],e[4]):(e=fS.exec(t))?Us(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pS.exec(t))?ep(e[1],e[2]/100,e[3]/100,1):(e=mS.exec(t))?ep(e[1],e[2]/100,e[3]/100,e[4]):Ff.hasOwnProperty(t)?Zf(Ff[t]):t==="transparent"?new Vt(NaN,NaN,NaN,0):null}function Zf(t){return new Vt(t>>16&255,t>>8&255,t&255,1)}function Us(t,e,n,i){return i<=0&&(t=e=n=NaN),new Vt(t,e,n,i)}function yS(t){return t instanceof Ps||(t=Zr(t)),t?(t=t.rgb(),new Vt(t.r,t.g,t.b,t.opacity)):new Vt}function Xc(t,e,n,i){return arguments.length===1?yS(t):new Vt(t,e,n,i??1)}function Vt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Sd(Vt,Xc,jv(Ps,{brighter(t){return t=t==null?ca:Math.pow(ca,t),new Vt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Hr:Math.pow(Hr,t),new Vt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Vt(eo(this.r),eo(this.g),eo(this.b),ha(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:Kf,formatHex:Kf,formatHex8:OS,formatRgb:Jf,toString:Jf}));function Kf(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}`}function OS(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}${ji((isNaN(this.opacity)?1:this.opacity)*255)}`}function Jf(){const t=ha(this.opacity);return`${t===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${t===1?")":`, ${t})`}`}function ha(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function eo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ji(t){return t=eo(t),(t<16?"0":"")+t.toString(16)}function ep(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mn(t,e,n,i)}function Fv(t){if(t instanceof mn)return new mn(t.h,t.s,t.l,t.opacity);if(t instanceof Ps||(t=Zr(t)),!t)return new mn;if(t instanceof mn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),r=Math.max(e,n,i),s=NaN,l=r-o,a=(r+o)/2;return l?(e===r?s=(n-i)/l+(n0&&a<1?0:s,new mn(s,l,a,t.opacity)}function wS(t,e,n,i){return arguments.length===1?Fv(t):new mn(t,e,n,i??1)}function mn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Sd(mn,wS,jv(Ps,{brighter(t){return t=t==null?ca:Math.pow(ca,t),new mn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Hr:Math.pow(Hr,t),new mn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new Vt(Vu(t>=240?t-240:t+120,o,i),Vu(t,o,i),Vu(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new mn(tp(this.h),Ys(this.s),Ys(this.l),ha(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=ha(this.opacity);return`${t===1?"hsl(":"hsla("}${tp(this.h)}, ${Ys(this.s)*100}%, ${Ys(this.l)*100}%${t===1?")":`, ${t})`}`}}));function tp(t){return t=(t||0)%360,t<0?t+360:t}function Ys(t){return Math.max(0,Math.min(1,t||0))}function Vu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Hv=t=>()=>t;function _S(t,e){return function(n){return t+n*e}}function bS(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function xS(t){return(t=+t)==1?Gv:function(e,n){return n-e?bS(e,n,t):Hv(isNaN(e)?n:e)}}function Gv(t,e){var n=e-t;return n?_S(t,n):Hv(isNaN(t)?e:t)}const np=function t(e){var n=xS(e);function i(o,r){var s=n((o=Xc(o)).r,(r=Xc(r)).r),l=n(o.g,r.g),a=n(o.b,r.b),u=Gv(o.opacity,r.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return i.gamma=t,i}(1);function mi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Uc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bu=new RegExp(Uc.source,"g");function SS(t){return function(){return t}}function kS(t){return function(e){return t(e)+""}}function TS(t,e){var n=Uc.lastIndex=Bu.lastIndex=0,i,o,r,s=-1,l=[],a=[];for(t=t+"",e=e+"";(i=Uc.exec(t))&&(o=Bu.exec(e));)(r=o.index)>n&&(r=e.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(i=i[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:mi(i,o)})),n=Bu.lastIndex;return n180?c+=360:c-u>180&&(u+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:mi(u,c)})):c&&h.push(o(h)+"rotate("+c+i)}function l(u,c,h,d){u!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:mi(u,c)}):c&&h.push(o(h)+"skewX("+c+i)}function a(u,c,h,d,f,p){if(u!==h||c!==d){var g=f.push(o(f)+"scale(",null,",",null,")");p.push({i:g-4,x:mi(u,h)},{i:g-2,x:mi(c,d)})}else(h!==1||d!==1)&&f.push(o(f)+"scale("+h+","+d+")")}return function(u,c){var h=[],d=[];return u=t(u),c=t(c),r(u.translateX,u.translateY,c.translateX,c.translateY,h,d),s(u.rotate,c.rotate,h,d),l(u.skewX,c.skewX,h,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,h,d),u=c=null,function(f){for(var p=-1,g=d.length,w;++p=0&&t._call.call(void 0,e),t=t._next;--Fo}function rp(){so=(fa=Kr.now())+cu,Fo=xr=0;try{QS()}finally{Fo=0,IS(),so=0}}function NS(){var t=Kr.now(),e=t-fa;e>e0&&(cu-=e,fa=t)}function IS(){for(var t,e=da,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:da=n);Sr=t,Yc(i)}function Yc(t){if(!Fo){xr&&(xr=clearTimeout(xr));var e=t-so;e>24?(t<1/0&&(xr=setTimeout(rp,t-Kr.now()-cu)),pr&&(pr=clearInterval(pr))):(pr||(fa=Kr.now(),pr=setInterval(NS,e0)),Fo=1,t0(rp))}}function sp(t,e,n){var i=new pa;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,n),i}var VS=au("start","end","cancel","interrupt"),BS=[],i0=0,lp=1,jc=2,Ql=3,ap=4,Fc=5,Nl=6;function hu(t,e,n,i,o,r){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;WS(t,n,{name:e,index:i,group:o,on:VS,tween:BS,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:i0})}function Td(t,e){var n=On(t,e);if(n.state>i0)throw new Error("too late; already scheduled");return n}function Ln(t,e){var n=On(t,e);if(n.state>Ql)throw new Error("too late; already running");return n}function On(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function WS(t,e,n){var i=t.__transition,o;i[e]=n,n.timer=n0(r,0,n.time);function r(u){n.state=lp,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,h,d,f;if(n.state!==lp)return a();for(c in i)if(f=i[c],f.name===n.name){if(f.state===Ql)return sp(s);f.state===ap?(f.state=Nl,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+cjc&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function vk(t,e,n){var i,o,r=gk(e)?Td:Ln;return function(){var s=r(this,t),l=s.on;l!==i&&(o=(i=l).copy()).on(e,n),s.on=o}}function yk(t,e){var n=this._id;return arguments.length<2?On(this.node(),n).on.on(t):this.each(vk(n,t,e))}function Ok(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function wk(){return this.on("end.remove",Ok(this._id))}function _k(t){var e=this._name,n=this._id;typeof t!="function"&&(t=bd(t));for(var i=this._groups,o=i.length,r=new Array(o),s=0;s()=>t;function Yk(t,{sourceEvent:e,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Jn(t,e,n){this.k=t,this.x=e,this.y=n}Jn.prototype={constructor:Jn,scale:function(t){return t===1?this:new Jn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Jn(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+")"}};var Ho=new Jn(1,0,0);Jn.prototype;function Wu(t){t.stopImmediatePropagation()}function mr(t){t.preventDefault(),t.stopImmediatePropagation()}function jk(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Fk(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function up(){return this.__zoom||Ho}function Hk(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Gk(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zk(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],r=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function Kk(){var t=jk,e=Fk,n=Zk,i=Hk,o=Gk,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=RS,u=au("start","zoom","end"),c,h,d,f=500,p=150,g=0,w=10;function y(S){S.property("__zoom",up).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",R).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(S,A,P,E){var B=S.selection?S.selection():S;B.property("__zoom",up),S!==B?k(S,A,P,E):B.interrupt().each(function(){x(this,arguments).event(E).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},y.scaleBy=function(S,A,P,E){y.scaleTo(S,function(){var B=this.__zoom.k,q=typeof A=="function"?A.apply(this,arguments):A;return B*q},P,E)},y.scaleTo=function(S,A,P,E){y.transform(S,function(){var B=e.apply(this,arguments),q=this.__zoom,N=P==null?b(B):typeof P=="function"?P.apply(this,arguments):P,te=q.invert(N),U=typeof A=="function"?A.apply(this,arguments):A;return n(T(_(q,U),N,te),B,s)},P,E)},y.translateBy=function(S,A,P,E){y.transform(S,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),s)},null,E)},y.translateTo=function(S,A,P,E,B){y.transform(S,function(){var q=e.apply(this,arguments),N=this.__zoom,te=E==null?b(q):typeof E=="function"?E.apply(this,arguments):E;return n(Ho.translate(te[0],te[1]).scale(N.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof P=="function"?-P.apply(this,arguments):-P),q,s)},E,B)};function _(S,A){return A=Math.max(r[0],Math.min(r[1],A)),A===S.k?S:new Jn(A,S.x,S.y)}function T(S,A,P){var E=A[0]-P[0]*S.k,B=A[1]-P[1]*S.k;return E===S.x&&B===S.y?S:new Jn(S.k,E,B)}function b(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function k(S,A,P,E){S.on("start.zoom",function(){x(this,arguments).event(E).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(E).end()}).tween("zoom",function(){var B=this,q=arguments,N=x(B,q).event(E),te=e.apply(B,q),U=P==null?b(te):typeof P=="function"?P.apply(B,q):P,le=Math.max(te[1][0]-te[0][0],te[1][1]-te[0][1]),ae=B.__zoom,G=typeof A=="function"?A.apply(B,q):A,Q=a(ae.invert(U).concat(le/ae.k),G.invert(U).concat(le/G.k));return function(ne){if(ne===1)ne=G;else{var ue=Q(ne),Ae=le/ue[2];ne=new Jn(Ae,U[0]-ue[0]*Ae,U[1]-ue[1]*Ae)}N.zoom(null,ne)}})}function x(S,A,P){return!P&&S.__zooming||new $(S,A)}function $(S,A){this.that=S,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(S,A),this.taps=0}$.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,A){return this.mouse&&S!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var A=pn(this.that).datum();u.call(S,this.that,new Yk(S,{sourceEvent:this.sourceEvent,target:y,type:S,transform:this.that.__zoom,dispatch:u}),A)}};function L(S,...A){if(!t.apply(this,arguments))return;var P=x(this,A).event(S),E=this.__zoom,B=Math.max(r[0],Math.min(r[1],E.k*Math.pow(2,i.apply(this,arguments)))),q=Pn(S);if(P.wheel)(P.mouse[0][0]!==q[0]||P.mouse[0][1]!==q[1])&&(P.mouse[1]=E.invert(P.mouse[0]=q)),clearTimeout(P.wheel);else{if(E.k===B)return;P.mouse=[q,E.invert(q)],Il(this),P.start()}mr(S),P.wheel=setTimeout(N,p),P.zoom("mouse",n(T(_(E,B),P.mouse[0],P.mouse[1]),P.extent,s));function N(){P.wheel=null,P.end()}}function V(S,...A){if(d||!t.apply(this,arguments))return;var P=S.currentTarget,E=x(this,A,!0).event(S),B=pn(S.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",le,!0),q=Pn(S,P),N=S.clientX,te=S.clientY;Uv(S.view),Wu(S),E.mouse=[q,this.__zoom.invert(q)],Il(this),E.start();function U(ae){if(mr(ae),!E.moved){var G=ae.clientX-N,Q=ae.clientY-te;E.moved=G*G+Q*Q>g}E.event(ae).zoom("mouse",n(T(E.that.__zoom,E.mouse[0]=Pn(ae,P),E.mouse[1]),E.extent,s))}function le(ae){B.on("mousemove.zoom mouseup.zoom",null),Yv(ae.view,E.moved),mr(ae),E.event(ae).end()}}function R(S,...A){if(t.apply(this,arguments)){var P=this.__zoom,E=Pn(S.changedTouches?S.changedTouches[0]:S,this),B=P.invert(E),q=P.k*(S.shiftKey?.5:2),N=n(T(_(P,q),E,B),e.apply(this,A),s);mr(S),l>0?pn(this).transition().duration(l).call(k,N,E,S):pn(this).call(y.transform,N,E,S)}}function z(S,...A){if(t.apply(this,arguments)){var P=S.touches,E=P.length,B=x(this,A,S.changedTouches.length===E).event(S),q,N,te,U;for(Wu(S),N=0;N(t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom",t))(be||{}),Cd=(t=>(t.Partial="partial",t.Full="full",t))(Cd||{}),Po=(t=>(t.Bezier="default",t.SimpleBezier="simple-bezier",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t))(Po||{}),lo=(t=>(t.Strict="strict",t.Loose="loose",t))(lo||{}),Hc=(t=>(t.Arrow="arrow",t.ArrowClosed="arrowclosed",t))(Hc||{}),Qr=(t=>(t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal",t))(Qr||{}),l0=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(l0||{});const a0="vue-flow__node-desc",u0="vue-flow__edge-desc",Jk="vue-flow__aria-live",c0=["Enter"," ","Escape"],No={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function cp(t){return{...t.computedPosition||{x:0,y:0},width:t.dimensions.width||0,height:t.dimensions.height||0}}function Gc(t,e){const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),i=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*i)}function du(t){return{width:t.offsetWidth,height:t.offsetHeight}}function si(t,e=0,n=1){return Math.min(Math.max(t,e),n)}function h0(t,e){return{x:si(t.x,e[0][0],e[1][0]),y:si(t.y,e[0][1],e[1][1])}}function hp(t){const e=t.getRootNode(),n=qd();return"elementFromPoint"in e?e:n.document}function Go(t){return t&&typeof t=="object"&&"id"in t&&"source"in t&&"target"in t}function e2(t){return Go(t)&&"sourceNode"in t&&"targetNode"in t}function Nr(t){return t&&typeof t=="object"&&"id"in t&&"position"in t&&!Go(t)}function Co(t){return Nr(t)&&"computedPosition"in t}function t2(t){return!!t.width&&!!t.height&&!!t.x&&!!t.y}function n2(t,e={}){let n=e;return Co(t)||(n={type:t.type??e.type??"default",dimensions:Ki({width:0,height:0}),handleBounds:{source:[],target:[]},computedPosition:Ki({z:0,...t.position}),draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,...e,data:Ge(t.data)?t.data:{},events:Ki(Ge(t.events)?t.events:{})}),Object.assign({},n,t,{id:t.id.toString()})}function d0(t,e={}){const n=Ge(t.events)?t.events:e.events&&Ge(e.events)?e.events:{},i=Ge(t.data)?t.data:e.data&&Ge(e.data)?e.data:{};return e=e2(t)?e:{...e,sourceHandle:(t.sourceHandle?t.sourceHandle.toString():void 0)||e.sourceHandle,targetHandle:(t.targetHandle?t.targetHandle.toString():void 0)||e.targetHandle,type:t.type??e.type??"default",source:t.source.toString()||e.source,target:t.target.toString()||e.target,updatable:t.updatable??e.updatable,selectable:t.selectable??e.selectable,focusable:t.focusable??e.focusable,data:i,events:Ki(n),label:(t.label&&!ei(t.label)?Ki(t.label):t.label)||e.label,interactionWidth:t.interactionWidth||e.interactionWidth},Object.assign({},e,t,{id:t.id.toString()})}function f0({source:t,sourceHandle:e,target:n,targetHandle:i}){return`vueflow__edge-${t}${e??""}-${n}${i??""}`}function i2(t,e){return e.some(n=>Go(n)&&n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle))}function o2({x:t,y:e},{x:n,y:i,zoom:o}){return{x:t*o+n,y:e*o+i}}function p0({x:t,y:e},{x:n,y:i,zoom:o},r,[s,l]){const a={x:(t-n)/o,y:(e-i)/o};return r?{x:s*Math.round(a.x/s),y:l*Math.round(a.y/l)}:a}function m0(t,e){return{x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}}function ma({x:t,y:e,width:n,height:i}){return{x:t,y:e,x2:t+n,y2:e+i}}function g0({x:t,y:e,x2:n,y2:i}){return{x:t,y:e,width:n-t,height:i-e}}function r2(t,e){return g0(m0(ma(t),ma(e)))}function $d(t){const e=t.reduce((n,{computedPosition:i={x:0,y:0},dimensions:o={width:0,height:0}}={})=>m0(n,ma({...i,...o})),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return g0(e)}function v0(t,e,{x:n,y:i,zoom:o}={x:0,y:0,zoom:1},r=!1,s=!1){const l={x:(e.x-n)/o,y:(e.y-i)/o,width:e.width/o,height:e.height/o};return t.filter(a=>{const{computedPosition:u={x:0,y:0},dimensions:c={width:0,height:0},selectable:h}=a;if(s&&!h)return!1;const d={...u,width:c.width||0,height:c.height||0},f=Gc(l,d),p=typeof c.width>"u"||typeof c.height>"u"||c.width===0||c.height===0,g=r&&f>0,w=c.width*c.height;return p||g||f>=w})}function Kn(t,e){const n=t.map(i=>ei(i)?i:i.id);return e.filter(i=>n.includes(i.source)||n.includes(i.target))}function dp(t,e,n,i,o,r=.1,s={x:0,y:0}){const l=e/(t.width*(1+r)),a=n/(t.height*(1+r)),u=Math.min(l,a),c=si(u,i,o),h=t.x+t.width/2,d=t.y+t.height/2,f=e/2-h*c+(s.x??0),p=n/2-d*c+(s.y??0);return{x:f,y:p,zoom:c}}function s2(t,e){return{x:e.x+t.x,y:e.y+t.y,z:(t.z>e.z?t.z:e.z)+1}}function y0(t,e){if(!t.parentNode)return!1;const n=e(t.parentNode);return n?n.selected?!0:y0(n,e):!1}function Fi(t,e){return typeof t>"u"?"":typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(n=>`${n}=${t[n]}`).join("&")}`}function fp(t,e,n){return tn?-si(Math.abs(t-n),1,50)/50:0}function O0(t,e){const n=fp(t.x,35,e.width-35)*20,i=fp(t.y,35,e.height-35)*20;return[n,i]}function Lu(t,e){if(e){const n=t.position.x+t.dimensions.width-e.dimensions.width,i=t.position.y+t.dimensions.height-e.dimensions.height;if(n>0||i>0||t.position.x<0||t.position.y<0){let o={};if(Zo(e.style)?o={...e.style(e)}:e.style&&(o={...e.style}),o.width=o.width??`${e.dimensions.width}px`,o.height=o.height??`${e.dimensions.height}px`,n>0)if(ei(o.width)){const r=Number(o.width.replace("px",""));o.width=`${r+n}px`}else o.width+=n;if(i>0)if(ei(o.height)){const r=Number(o.height.replace("px",""));o.height=`${r+i}px`}else o.height+=i;if(t.position.x<0){const r=Math.abs(t.position.x);if(e.position.x=e.position.x-r,ei(o.width)){const s=Number(o.width.replace("px",""));o.width=`${s+r}px`}else o.width+=r;t.position.x=0}if(t.position.y<0){const r=Math.abs(t.position.y);if(e.position.y=e.position.y-r,ei(o.height)){const s=Number(o.height.replace("px",""));o.height=`${s+r}px`}else o.height+=r;t.position.y=0}e.dimensions.width=Number(o.width.toString().replace("px","")),e.dimensions.height=Number(o.height.toString().replace("px","")),Zo(e.style)?e.style=r=>{const s=e.style;return{...s(r),...o}}:e.style={...e.style,...o}}}}function pp(t,e){t.filter(i=>i.type==="add"||i.type==="remove").forEach(i=>{if(i.type==="add")e.findIndex(o=>o.id===i.item.id)===-1&&e.push(i.item);else if(i.type==="remove"){const o=e.findIndex(r=>r.id===i.id);o!==-1&&e.splice(o,1)}});const n=e.map(i=>i.id);return e.forEach(i=>{var o,r;const s=t.filter(l=>l.id===i.id);for(const l of s)switch(l.type){case"select":i.selected=l.selected;break;case"position":if(Co(i)&&(typeof l.position<"u"&&(i.position=l.position),typeof l.dragging<"u"&&(i.dragging=l.dragging),i.expandParent&&i.parentNode)){const a=e[n.indexOf(i.parentNode)];a&&Co(a)&&Lu(i,a)}break;case"dimensions":if(Co(i)){if(typeof l.dimensions<"u"&&(i.dimensions=l.dimensions),typeof l.updateStyle<"u"&&(i.style={...i.style||{},width:`${(o=l.dimensions)==null?void 0:o.width}px`,height:`${(r=l.dimensions)==null?void 0:r.height}px`}),typeof l.resizing<"u"&&(i.resizing=l.resizing),i.expandParent&&i.parentNode){const a=e[n.indexOf(i.parentNode)];a&&Co(a)&&(a.initialized?Lu(i,a):Ci(()=>{Lu(i,a)}))}i.initialized||(i.initialized=!0)}break}}),e}function Gn(t,e){return{id:t,type:"select",selected:e}}function mp(t){return{item:t,type:"add"}}function Hs(t){return{id:t,type:"remove"}}function zu(t,e){return t.reduce((n,i)=>{let o=e.includes(i.id);Ge(i.selectable)&&!i.selectable&&(o=!1);const r=Co(i)?"changedNodes":"changedEdges";return!i.selected&&o?n[r].push(Gn(i.id,!0)):i.selected&&!o&&n[r].push(Gn(i.id,!1)),n},{changedNodes:[],changedEdges:[]})}function me(t=()=>{}){const e=new Set,n=()=>e.size>0;t&&e.add(t);const i=o=>{e.delete(o)};return{on:o=>{e.has(t)&&e.delete(t),e.add(o);const r=()=>i(o);return ks(r),{off:r}},off:i,trigger:o=>Promise.all(Array.from(e).map(r=>r(o))),hasListeners:n}}function gp(t,e,n){let i=t;do{if(i&&i.matches(e))return!0;if(i===n)return!1;i=i.parentElement}while(i);return!1}function l2(t,e,n,i,o){return t.filter(r=>(r.selected||r.id===o)&&(!r.parentNode||!y0(r,i))&&(r.draggable||e&&typeof r.draggable>"u")).map(r=>{var s,l;return Ki({id:r.id,position:r.position||{x:0,y:0},distance:{x:n.x-((s=r.computedPosition)==null?void 0:s.x)||0,y:n.y-((l=r.computedPosition)==null?void 0:l.y)||0},from:r.computedPosition,extent:r.extent,parentNode:r.parentNode,dimensions:r.dimensions})})}function Xu({id:t,dragItems:e,findNode:n}){const i=e.reduce((o,r)=>{const s=n(r.id);return s&&o.push(s),o},[]);return[t?i.find(o=>o.id===t):i[0],i]}function w0(t){if(Array.isArray(t))switch(t.length){case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];case 4:return t;default:return[0,0,0,0]}return[t,t,t,t]}function a2(t,e,n){const[i,o,r,s]=typeof t!="string"?w0(t.padding):[0,0,0,0];return n&&ti(n.computedPosition.x)&&ti(n.computedPosition.y)&&ti(n.dimensions.width)&&ti(n.dimensions.height)?[[n.computedPosition.x+s,n.computedPosition.y+i],[n.computedPosition.x+n.dimensions.width-o,n.computedPosition.y+n.dimensions.height-r]]:!1}function u2(t,e,n,i){let o=t.extent||n;if(o==="parent"||!Array.isArray(o)&&(o==null?void 0:o.range)==="parent")if(t.parentNode&&i&&t.dimensions.width&&t.dimensions.height){const r=a2(o,t,i);r&&(o=r)}else e(new xt(yt.NODE_EXTENT_INVALID,t.id)),o=n;else if(Array.isArray(o)){const r=(i==null?void 0:i.computedPosition.x)||0,s=(i==null?void 0:i.computedPosition.y)||0;o=[[o[0][0]+r,o[0][1]+s],[o[1][0]+r,o[1][1]+s]]}else if(o!=null&&o.range&&Array.isArray(o.range)){const[r,s,l,a]=w0(o.padding),u=(i==null?void 0:i.computedPosition.x)||0,c=(i==null?void 0:i.computedPosition.y)||0;o=[[o.range[0][0]+u+a,o.range[0][1]+c+r],[o.range[1][0]+u-s,o.range[1][1]+c-l]]}return o}function c2({width:t,height:e},n){return[n[0],[n[1][0]-(t||0),n[1][1]-(e||0)]]}function Ed(t,e,n,i,o){const r=c2(t.dimensions,u2(t,n,i,o)),s=h0(e,r);return{position:{x:s.x-((o==null?void 0:o.computedPosition.x)||0),y:s.y-((o==null?void 0:o.computedPosition.y)||0)},computedPosition:s}}function Zc(t,e,n){const i=((n==null?void 0:n.x)??0)+e.x,o=((n==null?void 0:n.y)??0)+e.y,r=(n==null?void 0:n.width)??e.width,s=(n==null?void 0:n.height)??e.height;switch(t){case be.Top:return{x:i+r/2,y:o};case be.Right:return{x:i+r,y:o+s/2};case be.Bottom:return{x:i+r/2,y:o+s};case be.Left:return{x:i,y:o+s/2}}}function vp(t=[],e){return t.length?!e||t.length===1?t[0]:e&&t.find(n=>n.id===e)||null:null}function h2(t,e,n,i,o,r){const s=Zc(n,{...t.dimensions,...t.computedPosition},e),l=Zc(r,{...i.dimensions,...i.computedPosition},o);return{sourceX:s.x,sourceY:s.y,targetX:l.x,targetY:l.y}}function d2({sourcePos:t,targetPos:e,sourceWidth:n,sourceHeight:i,targetWidth:o,targetHeight:r,width:s,height:l,viewport:a}){const u={x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x+n,e.x+o),y2:Math.max(t.y+i,e.y+r)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=ma({x:(0-a.x)/a.zoom,y:(0-a.y)/a.zoom,width:s/a.zoom,height:l/a.zoom}),h=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),d=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(h*d)>0}function f2(t,e,n=!1){const i=ti(t.zIndex);let o=i?t.zIndex:0;const r=e(t.source),s=e(t.target);return!r||!s?0:(n&&(o=i?t.zIndex:Math.max(r.computedPosition.z||0,s.computedPosition.z||0)),o)}var yt=(t=>(t.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",t.NODE_INVALID="NODE_INVALID",t.NODE_NOT_FOUND="NODE_NOT_FOUND",t.NODE_MISSING_PARENT="NODE_MISSING_PARENT",t.NODE_TYPE_MISSING="NODE_TYPE_MISSING",t.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",t.EDGE_INVALID="EDGE_INVALID",t.EDGE_NOT_FOUND="EDGE_NOT_FOUND",t.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",t.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",t.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",t.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",t.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",t.EDGE_ORPHANED="EDGE_ORPHANED",t))(yt||{});const yp={MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:t=>`Node is invalid -Node: ${t}`,NODE_NOT_FOUND:t=>`Node not found -Node: ${t}`,NODE_MISSING_PARENT:(t,e)=>`Node is missing a parent -Node: ${t} -Parent: ${e}`,NODE_TYPE_MISSING:t=>`Node type is missing -Type: ${t}`,NODE_EXTENT_INVALID:t=>`Only child nodes can use a parent extent -Node: ${t}`,EDGE_INVALID:t=>`An edge needs a source and a target -Edge: ${t}`,EDGE_SOURCE_MISSING:(t,e)=>`Edge source is missing -Edge: ${t} -Source: ${e}`,EDGE_TARGET_MISSING:(t,e)=>`Edge target is missing -Edge: ${t} -Target: ${e}`,EDGE_TYPE_MISSING:t=>`Edge type is missing -Type: ${t}`,EDGE_SOURCE_TARGET_SAME:(t,e,n)=>`Edge source and target are the same -Edge: ${t} -Source: ${e} -Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(t,e,n)=>`Edge source or target is missing -Edge: ${t} -Source: ${e} -Target: ${n}`,EDGE_ORPHANED:t=>`Edge was orphaned (suddenly missing source or target) and has been removed -Edge: ${t}`,EDGE_NOT_FOUND:t=>`Edge not found -Edge: ${t}`};let xt=class extends Error{constructor(e,...n){var i;super((i=yp[e])==null?void 0:i.call(yp,...n)),this.code=e}};function Md(t){return"clientX"in t}function to(t,e){var n,i;const o=Md(t),r=o?t.clientX:(n=t.touches)==null?void 0:n[0].clientX,s=o?t.clientY:(i=t.touches)==null?void 0:i[0].clientY;return{x:r-((e==null?void 0:e.left)??0),y:s-((e==null?void 0:e.top)??0)}}function ei(t){return typeof t=="string"}function Zo(t){return typeof t=="function"}function Uu(t){return typeof t=="boolean"}function ti(t){return typeof t=="number"}const ga=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function _0(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function Yu(t){t==null||t.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Op(t,e,n,i){return(e[n]||[]).reduce((o,r)=>{var s,l;return`${t.id}-${r.id}-${n}`!==i&&o.push({id:r.id||null,type:n,nodeId:t.id,x:(((s=t.computedPosition)==null?void 0:s.x)??0)+r.x+r.width/2,y:(((l=t.computedPosition)==null?void 0:l.y)??0)+r.y+r.height/2,width:r.width,height:r.height}),o},[])}function p2(t,e,n,i,o,r){const{x:s,y:l}=to(t),a=e.elementsFromPoint(s,l).find(f=>f.classList.contains("vue-flow__handle"));if(a){const f=a.getAttribute("data-nodeid");if(f){const p=Ad(void 0,a),g=a.getAttribute("data-handleid"),w=r({nodeId:f,id:g,type:p});if(w)return{handle:{id:g,type:p,nodeId:f,x:n.x,y:n.y},validHandleResult:w}}}let u=[],c=1/0;if(o.forEach(f=>{const p=Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2);if(p<=i){const g=r(f);p<=c&&(pf.isValid),d=u.some(({handle:f})=>f.type==="target");return u.find(({handle:f,validHandleResult:p})=>d?f.type==="target":h?p.isValid:!0)||u[0]}function wp(t,e,n,i,o,r,s,l,a,u){const c=r==="target",h=l.querySelector(`.vue-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),{x:d,y:f}=to(t),p=l.elementFromPoint(d,f),g=p!=null&&p.classList.contains("vue-flow__handle")?p:h,w=_0();if(g){w.handleDomNode=g;const y=Ad(void 0,g),_=g.getAttribute("data-nodeid"),T=g.getAttribute("data-handleid"),b=g.classList.contains("connectable"),k=g.classList.contains("connectableend"),x={source:c?_:i,sourceHandle:c?T:o,target:c?i:_,targetHandle:c?o:T};w.connection=x;const $=b&&k&&(n===lo.Strict?c&&y==="source"||!c&&y==="target":_!==i||T!==o);w.endHandle={nodeId:_,handleId:T,type:y},$&&(w.isValid=s(x,{edges:a,sourceNode:u(x.source),targetNode:u(x.target)}))}return w}function m2({nodes:t,nodeId:e,handleId:n,handleType:i}){return t.reduce((o,r)=>{const{handleBounds:s}=r;let l=[],a=[];return s&&(l=Op(r,s,"source",`${e}-${n}-${i}`),a=Op(r,s,"target",`${e}-${n}-${i}`)),o.push(...l,...a),o},[])}function Ad(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function g2(t,e){let n=null;return e?n="valid":t&&!e&&(n="invalid"),n}const v2=["production","prod"];function b0(t,...e){v2.includes("production")||console.warn(`[Vue Flow]: ${t}`,...e)}function _p(t,e,n){const i=e.querySelectorAll(`.vue-flow__handle${t}`);if(!i||!i.length)return;const o=Array.from(i),r=e.getBoundingClientRect();return o.map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(l.left-r.left)/n,y:(l.top-r.top)/n,...du(s)}})}function Kc(t,e,n,i,o,r=!1,s){o.value=!1,t.selected?(r||t.selected&&e)&&(i([t]),Ci(()=>{s.blur()})):n([t])}function Ge(t){return typeof O(t)<"u"}function y2(t,e,n){if(!t.source||!t.target)return n(new xt(yt.EDGE_INVALID,t.id)),!1;let i;return Go(t)?i=t:i={...t,id:f0(t)},i=d0(i),i2(i,e)?!1:i}function O2(t,e,n,i,o,r){if(!e.source||!e.target)return r(new xt(yt.EDGE_INVALID,t.id)),!1;const s=i(t.id);if(!s)return r(new xt(yt.EDGE_NOT_FOUND,t.id)),!1;const{id:l,...a}=t,u={...a,id:o?f0(e):l,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle};return n.splice(n.indexOf(s),1,u),u}function bp(t,e,n,i){const o={},r=t.reduce((l,a)=>{if(!Nr(a))return i(new xt(yt.NODE_INVALID)),l;const u=n2(a,{...n(a.id),parentNode:a.parentNode});return a.parentNode&&(o[a.parentNode]=!0),l.concat(u)},[]),s=[...r,...e];for(const l of r){const a=s.find(u=>u.id===l.parentNode);l.parentNode&&!a&&i(new xt(yt.NODE_MISSING_PARENT,l.id,l.parentNode)),(l.parentNode||o[l.id])&&(o[l.id]&&(l.isParent=!0),a&&(a.isParent=!0))}return r}function x0(t){const{vueFlowRef:e,snapToGrid:n,snapGrid:i,noDragClassName:o,nodes:r,nodeExtent:s,viewport:l,autoPanOnNodeDrag:a,nodesDraggable:u,panBy:c,findNode:h,multiSelectionActive:d,nodesSelectionActive:f,selectNodesOnDrag:p,removeSelectedElements:g,addSelectedNodes:w,updateNodePositions:y,emits:_}=Ze(),{onStart:T,onDrag:b,onStop:k,el:x,disabled:$,id:L,selectable:V,dragHandle:R}=t,z=oe(!1);let j=[],J,S=null,A={x:void 0,y:void 0},P={x:0,y:0},E=null,B=0,q=!1;const N=A0(),te=({x:le,y:ae})=>{A={x:le,y:ae};let G=!1;if(j=j.map(Q=>{const ne={x:le-Q.distance.x,y:ae-Q.distance.y};n.value&&(ne.x=i.value[0]*Math.round(ne.x/i.value[0]),ne.y=i.value[1]*Math.round(ne.y/i.value[1]));const{computedPosition:ue}=Ed(Q,ne,_.error,s.value,Q.parentNode?h(Q.parentNode):void 0);return G=G||Q.position.x!==ue.x||Q.position.y!==ue.y,Q.position=ue,Q}),!!G&&(y(j,!0,!0),z.value=!0,E)){const[Q,ne]=Xu({id:L,dragItems:j,findNode:h});b({event:E,node:Q,nodes:ne})}},U=()=>{if(!S)return;const[le,ae]=O0(P,S);if(le!==0||ae!==0){const G={x:(A.x??0)-le/l.value.zoom,y:(A.y??0)-ae/l.value.zoom};c({x:le,y:ae})&&te(G)}B=requestAnimationFrame(U)};return Me([()=>Re($),x],([le,ae])=>{if(ae){const G=pn(ae);le?G.on(".drag",null):(J=aS().on("start",Q=>{var ne;const ue=h(L);!p.value&&!d.value&&ue&&(ue.selected||g()),ue&&Re(V)&&p.value&&Kc(ue,d.value,w,g,f,!1,ae);const Ae=N(Q);if(A=Ae,j=l2(r.value,u.value,Ae,h,L),j.length){const[D,I]=Xu({id:L,dragItems:j,findNode:h});T({event:Q.sourceEvent,node:D,nodes:I})}S=((ne=e.value)==null?void 0:ne.getBoundingClientRect())||null,P=to(Q.sourceEvent,S)}).on("drag",Q=>{const ne=N(Q);!q&&a.value&&(q=!0,U()),(A.x!==ne.xSnapped||A.y!==ne.ySnapped)&&j.length&&(E=Q.sourceEvent,P=to(Q.sourceEvent,S),te(ne))}).on("end",Q=>{if(z.value=!1,q=!1,cancelAnimationFrame(B),j.length){y(j,!1,!1);const[ne,ue]=Xu({id:L,dragItems:j,findNode:h});k({event:Q.sourceEvent,node:ne,nodes:ue})}}).filter(Q=>{const ne=Q.target,ue=Re(R);return!Q.button&&(!o.value||!gp(ne,`.${o.value}`,ae)&&(!ue||gp(ne,ue,ae)))}),G.call(J))}}),z}function w2(){return{edgesChange:me(),nodesChange:me(),nodeDoubleClick:me(),nodeClick:me(),nodeMouseEnter:me(),nodeMouseMove:me(),nodeMouseLeave:me(),nodeContextMenu:me(),nodeDragStart:me(),nodeDrag:me(),nodeDragStop:me(),nodesInitialized:me(),miniMapNodeClick:me(),miniMapNodeDoubleClick:me(),miniMapNodeMouseEnter:me(),miniMapNodeMouseMove:me(),miniMapNodeMouseLeave:me(),connect:me(),connectStart:me(),connectEnd:me(),clickConnectStart:me(),clickConnectEnd:me(),paneReady:me(),move:me(),moveStart:me(),moveEnd:me(),selectionDragStart:me(),selectionDrag:me(),selectionDragStop:me(),selectionContextMenu:me(),selectionStart:me(),selectionEnd:me(),viewportChangeStart:me(),viewportChange:me(),viewportChangeEnd:me(),paneScroll:me(),paneClick:me(),paneContextMenu:me(),paneMouseEnter:me(),paneMouseMove:me(),paneMouseLeave:me(),edgeContextMenu:me(),edgeMouseEnter:me(),edgeMouseMove:me(),edgeMouseLeave:me(),edgeDoubleClick:me(),edgeClick:me(),edgeUpdateStart:me(),edgeUpdate:me(),edgeUpdateEnd:me(),updateNodeInternals:me(),error:me(t=>b0(t.message))}}function _2(t,e){su(()=>{for(const[n,i]of Object.entries(e.value)){const o=r=>{t(n,r)};i.on(o),ks(()=>{i.off(o)})}})}function S0(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}const b2=["data-id","data-handleid","data-nodeid","data-handlepos"],x2={name:"Handle",compatConfig:{MODE:3}},xi=Le({...x2,props:{id:null,type:null,position:{default:be.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(t){const e=S0(t,["position","connectable","connectableStart","connectableEnd","id"]),n=Vc(e,"type","source"),i=Vc(e,"isValidConnection",void 0),{connectionStartHandle:o,connectionClickStartHandle:r,connectionEndHandle:s,vueFlowRef:l,nodesConnectable:a,noDragClassName:u,noPanClassName:c}=Ze(),{id:h,node:d,nodeEl:f,connectedEdges:p}=wT(),g=oe(),w=ye(()=>t.id??`${h}__handle-${t.position}`),y=ye(()=>typeof t.connectableStart<"u"?t.connectableStart:!0),_=ye(()=>typeof t.connectableEnd<"u"?t.connectableEnd:!0),{handlePointerDown:T,handleClick:b}=D0({nodeId:h,handleId:w,isValidConnection:i,type:n}),k=ye(()=>ei(t.connectable)&&t.connectable==="single"?!p.value.some(R=>{const z=R[`${n.value}Handle`];return R[n.value]!==h?!1:z?z===w.value:!0}):Zo(t.connectable)?t.connectable(d,p.value):Ge(t.connectable)?t.connectable:a.value),x=ye(()=>{var R,z,j,J,S,A;return((R=o.value)==null?void 0:R.nodeId)===h&&((z=o.value)==null?void 0:z.handleId)===w.value&&((j=o.value)==null?void 0:j.type)===n.value||((J=s.value)==null?void 0:J.nodeId)===h&&((S=s.value)==null?void 0:S.handleId)===w.value&&((A=s.value)==null?void 0:A.type)===n.value}),$=ye(()=>{var R,z,j;return((R=r.value)==null?void 0:R.nodeId)===h&&((z=r.value)==null?void 0:z.handleId)===w.value&&((j=r.value)==null?void 0:j.type)===n.value});$i(()=>d.initialized).toBe(!0,{flush:"post"}).then(()=>{var R;const z=(R=d.handleBounds[n.value])==null?void 0:R.find(B=>B.id===w.value);if(!l.value||z)return;const j=l.value.querySelector(".vue-flow__transformationpane");if(!f.value||!g.value||!j||!w.value)return;const J=f.value.getBoundingClientRect(),S=g.value.getBoundingClientRect(),A=window.getComputedStyle(j),{m22:P}=new window.DOMMatrixReadOnly(A.transform),E={id:w.value,position:t.position,x:(S.left-J.left)/P,y:(S.top-J.top)/P,...du(g.value)};d.handleBounds[n.value]=[...d.handleBounds[n.value]??[],E]});function L(R){const z=Md(R);k.value&&y.value&&(z&&R.button===0||!z)&&T(R)}function V(R){!h||!r.value&&!y.value||k.value&&b(R)}return(R,z)=>(M(),se("div",{ref_key:"handle",ref:g,"data-id":`${O(h)}-${O(w)}-${O(n)}`,"data-handleid":O(w),"data-nodeid":O(h),"data-handlepos":t.position,class:en(["vue-flow__handle",[`vue-flow__handle-${t.position}`,`vue-flow__handle-${O(w)}`,O(u),O(c),O(n),{connectable:O(k),connecting:O($),connectablestart:O(y),connectableend:O(_),connectionindicator:O(k)&&(O(y)&&!O(x)||O(_)&&O(x))}]]),onMousedown:L,onTouchstartPassive:L,onClick:V},[Ve(R.$slots,"default",{id:t.id})],42,b2))}}),fu=function({sourcePosition:t=be.Bottom,targetPosition:e=be.Top,label:n,connectable:i=!0,isValidTargetPos:o,isValidSourcePos:r}){return[Ie(xi,{type:"target",position:e,connectable:i,isValidConnection:o}),typeof n!="string"&&n?Ie(n):Ie("div",{innerHTML:n}),Ie(xi,{type:"source",position:t,connectable:i,isValidConnection:r})]};fu.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable"];fu.inheritAttrs=!1;fu.compatConfig={MODE:3};const S2=fu,pu=function({sourcePosition:t=be.Bottom,label:e,connectable:n=!0,isValidSourcePos:i}){return[typeof e!="string"&&e?Ie(e):Ie("div",{innerHTML:e}),Ie(xi,{type:"source",position:t,connectable:n,isValidConnection:i})]};pu.props=["sourcePosition","label","isValidSourcePos","connectable"];pu.inheritAttrs=!1;pu.compatConfig={MODE:3};const k2=pu,mu=function({targetPosition:t=be.Top,label:e,connectable:n=!0,isValidTargetPos:i}){return[Ie(xi,{type:"target",position:t,connectable:n,isValidConnection:i}),typeof e!="string"&&e?Ie(e):Ie("div",{innerHTML:e})]};mu.props=["targetPosition","label","isValidTargetPos","connectable"];mu.inheritAttrs=!1;mu.compatConfig={MODE:3};const T2=mu,xp=Symbol("vueFlow"),Dd=Symbol("nodeId"),k0=Symbol("nodeRef"),P2=Symbol("edgeId"),C2=Symbol("edgeRef"),gu=Symbol("slots"),$2=Le({name:"Node",compatConfig:{MODE:3},props:["name","type","id","draggable","selectable","focusable","connectable","node","resizeObserver"],setup(t){ro(Dd,t.id);const{id:e,edges:n,noPanClassName:i,selectNodesOnDrag:o,nodesSelectionActive:r,multiSelectionActive:s,emits:l,findNode:a,removeSelectedNodes:u,addSelectedNodes:c,updateNodeDimensions:h,onUpdateNodeInternals:d,getIntersectingNodes:f,getNodeTypes:p,nodeExtent:g,elevateNodesOnSelect:w,disableKeyboardA11y:y,ariaLiveMessage:_,snapToGrid:T,snapGrid:b}=Ze(),k=R0(),x=qr(t,"node"),$=ye(()=>a(x.value.parentNode)),L=ye(()=>Kn([x.value],n.value)),V=oe(null);ro(k0,V);const{emit:R,on:z}=bT(x.value,l),j=x0({id:t.id,el:V,disabled:()=>!t.draggable,selectable:()=>t.selectable,dragHandle:()=>x.value.dragHandle,onStart(G){R.dragStart({...G,intersections:f(x.value)})},onDrag(G){R.drag({...G,intersections:f(x.value)})},onStop(G){R.dragStop({...G,intersections:f(x.value)})}}),J=ye(()=>x.value.class instanceof Function?x.value.class(x.value):x.value.class),S=ye(()=>{const G=(x.value.style instanceof Function?x.value.style(x.value):x.value.style)||{},Q=x.value.width instanceof Function?x.value.width(x.value):x.value.width,ne=x.value.height instanceof Function?x.value.height(x.value):x.value.height;return Q&&(G.width=typeof Q=="string"?Q:`${Q}px`),ne&&(G.height=typeof ne=="string"?ne:`${ne}px`),G}),A=()=>Number(x.value.zIndex??S.value.zIndex??0);return d(G=>{G.includes(t.id)&&E()}),Vn(()=>{t.resizeObserver.observe(V.value)}),cd(()=>{t.resizeObserver.unobserve(V.value)}),Me([()=>x.value.type,()=>x.value.sourcePosition,()=>x.value.targetPosition],()=>{h([{id:t.id,nodeElement:V.value,forceUpdate:!0}])},{flush:"pre"}),Me([()=>x.value.position.x,()=>x.value.position.y,()=>{var G;return(G=$.value)==null?void 0:G.computedPosition.x},()=>{var G;return(G=$.value)==null?void 0:G.computedPosition.y},()=>{var G;return(G=$.value)==null?void 0:G.computedPosition.z},()=>A(),()=>x.value.selected,()=>x.value.dimensions.height,()=>x.value.dimensions.width,()=>{var G;return(G=$.value)==null?void 0:G.dimensions.height},()=>{var G;return(G=$.value)==null?void 0:G.dimensions.width}],([G,Q,ne,ue,Ae,D])=>{const I={x:G,y:Q,z:D+(w.value&&x.value.selected?1e3:0)};ti(ne)&&ti(ue)?x.value.computedPosition=s2({x:ne,y:ue,z:Ae},I):x.value.computedPosition=I},{flush:"post",immediate:!0}),Me([()=>x.value.extent,g],([G,Q],[ne,ue])=>{(G!==ne||Q!==ue)&&P()}),x.value.extent==="parent"||typeof x.value.extent=="object"&&"range"in x.value.extent&&x.value.extent.range==="parent"?$i(()=>x.value.initialized).toBe(!0).then(P):P(),()=>Ie("div",{ref:V,"data-id":x.value.id,class:["vue-flow__node",`vue-flow__node-${t.type===!1?"default":t.name}`,{[i.value]:t.draggable,dragging:j==null?void 0:j.value,selected:x.value.selected,selectable:t.selectable,parent:x.value.isParent},J.value],style:{zIndex:x.value.computedPosition.z??A(),transform:`translate(${x.value.computedPosition.x}px,${x.value.computedPosition.y}px)`,pointerEvents:t.selectable||t.draggable?"all":"none",visibility:x.value.initialized?"visible":"hidden",...S.value},tabIndex:t.focusable?0:void 0,role:t.focusable?"button":void 0,"aria-describedby":y.value?void 0:`${a0}-${e}`,"aria-label":x.value.ariaLabel,onMouseenter:B,onMousemove:q,onMouseleave:N,onContextmenu:te,onClick:le,onDblclick:U,onKeydown:ae},[Ie(t.type===!1?p.value.default:t.type,{id:x.value.id,type:x.value.type,data:x.value.data,events:{...x.value.events,...z},selected:!!x.value.selected,resizing:!!x.value.resizing,dragging:j.value,connectable:t.connectable,position:x.value.position,dimensions:x.value.dimensions,isValidTargetPos:x.value.isValidTargetPos,isValidSourcePos:x.value.isValidSourcePos,parent:x.value.parentNode,zIndex:x.value.computedPosition.z,targetPosition:x.value.targetPosition,sourcePosition:x.value.sourcePosition,label:x.value.label,dragHandle:x.value.dragHandle,onUpdateNodeInternals:E})]);function P(){const G=x.value.computedPosition;T.value&&(G.x=b.value[0]*Math.round(G.x/b.value[0]),G.y=b.value[1]*Math.round(G.y/b.value[1]));const{computedPosition:Q,position:ne}=Ed(x.value,G,l.error,g.value,$.value);(x.value.computedPosition.x!==Q.x||x.value.computedPosition.y!==Q.y)&&(x.value.computedPosition={...x.value.computedPosition,...Q}),(x.value.position.x!==ne.x||x.value.position.y!==ne.y)&&(x.value.position=ne)}function E(){V.value&&h([{id:t.id,nodeElement:V.value,forceUpdate:!0}])}function B(G){j!=null&&j.value||R.mouseEnter({event:G,node:x.value,connectedEdges:L.value})}function q(G){j!=null&&j.value||R.mouseMove({event:G,node:x.value,connectedEdges:L.value})}function N(G){j!=null&&j.value||R.mouseLeave({event:G,node:x.value,connectedEdges:L.value})}function te(G){return R.contextMenu({event:G,node:x.value,connectedEdges:L.value})}function U(G){return R.doubleClick({event:G,node:x.value,connectedEdges:L.value})}function le(G){t.selectable&&(!o.value||!t.draggable)&&Kc(x.value,s.value,c,u,r,!1,V.value),R.click({event:G,node:x.value,connectedEdges:L.value})}function ae(G){if(!eh(G))if(c0.includes(G.key)&&t.selectable){const Q=G.key==="Escape";Kc(x.value,s.value,c,u,r,Q,V.value)}else!y.value&&t.draggable&&x.value.selected&&No[G.key]&&(_.value=`Moved selected node ${G.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~x.value.position.x}, y: ${~~x.value.position.y}`,k({x:No[G.key].x,y:No[G.key].y},G.shiftKey))}}}),E2=$2,M2=["transform"],A2=["width","height","x","y","rx","ry"],D2=["y"],R2={name:"EdgeText",compatConfig:{MODE:3}},q2=Le({...R2,props:{"aria-activedescendant":null,"aria-atomic":{type:[Boolean,String]},"aria-autocomplete":null,"aria-busy":{type:[Boolean,String]},"aria-checked":{type:[Boolean,String]},"aria-colcount":null,"aria-colindex":null,"aria-colspan":null,"aria-controls":null,"aria-current":{type:[Boolean,String]},"aria-describedby":null,"aria-details":null,"aria-disabled":{type:[Boolean,String]},"aria-dropeffect":null,"aria-errormessage":null,"aria-expanded":{type:[Boolean,String]},"aria-flowto":null,"aria-grabbed":{type:[Boolean,String]},"aria-haspopup":{type:[Boolean,String]},"aria-hidden":{type:[Boolean,String]},"aria-invalid":{type:[Boolean,String]},"aria-keyshortcuts":null,"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":null,"aria-modal":{type:[Boolean,String]},"aria-multiline":{type:[Boolean,String]},"aria-multiselectable":{type:[Boolean,String]},"aria-orientation":null,"aria-owns":null,"aria-placeholder":null,"aria-posinset":null,"aria-pressed":{type:[Boolean,String]},"aria-readonly":{type:[Boolean,String]},"aria-relevant":null,"aria-required":{type:[Boolean,String]},"aria-roledescription":null,"aria-rowcount":null,"aria-rowindex":null,"aria-rowspan":null,"aria-selected":{type:[Boolean,String]},"aria-setsize":null,"aria-sort":null,"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,innerHTML:null,class:null,style:null,color:null,height:null,id:null,lang:null,max:null,media:null,method:null,min:null,name:null,target:null,type:null,width:null,role:null,tabindex:null,"accent-height":null,accumulate:null,additive:null,"alignment-baseline":null,allowReorder:null,alphabetic:null,amplitude:null,"arabic-form":null,ascent:null,attributeName:null,attributeType:null,autoReverse:null,azimuth:null,baseFrequency:null,"baseline-shift":null,baseProfile:null,bbox:null,begin:null,bias:null,by:null,calcMode:null,"cap-height":null,clip:null,"clip-path":null,clipPathUnits:null,"clip-rule":null,"color-interpolation":null,"color-interpolation-filters":null,"color-profile":null,"color-rendering":null,contentScriptType:null,contentStyleType:null,cursor:null,cx:null,cy:null,d:null,decelerate:null,descent:null,diffuseConstant:null,direction:null,display:null,divisor:null,"dominant-baseline":null,dur:null,dx:null,dy:null,edgeMode:null,elevation:null,"enable-background":null,end:null,exponent:null,externalResourcesRequired:null,fill:null,"fill-opacity":null,"fill-rule":null,filter:null,filterRes:null,filterUnits:null,"flood-color":null,"flood-opacity":null,focusable:null,"font-family":null,"font-size":null,"font-size-adjust":null,"font-stretch":null,"font-style":null,"font-variant":null,"font-weight":null,format:null,from:null,fx:null,fy:null,g1:null,g2:null,"glyph-name":null,"glyph-orientation-horizontal":null,"glyph-orientation-vertical":null,glyphRef:null,gradientTransform:null,gradientUnits:null,hanging:null,"horiz-adv-x":null,"horiz-origin-x":null,href:null,ideographic:null,"image-rendering":null,in2:null,in:null,intercept:null,k1:null,k2:null,k3:null,k4:null,k:null,kernelMatrix:null,kernelUnitLength:null,kerning:null,keyPoints:null,keySplines:null,keyTimes:null,lengthAdjust:null,"letter-spacing":null,"lighting-color":null,limitingConeAngle:null,local:null,"marker-end":null,markerHeight:null,"marker-mid":null,"marker-start":null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,mode:null,numOctaves:null,offset:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,"overline-position":null,"overline-thickness":null,"paint-order":null,"panose-1":null,pathLength:null,patternContentUnits:null,patternTransform:null,patternUnits:null,"pointer-events":null,points:null,pointsAtX:null,pointsAtY:null,pointsAtZ:null,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,r:null,radius:null,refX:null,refY:null,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:null,requiredFeatures:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,"shape-rendering":null,slope:null,spacing:null,specularConstant:null,specularExponent:null,speed:null,spreadMethod:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,"stop-color":null,"stop-opacity":null,"strikethrough-position":null,"strikethrough-thickness":null,string:null,stroke:null,"stroke-dasharray":null,"stroke-dashoffset":null,"stroke-linecap":null,"stroke-linejoin":null,"stroke-miterlimit":null,"stroke-opacity":null,"stroke-width":null,surfaceScale:null,systemLanguage:null,tableValues:null,targetX:null,targetY:null,"text-anchor":null,"text-decoration":null,textLength:null,"text-rendering":null,to:null,transform:null,u1:null,u2:null,"underline-position":null,"underline-thickness":null,unicode:null,"unicode-bidi":null,"unicode-range":null,"unitsPer-em":null,"v-alphabetic":null,values:null,"vector-effect":null,version:null,"vert-adv-y":null,"vert-origin-x":null,"vert-origin-y":null,"v-hanging":null,"v-ideographic":null,viewBox:null,viewTarget:null,visibility:null,"v-mathematical":null,widths:null,"word-spacing":null,"writing-mode":null,x1:null,x2:null,x:null,xChannelSelector:null,"x-height":null,xlinkActuate:null,xlinkArcrole:null,xlinkHref:null,xlinkRole:null,xlinkShow:null,xlinkTitle:null,xlinkType:null,xmlns:null,y1:null,y2:null,y:null,yChannelSelector:null,z:null,zoomAndPan:null,label:null,labelStyle:{default:{}},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:{}},labelBgPadding:{default:[2,4]},labelBgBorderRadius:{default:2}},setup(t){const e=oe({x:0,y:0,width:0,height:0}),n=oe(null),i=ye(()=>`translate(${t.x-e.value.width/2} ${t.y-e.value.height/2})`);Vn(o),Me([()=>t.x,()=>t.y,n,()=>t.label],o);function o(){if(!n.value)return;const r=n.value.getBBox();(r.width!==e.value.width||r.height!==e.value.height)&&(e.value=r)}return(r,s)=>(M(),se("g",{transform:O(i),class:"vue-flow__edge-textwrapper"},[t.labelShowBg?(M(),se("rect",{key:0,class:"vue-flow__edge-textbg",width:`${e.value.width+2*t.labelBgPadding[0]}px`,height:`${e.value.height+2*t.labelBgPadding[1]}px`,x:-t.labelBgPadding[0],y:-t.labelBgPadding[1],style:mt(t.labelBgStyle),rx:t.labelBgBorderRadius,ry:t.labelBgBorderRadius},null,12,A2)):Oe("",!0),Qe("text",i_(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:e.value.height/2,dy:"0.3em",style:t.labelStyle}),[Ve(r.$slots,"default",{},()=>[O(ei)(t.label)?(M(),se(Te,{key:1},[ge(pe(t.label),1)],64)):(M(),H(_o(t.label),{key:0}))])],16,D2)],8,M2))}}),Q2=["id","d","marker-end","marker-start"],N2=["d","stroke-width"],I2={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},vu=Le({...I2,props:{labelStyle:null,labelShowBg:{type:Boolean,default:!0},labelBgStyle:null,labelBgPadding:null,labelBgBorderRadius:null,id:null,labelX:null,labelY:null,path:null,label:null,markerStart:null,markerEnd:null,interactionWidth:{default:20},style:null,ref:null},setup(t,{expose:e}){const n=S0(t,["interactionWidth","labelShowBg"]),i=oe(null),o=oe(null),r=oe(null),s=hd();return e({pathEl:i,interactionEl:o,labelEl:r}),(l,a)=>(M(),se(Te,null,[Qe("path",{id:t.id,ref_key:"pathEl",ref:i,d:t.path,style:mt(O(n).style),class:en(["vue-flow__edge-path",O(s).class]),"marker-end":t.markerEnd,"marker-start":t.markerStart},null,14,Q2),t.interactionWidth?(M(),se("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:t.path,"stroke-width":t.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,N2)):Oe("",!0),t.label&&O(ti)(t.labelX)&&O(ti)(t.labelY)?(M(),H(q2,{key:1,ref_key:"labelEl",ref:r,x:t.labelX,y:t.labelY,label:t.label,"label-show-bg":t.labelShowBg,"label-bg-style":t.labelBgStyle,"label-bg-padding":t.labelBgPadding,"label-bg-border-radius":t.labelBgBorderRadius,"label-style":t.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Oe("",!0)],64))}});function T0({sourceX:t,sourceY:e,targetX:n,targetY:i}){const o=Math.abs(n-t)/2,r=n=0?.5*t:e*25*Math.sqrt(-t)}function Sp({pos:t,x1:e,y1:n,x2:i,y2:o,c:r}){let s,l;switch(t){case be.Left:s=e-Gs(e-i,r),l=n;break;case be.Right:s=e+Gs(i-e,r),l=n;break;case be.Top:s=e,l=n-Gs(n-o,r);break;case be.Bottom:s=e,l=n+Gs(o-n,r);break}return[s,l]}function C0({sourceX:t,sourceY:e,sourcePosition:n=be.Bottom,targetX:i,targetY:o,targetPosition:r=be.Top,curvature:s=.25}){const[l,a]=Sp({pos:n,x1:t,y1:e,x2:i,y2:o,c:s}),[u,c]=Sp({pos:r,x1:i,y1:o,x2:t,y2:e,c:s}),[h,d,f,p]=P0({sourceX:t,sourceY:e,targetX:i,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${t},${e} C${l},${a} ${u},${c} ${i},${o}`,h,d,f,p]}function kp({pos:t,x1:e,y1:n,x2:i,y2:o}){let r,s;switch(t){case be.Left:case be.Right:r=.5*(e+i),s=n;break;case be.Top:case be.Bottom:r=e,s=.5*(n+o);break}return[r,s]}function $0({sourceX:t,sourceY:e,sourcePosition:n=be.Bottom,targetX:i,targetY:o,targetPosition:r=be.Top}){const[s,l]=kp({pos:n,x1:t,y1:e,x2:i,y2:o}),[a,u]=kp({pos:r,x1:i,y1:o,x2:t,y2:e}),[c,h,d,f]=P0({sourceX:t,sourceY:e,targetX:i,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${t},${e} C${s},${l} ${a},${u} ${i},${o}`,c,h,d,f]}const Tp={[be.Left]:{x:-1,y:0},[be.Right]:{x:1,y:0},[be.Top]:{x:0,y:-1},[be.Bottom]:{x:0,y:1}};function V2({source:t,sourcePosition:e=be.Bottom,target:n}){return e===be.Left||e===be.Right?t.xu[j],A=a[j]=z?(p=(L.x+V.x)/2,g=f[0].y):(p=f[0].x,g=(L.y+V.y)/2)}return[[t,{x:a.x-w.x,y:a.y-w.y},...f,{x:u.x-y.x,y:u.y-y.y},n],p,g,b,k]}function W2(t,e,n,i){const o=Math.min(Pp(t,e)/2,Pp(e,n)/2,i),{x:r,y:s}=e;if(t.x===r&&r===n.x||t.y===s&&s===n.y)return`L${r} ${s}`;if(t.y===s){const u=t.x{let _;return y>0&&y{const[n,i,o]=C0({...t,sourcePosition:t.sourcePosition??be.Bottom,targetPosition:t.targetPosition??be.Top});return Ie(vu,{path:n,labelX:i,labelY:o,...e,...t})}}}),X2=z2,U2=Le({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(t,{attrs:e}){return()=>{const[n,i,o]=$0({...t,sourcePosition:t.sourcePosition??be.Bottom,targetPosition:t.targetPosition??be.Top});return Ie(vu,{path:n,labelX:i,labelY:o,...e,...t})}}}),Y2=U2,j2=Le({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(t,{attrs:e}){return()=>{const[n,i,o]=Jc({...t,sourcePosition:t.sourcePosition??be.Bottom,targetPosition:t.targetPosition??be.Top});return Ie(vu,{path:n,labelX:i,labelY:o,...e,...t})}}}),E0=j2,F2=Le({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(t,{attrs:e}){return()=>Ie(E0,{...t,...e,borderRadius:0})}}),H2=F2,G2=Le({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(t,{attrs:e}){return()=>{const[n,i,o]=L2(t);return Ie(vu,{path:n,labelX:i,labelY:o,...e,...t})}}}),Z2=G2;function K2(t,e,n){return n===be.Left?t-e:n===be.Right?t+e:t}function J2(t,e,n){return n===be.Top?t-e:n===be.Bottom?t+e:t}const Rd=function({radius:t=10,centerX:e=0,centerY:n=0,position:i=be.Top,type:o}){return Ie("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:K2(e,t,i),cy:J2(n,t,i),r:t,stroke:"transparent",fill:"transparent"})};Rd.props=["radius","centerX","centerY","position","type"];Rd.compatConfig={MODE:3};const Cp=Rd,eT=Le({name:"Edge",compatConfig:{MODE:3},props:["name","type","id","updatable","selectable","focusable","edge"],setup(t){const{id:e,addSelectedEdges:n,connectionMode:i,edgeUpdaterRadius:o,emits:r,nodesSelectionActive:s,noPanClassName:l,getEdgeTypes:a,removeSelectedEdges:u,findEdge:c,findNode:h,isValidConnection:d}=Ze(),f=vT(t.edge,r),p=qr(t,"edge"),g=oe(!1),w=oe(!1),y=oe(""),_=oe(null),T=oe("source"),b=oe(null);ro(P2,t.id),ro(C2,b);const k=ye(()=>p.value.class instanceof Function?p.value.class(p.value):p.value.class),x=ye(()=>p.value.style instanceof Function?p.value.style(p.value):p.value.style),{handlePointerDown:$}=D0({nodeId:y,handleId:_,type:T,isValidConnection:d,edgeUpdaterType:T,onEdgeUpdate:R,onEdgeUpdateEnd:z});return()=>{const U=h(p.value.source),le=h(p.value.target);if(!U||!le||!p.value||U.hidden||le.hidden)return null;let ae;i.value===lo.Strict?ae=U.handleBounds.source:ae=[...U.handleBounds.source||[],...U.handleBounds.target||[]];const G=vp(ae,p.value.sourceHandle);let Q;i.value===lo.Strict?Q=le.handleBounds.target:Q=[...le.handleBounds.target||[],...le.handleBounds.source||[]];const ne=vp(Q,p.value.targetHandle),ue=G?G.position:be.Bottom,Ae=ne?ne.position:be.Top,{sourceX:D,sourceY:I,targetY:ie,targetX:K}=h2(U,G,ue,le,ne,Ae);return p.value.sourceX=D,p.value.sourceY=I,p.value.targetX=K,p.value.targetY=ie,Ie("g",{ref:b,key:t.id,"data-id":t.id,class:["vue-flow__edge",`vue-flow__edge-${t.type===!1?"default":t.name}`,l.value,k.value,{updating:g.value,selected:p.value.selected,animated:p.value.animated,inactive:!t.selectable}],onClick:J,onContextmenu:S,onDblclick:A,onMouseenter:P,onMousemove:E,onMouseleave:B,onKeyDown:t.focusable?te:void 0,tabIndex:t.focusable?0:void 0,"aria-label":p.value.ariaLabel===null?void 0:p.value.ariaLabel||`Edge from ${p.value.source} to ${p.value.target}`,"aria-describedby":t.focusable?`${u0}-${e}`:void 0,role:t.focusable?"button":"img"},[w.value?null:Ie(t.type===!1?a.value.default:t.type,{id:t.id,sourceNode:U,targetNode:le,source:p.value.source,target:p.value.target,type:p.value.type,updatable:t.updatable,selected:p.value.selected,animated:p.value.animated,label:p.value.label,labelStyle:p.value.labelStyle,labelShowBg:p.value.labelShowBg,labelBgStyle:p.value.labelBgStyle,labelBgPadding:p.value.labelBgPadding,labelBgBorderRadius:p.value.labelBgBorderRadius,data:p.value.data,events:{...p.value.events,...f.on},style:x.value,markerStart:`url(#${Fi(p.value.markerStart,e)})`,markerEnd:`url(#${Fi(p.value.markerEnd,e)})`,sourcePosition:ue,targetPosition:Ae,sourceX:D,sourceY:I,targetX:K,targetY:ie,sourceHandleId:p.value.sourceHandle,targetHandleId:p.value.targetHandle,interactionWidth:p.value.interactionWidth}),[t.updatable==="source"||t.updatable===!0?[Ie("g",{onMousedown:q,onMouseenter:L,onMouseout:V},Ie(Cp,{position:ue,centerX:D,centerY:I,radius:o.value,type:"source","data-type":"source"}))]:null,t.updatable==="target"||t.updatable===!0?[Ie("g",{onMousedown:N,onMouseenter:L,onMouseout:V},Ie(Cp,{position:Ae,centerX:K,centerY:ie,radius:o.value,type:"target","data-type":"target"}))]:null]])};function L(){g.value=!0}function V(){g.value=!1}function R(U,le){f.emit.update({event:U,edge:p.value,connection:le})}function z(U){f.emit.updateEnd({event:U,edge:p.value}),w.value=!1}function j(U,le){U.button===0&&(w.value=!0,y.value=le?p.value.target:p.value.source,_.value=(le?p.value.targetHandle:p.value.sourceHandle)??"",T.value=le?"target":"source",f.emit.updateStart({event:U,edge:p.value}),$(U))}function J(U){const le={event:U,edge:p.value};t.selectable&&(s.value=!1,n([p.value])),f.emit.click(le)}function S(U){f.emit.contextMenu({event:U,edge:p.value})}function A(U){f.emit.doubleClick({event:U,edge:p.value})}function P(U){f.emit.mouseEnter({event:U,edge:p.value})}function E(U){f.emit.mouseMove({event:U,edge:p.value})}function B(U){f.emit.mouseLeave({event:U,edge:p.value})}function q(U){j(U,!0)}function N(U){j(U,!1)}function te(U){var le;c0.includes(U.key)&&t.selectable&&(U.key==="Escape"?((le=b.value)==null||le.blur(),u([c(t.id)])):n([c(t.id)]))}}}),tT=eT,nT={[be.Left]:be.Right,[be.Right]:be.Left,[be.Top]:be.Bottom,[be.Bottom]:be.Top},iT=Le({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var t;const{connectionMode:e,connectionStartHandle:n,connectionEndHandle:i,connectionPosition:o,connectionLineType:r,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:a,viewport:u,findNode:c}=Ze(),h=(t=oi(gu))==null?void 0:t["connection-line"];return()=>{var d,f,p,g;if(!n.value)return null;const w=c(n.value.nodeId);if(!w)return null;const y=n.value.handleId,_=n.value.type,T=((d=i.value)==null?void 0:d.handleId)&&c(i.value.nodeId)||null,b=(o.value.x-u.value.x)/u.value.zoom,k=(o.value.y-u.value.y)/u.value.zoom,x=w.handleBounds;let $=x==null?void 0:x[_];if(e.value===lo.Loose&&($=$||(x==null?void 0:x[_==="source"?"target":"source"])),!$)return null;const L=(y?$.find(E=>E.id===y):$[0])??null,V=(L==null?void 0:L.position)||be.Top,{x:R,y:z}=Zc(V,{...w.dimensions,...w.computedPosition},L),j=T&&((f=i.value)==null?void 0:f.handleId)&&((e.value===lo.Strict?(p=T.handleBounds[_==="source"?"target":"source"])==null?void 0:p.find(E=>{var B;return E.id===((B=i.value)==null?void 0:B.handleId)}):[...T.handleBounds.source||[],...T.handleBounds.target||[]].find(E=>{var B;return E.id===((B=i.value)==null?void 0:B.handleId)}))||((g=T.handleBounds[_??"target"])==null?void 0:g[0]))||null,J=V?nT[V]:null;if(!V||!J)return null;const S=r.value??l.value.type;let A="";const P={sourceX:R,sourceY:z,sourcePosition:V,targetX:b,targetY:k,targetPosition:J};return S===Po.Bezier?[A]=C0(P):S===Po.Step?[A]=Jc({...P,borderRadius:0}):S===Po.SmoothStep?[A]=Jc(P):S===Po.SimpleBezier?[A]=$0(P):A=`M${R},${z} ${b},${k}`,Ie("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Ie("g",{class:"vue-flow__connection"},h?Ie(h,{sourceX:R,sourceY:z,sourcePosition:V,targetX:b,targetY:k,targetPosition:J,sourceNode:w,sourceHandle:L,targetNode:T,targetHandle:j,markerEnd:`url(#${Fi(l.value.markerEnd)})`,markerStart:`url(#${Fi(l.value.markerStart)})`,connectionStatus:a.value}):Ie("path",{d:A,class:[l.value.class,a,"vue-flow__connection-path"],style:s.value||l.value.style,"marker-end":`url(#${Fi(l.value.markerEnd)})`,"marker-start":`url(#${Fi(l.value.markerStart)})`})))}}}),oT=iT,rT=["tabIndex"],sT={name:"NodesSelection",compatConfig:{MODE:3}},lT=Le({...sT,setup(t){const e=Ze(),n=st(e,"emits"),i=st(e,"viewport"),o=st(e,"getSelectedNodes"),r=st(e,"noPanClassName"),s=st(e,"disableKeyboardA11y"),l=st(e,"userSelectionActive"),a=R0(),u=oe(null),c=x0({el:u,onStart(g){n.value.selectionDragStart(g)},onDrag(g){n.value.selectionDrag(g)},onStop(g){n.value.selectionDragStop(g)}});Vn(()=>{var g;s.value||(g=u.value)==null||g.focus({preventScroll:!0})});const h=ye(()=>$d(o.value)),d=ye(()=>({width:`${h.value.width}px`,height:`${h.value.height}px`,top:`${h.value.y}px`,left:`${h.value.x}px`}));function f(g){n.value.selectionContextMenu({event:g,nodes:o.value})}function p(g){s.value||No[g.key]&&a({x:No[g.key].x,y:No[g.key].y},g.shiftKey)}return(g,w)=>!O(l)&&O(h).width&&O(h).height?(M(),se("div",{key:0,class:en(["vue-flow__nodesselection vue-flow__container",O(r)]),style:mt({transform:`translate(${O(i).x}px,${O(i).y}px) scale(${O(i).zoom})`})},[Qe("div",{ref_key:"el",ref:u,class:en([{dragging:O(c)},"vue-flow__nodesselection-rect"]),style:mt(O(d)),tabIndex:O(s)?void 0:-1,onContextmenu:f,onKeydown:p},null,46,rT)],6)):Oe("",!0)}}),aT={name:"UserSelection",compatConfig:{MODE:3}},uT=Le({...aT,props:{userSelectionRect:null},setup(t){return(e,n)=>(M(),se("div",{class:"vue-flow__selection vue-flow__container",style:mt({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),cT={input:k2,default:S2,output:T2},hT={default:X2,straight:Z2,step:H2,smoothstep:E0,simplebezier:Y2};function dT(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Cd.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Qr.Free,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Po.Bezier,style:{}},connectionMode:lo.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:ga()?"Meta":"Control",zoomActivationKeyCode:ga()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:w2(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,disableKeyboardA11y:!1,ariaLiveMessage:"",__experimentalFeatures:{nestedFlow:!1}}}function M0(t){const e=dT();return t&&Object.keys(t).forEach(n=>{const i=t[n];Ge(i)&&(e[n]=i)}),e}function fT(t,e,n,i,o,r,s){const l=ST(i,o),a=D=>{const I=D??r.value??[];i.hooks.updateNodeInternals.trigger(I)},u=D=>{if(D)return i.nodes&&!r.value.length?i.nodes.find(I=>I.id===D):i.nodes[r.value.indexOf(D)]},c=D=>{if(D)return i.edges&&!s.value.length?i.edges.find(I=>I.id===D):i.edges[s.value.indexOf(D)]},h=(D,I,ie)=>{const K=[];D.forEach(re=>{var X,Y;const ce={id:re.id,type:"position",dragging:ie,from:re.from};if(I&&(ce.position=re.position,re.parentNode)){const de=u(re.parentNode);ce.position={x:ce.position.x-(((X=de==null?void 0:de.computedPosition)==null?void 0:X.x)??0),y:ce.position.y-(((Y=de==null?void 0:de.computedPosition)==null?void 0:Y.y)??0)}}K.push(ce)}),K!=null&&K.length&&i.hooks.nodesChange.trigger(K)},d=D=>{var I;if(!i.vueFlowRef)return;const ie=i.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!ie)return;let K;if((I=i.__experimentalFeatures)!=null&&I.nestedFlow){let X=[ie],Y=ie,ce;for(;!ce&&Y;)Y=Y.parentElement,ce=Y==null?void 0:Y.classList.contains("vue-flow__transformationpane"),ce&&(X=[Y,...X]);X.forEach(de=>{const ee=window.getComputedStyle(de),{m22:$e}=new window.DOMMatrixReadOnly(ee.transform);K?K*=$e:K=$e})}else{const X=window.getComputedStyle(ie),{m22:Y}=new window.DOMMatrixReadOnly(X.transform);K=Y}const re=D.reduce((X,Y)=>{const ce=u(Y.id);if(ce){const de=du(Y.nodeElement);de.width&&de.height&&(ce.dimensions.width!==de.width||ce.dimensions.height!==de.height||Y.forceUpdate)&&(ce.handleBounds.source=_p(".source",Y.nodeElement,K),ce.handleBounds.target=_p(".target",Y.nodeElement,K),ce.dimensions=de,ce.initialized=!0,X.push({id:ce.id,type:"dimensions",dimensions:de}))}return X},[]);re.length&&i.hooks.nodesChange.trigger(re)},f=(D,I)=>{const ie=D.map(X=>X.id);let K,re=[];if(i.multiSelectionActive)K=ie.map(X=>Gn(X,I));else{const X=zu([...i.nodes,...i.edges],ie);K=X.changedNodes,re=X.changedEdges}K.length&&i.hooks.nodesChange.trigger(K),re.length&&i.hooks.edgesChange.trigger(re)},p=(D,I)=>{const ie=D.map(X=>X.id);let K=[],re;if(i.multiSelectionActive)re=ie.map(X=>Gn(X,I));else{const X=zu([...i.nodes,...i.edges],ie);K=X.changedNodes,re=X.changedEdges}K.length&&i.hooks.nodesChange.trigger(K),re.length&&i.hooks.edgesChange.trigger(re)},g=(D,I)=>{const ie=D.filter(Nr).map(Y=>Y.id),K=D.filter(Go).map(Y=>Y.id);let{changedNodes:re,changedEdges:X}=zu([...i.nodes,...i.edges],[...ie,...K]);i.multiSelectionActive&&(re=ie.map(Y=>Gn(Y,I)),X=K.map(Y=>Gn(Y,I))),re.length&&i.hooks.nodesChange.trigger(re),X.length&&i.hooks.edgesChange.trigger(X)},w=D=>{f(D,!0)},y=D=>{p(D,!0)},_=D=>{g(D,!0)},T=D=>{if(!D.length)return f(D,!1);const I=D.map(ie=>ie.id).map(ie=>Gn(ie,!1));I.length&&i.hooks.nodesChange.trigger(I)},b=D=>{if(!D.length)return p(D,!1);const I=D.map(ie=>ie.id).map(ie=>Gn(ie,!1));I.length&&i.hooks.edgesChange.trigger(I)},k=D=>{if(!D||!D.length)return g([],!1);const I=D.reduce((ie,K)=>{const re=Gn(K.id,!1);return Nr(K)?ie.nodes.push(re):ie.edges.push(re),ie},{nodes:[],edges:[]});I.nodes.length&&i.hooks.nodesChange.trigger(I.nodes),I.edges.length&&i.hooks.edgesChange.trigger(I.edges)},x=D=>{var I;(I=i.d3Zoom)==null||I.scaleExtent([D,i.maxZoom]),i.minZoom=D},$=D=>{var I;(I=i.d3Zoom)==null||I.scaleExtent([i.minZoom,D]),i.maxZoom=D},L=D=>{var I;(I=i.d3Zoom)==null||I.translateExtent(D),i.translateExtent=D},V=D=>{i.nodeExtent=D,a(r.value)},R=D=>{i.nodesDraggable=D,i.nodesConnectable=D,i.elementsSelectable=D},z=D=>{const I=D instanceof Function?D(i.nodes):D;!i.initialized&&!I.length||(i.nodes=bp(I,i.nodes,u,i.hooks.error.trigger))},j=D=>{const I=D instanceof Function?D(i.edges):D;if(!i.initialized&&!I.length)return;const ie=i.isValidConnection?I.filter(K=>i.isValidConnection(K,{edges:i.edges,sourceNode:u(K.source),targetNode:u(K.target)})):I;i.edges=ie.reduce((K,re)=>{const X=u(re.source),Y=u(re.target),ce=!X||typeof X>"u",de=!Y||typeof Y>"u";if(ce&&de?i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_TARGET_MISSING,re.id,re.source,re.target)):(ce&&i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_MISSING,re.id,re.source)),de&&i.hooks.error.trigger(new xt(yt.EDGE_TARGET_MISSING,re.id,re.target))),ce||de)return K;const ee=c(re.id);return K.push({...d0(re,Object.assign({},ee,i.defaultEdgeOptions)),sourceNode:X,targetNode:Y}),K},[])},J=D=>{const I=D instanceof Function?D([...i.nodes,...i.edges]):D;!i.initialized&&!I.length||(z(I.filter(Nr)),j(I.filter(Go)))},S=D=>{let I=D instanceof Function?D(i.nodes):D;I=Array.isArray(I)?I:[I];const ie=bp(I,i.nodes,u,i.hooks.error.trigger).map(mp);ie.length&&i.hooks.nodesChange.trigger(ie)},A=D=>{let I=D instanceof Function?D(i.edges):D;I=Array.isArray(I)?I:[I];const ie=(i.isValidConnection?I.filter(K=>i.isValidConnection(K,{edges:i.edges,sourceNode:u(K.source),targetNode:u(K.target)})):I).reduce((K,re)=>{const X=y2({...re,...i.defaultEdgeOptions},i.edges,i.hooks.error.trigger);if(X){const Y=u(X.source),ce=u(X.target),de=!Y||typeof Y>"u",ee=!ce||typeof ce>"u";if(de&&ee)return i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_TARGET_MISSING,X.id,X.source,X.target)),K;if(de)return i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_MISSING,X.id,X.source)),K;if(ee)return i.hooks.error.trigger(new xt(yt.EDGE_TARGET_MISSING,X.id,X.target)),K;K.push(mp({...X,sourceNode:Y,targetNode:ce}))}return K},[]);ie.length&&i.hooks.edgesChange.trigger(ie)},P=(D,I=!0,ie=!1)=>{let K=D instanceof Function?D(i.nodes):D;K=Array.isArray(K)?K:[K];const re=[],X=[];function Y(de){const ee=Kn(de,i.edges).filter($e=>Ge($e.deletable)?$e.deletable:!0);X.push(...ee.map($e=>Hs($e.id)))}function ce(de){const ee=i.nodes.filter($e=>$e.parentNode===de);if(ee.length){const $e=ee.map(it=>it.id);re.push(...$e.map(it=>Hs(it))),I&&Y(ee),ee.forEach(it=>{ce(it.id)})}}K.forEach(de=>{const ee=typeof de=="string"?u(de):de;ee&&(Ge(ee.deletable)&&!ee.deletable||(re.push(Hs(ee.id)),I&&Y([ee]),ie&&ce(ee.id)))}),X.length&&i.hooks.edgesChange.trigger(X),re.length&&i.hooks.nodesChange.trigger(re)},E=D=>{let I=D instanceof Function?D(i.edges):D;I=Array.isArray(I)?I:[I];const ie=[];I.forEach(K=>{const re=typeof K=="string"?c(K):K;re&&(Ge(re.deletable)&&!re.deletable||ie.push(Hs(typeof K=="string"?K:K.id)))}),i.hooks.edgesChange.trigger(ie)},B=(D,I,ie=!0)=>O2(D,I,i.edges,c,ie,i.hooks.error.trigger),q=D=>pp(D,i.nodes),N=D=>pp(D,i.edges),te=(D,I,ie,K=!1)=>{K?i.connectionClickStartHandle=D:i.connectionStartHandle=D,i.connectionEndHandle=null,i.connectionStatus=null,I&&(i.connectionPosition=I)},U=(D,I=null,ie=null)=>{i.connectionStartHandle&&(i.connectionPosition=D,i.connectionEndHandle=I,i.connectionStatus=ie)},le=(D,I)=>{i.connectionPosition={x:NaN,y:NaN},i.connectionEndHandle=null,i.connectionStatus=null,I?i.connectionClickStartHandle=null:i.connectionStartHandle=null},ae=D=>{const I=t2(D),ie=I?null:u(D.id);return!I&&!ie?[null,null,I]:[I?D:cp(ie),ie,I]},G=(D,I=!0,ie)=>{const[K,re,X]=ae(D);return K?(ie||i.nodes).filter(Y=>{if(!X&&(Y.id===re.id||!Y.computedPosition))return!1;const ce=cp(Y),de=Gc(ce,K);return I&&de>0||de>=Number(D.width)*Number(D.height)}):[]},Q=(D,I,ie=!0)=>{const[K]=ae(D);if(!K)return!1;const re=Gc(K,I);return ie&&re>0||re>=Number(D.width)*Number(D.height)},ne=D=>{const{viewport:I,dimensions:ie,d3Zoom:K,d3Selection:re,translateExtent:X}=i;if(!K||!re||!D.x&&!D.y)return!1;const Y=Ho.translate(I.x+D.x,I.y+D.y).scale(I.zoom),ce=[[0,0],[ie.width,ie.height]],de=K.constrain()(Y,ce,X),ee=i.viewport.x!==de.x||i.viewport.y!==de.y||i.viewport.zoom!==de.k;return K.transform(re,de),ee},ue=D=>{const I=D instanceof Function?D(i):D,ie=["modelValue","nodes","edges","maxZoom","minZoom","translateExtent","nodeExtent","hooks","defaultEdgeOptions"],K=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ge(I.defaultEdgeOptions)&&(i.defaultEdgeOptions=I.defaultEdgeOptions);const re=I.modelValue||I.nodes||I.edges?[]:void 0;re&&(I.modelValue&&re.push(...I.modelValue),I.nodes&&re.push(...I.nodes),I.edges&&re.push(...I.edges),J(re));const X=()=>{Ge(I.maxZoom)&&$(I.maxZoom),Ge(I.minZoom)&&x(I.minZoom),Ge(I.translateExtent)&&L(I.translateExtent),Ge(I.nodeExtent)&&V(I.nodeExtent)};Object.keys(I).forEach(Y=>{const ce=Y,de=I[ce];![...ie,...K].includes(ce)&&Ge(de)&&(i[ce]=de)}),i.d3Zoom?X():$i(()=>i.d3Zoom).not.toBeUndefined().then(X),i.initialized||(i.initialized=!0)},Ae={updateNodePositions:h,updateNodeDimensions:d,setElements:J,setNodes:z,setEdges:j,addNodes:S,addEdges:A,removeNodes:P,removeEdges:E,findNode:u,findEdge:c,updateEdge:B,applyEdgeChanges:N,applyNodeChanges:q,addSelectedElements:_,addSelectedNodes:w,addSelectedEdges:y,setMinZoom:x,setMaxZoom:$,setTranslateExtent:L,setNodeExtent:V,removeSelectedElements:k,removeSelectedNodes:T,removeSelectedEdges:b,startConnection:te,updateConnection:U,endConnection:le,setInteractive:R,setState:ue,getIntersectingNodes:G,isNodeIntersecting:Q,panBy:ne,fitView:D=>l.value.fitView(D),zoomIn:D=>l.value.zoomIn(D),zoomOut:D=>l.value.zoomOut(D),zoomTo:(D,I)=>l.value.zoomTo(D,I),setViewport:(D,I)=>l.value.setViewport(D,I),setTransform:(D,I)=>l.value.setTransform(D,I),getViewport:()=>l.value.getViewport(),getTransform:()=>l.value.getTransform(),setCenter:(D,I,ie)=>l.value.setCenter(D,I,ie),fitBounds:(D,I)=>l.value.fitBounds(D,I),project:D=>l.value.project(D),toObject:()=>JSON.parse(JSON.stringify({nodes:i.nodes.map(D=>{const{computedPosition:I,handleBounds:ie,selected:K,dimensions:re,isParent:X,resizing:Y,dragging:ce,initialized:de,...ee}=D;return ee}),edges:i.edges.map(D=>{const{selected:I,sourceNode:ie,targetNode:K,...re}=D;return re}),position:[i.viewport.x,i.viewport.y],zoom:i.viewport.zoom,viewport:i.viewport})),fromObject:D=>{const{nodes:I,edges:ie,position:K,zoom:re,viewport:X}=D;if(I&&z(I),ie&&j(ie),X!=null&&X.x&&X!=null&&X.y||K){const Y=(X==null?void 0:X.x)||K[0],ce=(X==null?void 0:X.y)||K[1],de=(X==null?void 0:X.zoom)||re||i.viewport.zoom;$i(()=>l.value.initialized).toBe(!0).then(()=>{l.value.setViewport({x:Y,y:ce,zoom:de})})}},updateNodeInternals:a,$reset:()=>{const D=M0();if(i.edges=[],i.nodes=[],i.d3Zoom&&i.d3Selection){const I=Ho.translate(D.defaultViewport.x??0,D.defaultViewport.y??0).scale(si(D.defaultViewport.zoom??1,D.minZoom,D.maxZoom)),ie=i.viewportRef.getBoundingClientRect(),K=[[0,0],[ie.width,ie.height]],re=i.d3Zoom.constrain()(I,K,D.translateExtent);i.d3Zoom.transform(i.d3Selection,re)}ue(D)},$destroy:()=>{}};return $i(()=>l.value.initialized).toBe(!0,{flush:"pre"}).then(()=>{i.fitViewOnInit&&l.value.fitView(),i.hooks.paneReady.trigger({id:t,emits:e,vueFlowVersion:"1.22.3",...n,...i,...o,...Ae})}),Ae}function pT(t,e,n){const i=ye(()=>g=>t.nodes&&!e.value.length?t.nodes.find(w=>w.id===g):t.nodes[e.value.indexOf(g)]),o=ye(()=>g=>t.edges&&!n.value.length?t.edges.find(w=>w.id===g):t.edges[n.value.indexOf(g)]),r=ye(()=>{var g;const w={...hT,...t.edgeTypes},y=Object.keys(w);return(g=t.edges)==null||g.forEach(_=>_.type&&!y.includes(_.type)&&(w[_.type]=_.type)),w}),s=ye(()=>{var g;const w={...cT,...t.nodeTypes},y=Object.keys(w);return(g=t.nodes)==null||g.forEach(_=>_.type&&!y.includes(_.type)&&(w[_.type]=_.type)),w}),l=ye(()=>{const g=t.nodes.filter(w=>!w.hidden);return t.onlyRenderVisibleElements?g&&v0(g,{x:0,y:0,width:t.dimensions.width,height:t.dimensions.height},t.viewport,!0):g??[]}),a=(g,w,y)=>{if(w=w??i.value(g.source),y=y??i.value(g.target),!w||!y){t.hooks.error.trigger(new xt(yt.EDGE_ORPHANED,g.id));return}return!g.hidden&&!y.hidden&&!w.hidden},u=ye(()=>t.onlyRenderVisibleElements?t.edges.filter(g=>{const w=i.value(g.source),y=i.value(g.target);return a(g,w,y)&&d2({sourcePos:w.computedPosition||{x:0,y:0},targetPos:y.computedPosition||{x:0,y:0},sourceWidth:w.dimensions.width,sourceHeight:w.dimensions.height,targetWidth:y.dimensions.width,targetHeight:y.dimensions.height,width:t.dimensions.width,height:t.dimensions.height,viewport:t.viewport})}):t.edges.filter(g=>a(g))),c=ye(()=>[...l.value,...u.value]),h=ye(()=>t.nodes.filter(g=>g.selected)),d=ye(()=>t.edges.filter(g=>g.selected)),f=ye(()=>[...h.value??[],...d.value??[]]),p=ye(()=>l.value.filter(g=>g.initialized&&g.handleBounds!==void 0));return{getNode:i,getEdge:o,getElements:c,getEdgeTypes:r,getNodeTypes:s,getEdges:u,getNodes:l,getSelectedElements:f,getSelectedNodes:h,getSelectedEdges:d,getNodesInitialized:p}}let mT=class kr{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){return kr.instance||(kr.instance=new kr),kr.instance}set(e,n){return this.flows.set(e,n)}get(e){return this.flows.get(e)}remove(e){return this.flows.delete(e)}create(e,n){const i=M0(n),o=zt(i),r={};Object.entries(o.hooks).forEach(([d,f])=>{const p=`on${d.charAt(0).toUpperCase()+d.slice(1)}`;r[p]=f.on});const s={};Object.entries(o.hooks).forEach(([d,f])=>{s[d]=f.trigger});const l=ye(()=>o.nodes.map(d=>d.id)),a=ye(()=>o.edges.map(d=>d.id)),u=pT(o,l,a),c=fT(e,s,r,o,u,l,a);c.setState(o);const h={...r,...u,...c,...nb(o),emits:s,id:e,vueFlowVersion:"1.22.3",$destroy:()=>{this.remove(e)}};return this.set(e,h),h}getId(){return`vue-flow-${this.currentId++}`}};function Ze(t){const e=mT.getInstance(),n=gv(),i=t==null?void 0:t.id,o=(n==null?void 0:n.vueFlowId)||i;let r;if(n){const s=oi(xp,null);typeof s<"u"&&s!==null&&(r=s)}if(r||o&&(r=e.get(o)),!r||r&&i&&i!==r.id){const s=i??e.getId(),l=e.create(s,t);r=l,vv().run(()=>{Me(l.applyDefault,a=>{const u=h=>{l.applyNodeChanges(h)},c=h=>{l.applyEdgeChanges(h)};a?(l.onNodesChange(u),l.onEdgesChange(c)):(l.hooks.value.nodesChange.off(u),l.hooks.value.edgesChange.off(c))},{immediate:!0}),ks(()=>{if(r){const a=e.get(r.id);a?a.$destroy():b0(`No store instance found for id ${r.id} in storage.`)}})})}else t&&r.setState(t);return n&&(ro(xp,r),n.vueFlowId=r.id),r}function gT(){return{doubleClick:me(),click:me(),mouseEnter:me(),mouseMove:me(),mouseLeave:me(),contextMenu:me(),updateStart:me(),update:me(),updateEnd:me()}}function vT(t,e){const n=gT();return n.doubleClick.on(i=>{var o,r;e.edgeDoubleClick(i),(r=(o=t.events)==null?void 0:o.doubleClick)==null||r.call(o,i)}),n.click.on(i=>{var o,r;e.edgeClick(i),(r=(o=t.events)==null?void 0:o.click)==null||r.call(o,i)}),n.mouseEnter.on(i=>{var o,r;e.edgeMouseEnter(i),(r=(o=t.events)==null?void 0:o.mouseEnter)==null||r.call(o,i)}),n.mouseMove.on(i=>{var o,r;e.edgeMouseMove(i),(r=(o=t.events)==null?void 0:o.mouseMove)==null||r.call(o,i)}),n.mouseLeave.on(i=>{var o,r;e.edgeMouseLeave(i),(r=(o=t.events)==null?void 0:o.mouseLeave)==null||r.call(o,i)}),n.contextMenu.on(i=>{var o,r;e.edgeContextMenu(i),(r=(o=t.events)==null?void 0:o.contextMenu)==null||r.call(o,i)}),n.updateStart.on(i=>{var o,r;e.edgeUpdateStart(i),(r=(o=t.events)==null?void 0:o.updateStart)==null||r.call(o,i)}),n.update.on(i=>{var o,r;e.edgeUpdate(i),(r=(o=t.events)==null?void 0:o.update)==null||r.call(o,i)}),n.updateEnd.on(i=>{var o,r;e.edgeUpdateEnd(i),(r=(o=t.events)==null?void 0:o.updateEnd)==null||r.call(o,i)}),Object.entries(n).reduce((i,[o,r])=>(i.emit[o]=r.trigger,i.on[o]=r.on,i),{emit:{},on:{}})}function A0(){const{viewport:t,snapGrid:e,snapToGrid:n}=Ze();return({sourceEvent:i})=>{const o=i.touches?i.touches[0].clientX:i.clientX,r=i.touches?i.touches[0].clientY:i.clientY,s={x:(o-t.value.x)/t.value.zoom,y:(r-t.value.y)/t.value.zoom};return{xSnapped:n.value?e.value[0]*Math.round(s.x/e.value[0]):s.x,ySnapped:n.value?e.value[1]*Math.round(s.y/e.value[1]):s.y,...s}}}function Zs(){return!0}function D0({handleId:t,nodeId:e,type:n,isValidConnection:i,edgeUpdaterType:o,onEdgeUpdate:r,onEdgeUpdateEnd:s}){const{vueFlowRef:l,connectionMode:a,connectionRadius:u,connectOnClick:c,connectionClickStartHandle:h,nodesConnectable:d,autoPanOnConnect:f,findNode:p,panBy:g,getNodes:w,startConnection:y,updateConnection:_,endConnection:T,emits:b,viewport:k,edges:x,isValidConnection:$}=Ze();let L=null,V=!1,R=null;function z(J){var S;const A=Re(n)==="target",P=Md(J),E=hp(J.target);if(P&&J.button===0||!P){let B=function(re){D=to(re,ue);const{handle:X,validHandleResult:Y}=p2(re,E,p0(D,k.value,!1,[1,1]),u.value,ie,ce=>wp(re,ce,a.value,Re(e),Re(t),A?"target":"source",te,E,x.value,p));if(U=X,I||(K(),I=!0),L=Y.connection,V=Y.isValid,R=Y.handleDomNode,_(U&&V?o2({x:U.x,y:U.y},k.value):D,Y.endHandle,g2(!!U,V)),!U&&!V&&!R)return Yu(Ae);L&&L.source!==L.target&&R&&(Yu(Ae),Ae=R,R.classList.add("connecting","vue-flow__handle-connecting"),R.classList.toggle("valid",V),R.classList.toggle("vue-flow__handle-valid",V))},q=function(re){(U||R)&&L&&V&&(r?r(re,L):b.connect(L)),b.connectEnd(re),o&&(s==null||s(re)),Yu(Ae),cancelAnimationFrame(le),T(re),I=!1,V=!1,L=null,R=null,E.removeEventListener("mousemove",B),E.removeEventListener("mouseup",q),E.removeEventListener("touchmove",B),E.removeEventListener("touchend",q)};const N=p(Re(e));let te=Re(i)||$.value||Zs;!te&&N&&(te=(A?N.isValidSourcePos:N.isValidTargetPos)||Zs);let U,le=0;const{x:ae,y:G}=to(J),Q=E==null?void 0:E.elementFromPoint(ae,G),ne=Ad(Re(o),Q),ue=(S=l.value)==null?void 0:S.getBoundingClientRect();if(!ue||!ne)return;let Ae,D=to(J,ue),I=!1;const ie=m2({nodes:w.value,nodeId:Re(e),handleId:Re(t),handleType:ne}),K=()=>{if(!f)return;const[re,X]=O0(D,ue);g({x:re,y:X}),le=requestAnimationFrame(K)};y({nodeId:Re(e),handleId:Re(t),type:ne},{x:ae-ue.left,y:G-ue.top},J),b.connectStart({event:J,nodeId:Re(e),handleId:Re(t),handleType:ne}),E.addEventListener("mousemove",B),E.addEventListener("mouseup",q),E.addEventListener("touchmove",B),E.addEventListener("touchend",q)}}function j(J){if(!c.value)return;const S=Re(n)==="target";if(!h.value)b.clickConnectStart({event:J,nodeId:Re(e),handleId:Re(t)}),y({nodeId:Re(e),type:Re(n),handleId:Re(t)},void 0,J,!0);else{let A=Re(i)||$.value||Zs;const P=p(Re(e));if(!A&&P&&(A=(S?P.isValidSourcePos:P.isValidTargetPos)||Zs),P&&(typeof P.connectable>"u"?d.value:P.connectable)===!1)return;const E=hp(J.target),{connection:B,isValid:q}=wp(J,{nodeId:Re(e),id:Re(t),type:Re(n)},a.value,h.value.nodeId,h.value.handleId||null,h.value.type,A,E,x.value,p),N=B.source===B.target;q&&!N&&b.connect(B),b.clickConnectEnd(J),T(J,!0)}}return{handlePointerDown:z,handleClick:j}}function qd(){return typeof window<"u"?window:{chrome:!1}}function eh(t){var e,n;const i=((n=(e=t.composedPath)==null?void 0:e.call(t))==null?void 0:n[0])||t.target,o=Zo(i.hasAttribute)?i.hasAttribute("contenteditable"):!1,r=Zo(i.closest)?i.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(i==null?void 0:i.nodeName)||o||!!r}function yT(t){return t.ctrlKey||t.metaKey||t.shiftKey}function $p(t,e,n,i){const o=e.split("+").map(r=>r.trim().toLowerCase());return o.length===1?t===e:(i?n.delete(t.toLowerCase()):n.add(t.toLowerCase()),o.every((r,s)=>n.has(r)&&Array.from(n.values())[s]===o[s]))}function OT(t,e){return n=>Array.isArray(t)?t.some(i=>$p(n.key,i,e,n.type==="keyup")):$p(n.key,t,e,n.type==="keyup")}function Ir(t,e){const n=qd(),i=oe(Re(t)===!0);let o=!1;const r=new Set;return Me(i,()=>{e==null||e(i.value)}),Me(()=>Re(t),(l,a)=>{if(n&&typeof n.addEventListener<"u"&&_d(n,"blur",()=>{i.value=!1}),Uu(a)&&!Uu(l)&&s(),l===null){s();return}if(Uu(l)){i.value=l;return}(Array.isArray(l)||ei(l)&&l.includes("+"))&&(l=OT(l,r)),l&&(Xf(l,u=>{o=yT(u),!(!o&&eh(u))&&(u.preventDefault(),i.value=!0)},{eventName:"keydown"}),Xf(l,u=>{if(i.value){if(!o&&eh(u))return;s()}},{eventName:"keyup"}))},{immediate:!0}),i;function s(){o=!1,r.clear(),i.value=!1}}function wT(t){const e=t??oi(Dd,""),n=oi(k0,oe(null)),{findNode:i,edges:o,emits:r}=Ze(),s=i(e);return s||r.error(new xt(yt.NODE_NOT_FOUND,e)),{id:e,nodeEl:n,node:s,parentNode:ye(()=>i(s.parentNode)),connectedEdges:ye(()=>Kn([s],o.value))}}function _T(){return{doubleClick:me(),click:me(),mouseEnter:me(),mouseMove:me(),mouseLeave:me(),contextMenu:me(),dragStart:me(),drag:me(),dragStop:me()}}function bT(t,e){const n=_T();return n.doubleClick.on(i=>{var o,r;e.nodeDoubleClick(i),(r=(o=t.events)==null?void 0:o.doubleClick)==null||r.call(o,i)}),n.click.on(i=>{var o,r;e.nodeClick(i),(r=(o=t.events)==null?void 0:o.click)==null||r.call(o,i)}),n.mouseEnter.on(i=>{var o,r;e.nodeMouseEnter(i),(r=(o=t.events)==null?void 0:o.mouseEnter)==null||r.call(o,i)}),n.mouseMove.on(i=>{var o,r;e.nodeMouseMove(i),(r=(o=t.events)==null?void 0:o.mouseMove)==null||r.call(o,i)}),n.mouseLeave.on(i=>{var o,r;e.nodeMouseLeave(i),(r=(o=t.events)==null?void 0:o.mouseLeave)==null||r.call(o,i)}),n.contextMenu.on(i=>{var o,r;e.nodeContextMenu(i),(r=(o=t.events)==null?void 0:o.contextMenu)==null||r.call(o,i)}),n.dragStart.on(i=>{var o,r;e.nodeDragStart(i),(r=(o=t.events)==null?void 0:o.dragStart)==null||r.call(o,i)}),n.drag.on(i=>{var o,r;e.nodeDrag(i),(r=(o=t.events)==null?void 0:o.drag)==null||r.call(o,i)}),n.dragStop.on(i=>{var o,r;e.nodeDragStop(i),(r=(o=t.events)==null?void 0:o.dragStop)==null||r.call(o,i)}),Object.entries(n).reduce((i,[o,r])=>(i.emit[o]=r.trigger,i.on[o]=r.on,i),{emit:{},on:{}})}function R0(){const{getSelectedNodes:t,nodeExtent:e,updateNodePositions:n,findNode:i,snapGrid:o,snapToGrid:r,nodesDraggable:s,emits:l}=Ze();return(a,u=!1)=>{const c=r.value?o.value[0]:5,h=r.value?o.value[1]:5,d=u?4:1,f=a.x*c*d,p=a.y*h*d,g=t.value.filter(w=>w.draggable||s&&typeof w.draggable>"u").map(w=>{const y={x:w.computedPosition.x+f,y:w.computedPosition.y+p},{computedPosition:_}=Ed(w,y,l.error,e.value,w.parentNode?i(w.parentNode):void 0);return{id:w.id,position:_,from:w.position,distance:{x:a.x,y:a.y},dimensions:w.dimensions}});n(g,!0,!1)}}const ju=.1;function fi(){return Promise.resolve(!1)}const xT={zoomIn:fi,zoomOut:fi,zoomTo:fi,fitView:fi,setCenter:fi,fitBounds:fi,project:t=>t,setViewport:fi,setTransform:fi,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),initialized:!1};function ST(t,e){const n=t,i=st(n,"nodes"),o=st(n,"d3Zoom"),r=st(n,"d3Selection"),s=st(n,"dimensions"),l=st(n,"translateExtent"),a=st(n,"minZoom"),u=st(n,"maxZoom"),c=st(n,"viewport"),h=st(n,"snapToGrid"),d=st(n,"snapGrid"),{getNodes:f}=e,p=oe(!1);$i(()=>!!o.value&&!!r.value&&!!s.value.width&&!!s.value.height).toBe(!0).then(()=>{p.value=!0});function g(y,_){return new Promise(T=>{r.value&&o.value?o.value.scaleBy(Fu(r.value,_,()=>{T(!0)}),y):T(!1)})}function w(y,_,T,b){return new Promise(k=>{const{x,y:$}=h0({x:-y,y:-_},l.value),L=Ho.translate(-x,-$).scale(T);r.value&&o.value?o.value.transform(Fu(r.value,b,()=>{k(!0)}),L):k(!1)})}return ye(()=>p.value?{initialized:!0,zoomIn:y=>g(1.2,y==null?void 0:y.duration),zoomOut:y=>g(1/1.2,y==null?void 0:y.duration),zoomTo:(y,_)=>new Promise(T=>{r.value&&o.value?o.value.scaleTo(Fu(r.value,_==null?void 0:_.duration,()=>{T(!0)}),y):T(!1)}),setViewport:(y,_)=>w(y.x,y.y,y.zoom,_==null?void 0:_.duration),setTransform:(y,_)=>w(y.x,y.y,y.zoom,_==null?void 0:_.duration),getViewport:()=>({x:c.value.x,y:c.value.y,zoom:c.value.zoom}),getTransform:()=>({x:c.value.x,y:c.value.y,zoom:c.value.zoom}),fitView:(y={padding:ju,includeHiddenNodes:!1,duration:0})=>{const _=(y.includeHiddenNodes?i.value:f.value).filter($=>{var L;const V=$.initialized&&$.dimensions.width&&$.dimensions.height;let R=!0;return(L=y.nodes)!=null&&L.length&&(R=y.nodes.includes($.id)),V&&R});if(!_.length)return Promise.resolve(!1);const T=$d(_),{x:b,y:k,zoom:x}=dp(T,s.value.width,s.value.height,y.minZoom??a.value,y.maxZoom??u.value,y.padding??ju,y.offset);return w(b,k,x,y==null?void 0:y.duration)},setCenter:(y,_,T)=>{const b=typeof(T==null?void 0:T.zoom)<"u"?T.zoom:u.value,k=s.value.width/2-y*b,x=s.value.height/2-_*b;return w(k,x,b,T==null?void 0:T.duration)},fitBounds:(y,_={padding:ju})=>{const{x:T,y:b,zoom:k}=dp(y,s.value.width,s.value.height,a.value,u.value,_.padding);return w(T,b,k,_==null?void 0:_.duration)},project:y=>p0(y,c.value,h.value,d.value)}:xT)}function Fu(t,e=0,n){return t.transition().duration(e).on("end",n)}function kT(t,e,n){const i=vv();return i.run(()=>{const o=()=>{i.run(()=>{let p,g,w=!!(n.nodes.value.length||n.edges.value.length);p=vo([t.modelValue,()=>{var y,_;return(_=(y=t.modelValue)==null?void 0:y.value)==null?void 0:_.length}],([y])=>{y&&Array.isArray(y)&&(g==null||g.pause(),n.setElements(y),!g&&!w&&y.length?w=!0:g==null||g.resume())}),g=vo([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([y,_])=>{var T;(T=t.modelValue)!=null&&T.value&&Array.isArray(t.modelValue.value)&&(p==null||p.pause(),t.modelValue.value=[...y,..._],Ci(()=>{p==null||p.resume()}))},{immediate:w}),Dl(()=>{p==null||p.stop(),g==null||g.stop()})})},r=()=>{i.run(()=>{let p,g,w=!!n.nodes.value.length;p=vo([t.nodes,()=>{var y,_;return(_=(y=t.nodes)==null?void 0:y.value)==null?void 0:_.length}],([y])=>{y&&Array.isArray(y)&&(g==null||g.pause(),n.setNodes(y),!g&&!w&&y.length?w=!0:g==null||g.resume())}),g=vo([n.nodes,()=>n.nodes.value.length],([y])=>{var _;(_=t.nodes)!=null&&_.value&&Array.isArray(t.nodes.value)&&(p==null||p.pause(),t.nodes.value=[...y],Ci(()=>{p==null||p.resume()}))},{immediate:w}),Dl(()=>{p==null||p.stop(),g==null||g.stop()})})},s=()=>{i.run(()=>{let p,g,w=!!n.edges.value.length;p=vo([t.edges,()=>{var y,_;return(_=(y=t.edges)==null?void 0:y.value)==null?void 0:_.length}],([y])=>{y&&Array.isArray(y)&&(g==null||g.pause(),n.setEdges(y),!g&&!w&&y.length?w=!0:g==null||g.resume())}),g=vo([n.edges,()=>n.edges.value.length],([y])=>{var _;(_=t.edges)!=null&&_.value&&Array.isArray(t.edges.value)&&(p==null||p.pause(),t.edges.value=[...y],Ci(()=>{p==null||p.resume()}))},{immediate:w}),Dl(()=>{p==null||p.stop(),g==null||g.stop()})})},l=()=>{i.run(()=>{Me(()=>e.maxZoom,()=>{e.maxZoom&&Ge(e.maxZoom)&&n.setMaxZoom(e.maxZoom)})})},a=()=>{i.run(()=>{Me(()=>e.minZoom,()=>{e.minZoom&&Ge(e.minZoom)&&n.setMinZoom(e.minZoom)})})},u=()=>{i.run(()=>{Me(()=>e.translateExtent,()=>{e.translateExtent&&Ge(e.translateExtent)&&n.setTranslateExtent(e.translateExtent)})})},c=()=>{i.run(()=>{Me(()=>e.nodeExtent,()=>{e.nodeExtent&&Ge(e.nodeExtent)&&n.setNodeExtent(e.nodeExtent)})})},h=()=>{i.run(()=>{Me(()=>e.applyDefault,()=>{Ge(e.applyDefault)&&(n.applyDefault.value=e.applyDefault)})})},d=()=>{i.run(()=>{const p=async g=>{let w=g;Zo(e.autoConnect)&&(w=await e.autoConnect(g)),w!==!1&&n.addEdges([w])};Me(()=>e.autoConnect,()=>{Ge(e.autoConnect)&&(n.autoConnect.value=e.autoConnect)}),Me(n.autoConnect,(g,w,y)=>{g?n.onConnect(p):n.hooks.value.connect.off(p),y(()=>{n.hooks.value.connect.off(p)})},{immediate:!0})})},f=()=>{const p=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];Object.keys(e).forEach(g=>{if(!p.includes(g)){const w=Vc(e,g),y=n[g];i.run(()=>{Me(w,_=>{Ge(_)&&(y.value=_)},{flush:"pre"})})}})};o(),r(),s(),a(),l(),u(),c(),h(),d(),f()}),()=>i.stop()}function Ep(t,e){return{x:t.clientX-e.left,y:t.clientY-e.top}}const TT={name:"Pane",compatConfig:{MODE:3}},PT=Le({...TT,props:{isSelecting:{type:Boolean}},setup(t){const{id:e,vueFlowRef:n,getNodes:i,getEdges:o,viewport:r,emits:s,userSelectionActive:l,removeSelectedElements:a,panOnDrag:u,userSelectionRect:c,elementsSelectable:h,nodesSelectionActive:d,addSelectedElements:f,getSelectedEdges:p,getSelectedNodes:g,removeNodes:w,removeEdges:y,selectionMode:_,deleteKeyCode:T,multiSelectionKeyCode:b,multiSelectionActive:k}=Ze(),x=oe(null),$=oe(0),L=oe(0),V=oe(),R=ye(()=>h.value&&(t.isSelecting||l.value));Ir(T,N=>{if(!N)return;const te=i.value.reduce((U,le)=>((!le.selected&&le.parentNode&&U.find(ae=>ae.id===le.parentNode)||le.selected)&&U.push(le),U),[]);(te||p.value)&&(p.value.length>0&&y(p.value),te.length>0&&w(te),d.value=!1,a())}),Ir(b,N=>{k.value=N});function z(){l.value=!1,c.value=null,$.value=0,L.value=0}function j(N){N.target!==x.value||R.value||(s.paneClick(N),a(),d.value=!1)}function J(N){var te;if(N.target===x.value){if(Array.isArray(u.value)&&(te=u.value)!=null&&te.includes(2)){N.preventDefault();return}s.paneContextMenu(N)}}function S(N){N.target===x.value&&s.paneScroll(N)}function A(N){if(V.value=n.value.getBoundingClientRect(),!R.value||!h||!t.isSelecting||N.button!==0||N.target!==x.value||!V.value)return;const{x:te,y:U}=Ep(N,V.value);a(),c.value={width:0,height:0,startX:te,startY:U,x:te,y:U},l.value=!0,s.selectionStart(N)}function P(N){if(!R.value)return s.paneMouseMove(N);if(!t.isSelecting||!V.value||!c.value)return;l.value||(l.value=!0),d.value&&(d.value=!1);const te=Ep(N,V.value),U=c.value.startX??0,le=c.value.startY??0,ae={...c.value,x:te.x0,z(),s.selectionEnd(N))}function B(N){var te;if(!R.value)return s.paneMouseLeave(N);l.value&&(d.value=$.value>0,(te=s.selectionEnd)==null||te.call(s,N)),z()}function q(N){R.value||s.paneMouseEnter(N)}return(N,te)=>(M(),se("div",{ref_key:"container",ref:x,key:`pane-${O(e)}`,class:en(["vue-flow__pane vue-flow__container",{selection:t.isSelecting}]),onClick:j,onContextmenu:J,onWheelPassive:S,onMouseenter:q,onMousedown:A,onMousemove:P,onMouseup:E,onMouseleave:B},[Ve(N.$slots,"default"),O(l)&&O(c)?(M(),H(uT,{key:0,"user-selection-rect":O(c)},null,8,["user-selection-rect"])):Oe("",!0),O(d)&&O(g).length?(M(),H(lT,{key:1})):Oe("",!0)],34))}}),CT={class:"vue-flow__nodes vue-flow__container"},$T={name:"Nodes",compatConfig:{MODE:3}},ET=Le({...$T,setup(t){const e=oi(gu),{nodesDraggable:n,nodesFocusable:i,elementsSelectable:o,nodesConnectable:r,getNodes:s,getNodesInitialized:l,getNodeTypes:a,updateNodeDimensions:u,emits:c}=Ze(),h=oe(),d=fo();$i(()=>s.value.length>0&&l.value.length===s.value.length).toBe(!0).then(()=>{Ci(()=>{c.nodesInitialized(l.value)})}),Vn(()=>{h.value=new ResizeObserver(_=>{const T=_.map(b=>({id:b.target.getAttribute("data-id"),nodeElement:b.target,forceUpdate:!0}));u(T)})}),cd(()=>{var _;return(_=h.value)==null?void 0:_.disconnect()});function f(_){return typeof _>"u"?n.value:_}function p(_){return typeof _>"u"?o.value:_}function g(_){return typeof _>"u"?r.value:_}function w(_){return typeof _>"u"?i.value:_}function y(_,T){const b=_||"default",k=e==null?void 0:e[`node-${b}`];if(k)return k;let x=T??a.value[b];if(typeof x=="string"&&d){const $=Object.keys(d.appContext.components);$&&$.includes(b)&&(x=C(b,!1))}return x&&typeof x!="string"?x:(c.error(new xt(yt.NODE_TYPE_MISSING,x)),!1)}return(_,T)=>(M(),se("div",CT,[h.value?(M(!0),se(Te,{key:0},rt(O(s),b=>(M(),H(O(E2),{id:b.id,key:b.id,"resize-observer":h.value,type:y(b.type,b.template),name:b.type||"default",draggable:f(b.draggable),selectable:p(b.selectable),connectable:g(b.connectable),focusable:w(b.focusable),node:b},null,8,["id","resize-observer","type","name","draggable","selectable","connectable","focusable","node"]))),128)):Oe("",!0)]))}}),MT=["id","markerWidth","markerHeight","markerUnits","orient"],AT=["stroke","stroke-width","fill"],DT=["stroke","stroke-width"],RT={name:"MarkerType",compatConfig:{MODE:3}},qT=Le({...RT,props:{id:null,type:null,color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(t){return(e,n)=>(M(),se("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===O(Hc).ArrowClosed?(M(),se("polyline",{key:0,stroke:t.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":t.strokeWidth,fill:t.color,points:"-5,-4 0,0 -5,4 -5,-4"},null,8,AT)):Oe("",!0),t.type===O(Hc).Arrow?(M(),se("polyline",{key:1,stroke:t.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":t.strokeWidth,fill:"none",points:"-5,-4 0,0 -5,4"},null,8,DT)):Oe("",!0)],8,MT))}}),QT={name:"MarkerDefinitions",compatConfig:{MODE:3}},NT=Le({...QT,setup(t){const e=Ze(),n=st(e,"id"),i=st(e,"edges"),o=st(e,"connectionLineOptions"),r=st(e,"defaultMarkerColor"),s=ye(()=>{const l=[],a=[],u=c=>{if(c){const h=Fi(c,n.value);l.includes(h)||(typeof c=="object"?a.push({...c,id:h,color:c.color||r.value}):a.push({id:h,color:r.value,type:c}),l.push(h))}};return[o.value.markerEnd,o.value.markerStart].forEach(u),i.value.reduce((c,h)=>([h.markerStart,h.markerEnd].forEach(u),c.sort((d,f)=>d.id.localeCompare(f.id))),a),a});return(l,a)=>(M(),se("defs",null,[(M(!0),se(Te,null,rt(O(s),u=>(M(),H(qT,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))]))}}),IT={class:"vue-flow__edges vue-flow__container"},VT={name:"Edges",compatConfig:{MODE:3}},BT=Le({...VT,setup(t){const e=oi(gu),{edgesUpdatable:n,edgesFocusable:i,elementsSelectable:o,findNode:r,getEdges:s,getEdgeTypes:l,elevateEdgesOnSelect:a,dimensions:u,emits:c}=Ze(),h=fo();function d(w){return typeof w>"u"?o.value:w}function f(w){return typeof w>"u"?n.value:w}function p(w){return typeof w>"u"?i.value:w}function g(w,y){const _=w||"default",T=e==null?void 0:e[`edge-${_}`];if(T)return T;let b=y??l.value[_];if(typeof b=="string"&&h){const k=Object.keys(h.appContext.components);k&&k.includes(_)&&(b=C(_,!1))}return b&&typeof b!="string"?b:(c.error(new xt(yt.EDGE_TYPE_MISSING,b)),!1)}return(w,y)=>O(u).width&&O(u).height?(M(),se(Te,{key:0},[(M(),se("svg",IT,[m(NT)])),(M(!0),se(Te,null,rt(O(s),_=>(M(),se("svg",{key:_.id,class:"vue-flow__edges vue-flow__container",style:mt({zIndex:O(f2)(_,O(r),O(a))})},[m(O(tT),{id:_.id,edge:_,type:g(_.type,_.template),name:_.type||"default",selectable:d(_.selectable),updatable:f(_.updatable),focusable:p(_.focusable)},null,8,["id","edge","type","name","selectable","updatable","focusable"])],4))),128)),m(O(oT))],64)):Oe("",!0)}}),WT=Qe("div",{class:"vue-flow__edge-labels"},null,-1),LT={name:"Transform",compatConfig:{MODE:3}},zT=Le({...LT,setup(t){const{id:e,viewport:n,d3Zoom:i,d3Selection:o,dimensions:r}=Ze(),s=oe(!Cv);return $i(()=>i.value&&o.value&&r.value.width>0&&r.value.height>0).toBe(!0).then(()=>{setTimeout(()=>{s.value=!0},1)}),(l,a)=>(M(),se("div",{key:`transform-${O(e)}`,class:"vue-flow__transformationpane vue-flow__container",style:mt({transform:`translate(${O(n).x}px,${O(n).y}px) scale(${O(n).zoom})`,opacity:s.value?void 0:0})},[m(BT),WT,m(ET),Ve(l.$slots,"default")],4))}}),XT={name:"Viewport",compatConfig:{MODE:3}},UT=Le({...XT,setup(t){const{id:e,minZoom:n,maxZoom:i,defaultViewport:o,translateExtent:r,dimensions:s,zoomActivationKeyCode:l,selectionKeyCode:a,panActivationKeyCode:u,panOnScroll:c,panOnScrollMode:h,panOnScrollSpeed:d,panOnDrag:f,zoomOnDoubleClick:p,zoomOnPinch:g,zoomOnScroll:w,preventScrolling:y,noWheelClassName:_,noPanClassName:T,emits:b,connectionStartHandle:k,userSelectionActive:x,paneDragging:$,d3Zoom:L,d3Selection:V,d3ZoomHandler:R,viewport:z,viewportRef:j}=Ze(),J=oe(),S=oe(!1),A=oe(!1),P=oe(!1),E=oe();let B=!1,q=0,N={x:0,y:0,zoom:0};const te=Ir(u),U=ye(()=>!S.value&&f.value&&te.value),le=ye(()=>a.value!==!0&&S.value||a.value===!0&&!U.value);Vn(()=>{wb(J,ue);const D=qd();_d(D,"resize",ue)}),Vn(()=>{const D=J.value,I=D.getBoundingClientRect(),ie=Kk().scaleExtent([n.value,i.value]).translateExtent(r.value),K=pn(D).call(ie),re=K.on("wheel.zoom"),X=Ho.translate(o.value.x??0,o.value.y??0).scale(si(o.value.zoom??1,n.value,i.value)),Y=[[0,0],[I.width,I.height]],ce=ie.constrain()(X,Y,r.value);ie.transform(K,ce),ie.wheelDelta(G),L.value=ie,V.value=K,R.value=re,z.value={x:ce.x,y:ce.y,zoom:ce.k},j.value=D,Ir(a,ee=>{S.value=ee});const de=Ir(l);sa(()=>{S.value&&x.value&&!A.value?ie.on("zoom",null):!S.value&&!x.value&&ie.on("zoom",ee=>{z.value={x:ee.transform.x,y:ee.transform.y,zoom:ee.transform.k};const $e=ne(ee.transform);B=ae(f.value,q??0),b.viewportChange($e),b.move({event:ee,flowTransform:$e})})}),ie.on("start",ee=>{var $e;if(!ee.sourceEvent)return null;q=ee.sourceEvent.button,A.value=!0;const it=ne(ee.transform);(($e=ee.sourceEvent)==null?void 0:$e.type)==="mousedown"&&($.value=!0),N=it,b.viewportChangeStart(it),b.moveStart({event:ee,flowTransform:it})}),ie.on("end",ee=>{if(!ee.sourceEvent)return null;if(A.value=!1,$.value=!1,ae(f.value,q??0)&&!B&&b.paneContextMenu(ee.sourceEvent),B=!1,Q(N,ee.transform)){const $e=ne(ee.transform);N=$e,b.viewportChangeEnd($e),b.moveEnd({event:ee,flowTransform:$e})}}),sa(()=>{c.value&&!de.value&&!x.value?K.on("wheel.zoom",ee=>{if(Ae(ee,_.value))return!1;ee.preventDefault(),ee.stopImmediatePropagation();const $e=K.property("__zoom").k||1,it=ga();if(ee.ctrlKey&&g&&it){const dr=Pn(ee),Vi=G(ee),fr=$e*2**Vi;ie.scaleTo(K,fr,dr,ee);return}const vt=ee.deltaMode===1?20:1;let bn=h.value===Qr.Vertical?0:ee.deltaX*vt,on=h.value===Qr.Horizontal?0:ee.deltaY*vt;!it&&ee.shiftKey&&h.value!==Qr.Vertical&&!bn&&on&&(bn=on,on=0),ie.translateBy(K,-(bn/$e)*d.value,-(on/$e)*d.value);const Pt=ne(K.property("__zoom"));clearTimeout(E.value),P.value||(P.value=!0,b.moveStart({event:ee,flowTransform:Pt}),b.viewportChangeStart(Pt)),P.value&&(b.move({event:ee,flowTransform:Pt}),b.viewportChange(Pt),E.value=setTimeout(()=>{b.moveEnd({event:ee,flowTransform:Pt}),b.viewportChangeEnd(Pt),P.value=!1},150))},{passive:!1}):typeof re<"u"&&K.on("wheel.zoom",function(ee,$e){if(!y.value||Ae(ee,_.value))return null;ee.preventDefault(),re.call(this,ee,$e)},{passive:!1})}),ie.filter(ee=>{var $e,it;const vt=de.value||w.value,bn=g.value&&ee.ctrlKey;if(ee.button===1&&ee.type==="mousedown"&&(($e=ee.target)!=null&&$e.closest(".vue-flow__node")||(it=ee.target)!=null&&it.closest(".vue-flow__edge")))return!0;if(!f.value&&!vt&&!c.value&&!p.value&&!g.value||x.value||!p.value&&ee.type==="dblclick"||Ae(ee,_.value)&&ee.type==="wheel"||Ae(ee,T.value)&&ee.type!=="wheel"||!g.value&&ee.ctrlKey&&ee.type==="wheel"||!vt&&!c.value&&!bn&&ee.type==="wheel"||!f.value&&(ee.type==="mousedown"||ee.type==="touchstart")||Array.isArray(f.value)&&!f.value.includes(ee.button)&&(ee.type==="mousedown"||ee.type==="touchstart"))return!1;const on=Array.isArray(f.value)&&f.value.includes(ee.button)||!ee.button||ee.button<=1;return(!ee.ctrlKey||ee.type==="wheel")&&on})});function ae(D,I){return I===2&&Array.isArray(D)&&D.includes(2)}function G(D){const I=D.ctrlKey&&ga()?10:1;return-D.deltaY*(D.deltaMode===1?.05:D.deltaMode?1:.002)*I}function Q(D,I){return D.x!==I.x&&!isNaN(I.x)||D.y!==I.y&&!isNaN(I.y)||D.zoom!==I.k&&!isNaN(I.k)}function ne(D){return{x:D.x,y:D.y,zoom:D.k}}function ue(){if(!J.value)return;const{width:D,height:I}=du(J.value);(D===0||I===0)&&b.error(new xt(yt.MISSING_VIEWPORT_DIMENSIONS)),s.value.width=D||500,s.value.height=I||500}function Ae(D,I){return D.target.closest(`.${I}`)}return(D,I)=>(M(),se(Te,null,[(M(),se("div",{ref_key:"viewportEl",ref:J,key:`viewport-${O(e)}`,class:"vue-flow__viewport vue-flow__container"},[m(PT,{"is-selecting":O(le),class:en({connecting:!!O(k),dragging:O($),draggable:!!O(f)})},{default:v(()=>[m(zT,null,{default:v(()=>[Ve(D.$slots,"zoom-pane")]),_:3})]),_:3},8,["is-selecting","class"])])),Ve(D.$slots,"default")],64))}}),YT=["id"],jT=["id"],FT=["id"],HT={name:"A11yDescriptions",compatConfig:{MODE:3}},GT=Le({...HT,setup(t){const{id:e,disableKeyboardA11y:n,ariaLiveMessage:i}=Ze(),o={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"};return(r,s)=>(M(),se(Te,null,[Qe("div",{id:`${O(a0)}-${O(e)}`,style:{display:"none"}}," Press enter or space to select a node. "+pe(O(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,YT),Qe("div",{id:`${O(u0)}-${O(e)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,jT),O(n)?Oe("",!0):(M(),se("div",{key:0,id:`${O(Jk)}-${O(e)}`,"aria-live":"assertive","aria-atomic":"true",style:o},pe(O(i)),9,FT))],64))}}),ZT={name:"VueFlow",compatConfig:{MODE:3}},KT=Le({...ZT,props:{id:null,modelValue:null,nodes:null,edges:null,edgeTypes:null,nodeTypes:null,connectionMode:null,connectionLineType:null,connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:null,isValidConnection:{type:Function,default:void 0},deleteKeyCode:{type:[Boolean,String,Function],default:void 0},selectionKeyCode:{type:[Boolean,String,Function],default:void 0},multiSelectionKeyCode:{type:[Boolean,String,Function],default:void 0},zoomActivationKeyCode:{type:[Boolean,String,Function],default:void 0},panActivationKeyCode:{type:[Boolean,String,Function],default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:null,onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:Boolean,default:void 0},minZoom:null,maxZoom:null,defaultViewport:null,translateExtent:null,nodeExtent:null,defaultMarkerColor:null,zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:null,panOnScrollMode:null,zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:null,edgeUpdaterRadius:null,fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:null,noWheelClassName:null,noPanClassName:null,defaultEdgeOptions:null,elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},__experimentalFeatures:null},emits:["nodesChange","edgesChange","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","nodesInitialized","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","updateNodeInternals","error","update:modelValue","update:nodes","update:edges"],setup(t,{expose:e,emit:n}){const i=t,o=qr(i,"modelValue",n),r=qr(i,"nodes",n),s=qr(i,"edges",n),{vueFlowRef:l,hooks:a,getNodeTypes:u,getEdgeTypes:c,...h}=Ze(i),d=kT({modelValue:o,nodes:r,edges:s},i,{vueFlowRef:l,hooks:a,getNodeTypes:u,getEdgeTypes:c,...h});_2(n,a);const f=oe();return ro(gu,wv()),_v(()=>{d()}),Vn(()=>{l.value=f.value}),e({vueFlowRef:l,hooks:a,getNodeTypes:u,getEdgeTypes:c,...h}),(p,g)=>(M(),se("div",{ref_key:"el",ref:f,class:"vue-flow"},[m(UT,null,{nodes:v(()=>[(M(!0),se(Te,null,rt(Object.keys(O(u)),w=>Ve(p.$slots,`node-${w}`)),256))]),edges:v(()=>[(M(!0),se(Te,null,rt(Object.keys(O(c)),w=>Ve(p.$slots,`edge-${w}`)),256))]),"connection-name":v(()=>[Ve(p.$slots,"connection-line")]),"zoom-pane":v(()=>[Ve(p.$slots,"zoom-pane")]),default:v(()=>[Ve(p.$slots,"default")]),_:3}),m(GT)],512))}}),JT={name:"Panel",compatConfig:{MODE:3}},q0=Le({...JT,props:{position:null},setup(t){const e=t,{userSelectionActive:n}=Ze(),i=ye(()=>`${e.position}`.split("-"));return(o,r)=>(M(),se("div",{class:en(["vue-flow__panel",O(i)]),style:mt({pointerEvents:O(n)?"none":"all"})},[Ve(o.$slots,"default")],6))}});var th="http://www.w3.org/1999/xhtml";const Mp={svg:"http://www.w3.org/2000/svg",xhtml:th,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Q0(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Mp.hasOwnProperty(e)?{space:Mp[e],local:t}:t}function eP(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===th&&e.documentElement.namespaceURI===th?e.createElement(t):e.createElementNS(n,t)}}function tP(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function N0(t){var e=Q0(t);return(e.local?tP:eP)(e)}function nP(){}function I0(t){return t==null?nP:function(){return this.querySelector(t)}}function iP(t){typeof t!="function"&&(t=I0(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=T&&(T=_+1);!(k=w[T])&&++T=0;)(s=i[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function EP(t){t||(t=MP);function e(h,d){return h&&d?t(h.__data__,d.__data__):!h-!d}for(var n=this._groups,i=n.length,o=new Array(i),r=0;re?1:t>=e?0:NaN}function AP(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function DP(){return Array.from(this)}function RP(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?UP:typeof e=="function"?jP:YP)(t,e,n??"")):HP(this.node(),t)}function HP(t,e){return t.style.getPropertyValue(e)||W0(t).getComputedStyle(t,null).getPropertyValue(e)}function GP(t){return function(){delete this[t]}}function ZP(t,e){return function(){this[t]=e}}function KP(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function JP(t,e){return arguments.length>1?this.each((e==null?GP:typeof e=="function"?KP:ZP)(t,e)):this.node()[t]}function L0(t){return t.trim().split(/^|\s+/)}function Qd(t){return t.classList||new z0(t)}function z0(t){this._node=t,this._names=L0(t.getAttribute("class")||"")}z0.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function X0(t,e){for(var n=Qd(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function PC(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,r;n{}};function j0(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Vl.prototype=j0.prototype={constructor:Vl,on:function(t,e){var n=this._,i=IC(t+"",n),o,r=-1,s=i.length;if(arguments.length<2){for(;++r0)for(var n=new Array(o),i=0,o,r;i()=>t;function nh(t,{sourceEvent:e,subject:n,target:i,identifier:o,active:r,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}nh.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function zC(t){return!t.ctrlKey&&!t.button}function XC(){return this.parentNode}function UC(t,e){return e??{x:t.x,y:t.y}}function YC(){return navigator.maxTouchPoints||"ontouchstart"in this}function jC(){var t=zC,e=XC,n=UC,i=YC,o={},r=j0("start","drag","end"),s=0,l,a,u,c,h=0;function d(b){b.on("mousedown.drag",f).filter(i).on("touchstart.drag",w).on("touchmove.drag",y,BC).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(b,k){if(!(c||!t.call(this,b,k))){var x=T(this,e.call(this,b,k),b,k,"mouse");x&&(Jr(b.view).on("mousemove.drag",p,es).on("mouseup.drag",g,es),WC(b.view),Hu(b),u=!1,l=b.clientX,a=b.clientY,x("start",b))}}function p(b){if(Io(b),!u){var k=b.clientX-l,x=b.clientY-a;u=k*k+x*x>h}o.mouse("drag",b)}function g(b){Jr(b.view).on("mousemove.drag mouseup.drag",null),LC(b.view,u),Io(b),o.mouse("end",b)}function w(b,k){if(t.call(this,b,k)){var x=b.changedTouches,$=e.call(this,b,k),L=x.length,V,R;for(V=0;V(t.Line="line",t.Handle="handle",t))(ya||{});function FC({width:t,prevWidth:e,height:n,prevHeight:i,invertX:o,invertY:r}){const s=t-e,l=n-i,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&r&&(a[1]=a[1]*-1),a}const HC={name:"ResizeControl",compatConfig:{MODE:3}},Rp=Le({...HC,props:{nodeId:null,color:null,minWidth:{default:10},minHeight:{default:10},maxWidth:{default:Number.MAX_VALUE},maxHeight:{default:Number.MAX_VALUE},position:null,variant:{default:"handle"},shouldResize:{type:Function},keepAspectRatio:{type:[Boolean,Number],default:!1}},emits:["resizeStart","resize","resizeEnd"],setup(t,{emit:e}){const n=t,i={width:0,height:0,x:0,y:0},o={...i,pointerX:0,pointerY:0,aspectRatio:1},{findNode:r,emits:s}=Ze(),l=A0(),a=oe();let u=o,c=i;const h=ye(()=>n.variant===ya.Line?"right":"bottom-right"),d=ye(()=>n.position??h.value);sa(w=>{if(!a.value||!n.nodeId)return;const y=Jr(a.value),_=d.value.includes("right")||d.value.includes("left"),T=d.value.includes("bottom")||d.value.includes("top"),b=d.value.includes("left"),k=d.value.includes("top"),x=jC().on("start",$=>{const L=r(n.nodeId),{xSnapped:V,ySnapped:R}=l($);c={width:(L==null?void 0:L.dimensions.width)??0,height:(L==null?void 0:L.dimensions.height)??0,x:(L==null?void 0:L.position.x)??0,y:(L==null?void 0:L.position.y)??0},u={...c,pointerX:V,pointerY:R,aspectRatio:c.width/c.height},e("resizeStart",{event:$,params:c})}).on("drag",$=>{var L;const{xSnapped:V,ySnapped:R}=l($),z=r(n.nodeId);if(z){const j=[],{pointerX:J,pointerY:S,width:A,height:P,x:E,y:B,aspectRatio:q}=u,{x:N,y:te,width:U,height:le}=c,ae=Math.floor(_?V-J:0),G=Math.floor(T?R-S:0);let Q=si(A+(b?-ae:ae),n.minWidth,n.maxWidth),ne=si(P+(k?-G:G),n.minHeight,n.maxHeight);if(n.keepAspectRatio){const ie=Q/ne;let K=q;typeof n.keepAspectRatio=="number"&&ie!==n.keepAspectRatio&&(K=n.keepAspectRatio);const re=_&&T,X=_&&!T,Y=T&&!_;Q=ie<=K&&re||Y?ne*K:Q,ne=ie>K&&re||X?Q/K:ne,Q>=n.maxWidth?(Q=n.maxWidth,ne=n.maxWidth/K):Q<=n.minWidth&&(Q=n.minWidth,ne=n.minWidth/K),ne>=n.maxHeight?(ne=n.maxHeight,Q=n.maxHeight*K):ne<=n.minHeight&&(ne=n.minHeight,Q=n.minHeight*K)}const ue=Q!==U,Ae=ne!==le;if(b||k){const ie=b?E-(Q-A):E,K=k?B-(ne-P):B,re=ie!==N&&ue,X=K!==te&&Ae;if(re||X){const Y={id:z.id,type:"position",from:z.position,position:{x:re?ie:N,y:X?K:te}};j.push(Y),c.x=Y.position.x,c.y=Y.position.y}}if(n.nodeId&&(ue||Ae)){const ie={id:n.nodeId,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:Q,height:ne}};j.push(ie),c.width=Q,c.height=ne}if(j.length===0)return;const D=FC({width:c.width,prevWidth:U,height:c.height,prevHeight:le,invertX:b,invertY:k}),I={...c,direction:D};if(((L=n.shouldResize)==null?void 0:L.call(n,$,I))===!1)return;e("resize",{event:$,params:I}),s.nodesChange(j)}}).on("end",$=>{if(n.nodeId){const L={id:n.nodeId,type:"dimensions",resizing:!1};e("resizeEnd",{event:$,params:c}),s.nodesChange([L])}});y.call(x),w(()=>{y.on(".drag",null)})});const f=ye(()=>d.value.split("-")),p=ye(()=>n.variant===ya.Line?"borderColor":"backgroundColor"),g=ye(()=>n.color?{[p.value]:n.color}:{});return(w,y)=>(M(),se("div",{ref_key:"resizeControlRef",ref:a,class:en(["vue-flow__resize-control nodrag",[...O(f),t.variant]]),style:mt(O(g))},[Ve(w.$slots,"default")],6))}}),GC={name:"NodeResizer",compatConfig:{MODE:3},inheritAttrs:!1},ZC=Le({...GC,props:{nodeId:null,color:null,handleClassName:null,handleStyle:null,lineClassName:null,lineStyle:null,isVisible:{type:Boolean,default:!0},minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,shouldResize:{type:Function},keepAspectRatio:{type:[Boolean,Number]}},emits:["resizeStart","resize","resizeEnd"],setup(t,{emit:e}){const n=t,{findNode:i,emits:o}=Ze(),r=["top-left","top-right","bottom-left","bottom-right"],s=["top","right","bottom","left"],l=oi(Dd,null),a=ye(()=>typeof n.nodeId=="string"?n.nodeId:l);return Me([()=>n.minWidth,()=>n.minHeight,()=>n.maxWidth,()=>n.maxHeight],([u,c,h,d])=>{const f=i(a.value);if(f){const p={id:f.id,type:"dimensions",updateStyle:!0,dimensions:{width:f.dimensions.width,height:f.dimensions.height}};u&&f.dimensions.widthh&&(p.dimensions.width=h),d&&f.dimensions.height>d&&(p.dimensions.height=d),(p.dimensions.width!==f.dimensions.width||p.dimensions.height!==f.dimensions.height)&&o.nodesChange([p])}},{flush:"post",immediate:!0}),(u,c)=>t.isVisible?(M(),se(Te,{key:0},[(M(),se(Te,null,rt(s,h=>m(Rp,{key:h,class:en(t.lineClassName),style:mt(t.lineStyle),"node-id":t.nodeId,position:h,variant:O(ya).Line,"keep-aspect-ratio":t.keepAspectRatio,color:t.color,"min-width":t.minWidth,"min-height":t.minHeight,"max-width":t.maxWidth,"max-height":t.maxHeight,"should-resize":t.shouldResize,onResizeStart:c[0]||(c[0]=d=>e("resizeStart",d)),onResize:c[1]||(c[1]=d=>e("resize",d)),onResizeEnd:c[2]||(c[2]=d=>e("resizeEnd",d))},null,8,["class","style","node-id","position","variant","keep-aspect-ratio","color","min-width","min-height","max-width","max-height","should-resize"])),64)),(M(),se(Te,null,rt(r,h=>m(Rp,{key:h,class:en(t.handleClassName),style:mt(t.handleStyle),"node-id":O(a),position:h,color:t.color,"min-width":t.minWidth,"min-height":t.minHeight,"max-width":t.maxWidth,"max-height":t.maxHeight,"should-resize":t.shouldResize,"keep-aspect-ratio":t.keepAspectRatio,onResizeStart:c[3]||(c[3]=d=>e("resizeStart",d)),onResize:c[4]||(c[4]=d=>e("resize",d)),onResizeEnd:c[5]||(c[5]=d=>e("resizeEnd",d))},null,8,["class","style","node-id","position","color","min-width","min-height","max-width","max-height","should-resize","keep-aspect-ratio"])),64))],64)):Oe("",!0)}});const KC={class:"comment-node"},JC={style:{width:"100%"}},e$={class:"title-container"},t$={__name:"CommentNode",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",has_inputs:!1,template:{comment:{required:!1,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"comment",display_name:"comment",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,n=Od(),i=(r,s)=>{n.push({action:r,data:s,nodeId:e.id})},o=oe(e.data.template);return(r,s)=>{const l=C("a-typography-title"),a=C("a-typography-link");return M(),se("div",KC,[m(O(ZC),{"min-width":"100","min-height":"30"}),Qe("div",JC,[Qe("div",e$,[m(l,{level:5,editable:"",content:o.value.comment.value,"onUpdate:content":s[0]||(s[0]=u=>o.value.comment.value=u),class:"comment-text"},null,8,["content"]),m(a,{onClick:s[1]||(s[1]=u=>i("delete")),class:"delete-button"},{default:v(()=>[m(O(Pv))]),_:1})])])])}}},n$=lr(t$,[["__scopeId","data-v-05111a7d"]]),i$=Object.freeze(Object.defineProperty({__proto__:null,default:n$},Symbol.toStringTag,{value:"Module"}));const o$={class:"node"},r$={style:{width:"100%"}},s$={class:"title-container"},l$={class:"description-container"},a$={class:"main-container"},u$={class:"output-container"},ze={__name:"BaseNode",props:{nodeId:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!1},documentLink:{type:String,required:!1,default:""}},setup(t){const e=t,n=Od(),i=(r,s)=>{n.push({action:r,data:s,nodeId:e.nodeId})},{t:o}=Ee();return(r,s)=>{const l=C("a-typography-title"),a=C("a-typography-link"),u=C("a-tooltip"),c=C("a-typography-paragraph");return M(),se("div",o$,[Qe("div",r$,[Qe("div",s$,[m(l,{level:3,style:{"flex-grow":"1"}},{default:v(()=>[ge(pe(e.title)+" ",1),e.documentLink.length>0?(M(),H(m_,{key:0,contents:[{type:"link",text:O(o)("components.nodes.baseNode.document_link"),url:e.documentLink}],class:"hint-popover"},null,8,["contents"])):Oe("",!0)]),_:1}),m(u,{color:"blue",title:O(o)("components.nodes.baseNode.clone_node")},{default:v(()=>[m(a,{onClick:s[0]||(s[0]=h=>i("clone"))},{default:v(()=>[m(O(W_))]),_:1})]),_:1},8,["title"]),m(u,{color:"red",title:O(o)("components.nodes.baseNode.delete_node")},{default:v(()=>[m(a,{onClick:s[1]||(s[1]=h=>i("delete"))},{default:v(()=>[m(O(Pv))]),_:1})]),_:1},8,["title"])]),Qe("div",l$,[m(c,null,{default:v(()=>[ge(pe(e.description),1)]),_:1})]),Qe("div",a$,[Ve(r.$slots,"main")]),Qe("div",u$,[Ve(r.$slots,"output")])])])}}};const c$={class:"template-item-field-text"},h$={key:1,class:"show-in-use-interface-checkbox"},d$={style:{position:"relative"}},f$={class:"template-item-field-content"},p$={__name:"BaseField",props:{id:{type:String,required:!0},name:{type:String,required:!0},required:{type:Boolean,default:!1},type:{type:String,required:!0},nameOnly:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},style:{type:Object,default:()=>({})},show:{type:Boolean,default:!0}},emits:["delete","update:show"],setup(t,{emit:e}){const n=t,{t:i}=Ee(),o=oe(n.show),r=a=>{o.value=a.target.checked,e("update:show",o.value)};Me(()=>n.show,a=>{o.value=a});const s=()=>{e("delete",n.id)},l=a=>({borderColor:a=="target"?"#94d574":"#e8de7f",borderWidth:"2px",backgroundColor:"#fff",width:"10px",height:"10px"});return(a,u)=>{const c=C("a-typography-text"),h=C("a-checkbox"),d=C("a-tooltip"),f=C("a-typography-link");return M(),se("div",{class:en(["template-item-field",n.type=="source"?"template-item-output-field":""]),style:mt(n.style)},[Qe("div",c$,[m(c,null,{default:v(()=>[ge(pe(n.name),1)]),_:1}),n.required?(M(),H(c,{key:0,type:"danger"},{default:v(()=>[ge(" *")]),_:1})):Oe("",!0),Ve(a.$slots,"inline",{},void 0,!0),n.type=="target"?(M(),se("div",h$,[m(d,{title:O(i)("components.nodes.baseField.show_in_use_interface")},{default:v(()=>[m(h,{class:"field-show-checkbox",checked:o.value,onChange:r},{default:v(()=>[m(c,{type:"secondary"},{default:v(()=>[ge(pe(O(i)("components.nodes.baseField.show")),1)]),_:1})]),_:1},8,["checked"])]),_:1},8,["title"])])):Oe("",!0),n.deletable?(M(),H(f,{key:2,type:"danger",class:"delete-field-button",onClick:u[0]||(u[0]=p=>s())},{default:v(()=>[m(O(B_),{style:{float:"right"}})]),_:1})):Oe("",!0)]),t.nameOnly?(M(),H(O(xi),{key:0,style:mt(l(n.type)),id:t.id,type:n.type,position:n.type=="target"?O(be).Left:O(be).Right,"connectable-start":n.type!="target","connectable-end":n.type=="target"},null,8,["style","id","type","position","connectable-start","connectable-end"])):Oe("",!0),Qe("div",d$,[Qe("div",f$,[Ve(a.$slots,"default",{},void 0,!0)]),n.type=="target"?(M(),se(Te,{key:0},[t.nameOnly?Oe("",!0):(M(),H(O(xi),{key:0,style:mt(l("target")),id:t.id,type:"target",position:O(be).Left,"connectable-start":!1,"connectable-end":!0},null,8,["style","id","position"])),t.nameOnly?Oe("",!0):(M(),H(O(xi),{key:1,style:mt(l("source")),id:t.id,type:"source",position:O(be).Right,"connectable-start":!0,"connectable-end":!1},null,8,["style","id","position"]))],64)):(M(),se(Te,{key:1},[t.nameOnly?Oe("",!0):(M(),H(O(xi),{key:0,style:mt(l(n.type)),id:t.id,type:n.type,position:O(be).Right,"connectable-start":!0,"connectable-end":!1},null,8,["style","id","type","position"]))],64))])],6)}}},F=lr(p$,[["__scopeId","data-v-28cde401"]]),m$={__name:"Conditional",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.conditional",has_inputs:!0,template:{field_type:{required:!0,placeholder:"",show:!1,multiline:!0,value:"string",password:!1,options:[{value:"string",label:"Str"},{value:"number",label:"Number"}],name:"field_type",display_name:"field_type",type:"str",clear_after_run:!0,list:!0,field_type:"select"},left_field:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"left_field",display_name:"left_field",type:"str|float|int",clear_after_run:!0,list:!1,field_type:"input"},right_field:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"right_field",display_name:"right_field",type:"str|float|int",clear_after_run:!0,list:!1,field_type:"input"},operator:{required:!0,placeholder:"",show:!1,multiline:!0,value:"equal",password:!1,options:[{value:"equal",label:"equal",field_type:["string","number"]},{value:"not_equal",label:"not_equal",field_type:["string","number"]},{value:"greater_than",label:"greater_than",field_type:["number"]},{value:"less_than",label:"less_than",field_type:["number"]},{value:"greater_than_or_equal",label:"greater_than_or_equal",field_type:["number"]},{value:"less_than_or_equal",label:"less_than_or_equal",field_type:["number"]},{value:"include",label:"include",field_type:["string"]},{value:"not_include",label:"not_include",field_type:["string"]},{value:"is_empty",label:"is_empty",field_type:["string"]},{value:"is_not_empty",label:"is_not_empty",field_type:["string"]},{value:"starts_with",label:"starts_with",field_type:["string"]},{value:"ends_with",label:"ends_with",field_type:["string"]}],name:"operator",display_name:"operator",type:"str",clear_after_run:!0,list:!1,field_type:"input"},true_output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"true_output",display_name:"true_output",type:"str",clear_after_run:!0,list:!1,field_type:""},false_output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"false_output",display_name:"false_output",type:"str",clear_after_run:!0,list:!1,field_type:""},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);i.value.field_type.options=i.value.field_type.options.map(r=>(r.label=n(`components.nodes.controlFlows.Conditional.field_type_${r.value}`),r)),i.value.operator.options=i.value.operator.options.map(r=>(r.label=n(`components.nodes.controlFlows.Conditional.operator_${r.value}`),r));const o=ye(()=>i.value.field_type.value==="number"?i.value.operator.options.filter(r=>r.field_type.includes("number")):i.value.field_type.value==="string"?i.value.operator.options.filter(r=>r.field_type.includes("string")):i.value.operator.options);return(r,s)=>{const l=C("a-select"),a=C("a-col"),u=C("a-input"),c=C("a-input-number"),h=C("a-divider"),d=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.Conditional.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-0"},{main:v(()=>[m(d,{type:"flex"},{default:v(()=>[m(a,{span:24},{default:v(()=>[m(F,{id:"field_type",name:O(n)("components.nodes.controlFlows.Conditional.field_type"),required:"",type:"target",show:i.value.field_type.show,"onUpdate:show":s[1]||(s[1]=f=>i.value.field_type.show=f)},{default:v(()=>[m(l,{style:{width:"100%"},class:"field-content",value:i.value.field_type.value,"onUpdate:value":s[0]||(s[0]=f=>i.value.field_type.value=f),options:i.value.field_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(a,{span:24},{default:v(()=>[m(F,{id:"left_field",name:O(n)("components.nodes.controlFlows.Conditional.left_field"),required:"",type:"target",show:i.value.left_field.show,"onUpdate:show":s[4]||(s[4]=f=>i.value.left_field.show=f)},{default:v(()=>[i.value.field_type.value=="string"?(M(),H(u,{key:0,class:"field-content",value:i.value.left_field.value,"onUpdate:value":s[2]||(s[2]=f=>i.value.left_field.value=f),placeholder:i.value.left_field.placeholder},null,8,["value","placeholder"])):Oe("",!0),i.value.field_type.value=="number"?(M(),H(c,{key:1,style:{width:"100%"},class:"field-content",value:i.value.left_field.value,"onUpdate:value":s[3]||(s[3]=f=>i.value.left_field.value=f),placeholder:i.value.left_field.placeholder},null,8,["value","placeholder"])):Oe("",!0)]),_:1},8,["name","show"])]),_:1}),m(a,{span:24},{default:v(()=>[m(F,{id:"operator",name:O(n)("components.nodes.controlFlows.Conditional.operator"),required:"",type:"target",show:i.value.operator.show,"onUpdate:show":s[6]||(s[6]=f=>i.value.operator.show=f)},{default:v(()=>[m(l,{style:{width:"100%"},class:"field-content",value:i.value.operator.value,"onUpdate:value":s[5]||(s[5]=f=>i.value.operator.value=f),options:o.value},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(a,{span:24},{default:v(()=>[m(F,{id:"right_field",name:O(n)("components.nodes.controlFlows.Conditional.right_field"),required:"",type:"target",show:i.value.right_field.show,"onUpdate:show":s[9]||(s[9]=f=>i.value.right_field.show=f)},{default:v(()=>[i.value.field_type.value=="string"?(M(),H(u,{key:0,class:"field-content",value:i.value.right_field.value,"onUpdate:value":s[7]||(s[7]=f=>i.value.right_field.value=f),placeholder:i.value.right_field.placeholder},null,8,["value","placeholder"])):Oe("",!0),i.value.field_type.value=="number"?(M(),H(c,{key:1,style:{width:"100%"},class:"field-content",value:i.value.right_field.value,"onUpdate:value":s[8]||(s[8]=f=>i.value.right_field.value=f),placeholder:i.value.right_field.placeholder},null,8,["value","placeholder"])):Oe("",!0)]),_:1},8,["name","show"])]),_:1}),m(h),m(a,{span:24},{default:v(()=>[m(F,{id:"true_output",name:O(n)("components.nodes.controlFlows.Conditional.true_output"),required:"",type:"target",show:i.value.true_output.show,"onUpdate:show":s[11]||(s[11]=f=>i.value.true_output.show=f)},{default:v(()=>[m(u,{class:"field-content",value:i.value.true_output.value,"onUpdate:value":s[10]||(s[10]=f=>i.value.true_output.value=f),placeholder:i.value.true_output.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(a,{span:24},{default:v(()=>[m(F,{id:"false_output",name:O(n)("components.nodes.controlFlows.Conditional.false_output"),required:"",type:"target",show:i.value.false_output.show,"onUpdate:show":s[13]||(s[13]=f=>i.value.false_output.show=f)},{default:v(()=>[m(u,{class:"field-content",value:i.value.false_output.value,"onUpdate:value":s[12]||(s[12]=f=>i.value.false_output.value=f),placeholder:i.value.false_output.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.controlFlows.Conditional.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},g$=Object.freeze(Object.defineProperty({__proto__:null,default:m$},Symbol.toStringTag,{value:"Module"})),v$={__name:"Empty",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.empty",has_inputs:!0,template:{input:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"input",display_name:"input",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.Empty.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-4"},{main:v(()=>[m(l,{type:"flex"},{default:v(()=>[m(s,{span:24},{default:v(()=>[m(F,{id:"input",name:O(n)("components.nodes.controlFlows.Empty.input"),required:"",type:"target",show:i.value.input.show,"onUpdate:show":r[0]||(r[0]=a=>i.value.input.show=a),nameOnly:""},null,8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.controlFlows.Empty.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},y$=Object.freeze(Object.defineProperty({__proto__:null,default:v$},Symbol.toStringTag,{value:"Module"})),O$={__name:"JsonProcess",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.json_process",has_inputs:!0,template:{input:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"input",display_name:"input",type:"str|dict",clear_after_run:!0,list:!1,field_type:"input"},process_mode:{required:!1,placeholder:"",show:!1,multiline:!1,value:"get_value",password:!1,options:[{value:"get_value",label:"get_value"},{value:"list_values",label:"list_values"},{value:"list_keys",label:"list_keys"}],name:"process_mode",display_name:"process_mode",type:"str",clear_after_run:!1,list:!0,field_type:"select"},key:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"key",display_name:"key",type:"str|list",clear_after_run:!0,list:!1,field_type:"input"},default_value:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"default_value",display_name:"default_value",type:"str|list",clear_after_run:!0,list:!1,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.process_mode.options=i.value.process_mode.options.map(o=>(o.label=n(`components.nodes.controlFlows.JsonProcess.process_mode_${o.value}`),o)),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-input"),c=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.JsonProcess.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-6"},{main:v(()=>[m(c,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"input",name:O(n)("components.nodes.common.input"),required:"",type:"target",show:i.value.input.show,"onUpdate:show":r[1]||(r[1]=h=>i.value.input.show=h)},{default:v(()=>[m(s,{class:"field-content",value:i.value.input.value,"onUpdate:value":r[0]||(r[0]=h=>i.value.input.value=h),autoSize:!0,showCount:!0,placeholder:i.value.input.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"input",name:O(n)("components.nodes.controlFlows.JsonProcess.process_mode"),required:"",type:"target",show:i.value.process_mode.show,"onUpdate:show":r[3]||(r[3]=h=>i.value.process_mode.show=h)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.process_mode.value,"onUpdate:value":r[2]||(r[2]=h=>i.value.process_mode.value=h),options:i.value.process_mode.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),i.value.process_mode.value=="get_value"?(M(),se(Te,{key:0},[m(l,{span:24},{default:v(()=>[m(F,{id:"key",name:O(n)("components.nodes.controlFlows.JsonProcess.key"),required:"",type:"target",show:i.value.key.show,"onUpdate:show":r[5]||(r[5]=h=>i.value.key.show=h)},{default:v(()=>[m(u,{class:"field-content",value:i.value.key.value,"onUpdate:value":r[4]||(r[4]=h=>i.value.key.value=h),placeholder:i.value.key.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"default_value",name:O(n)("components.nodes.controlFlows.JsonProcess.default_value"),type:"target",show:i.value.default_value.show,"onUpdate:show":r[7]||(r[7]=h=>i.value.default_value.show=h)},{default:v(()=>[m(u,{class:"field-content",value:i.value.default_value.value,"onUpdate:value":r[6]||(r[6]=h=>i.value.default_value.value=h),placeholder:i.value.default_value.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})],64)):Oe("",!0)]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.common.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},w$=Object.freeze(Object.defineProperty({__proto__:null,default:O$},Symbol.toStringTag,{value:"Module"})),_$={__name:"RandomChoice",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.random_choice",has_inputs:!0,template:{input:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"input",display_name:"input",type:"list",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.RandomChoice.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-10"},{main:v(()=>[m(l,{type:"flex"},{default:v(()=>[m(s,{span:24},{default:v(()=>[m(F,{id:"input",name:O(n)("components.nodes.controlFlows.RandomChoice.input"),required:"",type:"target",show:i.value.input.show,"onUpdate:show":r[0]||(r[0]=a=>i.value.input.show=a),nameOnly:""},null,8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.controlFlows.RandomChoice.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},b$=Object.freeze(Object.defineProperty({__proto__:null,default:_$},Symbol.toStringTag,{value:"Module"})),x$={__name:"FileLoader",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"file_processing.file_loader",has_inputs:!0,template:{files:{required:!0,placeholder:"",show:!0,multiline:!0,value:[],password:!1,name:"files",display_name:"files",type:"str",clear_after_run:!0,list:!1,field_type:"file"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.fileProcessing.FileLoader.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/file-processing#h2-0"},{main:v(()=>[m(l,{type:"flex"},{default:v(()=>[m(s,{span:24},{default:v(()=>[m(F,{id:"files",name:O(n)("components.nodes.fileProcessing.FileLoader.files"),required:"",type:"target",show:i.value.files.show,"onUpdate:show":r[0]||(r[0]=a=>i.value.files.show=a)},null,8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.fileProcessing.FileLoader.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},S$=Object.freeze(Object.defineProperty({__proto__:null,default:x$},Symbol.toStringTag,{value:"Module"})),k$={__name:"StableDiffusion",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"image_generation.stable_diffusion",has_inputs:!0,template:{prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"prompt",display_name:"prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},negative_prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"negative_prompt",display_name:"negative_prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},model:{required:!1,placeholder:"",show:!1,multiline:!1,value:"stable-diffusion-v1-5",password:!1,options:[{value:"stable-diffusion-v1-5",label:"stable-diffusion-v1-5"},{value:"stable-diffusion-512-v2-1",label:"stable-diffusion-512-v2-1"},{value:"stable-diffusion-768-v2-1",label:"stable-diffusion-768-v2-1"},{value:"stable-diffusion-xl-beta-v2-2-2",label:"stable-diffusion-xl-beta-v2-2-2"}],name:"model",display_name:"model",type:"str",clear_after_run:!1,list:!0,field_type:"select"},cfg_scale:{required:!0,placeholder:"",show:!1,multiline:!0,value:7,password:!1,name:"cfg_scale",display_name:"cfg_scale",type:"float",clear_after_run:!0,list:!1,field_type:"number"},sampler:{required:!1,placeholder:"",show:!1,multiline:!1,value:"k_dpmpp_2m",password:!1,options:[{value:"ddim",label:"ddim"},{value:"plms",label:"plms"},{value:"k_euler",label:"k_euler"},{value:"k_euler_ancestral",label:"k_euler_ancestral"},{value:"k_heun",label:"k_heun"},{value:"k_dpm_2",label:"k_dpm_2"},{value:"k_dpm_2_ancestral",label:"k_dpm_2_ancestral"},{value:"k_dpmpp_2s_ancestral",label:"k_dpmpp_2s_ancestral"},{value:"k_dpmpp_2m",label:"k_dpmpp_2m"},{value:"k_dpmpp_sde",label:"k_dpmpp_sde"}],name:"sampler",display_name:"sampler",type:"str",clear_after_run:!1,list:!0,field_type:"select"},width:{required:!0,placeholder:"",show:!1,multiline:!0,value:512,password:!1,name:"width",display_name:"width",type:"float",clear_after_run:!0,list:!1,field_type:"number"},height:{required:!0,placeholder:"",show:!1,multiline:!0,value:512,password:!1,name:"height",display_name:"height",type:"float",clear_after_run:!0,list:!1,field_type:"number"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"only_link",password:!1,options:[{value:"only_link",label:"only_link"},{value:"markdown",label:"markdown"},{value:"html",label:"html"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.imageGeneration.StableDiffusion.output_type_${o.value}`),o)),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-input-number"),c=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.imageGeneration.StableDiffusion.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/image-generation#h2-0"},{main:v(()=>[m(c,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"prompt",name:O(n)("components.nodes.imageGeneration.StableDiffusion.prompt"),required:"",type:"target",show:i.value.prompt.show,"onUpdate:show":r[1]||(r[1]=h=>i.value.prompt.show=h)},{default:v(()=>[m(s,{class:"field-content",value:i.value.prompt.value,"onUpdate:value":r[0]||(r[0]=h=>i.value.prompt.value=h),autoSize:!0,showCount:!0,placeholder:i.value.prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"negative_prompt",name:O(n)("components.nodes.imageGeneration.StableDiffusion.negative_prompt"),required:"",type:"target",show:i.value.negative_prompt.show,"onUpdate:show":r[3]||(r[3]=h=>i.value.negative_prompt.show=h)},{default:v(()=>[m(s,{class:"field-content",value:i.value.negative_prompt.value,"onUpdate:value":r[2]||(r[2]=h=>i.value.negative_prompt.value=h),autoSize:!0,showCount:!0,placeholder:i.value.negative_prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"model",name:O(n)("components.nodes.imageGeneration.StableDiffusion.model"),required:"",type:"target",show:i.value.model.show,"onUpdate:show":r[5]||(r[5]=h=>i.value.model.show=h)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.model.value,"onUpdate:value":r[4]||(r[4]=h=>i.value.model.value=h),options:i.value.model.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"cfg_scale",name:O(n)("components.nodes.imageGeneration.StableDiffusion.cfg_scale"),required:"",type:"target",show:i.value.cfg_scale.show,"onUpdate:show":r[7]||(r[7]=h=>i.value.cfg_scale.show=h)},{default:v(()=>[m(u,{value:i.value.cfg_scale.value,"onUpdate:value":r[6]||(r[6]=h=>i.value.cfg_scale.value=h),controls:!1,style:{width:"100%"}},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"sampler",name:O(n)("components.nodes.imageGeneration.StableDiffusion.sampler"),required:"",type:"target",show:i.value.sampler.show,"onUpdate:show":r[9]||(r[9]=h=>i.value.sampler.show=h)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.sampler.value,"onUpdate:value":r[8]||(r[8]=h=>i.value.sampler.value=h),options:i.value.sampler.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"width",name:O(n)("components.nodes.imageGeneration.StableDiffusion.width"),required:"",type:"target",show:i.value.width.show,"onUpdate:show":r[11]||(r[11]=h=>i.value.width.show=h)},{default:v(()=>[m(u,{value:i.value.width.value,"onUpdate:value":r[10]||(r[10]=h=>i.value.width.value=h),controls:!1,style:{width:"100%"}},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"height",name:O(n)("components.nodes.imageGeneration.StableDiffusion.height"),required:"",type:"target",show:i.value.height.show,"onUpdate:show":r[13]||(r[13]=h=>i.value.height.show=h)},{default:v(()=>[m(u,{value:i.value.height.value,"onUpdate:value":r[12]||(r[12]=h=>i.value.height.value=h),controls:!1,style:{width:"100%"}},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.imageGeneration.StableDiffusion.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[15]||(r[15]=h=>i.value.output_type.show=h)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[14]||(r[14]=h=>i.value.output_type.value=h),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.imageGeneration.StableDiffusion.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},T$=Object.freeze(Object.defineProperty({__proto__:null,default:k$},Symbol.toStringTag,{value:"Module"})),P$={__name:"ChatGLM",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"llms.chat_glm",has_inputs:!0,template:{prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"prompt",display_name:"prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},llm_model:{required:!1,placeholder:"",show:!1,multiline:!1,value:"chatglm-6b",password:!1,options:[{value:"chatglm-6b",label:"ChatGLM-6B"}],name:"llm_model",display_name:"llm_model",type:"str",clear_after_run:!1,list:!0,field_type:"select"},temperature:{required:!0,placeholder:"",show:!1,multiline:!0,value:.7,password:!1,name:"temperature",display_name:"temperature",type:"float",clear_after_run:!0,list:!1,field_type:"number"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.llms.ChatGLM.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/language-models#h2-4"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"prompt",name:O(n)("components.nodes.llms.ChatGLM.prompt"),required:"",type:"target",show:i.value.prompt.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.prompt.show=c)},{default:v(()=>[m(s,{class:"field-content",value:i.value.prompt.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.prompt.value=c),autoSize:!0,showCount:!0,placeholder:i.value.prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"llm_model",name:O(n)("components.nodes.llms.ChatGLM.llm_model"),required:"",type:"target",show:i.value.llm_model.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.llm_model.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.llm_model.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.llm_model.value=c),options:i.value.llm_model.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"temperature",name:O(n)("components.nodes.llms.ChatGLM.temperature"),required:"",type:"target",show:i.value.temperature.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.temperature.show=c)},{default:v(()=>[m(pd,{modelValue:i.value.temperature.value,"onUpdate:modelValue":r[4]||(r[4]=c=>i.value.temperature.value=c)},null,8,["modelValue"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.llms.ChatGLM.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},C$=Object.freeze(Object.defineProperty({__proto__:null,default:P$},Symbol.toStringTag,{value:"Module"})),$$={__name:"OpenAI",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"llms.open_ai",has_inputs:!0,template:{prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"prompt",display_name:"prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},llm_model:{required:!1,placeholder:"",show:!1,multiline:!1,value:"gpt-3.5-turbo",password:!1,options:[{value:"gpt-3.5-turbo",label:"gpt-3.5-turbo"},{value:"gpt-3.5-turbo-16k",label:"gpt-3.5-turbo-16k"},{value:"gpt-4",label:"gpt-4"},{value:"gpt-4-32k",label:"gpt-4-32k"}],name:"llm_model",display_name:"llm_model",type:"str",clear_after_run:!1,list:!0,field_type:"select"},temperature:{required:!0,placeholder:"",show:!1,multiline:!0,value:.7,password:!1,name:"temperature",display_name:"temperature",type:"float",clear_after_run:!0,list:!1,field_type:"number"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.llms.OpenAI.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/language-models#h2-0"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"prompt",name:O(n)("components.nodes.llms.OpenAI.prompt"),required:"",type:"target",show:i.value.prompt.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.prompt.show=c)},{default:v(()=>[m(s,{class:"field-content",value:i.value.prompt.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.prompt.value=c),autoSize:!0,showCount:!0,placeholder:i.value.prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"llm_model",name:O(n)("components.nodes.llms.OpenAI.llm_model"),required:"",type:"target",show:i.value.llm_model.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.llm_model.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.llm_model.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.llm_model.value=c),options:i.value.llm_model.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"temperature",name:O(n)("components.nodes.llms.OpenAI.temperature"),required:"",type:"target",show:i.value.temperature.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.temperature.show=c)},{default:v(()=>[m(pd,{modelValue:i.value.temperature.value,"onUpdate:modelValue":r[4]||(r[4]=c=>i.value.temperature.value=c)},null,8,["modelValue"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.llms.OpenAI.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},E$=Object.freeze(Object.defineProperty({__proto__:null,default:$$},Symbol.toStringTag,{value:"Module"})),M$={__name:"Document",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.document",has_inputs:!0,template:{file_name:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"file_name",display_name:"file_name",type:"str",clear_after_run:!0,list:!1,field_type:"input"},content:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content",display_name:"content",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},export_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:".docx",password:!1,options:[{value:".docx",label:".docx"},{value:".xlsx",label:".xlsx"},{value:".txt",label:".txt"},{value:".md",label:".md"},{value:".json",label:".json"},{value:".csv",label:".csv"},{value:".html",label:".html"}],name:"export_type",display_name:"export_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},show_local_file:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_local_file",display_name:"show_local_file",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"},output:{required:!1,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!1,list:!1,field_type:"local_file"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-textarea"),c=C("a-checkbox"),h=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Document.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-4"},{main:v(()=>[m(h,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"file_name",name:O(n)("components.nodes.outputs.Document.file_name"),required:"",type:"target",show:i.value.file_name.show,"onUpdate:show":r[1]||(r[1]=d=>i.value.file_name.show=d)},{default:v(()=>[m(s,{class:"field-content",value:i.value.file_name.value,"onUpdate:value":r[0]||(r[0]=d=>i.value.file_name.value=d),placeholder:i.value.file_name.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"export_type",name:O(n)("components.nodes.outputs.Document.export_type"),required:"",type:"target",show:i.value.export_type.show,"onUpdate:show":r[3]||(r[3]=d=>i.value.export_type.show=d)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.export_type.value,"onUpdate:value":r[2]||(r[2]=d=>i.value.export_type.value=d),options:i.value.export_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"content",name:O(n)("components.nodes.outputs.Document.content"),required:"",type:"target",show:i.value.content.show,"onUpdate:show":r[5]||(r[5]=d=>i.value.content.show=d)},{default:v(()=>[m(u,{value:i.value.content.value,"onUpdate:value":r[4]||(r[4]=d=>i.value.content.value=d),autoSize:!0,showCount:!0,placeholder:i.value.content.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"show_local_file",name:O(n)("components.nodes.outputs.Document.show_local_file"),required:"",type:"target",show:i.value.show_local_file.show,"onUpdate:show":r[7]||(r[7]=d=>i.value.show_local_file.show=d)},{default:v(()=>[m(c,{checked:i.value.show_local_file.value,"onUpdate:checked":r[6]||(r[6]=d=>i.value.show_local_file.value=d)},{default:v(()=>[ge(pe(O(n)("components.nodes.outputs.Document.show_local_file")),1)]),_:1},8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.outputs.Document.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},A$=Object.freeze(Object.defineProperty({__proto__:null,default:M$},Symbol.toStringTag,{value:"Module"})),D$={__name:"Echarts",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.echarts",has_inputs:!0,template:{option:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"option",display_name:"option",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},show_echarts:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_echarts",display_name:"show_echarts",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-checkbox"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Echarts.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-27"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"option",name:O(n)("components.nodes.outputs.Echarts.option"),required:"",type:"target",show:i.value.option.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.option.show=c)},{default:v(()=>[m(s,{value:i.value.option.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.option.value=c),autoSize:!0,showCount:!0,placeholder:i.value.option.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"show_echarts",name:O(n)("components.nodes.outputs.Echarts.show_echarts"),required:"",type:"target",show:i.value.show_echarts.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.show_echarts.show=c)},{inline:v(()=>[m(a,{checked:i.value.show_echarts.value,"onUpdate:checked":r[2]||(r[2]=c=>i.value.show_echarts.value=c)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},R$=Object.freeze(Object.defineProperty({__proto__:null,default:D$},Symbol.toStringTag,{value:"Module"})),q$={__name:"Email",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.email",has_inputs:!0,template:{to_email:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"to_email",display_name:"to_email",type:"str",clear_after_run:!0,list:!1,field_type:"input"},subject:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"subject",display_name:"subject",type:"str",clear_after_run:!0,list:!1,field_type:"input"},content_html:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content_html",display_name:"content_html",type:"str",clear_after_run:!0,list:!1,field_type:"input"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Email.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-8"},{main:v(()=>[m(a,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"to_email",name:O(n)("components.nodes.outputs.Email.to_email"),required:"",type:"target",show:i.value.to_email.show,"onUpdate:show":r[1]||(r[1]=u=>i.value.to_email.show=u)},{default:v(()=>[m(s,{class:"field-content",value:i.value.to_email.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.to_email.value=u),placeholder:i.value.to_email.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"subject",name:O(n)("components.nodes.outputs.Email.subject"),required:"",type:"target",show:i.value.subject.show,"onUpdate:show":r[3]||(r[3]=u=>i.value.subject.show=u)},{default:v(()=>[m(s,{class:"field-content",value:i.value.subject.value,"onUpdate:value":r[2]||(r[2]=u=>i.value.subject.value=u),placeholder:i.value.subject.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"content_html",name:O(n)("components.nodes.outputs.Email.content_html"),required:"",type:"target",show:i.value.content_html.show,"onUpdate:show":r[5]||(r[5]=u=>i.value.content_html.show=u)},{default:v(()=>[m(s,{class:"field-content",value:i.value.content_html.value,"onUpdate:value":r[4]||(r[4]=u=>i.value.content_html.value=u),placeholder:i.value.content_html.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},Q$=Object.freeze(Object.defineProperty({__proto__:null,default:q$},Symbol.toStringTag,{value:"Module"})),N$={__name:"Mermaid",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.mermaid",has_inputs:!0,template:{content:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content",display_name:"content",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},show_mermaid:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_mermaid",display_name:"show_mermaid",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-checkbox"),u=C("a-row");return M(),H(ze,{title:O(n)("components.nodes.outputs.Mermaid.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-24"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"content",name:O(n)("components.nodes.outputs.Mermaid.content"),required:"",type:"target",show:i.value.content.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.content.show=c)},{default:v(()=>[m(s,{value:i.value.content.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.content.value=c),autoSize:!0,showCount:!0,placeholder:i.value.content.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"show_mermaid",name:O(n)("components.nodes.outputs.Mermaid.show_mermaid"),required:"",type:"target",show:i.value.show_mermaid.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.show_mermaid.show=c)},{inline:v(()=>[m(a,{checked:i.value.show_mermaid.value,"onUpdate:checked":r[2]||(r[2]=c=>i.value.show_mermaid.value=c)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["title","description"])}}},I$=Object.freeze(Object.defineProperty({__proto__:null,default:N$},Symbol.toStringTag,{value:"Module"})),V$={__name:"Mindmap",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.mindmap",has_inputs:!0,template:{content:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content",display_name:"content",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},show_mind_map:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_mind_map",display_name:"show_mind_map",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-checkbox"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Mindmap.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-11"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"content",name:O(n)("components.nodes.outputs.Mindmap.content"),required:"",type:"target",show:i.value.content.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.content.show=c)},{default:v(()=>[m(s,{value:i.value.content.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.content.value=c),autoSize:!0,showCount:!0,placeholder:i.value.content.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"show_mind_map",name:O(n)("components.nodes.outputs.Mindmap.show_mind_map"),required:"",type:"target",show:i.value.show_mind_map.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.show_mind_map.show=c)},{inline:v(()=>[m(a,{checked:i.value.show_mind_map.value,"onUpdate:checked":r[2]||(r[2]=c=>i.value.show_mind_map.value=c)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},B$=Object.freeze(Object.defineProperty({__proto__:null,default:V$},Symbol.toStringTag,{value:"Module"})),W$={__name:"Text",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.text",has_inputs:!1,template:{text:{required:!0,placeholder:"",show:!0,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},render_markdown:{required:!0,placeholder:"",show:!1,multiline:!0,value:!0,password:!1,name:"render_markdown",display_name:"render_markdown",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"},output_title:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-input"),u=C("a-checkbox"),c=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Text.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-14"},{main:v(()=>[m(c,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"text",name:O(n)("components.nodes.outputs.Text.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=h=>i.value.text.show=h)},{default:v(()=>[m(s,{value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=h=>i.value.text.value=h),autoSize:!0,showCount:!0,placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_title",name:O(n)("components.nodes.outputs.Text.output_title"),required:"",type:"target",show:i.value.output_title.show,"onUpdate:show":r[3]||(r[3]=h=>i.value.output_title.show=h)},{default:v(()=>[m(a,{class:"field-content",value:i.value.output_title.value,"onUpdate:value":r[2]||(r[2]=h=>i.value.output_title.value=h),placeholder:i.value.output_title.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"render_markdown",name:O(n)("components.nodes.outputs.Text.render_markdown"),required:"",type:"target",show:i.value.render_markdown.show,"onUpdate:show":r[5]||(r[5]=h=>i.value.render_markdown.show=h)},{inline:v(()=>[m(u,{checked:i.value.render_markdown.value,"onUpdate:checked":r[4]||(r[4]=h=>i.value.render_markdown.value=h)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.outputs.Text.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},L$=Object.freeze(Object.defineProperty({__proto__:null,default:W$},Symbol.toStringTag,{value:"Module"})),z$={__name:"WorkflowInvokeOutput",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.workflow_invoke_output",has_inputs:!1,template:{value:{required:!0,placeholder:"",show:!0,multiline:!0,value:"",password:!1,name:"value",display_name:"value",type:"any",clear_after_run:!0,list:!1,field_type:"textarea"},display_name:{required:!0,placeholder:"",show:!0,multiline:!0,value:"",password:!1,name:"display_name",display_name:"display_name",type:"any",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-input"),a=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.WorkflowInvokeOutput.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-30"},{main:v(()=>[m(a,{type:"flex"},{default:v(()=>[m(s,{span:24},{default:v(()=>[m(F,{id:"value",name:O(n)("components.nodes.outputs.WorkflowInvokeOutput.value"),required:"",type:"target",show:i.value.value.show,"onUpdate:show":r[0]||(r[0]=u=>i.value.value.show=u)},null,8,["name","show"])]),_:1}),m(s,{span:24},{default:v(()=>[m(F,{id:"display_name",name:O(n)("components.nodes.outputs.WorkflowInvokeOutput.display_name"),required:"",type:"target",show:i.value.display_name.show,"onUpdate:show":r[2]||(r[2]=u=>i.value.display_name.show=u)},{default:v(()=>[m(l,{class:"field-content",value:i.value.display_name.value,"onUpdate:value":r[1]||(r[1]=u=>i.value.display_name.value=u),placeholder:i.value.display_name.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},X$=Object.freeze(Object.defineProperty({__proto__:null,default:z$},Symbol.toStringTag,{value:"Module"})),U$={style:{display:"flex",gap:"5px"}},Y$={__name:"ListField",props:{id:{type:String,required:!0},name:{type:String,required:!0},required:{type:Boolean,default:!1},type:{type:String,required:!0},nameOnly:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},style:{type:Object,default:()=>({})},value:{type:Array,required:!0}},emits:["delete","update:value"],setup(t,{emit:e}){const n=t,{t:i}=Ee();let o=n.value;const r=(l,a)=>{o[a]=l,e("update:value",o)},s=l=>{o.splice(l,1),e("update:value",o)};return Me(()=>n.value,l=>{o=l}),(l,a)=>{const u=C("a-input"),c=C("a-col"),h=C("a-button"),d=C("a-row");return M(),H(F,{id:n.id,name:n.name,required:n.required,type:n.type,nameOnly:n.nameOnly,deletable:n.deletable,style:mt(n.style),onDelete:a[1]||(a[1]=f=>e("delete",n.id))},{default:v(()=>[m(d,{type:"flex",gutter:[12,12]},{default:v(()=>[(M(!0),se(Te,null,rt(O(o),(f,p)=>(M(),H(c,{span:24,key:p},{default:v(()=>[Qe("div",U$,[m(u,{value:f,onInput:g=>r(g.target.value,p)},null,8,["value","onInput"]),m(O(L_),{onClick:g=>s(p)},null,8,["onClick"])])]),_:2},1024))),128)),m(c,{span:24},{default:v(()=>[m(h,{type:"dashed",style:{width:"100%"},onClick:a[0]||(a[0]=f=>O(o).push(""))},{default:v(()=>[m(O(kv)),ge(" "+pe(O(i)("components.nodes.listField.add_item")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","name","required","type","nameOnly","deletable","style"])}}},j$={__name:"ListRender",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.list_render",has_inputs:!0,template:{list:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"list",display_name:"list",type:"str",clear_after_run:!0,list:!0,field_type:"list"},separator:{required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"separator",display_name:"separator",type:"str",clear_after_run:!0,list:!0,field_type:"input"},output_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"},{value:"list",label:"List"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type||(i.value.output_type={required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"},{value:"list",label:"List"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"}),i.value.separator||(i.value.separator={required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"separator",display_name:"separator",type:"str",clear_after_run:!0,list:!0,field_type:"input"}),i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.textProcessing.ListRender.output_type_${o.value}`),o)),(o,r)=>{const s=C("a-col"),l=C("a-input"),a=C("a-select"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.ListRender.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-0"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(s,{span:24},{default:v(()=>[m(Y$,{id:"list",name:O(n)("components.nodes.textProcessing.ListRender.list"),required:"",type:"target",value:i.value.list.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.list.value=c),show:i.value.list.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.list.show=c)},null,8,["name","value","show"])]),_:1}),i.value.output_type.value=="text"?(M(),H(s,{key:0,span:24},{default:v(()=>[m(F,{id:"separator",name:O(n)("components.nodes.textProcessing.ListRender.separator"),required:"",type:"target",show:i.value.separator.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.separator.show=c)},{default:v(()=>[m(l,{style:{width:"100%"},class:"field-content",value:i.value.separator.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.separator.value=c),placeholder:i.value.separator.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):Oe("",!0),m(s,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.textProcessing.ListRender.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.output_type.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[4]||(r[4]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.textProcessing.ListRender.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},F$=Object.freeze(Object.defineProperty({__proto__:null,default:j$},Symbol.toStringTag,{value:"Module"})),H$={__name:"MarkdownToHtml",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.markdown_to_html",has_inputs:!0,template:{markdown:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"markdown",display_name:"markdown",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},html:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"html",display_name:"html",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.MarkdownToHtml.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-4"},{main:v(()=>[m(a,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"markdown",name:O(n)("components.nodes.textProcessing.MarkdownToHtml.markdown"),required:"",type:"target",show:i.value.markdown.show,"onUpdate:show":r[1]||(r[1]=u=>i.value.markdown.show=u)},{default:v(()=>[m(s,{class:"field-content",value:i.value.markdown.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.markdown.value=u),autoSize:!0,showCount:!0,placeholder:i.value.markdown.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"html",name:O(n)("components.nodes.textProcessing.MarkdownToHtml.html"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},G$=Object.freeze(Object.defineProperty({__proto__:null,default:H$},Symbol.toStringTag,{value:"Module"})),Z$={__name:"TemplateEditorModal",props:{fields:{type:Object,required:!0,default:{}},open:{type:Boolean,required:!0,default:!1},template:{type:String,required:!0,default:""}},emits:["update:open","update:template"],setup(t,{emit:e}){const n=t,{t:i}=Ee();let o=oe(n.open),r=oe(n.template);const s=()=>{o.value=!1,e("update:open",o.value),e("update:template",r.value)},l=()=>{o.value=!1,e("update:open",o.value)};Me(()=>n.open,u=>{o.value=u}),Me(()=>n.template,u=>{r.value=u});const a=(u,c)=>{u.dataTransfer.setData("text/plain",`{{${c}}}`)};return(u,c)=>{const h=C("a-typography-text"),d=C("a-button"),f=C("a-space"),p=C("a-card"),g=C("a-col"),w=C("a-textarea"),y=C("a-row"),_=C("a-modal");return M(),H(_,{open:O(o),width:"80vw",onOk:s,onCancel:l,style:{"max-width":"1280px",width:"80vw"}},{title:v(()=>[m(O(o_)),ge(" "+pe(O(i)("components.templateEditorModal.title")),1)]),default:v(()=>[m(y,{gutter:16},{default:v(()=>[m(g,{span:6},{default:v(()=>[m(p,null,{title:v(()=>[ge(pe(O(i)("components.templateEditorModal.variable_fields"))+" ",1),m(h,{type:"secondary",style:{"font-size":"12px","font-weight":"normal"}},{default:v(()=>[ge(pe(O(i)("components.templateEditorModal.drag_to_insert")),1)]),_:1})]),default:v(()=>[m(f,{direction:"vertical",style:{width:"100%"}},{default:v(()=>[(M(!0),se(Te,null,rt(Object.keys(n.fields),T=>(M(),se(Te,{key:T},[["template","output"].includes(T)?Oe("",!0):(M(),H(d,{key:0,block:"",draggable:"true",onDragstart:b=>a(b,T)},{default:v(()=>[ge(pe(T),1)]),_:2},1032,["onDragstart"]))],64))),128))]),_:1})]),_:1})]),_:1}),m(g,{span:18},{default:v(()=>[m(p,{title:O(i)("components.templateEditorModal.template")},{default:v(()=>[m(w,{value:O(r),"onUpdate:value":c[0]||(c[0]=T=>xs(r)?r.value=T:r=T),rows:20},null,8,["value"])]),_:1},8,["title"])]),_:1})]),_:1})]),_:1},8,["open"])}}},K$={style:{display:"flex",gap:"5px"}},J$={__name:"TemplateCompose",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.template_compose",has_inputs:!0,template:{template:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"template",display_name:"template",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template),o=zt({required:!0,placeholder:"",show:!1,multiline:!1,value:"",options:[],password:!1,name:"",display_name:"",type:"str",clear_after_run:!1,list:!1,field_type:"input"}),r=f=>{o.multiline=f=="textarea"},s=oe(!1),l=()=>{s.value=!0},a=()=>{o.name=o.display_name,i.value[o.name]=JSON.parse(JSON.stringify(o)),s.value=!1,o.display_name="",o.options=[]},u=f=>{delete i.value[f]},c=(f,p)=>{o.options[p]={value:f,label:f}},h=f=>{o.options.splice(f,1)},d=oe(!1);return(f,p)=>{const g=C("a-select"),w=C("a-textarea"),y=C("a-input"),_=C("a-col"),T=C("a-button"),b=C("a-select-option"),k=C("a-form-item"),x=C("a-row"),$=C("a-form"),L=C("a-drawer"),V=C("a-typography-paragraph"),R=C("a-divider");return M(),H(ze,{nodeId:t.id,style:{width:"400px"},title:O(n)("components.nodes.textProcessing.TemplateCompose.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-8"},{main:v(()=>[m(x,{style:{display:"block"}},{default:v(()=>[(M(!0),se(Te,null,rt(Object.keys(i.value),(z,j)=>(M(),se(Te,{key:j},[["template","output"].includes(z)?Oe("",!0):(M(),H(_,{key:0,span:24},{default:v(()=>[m(F,{id:z,name:i.value[z].display_name,required:"",type:"target",deletable:"",onDelete:J=>u(z),show:i.value[z].show,"onUpdate:show":J=>i.value[z].show=J},{default:v(()=>[i.value[z].field_type=="select"?(M(),H(g,{key:0,class:"field-content",style:{width:"100%"},value:i.value[z].value,"onUpdate:value":J=>i.value[z].value=J,options:i.value[z].options,placeholder:i.value[z].placeholder},null,8,["value","onUpdate:value","options","placeholder"])):i.value[z].field_type=="textarea"?(M(),H(w,{key:1,class:"field-content",value:i.value[z].value,"onUpdate:value":J=>i.value[z].value=J,autoSize:{minRows:1,maxRows:10},showCount:!0,placeholder:i.value[z].placeholder},null,8,["value","onUpdate:value","placeholder"])):i.value[z].field_type=="input"?(M(),H(y,{key:2,class:"field-content",value:i.value[z].value,"onUpdate:value":J=>i.value[z].value=J,placeholder:i.value[z].placeholder},null,8,["value","onUpdate:value","placeholder"])):Oe("",!0)]),_:2},1032,["id","name","onDelete","show","onUpdate:show"])]),_:2},1024))],64))),128)),m(_,{span:24,style:{padding:"10px"}},{default:v(()=>[m(T,{type:"dashed",block:"",onClick:l,class:"add-field-button"},{default:v(()=>[m(O(Af)),ge(" "+pe(O(n)("components.nodes.textProcessing.TemplateCompose.add_field")),1)]),_:1}),m(L,{open:s.value,"onUpdate:open":p[3]||(p[3]=z=>s.value=z),class:"custom-class",title:O(n)("components.nodes.textProcessing.TemplateCompose.add_field"),placement:"right"},{extra:v(()=>[m(T,{type:"primary",onClick:a},{default:v(()=>[ge(pe(O(n)("common.add")),1)]),_:1})]),default:v(()=>[m($,null,{default:v(()=>[m(k,{label:O(n)("components.nodes.textProcessing.TemplateCompose.add_field_type")},{default:v(()=>[m(g,{ref:"select",value:o.field_type,"onUpdate:value":p[0]||(p[0]=z=>o.field_type=z),style:{width:"120px"},onChange:r},{default:v(()=>[m(b,{value:"input"},{default:v(()=>[ge(pe(O(n)("components.nodes.textProcessing.TemplateCompose.field_type_input")),1)]),_:1}),m(b,{value:"textarea"},{default:v(()=>[ge(pe(O(n)("components.nodes.textProcessing.TemplateCompose.field_type_textarea")),1)]),_:1}),m(b,{value:"select"},{default:v(()=>[ge(pe(O(n)("components.nodes.textProcessing.TemplateCompose.field_type_select")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),m(k,{label:O(n)("components.nodes.textProcessing.TemplateCompose.add_field_display_name")},{default:v(()=>[m(y,{value:o.display_name,"onUpdate:value":p[1]||(p[1]=z=>o.display_name=z)},null,8,["value"])]),_:1},8,["label"]),o.field_type=="select"?(M(),H(k,{key:0,label:O(n)("components.nodes.textProcessing.TemplateCompose.add_field_list_options")},{default:v(()=>[m(x,{type:"flex",gutter:[12,12]},{default:v(()=>[(M(!0),se(Te,null,rt(o.options,(z,j)=>(M(),H(_,{span:24,key:j},{default:v(()=>[Qe("div",K$,[m(y,{value:z.value,onInput:J=>c(J.target.value,j)},null,8,["value","onInput"]),m(O(g_),{onClick:J=>h(j)},null,8,["onClick"])])]),_:2},1024))),128)),m(_,{span:24},{default:v(()=>[m(T,{type:"dashed",style:{width:"100%"},onClick:p[2]||(p[2]=z=>o.options.push(""))},{default:v(()=>[m(O(Af)),ge(" "+pe(O(n)("components.nodes.listField.add_item")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["label"])):Oe("",!0)]),_:1})]),_:1},8,["open","title"])]),_:1})]),_:1}),m(F,{id:"template",name:O(n)("components.nodes.textProcessing.TemplateCompose.template"),required:"",type:"target",show:i.value.template.show,"onUpdate:show":p[7]||(p[7]=z=>i.value.template.show=z)},{default:v(()=>[m(V,{ellipsis:{row:1,expandable:!1},content:i.value.template.value},null,8,["content"]),m(T,{block:"",type:"primary",class:"open-template-editor-button",onClick:p[4]||(p[4]=z=>d.value=!0)},{default:v(()=>[ge(pe(O(n)("components.nodes.textProcessing.TemplateCompose.open_template_editor")),1)]),_:1}),m(Z$,{open:d.value,"onUpdate:open":p[5]||(p[5]=z=>d.value=z),template:i.value.template.value,"onUpdate:template":p[6]||(p[6]=z=>i.value.template.value=z),fields:i.value},null,8,["open","template","fields"])]),_:1},8,["name","show"]),m(R)]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.textProcessing.TemplateCompose.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},eE=Object.freeze(Object.defineProperty({__proto__:null,default:J$},Symbol.toStringTag,{value:"Module"})),tE={__name:"TextInOut",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.text_in_out",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.TextInOut.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-12"},{main:v(()=>[m(a,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"text",name:O(n)("components.nodes.textProcessing.TextInOut.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=u=>i.value.text.show=u)},{default:v(()=>[m(s,{class:"field-content",value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.text.value=u),placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.textProcessing.TextInOut.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},nE=Object.freeze(Object.defineProperty({__proto__:null,default:tE},Symbol.toStringTag,{value:"Module"})),iE={__name:"TextSplitters",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.text_splitters",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},split_method:{required:!0,placeholder:"",show:!1,multiline:!1,value:"general",password:!1,options:[{value:"general",label:"general"},{value:"delimiter",label:"delimiter"},{value:"markdown",label:"markdown"}],name:"split_method",display_name:"split_method",type:"str",clear_after_run:!0,list:!1,field_type:"select"},chunk_length:{required:!0,placeholder:"",show:!1,multiline:!0,value:500,password:!1,name:"chunk_length",display_name:"chunk_length",type:"str",clear_after_run:!0,list:!1,field_type:"number"},chunk_overlap:{required:!0,placeholder:"",show:!1,multiline:!0,value:30,password:!1,name:"chunk_overlap",display_name:"chunk_overlap",type:"str",clear_after_run:!0,list:!1,field_type:"number"},delimiter:{required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"delimiter",display_name:"delimiter",type:"str",clear_after_run:!0,list:!0,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"list",clear_after_run:!0,list:!0,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.split_method.options=i.value.split_method.options.map(o=>(o.label=n(`components.nodes.textProcessing.TextSplitters.split_method_${o.value}`),o)),i.value.delimiter||(i.value.delimiter={required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"delimiter",display_name:"delimiter",type:"str",clear_after_run:!0,list:!0,field_type:"input"}),i.value.chunk_overlap||(i.value.chunk_overlap={required:!0,placeholder:"",show:!1,multiline:!0,value:30,password:!1,name:"chunk_overlap",display_name:"chunk_overlap",type:"str",clear_after_run:!0,list:!1,field_type:"number"}),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-input-number"),c=C("a-input"),h=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.TextSplitters.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-16"},{main:v(()=>[m(h,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"text",name:O(n)("components.nodes.textProcessing.TextSplitters.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=d=>i.value.text.show=d)},{default:v(()=>[m(s,{class:"field-content",value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=d=>i.value.text.value=d),autoSize:!0,showCount:!0,placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"split_method",name:O(n)("components.nodes.textProcessing.TextSplitters.split_method"),required:"",type:"target",show:i.value.split_method.show,"onUpdate:show":r[3]||(r[3]=d=>i.value.split_method.show=d)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.split_method.value,"onUpdate:value":r[2]||(r[2]=d=>i.value.split_method.value=d),options:i.value.split_method.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),["general","markdown"].includes(i.value.split_method.value)?(M(),H(l,{key:0,span:24},{default:v(()=>[m(F,{id:"chunk_length",name:O(n)("components.nodes.textProcessing.TextSplitters.chunk_length"),required:"",type:"target",show:i.value.chunk_length.show,"onUpdate:show":r[5]||(r[5]=d=>i.value.chunk_length.show=d)},{default:v(()=>[m(u,{style:{width:"100%"},class:"field-content",value:i.value.chunk_length.value,"onUpdate:value":r[4]||(r[4]=d=>i.value.chunk_length.value=d),placeholder:i.value.chunk_length.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):Oe("",!0),["general","markdown"].includes(i.value.split_method.value)?(M(),H(l,{key:1,span:24},{default:v(()=>[m(F,{id:"chunk_overlap",name:O(n)("components.nodes.textProcessing.TextSplitters.chunk_overlap"),required:"",type:"target",show:i.value.chunk_overlap.show,"onUpdate:show":r[7]||(r[7]=d=>i.value.chunk_overlap.show=d)},{default:v(()=>[m(u,{style:{width:"100%"},class:"field-content",value:i.value.chunk_overlap.value,"onUpdate:value":r[6]||(r[6]=d=>i.value.chunk_overlap.value=d),placeholder:i.value.chunk_overlap.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):Oe("",!0),i.value.split_method.value=="delimiter"?(M(),H(l,{key:2,span:24},{default:v(()=>[m(F,{id:"delimiter",name:O(n)("components.nodes.textProcessing.TextSplitters.delimiter"),required:"",type:"target",show:i.value.delimiter.show,"onUpdate:show":r[9]||(r[9]=d=>i.value.delimiter.show=d)},{default:v(()=>[m(c,{style:{width:"100%"},class:"field-content",value:i.value.delimiter.value,"onUpdate:value":r[8]||(r[8]=d=>i.value.delimiter.value=d),placeholder:i.value.delimiter.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):Oe("",!0)]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.textProcessing.TextSplitters.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},oE=Object.freeze(Object.defineProperty({__proto__:null,default:iE},Symbol.toStringTag,{value:"Module"})),rE={__name:"TextTruncation",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.text_truncation",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},truncate_method:{required:!0,placeholder:"",show:!1,multiline:!1,value:"general",password:!1,options:[{value:"general",label:"general"},{value:"markdown",label:"markdown"}],name:"truncate_method",display_name:"truncate_method",type:"str",clear_after_run:!0,list:!1,field_type:"select"},truncate_length:{required:!0,placeholder:"",show:!1,multiline:!0,value:2e3,password:!1,name:"truncate_length",display_name:"truncate_length",type:"str",clear_after_run:!0,list:!1,field_type:"number"},floating_range:{required:!0,placeholder:"",show:!1,multiline:!0,value:100,password:!1,name:"floating_range",display_name:"floating_range",type:"str",clear_after_run:!0,list:!1,field_type:"number"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"list",clear_after_run:!0,list:!0,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.truncate_method.options=i.value.truncate_method.options.map(o=>(o.label=n(`components.nodes.textProcessing.TextTruncation.truncate_method_${o.value}`),o)),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-input-number"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.TextTruncation.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-20"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"text",name:O(n)("components.nodes.textProcessing.TextTruncation.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.text.show=c)},{default:v(()=>[m(s,{class:"field-content",value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.text.value=c),autoSize:!0,showCount:!0,placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"truncate_length",name:O(n)("components.nodes.textProcessing.TextTruncation.truncate_length"),required:"",type:"target",show:i.value.truncate_length.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.truncate_length.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},class:"field-content",value:i.value.truncate_length.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.truncate_length.value=c),placeholder:i.value.truncate_length.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"floating_range",name:O(n)("components.nodes.textProcessing.TextTruncation.floating_range"),required:"",type:"target",show:i.value.floating_range.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.floating_range.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},class:"field-content",value:i.value.floating_range.value,"onUpdate:value":r[4]||(r[4]=c=>i.value.floating_range.value=c),placeholder:i.value.floating_range.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.textProcessing.TextTruncation.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},sE=Object.freeze(Object.defineProperty({__proto__:null,default:rE},Symbol.toStringTag,{value:"Module"})),lE={__name:"ImageSearch",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"tools.image_search",has_inputs:!0,template:{search_text:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"search_text",display_name:"search_text",type:"str",clear_after_run:!0,list:!1,field_type:"input"},search_engine:{required:!0,placeholder:"",show:!1,multiline:!1,value:"bing",password:!1,options:[{value:"bing",label:"bing"},{value:"pexels",label:"pexels"}],name:"search_engine",display_name:"search_engine",type:"str",clear_after_run:!0,list:!1,field_type:"select"},count:{required:!0,placeholder:"",show:!1,multiline:!0,value:5,password:!1,name:"count",display_name:"count",type:"str",clear_after_run:!0,list:!1,field_type:"number"},output_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"markdown",password:!1,options:[{value:"text",label:"text"},{value:"markdown",label:"markdown"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"output",display_name:"output",type:"list|str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.search_engine.options=i.value.search_engine.options.map(o=>(o.label=n(`components.nodes.tools.ImageSearch.search_engine_${o.value}`),o)),i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.tools.ImageSearch.output_type_${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-input-number"),c=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.tools.ImageSearch.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/tools#h2-0"},{main:v(()=>[m(c,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"search_text",name:O(n)("components.nodes.tools.ImageSearch.search_text"),required:"",type:"target",show:i.value.search_text.show,"onUpdate:show":r[1]||(r[1]=h=>i.value.search_text.show=h)},{default:v(()=>[m(s,{class:"field-content",value:i.value.search_text.value,"onUpdate:value":r[0]||(r[0]=h=>i.value.search_text.value=h),placeholder:i.value.search_text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"search_engine",name:O(n)("components.nodes.tools.ImageSearch.search_engine"),required:"",type:"target",show:i.value.search_engine.show,"onUpdate:show":r[3]||(r[3]=h=>i.value.search_engine.show=h)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.search_engine.value,"onUpdate:value":r[2]||(r[2]=h=>i.value.search_engine.value=h),options:i.value.search_engine.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"count",name:O(n)("components.nodes.tools.ImageSearch.count"),required:"",type:"target",show:i.value.count.show,"onUpdate:show":r[5]||(r[5]=h=>i.value.count.show=h)},{default:v(()=>[m(u,{style:{width:"100%"},class:"field-content",value:i.value.count.value,"onUpdate:value":r[4]||(r[4]=h=>i.value.count.value=h),placeholder:i.value.count.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.tools.ImageSearch.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[7]||(r[7]=h=>i.value.output_type.show=h)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[6]||(r[6]=h=>i.value.output_type.value=h),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.tools.ImageSearch.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},aE=Object.freeze(Object.defineProperty({__proto__:null,default:lE},Symbol.toStringTag,{value:"Module"})),F0=1024;let uE=0,Gu=class{constructor(e,n){this.from=e,this.to=n}};class De{constructor(e={}){this.id=uE++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Xt.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}De.closedBy=new De({deserialize:t=>t.split(" ")});De.openedBy=new De({deserialize:t=>t.split(" ")});De.group=new De({deserialize:t=>t.split(" ")});De.contextHash=new De({perNode:!0});De.lookAhead=new De({perNode:!0});De.mounted=new De({perNode:!0});const cE=Object.create(null);class Xt{constructor(e,n,i,o=0){this.name=e,this.props=n,this.id=i,this.flags=o}static define(e){let n=e.props&&e.props.length?Object.create(null):cE,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new Xt(e.name||"",n,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(o)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[r[0].id]=r[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(De.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let o of i.split(" "))n[o]=e[i];return i=>{for(let o=i.prop(De.group),r=-1;r<(o?o.length:0);r++){let s=n[r<0?i.name:o[r]];if(s)return s}}}}Xt.none=new Xt("",Object.create(null),0,8);class Nd{constructor(e){this.types=e;for(let n=0;n0;for(let a=this.cursor(s|pt.IncludeAnonymous);;){let u=!1;if(a.from<=r&&a.to>=o&&(!l&&a.type.isAnonymous||n(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Bd(Xt.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,o)=>new ut(this.type,n,i,o,this.propValues),e.makeTree||((n,i,o)=>new ut(Xt.none,n,i,o)))}static build(e){return dE(e)}}ut.empty=new ut(Xt.none,[],[],0);class Id{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Id(this.buffer,this.index)}}class mo{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Xt.none}toString(){let e=[];for(let n=0;n0));a=s[a+3]);return l}slice(e,n,i){let o=this.buffer,r=new Uint16Array(n-e),s=0;for(let l=e,a=0;l=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function G0(t,e){let n=t.childBefore(e);for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(t=n,n=i.prevSibling):n=i}return t}function Ko(t,e,n,i){for(var o;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;e!=u;e+=n){let c=l[e],h=a[e]+s.from;if(H0(o,i,h,h+c.length)){if(c instanceof mo){if(r&pt.ExcludeBuffers)continue;let d=c.findChild(0,c.buffer.length,n,i-h,o);if(d>-1)return new An(new hE(s,c,e,h),null,d)}else if(r&pt.IncludeAnonymous||!c.type.isAnonymous||Vd(c)){let d;if(!(r&pt.IgnoreMounts)&&c.props&&(d=c.prop(De.mounted))&&!d.overlay)return new yn(d.tree,h,e,s);let f=new yn(c,h,e,s);return r&pt.IncludeAnonymous||!f.type.isAnonymous?f:f.nextChild(n<0?c.children.length-1:0,n,i,o)}}}if(r&pt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let o;if(!(i&pt.IgnoreOverlays)&&(o=this._tree.prop(De.mounted))&&o.overlay){let r=e-this.from;for(let{from:s,to:l}of o.overlay)if((n>0?s<=r:s=r:l>r))return new yn(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new _a(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,n=0){return Ko(this,e,n,!1)}resolveInner(e,n=0){return Ko(this,e,n,!0)}enterUnfinishedNodesBefore(e){return G0(this,e)}getChild(e,n=null,i=null){let o=Oa(this,e,n,i);return o.length?o[0]:null}getChildren(e,n=null,i=null){return Oa(this,e,n,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return wa(this,e)}}function Oa(t,e,n,i){let o=t.cursor(),r=[];if(!o.firstChild())return r;if(n!=null){for(;!o.type.is(n);)if(!o.nextSibling())return r}for(;;){if(i!=null&&o.type.is(i))return r;if(o.type.is(e)&&r.push(o.node),!o.nextSibling())return i==null?r:[]}}function wa(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class hE{constructor(e,n,i,o){this.parent=e,this.buffer=n,this.index=i,this.start=o}}class An{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:o}=this.context,r=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.context.start,i);return r<0?null:new An(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&pt.ExcludeBuffers)return null;let{buffer:o}=this.context,r=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return r<0?null:new An(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new An(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new An(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}cursor(e=0){return new _a(this,e)}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,o=this.index+4,r=i.buffer[this.index+3];if(r>o){let s=i.buffer[this.index+1];e.push(i.slice(o,r,s)),n.push(0)}return new ut(this.type,e,n,this.to-this.from)}resolve(e,n=0){return Ko(this,e,n,!1)}resolveInner(e,n=0){return Ko(this,e,n,!0)}enterUnfinishedNodesBefore(e){return G0(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,n=null,i=null){let o=Oa(this,e,n,i);return o.length?o[0]:null}getChildren(e,n=null,i=null){return Oa(this,e,n,i)}get node(){return this}matchContext(e){return wa(this,e)}}class _a{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof yn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:o}=this.buffer;return this.type=n||o.set.types[o.buffer[e]],this.from=i+o.buffer[e+1],this.to=i+o.buffer[e+2],!0}yield(e){return e?e instanceof yn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:o}=this.buffer,r=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&pt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&pt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&pt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let o=i<0?0:this.stack[i]+4;if(this.index!=o)return this.yieldBuf(n.findChild(o,this.index,-1,0,4))}else{let o=n.buffer[this.index+3];if(o<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:o}=this;if(o){if(e>0){if(this.index-1)for(let r=n+e,s=e<0?-1:i._tree.children.length;r!=s;r+=e){let l=i._tree.children[r];if(this.mode&pt.IncludeAnonymous||l instanceof mo||!l.type.isAnonymous||Vd(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==o){if(o==this.index)return s;n=s,i=r+1;break e}o=this.stack[--r]}for(let o=i;o=0;r--){if(r<0)return wa(this.node,e,o);let s=i[n.buffer[this.stack[r]]];if(!s.isAnonymous){if(e[o]&&e[o]!=s.name)return!1;o--}}return!0}}function Vd(t){return t.children.some(e=>e instanceof mo||!e.type.isAnonymous||Vd(e))}function dE(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:o=F0,reused:r=[],minRepeatType:s=i.types.length}=t,l=Array.isArray(n)?new Id(n,n.length):n,a=i.types,u=0,c=0;function h(b,k,x,$,L){let{id:V,start:R,end:z,size:j}=l,J=c;for(;j<0;)if(l.next(),j==-1){let B=r[V];x.push(B),$.push(R-b);return}else if(j==-3){u=V;return}else if(j==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${j}`);let S=a[V],A,P,E=R-b;if(z-R<=o&&(P=g(l.pos-k,L))){let B=new Uint16Array(P.size-P.skip),q=l.pos-P.size,N=B.length;for(;l.pos>q;)N=w(P.start,B,N);A=new mo(B,z-P.start,i),E=P.start-b}else{let B=l.pos-j;l.next();let q=[],N=[],te=V>=s?V:-1,U=0,le=z;for(;l.pos>B;)te>=0&&l.id==te&&l.size>=0?(l.end<=le-o&&(f(q,N,R,U,l.end,le,te,J),U=q.length,le=l.end),l.next()):h(R,B,q,N,te);if(te>=0&&U>0&&U-1&&U>0){let ae=d(S);A=Bd(S,q,N,0,q.length,0,z-R,ae,ae)}else A=p(S,q,N,z-R,J-z)}x.push(A),$.push(E)}function d(b){return(k,x,$)=>{let L=0,V=k.length-1,R,z;if(V>=0&&(R=k[V])instanceof ut){if(!V&&R.type==b&&R.length==$)return R;(z=R.prop(De.lookAhead))&&(L=x[V]+R.length+z)}return p(b,k,x,$,L)}}function f(b,k,x,$,L,V,R,z){let j=[],J=[];for(;b.length>$;)j.push(b.pop()),J.push(k.pop()+x-L);b.push(p(i.types[R],j,J,V-L,z-V)),k.push(L-x)}function p(b,k,x,$,L=0,V){if(u){let R=[De.contextHash,u];V=V?[R].concat(V):[R]}if(L>25){let R=[De.lookAhead,L];V=V?[R].concat(V):[R]}return new ut(b,k,x,$,V)}function g(b,k){let x=l.fork(),$=0,L=0,V=0,R=x.end-o,z={size:0,start:0,skip:0};e:for(let j=x.pos-b;x.pos>j;){let J=x.size;if(x.id==k&&J>=0){z.size=$,z.start=L,z.skip=V,V+=4,$+=4,x.next();continue}let S=x.pos-J;if(J<0||S=s?4:0,P=x.start;for(x.next();x.pos>S;){if(x.size<0)if(x.size==-3)A+=4;else break e;else x.id>=s&&(A+=4);x.next()}L=P,$+=J,V+=A}return(k<0||$==b)&&(z.size=$,z.start=L,z.skip=V),z.size>4?z:void 0}function w(b,k,x){let{id:$,start:L,end:V,size:R}=l;if(l.next(),R>=0&&$4){let j=l.pos-(R-4);for(;l.pos>j;)x=w(b,k,x)}k[--x]=z,k[--x]=V-b,k[--x]=L-b,k[--x]=$}else R==-3?u=$:R==-4&&(c=$);return x}let y=[],_=[];for(;l.pos>0;)h(t.start||0,t.bufferStart||0,y,_,-1);let T=(e=t.length)!==null&&e!==void 0?e:y.length?_[0]+y[0].length:0;return new ut(a[t.topID],y.reverse(),_.reverse(),T)}const Qp=new WeakMap;function Bl(t,e){if(!t.isAnonymous||e instanceof mo||e.type!=t)return 1;let n=Qp.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof ut)){n=1;break}n+=Bl(t,i)}Qp.set(e,n)}return n}function Bd(t,e,n,i,o,r,s,l,a){let u=0;for(let p=i;p=c)break;x+=$}if(T==b+1){if(x>c){let $=p[b];f($.children,$.positions,0,$.children.length,g[b]+_);continue}h.push(p[b])}else{let $=g[T-1]+p[T-1].length-k;h.push(Bd(t,p,g,b,T,k,$,null,a))}d.push(k+_-r)}}return f(e,n,i,o,0),(l||a)(h,d,s)}class fE{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof An?this.setBuffer(e.context.buffer,e.index,n):e instanceof yn&&this.map.set(e.tree,n)}get(e){return e instanceof An?this.getBuffer(e.context.buffer,e.index):e instanceof yn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class no{constructor(e,n,i,o,r=!1,s=!1){this.from=e,this.to=n,this.tree=i,this.offset=o,this.open=(r?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let o=[new no(0,e.length,e,0,!1,i)];for(let r of n)r.to>e.length&&o.push(r);return o}static applyChanges(e,n,i=128){if(!n.length)return e;let o=[],r=1,s=e.length?e[0]:null;for(let l=0,a=0,u=0;;l++){let c=l=i)for(;s&&s.from=d.from||h<=d.to||u){let f=Math.max(d.from,a)-u,p=Math.min(d.to,h)-u;d=f>=p?null:new no(f,p,d.tree,d.offset+u,l>0,!!c)}if(d&&o.push(d),s.to>h)break;s=rnew Gu(o.from,o.to)):[new Gu(0,0)]:[new Gu(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let o=this.startParse(e,n,i);for(;;){let r=o.advance();if(r)return r}}}class pE{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new De({perNode:!0});class ba{constructor(e,n,i,o,r,s,l,a,u,c=0,h){this.p=e,this.stack=n,this.state=i,this.reducePos=o,this.pos=r,this.score=s,this.buffer=l,this.bufferBase=a,this.curContext=u,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let o=e.parser.context;return new ba(e,[],n,i,i,0,[],0,o?new Np(o,o.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,o=e&65535,{parser:r}=this.p,s=r.dynamicPrecedence(o);if(s&&(this.score+=s),i==0){this.pushState(r.getGoto(this.state,o,!0),this.reducePos),o=2e3&&!(!((n=this.p.parser.nodeSet.types[o])===null||n===void 0)&&n.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(o,a)}storeNode(e,n,i,o=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==i)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,n,i,o);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,o>4&&(o-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=i,this.buffer[s+3]=o}}shift(e,n,i){let o=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,o),n<=this.p.parser.maxNode&&this.buffer.push(n,o,i,4);else{let r=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,o),this.shiftContext(n,o),n<=s.maxNode&&this.buffer.push(n,o,i,4)}}apply(e,n,i){e&65536?this.reduce(e):this.shift(e,n,i)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let o=this.pos;this.reducePos=this.pos=o+e.length,this.pushState(n,o),this.buffer.push(i,o,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),o=e.bufferBase+n;for(;e&&o==e.bufferBase;)e=e.parent;return new ba(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,o,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new mE(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let o=[];for(let r=0,s;ra&1&&l==s)||o.push(n[r],s)}n=o}let i=[];for(let o=0;o>19,o=n&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],o,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(o,r)=>{if(!n.includes(o))return n.push(o),e.allActions(o,s=>{if(!(s&393216))if(s&65536){let l=(s>>19)-r;if(l>1){let a=s&65535,u=this.stack.length-l*3;if(u>=0&&e.getGoto(this.stack[u],a,!1)>=0)return l<<19|65536|a}}else{let l=i(s,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Np{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class mE{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let o=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=o}}class xa{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new xa(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new xa(this.stack,this.pos,this.index)}}function el(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,o=0;i=92&&s--,s>=34&&s--;let a=s-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}n?n[o++]=r:n=new e(r)}return n}class Wl{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ip=new Wl;class gE{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ip,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,o=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(o==this.ranges.length-1)return null;let s=this.ranges[++o];r+=s.from-i.to,i=s}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,o;if(n>=0&&n=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),o=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),o}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Ip,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let o of this.ranges){if(o.from>=n)break;o.to>e&&(i+=this.input.read(Math.max(o.from,e),Math.min(o.to,n)))}return i}}class Vo{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;vE(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Vo.prototype.contextual=Vo.prototype.fallback=Vo.prototype.extend=!1;Vo.prototype.fallback=Vo.prototype.extend=!1;class yu{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function vE(t,e,n,i,o,r){let s=0,l=1<0){let p=t[f];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||yE(p,e.token.value,o,r))){e.acceptToken(p);break}}let c=e.next,h=0,d=t[s+2];if(e.next<0&&d>h&&t[u+d*3-3]==65535&&t[u+d*3-3]==65535){s=t[u+d*3-1];continue e}for(;h>1,p=u+f+(f<<1),g=t[p],w=t[p+1]||65536;if(c=w)h=f+1;else{s=t[p+2],e.advance();continue e}}break}}function Vp(t,e,n){for(let i=e,o;(o=t[i])!=65535;i++)if(o==n)return i-e;return-1}function yE(t,e,n,i){let o=Vp(n,i,e);return o<0||Vp(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class OE{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Bp(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Bp(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(r instanceof ut){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+r.length}}}class wE{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Wl)}getActions(e){let n=0,i=null,{parser:o}=e.p,{tokenizers:r}=o,s=o.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let u=0;uh.end+25&&(a=Math.max(h.lookAhead,a)),h.value!=0)){let d=n;if(h.extended>-1&&(n=this.addActions(e,h.extended,h.end,n)),n=this.addActions(e,h.value,h.end,n),!c.extend&&(i=h,n>d))break}}for(;this.actions.length>n;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Wl,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Wl,{pos:i,p:o}=e;return n.start=i,n.end=Math.min(i+1,o.stream.end),n.value=i==o.stream.end?o.parser.eofTerm:0,n}updateCachedToken(e,n,i){let o=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(o,e),i),e.value>-1){let{parser:r}=i.p;for(let s=0;s=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(o+1)}putAction(e,n,i,o){for(let r=0;re.bufferLength*4?new OE(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],o,r;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sn)i.push(l);else{if(this.advanceStack(l,i,e))continue;{o||(o=[],r=[]),o.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let s=o&&SE(o);if(s)return Ut&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Ut&&o&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&o){let s=this.stoppedAt!=null&&o[0].pos>this.stoppedAt?o[0]:this.runRecovery(o,r,i);if(s)return Ut&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(i.length>s)for(i.sort((l,a)=>a.score-l.score);i.length>s;)i.pop();i.some(l=>l.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let s=0;s500&&u.buffer.length>500)if((l.score-u.score||l.buffer.length-u.buffer.length)>0)i.splice(a--,1);else{i.splice(s--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&o>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let h=this.fragments.nodeAt(o);h;){let d=this.parser.nodeSet.types[h.type.id]==h.type?r.getGoto(e.state,h.type.id):-1;if(d>-1&&h.length&&(!u||(h.prop(De.contextHash)||0)==c))return e.useNode(h,d),Ut&&console.log(s+this.stackID(e)+` (via reuse of ${r.getName(h.type.id)})`),!0;if(!(h instanceof ut)||h.children.length==0||h.positions[0]>0)break;let f=h.children[0];if(f instanceof ut&&h.positions[0]==0)h=f;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ut&&console.log(s+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let u=0;uo?n.push(p):i.push(p)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Wp(e,n),!0}}runRecovery(e,n,i){let o=null,r=!1;for(let s=0;s ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Ut&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let h=l.split(),d=c;for(let f=0;h.forceReduce()&&f<10&&(Ut&&console.log(d+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,i));f++)Ut&&(d=this.stackID(h)+" -> ");for(let f of l.recoverByInsert(a))Ut&&console.log(c+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,i);this.stream.end>l.pos?(u==l.pos&&(u++,a=0),l.recoverByDelete(a,u),Ut&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Wp(l,i)):(!o||o.scoret;class xE{constructor(e){this.start=e.start,this.shift=e.shift||Ku,this.reduce=e.reduce||Ku,this.reuse=e.reuse||Ku,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ts extends Z0{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;le.topRules[l][1]),o=[];for(let l=0;l=0)r(c,a,l[u++]);else{let h=l[u+-c];for(let d=-c;d>0;d--)r(l[u++],a,h);u++}}}this.nodeSet=new Nd(n.map((l,a)=>Xt.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:o[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=F0;let s=el(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new Vo(s,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let o=new _E(this,e,n,i);for(let r of this.wrappers)o=r(o,e,n,i);return o}getGoto(e,n,i=!1){let o=this.goto;if(n>=o[0])return-1;for(let r=o[n+1];;){let s=o[r++],l=s&1,a=o[r++];if(l&&i)return a;for(let u=r+(s>>1);r0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),o=i?n(i):void 0;for(let r=this.stateSlot(e,1);o==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Zn(this.data,r+2);else break;o=n(Zn(this.data,r+1))}return o}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Zn(this.data,i+2);else break;if(!(this.data[i+2]&1)){let o=this.data[i+1];n.some((r,s)=>s&1&&r==o)||n.push(this.data[i],o)}}return n}configure(e){let n=Object.assign(Object.create(ts.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let o=e.tokenizers.find(r=>r.from==i);return o?o.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,o)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let s=Object.assign(Object.assign({},i),{external:r.to});return n.specializers[o]=Lp(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let r of e.split(" ")){let s=n.indexOf(r);s>=0&&(i[s]=!0)}let o=null;for(let r=0;ri)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}let kE=0;class $n{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=kE++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new $n([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new Sa;return n=>n.modified.indexOf(e)>-1?n:Sa.get(n.base||n,n.modified.concat(e).sort((i,o)=>i.id-o.id))}}let TE=0;class Sa{constructor(){this.instances=[],this.id=TE++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(l=>l.base==e&&PE(n,l.modified));if(i)return i;let o=[],r=new $n(o,e,n);for(let l of n)l.instances.push(r);let s=CE(n);for(let l of e.set)if(!l.modified.length)for(let a of s)o.push(Sa.get(l,a));return r}}function PE(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function CE(t){let e=[[]];for(let n=0;ni.length-n.length)}function Wd(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let o of n.split(" "))if(o){let r=[],s=2,l=o;for(let h=0;;){if(l=="..."&&h>0&&h+3==o.length){s=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!d)throw new RangeError("Invalid path: "+o);if(r.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),h+=d[0].length,h==o.length)break;let f=o[h++];if(h==o.length&&f=="!"){s=0;break}if(f!="/")throw new RangeError("Invalid path: "+o);l=o.slice(h)}let a=r.length-1,u=r[a];if(!u)throw new RangeError("Invalid path: "+o);let c=new ka(i,s,a>0?r.slice(0,a):null);e[u]=c.sort(e[u])}}return K0.add(e)}const K0=new De;class ka{constructor(e,n,i,o){this.tags=e,this.mode=n,this.context=i,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=o;for(let l of r)for(let a of l.set){let u=n[a.id];if(u){s=s?s+" "+u:u;break}}return s},scope:i}}function $E(t,e){let n=null;for(let i of t){let o=i.style(e);o&&(n=n?n+" "+o:o)}return n}function EE(t,e,n,i=0,o=t.length){let r=new ME(i,Array.isArray(e)?e:[e],n);r.highlightRange(t.cursor(),i,o,"",r.highlighters),r.flush(o)}class ME{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,o,r){let{type:s,from:l,to:a}=e;if(l>=i||a<=n)return;s.isTop&&(r=this.highlighters.filter(f=>!f.scope||f.scope(s)));let u=o,c=AE(e)||ka.empty,h=$E(r,c.tags);if(h&&(u&&(u+=" "),u+=h,c.mode==1&&(o+=(o?" ":"")+h)),this.startSpan(Math.max(n,l),u),c.opaque)return;let d=e.tree&&e.tree.prop(De.mounted);if(d&&d.overlay){let f=e.node.enter(d.overlay[0].from+l,1),p=this.highlighters.filter(w=>!w.scope||w.scope(d.tree.type)),g=e.firstChild();for(let w=0,y=l;;w++){let _=w=T||!e.nextSibling())););if(!_||T>i)break;y=_.to+l,y>n&&(this.highlightRange(f.cursor(),Math.max(n,_.from+l),Math.min(i,y),"",p),this.startSpan(Math.min(i,y),u))}g&&e.parent()}else if(e.firstChild()){d&&(o="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,o,r),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function AE(t){let e=t.type.prop(K0);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const fe=$n.define,tl=fe(),gi=fe(),zp=fe(gi),Xp=fe(gi),vi=fe(),nl=fe(vi),Ju=fe(vi),Tn=fe(),Bi=fe(Tn),xn=fe(),Sn=fe(),ih=fe(),gr=fe(ih),il=fe(),W={comment:tl,lineComment:fe(tl),blockComment:fe(tl),docComment:fe(tl),name:gi,variableName:fe(gi),typeName:zp,tagName:fe(zp),propertyName:Xp,attributeName:fe(Xp),className:fe(gi),labelName:fe(gi),namespace:fe(gi),macroName:fe(gi),literal:vi,string:nl,docString:fe(nl),character:fe(nl),attributeValue:fe(nl),number:Ju,integer:fe(Ju),float:fe(Ju),bool:fe(vi),regexp:fe(vi),escape:fe(vi),color:fe(vi),url:fe(vi),keyword:xn,self:fe(xn),null:fe(xn),atom:fe(xn),unit:fe(xn),modifier:fe(xn),operatorKeyword:fe(xn),controlKeyword:fe(xn),definitionKeyword:fe(xn),moduleKeyword:fe(xn),operator:Sn,derefOperator:fe(Sn),arithmeticOperator:fe(Sn),logicOperator:fe(Sn),bitwiseOperator:fe(Sn),compareOperator:fe(Sn),updateOperator:fe(Sn),definitionOperator:fe(Sn),typeOperator:fe(Sn),controlOperator:fe(Sn),punctuation:ih,separator:fe(ih),bracket:gr,angleBracket:fe(gr),squareBracket:fe(gr),paren:fe(gr),brace:fe(gr),content:Tn,heading:Bi,heading1:fe(Bi),heading2:fe(Bi),heading3:fe(Bi),heading4:fe(Bi),heading5:fe(Bi),heading6:fe(Bi),contentSeparator:fe(Tn),list:fe(Tn),quote:fe(Tn),emphasis:fe(Tn),strong:fe(Tn),link:fe(Tn),monospace:fe(Tn),strikethrough:fe(Tn),inserted:fe(),deleted:fe(),changed:fe(),invalid:fe(),meta:il,documentMeta:fe(il),annotation:fe(il),processingInstruction:fe(il),definition:$n.defineModifier(),constant:$n.defineModifier(),function:$n.defineModifier(),standard:$n.defineModifier(),local:$n.defineModifier(),special:$n.defineModifier()};J0([{tag:W.link,class:"tok-link"},{tag:W.heading,class:"tok-heading"},{tag:W.emphasis,class:"tok-emphasis"},{tag:W.strong,class:"tok-strong"},{tag:W.keyword,class:"tok-keyword"},{tag:W.atom,class:"tok-atom"},{tag:W.bool,class:"tok-bool"},{tag:W.url,class:"tok-url"},{tag:W.labelName,class:"tok-labelName"},{tag:W.inserted,class:"tok-inserted"},{tag:W.deleted,class:"tok-deleted"},{tag:W.literal,class:"tok-literal"},{tag:W.string,class:"tok-string"},{tag:W.number,class:"tok-number"},{tag:[W.regexp,W.escape,W.special(W.string)],class:"tok-string2"},{tag:W.variableName,class:"tok-variableName"},{tag:W.local(W.variableName),class:"tok-variableName tok-local"},{tag:W.definition(W.variableName),class:"tok-variableName tok-definition"},{tag:W.special(W.variableName),class:"tok-variableName2"},{tag:W.definition(W.propertyName),class:"tok-propertyName tok-definition"},{tag:W.typeName,class:"tok-typeName"},{tag:W.namespace,class:"tok-namespace"},{tag:W.className,class:"tok-className"},{tag:W.macroName,class:"tok-macroName"},{tag:W.propertyName,class:"tok-propertyName"},{tag:W.operator,class:"tok-operator"},{tag:W.comment,class:"tok-comment"},{tag:W.meta,class:"tok-meta"},{tag:W.invalid,class:"tok-invalid"},{tag:W.punctuation,class:"tok-punctuation"}]);const DE=Wd({String:W.string,Number:W.number,"True False":W.bool,PropertyName:W.propertyName,Null:W.null,",":W.separator,"[ ]":W.squareBracket,"{ }":W.brace}),RE=ts.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[DE],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});class Be{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){let o=[];return this.decompose(0,e,o,2),i.length&&i.decompose(0,i.length,o,3),this.decompose(n,this.length,o,1),En.from(o,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let i=[];return this.decompose(e,n,i,0),En.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),o=new Vr(this),r=new Vr(e);for(let s=n,l=n;;){if(o.next(s),r.next(s),s=0,o.lineBreak!=r.lineBreak||o.done!=r.done||o.value!=r.value)return!1;if(l+=o.value.length,o.done||l>=i)return!0}}iter(e=1){return new Vr(this,e)}iterRange(e,n=this.length){return new ey(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let o=this.line(e).from;i=this.iterRange(o,Math.max(o,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new ty(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Be.empty:e.length<=32?new lt(e):En.from(lt.split(e,[]))}}class lt extends Be{constructor(e,n=qE(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,o){for(let r=0;;r++){let s=this.text[r],l=o+s.length;if((n?i:l)>=e)return new QE(o,l,i,s);o=l+1,i++}}decompose(e,n,i,o){let r=e<=0&&n>=this.length?this:new lt(Up(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(o&1){let s=i.pop(),l=Ll(r.text,s.text.slice(),0,r.length);if(l.length<=32)i.push(new lt(l,s.length+r.length));else{let a=l.length>>1;i.push(new lt(l.slice(0,a)),new lt(l.slice(a)))}}else i.push(r)}replace(e,n,i){if(!(i instanceof lt))return super.replace(e,n,i);let o=Ll(this.text,Ll(i.text,Up(this.text,0,e)),n),r=this.length+i.length-(n-e);return o.length<=32?new lt(o,r):En.from(lt.split(o,[]),r)}sliceString(e,n=this.length,i=` -`){let o="";for(let r=0,s=0;r<=n&&se&&s&&(o+=i),er&&(o+=l.slice(Math.max(0,e-r),n-r)),r=a+1}return o}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],o=-1;for(let r of e)i.push(r),o+=r.length+1,i.length==32&&(n.push(new lt(i,o)),i=[],o=-1);return o>-1&&n.push(new lt(i,o)),n}}class En extends Be{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,o){for(let r=0;;r++){let s=this.children[r],l=o+s.length,a=i+s.lines-1;if((n?a:l)>=e)return s.lineInner(e,n,i,o);o=l+1,i=a+1}}decompose(e,n,i,o){for(let r=0,s=0;s<=n&&r=s){let u=o&((s<=e?1:0)|(a>=n?2:0));s>=e&&a<=n&&!u?i.push(l):l.decompose(e-s,n-s,i,u)}s=a+1}}replace(e,n,i){if(i.lines=r&&n<=l){let a=s.replace(e-r,n-r,i),u=this.lines-s.lines+a.lines;if(a.lines>5-1&&a.lines>u>>5+1){let c=this.children.slice();return c[o]=a,new En(c,this.length-(n-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` -`){let o="";for(let r=0,s=0;re&&r&&(o+=i),es&&(o+=l.sliceString(e-s,n-s,i)),s=a+1}return o}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof En))return 0;let i=0,[o,r,s,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;o+=n,r+=n){if(o==s||r==l)return i;let a=this.children[o],u=e.children[r];if(a!=u)return i+a.scanIdentical(u,n);i+=a.length+1}}static from(e,n=e.reduce((i,o)=>i+o.length+1,-1)){let i=0;for(let f of e)i+=f.lines;if(i<32){let f=[];for(let p of e)p.flatten(f);return new lt(f,n)}let o=Math.max(32,i>>5),r=o<<1,s=o>>1,l=[],a=0,u=-1,c=[];function h(f){let p;if(f.lines>r&&f instanceof En)for(let g of f.children)h(g);else f.lines>s&&(a>s||!a)?(d(),l.push(f)):f instanceof lt&&a&&(p=c[c.length-1])instanceof lt&&f.lines+p.lines<=32?(a+=f.lines,u+=f.length+1,c[c.length-1]=new lt(p.text.concat(f.text),p.length+1+f.length)):(a+f.lines>o&&d(),a+=f.lines,u+=f.length+1,c.push(f))}function d(){a!=0&&(l.push(c.length==1?c[0]:En.from(c,u)),u=-1,a=c.length=0)}for(let f of e)h(f);return d(),l.length==1?l[0]:new En(l,n)}}Be.empty=new lt([""],0);function qE(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ll(t,e,n=0,i=1e9){for(let o=0,r=0,s=!0;r=n&&(a>i&&(l=l.slice(0,i-o)),o0?1:(e instanceof lt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,o=this.nodes[i],r=this.offsets[i],s=r>>1,l=o instanceof lt?o.text.length:o.children.length;if(s==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(o instanceof lt){let a=o.text[s+(n<0?-1:0)];if(this.offsets[i]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=o.children[s+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof lt?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ey{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Vr(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:o}=this.cursor.next(e);return this.pos+=(o.length+e)*n,this.value=o.length<=i?o:n<0?o.slice(o.length-i):o.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ty{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:o}=this.inner.next(e);return n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Be.prototype[Symbol.iterator]=function(){return this.iter()},Vr.prototype[Symbol.iterator]=ey.prototype[Symbol.iterator]=ty.prototype[Symbol.iterator]=function(){return this});class QE{constructor(e,n,i,o){this.from=e,this.to=n,this.number=i,this.text=o}get length(){return this.to-this.from}}let Bo="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return Bo[e-1]<=t;return!1}function Yp(t){return t>=127462&&t<=127487}const jp=8205;function Et(t,e,n=!0,i=!0){return(n?ny:IE)(t,e,i)}function ny(t,e,n){if(e==t.length)return e;e&&iy(t.charCodeAt(e))&&oy(t.charCodeAt(e-1))&&e--;let i=St(t,e);for(e+=sn(i);e=0&&Yp(St(t,s));)r++,s-=2;if(r%2==0)break;e+=2}else break}return e}function IE(t,e,n){for(;e>0;){let i=ny(t,e-2,n);if(i=56320&&t<57344}function oy(t){return t>=55296&&t<56320}function St(t,e){let n=t.charCodeAt(e);if(!oy(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return iy(i)?(n-55296<<10)+(i-56320)+65536:n}function Ld(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function sn(t){return t<65536?1:2}const oh=/\r\n?|\n/;var Tt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Tt||(Tt={}));class Qn{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return r+(e-o);r+=l}else{if(i!=Tt.Simple&&u>=e&&(i==Tt.TrackDel&&oe||i==Tt.TrackBefore&&oe))return null;if(u>e||u==e&&n<0&&!l)return e==o||n<0?r:r+a;r+=a}o=u}if(e>o)throw new RangeError(`Position ${e} is out of range for changeset of length ${o}`);return r}touchesRange(e,n=e){for(let i=0,o=0;i=0&&o<=n&&l>=e)return on?"cover":!0;o=l}return!1}toString(){let e="";for(let n=0;n=0?":"+o:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Qn(e)}static create(e){return new Qn(e)}}class ft extends Qn{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return rh(this,(n,i,o,r,s)=>e=e.replace(o,o+(i-n),s),!1),e}mapDesc(e,n=!1){return sh(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let o=0,r=0;o=0){n[o]=l,n[o+1]=s;let a=o>>1;for(;i.length0&&Si(i,n,r.text),r.forward(c),l+=c}let u=e[s++];for(;l>1].toJSON()))}return e}static of(e,n,i){let o=[],r=[],s=0,l=null;function a(c=!1){if(!c&&!o.length)return;sd||h<0||d>n)throw new RangeError(`Invalid change range ${h} to ${d} (in doc of length ${n})`);let p=f?typeof f=="string"?Be.of(f.split(i||oh)):f:Be.empty,g=p.length;if(h==d&&g==0)return;hs&&$t(o,h-s,-1),$t(o,d-h,g),Si(r,o,p),s=d}}return u(e),a(!l),l}static empty(e){return new ft(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let o=0;ol&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)n.push(r[0],0);else{for(;i.length=0&&n<=0&&n==t[o+1]?t[o]+=e:e==0&&t[o]==0?t[o+1]+=n:i?(t[o]+=e,t[o+1]+=n):t.push(e,n)}function Si(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)l=t.sections[s++],a=t.sections[s++];e(o,u,r,c,h),o=u,r=c}}}function sh(t,e,n,i=!1){let o=[],r=i?[]:null,s=new ns(t),l=new ns(e);for(let a=-1;;)if(s.ins==-1&&l.ins==-1){let u=Math.min(s.len,l.len);$t(o,u,-1),s.forward(u),l.forward(u)}else if(l.ins>=0&&(s.ins<0||a==s.i||s.off==0&&(l.len=0&&a=0){let u=0,c=s.len;for(;c;)if(l.ins==-1){let h=Math.min(c,l.len);u+=h,c-=h,l.forward(h)}else if(l.ins==0&&l.lena||s.ins>=0&&s.len>a)&&(l||i.length>u),r.forward2(a),s.forward(a)}}}}class ns{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Be.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Be.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Hi{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,n=-1){let i,o;return this.empty?i=o=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),o=e.mapPos(this.to,-1)),i==this.from&&o==this.to?this:new Hi(i,o,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Z.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Z.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Z.range(e.anchor,e.head)}static create(e,n,i){return new Hi(e,n,i)}}class Z{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Z.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Z(e.ranges.map(n=>Hi.fromJSON(n)),e.main)}static single(e,n=e){return new Z([Z.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,o=0;oe?4:0)|r)}static normalized(e,n=0){let i=e[n];e.sort((o,r)=>o.from-r.from),n=e.indexOf(i);for(let o=1;or.head?Z.range(a,l):Z.range(l,a))}}return new Z(e,n)}}function sy(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let zd=0;class we{constructor(e,n,i,o,r){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=o,this.id=zd++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new we(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:Xd),!!e.static,e.enables)}of(e){return new zl([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new zl(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new zl(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function Xd(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class zl{constructor(e,n,i,o){this.dependencies=e,this.facet=n,this.type=i,this.value=o,this.id=zd++}dynamicSlot(e){var n;let i=this.value,o=this.facet.compareInput,r=this.id,s=e[r]>>1,l=this.type==2,a=!1,u=!1,c=[];for(let h of this.dependencies)h=="doc"?a=!0:h=="selection"?u=!0:((n=e[h.id])!==null&&n!==void 0?n:1)&1||c.push(e[h.id]);return{create(h){return h.values[s]=i(h),1},update(h,d){if(a&&d.docChanged||u&&(d.docChanged||d.selection)||lh(h,c)){let f=i(h);if(l?!Fp(f,h.values[s],o):!o(f,h.values[s]))return h.values[s]=f,1}return 0},reconfigure:(h,d)=>{let f,p=d.config.address[r];if(p!=null){let g=Pa(d,p);if(this.dependencies.every(w=>w instanceof we?d.facet(w)===h.facet(w):w instanceof wt?d.field(w,!1)==h.field(w,!1):!0)||(l?Fp(f=i(h),g,o):o(f=i(h),g)))return h.values[s]=g,0}else f=i(h);return h.values[s]=f,1}}}}function Fp(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[a.id]),o=n.map(a=>a.type),r=i.filter(a=>!(a&1)),s=t[e.id]>>1;function l(a){let u=[];for(let c=0;ci===o),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Hp).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,o)=>{let r=i.values[n],s=this.updateF(r,o);return this.compareF(r,s)?0:(i.values[n]=s,1)},reconfigure:(i,o)=>o.config.address[this.id]!=null?(i.values[n]=o.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,Hp.of({field:this,create:e})]}get extension(){return this}}const Xi={lowest:4,low:3,default:2,high:1,highest:0};function vr(t){return e=>new ly(e,t)}const go={highest:vr(Xi.highest),high:vr(Xi.high),default:vr(Xi.default),low:vr(Xi.low),lowest:vr(Xi.lowest)};class ly{constructor(e,n){this.inner=e,this.prec=n}}class Cs{of(e){return new ah(this,e)}reconfigure(e){return Cs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ah{constructor(e,n){this.compartment=e,this.inner=n}}class Ta{constructor(e,n,i,o,r,s){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=o,this.staticValues=r,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let o=[],r=Object.create(null),s=new Map;for(let d of BE(e,n,s))d instanceof wt?o.push(d):(r[d.facet.id]||(r[d.facet.id]=[])).push(d);let l=Object.create(null),a=[],u=[];for(let d of o)l[d.id]=u.length<<1,u.push(f=>d.slot(f));let c=i==null?void 0:i.config.facets;for(let d in r){let f=r[d],p=f[0].facet,g=c&&c[d]||[];if(f.every(w=>w.type==0))if(l[p.id]=a.length<<1|1,Xd(g,f))a.push(i.facet(p));else{let w=p.combine(f.map(y=>y.value));a.push(i&&p.compare(w,i.facet(p))?i.facet(p):w)}else{for(let w of f)w.type==0?(l[w.id]=a.length<<1|1,a.push(w.value)):(l[w.id]=u.length<<1,u.push(y=>w.dynamicSlot(y)));l[p.id]=u.length<<1,u.push(w=>VE(w,p,f))}}let h=u.map(d=>d(l));return new Ta(e,s,h,l,a,r)}}function BE(t,e,n){let i=[[],[],[],[],[]],o=new Map;function r(s,l){let a=o.get(s);if(a!=null){if(a<=l)return;let u=i[a].indexOf(s);u>-1&&i[a].splice(u,1),s instanceof ah&&n.delete(s.compartment)}if(o.set(s,l),Array.isArray(s))for(let u of s)r(u,l);else if(s instanceof ah){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),r(u,l)}else if(s instanceof ly)r(s.inner,s.prec);else if(s instanceof wt)i[l].push(s),s.provides&&r(s.provides,l);else if(s instanceof zl)i[l].push(s),s.facet.extensions&&r(s.facet.extensions,Xi.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(u,l)}}return r(t,Xi.default),i.reduce((s,l)=>s.concat(l))}function Br(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let o=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|o}function Pa(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const ay=we.define(),uy=we.define({combine:t=>t.some(e=>e),static:!0}),cy=we.define({combine:t=>t.length?t[0]:void 0,static:!0}),hy=we.define(),dy=we.define(),fy=we.define(),py=we.define({combine:t=>t.length?t[0]:!1});class hi{constructor(e,n){this.type=e,this.value=n}static define(){return new WE}}class WE{of(e){return new hi(this,e)}}class LE{constructor(e){this.map=e}of(e){return new Pe(this,e)}}class Pe{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Pe(this.type,n)}is(e){return this.type==e}static define(e={}){return new LE(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let o of e){let r=o.map(n);r&&i.push(r)}return i}}Pe.reconfigure=Pe.define();Pe.appendConfig=Pe.define();class gt{constructor(e,n,i,o,r,s){this.startState=e,this.changes=n,this.selection=i,this.effects=o,this.annotations=r,this.scrollIntoView=s,this._doc=null,this._state=null,i&&sy(i,n.newLength),r.some(l=>l.type==gt.time)||(this.annotations=r.concat(gt.time.of(Date.now())))}static create(e,n,i,o,r,s){return new gt(e,n,i,o,r,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(gt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}gt.time=hi.define();gt.userEvent=hi.define();gt.addToHistory=hi.define();gt.remote=hi.define();function zE(t,e){let n=[];for(let i=0,o=0;;){let r,s;if(i=t[i]))r=t[i++],s=t[i++];else if(o=0;o--){let r=i[o](t);r instanceof gt?t=r:Array.isArray(r)&&r.length==1&&r[0]instanceof gt?t=r[0]:t=gy(e,Wo(r),!1)}return t}function UE(t){let e=t.startState,n=e.facet(fy),i=t;for(let o=n.length-1;o>=0;o--){let r=n[o](t);r&&Object.keys(r).length&&(i=my(i,uh(e,r,t.changes.newLength),!0))}return i==t?t:gt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const YE=[];function Wo(t){return t==null?YE:Array.isArray(t)?t:[t]}var Je=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Je||(Je={}));const jE=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ch;try{ch=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function FE(t){if(ch)return ch.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||jE.test(n)))return!0}return!1}function HE(t){return e=>{if(!/\S/.test(e))return Je.Space;if(FE(e))return Je.Word;for(let n=0;n-1)return Je.Word;return Je.Other}}class qe{constructor(e,n,i,o,r,s){this.config=e,this.doc=n,this.selection=i,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=r,s&&(s._state=this);for(let l=0;lo.set(a,l)),n=null),o.set(s.value.compartment,s.value.extension)):s.is(Pe.reconfigure)?(n=null,i=s.value):s.is(Pe.appendConfig)&&(n=null,i=Wo(i).concat(s.value));let r;n?r=e.startState.values.slice():(n=Ta.resolve(i,o,this),r=new qe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new qe(n,e.newDoc,e.newSelection,r,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Z.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),o=this.changes(i.changes),r=[i.range],s=Wo(i.effects);for(let l=1;ls.spec.fromJSON(l,a)))}}return qe.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(e={}){let n=Ta.resolve(e.extensions||[],new Map),i=e.doc instanceof Be?e.doc:Be.of((e.doc||"").split(n.staticFacet(qe.lineSeparator)||oh)),o=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return sy(o,i.length),n.staticFacet(uy)||(o=o.asSingle()),new qe(n,i,o,n.dynamicSlots.map(()=>null),(r,s)=>s.create(r),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||` -`}get readOnly(){return this.facet(py)}phrase(e,...n){for(let i of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,o)=>{if(o=="$")return"$";let r=+(o||1);return!r||r>n.length?i:n[r-1]})),e}languageDataAt(e,n,i=-1){let o=[];for(let r of this.facet(ay))for(let s of r(this,n,i))Object.prototype.hasOwnProperty.call(s,e)&&o.push(s[e]);return o}charCategorizer(e){return HE(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:o}=this.doc.lineAt(e),r=this.charCategorizer(e),s=e-i,l=e-i;for(;s>0;){let a=Et(n,s,!1);if(r(n.slice(a,s))!=Je.Word)break;s=a}for(;lt.length?t[0]:4});qe.lineSeparator=cy;qe.readOnly=py;qe.phrases=we.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(o=>t[o]==e[o])}});qe.languageData=ay;qe.changeFilter=hy;qe.transactionFilter=dy;qe.transactionExtender=fy;Cs.reconfigure=Pe.define();function zn(t,e,n={}){let i={};for(let o of t)for(let r of Object.keys(o)){let s=o[r],l=i[r];if(l===void 0)i[r]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,r))i[r]=n[r](l,s);else throw new Error("Config merge conflict for field "+r)}for(let o in e)i[o]===void 0&&(i[o]=e[o]);return i}class ao{eq(e){return this==e}range(e,n=e){return is.create(e,n,this)}}ao.prototype.startSide=ao.prototype.endSide=0;ao.prototype.point=!1;ao.prototype.mapMode=Tt.TrackDel;class is{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new is(e,n,i)}}function hh(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Ud{constructor(e,n,i,o){this.from=e,this.to=n,this.value=i,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,o=0){let r=i?this.to:this.from;for(let s=o,l=r.length;;){if(s==l)return s;let a=s+l>>1,u=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-n;if(a==s)return u>=0?s:l;u>=0?l=a:s=a+1}}between(e,n,i,o){for(let r=this.findIndex(n,-1e9,!0),s=this.findIndex(i,1e9,!1,r);rf||d==f&&u.startSide>0&&u.endSide<=0)continue;(f-d||u.endSide-u.startSide)<0||(s<0&&(s=d),u.point&&(l=Math.max(l,f-d)),i.push(u),o.push(d-s),r.push(f-s))}return{mapped:i.length?new Ud(o,r,i,l):null,pos:s}}}class Xe{constructor(e,n,i,o){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=o}static create(e,n,i,o){return new Xe(e,n,i,o)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:o=0,filterTo:r=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(i&&(n=n.slice().sort(hh)),this.isEmpty)return n.length?Xe.of(n):this;let l=new vy(this,null,-1).goto(0),a=0,u=[],c=new Ai;for(;l.value||a=0){let h=n[a++];c.addInner(h.from,h.to,h.value)||u.push(h)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+s.length&&s.between(r,e-r,n-r,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return os.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return os.from(e).goto(n)}static compare(e,n,i,o,r=-1){let s=e.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=r),l=n.filter(h=>h.maxPoint>0||!h.isEmpty&&h.maxPoint>=r),a=Gp(s,l,i),u=new yr(s,a,r),c=new yr(l,a,r);i.iterGaps((h,d,f)=>Zp(u,h,c,d,f,o)),i.empty&&i.length==0&&Zp(u,0,c,0,0,o)}static eq(e,n,i=0,o){o==null&&(o=1e9-1);let r=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=s.length)return!1;if(!r.length)return!0;let l=Gp(r,s),a=new yr(r,l,0).goto(i),u=new yr(s,l,0).goto(i);for(;;){if(a.to!=u.to||!dh(a.active,u.active)||a.point&&(!u.point||!a.point.eq(u.point)))return!1;if(a.to>o)return!0;a.next(),u.next()}}static spans(e,n,i,o,r=-1){let s=new yr(e,null,r).goto(n),l=n,a=s.openStart;for(;;){let u=Math.min(s.to,i);if(s.point){let c=s.activeForPoint(s.to),h=s.pointFroml&&(o.span(l,u,s.active,a),a=s.openEnd(u));if(s.to>i)return a+(s.point&&s.to>i?1:0);l=s.to,s.next()}}static of(e,n=!1){let i=new Ai;for(let o of e instanceof is?[e]:n?GE(e):e)i.add(o.from,o.to,o.value);return i.finish()}}Xe.empty=new Xe([],[],null,-1);function GE(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(hh);e=i}return t}Xe.empty.nextLayer=Xe.empty;class Ai{finishChunk(e){this.chunks.push(new Ud(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Ai)).add(e,n,i)}addInner(e,n,i){let o=e-this.lastTo||i.startSide-this.last.endSide;if(o<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return o<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Xe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Xe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Gp(t,e,n){let i=new Map;for(let r of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&o.push(new vy(s,n,i,r));return o.length==1?o[0]:new os(o)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)ec(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)ec(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ec(this.heap,0)}}}function ec(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let o=t[i];if(i+1=0&&(o=t[i+1],i++),n.compare(o)<0)break;t[i]=n,t[e]=o,e=i}}class yr{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=os.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ol(this.active,e),ol(this.activeTo,e),ol(this.activeRank,e),this.minActive=Kp(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:o,rank:r}=this.cursor;for(;n-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>e){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),i&&ol(i,o)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[o]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function Zp(t,e,n,i,o,r){t.goto(e),n.goto(i);let s=i+o,l=i,a=i-e;for(;;){let u=t.to+a-n.to||t.endSide-n.endSide,c=u<0?t.to+a:n.to,h=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&dh(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(l,h,t.point,n.point):h>l&&!dh(t.active,n.active)&&r.compareRange(l,h,t.active,n.active),c>s)break;l=c,u<=0&&t.next(),u>=0&&n.next()}}function dh(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function Kp(t,e){let n=-1,i=1e9;for(let o=0;o=e)return o;if(o==t.length)break;r+=t.charCodeAt(o)==9?n-r%n:1,o=Et(t,o)}return i===!0?-1:t.length}const ph="ͼ",Jp=typeof Symbol>"u"?"__"+ph:Symbol.for(ph),mh=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),em=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Di{constructor(e,n){this.rules=[];let{finish:i}=n||{};function o(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function r(s,l,a,u){let c=[],h=/^@(\w+)\b/.exec(s[0]),d=h&&h[1]=="keyframes";if(h&&l==null)return a.push(s[0]+";");for(let f in l){let p=l[f];if(/&/.test(f))r(f.split(/,\s*/).map(g=>s.map(w=>g.replace(/&/,w))).reduce((g,w)=>g.concat(w)),p,a);else if(p&&typeof p=="object"){if(!h)throw new RangeError("The value of a property ("+f+") should be a primitive value.");r(o(f),p,c,d)}else p!=null&&c.push(f.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||d)&&a.push((i&&!h&&!u?s.map(i):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)r(o(s),e[s],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=em[Jp]||1;return em[Jp]=e+1,ph+e.toString(36)}static mount(e,n,i){let o=e[mh],r=i&&i.nonce;o?r&&o.setNonce(r):o=new ZE(e,r),o.mount(Array.isArray(n)?n:[n])}}let tm=new Map;class ZE{constructor(e,n){let i=e.ownerDocument||e,o=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&o.CSSStyleSheet){let r=tm.get(i);if(r)return e.adoptedStyleSheets=[r.sheet,...e.adoptedStyleSheets],e[mh]=r;this.sheet=new o.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],tm.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[mh]=this}mount(e){let n=this.sheet,i=0,o=0;for(let r=0;r-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),n)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},KE=typeof navigator<"u"&&/Mac/.test(navigator.platform),JE=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var kt=0;kt<10;kt++)Ri[48+kt]=Ri[96+kt]=String(kt);for(var kt=1;kt<=24;kt++)Ri[kt+111]="F"+kt;for(var kt=65;kt<=90;kt++)Ri[kt]=String.fromCharCode(kt+32),rs[kt]=String.fromCharCode(kt);for(var tc in Ri)rs.hasOwnProperty(tc)||(rs[tc]=Ri[tc]);function eM(t){var e=KE&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||JE&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?rs:Ri)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Ca(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function gh(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function tM(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Xl(t,e){if(!e.anchorNode)return!1;try{return gh(t,e.anchorNode)}catch{return!1}}function Jo(t){return t.nodeType==3?uo(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function $a(t,e,n,i){return n?nm(t,e,n,i,-1)||nm(t,e,n,i,1):!1}function Ea(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function nm(t,e,n,i,o){for(;;){if(t==n&&e==i)return!0;if(e==(o<0?0:qi(t))){if(t.nodeName=="DIV")return!1;let r=t.parentNode;if(!r||r.nodeType!=1)return!1;e=Ea(t)+(o<0?0:1),t=r}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=o<0?qi(t):0}else return!1}}function qi(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ou(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function nM(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function iM(t,e,n,i,o,r,s,l){let a=t.ownerDocument,u=a.defaultView||window;for(let c=t,h=!1;c&&!h;)if(c.nodeType==1){let d,f=c==a.body;if(f)d=nM(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();d={left:w.left,right:w.left+c.clientWidth,top:w.top,bottom:w.top+c.clientHeight}}let p=0,g=0;if(o=="nearest")e.top0&&e.bottom>d.bottom+g&&(g=e.bottom-d.bottom+g+s)):e.bottom>d.bottom&&(g=e.bottom-d.bottom+s,n<0&&e.top-g0&&e.right>d.right+p&&(p=e.right-d.right+p+r)):e.right>d.right&&(p=e.right-d.right+r,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class rM{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?qi(n):0),i,Math.min(e.focusOffset,i?qi(i):0))}set(e,n,i,o){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=o}}let yo=null;function yy(t){if(t.setActive)return t.setActive();if(yo)return t.focus(yo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(yo==null?{get preventScroll(){return yo={preventScroll:!0},!0}}:void 0),!yo){yo=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}class qt{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new qt(e.parentNode,Ea(e),n)}static after(e,n){return new qt(e.parentNode,Ea(e)+1,n)}}const Yd=[];class Fe{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,o=null,r;for(let s of this.children){if(s.flags&7){if(!s.dom&&(r=o?o.nextSibling:i.firstChild)){let l=Fe.get(r);(!l||!l.parent&&l.canReuseDOM(s))&&s.reuseDOM(r)}s.sync(e,n),s.flags&=-8}if(r=o?o.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&r!=s.dom&&(n.written=!0),s.dom.parentNode==i)for(;r&&r!=s.dom;)r=om(r);else i.insertBefore(s.dom,r);o=s.dom}for(r=o?o.nextSibling:i.firstChild,r&&n&&n.node==i&&(n.written=!0);r;)r=om(r)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let o=qi(e)==0?0:n==0?-1:1;for(;;){let r=e.parentNode;if(r==this.dom)break;o==0&&r.firstChild!=r.lastChild&&(e==r.firstChild?o=-1:o=1),e=r}o<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Fe.get(i);)i=i.nextSibling;if(!i)return this.length;for(let o=0,r=0;;o++){let s=this.children[o];if(s.dom==i)return r;r+=s.length+s.breakAfter}}domBoundsAround(e,n,i=0){let o=-1,r=-1,s=-1,l=-1;for(let a=0,u=i,c=i;an)return h.domBoundsAround(e,n,u);if(d>=e&&o==-1&&(o=a,r=u),u>n&&h.dom.parentNode==this.dom){s=a,l=c;break}c=d,u=d+h.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=Yd){this.markDirty();for(let o=e;othis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function by(t,e,n,i,o,r,s,l,a){let{children:u}=t,c=u.length?u[e]:null,h=r.length?r[r.length-1]:null,d=h?h.breakAfter:s;if(!(e==i&&c&&!s&&!d&&r.length<2&&c.merge(n,o,r.length?h:null,n==0,l,a))){if(i0&&(!s&&r.length&&c.merge(n,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(nr)&&this.lineBreak(),o=s}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,s=1,l;if(this.lineSeparator?(r=n.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(l=o.exec(n))&&(r=l.index,s=l[0].length),this.append(n.slice(i,r<0?n.length:r)),r<0)break;if(this.lineBreak(),s>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=s-1);i=r+s}}readNode(e){if(e.cmIgnore)return;let n=Fe.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let o=i.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(n,i.offset))}}function rm(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class sm{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}let Zt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},vh=typeof document<"u"?document:{documentElement:{style:{}}};const yh=/Edge\/(\d+)/.exec(Zt.userAgent),ky=/MSIE \d/.test(Zt.userAgent),Oh=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zt.userAgent),wu=!!(ky||Oh||yh),lm=!wu&&/gecko\/(\d+)/i.test(Zt.userAgent),nc=!wu&&/Chrome\/(\d+)/.exec(Zt.userAgent),am="webkitFontSmoothing"in vh.documentElement.style,Ty=!wu&&/Apple Computer/.test(Zt.vendor),um=Ty&&(/Mobile\/\w+/.test(Zt.userAgent)||Zt.maxTouchPoints>2);var _e={mac:um||/Mac/.test(Zt.platform),windows:/Win/.test(Zt.platform),linux:/Linux|X11/.test(Zt.platform),ie:wu,ie_version:ky?vh.documentMode||6:Oh?+Oh[1]:yh?+yh[1]:0,gecko:lm,gecko_version:lm?+(/Firefox\/(\d+)/.exec(Zt.userAgent)||[0,0])[1]:0,chrome:!!nc,chrome_version:nc?+nc[1]:0,ios:um,android:/Android\b/.test(Zt.userAgent),webkit:am,safari:Ty,webkit_version:am?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:vh.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const aM=256;class Bn extends Fe{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof Bn)||this.length-(n-e)+i.length>aM||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Bn(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new qt(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return uM(this.dom,e,n)}}class li extends Fe{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let o of n)o.setParent(this)}setAttrs(e){if(Oy(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,o,r,s){return i&&(!(i instanceof li&&i.mark.eq(this.mark))||e&&r<=0||ne&&n.push(i=e&&(o=r),i=a,r++}let s=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new li(this.mark,n,s)}domAtPos(e){return Py(this,e)}coordsAt(e,n){return $y(this,e,n)}}function uM(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let o=e,r=e,s=0;e==0&&n<0||e==i&&n>=0?_e.chrome||_e.gecko||(e?(o--,s=1):r=0)?0:l.length-1];return _e.safari&&!s&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),s?Ou(a,s<0):a||null}class ki extends Fe{static create(e,n,i){return new ki(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=ki.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,i,o,r,s){return i&&(!(i instanceof ki)||!this.widget.compare(i.widget)||e>0&&r<=0||n0)?qt.before(this.dom):qt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let o=this.dom.getClientRects(),r=null;if(!o.length)return null;let s=this.side?this.side<0:e>0;for(let l=s?o.length-1:0;r=o[l],!(e>0?l==0:l==o.length-1||r.top0?qt.before(this.dom):qt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Be.empty}get isHidden(){return!0}}Bn.prototype.children=ki.prototype.children=er.prototype.children=Yd;function Py(t,e){let n=t.dom,{children:i}=t,o=0;for(let r=0;or&&e0;r--){let s=i[r-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let r=o;r0&&e instanceof li&&o.length&&(i=o[o.length-1])instanceof li&&i.mark.eq(e.mark)?Cy(i,e.children[0],n-1):(o.push(e),e.setParent(t)),t.length+=e.length}function $y(t,e,n){let i=null,o=-1,r=null,s=-1;function l(u,c){for(let h=0,d=0;h=c&&(f.children.length?l(f,c-d):(!r||r.isHidden&&n>0)&&(p>c||d==p&&f.getSide()>0)?(r=f,s=c-d):(d-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let r of i)if(r!=n&&(o.indexOf(r)==-1||t[r]!==e[r]))return!1;return!0}function _h(t,e,n){let i=!1;if(e)for(let o in e)n&&o in n||(i=!0,o=="style"?t.style.cssText="":t.removeAttribute(o));if(n)for(let o in n)e&&e[o]==n[o]||(i=!0,o=="style"?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return i}function hM(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Qi(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,o;if(e.isBlockGap)i=-5e8,o=4e8;else{let{start:r,end:s}=Ey(e,n);i=(r?n?-3e8:-1:5e8)-1,o=(s?n?2e8:1:-6e8)+1}return new Qi(e,i,o,n,e.widget||null,!0)}static line(e){return new Es(e)}static set(e,n=!1){return Xe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Xe.empty;class $s extends xe{constructor(e){let{start:n,end:i}=Ey(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof $s&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&jd(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}$s.prototype.point=!1;class Es extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Es&&this.spec.class==e.spec.class&&jd(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Es.prototype.mapMode=Tt.TrackBefore;Es.prototype.point=!0;class Qi extends xe{constructor(e,n,i,o,r,s){super(n,i,r,e),this.block=o,this.isReplace=s,this.mapMode=o?n<=0?Tt.TrackBefore:Tt.TrackAfter:Tt.TrackDel}get type(){return this.startSide=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Qi&&dM(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Qi.prototype.point=!0;function Ey(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function dM(t,e){return t==e||!!(t&&e&&t.compare(e))}function bh(t,e,n,i=0){let o=n.length-1;o>=0&&n[o]+i>=t?n[o]=Math.max(n[o],e):n.push(t,e)}class Dt extends Fe{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,o,r,s){if(i){if(!(i instanceof Dt))return!1;this.dom||i.transferDOM(this)}return o&&this.setDeco(i?i.attrs:null),xy(this,e,n,i?i.children:[],r,s),!0}split(e){let n=new Dt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:o}=this.childPos(e);o&&(n.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){jd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){Cy(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=wh(n,this.attrs||{})),i&&(this.attrs=wh({class:i},this.attrs||{}))}domAtPos(e){return Py(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(Oy(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(_h(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let o=this.dom.lastChild;for(;o&&Fe.get(o)instanceof li;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((i=Fe.get(o))===null||i===void 0?void 0:i.isEditable)==!1&&(!_e.ios||!this.children.some(r=>r instanceof Bn))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Bn)||/[^ -~]/.test(i.text))return null;let o=Jo(i.dom);if(o.length!=1)return null;e+=o[0].width,n=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=$y(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:o}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-o.lineHeight)<2&&o.textHeight=n){if(r instanceof Dt)return r;if(s>n)break}o=s+r.breakAfter}return null}}class io extends Fe{constructor(e,n,i){super(),this.widget=e,this.length=n,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,o,r,s){return i&&(!(i instanceof io)||!this.widget.compare(i.widget)||e>0&&r<=0||n0;){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(sl(new Bn(this.text.slice(this.textOff,this.textOff+o)),n),i),this.atCursorPos=!0,this.textOff+=o,e-=o,i=0}}span(e,n,i,o){this.buildText(n-e,i,o),this.pos=n,this.openStart<0&&(this.openStart=o)}point(e,n,i,o,r,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Qi){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(i instanceof Qi)if(i.block){let{type:a}=i;a==nt.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new io(i.widget||new hm("div"),l,a))}else{let a=ki.create(i.widget||new hm("span"),l,l?0:i.startSide),u=this.atCursorPos&&!a.isEditable&&r<=o.length&&(e0),c=!a.isEditable&&(eo.length||i.startSide<=0),h=this.getLine();this.pendingBuffer==2&&!u&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),u&&(h.append(sl(new er(1),o),r),r=o.length+Math.max(0,r-o.length)),h.append(sl(a,o),r),this.atCursorPos=c,this.pendingBuffer=c?eo.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=r)}static build(e,n,i,o,r){let s=new Wr(e,n,i,r);return s.openEnd=Xe.spans(o,n,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function sl(t,e){for(let n of e)t=new li(n,[t],t.length);return t}class hm extends Xn{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const My=we.define(),Ay=we.define(),Dy=we.define(),Ry=we.define(),xh=we.define(),qy=we.define(),Qy=we.define(),Ny=we.define({combine:t=>t.some(e=>e)}),Iy=we.define({combine:t=>t.some(e=>e)});class Ma{constructor(e,n="nearest",i="nearest",o=5,r=5){this.range=e,this.y=n,this.x=i,this.yMargin=o,this.xMargin=r}map(e){return e.empty?this:new Ma(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const dm=Pe.define({map:(t,e)=>t.map(e)});function an(t,e,n){let i=t.facet(Ry);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const _u=we.define({combine:t=>t.length?t[0]:!0});let fM=0;const Tr=we.define();class ht{constructor(e,n,i,o){this.id=e,this.create=n,this.domEventHandlers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:i,provide:o,decorations:r}=n||{};return new ht(fM++,e,i,s=>{let l=[Tr.of(s)];return r&&l.push(ss.of(a=>{let u=a.plugin(s);return u?r(u):xe.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return ht.define(i=>new e(i),n)}}class ic{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(an(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){an(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){an(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Vy=we.define(),Fd=we.define(),ss=we.define(),Hd=we.define(),By=we.define();function fm(t,e,n){let i=t.state.facet(By);if(!i.length)return i;let o=i.map(s=>s instanceof Function?s(t):s),r=[];return Xe.spans(o,e,n,{point(){},span(s,l,a,u){let c=r;for(let h=a.length-1;h>=0;h--,u--){let d=a[h].spec.bidiIsolate,f;if(d!=null)if(u>0&&c.length&&(f=c[c.length-1]).to==s&&f.direction==d)f.to=l,c=f.inner;else{let p={from:s,to:l,direction:d,inner:[]};c.push(p),c=p.inner}}}}),r}const Wy=we.define();function Ly(t){let e=0,n=0,i=0,o=0;for(let r of t.state.facet(Wy)){let s=r(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(o=Math.max(o,s.bottom)))}return{left:e,right:n,top:i,bottom:o}}const Pr=we.define();class un{constructor(e,n,i,o){this.fromA=e,this.toA=n,this.fromB=i,this.toB=o}join(e){return new un(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let o=e[n-1];if(!(o.fromA>i.toA)){if(o.toAc)break;r+=2}if(!a)return i;new un(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),s=a.toA,l=a.toB}}}class Aa{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=ft.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let o=[];this.changes.iterChangedRanges((r,s,l,a)=>o.push(new un(r,s,l,a))),this.changedRanges=o}static create(e,n,i){return new Aa(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var tt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(tt||(tt={}));const ls=tt.LTR,zy=tt.RTL;function Xy(t){let e=[];for(let n=0;n=n){if(l.level==i)return s;(r<0||(o!=0?o<0?l.fromn:e[r].level>l.level))&&(r=s)}}if(r<0)throw new RangeError("Index out of range");return r}}function Uy(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;g-=3)if(kn[g+1]==-f){let w=kn[g+2],y=w&2?o:w&4?w&1?r:o:0;y&&(Ye[h]=Ye[kn[g]]=y),l=g;break}}else{if(kn.length==189)break;kn[l++]=h,kn[l++]=d,kn[l++]=a}else if((p=Ye[h])==2||p==1){let g=p==o;a=g?0:1;for(let w=l-3;w>=0;w-=3){let y=kn[w+2];if(y&2)break;if(g)kn[w+2]|=2;else{if(y&4)break;kn[w+2]|=4}}}}}function wM(t,e,n,i){for(let o=0,r=i;o<=n.length;o++){let s=o?n[o-1].to:t,l=oa;)p==w&&(p=n[--g].from,w=g?n[g-1].to:t),Ye[--p]=f;a=c}else r=u,a++}}}function kh(t,e,n,i,o,r,s){let l=i%2?2:1;if(i%2==o%2)for(let a=e,u=0;aa&&s.push(new Ti(a,g.from,f));let w=g.direction==ls!=!(f%2);Th(t,w?i+1:i,o,g.inner,g.from,g.to,s),a=g.to}p=g.to}else{if(p==n||(c?Ye[p]!=l:Ye[p]==l))break;p++}d?kh(t,a,p,i+1,o,d,s):ae;){let c=!0,h=!1;if(!u||a>r[u-1].to){let g=Ye[a-1];g!=l&&(c=!1,h=g==16)}let d=!c&&l==1?[]:null,f=c?i:i+1,p=a;e:for(;;)if(u&&p==r[u-1].to){if(h)break e;let g=r[--u];if(!c)for(let w=g.from,y=u;;){if(w==e)break e;if(y&&r[y-1].to==w)w=r[--y].from;else{if(Ye[w-1]==l)break e;break}}if(d)d.push(g);else{g.toYe.length;)Ye[Ye.length]=256;let i=[],o=e==ls?0:1;return Th(t,o,o,n,0,t.length,i),i}function Yy(t){return[new Ti(0,t,0)]}let jy="";function bM(t,e,n,i,o){var r;let s=i.head-t.from,l=-1;if(s==0){if(!o||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),l=0)}else if(s==t.length){if(o)return null;let d=e[e.length-1];d.level!=n&&(s=d.side(!0,n),l=e.length-1)}l<0&&(l=Ti.find(e,s,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc));let a=e[l];s==a.side(o,n)&&(a=e[l+=o?1:-1],s=a.side(!o,n));let u=o==(a.dir==n),c=Et(t.text,s,u);if(jy=t.text.slice(Math.min(s,c),Math.max(s,c)),c!=a.side(o,n))return Z.cursor(c+t.from,u?-1:1,a.level);let h=l==(o?e.length-1:0)?null:e[l+(o?1:-1)];return!h&&a.level!=n?Z.cursor(o?t.to:t.from,o?-1:1,n):h&&h.level0&&n.length&&(n.every(({fromA:l,toA:a})=>athis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let i=this.view.inputState.composing<0?null:SM(this.view,e.changes);if(this.hasComposition){this.markedForComposition.clear();let{from:l,to:a}=this.hasComposition;n=new un(l,a,e.changes.mapPos(l,-1),e.changes.mapPos(a,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(_e.ie||_e.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,r=this.updateDeco(),s=PM(o,r,e.changes);return n=un.extendWithRanges(n,s),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=_e.chrome||_e.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||o.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?o[s]:null;if(!l)break;let{fromA:a,toA:u,fromB:c,toB:h}=l,d,f,p,g;if(i&&i.range.fromBc){let b=Wr.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=Wr.build(this.view.state.doc,i.range.toB,h,this.decorations,this.dynamicDecorationMap);f=b.breakAtStart,p=b.openStart,g=k.openEnd;let x=this.compositionView(i);k.breakAtStart?x.breakAfter=1:k.content.length&&x.merge(x.length,x.length,k.content[0],!1,k.openStart,0)&&(x.breakAfter=k.content[0].breakAfter,k.content.shift()),b.content.length&&x.merge(0,0,b.content[b.content.length-1],!0,0,b.openEnd)&&b.content.pop(),d=b.content.concat(x).concat(k.content)}else({content:d,breakAtStart:f,openStart:p,openEnd:g}=Wr.build(this.view.state.doc,c,h,this.decorations,this.dynamicDecorationMap));let{i:w,off:y}=r.findPos(u,1),{i:_,off:T}=r.findPos(a,-1);by(this,_,T,w,y,d,f,p,g)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new Bn(e.text.nodeValue);n.flags|=8;for(let{deco:o}of e.marks)n=new li(o,[n],n.length);let i=new Dt;return i.append(n,0),i}fixCompositionDOM(e){let n=(r,s)=>{s.flags|=8,this.markedForComposition.add(s);let l=Fe.get(r);l!=s&&(l&&(l.dom=null),s.setDOM(r))},i=this.childPos(e.range.fromB,1),o=this.children[i.i];n(e.line,o);for(let r=e.marks.length-1;r>=-1;r--)i=o.childPos(i.off,1),o=o.children[i.i],n(r>=0?e.marks[r].node:e.text,o)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,o=i==this.dom,r=!o&&Xl(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(o||n||r))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.domAtPos(l.anchor),u=l.empty?a:this.domAtPos(l.head);if(_e.gecko&&l.empty&&!this.hasComposition&&xM(a)){let h=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(h,a.node.childNodes[a.offset]||null)),a=u=new qt(h,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||!$a(a.node,a.offset,c.anchorNode,c.anchorOffset)||!$a(u.node,u.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{_e.android&&_e.chrome&&this.dom.contains(c.focusNode)&&CM(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=Ca(this.view.root);if(h)if(l.empty){if(_e.gecko){let d=kM(a.node,a.offset);if(d&&d!=3){let f=Hy(a.node,a.offset,d==1?1:-1);f&&(a=new qt(f,d==1?0:f.nodeValue.length))}}h.collapse(a.node,a.offset),l.bidiLevel!=null&&c.caretBidiLevel!=null&&(c.caretBidiLevel=l.bidiLevel)}else if(h.extend){h.collapse(a.node,a.offset);try{h.extend(u.node,u.offset)}catch{}}else{let d=document.createRange();l.anchor>l.head&&([a,u]=[u,a]),d.setEnd(u.node,u.offset),d.setStart(a.node,a.offset),h.removeAllRanges(),h.addRange(d)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,u)),this.impreciseAnchor=a.precise?null:new qt(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new qt(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Ca(e.root),{anchorNode:o,anchorOffset:r}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let s=Dt.find(this,n.head);if(!s)return;let l=s.posAtStart;if(n.head==l||n.head==l+s.length)return;let a=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!a||!u||a.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let h=e.observer.selectionRange;e.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=n.from&&i.collapse(o,r)}nearest(e){for(let n=e;n;){let i=Fe.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;ns||e==s&&r.type!=nt.WidgetBefore&&r.type!=nt.WidgetAfter&&(!o||n==2||this.children[o-1].breakAfter||this.children[o-1].type==nt.WidgetBefore&&n>-2))return r.coordsAt(e-s,n);i=s}}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),o=this.children[n];if(!(o instanceof Dt))return null;for(;o.children.length;){let{i:l,off:a}=o.childPos(i,1);for(;;l++){if(l==o.children.length)return null;if((o=o.children[l]).length)break}i=a}if(!(o instanceof Bn))return null;let r=Et(o.text,i);if(r==i)return null;let s=uo(o.dom,i,r).getClientRects();return!s.length||s[0].top>=s[0].bottom?null:s[0]}measureVisibleLineHeights(e){let n=[],{from:i,to:o}=e,r=this.view.contentDOM.clientWidth,s=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==tt.LTR;for(let u=0,c=0;co)break;if(u>=i){let f=h.dom.getBoundingClientRect();if(n.push(f.height),s){let p=h.dom.lastChild,g=p?Jo(p):[];if(g.length){let w=g[g.length-1],y=a?w.right-f.left:f.right-w.left;y>l&&(l=y,this.minWidth=r,this.minWidthFrom=u,this.minWidthTo=d)}}}u=d+h.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?tt.RTL:tt.LTR}measureTextSize(){for(let r of this.children)if(r instanceof Dt){let s=r.measureTextSize();if(s)return s}let e=document.createElement("div"),n,i,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Jo(e.firstChild)[0];n=e.getBoundingClientRect().height,i=r?r.width/27:7,o=r?r.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:o}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new _y(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,o=0;;o++){let r=o==n.viewports.length?null:n.viewports[o],s=r?r.from-1:this.length;if(s>i){let l=n.lineBlockAt(s).bottom-n.lineBlockAt(i).top;e.push(xe.replace({widget:new mm(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!r)break;i=r.to+1}return xe.set(e)}updateDeco(){let e=this.view.state.facet(ss).map((n,i)=>(this.dynamicDecorationMap[i]=typeof n=="function")?n(this.view):n);for(let n=e.length;nn.anchor?-1:1),o;if(!i)return;!n.empty&&(o=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,o.left),top:Math.min(i.top,o.top),right:Math.max(i.right,o.right),bottom:Math.max(i.bottom,o.bottom)});let r=Ly(this.view),s={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom};iM(this.view.scrollDOM,s,n.head-1)return null;a+=f.text.length}if(u=u.parentNode,!u)return null;let c=Fe.get(u);if(c){r=c.posAtStart+a,s=r+l;break}}}return{from:r,to:s,node:i}}function SM(t,e){let n=Fy(t,e.newLength-e.length);if(!n)return null;let{from:i,to:o,node:r}=n,s=e.mapPos(i,-1),l=e.mapPos(o,1),a=r.nodeValue;if(/[\n\r]/.test(a))return null;if(l-s!=a.length){let d=e.mapPos(i,1),f=e.mapPos(o,-1);if(f-d==a.length)s=d,l=f;else if(t.state.doc.sliceString(l-a.length,l)==a)s=l-a.length;else if(t.state.doc.sliceString(s,s+a.length)==a)l=s+a.length;else return null}let{main:u}=t.state.selection;if(t.state.doc.sliceString(s,l)!=a||s>u.head||l0)i=i.childNodes[o-1],o=qi(i);else break}if(n>=0)for(let i=t,o=e;;){if(i.nodeType==3)return i;if(i.nodeType==1&&o=0)i=i.childNodes[o],o=0;else break}return null}function kM(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e0;){let u=Et(o.text,s,!1);if(i(o.text.slice(u,s))!=a)break;s=u}for(;lt?e.left-t:Math.max(0,t-e.right)}function MM(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function oc(t,e){return t.tope.top+1}function gm(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ph(t,e,n){let i,o,r,s,l=!1,a,u,c,h;for(let p=t.firstChild;p;p=p.nextSibling){let g=Jo(p);for(let w=0;wT||s==T&&r>_){i=p,o=y,r=_,s=T;let b=T?n0?w0)}_==0?n>y.bottom&&(!c||c.bottomy.top)&&(u=p,h=y):c&&oc(c,y)?c=vm(c,y.bottom):h&&oc(h,y)&&(h=gm(h,y.top))}}if(c&&c.bottom>=n?(i=a,o=c):h&&h.top<=n&&(i=u,o=h),!i)return{node:t,offset:0};let d=Math.max(o.left,Math.min(o.right,e));if(i.nodeType==3)return ym(i,d,n);if(l&&i.contentEditable!="false")return Ph(i,d,n);let f=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(o.left+o.right)/2?1:0);return{node:t,offset:f}}function ym(t,e,n){let i=t.nodeValue.length,o=-1,r=1e9,s=0;for(let l=0;ln?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&h=(c.left+c.right)/2,f=d;if((_e.chrome||_e.gecko)&&uo(t,l).getBoundingClientRect().left==c.right&&(f=!d),h<=0)return{node:t,offset:l+(f?1:0)};o=l+(f?1:0),r=h}}}return{node:t,offset:o>-1?o:s>0?t.nodeValue.length:0}}function Gy(t,e,n,i=-1){var o,r;let s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,a,{docHeight:u}=t.viewState,{x:c,y:h}=e,d=h-l;if(d<0)return 0;if(d>u)return t.state.doc.length;for(let b=t.viewState.heightOracle.textHeight/2,k=!1;a=t.elementAtHeight(d),a.type!=nt.Text;)for(;d=i>0?a.bottom+b:a.top-b,!(d>=0&&d<=u);){if(k)return n?null:0;k=!0,i=-i}h=l+d;let f=a.from;if(ft.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:Om(t,s,a,c,h);let p=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:p,w=g.elementFromPoint(c,h);w&&!t.contentDOM.contains(w)&&(w=null),w||(c=Math.max(s.left+1,Math.min(s.right-1,c)),w=g.elementFromPoint(c,h),w&&!t.contentDOM.contains(w)&&(w=null));let y,_=-1;if(w&&((o=t.docView.nearest(w))===null||o===void 0?void 0:o.isEditable)!=!1){if(p.caretPositionFromPoint){let b=p.caretPositionFromPoint(c,h);b&&({offsetNode:y,offset:_}=b)}else if(p.caretRangeFromPoint){let b=p.caretRangeFromPoint(c,h);b&&({startContainer:y,startOffset:_}=b,(!t.contentDOM.contains(y)||_e.safari&&AM(y,_,c)||_e.chrome&&DM(y,_,c))&&(y=void 0))}}if(!y||!t.docView.dom.contains(y)){let b=Dt.find(t.docView,f);if(!b)return d>a.top+a.height/2?a.to:a.from;({node:y,offset:_}=Ph(b.dom,c,h))}let T=t.docView.nearest(y);if(!T)return null;if(T.isWidget&&((r=T.dom)===null||r===void 0?void 0:r.nodeType)==1){let b=T.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((o-n.top-(t.defaultLineHeight-l)*.5)/l);r+=a*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+fh(s,r,t.state.tabSize)}function AM(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let o=t.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return uo(t,i-1,i).getBoundingClientRect().left>n}function DM(t,e,n){if(e!=0)return!1;for(let o=t;;){let r=o.parentNode;if(!r||r.nodeType!=1||r.firstChild!=o)return!1;if(r.classList.contains("cm-line"))break;o=r}let i=t.nodeType==1?t.getBoundingClientRect():uo(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function Ch(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==nt.Text))return i}return n}function RM(t,e,n,i){let o=Ch(t,e.head),r=!i||o.type!=nt.Text||!(t.lineWrapping||o.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(r){let s=t.dom.getBoundingClientRect(),l=t.textDirectionAt(o.from),a=t.posAtCoords({x:n==(l==tt.LTR)?s.right-1:s.left+1,y:(r.top+r.bottom)/2});if(a!=null)return Z.cursor(a,n?-1:1)}return Z.cursor(n?o.to:o.from,n?-1:1)}function wm(t,e,n,i){let o=t.state.doc.lineAt(e.head),r=t.bidiSpans(o),s=t.textDirectionAt(o.from);for(let l=e,a=null;;){let u=bM(o,r,s,l,n),c=jy;if(!u){if(o.number==(n?t.state.doc.lines:1))return l;c=` -`,o=t.state.doc.line(o.number+(n?1:-1)),r=t.bidiSpans(o),u=Z.cursor(n?o.from:o.to)}if(a){if(!a(c))return l}else{if(!i)return u;a=i(c)}l=u}}function qM(t,e,n){let i=t.state.charCategorizer(e),o=i(n);return r=>{let s=i(r);return o==Je.Space&&(o=s),o==s}}function QM(t,e,n,i){let o=e.head,r=n?1:-1;if(o==(n?t.state.doc.length:0))return Z.cursor(o,e.assoc);let s=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(o),c=t.documentTop;if(u)s==null&&(s=u.left-a.left),l=r<0?u.top:u.bottom;else{let f=t.viewState.lineBlockAt(o);s==null&&(s=Math.min(a.right-a.left,t.defaultCharacterWidth*(o-f.from))),l=(r<0?f.top:f.bottom)+c}let h=a.left+s,d=i??t.viewState.heightOracle.textHeight>>1;for(let f=0;;f+=10){let p=l+(d+f)*r,g=Gy(t,{x:h,y:p},!1,r);if(pa.bottom||(r<0?go))return Z.cursor(g,e.assoc,void 0,s)}}function Ul(t,e,n){for(;;){let i=0;for(let o of t)o.between(e-1,e+1,(r,s,l)=>{if(e>r&&eo(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:Z.cursor(i,i{this.ignoreDuringComposition(o)||o.type=="keydown"&&this.keydown(e,o)||(this.mustFlushObserver(o)&&e.observer.forceFlush(),this.runCustomHandlers(o.type,e,o)?o.preventDefault():i(e,o))};for(let i in ct){let o=ct[i];e.contentDOM.addEventListener(i,r=>{_m(e,r)&&n(o,r)},$h[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(n(ct.mousedown,i),!i.defaultPrevented&&i.button==2)){let o=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=o,200)}}),e.scrollDOM.addEventListener("drop",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&n(ct.drop,i)}),_e.chrome&&_e.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,_e.safari&&e.contentDOM.addEventListener("input",()=>null),_e.gecko&&ZM(e.contentDOM.ownerDocument)}ensureHandlers(e,n){var i;let o;this.customHandlers=[];for(let r of n)if(o=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:o});for(let s in o)this.registeredEvents.indexOf(s)<0&&s!="scroll"&&(this.registeredEvents.push(s),e.contentDOM.addEventListener(s,l=>{_m(e,l)&&this.runCustomHandlers(s,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,n,i){for(let o of this.customHandlers){let r=o.handlers[e];if(r)try{if(r.call(o.plugin,i,n)||i.defaultPrevented)return!0}catch(s){an(n.state,s)}}return!1}runScrollHandlers(e,n){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let o=i.handlers.scroll;if(o)try{o.call(i.plugin,n,e)}catch(r){an(e.state,r)}}}keydown(e,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()o.keyCode==n.keyCode))&&!n.ctrlKey||IM.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey)?(this.pendingIOSKey=i||n,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let n=this.pendingIOSKey;return n?(this.pendingIOSKey=void 0,Lo(e.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:_e.safari&&!_e.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Zy=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],IM="dthko",Ky=[16,17,18,20,91,92,224,225],ll=6;function al(t){return Math.max(0,t)*.7+8}function VM(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class BM{constructor(e,n,i,o){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=oM(e.contentDOM),this.atoms=e.state.facet(Hd).map(s=>s(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(qe.allowMultipleSelections)&&WM(e,n),this.dragging=zM(e,n)&&nO(n)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&VM(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,o=0,r=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=Ly(this.view);e.clientX-s.left<=r.left+ll?i=-al(r.left-e.clientX):e.clientX+s.right>=r.right-ll&&(i=al(e.clientX-r.right)),e.clientY-s.top<=r.top+ll?o=-al(r.top-e.clientY):e.clientY+s.bottom>=r.bottom-ll&&(o=al(e.clientY-r.bottom)),this.setScrollSpeed(i,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function WM(t,e){let n=t.state.facet(My);return n.length?n[0](e):_e.mac?e.metaKey:e.ctrlKey}function LM(t,e){let n=t.state.facet(Ay);return n.length?n[0](e):_e.mac?!e.altKey:!e.ctrlKey}function zM(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Ca(t.root);if(!i||i.rangeCount==0)return!0;let o=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function _m(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Fe.get(n))&&i.ignoreEvent(e))return!1;return!0}const ct=Object.create(null),$h=Object.create(null),Jy=_e.ie&&_e.ie_version<15||_e.ios&&_e.webkit_version<604;function XM(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),eO(t,n.value)},50)}function eO(t,e){let{state:n}=t,i,o=1,r=n.toText(e),s=r.lines==n.selection.ranges.length;if(Eh!=null&&n.selection.ranges.every(a=>a.empty)&&Eh==r.toString()){let a=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==a)return{range:u};a=c.from;let h=n.toText((s?r.line(o++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:h},range:Z.cursor(u.from+h.length)}})}else s?i=n.changeByRange(a=>{let u=r.line(o++);return{changes:{from:a.from,to:a.to,insert:u.text},range:Z.cursor(a.from+u.length)}}):i=n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ct.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now())};ct.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};ct.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};$h.touchstart=$h.touchmove={passive:!0};ct.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let i of t.state.facet(Dy))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=jM(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new BM(t,e,n,i)),i&&t.observer.ignore(()=>yy(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(e)}};function bm(t,e,n,i){if(i==1)return Z.cursor(e,n);if(i==2)return $M(t.state,e,n);{let o=Dt.find(t.docView,e),r=t.state.doc.lineAt(o?o.posAtEnd:e),s=o?o.posAtStart:r.from,l=o?o.posAtEnd:r.to;return lt>=e.top&&t<=e.bottom,xm=(t,e,n)=>tO(e,n)&&t>=n.left&&t<=n.right;function UM(t,e,n,i){let o=Dt.find(t.docView,e);if(!o)return 1;let r=e-o.posAtStart;if(r==0)return 1;if(r==o.length)return-1;let s=o.coordsAt(r,-1);if(s&&xm(n,i,s))return-1;let l=o.coordsAt(r,1);return l&&xm(n,i,l)?1:s&&tO(i,s)?-1:1}function Sm(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:UM(t,n,e.clientX,e.clientY)}}const YM=_e.ie&&_e.ie_version<=11;let km=null,Tm=0,Pm=0;function nO(t){if(!YM)return t.detail;let e=km,n=Pm;return km=t,Pm=Date.now(),Tm=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Tm+1)%3:1}function jM(t,e){let n=Sm(t,e),i=nO(e),o=t.state.selection;return{update(r){r.docChanged&&(n.pos=r.changes.mapPos(n.pos),o=o.map(r.changes))},get(r,s,l){let a=Sm(t,r),u,c=bm(t,a.pos,a.bias,i);if(n.pos!=a.pos&&!s){let h=bm(t,n.pos,n.bias,i),d=Math.min(h.from,c.from),f=Math.max(h.to,c.to);c=d1&&(u=FM(o,a.pos))?u:l?o.addRange(c):Z.create([c])}}}function FM(t,e){for(let n=0;n=e)return Z.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ct.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:i}=t.inputState;i&&(i.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove")};function Cm(t,e,n,i){if(!n)return;let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=t.inputState,s=i&&r&&r.dragging&&LM(t,e)?{from:r.dragging.from,to:r.dragging.to}:null,l={from:o,insert:n},a=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(o,-1),head:a.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"})}ct.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let n=e.dataTransfer.files;if(n&&n.length){e.preventDefault();let i=Array(n.length),o=0,r=()=>{++o==n.length&&Cm(t,e,i.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[s]=l.result),r()},l.readAsText(n[s])}}else Cm(t,e,e.dataTransfer.getData("Text"),!0)};ct.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let n=Jy?null:e.clipboardData;n?(eO(t,n.getData("text/plain")||n.getData("text/uri-text")),e.preventDefault()):XM(t)};function HM(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function GM(t){let e=[],n=[],i=!1;for(let o of t.selection.ranges)o.empty||(e.push(t.sliceDoc(o.from,o.to)),n.push(o));if(!e.length){let o=-1;for(let{from:r}of t.selection.ranges){let s=t.doc.lineAt(r);s.number>o&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),o=s.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let Eh=null;ct.copy=ct.cut=(t,e)=>{let{text:n,ranges:i,linewise:o}=GM(t.state);if(!n&&!o)return;Eh=o?n:null;let r=Jy?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",n)):HM(t,n),e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};const iO=hi.define();function oO(t,e){let n=[];for(let i of t.facet(Qy)){let o=i(t,e);o&&n.push(o)}return n?t.update({effects:n,annotations:iO.of(!0)}):null}function rO(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=oO(t.state,e);n?t.dispatch(n):t.update([])}},10)}ct.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),rO(t)};ct.blur=t=>{t.observer.clearSelectionRange(),rO(t)};ct.compositionstart=ct.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};ct.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,_e.chrome&&_e.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};ct.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ct.beforeinput=(t,e)=>{var n;let i;if(_e.chrome&&_e.android&&(i=Zy.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const $m=new Set;function ZM(t){$m.has(t)||($m.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Em=["pre-wrap","normal","pre-line","break-spaces"];class KM{constructor(e){this.lineWrapping=e,this.doc=Be.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Em.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=o,this.lineLength=r,a){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>Yl&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return Qt.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,o){let r=this,s=i.doc;for(let l=o.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:c,toB:h}=o[l],d=r.lineAt(a,He.ByPosNoHeight,i.setDoc(n),0,0),f=d.to>=u?d:r.lineAt(u,He.ByPosNoHeight,i,0,0);for(h+=f.to-u,u=f.to;l>0&&d.from<=o[l-1].toA;)a=o[l-1].fromA,c=o[l-1].fromB,l--,ar*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),i+=1+l.break,o-=l.size}else if(r>o*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(o=r&&s(this.blockAt(0,i,o,r))}updateHeight(e,n=0,i=!1,o){return o&&o.from<=n&&o.more&&this.setHeight(e,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ht extends sO{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,o){return new Mn(o,this.length,i,this.height,this.breaks)}replace(e,n,i){let o=i[0];return i.length==1&&(o instanceof Ht||o instanceof bt&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof bt?o=new Ht(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):Qt.of(i)}updateHeight(e,n=0,i=!1,o){return o&&o.from<=n&&o.more?this.setHeight(e,o.heights[o.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class bt extends Qt{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,o=e.doc.lineAt(n+this.length).number,r=o-i+1,s,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);s=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else s=this.height/r;return{firstLine:i,lastLine:o,perLine:s,perChar:l}}blockAt(e,n,i,o){let{firstLine:r,lastLine:s,perLine:l,perChar:a}=this.heightMetrics(n,o);if(n.lineWrapping){let u=o+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),c=n.doc.lineAt(u),h=l+c.length*a,d=Math.max(i,e-h/2);return new Mn(c.from,c.length,d,h,0)}else{let u=Math.max(0,Math.min(s-r,Math.floor((e-i)/l))),{from:c,length:h}=n.doc.line(r+u);return new Mn(c,h,i+l*u,l,0)}}lineAt(e,n,i,o,r){if(n==He.ByHeight)return this.blockAt(e,i,o,r);if(n==He.ByPosNoHeight){let{from:f,to:p}=i.doc.lineAt(e);return new Mn(f,p-f,0,0,0)}let{firstLine:s,perLine:l,perChar:a}=this.heightMetrics(i,r),u=i.doc.lineAt(e),c=l+u.length*a,h=u.number-s,d=o+l*h+a*(u.from-r-h);return new Mn(u.from,u.length,Math.max(o,Math.min(d,o+this.height-c)),c,0)}forEachLine(e,n,i,o,r,s){e=Math.max(e,r),n=Math.min(n,r+this.length);let{firstLine:l,perLine:a,perChar:u}=this.heightMetrics(i,r);for(let c=e,h=o;c<=n;){let d=i.doc.lineAt(c);if(c==e){let p=d.number-l;h+=a*p+u*(e-r-p)}let f=a+u*d.length;s(new Mn(d.from,d.length,h,f,0)),h+=f,c=d.to+1}}replace(e,n,i){let o=this.length-n;if(o>0){let r=i[i.length-1];r instanceof bt?i[i.length-1]=new bt(r.length+o):i.push(null,new bt(o-1))}if(e>0){let r=i[0];r instanceof bt?i[0]=new bt(e+r.length):i.unshift(new bt(e-1),null)}return Qt.of(i)}decomposeLeft(e,n){n.push(new bt(e-1),null)}decomposeRight(e,n){n.push(null,new bt(this.length-e-1))}updateHeight(e,n=0,i=!1,o){let r=n+this.length;if(o&&o.from<=n+this.length&&o.more){let s=[],l=Math.max(n,o.from),a=-1;for(o.from>n&&s.push(new bt(o.from-n-1).updateHeight(e,n));l<=r&&o.more;){let c=e.doc.lineAt(l).length;s.length&&s.push(null);let h=o.heights[o.index++];a==-1?a=h:Math.abs(h-a)>=Yl&&(a=-2);let d=new Ht(c,h);d.outdated=!1,s.push(d),l+=c+1}l<=r&&s.push(null,new bt(r-l).updateHeight(e,l));let u=Qt.of(s);return(a<0||Math.abs(u.height-this.height)>=Yl||Math.abs(a-this.heightMetrics(e,n).perLine)>=Yl)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class eA extends Qt{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,o){let r=i+this.left.height;return el))return u;let c=n==He.ByPosNoHeight?He.ByPosNoHeight:He.ByPos;return a?u.join(this.right.lineAt(l,c,i,s,l)):this.left.lineAt(l,c,i,o,r).join(u)}forEachLine(e,n,i,o,r,s){let l=o+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,n,i,l,a,s);else{let u=this.lineAt(a,He.ByPos,i,o,r);e=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,l,a,s)}}replace(e,n,i){let o=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-o,n-o,i));let r=[];e>0&&this.decomposeLeft(e,r);let s=r.length;for(let l of i)r.push(l);if(e>0&&Mm(r,s-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,o=i+this.break;if(e>=o)return this.right.decomposeRight(e-o,n);e2*n.size||n.size>2*e.size?Qt.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,o){let{left:r,right:s}=this,l=n+r.length+this.break,a=null;return o&&o.from<=n+r.length&&o.more?a=r=r.updateHeight(e,n,i,o):r.updateHeight(e,n,i),o&&o.from<=l+s.length&&o.more?a=s=s.updateHeight(e,l,i,o):s.updateHeight(e,l,i),a?this.balanced(r,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Mm(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof bt&&(i=t[e+1])instanceof bt&&t.splice(e-1,3,new bt(n.length+1+i.length))}const tA=5;class Gd{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof Ht?o.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ht(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=tA)&&this.addLineDeco(o,r,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ht(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new bt(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ht)return e;let n=new Ht(0,-1);return this.nodes.push(n),n}addBlock(e){var n;this.enterLine();let i=(n=e.deco)===null||n===void 0?void 0:n.type;i==nt.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,i!=nt.WidgetBefore&&(this.covering=e)}addLineDeco(e,n,i){let o=this.ensureLine();o.length+=i,o.collapsed+=i,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ht)&&!this.isCovered?this.nodes.push(new Ht(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&h.overflow!="visible"){let d=c.getBoundingClientRect();r=Math.max(r,d.left),s=Math.min(s,d.right),l=Math.max(l,d.top),a=u==t.parentNode?d.bottom:Math.min(a,d.bottom)}u=h.position=="absolute"||h.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:r-n.left,right:Math.max(r,s)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function rA(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class sc{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new KM(n),this.stateDeco=e.facet(ss).filter(i=>typeof i!="function"),this.heightMap=Qt.empty().applyChanges(this.stateDeco,Be.empty,this.heightOracle.setDoc(e.doc),[new un(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(i=>i.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let o=i?n.head:n.anchor;if(!e.some(({from:r,to:s})=>o>=r&&o<=s)){let{from:r,to:s}=this.lineBlockAt(o);e.push(new ul(r,s))}}this.viewports=e.sort((i,o)=>i.from-o.from),this.scaler=this.heightMap.height<=7e6?Dm:new uA(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Cr(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ss).filter(c=>typeof c!="function");let o=e.changedRanges,r=un.extendWithRanges(o,nA(i,this.stateDeco,e?e.changes:ft.empty(this.state.doc.length))),s=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=s&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Iy)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),o=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?tt.RTL:tt.LTR;let s=this.heightOracle.mustRefreshForWrapping(r),l=n.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,c=0,h=parseInt(i.paddingTop)||0,d=parseInt(i.paddingBottom)||0;(this.paddingTop!=h||this.paddingBottom!=d)&&(this.paddingTop=h,this.paddingBottom=d,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8),this.scrollTop!=e.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=e.scrollDOM.scrollTop),this.scrolledToBottom=wy(e.scrollDOM);let f=(this.printing?rA:oA)(n,this.paddingTop),p=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let y=l.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),a){let T=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(T)&&(s=!0),s||o.lineWrapping&&Math.abs(y-this.contentDOMWidth)>o.charWidth){let{lineHeight:b,charWidth:k,textHeight:x}=e.docView.measureTextSize();s=b>0&&o.refresh(r,b,k,x,y/k,T),s&&(e.docView.minWidth=0,u|=8)}p>0&&g>0?c=Math.max(p,g):p<0&&g<0&&(c=Math.min(p,g)),o.heightChanged=!1;for(let b of this.viewports){let k=b.from==this.viewport.from?T:e.docView.measureVisibleLineHeights(b);this.heightMap=(s?Qt.empty().applyChanges(this.stateDeco,Be.empty,this.heightOracle,[new un(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,s,new JM(b.from,k))}o.heightChanged&&(u|=2)}let _=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return _&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,r=this.heightOracle,{visibleTop:s,visibleBottom:l}=this,a=new ul(o.lineAt(s-i*1e3,He.ByHeight,r,0,0).from,o.lineAt(l+(1-i)*1e3,He.ByHeight,r,0,0).to);if(n){let{head:u}=n.range;if(ua.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=o.lineAt(u,He.ByPos,r,0,0),d;n.y=="center"?d=(h.top+h.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=l+Math.max(10,Math.min(i,250)))&&o>s-2*1e3&&r>1,s=o<<1;if(this.defaultTextDirection!=tt.LTR&&!i)return[];let l=[],a=(u,c,h,d)=>{if(c-uu&&ww.from>=h.from&&w.to<=h.to&&Math.abs(w.from-u)w.fromy));if(!g){if(cw.from<=c&&w.to>=c)){let w=n.moveToLineBoundary(Z.cursor(c),!1,!0).head;w>u&&(c=w)}g=new sc(u,c,this.gapSize(h,u,c,d))}l.push(g)};for(let u of this.viewportLines){if(u.lengthu.from&&a(u.from,d,u,c),fn.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Xe.spans(e,this.viewport.from,this.viewport.to,{span(o,r){n.push({from:o,to:r})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((o,r)=>o.from!=n[r].from||o.to!=n[r].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Cr(this.heightMap.lineAt(e,He.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Cr(this.heightMap.lineAt(this.scaler.fromDOM(e),He.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Cr(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ul{constructor(e,n){this.from=e,this.to=n}}function lA(t,e,n){let i=[],o=t,r=0;return Xe.spans(n,t,e,{span(){},point(s,l){s>o&&(i.push({from:o,to:s}),r+=s-o),o=l}},20),o=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let o=0;;o++){let{from:r,to:s}=e[o],l=s-r;if(i<=l)return r+i;i-=l}}function hl(t,e){let n=0;for(let{from:i,to:o}of t.ranges){if(e<=o){n+=e-i;break}n+=o-i}return n/t.total}function aA(t,e){for(let n of t)if(e(n))return n}const Dm={toDOM(t){return t},fromDOM(t){return t},scale:1};class uA{constructor(e,n,i){let o=0,r=0,s=0;this.viewports=i.map(({from:l,to:a})=>{let u=n.lineAt(l,He.ByPos,e,0,0).top,c=n.lineAt(a,He.ByPos,e,0,0).bottom;return o+=c-u,{from:l,to:a,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(n.height-o);for(let l of this.viewports)l.domTop=s+(l.top-r)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let n=0,i=0,o=0;;n++){let r=nCr(o,e)):t._content)}const dl=we.define({combine:t=>t.join(" ")}),Mh=we.define({combine:t=>t.indexOf(!0)>-1}),Ah=Di.newName(),lO=Di.newName(),aO=Di.newName(),uO={"&light":"."+lO,"&dark":"."+aO};function Dh(t,e,n){return new Di(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,o=>{if(o=="&")return t;if(!n||!n[o])throw new RangeError(`Unsupported selector: ${o}`);return n[o]}):t+" "+i}})}const cA=Dh("."+Ah,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uO);class hA{constructor(e,n,i,o){this.typeOver=o,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let l=r||s?[]:pA(e),a=new Sy(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=mA(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!gh(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!gh(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=Z.single(u,a)}}}function cO(t,e){let n,{newSel:i}=e,o=t.state.selection.main,r=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=o.from,u=null;(r===8||_e.android&&e.text.length=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,o.to))}:(_e.mac||_e.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=Z.single(i.main.anchor-1,i.main.head-1)),n={from:o.from,to:o.to,insert:Be.of([" "])}):_e.chrome&&n&&n.from==n.to&&n.from==o.head&&n.insert.toString()==` - `&&t.lineWrapping&&(i&&(i=Z.single(i.main.anchor-1,i.main.head-1)),n={from:o.from,to:o.to,insert:Be.of([" "])}),n){if(_e.ios&&t.inputState.flushIOSKey(t)||_e.android&&(n.from==o.from&&n.to==o.to&&n.insert.length==1&&n.insert.lines==2&&Lo(t.contentDOM,"Enter",13)||(n.from==o.from-1&&n.to==o.to&&n.insert.length==0||r==8&&n.insert.lengtho.head)&&Lo(t.contentDOM,"Backspace",8)||n.from==o.from&&n.to==o.to+1&&n.insert.length==0&&Lo(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l,a=()=>l||(l=dA(t,n,i));return t.state.facet(qy).some(u=>u(t,n.from,n.to,s,a))||t.dispatch(a()),!0}else if(i&&!i.main.eq(o)){let s=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),l=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:s,userEvent:l}),!0}else return!1}function dA(t,e,n){let i,o=t.state,r=o.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=r.frome.to?o.sliceDoc(e.to,r.to):"";i=o.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let l=o.changes(e),a=n&&n.main.to<=l.newLength?n.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let u=t.state.sliceDoc(e.from,e.to),c=Fy(t,e.insert.length-(e.to-e.from))||t.state.doc.lineAt(r.head),h=r.to-e.to,d=r.to-r.from;i=o.changeByRange(f=>{if(f.from==r.from&&f.to==r.to)return{changes:l,range:a||f.map(l)};let p=f.to-h,g=p-u.length;if(f.to-f.from!=d||t.state.sliceDoc(g,p)!=u||c&&f.to>=c.from&&f.from<=c.to)return{range:f};let w=o.changes({from:g,to:p,insert:e.insert}),y=f.to-r.to;return{changes:w,range:a?Z.range(Math.max(0,a.anchor+y),Math.max(0,a.head+y)):f.map(w)}})}else i={changes:l,selection:a&&o.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),o.update(i,{userEvent:s,scrollIntoView:!0})}function fA(t,e,n,i){let o=Math.min(t.length,e.length),r=0;for(;r0&&l>0&&t.charCodeAt(s-1)==e.charCodeAt(l-1);)s--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(s,l));n-=s+a-r}if(s=s?r-n:0;r-=a,l=r+(l-s),s=r}else if(l=l?r-n:0;r-=a,s=r+(s-l),l=r}return{from:r,toA:s,toB:l}}function pA(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:r}=t.observer.selectionRange;return n&&(e.push(new sm(n,i)),(o!=n||r!=i)&&e.push(new sm(o,r))),e}function mA(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?Z.single(n+e,i+e):null}const gA={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},lc=_e.ie&&_e.ie_version<=11;class vA{constructor(e){this.view=e,this.active=!1,this.selectionRange=new rM,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(_e.ie&&_e.ie_version<=11||_e.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),lc&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,o=this.selectionRange;if(i.state.facet(_u)?i.root.activeElement!=this.dom:!Xl(i.dom,o))return;let r=o.anchorNode&&i.docView.nearest(o.anchorNode);if(r&&r.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(_e.ie&&_e.ie_version<=11||_e.android&&_e.chrome)&&!i.state.selection.main.empty&&o.focusNode&&$a(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=_e.safari&&e.root.nodeType==11&&tM(this.dom.ownerDocument)==this.dom&&yA(this.view)||Ca(e.root);if(!n||this.selectionRange.eq(n))return!1;let i=Xl(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Lo(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,o=!1;for(let r of e){let s=this.readMutation(r);s&&(s.typeOver&&(o=!0),n==-1?{from:n,to:i}=s:(n=Math.min(s.from,n),i=Math.max(s.to,i)))}return{from:n,to:i,typeOver:o}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),o=this.selectionChanged&&Xl(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new hA(this.view,e,n,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return!1;let i=this.view.state,o=cO(this.view,n);return this.view.state==i&&this.view.update([]),o}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=Rm(n,e.previousSibling||e.target.previousSibling,-1),o=Rm(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:o?n.posBefore(o):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i,o;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(o=this.resizeContent)===null||o===void 0||o.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Rm(t,e,n){for(;e;){let i=Fe.get(e);if(i&&i.parent==t)return i;let o=e.parentNode;e=o!=t.dom?o:n>0?e.nextSibling:e.previousSibling}return null}function yA(t){let e=null;function n(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let i=e.startContainer,o=e.startOffset,r=e.endContainer,s=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return $a(l.node,l.offset,r,s)&&([i,o,r,s]=[r,s,i,o]),{anchorNode:i,anchorOffset:o,focusNode:r,focusOffset:s}}class ve{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(o=>n(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||sM(e.parent)||document,this.viewState=new Am(e.state||qe.create(e)),this.plugins=this.state.facet(Tr).map(i=>new ic(i));for(let i of this.plugins)i.update(this);this.observer=new vA(this),this.inputState=new NM(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new pm(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof gt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,o,r=this.state;for(let d of e){if(d.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=d.state}if(this.destroyed){this.viewState.state=r;return}let s=this.hasFocus,l=0,a=null;e.some(d=>d.annotation(iO))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=oO(r,s),a||(l=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(r);o=Aa.create(this,r,e),o.flags|=l;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(h&&(h=h.map(d.changes)),d.scrollIntoView){let{main:f}=d.state.selection;h=new Ma(f.empty?f:Z.cursor(f.head,f.head>f.anchor?-1:1))}for(let f of d.effects)f.is(dm)&&(h=f.value)}this.viewState.update(o,h),this.bidiCache=Da.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),n=this.docView.update(o),this.state.facet(Pr)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(dl)!=o.state.facet(dl)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!o.empty)for(let d of this.state.facet(xh))d(o);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!cO(this,c)&&u.force&&Lo(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Am(e),this.plugins=e.facet(Tr).map(i=>new ic(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new pm(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Tr),i=e.state.facet(Tr);if(n!=i){let o=[];for(let r of i){let s=n.indexOf(r);if(s<0)o.push(new ic(r));else{let l=this.plugins[s];l.mustUpdate=e,o.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,{scrollTop:o}=i,{scrollAnchorPos:r,scrollAnchorHeight:s}=this.viewState;o!=this.viewState.scrollTop&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(wy(i))r=-1,s=this.viewState.heightMap.height;else{let f=this.viewState.scrollAnchorAt(o);r=f.from,s=f.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];a&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(f=>{try{return f.read(this)}catch(p){return an(this.state,p),qm}}),h=Aa.create(this,this.state,[]),d=!1;h.flags|=a,n?n.flags|=a:n=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),d=this.docView.update(h));for(let f=0;f1||p<-1){o=i.scrollTop=o+p,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(xh))l(n)}get themeClasses(){return Ah+" "+(this.state.facet(Mh)?aO:lO)+" "+this.state.facet(dl)}updateAttrs(){let e=Qm(this,Vy,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(_u)?"true":"false",class:"cm-content",style:`${_e.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Qm(this,Fd,n);let i=this.observer.ignore(()=>{let o=_h(this.contentDOM,this.contentAttrs,n),r=_h(this.dom,this.editorAttrs,e);return o||r});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let o of i.effects)if(o.is(ve.announce)){n&&(this.announceDOM.textContent=""),n=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Pr);let e=this.state.facet(ve.cspNonce);Di.mount(this.root,this.styleModules.concat(cA).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return rc(this,e,wm(this,e,n,i))}moveByGroup(e,n){return rc(this,e,wm(this,e,n,i=>qM(this,e.head,i)))}moveToLineBoundary(e,n,i=!0){return RM(this,e,n,i)}moveVertically(e,n,i){return rc(this,e,QM(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),Gy(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let o=this.state.doc.lineAt(e),r=this.bidiSpans(o),s=r[Ti.find(r,e-o.from,-1,n)];return Ou(i,s.dir==tt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Ny)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>OA)return Yy(e.length);let n=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||Uy(r.isolates,i=fm(this,e.from,e.to))))return r.order;i||(i=fm(this,e.from,e.to));let o=_M(e.text,n,i);return this.bidiCache.push(new Da(e.from,e.to,n,i,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||_e.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{yy(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return dm.of(new Ma(typeof e=="number"?Z.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return ht.define(()=>({}),{eventHandlers:e})}static theme(e,n){let i=Di.newName(),o=[dl.of(i),Pr.of(Dh(`.${i}`,e))];return n&&n.dark&&o.push(Mh.of(!0)),o}static baseTheme(e){return go.lowest(Pr.of(Dh("."+Ah,e,uO)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),o=i&&Fe.get(i)||Fe.get(e);return((n=o==null?void 0:o.rootView)===null||n===void 0?void 0:n.view)||null}}ve.styleModule=Pr;ve.inputHandler=qy;ve.focusChangeEffect=Qy;ve.perLineTextDirection=Ny;ve.exceptionSink=Ry;ve.updateListener=xh;ve.editable=_u;ve.mouseSelectionStyle=Dy;ve.dragMovesSelection=Ay;ve.clickAddsSelectionRange=My;ve.decorations=ss;ve.atomicRanges=Hd;ve.bidiIsolatedRanges=By;ve.scrollMargins=Wy;ve.darkTheme=Mh;ve.cspNonce=we.define({combine:t=>t.length?t[0]:""});ve.contentAttributes=Fd;ve.editorAttributes=Vy;ve.lineWrapping=ve.contentAttributes.of({class:"cm-lineWrapping"});ve.announce=Pe.define();const OA=4096,qm={};class Da{constructor(e,n,i,o,r,s){this.from=e,this.to=n,this.dir=i,this.isolates=o,this.fresh=r,this.order=s}static update(e,n){if(n.empty&&!e.some(r=>r.fresh))return e;let i=[],o=e.length?e[e.length-1].dir:tt.LTR;for(let r=Math.max(0,e.length-10);r=0;o--){let r=i[o],s=typeof r=="function"?r(t):r;s&&wh(s,n)}return n}const wA=_e.mac?"mac":_e.windows?"win":_e.linux?"linux":"key";function _A(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let o,r,s,l;for(let a=0;ai.concat(o),[]))),n}function xA(t,e,n){return dO(hO(t.state),e,t,n)}let wi=null;const SA=4e3;function kA(t,e=wA){let n=Object.create(null),i=Object.create(null),o=(s,l)=>{let a=i[s];if(a==null)i[s]=l;else if(a!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},r=(s,l,a,u,c)=>{var h,d;let f=n[s]||(n[s]=Object.create(null)),p=l.split(/ (?!$)/).map(y=>_A(y,e));for(let y=1;y{let b=wi={view:T,prefix:_,scope:s};return setTimeout(()=>{wi==b&&(wi=null)},SA),!0}]})}let g=p.join(" ");o(g,!1);let w=f[g]||(f[g]={preventDefault:!1,stopPropagation:!1,run:((d=(h=f._any)===null||h===void 0?void 0:h.run)===null||d===void 0?void 0:d.slice())||[]});a&&w.run.push(a),u&&(w.preventDefault=!0),c&&(w.stopPropagation=!0)};for(let s of t){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of l){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let h in c)c[h].run.push(s.any)}let a=s[e]||s.key;if(a)for(let u of l)r(u,a,s.run,s.preventDefault,s.stopPropagation),s.shift&&r(u,"Shift-"+a,s.shift,s.preventDefault,s.stopPropagation)}return n}function dO(t,e,n,i){let o=eM(e),r=St(o,0),s=sn(r)==o.length&&o!=" ",l="",a=!1,u=!1,c=!1;wi&&wi.view==n&&wi.scope==i&&(l=wi.prefix+" ",Ky.indexOf(e.keyCode)<0&&(u=!0,wi=null));let h=new Set,d=w=>{if(w){for(let y of w.run)if(!h.has(y)&&(h.add(y),y(n,e)))return w.stopPropagation&&(c=!0),!0;w.preventDefault&&(w.stopPropagation&&(c=!0),u=!0)}return!1},f=t[i],p,g;return f&&(d(f[l+fl(o,e,!s)])?a=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(_e.windows&&e.ctrlKey&&e.altKey)&&(p=Ri[e.keyCode])&&p!=o?(d(f[l+fl(p,e,!0)])||e.shiftKey&&(g=rs[e.keyCode])!=o&&g!=p&&d(f[l+fl(g,e,!1)]))&&(a=!0):s&&e.shiftKey&&d(f[l+fl(o,e,!0)])&&(a=!0),!a&&d(f._any)&&(a=!0)),u&&(a=!0),a&&c&&e.stopPropagation(),a}class As{constructor(e,n,i,o,r){this.className=e,this.left=n,this.top=i,this.width=o,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let o=e.coordsAtPos(i.head,i.assoc||1);if(!o)return[];let r=fO(e);return[new As(n,o.left-r.left,o.top-r.top,null,o.bottom-o.top)]}else return TA(e,n,i)}}function fO(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==tt.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Im(t,e,n){let i=Z.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:nt.Text}}function TA(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),o=Math.min(n.to,t.viewport.to),r=t.textDirection==tt.LTR,s=t.contentDOM,l=s.getBoundingClientRect(),a=fO(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),d=l.right-(c?parseInt(c.paddingRight):0),f=Ch(t,i),p=Ch(t,o),g=f.type==nt.Text?f:null,w=p.type==nt.Text?p:null;if(g&&(t.lineWrapping||f.widgetLineBreaks)&&(g=Im(t,i,g)),w&&(t.lineWrapping||p.widgetLineBreaks)&&(w=Im(t,o,w)),g&&w&&g.from==w.from)return _(T(n.from,n.to,g));{let k=g?T(n.from,null,g):b(f,!1),x=w?T(null,n.to,w):b(p,!0),$=[];return(g||f).to<(w||p).from-(g&&w?1:0)||f.widgetLineBreaks>1&&k.bottom+t.defaultLineHeight/2j&&S.from=P)break;N>A&&z(Math.max(q,A),k==null&&q<=j,Math.min(N,P),x==null&&N>=J,B.dir)}if(A=E.to+1,A>=P)break}return R.length==0&&z(j,k==null,J,x==null,t.textDirection),{top:L,bottom:V,horizontal:R}}function b(k,x){let $=l.top+(x?k.top:k.bottom);return{top:$,bottom:$,horizontal:[]}}}function PA(t,e){return t.constructor==e.constructor&&t.eq(e)}class CA{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(jl)!=e.state.facet(jl)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(jl);for(;n!PA(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let o of e)o.update&&n&&o.constructor&&this.drawn[i].constructor&&o.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(o.draw(),n);for(;n;){let o=n.nextSibling;n.remove(),n=o}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const jl=we.define();function pO(t){return[ht.define(e=>new CA(e,t)),jl.of(t)]}const mO=!_e.ios,as=we.define({combine(t){return zn(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function $A(t={}){return[as.of(t),EA,MA,AA,Iy.of(!0)]}function gO(t){return t.startState.facet(as)!=t.state.facet(as)}const EA=pO({above:!0,markers(t){let{state:e}=t,n=e.facet(as),i=[];for(let o of e.selection.ranges){let r=o==e.selection.main;if(o.empty?!r||mO:n.drawRangeCursor){let s=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=o.empty?o:Z.cursor(o.head,o.head>o.anchor?-1:1);for(let a of As.forRange(t,s,l))i.push(a)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=gO(t);return n&&Vm(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Vm(e.state,t)},class:"cm-cursorLayer"});function Vm(t,e){e.style.animationDuration=t.facet(as).cursorBlinkRate+"ms"}const MA=pO({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:As.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||gO(t)},class:"cm-selectionLayer"}),vO={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};mO&&(vO[".cm-line"].caretColor="transparent !important");const AA=go.highest(ve.theme(vO)),yO=Pe.define({map(t,e){return t==null?null:e.mapPos(t)}}),$r=wt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(yO)?i.value:n,t)}}),DA=ht.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field($r);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field($r)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field($r),e=t!=null&&this.view.coordsAtPos(t);if(!e)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-n.left+this.view.scrollDOM.scrollLeft,top:e.top-n.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field($r)!=t&&this.view.dispatch({effects:yO.of(t)})}},{eventHandlers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function RA(){return[$r,DA]}function Bm(t,e,n,i,o){e.lastIndex=0;for(let r=t.iterRange(n,i),s=n,l;!r.next().done;s+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)o(s+l.index,l)}function qA(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:o,to:r}of n)o=Math.max(t.state.doc.lineAt(o).from,o-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=o?i[i.length-1].to=r:i.push({from:o,to:r});return i}class QA{constructor(e){const{regexp:n,decoration:i,decorate:o,boundary:r,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,o)this.addMatch=(l,a,u,c)=>o(c,u,u+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,u,c)=>{let h=i(l,a,u);h&&c(u,u+l[0].length,h)};else if(i)this.addMatch=(l,a,u,c)=>c(u,u+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=s}createDeco(e){let n=new Ai,i=n.add.bind(n);for(let{from:o,to:r}of qA(e,this.maxLength))Bm(e.state.doc,this.regexp,o,r,(s,l)=>this.addMatch(l,e,s,i));return n.finish()}updateDeco(e,n){let i=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((r,s,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,n.map(e.changes),i,o):n}updateRange(e,n,i,o){for(let r of e.visibleRanges){let s=Math.max(r.from,i),l=Math.min(r.to,o);if(l>s){let a=e.state.doc.lineAt(s),u=a.toa.from;s--)if(this.boundary.test(a.text[s-1-a.from])){c=s;break}for(;ld.push(y.range(g,w));if(a==u)for(this.regexp.lastIndex=c-a.from;(f=this.regexp.exec(a.text))&&f.indexthis.addMatch(w,e,g,p));n=n.update({filterFrom:c,filterTo:h,filter:(g,w)=>gh,add:d})}}return n}}const Rh=/x/.unicode!=null?"gu":"g",NA=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Rh),IA={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ac=null;function VA(){var t;if(ac==null&&typeof document<"u"&&document.body){let e=document.body.style;ac=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return ac||!1}const Fl=we.define({combine(t){let e=zn(t,{render:null,specialChars:NA,addSpecialChars:null});return(e.replaceTabs=!VA())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Rh)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Rh)),e}});function BA(t={}){return[Fl.of(t),WA()]}let Wm=null;function WA(){return Wm||(Wm=ht.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Fl)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new QA({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:o}=n.state,r=St(e[0],0);if(r==9){let s=o.lineAt(i),l=n.state.tabSize,a=ar(s.text,l,i-s.from);return xe.replace({widget:new UA((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=xe.replace({widget:new XA(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Fl);t.startState.facet(Fl)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const LA="•";function zA(t){return t>=32?LA:t==10?"␤":String.fromCharCode(9216+t)}class XA extends Xn{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=zA(this.code),i=e.state.phrase("Control character")+" "+(IA[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,i,n);if(o)return o;let r=document.createElement("span");return r.textContent=n,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class UA extends Xn{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function YA(){return FA}const jA=xe.line({class:"cm-activeLine"}),FA=ht.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let o=t.lineBlockAt(i.head);o.from>e&&(n.push(jA.range(o.from)),e=o.from)}return xe.set(n)}},{decorations:t=>t.decorations});class HA extends Xn{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?Jo(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),o=Ou(n[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return o.bottom-o.top>r*1.5?{left:o.left,right:o.right,top:o.top,bottom:o.top+r}:o}ignoreEvent(){return!1}}function GA(t){return ht.fromClass(class{constructor(e){this.view=e,this.placeholder=t?xe.set([xe.widget({widget:new HA(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:e=>e.decorations})}const qh=2e3;function ZA(t,e,n){let i=Math.min(e.line,n.line),o=Math.max(e.line,n.line),r=[];if(e.off>qh||n.off>qh||e.col<0||n.col<0){let s=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=i;a<=o;a++){let u=t.doc.line(a);u.length<=l&&r.push(Z.range(u.from+s,u.to+l))}}else{let s=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=i;a<=o;a++){let u=t.doc.line(a),c=fh(u.text,s,t.tabSize,!0);if(c<0)r.push(Z.cursor(u.to));else{let h=fh(u.text,l,t.tabSize);r.push(Z.range(u.from+c,u.from+h))}}}return r}function KA(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Lm(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),o=n-i.from,r=o>qh?-1:o==i.length?KA(t,e.clientX):ar(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:r,off:o}}function JA(t,e){let n=Lm(t,e),i=t.state.selection;return n?{update(o){if(o.docChanged){let r=o.changes.mapPos(o.startState.doc.line(n.line).from),s=o.state.doc.lineAt(r);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},i=i.map(o.changes)}},get(o,r,s){let l=Lm(t,o);if(!l)return i;let a=ZA(t.state,n,l);return a.length?s?Z.create(a.concat(i.ranges)):Z.create(a):i}}:null}function eD(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return ve.mouseSelectionStyle.of((n,i)=>e(i)?JA(n,i):null)}const tD={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},nD={style:"cursor: crosshair"};function iD(t={}){let[e,n]=tD[t.key||"Alt"],i=ht.fromClass(class{constructor(o){this.view=o,this.isDown=!1}set(o){this.isDown!=o&&(this.isDown=o,this.view.update([]))}},{eventHandlers:{keydown(o){this.set(o.keyCode==e||n(o))},keyup(o){(o.keyCode==e||!n(o))&&this.set(!1)},mousemove(o){this.set(n(o))}}});return[i,ve.contentAttributes.of(o=>{var r;return!((r=o.plugin(i))===null||r===void 0)&&r.isDown?nD:null})]}const pl="-10000px";class OO{constructor(e,n,i){this.facet=n,this.createTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o),this.tooltipViews=this.tooltips.map(i)}update(e){var n;let i=e.state.facet(this.facet),o=i.filter(s=>s);if(i===this.input){for(let s of this.tooltipViews)s.update&&s.update(e);return!1}let r=[];for(let s=0;s{var e,n,i;return{position:_e.ios?"absolute":((e=t.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(o=>o.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(o=>o.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||oD}}}),zm=new WeakMap,wO=ht.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(uc);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new OO(t,Zd,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(uc);if(i.position!=this.position){this.position=i.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=pl,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((e,n)=>{let i=this.manager.tooltipViews[n];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(uc).tooltipSpace(this.view)}}writeMeasure(t){var e;let{editor:n,space:i}=t,o=[];for(let r=0;r=Math.min(n.bottom,i.bottom)||u.rightMath.min(n.right,i.right)+.1){a.style.top=pl;continue}let h=s.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,d=h?7:0,f=c.right-c.left,p=(e=zm.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||sD,w=this.view.textDirection==tt.LTR,y=c.width>i.right-i.left?w?i.left:i.right-c.width:w?Math.min(u.left-(h?14:0)+g.x,i.right-f):Math.max(i.left,u.left-f+(h?14:0)-g.x),_=!!s.above;!s.strictSide&&(_?u.top-(c.bottom-c.top)-g.yi.bottom)&&_==i.bottom-u.bottom>u.top-i.top&&(_=!_);let T=(_?u.top-i.top:i.bottom-u.bottom)-d;if(Ty&&x.topb&&(b=_?x.top-p-2-d:x.bottom+d+2);this.position=="absolute"?(a.style.top=b-t.parent.top+"px",a.style.left=y-t.parent.left+"px"):(a.style.top=b+"px",a.style.left=y+"px"),h&&(h.style.left=`${u.left+(w?g.x:-g.x)-(y+14-7)}px`),l.overlap!==!0&&o.push({left:y,top:b,right:k,bottom:b+p}),a.classList.toggle("cm-tooltip-above",_),a.classList.toggle("cm-tooltip-below",!_),l.positioned&&l.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=pl}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),rD=ve.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),sD={x:0,y:0},Zd=we.define({enables:[wO,rD]}),Ra=we.define();class Kd{static create(e){return new Kd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new OO(e,Ra,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}}const lD=Zd.compute([Ra],t=>{let e=t.facet(Ra).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:Kd.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class aD{constructor(e,n,i,o,r){this.view=e,this.source=n,this.field=i,this.setHover=o,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;el.bottom||n.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(o)).find(c=>c.from<=o&&c.to>=o),u=a&&a.dir==tt.RTL?-1:1;r=n.x{this.pending==l&&(this.pending=null,a&&e.dispatch({effects:this.setHover.of(a)}))},a=>an(e.state,a,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!Xm(this.lastMove.target)||this.pending){let{pos:o}=i||this.pending,r=(n=i==null?void 0:i.end)!==null&&n!==void 0?n:o;(o==r?this.view.posAtCoords(this.lastMove)!=o:!uD(this.view,o,r,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!Xm(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Xm(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function uD(t,e,n,i,o,r){let s=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>i||s.righto||Math.min(s.bottom,l)=e&&a<=n}function cD(t,e={}){let n=Pe.define(),i=wt.define({create(){return null},update(o,r){if(o&&(e.hideOnChange&&(r.docChanged||r.selection)||e.hideOn&&e.hideOn(r,o)))return null;if(o&&r.docChanged){let s=r.changes.mapPos(o.pos,-1,Tt.TrackDel);if(s==null)return null;let l=Object.assign(Object.create(null),o);l.pos=s,o.end!=null&&(l.end=r.changes.mapPos(o.end)),o=l}for(let s of r.effects)s.is(n)&&(o=s.value),s.is(hD)&&(o=null);return o},provide:o=>Ra.from(o)});return[i,ht.define(o=>new aD(o,t,i,n,e.hoverTime||300)),lD]}function _O(t,e){let n=t.plugin(wO);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const hD=Pe.define(),Um=we.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function us(t,e){let n=t.plugin(bO),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const bO=ht.fromClass(class{constructor(t){this.input=t.state.facet(cs),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Um);this.top=new ml(t,!0,e.topContainer),this.bottom=new ml(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Um);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ml(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ml(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(cs);if(n!=this.input){let i=n.filter(a=>a),o=[],r=[],s=[],l=[];for(let a of i){let u=this.specs.indexOf(a),c;u<0?(c=a(t.view),l.push(c)):(c=this.panels[u],c.update&&c.update(t)),o.push(c),(c.top?r:s).push(c)}this.specs=i,this.panels=o,this.top.sync(r),this.bottom.sync(s);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ve.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class ml{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Ym(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Ym(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Ym(t){let e=t.nextSibling;return t.remove(),e}const cs=we.define({enables:bO});class ai extends ao{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ai.prototype.elementClass="";ai.prototype.toDOM=void 0;ai.prototype.mapMode=Tt.TrackBefore;ai.prototype.startSide=ai.prototype.endSide=-1;ai.prototype.point=!0;const Hl=we.define(),dD={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Xe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Lr=we.define();function fD(t){return[xO(),Lr.of(Object.assign(Object.assign({},dD),t))]}const Qh=we.define({combine:t=>t.some(e=>e)});function xO(t){let e=[pD];return t&&t.fixed===!1&&e.push(Qh.of(!0)),e}const pD=ht.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(Lr).map(e=>new Fm(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Qh),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Qh)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Xe.iter(this.view.state.facet(Hl),this.view.viewport.from),i=[],o=this.gutters.map(r=>new mD(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let s=!0;for(let l of r.type)if(l.type==nt.Text&&s){Nh(n,i,l.from);for(let a of o)a.line(this.view,l,i);s=!1}else if(l.widget)for(let a of o)a.widget(this.view,l)}else if(r.type==nt.Text){Nh(n,i,r.from);for(let s of o)s.line(this.view,r,i)}for(let r of o)r.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Lr),n=t.state.facet(Lr),i=t.docChanged||t.heightChanged||t.viewportChanged||!Xe.eq(t.startState.facet(Hl),t.state.facet(Hl),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let o of this.gutters)o.update(t)&&(i=!0);else{i=!0;let o=[];for(let r of n){let s=e.indexOf(r);s<0?o.push(new Fm(this.view,r)):(this.gutters[s].update(t),o.push(this.gutters[s]))}for(let r of this.gutters)r.dom.remove(),o.indexOf(r)<0&&r.destroy();for(let r of o)this.dom.appendChild(r.dom);this.gutters=o}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>ve.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==tt.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function jm(t){return Array.isArray(t)?t:[t]}function Nh(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class mD{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Xe.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:o}=this,r=n.top-this.height;if(this.i==o.elements.length){let s=new SO(e,n.height,r,i);o.elements.push(s),o.dom.appendChild(s.dom)}else o.elements[this.i].update(e,n.height,r,i);this.height=n.bottom,this.i++}line(e,n,i){let o=[];Nh(this.cursor,o,n.from),i.length&&(o=o.concat(i));let r=this.gutter.config.lineMarker(e,n,o);r&&o.unshift(r);let s=this.gutter;o.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,o)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Fm{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,o=>{let r=o.target,s;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();s=(a.top+a.bottom)/2}else s=o.clientY;let l=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[i](e,l,o)&&o.preventDefault()});this.markers=jm(n.markers(e)),n.initialSpacer&&(this.spacer=new SO(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=jm(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let i=e.view.viewport;return!Xe.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class SO{constructor(e,n,i,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,o)}update(e,n,i,o){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),gD(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,n){let i="cm-gutterElement",o=this.dom.firstChild;for(let r=0,s=0;;){let l=s,a=rr(l,a,u)||s(l,a,u):s}return i}})}});class cc extends ai{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function hc(t,e){return t.state.facet(Eo).formatNumber(e,t.state)}const yD=Lr.compute([Eo],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(vD)},lineMarker(e,n,i){return i.some(o=>o.toDOM)?null:new cc(hc(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Eo)!=e.state.facet(Eo),initialSpacer(e){return new cc(hc(e,Hm(e.state.doc.lines)))},updateSpacer(e,n){let i=hc(n.view,Hm(n.view.state.doc.lines));return i==e.number?e:new cc(i)},domEventHandlers:t.facet(Eo).domEventHandlers}));function OD(t={}){return[Eo.of(t),xO(),yD]}function Hm(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let o=t.doc.lineAt(i.head).from;o>n&&(n=o,e.push(wD.range(o)))}return Xe.of(e)});function bD(){return _D}var dc;const Mo=new De;function xD(t){return we.define({combine:t?e=>e.concat(t):void 0})}const SD=new De;class vn{constructor(e,n,i=[],o=""){this.data=e,this.name=o,qe.prototype.hasOwnProperty("tree")||Object.defineProperty(qe.prototype,"tree",{get(){return Ot(this)}}),this.parser=n,this.extension=[Ni.of(this),qe.languageData.of((r,s,l)=>{let a=Gm(r,s,l),u=a.type.prop(Mo);if(!u)return[];let c=r.facet(u),h=a.type.prop(SD);if(h){let d=a.resolve(s-a.from,l);for(let f of h)if(f.test(d,r)){let p=r.facet(f.facet);return f.type=="replace"?p:p.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return Gm(e,n,i).type.prop(Mo)==this.data}findRegions(e){let n=e.facet(Ni);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],o=(r,s)=>{if(r.prop(Mo)==this.data){i.push({from:s,to:s+r.length});return}let l=r.prop(De.mounted);if(l){if(l.tree.prop(Mo)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+s,to:a.to+s});else i.push({from:s,to:s+r.length});return}else if(l.overlay){let a=i.length;if(o(l.tree,l.overlay[0].from+s),i.length>a)return}}for(let a=0;ai.isTop?n:void 0)]}),e.name)}configure(e,n){return new hs(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ot(t){let e=t.field(vn.state,!1);return e?e.tree:ut.empty}class kD{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Or=null;class qa{constructor(e,n,i=[],o,r,s,l,a){this.parser=e,this.state=n,this.fragments=i,this.tree=o,this.treeLen=r,this.viewport=s,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new qa(e,n,[],ut.empty,0,i,[],null)}startParse(){return this.parser.startParse(new kD(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ut.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(no.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Or;Or=this;try{return e()}finally{Or=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Zm(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:o,treeLen:r,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((u,c,h,d)=>a.push({fromA:u,toA:c,fromB:h,toB:d})),i=no.applyChanges(i,a),o=ut.empty,r=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),h=e.mapPos(u.to,-1);ce.from&&(this.fragments=Zm(this.fragments,o,r),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Z0{createParse(n,i,o){let r=o[0].from,s=o[o.length-1].to;return{parsedPos:r,advance(){let a=Or;if(a){for(let u of o)a.tempSkipped.push(u);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=s,new ut(Xt.none,[],[],s-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Or}}function Zm(t,e,n){return no.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class tr{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new tr(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=qa.create(e.facet(Ni).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new tr(i)}}vn.state=wt.define({create:tr.init,update(t,e){for(let n of e.effects)if(n.is(vn.setState))return n.value;return e.startState.facet(Ni)!=e.state.facet(Ni)?tr.init(e.state):t.apply(e)}});let kO=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(kO=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const fc=typeof navigator<"u"&&(!((dc=navigator.scheduling)===null||dc===void 0)&&dc.isInputPending)?()=>navigator.scheduling.isInputPending():null,TD=ht.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(vn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(vn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=kO(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndo+1e3,a=r.context.work(()=>fc&&fc()||Date.now()>s,o+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:vn.setState.of(new tr(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>an(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ni=we.define({combine(t){return t.length?t[0]:null},enables:t=>[vn.state,TD,ve.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class TO{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const PD=we.define(),Ds=we.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Qa(t){let e=t.facet(Ds);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function ds(t,e){let n="",i=t.tabSize,o=t.facet(Ds)[0];if(o==" "){for(;e>=i;)n+=" ",e-=i;o=" "}for(let r=0;r=e?CD(t,n,e):null}class bu{constructor(e,n={}){this.state=e,this.options=n,this.unit=Qa(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:r}=this.options;return o!=null&&o>=i.from&&o<=i.to?r&&o==e?{text:"",from:e}:(n<0?o-1&&(r+=s-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,n=e.length){return ar(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:o}=this.lineAt(e,n),r=this.options.overrideIndentation;if(r){let s=r(o);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ef=new De;function CD(t,e,n){return PO(e.resolveInner(n).enterUnfinishedNodesBefore(n),n,t)}function $D(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function ED(t){let e=t.type.prop(ef);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(De.closedBy))){let o=t.lastChild,r=o&&i.indexOf(o.name)>-1;return s=>CO(s,!0,1,void 0,r&&!$D(s)?o.from:void 0)}return t.parent==null?MD:null}function PO(t,e,n){for(;t;t=t.parent){let i=ED(t);if(i)return i(tf.create(n,e,t))}return null}function MD(){return 0}class tf extends bu{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.node=i}static create(e,n,i){return new tf(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(AD(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){let e=this.node.parent;return e?PO(e,this.pos,this.base):0}}function AD(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function DD(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let o=t.options.simulateBreak,r=t.state.doc.lineAt(n.from),s=o==null||o<=r.from?r.to:Math.min(r.to,o);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.fromCO(i,e,n,t)}function CO(t,e,n,i,o){let r=t.textAfter,s=r.match(/^\s*/)[0].length,l=i&&r.slice(s,s+i.length)==i||o==t.pos+s,a=e?DD(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}function Km({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const RD=200;function qD(){return qe.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,o=n.lineAt(i);if(i>o.from+RD)return t;let r=n.sliceString(o.from,i);if(!e.some(u=>u.test(r)))return t;let{state:s}=t,l=-1,a=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==l)continue;l=c.from;let h=Jd(s,c.from);if(h==null)continue;let d=/^\s*/.exec(c.text)[0],f=ds(s,h);d!=f&&a.push({from:c.from,to:c.from+d.length,insert:f})}return a.length?[t,{changes:a,sequential:!0}]:t})}const QD=we.define(),nf=new De;function $O(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(r&&s.from=e&&a.to>n&&(r=a)}}return r}function ID(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Na(t,e,n){for(let i of t.facet(QD)){let o=i(t,e,n);if(o)return o}return ND(t,e,n)}function EO(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const xu=Pe.define({map:EO}),Rs=Pe.define({map:EO});function MO(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const co=wt.define({create(){return xe.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(xu)&&!VD(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(of),o=i?xe.replace({widget:new YD(i(e.state,n.value))}):Jm;t=t.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(Rs)&&(t=t.update({filter:(i,o)=>n.value.from!=i||n.value.to!=o,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(o,r)=>{oi&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(o,r)=>r<=i||o>=i}))}return t},provide:t=>ve.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,o)=>{n.push(i,o)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!o||o.from>r)&&(o={from:r,to:s})}),o}function VD(t,e,n){let i=!1;return t.between(e,e,(o,r)=>{o==e&&r==n&&(i=!0)}),i}function AO(t,e){return t.field(co,!1)?e:e.concat(Pe.appendConfig.of(RO()))}const BD=t=>{for(let e of MO(t)){let n=Na(t.state,e.from,e.to);if(n)return t.dispatch({effects:AO(t.state,[xu.of(n),DO(t,n)])}),!0}return!1},WD=t=>{if(!t.state.field(co,!1))return!1;let e=[];for(let n of MO(t)){let i=Ia(t.state,n.from,n.to);i&&e.push(Rs.of(i),DO(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function DO(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,o=t.state.doc.lineAt(e.to).number;return ve.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${o}.`)}const LD=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(co,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,o)=>{n.push(Rs.of({from:i,to:o}))}),t.dispatch({effects:n}),!0},XD=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:BD},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:WD},{key:"Ctrl-Alt-[",run:LD},{key:"Ctrl-Alt-]",run:zD}],UD={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},of=we.define({combine(t){return zn(t,UD)}});function RO(t){let e=[co,HD];return t&&e.push(of.of(t)),e}function qO(t,e){let{state:n}=t,i=n.facet(of),o=s=>{let l=t.lineBlockAt(t.posAtDOM(s.target)),a=Ia(t.state,l.from,l.to);a&&t.dispatch({effects:Rs.of(a)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,o,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=o,r}const Jm=xe.replace({widget:new class extends Xn{toDOM(t){return qO(t,null)}}});class YD extends Xn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return qO(e,this.value)}}const jD={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class mc extends ai{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function FD(t={}){let e=Object.assign(Object.assign({},jD),t),n=new mc(e,!0),i=new mc(e,!1),o=ht.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Ni)!=s.state.facet(Ni)||s.startState.field(co,!1)!=s.state.field(co,!1)||Ot(s.startState)!=Ot(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let l=new Ai;for(let a of s.viewportLineBlocks){let u=Ia(s.state,a.from,a.to)?i:Na(s.state,a.from,a.to)?n:null;u&&l.add(a.from,a.from,u)}return l.finish()}}),{domEventHandlers:r}=e;return[o,fD({class:"cm-foldGutter",markers(s){var l;return((l=s.plugin(o))===null||l===void 0?void 0:l.markers)||Xe.empty},initialSpacer(){return new mc(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(s,l,a)=>{if(r.click&&r.click(s,l,a))return!0;let u=Ia(s.state,l.from,l.to);if(u)return s.dispatch({effects:Rs.of(u)}),!0;let c=Na(s.state,l.from,l.to);return c?(s.dispatch({effects:xu.of(c)}),!0):!1}})}),RO()]}const HD=ve.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class qs{constructor(e,n){this.specs=e;let i;function o(l){let a=Di.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof n.all=="string"?n.all:n.all?o(n.all):void 0,s=n.scope;this.scope=s instanceof vn?l=>l.prop(Mo)==s.data:s?l=>l==s:void 0,this.style=J0(e.map(l=>({tag:l.tag,class:l.class||o(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Di(i):null,this.themeType=n.themeType}static define(e,n){return new qs(e,n||{})}}const Ih=we.define(),QO=we.define({combine(t){return t.length?[t[0]]:null}});function gc(t){let e=t.facet(Ih);return e.length?e:t.facet(QO)}function NO(t,e){let n=[ZD],i;return t instanceof qs&&(t.module&&n.push(ve.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(QO.of(t)):i?n.push(Ih.computeN([ve.darkTheme],o=>o.facet(ve.darkTheme)==(i=="dark")?[t]:[])):n.push(Ih.of(t)),n}class GD{constructor(e){this.markCache=Object.create(null),this.tree=Ot(e.state),this.decorations=this.buildDeco(e,gc(e.state))}update(e){let n=Ot(e.state),i=gc(e.state),o=i!=gc(e.startState);n.length{i.add(s,l,this.markCache[a]||(this.markCache[a]=xe.mark({class:a})))},o,r);return i.finish()}}const ZD=go.high(ht.fromClass(GD,{decorations:t=>t.decorations})),KD=qs.define([{tag:W.meta,color:"#404740"},{tag:W.link,textDecoration:"underline"},{tag:W.heading,textDecoration:"underline",fontWeight:"bold"},{tag:W.emphasis,fontStyle:"italic"},{tag:W.strong,fontWeight:"bold"},{tag:W.strikethrough,textDecoration:"line-through"},{tag:W.keyword,color:"#708"},{tag:[W.atom,W.bool,W.url,W.contentSeparator,W.labelName],color:"#219"},{tag:[W.literal,W.inserted],color:"#164"},{tag:[W.string,W.deleted],color:"#a11"},{tag:[W.regexp,W.escape,W.special(W.string)],color:"#e40"},{tag:W.definition(W.variableName),color:"#00f"},{tag:W.local(W.variableName),color:"#30a"},{tag:[W.typeName,W.namespace],color:"#085"},{tag:W.className,color:"#167"},{tag:[W.special(W.variableName),W.macroName],color:"#256"},{tag:W.definition(W.propertyName),color:"#00c"},{tag:W.comment,color:"#940"},{tag:W.invalid,color:"#f00"}]),JD=ve.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),IO=1e4,VO="()[]{}",BO=we.define({combine(t){return zn(t,{afterCursor:!0,brackets:VO,maxScanDistance:IO,renderMatch:n8})}}),e8=xe.mark({class:"cm-matchingBracket"}),t8=xe.mark({class:"cm-nonmatchingBracket"});function n8(t){let e=[],n=t.matched?e8:t8;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const i8=wt.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(BO);for(let o of e.state.selection.ranges){if(!o.empty)continue;let r=Dn(e.state,o.head,-1,i)||o.head>0&&Dn(e.state,o.head-1,1,i)||i.afterCursor&&(Dn(e.state,o.head,1,i)||o.headve.decorations.from(t)}),o8=[i8,JD];function r8(t={}){return[BO.of(t),o8]}const s8=new De;function Vh(t,e,n){let i=t.prop(e<0?De.openedBy:De.closedBy);if(i)return i;if(t.name.length==1){let o=n.indexOf(t.name);if(o>-1&&o%2==(e<0?1:0))return[n[o+e]]}return null}function Bh(t){let e=t.type.prop(s8);return e?e(t.node):t}function Dn(t,e,n,i={}){let o=i.maxScanDistance||IO,r=i.brackets||VO,s=Ot(t),l=s.resolveInner(e,n);for(let a=l;a;a=a.parent){let u=Vh(a.type,n,r);if(u&&a.from0?e>=c.from&&ec.from&&e<=c.to))return l8(t,e,n,a,c,u,r)}}return a8(t,e,n,s,l.type,o,r)}function l8(t,e,n,i,o,r,s){let l=i.parent,a={from:o.from,to:o.to},u=0,c=l==null?void 0:l.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let d=0;!c.next().done&&d<=r;){let f=c.value;n<0&&(d+=f.length);let p=e+d*n;for(let g=n>0?0:f.length-1,w=n>0?f.length:-1;g!=w;g+=n){let y=s.indexOf(f[g]);if(!(y<0||i.resolveInner(p+g,1).type!=o))if(y%2==0==n>0)h++;else{if(h==1)return{start:u,end:{from:p+g,to:p+g+1},matched:y>>1==a>>1};h--}}n>0&&(d+=f.length)}return c.done?{start:u,matched:!1}:null}const u8=Object.create(null),eg=[Xt.none],tg=[],c8=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])c8[t]=h8(u8,e);function vc(t,e){tg.indexOf(t)>-1||(tg.push(t),console.warn(e))}function h8(t,e){let n=null;for(let r of e.split(".")){let s=t[r]||W[r];s?typeof s=="function"?n?n=s(n):vc(r,`Modifier ${r} used at start of tag`):n?vc(r,`Tag ${r} used as modifier`):n=s:vc(r,`Unknown highlighting tag ${r}`)}if(!n)return 0;let i=e.replace(/ /g,"_"),o=Xt.define({id:eg.length,name:i,props:[Wd({[i]:n})]});return eg.push(o),o.id}const d8=hs.define({name:"json",parser:RE.configure({props:[ef.add({Object:Km({except:/^\s*\}/}),Array:Km({except:/^\s*\]/})}),nf.add({"Object Array":$O})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function f8(){return new TO(d8)}const p8=1,WO=196,LO=197,m8=198,ng=199,g8=200,v8=201,y8=202,O8=2,w8=203,_8=204,b8=3,x8=205,S8=206,k8=4,T8=207,P8=208,C8=5,$8=209,E8=26,M8=27,A8=51,D8=52,R8=57,q8=58,Q8=59,N8=61,I8=62,V8=63,B8=64,W8=65,L8=67,z8=246,X8=74,U8=265,Y8=129,j8=150,F8=151,H8=154,fs=10,ps=13,rf=32,Su=9,sf=35,G8=40,Z8=46,ig=123,zO=39,XO=34,K8=92,J8=new Set([M8,A8,D8,U8,L8,Y8,q8,Q8,z8,B8,W8,X8,I8,V8,j8,F8,H8]);function yc(t){return t==fs||t==ps}const e5=new yu((t,e)=>{let n;if(t.next<0)t.acceptToken(v8);else if(e.context.depth<0)yc(t.next)&&t.acceptToken(g8,1);else if(((n=t.peek(-1))<0||yc(n))&&e.canShift(ng)){let i=0;for(;t.next==rf||t.next==Su;)t.advance(),i++;(t.next==fs||t.next==ps||t.next==sf)&&t.acceptToken(ng,-i)}else yc(t.next)&&t.acceptToken(m8,1)},{contextual:!0}),t5=new yu((t,e)=>{let n=e.context.depth;if(n<0)return;let i=t.peek(-1);if(i==fs||i==ps){let o=0,r=0;for(;;){if(t.next==rf)o++;else if(t.next==Su)o+=8-o%8;else break;t.advance(),r++}o!=n&&t.next!=fs&&t.next!=ps&&t.next!=sf&&(o{for(let e=0;e<5;e++){if(t.next!="print".charCodeAt(e))return;t.advance()}if(!/\w/.test(String.fromCharCode(t.next)))for(let e=0;;e++){let n=t.peek(e);if(!(n==rf||n==Su)){n!=G8&&n!=Z8&&n!=fs&&n!=ps&&n!=sf&&t.acceptToken(p8);return}}});function ku(t,e,n,i,o){return new yu(r=>{let s=r.pos;for(;!(r.next<0);)if(r.next==ig)if(r.peek(1)==ig)r.advance(2);else{if(r.pos==s){r.acceptToken(i,1);return}break}else if(r.next==K8)r.advance(),r.next>=0&&r.advance();else if(r.next==t&&(e==1||r.peek(1)==t&&r.peek(2)==t)){if(r.pos==s){r.acceptToken(o,e);return}break}else r.advance();r.pos>s&&r.acceptToken(n)})}const s5=ku(zO,1,y8,O8,w8),l5=ku(XO,1,_8,b8,x8),a5=ku(zO,3,S8,k8,T8),u5=ku(XO,3,P8,C8,$8),c5=Wd({'async "*" "**" FormatConversion FormatSpec':W.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":W.controlKeyword,"in not and or is del":W.operatorKeyword,"from def class global nonlocal lambda":W.definitionKeyword,import:W.moduleKeyword,"with as print":W.keyword,Boolean:W.bool,None:W.null,VariableName:W.variableName,"CallExpression/VariableName":W.function(W.variableName),"FunctionDefinition/VariableName":W.function(W.definition(W.variableName)),"ClassDefinition/VariableName":W.definition(W.className),PropertyName:W.propertyName,"CallExpression/MemberExpression/PropertyName":W.function(W.propertyName),Comment:W.lineComment,Number:W.number,String:W.string,FormatString:W.special(W.string),UpdateOp:W.updateOperator,"ArithOp!":W.arithmeticOperator,BitOp:W.bitwiseOperator,CompareOp:W.compareOperator,AssignOp:W.definitionOperator,Ellipsis:W.punctuation,At:W.meta,"( )":W.paren,"[ ]":W.squareBracket,"{ }":W.brace,".":W.derefOperator,", ;":W.separator}),h5={__proto__:null,await:48,or:58,and:60,in:64,not:66,is:68,if:74,else:76,lambda:80,yield:98,from:100,async:106,for:108,None:168,True:170,False:170,del:184,pass:188,break:192,continue:196,return:200,raise:208,import:212,as:214,global:218,nonlocal:220,assert:224,elif:234,while:238,try:244,except:246,finally:248,with:252,def:256,class:266,match:277,case:283},d5=ts.deserialize({version:14,states:"#!OO`Q#yOOP$_OSOOO%hQ&nO'#H^OOQS'#Cq'#CqOOQS'#Cr'#CrO'WQ#xO'#CpO(yQ&nO'#H]OOQS'#H^'#H^OOQS'#DW'#DWOOQS'#H]'#H]O)gQ#xO'#DaO)zQ#xO'#DhO*[Q#xO'#DlOOQS'#Dw'#DwO*oO,UO'#DwO*wO7[O'#DwO+POWO'#DxO+[O`O'#DxO+gOpO'#DxO+rO!bO'#DxO-tQ&nO'#G}OOQS'#G}'#G}O'WQ#xO'#G|O/WQ&nO'#G|OOQS'#Ee'#EeO/oQ#xO'#EfOOQS'#G{'#G{O/yQ#xO'#GzOOQV'#Gz'#GzO0UQ#xO'#FXOOQS'#G`'#G`O0ZQ#xO'#FWOOQV'#IS'#ISOOQV'#Gy'#GyOOQV'#Fp'#FpQ`Q#yOOO'WQ#xO'#CsO0iQ#xO'#DPO0pQ#xO'#DTO1OQ#xO'#HbO1`Q&nO'#EYO'WQ#xO'#EZOOQS'#E]'#E]OOQS'#E_'#E_OOQS'#Ea'#EaO1tQ#xO'#EcO2[Q#xO'#EgO0UQ#xO'#EiO2oQ&nO'#EiO0UQ#xO'#ElO/oQ#xO'#EoO/oQ#xO'#EsO/oQ#xO'#EvO2zQ#xO'#ExO3RQ#xO'#E}O3^Q#xO'#EyO/oQ#xO'#E}O0UQ#xO'#FPO0UQ#xO'#FUO3cQ#xO'#FZP3jO#xO'#GxPOOO)CBl)CBlOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Ck'#CkOOQS'#Cl'#ClOOQS'#Cn'#CnO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO3uQ#xO'#DqOOQS,5:[,5:[O4YQ#xO'#HlOOQS,5:_,5:_O4gQMlO,5:_O4lQ&nO,59[O0iQ#xO,59dO0iQ#xO,59dO0iQ#xO,59dO7[Q#xO,59dO7aQ#xO,59dO7hQ#xO,59lO7oQ#xO'#H]O8uQ#xO'#H[OOQS'#H['#H[OOQS'#D^'#D^O9^Q#xO,59cO'WQ#xO,59cO9lQ#xO,59cOOQS,59{,59{O9qQ#xO,5:TO'WQ#xO,5:TOOQS,5:S,5:SO:PQ#xO,5:SO:UQ#xO,5:ZO'WQ#xO,5:ZO'WQ#xO,5:XOOQS,5:W,5:WO:gQ#xO,5:WO:lQ#xO,5:YOOOO'#Fx'#FxO:qO,UO,5:cOOQS,5:c,5:cOOOO'#Fy'#FyO:yO7[O,5:cO;RQ#xO'#DyOOOW'#Fz'#FzO;cOWO,5:dOOQS,5:d,5:dO;RQ#xO'#D}OOO`'#F}'#F}O;nO`O,5:dO;RQ#xO'#EOOOOp'#GO'#GOO;yOpO,5:dO;RQ#xO'#EPOOO!b'#GP'#GPOWOOQS'#Du'#DuOOQS1G/y1G/yOOQS1G/O1G/OO!-ZQ&nO1G/OO!-bQ&nO1G/OO0iQ#xO1G/OO!-}Q#xO1G/WOOQS'#D]'#D]O/oQ#xO,59vOOQS1G.}1G.}O!.UQ#xO1G/gO!.fQ#xO1G/gO!.nQ#xO1G/hO'WQ#xO'#HdO!.sQ#xO'#HdO!.xQ&nO1G.}O!/YQ#xO,59kO!0`Q#xO,5>SO!0pQ#xO,5>SO!0xQ#xO1G/oO!0}Q&nO1G/oOOQS1G/n1G/nO!1_Q#xO,5=}O!2UQ#xO,5=}O/oQ#xO1G/sO!2sQ#xO1G/uO!2xQ&nO1G/uO!3YQ&nO1G/sOOQS1G/r1G/rOOQS1G/t1G/tOOOO-E9v-E9vOOQS1G/}1G/}OOOO-E9w-E9wO!3jQ#xO'#HwO/oQ#xO'#HwO!3xQ#xO,5:eOOOW-E9x-E9xOOQS1G0O1G0OO!4TQ#xO,5:iOOO`-E9{-E9{O!4`Q#xO,5:jOOOp-E9|-E9|O!4kQ#xO,5:kOOO!b-E9}-E9}OOQS-E:O-E:OO!4vQ!LUO1G3SO!5gQ&nO1G3SO'WQ#xO,5jOOQS1G1_1G1_O!6gQ#xO1G1_OOQS'#DX'#DXO/oQ#xO,5=yOOQS,5=y,5=yO!6lQ#xO'#FqO!6wQ#xO,59qO!7PQ#xO1G/ZO!7ZQ&nO,5=}OOQS1G3h1G3hOOQS,5:p,5:pO!7zQ#xO'#G|OOQS,5PO!8{Q#xO,5>PO/oQ#xO1G0mO/oQ#xO1G0mO0UQ#xO1G0oOOQS-E:T-E:TO!9^Q#xO1G0oO!9iQ#xO1G0oO!9nQ#xO,5>mO!9|Q#xO,5>mO!:[Q#xO,5>iO!:rQ#xO,5>iO!;TQ#{O1G0yO!>cQ#{O1G0|O!AnQ#xO,5>oO!AxQ#xO,5>oO!BQQ&nO,5>oO/oQ#xO1G1OO!B[Q#xO1G1OO3^Q#xO1G1TO! RQ#xO1G1VOOQV,5;`,5;`O!BaQ#zO,5;`O!BfQ#{O1G1PO!EwQ#xO'#G]O3^Q#xO1G1PO3^Q#xO1G1PO!FUQ#xO,5>pO!FcQ#xO,5>pO0UQ#xO,5>pOOQV1G1T1G1TO!FkQ#xO'#FRO!F|QMlO1G1VOOQV1G1[1G1[O3^Q#xO1G1[O!GUQ#xO'#F]OOQV1G1a1G1aO! `Q&nO1G1aPOOO1G3O1G3OP!GZOSO1G3OOOQS,5>V,5>VOOQS'#Dr'#DrO/oQ#xO,5>VO!G`Q#xO,5>UO!GsQ#xO,5>UOOQS1G/w1G/wO!G{Q#xO,5>XO!H]Q#xO,5>XO!HeQ#xO,5>XO!HxQ#xO,5>XO!IYQ#xO,5>XOOQS1G3r1G3rOOQS7+$j7+$jO!7PQ#xO7+$rO!J{Q#xO1G/OO!KSQ#xO1G/OOOQS1G/b1G/bOOQS,5<_,5<_O'WQ#xO,5<_OOQS7+%R7+%RO!KZQ#xO7+%ROOQS-E9q-E9qOOQS7+%S7+%SO!KkQ#xO,5>OO'WQ#xO,5>OOOQS7+$i7+$iO!KpQ#xO7+%RO!KxQ#xO7+%SO!K}Q#xO1G3nOOQS7+%Z7+%ZO!L_Q#xO1G3nO!LgQ#xO7+%ZOOQS,5<^,5<^O'WQ#xO,5<^O!LlQ#xO1G3iOOQS-E9p-E9pO!McQ#xO7+%_OOQS7+%a7+%aO!MqQ#xO1G3iO!N`Q#xO7+%aO!NeQ#xO1G3oO!NuQ#xO1G3oO!N}Q#xO7+%_O# SQ#xO,5>cO# jQ#xO,5>cO# jQ#xO,5>cO# xO$ISO'#D{O#!TO#tO'#HxOOOW1G0P1G0PO#!YQ#xO1G0POOO`1G0T1G0TO#!bQ#xO1G0TOOOp1G0U1G0UO#!jQ#xO1G0UOOO!b1G0V1G0VO#!rQ#xO1G0VO#!zQ!LUO7+(nO##kQ&nO1G2XP#$UQ#xO'#GROOQS,5d,5>dOOOW7+%k7+%kOOO`7+%o7+%oOOOp7+%p7+%pOOO!b7+%q7+%qO#7{Q#xO1G3SO#8fQ#xO1G3SP'WQ#xO'#FtO/oQ#xO<lO#9YQ#xO,5>lO0UQ#xO,5>lO#9kQ#xO,5>kOOQS<rO#AdQ#xO,5>rOOQS,5>r,5>rO#AoQ#xO,5>qO#BQQ#xO,5>qOOQS1G1X1G1XOOQS,5;o,5;oO#BYQ#xO1G1cP#B_Q#xO'#FvO#BoQ#xO1G1}O#CSQ#xO1G1}O#CdQ#xO1G1}P#CoQ#xO'#FwO#C|Q#xO7+)_O#D^Q#xO7+)_O#D^Q#xO7+)_O#DfQ#xO7+)_O#DvQ#xO7+)UO7hQ#xO7+)UOOQSAN>XAN>XO#EaQ#xO<eAN>eO/oQ#xO1G1{O#EqQ&nO1G1{P#E{Q#xO'#FuOOQS1G2R1G2RP#FYQ#xO'#F{O#FgQ#xO7+)iO#F}Q#xO,5:hOOOO-E9z-E9zO#GYQ#xO7+(nOOQSAN?_AN?_O#GsQ#xO,5QOOQSANB[ANB[OOOO7+%n7+%nOOQS7+'x7+'xO$'{Q#xO<tO$*qQ#xO,5>tO0UQ#xO,5vO#MRQ#xO,5>vOOQS1G1o1G1oO$.iQ&nO,5wO$.wQ#xO,5>wOOQS1G1r1G1rOOQS7+'R7+'RP#MRQ#xO'#GfO$/PQ#xO1G4bO$/ZQ#xO1G4bO$/cQ#xO1G4bOOQS7+%V7+%VO$/qQ#xO1G1sO$0PQ&nO'#F`O$0WQ#xO,5=POOQS,5=P,5=PO$0fQ#xO1G4cOOQS-E:c-E:cO#MRQ#xO,5=OO$0mQ#xO,5=OO$0rQ#xO7+)|OOQS-E:b-E:bO$0|Q#xO7+)|O#MRQ#xO,5e>hPP'Z'ZPP?QPP'Z'ZPP'Z'Z'Z'Z'Z?U?{'ZP@OP@UD]GyPG}HZH_HcHg'ZPPPHkHq'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RPHwPIOIUPIOPIOIOPPPIOPKTPK^KdKjKTPIOKpPIOPKwK}PLRLgMUMoLRLRMuNSLRLRLRLRNhNnNqNvNy! T! Z! g! y!!P!!Z!!a!!}!#T!#Z!#a!#k!#q!#w!#}!$T!$Z!$m!$w!$}!%T!%Z!%e!%k!%q!%w!&R!&X!&c!&i!&r!&x!'X!'a!'k!'rPPPPPPPPPPPPPPPPP!'x!'{!(R!([!(f!(qPPPPPPPPPPPP!-e!.y!2s!6TPP!6]!6o!6x!7n!7e!7w!7}!8Q!8T!8W!8`!9PPPPPPPPPP!9S!9cPPPP!:R!:_!:k!:q!:z!:}!;T!;Z!;a!;dP!;l!;u!x|}#@S}!O#AW!O!P#Ci!P!Q#N_!Q!R$!y!R![$&w![!]$1e!]!^$3s!^!_$4w!_!`$7c!`!a$8m!a!b%T!b!c$;U!c!d$W!e!h$W#V#Y$Q<%lO$Xc&m!b&eS&hW%k!TOX%TXY=|Y[%T[]=|]p%Tpq=|qr%Trs&Vsw%Twx/Xx#O%T#O#P?d#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s?i[&m!bOY%TYZ=|Z]%T]^=|^#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=P;=`<%l8^<%lO%T!q@hd&m!b&eS&hWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`#O%T#O#P7o#P#T%T#T#UBz#U#f%T#f#gBz#g#hBz#h#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qBR]oR&m!b&eS&hWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qCV]!nR&m!b&eS&hWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cDXa&m!b&eS&csOYE^YZ%TZ]E^]^%T^rE^rs!)|swE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cEia&m!b&eS&hW&csOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cFw]&m!b&eS&csOr%Trs'Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cGya&m!b&hW&csOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxIOx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cIXa&m!b&hW&csOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxJ^x#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#_Jg_&m!b&hW&csOYJ^YZ1XZ]J^]^1X^rJ^rsKfs#OJ^#O#PL`#P#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`!!o<%lOJ^#_KmZ&m!b&csOr1Xrs2ys#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#_LeW&m!bO#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`! r;=`<%lL}<%lOJ^{MUZ&hW&csOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l<%lOL}{M|V&csOr4`rs5ds#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`{NfRO;'SL};'S;=`No;=`OL}{Nv[&hW&csOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lL}<%lOL}{! oP;=`<%lL}#_! y[&hW&csOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lJ^<%lOL}#_!!rP;=`<%lJ^#c!!zW&m!bO#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!(q;=`<%l!#d<%lOE^!P!#m]&eS&hW&csOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!%Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k<%lO!#d!P!$mX&eS&csOr8^rs9rsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`^s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!>e_U!T&m!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!?ds#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!?k_U!T&m!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!3`s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!@q[U!T&m!bOY!=UYZ1XZ]!=U]^1X^#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!Ec;=`<%l4`<%lO!=U!]!AnZU!T&hWOY!AgYZ4`Z]!Ag]^4`^r!Agrs!Bas#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!BfZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!CXs#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!C^ZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!4Ys#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!DUWU!TOY!AgYZ4`Z]!Ag]^4`^;'S!Ag;'S;=`!Dn;=`<%l4`<%lO!Ag!]!DsW&hWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!Ag<%lO4`!]!E`P;=`<%l!Ag#o!EhW&hWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!=U<%lO4`#o!FTP;=`<%l!=U#s!F_[U!T&m!bOY!+|YZ%TZ]!+|]^%T^#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Mq;=`<%l8^<%lO!+|!a!G^]U!T&eS&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!H^]U!T&eSOY!GTYZ8^Z]!GT]^8^^r!GTrs!IVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!I^]U!T&eSOY!GTYZ8^Z]!GT]^8^^r!GTrs!5wsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!J^]U!T&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!KVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!K^]U!T&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!Agx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!L[WU!TOY!GTYZ8^Z]!GT]^8^^;'S!GT;'S;=`!Lt;=`<%l8^<%lO!GT!a!L{Y&eS&hWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`Q<%lO$TP;=`<%l$ei&m!b&eS&hW&b`%}sOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$Q<%lO$Q<%lO$Q<%lO$Q<%lO$Q<%lO$h5[t]||-1}],tokenPrec:7205});class UO{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Ot(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),o=n.text.slice(i-n.from,this.pos-n.from),r=o.search(jO(e,!1));return r<0?null:{from:i+r,to:this.pos,text:o.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function og(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function f5(t){let e=Object.create(null),n=Object.create(null);for(let{label:o}of t){e[o[0]]=!0;for(let r=1;rtypeof o=="string"?{label:o}:o),[n,i]=e.every(o=>/^\w+$/.test(o.label))?[/\w*$/,/\w+$/]:f5(e);return o=>{let r=o.matchBefore(i);return r||o.explicit?{from:r?r.from:o.pos,options:e,validFor:n}:null}}function p5(t,e){return n=>{for(let i=Ot(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class rg{constructor(e,n,i,o){this.completion=e,this.source=n,this.match=i,this.score=o}}function Ei(t){return t.selection.main.from}function jO(t,e){var n;let{source:i}=t,o=e&&i[0]!="^",r=i[i.length-1]!="$";return!o&&!r?t:new RegExp(`${o?"^":""}(?:${i})${r?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const FO=hi.define();function m5(t,e,n,i){let{main:o}=t.selection,r=n-o.from,s=i-o.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=o&&n!=i&&t.sliceDoc(l.from+r,l.from+s)!=t.sliceDoc(n,i)?{range:l}:{changes:{from:l.from+r,to:i==o.from?l.to:l.from+s,insert:e},range:Z.cursor(l.from+r+e.length)})),{userEvent:"input.complete"})}const sg=new WeakMap;function g5(t){if(!Array.isArray(t))return t;let e=sg.get(t);return e||sg.set(t,e=YO(t)),e}const lf=Pe.define(),ms=Pe.define();class v5{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(x=Ld(k))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!_||$==1&&w||b==0&&$!=0)&&(n[h]==k||i[h]==k&&(d=!0)?s[h++]=_:s.length&&(y=!1)),b=$,_+=sn(k)}return h==a&&s[0]==0&&y?this.result(-100+(d?-200:0),s,e):f==a&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):f==a?this.ret(-200+-700-e.length,[p,g]):h==a?this.result(-100+(d?-200:0)+-700+(y?0:-1100),s,e):n.length==2?!1:this.result((o[0]?-700:0)+-200+-1100,o,e)}result(e,n,i){let o=[],r=0;for(let s of n){let l=s+(this.astral?sn(St(i,s)):1);r&&o[r-1]==s?o[r-1]=l:(o[r++]=s,o[r++]=l)}return this.ret(e-i.length,o)}}const Bt=we.define({combine(t){return zn(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:y5,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>lg(e(i),n(i)),optionClass:(e,n)=>i=>lg(e(i),n(i)),addToOptions:(e,n)=>e.concat(n)})}});function lg(t,e){return t?e?t+" "+e:t:e}function y5(t,e,n,i,o){let r=t.textDirection==tt.RTL,s=r,l=!1,a="top",u,c,h=e.left-o.left,d=o.right-e.right,f=i.right-i.left,p=i.bottom-i.top;if(s&&h=p||g>e.top?u=n.bottom-e.top:(a="bottom",u=e.bottom-n.top)}return{style:`${a}: ${u}px; max-width: ${c}px`,class:"cm-completionInfo-"+(l?r?"left-narrow":"right-narrow":s?"left":"right")}}function O5(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(o=>"cm-completionIcon-"+o)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,o){let r=document.createElement("span");r.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let a=0;al&&r.appendChild(document.createTextNode(s.slice(l,u)));let h=r.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(u,c))),h.className="cm-completionMatchedText",l=c}return ln.position-i.position).map(n=>n.render)}function ag(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let o=Math.floor(e/n);return{from:o*n,to:(o+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class w5{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let o=e.state.field(n),{options:r,selected:s}=o.open,l=e.state.facet(Bt);this.optionContent=O5(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=ag(r.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{for(let u=a.target,c;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(c=/-(\d+)$/.exec(u.id))&&+c[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Bt).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:ms.of(null)})}),this.list=this.dom.appendChild(this.createListBox(r,o.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var n,i,o;let r=e.state.field(this.stateField),s=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=s&&(this.updateSel(),((n=r.open)===null||n===void 0?void 0:n.disabled)!=((i=s.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((o=r.open)===null||o===void 0)&&o.disabled)))}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=ag(n.options.length,n.selected,this.view.state.facet(Bt).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:o}=i;if(!o)return;let r=typeof o=="string"?document.createTextNode(o):o(i);if(!r)return;"then"in r?r.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>an(this.view.state,s,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:o,destroy:r}=e;i.appendChild(o),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,o=this.range.from;i;i=i.nextSibling,o++)i.nodeName!="LI"||!i.id?o--:o==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&b5(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),r=this.space;if(!r){let s=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return o.top>Math.min(r.bottom,n.bottom)-10||o.bottomi.from||i.from==0))if(r=d,typeof u!="string"&&u.header)o.appendChild(u.header(u));else{let f=o.appendChild(document.createElement("completion-section"));f.textContent=d}}const c=o.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let h=this.optionClass(l);h&&(c.className=h);for(let d of this.optionContent){let f=d(l,this.view.state,a);f&&c.appendChild(f)}}return i.from&&o.classList.add("cm-completionListIncompleteTop"),i.tonew w5(n,t,e)}function b5(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.topn.bottom&&(t.scrollTop+=i.bottom-n.bottom)}function ug(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function x5(t,e){let n=[],i=null,o=a=>{n.push(a);let{section:u}=a.completion;if(u){i||(i=[]);let c=typeof u=="string"?u:u.name;i.some(h=>h.name==c)||i.push(typeof u=="string"?{name:c}:u)}};for(let a of t)if(a.hasResult()){let u=a.result.getMatch;if(a.result.filter===!1)for(let c of a.result.options)o(new rg(c,a.source,u?u(c):[],1e9-n.length));else{let c=new v5(e.sliceDoc(a.from,a.to));for(let h of a.result.options)if(c.match(h.label)){let d=h.displayLabel?u?u(h,c.matched):[]:c.matched;o(new rg(h,a.source,d,c.score+(h.boost||0)))}}}if(i){let a=Object.create(null),u=0,c=(h,d)=>{var f,p;return((f=h.rank)!==null&&f!==void 0?f:1e9)-((p=d.rank)!==null&&p!==void 0?p:1e9)||(h.namec.score-u.score||l(u.completion,c.completion))){let u=a.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?r.push(a):ug(a.completion)>ug(s)&&(r[r.length-1]=a),s=a.completion}return r}class Ao{constructor(e,n,i,o,r,s){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=o,this.selected=r,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Ao(this.options,cg(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,o,r){let s=x5(e,n);if(!s.length)return o&&e.some(a=>a.state==1)?new Ao(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;let l=n.facet(Bt).selectOnOpen?0:-1;if(o&&o.selected!=l&&o.selected!=-1){let a=o.options[o.selected].completion;for(let u=0;uu.hasResult()?Math.min(a,u.from):a,1e8),create:_5(Gt,ZO),above:r.aboveCursor},o?o.timestamp:Date.now(),l,!1)}map(e){return new Ao(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class Va{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new Va(T5,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Bt),r=(i.override||n.languageDataAt("autocomplete",Ei(n)).map(g5)).map(l=>(this.active.find(u=>u.source==l)||new It(l,this.active.some(u=>u.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!S5(r,this.active)?s=Ao.build(r,n,this.id,s,i):s&&s.disabled&&!r.some(l=>l.state==1)&&(s=null),!s&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new It(l.source,0):l));for(let l of e.effects)l.is(GO)&&(s=s&&s.setSelected(l.value,this.id));return r==this.active&&s==this.open?this:new Va(r,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:k5}}function S5(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const T5=[];function Lh(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class It{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=Lh(e),o=this;i?o=o.handleUserEvent(e,i,n):e.docChanged?o=o.handleChange(e):e.selection&&o.state!=0&&(o=new It(o.source,0));for(let r of e.effects)if(r.is(lf))o=new It(o.source,1,r.value?Ei(e.state):-1);else if(r.is(ms))o=new It(o.source,0);else if(r.is(HO))for(let s of r.value)s.source==o.source&&(o=s);return o}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new It(this.source,1)}handleChange(e){return e.changes.touchesRange(Ei(e.startState))?new It(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new It(this.source,this.state,e.mapPos(this.explicitPos))}}class zo extends It{constructor(e,n,i,o,r){super(e,2,n),this.result=i,this.from=o,this.to=r}hasResult(){return!0}handleUserEvent(e,n,i){var o;let r=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=Ei(e.state);if((this.explicitPos<0?l<=r:ls||n=="delete"&&Ei(e.startState)==this.from)return new It(this.source,n=="input"&&i.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return P5(this.result.validFor,e.state,r,s)?new zo(this.source,a,this.result,r,s):this.result.update&&(u=this.result.update(this.result,r,s,new UO(e.state,l,a>=0)))?new zo(this.source,a,u,u.from,(o=u.to)!==null&&o!==void 0?o:Ei(e.state)):new It(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new It(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new zo(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function P5(t,e,n,i){if(!t)return!1;let o=e.sliceDoc(n,i);return typeof t=="function"?t(o,n,i,e):jO(t,!0).test(o)}const HO=Pe.define({map(t,e){return t.map(n=>n.map(e))}}),GO=Pe.define(),Gt=wt.define({create(){return Va.start()},update(t,e){return t.update(e)},provide:t=>[Zd.from(t,e=>e.tooltip),ve.contentAttributes.from(t,e=>e.attrs)]});function ZO(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Gt).active.find(o=>o.source==e.source);return i instanceof zo?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},m5(t.state,n,i.from,i.to)),{annotations:FO.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}function gl(t,e="option"){return n=>{let i=n.state.field(Gt,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+o*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:GO.of(l)}),!0}}const C5=t=>{let e=t.state.field(Gt,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Gt,!1)?(t.dispatch({effects:lf.of(!0)}),!0):!1,E5=t=>{let e=t.state.field(Gt,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ms.of(null)}),!0)};class M5{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const hg=50,A5=50,D5=1e3,R5=ht.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(Gt).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Gt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Gt)==e)return;let n=t.transactions.some(i=>(i.selection||i.docChanged)&&!Lh(i));for(let i=0;iA5&&Date.now()-o.time>D5){for(let r of o.context.abortListeners)try{r()}catch(s){an(this.view.state,s)}o.context.abortListeners=null,this.running.splice(i--,1)}else o.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(o=>o.active.source==i.source))?setTimeout(()=>this.startUpdate(),hg):-1,this.composing!=0)for(let i of t.transactions)Lh(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(Gt);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Ei(e),i=new UO(e,n,t.explicitPos==n),o=new M5(t,i);this.running.push(o),Promise.resolve(t.source(i)).then(r=>{o.context.aborted||(o.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:ms.of(null)}),an(this.view.state,r)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),hg))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Bt);for(let i=0;is.source==o.active.source);if(r&&r.state==1)if(o.done==null){let s=new It(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.state!=1&&e.push(s)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:HO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Gt,!1);if(e&&e.tooltip&&this.view.state.facet(Bt).closeOnBlur){let n=e.open&&_O(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:ms.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:lf.of(!1)}),20),this.composing=0}}}),KO=ve.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class q5{constructor(e,n,i,o){this.field=e,this.line=n,this.from=i,this.to=o}}class af{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Tt.TrackDel),i=e.mapPos(this.to,1,Tt.TrackDel);return n==null||i==null?null:new af(this.field,n,i)}}class uf{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],o=[n],r=e.doc.lineAt(n),s=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let u=s,c=/^\t*/.exec(a)[0].length;for(let h=0;hnew af(a.field,o[a.line]+a.from,o[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let n=[],i=[],o=[],r;for(let s of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",u=-1;for(let c=0;c=u&&h.field++}o.push(new q5(u,i.length,r.index,r.index+a.length)),s=s.slice(0,r.index)+a+s.slice(r.index+r[0].length)}for(let l;l=/\\([{}])/.exec(s);){s=s.slice(0,l.index)+l[1]+s.slice(l.index+l[0].length);for(let a of o)a.line==i.length&&a.from>l.index&&(a.from--,a.to--)}i.push(s)}return new uf(i,o)}}let Q5=xe.widget({widget:new class extends Xn{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),N5=xe.mark({class:"cm-snippetField"});class ur{constructor(e,n){this.ranges=e,this.active=n,this.deco=xe.set(e.map(i=>(i.from==i.to?Q5:N5).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let o=i.map(e);if(!o)return null;n.push(o)}return new ur(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const Qs=Pe.define({map(t,e){return t&&t.map(e)}}),I5=Pe.define(),gs=wt.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Qs))return n.value;if(n.is(I5)&&t)return new ur(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ve.decorations.from(t,e=>e?e.deco:xe.none)});function cf(t,e){return Z.create(t.filter(n=>n.field==e).map(n=>Z.range(n.from,n.to)))}function V5(t){let e=uf.parse(t);return(n,i,o,r)=>{let{text:s,ranges:l}=e.instantiate(n.state,o),a={changes:{from:o,to:r,insert:Be.of(s)},scrollIntoView:!0,annotations:i?FO.of(i):void 0};if(l.length&&(a.selection=cf(l,0)),l.length>1){let u=new ur(l,0),c=a.effects=[Qs.of(u)];n.state.field(gs,!1)===void 0&&c.push(Pe.appendConfig.of([gs,X5,U5,KO]))}n.dispatch(n.state.update(a))}}function JO(t){return({state:e,dispatch:n})=>{let i=e.field(gs,!1);if(!i||t<0&&i.active==0)return!1;let o=i.active+t,r=t>0&&!i.ranges.some(s=>s.field==o+t);return n(e.update({selection:cf(i.ranges,o),effects:Qs.of(r?null:new ur(i.ranges,o))})),!0}}const B5=({state:t,dispatch:e})=>t.field(gs,!1)?(e(t.update({effects:Qs.of(null)})),!0):!1,W5=JO(1),L5=JO(-1),z5=[{key:"Tab",run:W5,shift:L5},{key:"Escape",run:B5}],dg=we.define({combine(t){return t.length?t[0]:z5}}),X5=go.highest(Ms.compute([dg],t=>t.facet(dg)));function Fn(t,e){return Object.assign(Object.assign({},e),{apply:V5(t)})}const U5=ve.domEventHandlers({mousedown(t,e){let n=e.state.field(gs,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let o=n.ranges.find(r=>r.from<=i&&r.to>=i);return!o||o.field==n.active?!1:(e.dispatch({selection:cf(n.ranges,o.field),effects:Qs.of(n.ranges.some(r=>r.field>o.field)?new ur(n.ranges,o.field):null)}),!0)}}),vs={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Gi=Pe.define({map(t,e){let n=e.mapPos(t,-1,Tt.TrackAfter);return n??void 0}}),hf=new class extends ao{};hf.startSide=1;hf.endSide=-1;const e1=wt.define({create(){return Xe.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(i,-1)&&(t=Xe.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(Gi)&&(t=t.update({add:[hf.range(n.value,n.value+1)]}));return t}});function Y5(){return[F5,e1]}const Oc="()[]{}<>";function t1(t){for(let e=0;e{if((j5?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(i.length>2||i.length==2&&sn(St(i,0))==1||e!=o.from||n!=o.to)return!1;let r=Z5(t.state,i);return r?(t.dispatch(r),!0):!1}),H5=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=n1(t,t.selection.main.head).brackets||vs.brackets,o=null,r=t.changeByRange(s=>{if(s.empty){let l=K5(t.doc,s.head);for(let a of i)if(a==l&&Tu(t.doc,s.head)==t1(St(a,0)))return{changes:{from:s.head-a.length,to:s.head+a.length},range:Z.cursor(s.head-a.length)}}return{range:o=s}});return o||e(t.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!o},G5=[{key:"Backspace",run:H5}];function Z5(t,e){let n=n1(t,t.selection.main.head),i=n.brackets||vs.brackets;for(let o of i){let r=t1(St(o,0));if(e==o)return r==o?t4(t,o,i.indexOf(o+o+o)>-1,n):J5(t,o,r,n.before||vs.before);if(e==r&&i1(t,t.selection.main.from))return e4(t,o,r)}return null}function i1(t,e){let n=!1;return t.field(e1).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function Tu(t,e){let n=t.sliceString(e,e+2);return n.slice(0,sn(St(n,0)))}function K5(t,e){let n=t.sliceString(e-2,e);return sn(St(n,0))==n.length?n:n.slice(1)}function J5(t,e,n,i){let o=null,r=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Gi.of(s.to+e.length),range:Z.range(s.anchor+e.length,s.head+e.length)};let l=Tu(t.doc,s.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:Gi.of(s.head+e.length),range:Z.cursor(s.head+e.length)}:{range:o=s}});return o?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function e4(t,e,n){let i=null,o=t.changeByRange(r=>r.empty&&Tu(t.doc,r.head)==n?{changes:{from:r.head,to:r.head+n.length,insert:n},range:Z.cursor(r.head+n.length)}:i={range:r});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function t4(t,e,n,i){let o=i.stringPrefixes||vs.stringPrefixes,r=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Gi.of(l.to+e.length),range:Z.range(l.anchor+e.length,l.head+e.length)};let a=l.head,u=Tu(t.doc,a),c;if(u==e){if(fg(t,a))return{changes:{insert:e+e,from:a},effects:Gi.of(a+e.length),range:Z.cursor(a+e.length)};if(i1(t,a)){let d=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+d.length,insert:d},range:Z.cursor(a+d.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=pg(t,a-2*e.length,o))>-1&&fg(t,c))return{changes:{insert:e+e+e+e,from:a},effects:Gi.of(a+e.length),range:Z.cursor(a+e.length)};if(t.charCategorizer(a)(u)!=Je.Word&&pg(t,a,o)>-1&&!n4(t,a,e,o))return{changes:{insert:e+e,from:a},effects:Gi.of(a+e.length),range:Z.cursor(a+e.length)}}return{range:r=l}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function fg(t,e){let n=Ot(t).resolveInner(e+1);return n.parent&&n.from==e}function n4(t,e,n,i){let o=Ot(t).resolveInner(e,-1),r=i.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(o.from,Math.min(o.to,o.from+n.length+r)),a=l.indexOf(n);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=o.firstChild;for(;c&&c.from==o.from&&c.to-c.from>n.length+a;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=o.to==e&&o.parent;if(!u)break;o=u}return!1}function pg(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Je.Word)return e;for(let o of n){let r=e-o.length;if(t.sliceDoc(r,e)==o&&i(t.sliceDoc(r-1,r))!=Je.Word)return r}return-1}function i4(t={}){return[Gt,Bt.of(t),R5,o4,KO]}const o1=[{key:"Ctrl-Space",run:$5},{key:"Escape",run:E5},{key:"ArrowDown",run:gl(!0)},{key:"ArrowUp",run:gl(!1)},{key:"PageDown",run:gl(!0,"page")},{key:"PageUp",run:gl(!1,"page")},{key:"Enter",run:C5}],o4=go.highest(Ms.computeN([Bt],t=>t.facet(Bt).defaultKeymap?[o1]:[])),mg=new fE,r1=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function vl(t){return(e,n,i)=>{if(i)return!1;let o=e.node.getChild("VariableName");return o&&n(o,t),!0}}const r4={FunctionDefinition:vl("function"),ClassDefinition:vl("class"),ForStatement(t,e,n){if(n){for(let i=t.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")e(i,"variable");else if(i.name=="in")break}},ImportStatement(t,e){var n,i;let{node:o}=t,r=((n=o.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let s=o.getChild("import");s;s=s.nextSibling)s.name=="VariableName"&&((i=s.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&e(s,r?"variable":"namespace")},AssignStatement(t,e){for(let n=t.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")e(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(t,e){for(let n=null,i=t.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&e(i,"variable"),n=i},CapturePattern:vl("variable"),AsPattern:vl("variable"),__proto__:null};function s1(t,e){let n=mg.get(e);if(n)return n;let i=[],o=!0;function r(s,l){let a=t.sliceString(s.from,s.to);i.push({label:a,type:l})}return e.cursor(pt.IncludeAnonymous).iterate(s=>{if(s.name){let l=r4[s.name];if(l&&l(s,r,o)||!o&&r1.has(s.name))return!1;o=!1}else if(s.to-s.from>8192){for(let l of s1(t,s.node))i.push(l);return!1}}),mg.set(e,i),i}const gg=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,l1=["String","FormatString","Comment","PropertyName"];function s4(t){let e=Ot(t.state).resolveInner(t.pos,-1);if(l1.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&gg.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let o=e;o;o=o.parent)r1.has(o.name)&&(i=i.concat(s1(t.state.doc,o)));return{options:i,from:n?e.from:t.pos,validFor:gg}}const l4=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(t=>({label:t,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(t=>({label:t,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(t=>({label:t,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(t=>({label:t,type:"function"}))),a4=[Fn("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),Fn("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),Fn("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),Fn("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),Fn(`if \${}: - -`,{label:"if",detail:"block",type:"keyword"}),Fn("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),Fn("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),Fn("import ${module}",{label:"import",detail:"statement",type:"keyword"}),Fn("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],u4=p5(l1,YO(l4.concat(a4)));function vg(t,e){let n=t.baseIndentFor(e),i=t.lineAt(t.pos,-1),o=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&t.node.ton?null:n+t.unit}const wc=hs.define({name:"python",parser:d5.configure({props:[ef.add({Body:t=>{var e;return(e=vg(t,t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except |finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":pc({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":pc({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":pc({closing:"]"}),"String FormatString":()=>null,Script:t=>{if(t.pos+/\s*/.exec(t.textAfter)[0].length>=t.node.to){let e=null;for(let n=t.node,i=n.to;n=n.lastChild,!(!n||n.to!=i);)n.type.name=="Body"&&(e=n);if(e){let n=vg(t,e);if(n!=null)return n}}return t.continue()}}),nf.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":$O,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function c4(){return new TO(wc,[wc.data.of({autocomplete:s4}),wc.data.of({autocomplete:u4})])}const h4="#e5c07b",yg="#e06c75",d4="#56b6c2",f4="#ffffff",Gl="#abb2bf",zh="#7d8799",p4="#61afef",m4="#98c379",Og="#d19a66",g4="#c678dd",v4="#21252b",wg="#2c313a",_g="#282c34",_c="#353a42",y4="#3E4451",bg="#528bff",O4=ve.theme({"&":{color:Gl,backgroundColor:_g},".cm-content":{caretColor:bg},".cm-cursor, .cm-dropCursor":{borderLeftColor:bg},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:y4},".cm-panels":{backgroundColor:v4,color:Gl},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:_g,color:zh,border:"none"},".cm-activeLineGutter":{backgroundColor:wg},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:_c},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:_c,borderBottomColor:_c},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:wg,color:Gl}}},{dark:!0}),w4=qs.define([{tag:W.keyword,color:g4},{tag:[W.name,W.deleted,W.character,W.propertyName,W.macroName],color:yg},{tag:[W.function(W.variableName),W.labelName],color:p4},{tag:[W.color,W.constant(W.name),W.standard(W.name)],color:Og},{tag:[W.definition(W.name),W.separator],color:Gl},{tag:[W.typeName,W.className,W.number,W.changed,W.annotation,W.modifier,W.self,W.namespace],color:h4},{tag:[W.operator,W.operatorKeyword,W.url,W.escape,W.regexp,W.link,W.special(W.string)],color:d4},{tag:[W.meta,W.comment],color:zh},{tag:W.strong,fontWeight:"bold"},{tag:W.emphasis,fontStyle:"italic"},{tag:W.strikethrough,textDecoration:"line-through"},{tag:W.link,color:zh,textDecoration:"underline"},{tag:W.heading,fontWeight:"bold",color:yg},{tag:[W.atom,W.bool,W.special(W.variableName)],color:Og},{tag:[W.processingInstruction,W.string,W.inserted],color:m4},{tag:W.invalid,color:f4}]),xg=[O4,NO(w4)],_4=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=ff(t.state,n.from);return i.line?b4(t):i.block?S4(t):!1};function df(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let o=t(e,n);return o?(i(n.update(o)),!0):!1}}const b4=df(P4,0),x4=df(a1,0),S4=df((t,e)=>a1(t,e,T4(e)),0);function ff(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const wr=50;function k4(t,{open:e,close:n},i,o){let r=t.sliceDoc(i-wr,i),s=t.sliceDoc(o,o+wr),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(s)[0].length,u=r.length-l;if(r.slice(u-e.length,u)==e&&s.slice(a,a+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:o+a,margin:a&&1}};let c,h;o-i<=2*wr?c=h=t.sliceDoc(i,o):(c=t.sliceDoc(i,i+wr),h=t.sliceDoc(o-wr,o));let d=/^\s*/.exec(c)[0].length,f=/\s*$/.exec(h)[0].length,p=h.length-f-n.length;return c.slice(d,d+e.length)==e&&h.slice(p,p+n.length)==n?{open:{pos:i+d+e.length,margin:/\s/.test(c.charAt(d+e.length))?1:0},close:{pos:o-f-n.length,margin:/\s/.test(h.charAt(p-1))?1:0}}:null}function T4(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),o=n.to<=i.to?i:t.doc.lineAt(n.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=o.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:o.to})}return e}function a1(t,e,n=e.selection.ranges){let i=n.map(r=>ff(e,r.from).block);if(!i.every(r=>r))return null;let o=n.map((r,s)=>k4(e,i[s],r.from,r.to));if(t!=2&&!o.every(r=>r))return{changes:e.changes(n.map((r,s)=>o[s]?[]:[{from:r.from,insert:i[s].open+" "},{from:r.to,insert:" "+i[s].close}]))};if(t!=1&&o.some(r=>r)){let r=[];for(let s=0,l;so&&(r==s||s>h.from)){o=h.from;let d=/^\s*/.exec(h.text)[0].length,f=d==h.length,p=h.text.slice(d,d+u.length)==u?d:-1;dr.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:u,empty:c,single:h}of i)(h||!c)&&r.push({from:l.from+u,insert:a+" "});let s=e.changes(r);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:s,comment:l,token:a}of i)if(l>=0){let u=s.from+l,c=u+a.length;s.text[c-s.from]==" "&&c++,r.push({from:u,to:c})}return{changes:r}}return null}const Xh=hi.define(),C4=hi.define(),$4=we.define(),u1=we.define({combine(t){return zn(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,o)=>e(i,o)||n(i,o)})}});function E4(t){let e=0;return t.iterChangedRanges((n,i)=>e=i),e}const c1=wt.define({create(){return Rn.empty},update(t,e){let n=e.state.facet(u1),i=e.annotation(Xh);if(i){let a=e.docChanged?Z.single(E4(e.changes)):void 0,u=Wt.fromTransaction(e,a),c=i.side,h=c==0?t.undone:t.done;return u?h=Ba(h,h.length,n.minDepth,u):h=f1(h,e.startState.selection),new Rn(c==0?i.rest:h,c==0?h:i.rest)}let o=e.annotation(C4);if((o=="full"||o=="before")&&(t=t.isolate()),e.annotation(gt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Wt.fromTransaction(e),s=e.annotation(gt.time),l=e.annotation(gt.userEvent);return r?t=t.addChanges(r,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,l,n.newGroupDelay)),(o=="full"||o=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Rn(t.done.map(Wt.fromJSON),t.undone.map(Wt.fromJSON))}});function M4(t={}){return[c1,u1.of(t),ve.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?h1:e.inputType=="historyRedo"?Uh:null;return i?(e.preventDefault(),i(n)):!1}})]}function Pu(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let o=n.field(c1,!1);if(!o)return!1;let r=o.pop(t,n,e);return r?(i(r),!0):!1}}const h1=Pu(0,!1),Uh=Pu(1,!1),A4=Pu(0,!0),D4=Pu(1,!0);class Wt{constructor(e,n,i,o,r){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=o,this.selectionsAfter=r}setSelAfter(e){return new Wt(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(o=>o.toJSON())}}static fromJSON(e){return new Wt(e.changes&&ft.fromJSON(e.changes),[],e.mapped&&Qn.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,n){let i=ln;for(let o of e.startState.facet($4)){let r=o(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Wt(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,ln)}static selection(e){return new Wt(void 0,ln,void 0,void 0,e)}}function Ba(t,e,n,i){let o=e+1>n+20?e-n-1:0,r=t.slice(o,e);return r.push(i),r}function R4(t,e){let n=[],i=!1;return t.iterChangedRanges((o,r)=>n.push(o,r)),e.iterChangedRanges((o,r,s,l)=>{for(let a=0;a=u&&s<=c&&(i=!0)}}),i}function q4(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function d1(t,e){return t.length?e.length?t.concat(e):t:e}const ln=[],Q4=200;function f1(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Q4));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Ba(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Wt.selection([e])]}function N4(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function bc(t,e){if(!t.length)return t;let n=t.length,i=ln;for(;n;){let o=I4(t[n-1],e,i);if(o.changes&&!o.changes.empty||o.effects.length){let r=t.slice(0,n);return r[n-1]=o,r}else e=o.mapped,n--,i=o.selectionsAfter}return i.length?[Wt.selection(i)]:ln}function I4(t,e,n){let i=d1(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):ln,n);if(!t.changes)return Wt.selection(i);let o=t.changes.map(e),r=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(r):r;return new Wt(o,Pe.mapEffects(t.effects,e),s,t.startSelection.map(r),i)}const V4=/^(input\.type|delete)($|\.)/;class Rn{constructor(e,n,i=0,o=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=o}isolate(){return this.prevTime?new Rn(this.done,this.undone):this}addChanges(e,n,i,o,r){let s=this.done,l=s[s.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||V4.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):Cu(n,e))}function Mt(t){return t.textDirectionAt(t.state.selection.main.head)==tt.LTR}const m1=t=>p1(t,!Mt(t)),g1=t=>p1(t,Mt(t));function v1(t,e){return wn(t,n=>n.empty?t.moveByGroup(n,e):Cu(n,e))}const W4=t=>v1(t,!Mt(t)),L4=t=>v1(t,Mt(t));function z4(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function $u(t,e,n){let i=Ot(t).resolveInner(e.head),o=n?De.closedBy:De.openedBy;for(let a=e.head;;){let u=n?i.childAfter(a):i.childBefore(a);if(!u)break;z4(t,u,o)?i=u:a=n?u.to:u.from}let r=i.type.prop(o),s,l;return r&&(s=n?Dn(t,i.from,1):Dn(t,i.to,-1))&&s.matched?l=n?s.end.to:s.end.from:l=n?i.to:i.from,Z.cursor(l,n?-1:1)}const X4=t=>wn(t,e=>$u(t.state,e,!Mt(t))),U4=t=>wn(t,e=>$u(t.state,e,Mt(t)));function y1(t,e){return wn(t,n=>{if(!n.empty)return Cu(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const O1=t=>y1(t,!1),w1=t=>y1(t,!0);function _1(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):Cu(s,e));if(o.eq(i.selection))return!1;let r;if(n.selfScroll){let s=t.coordsAtPos(i.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,u=l.bottom-n.marginBottom;s&&s.top>a&&s.bottomb1(t,!1),Yh=t=>b1(t,!0);function Ii(t,e,n){let i=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,n);if(o.head==e.head&&o.head!=(n?i.to:i.from)&&(o=t.moveToLineBoundary(e,n,!1)),!n&&o.head==i.from&&i.length){let r=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(o=Z.cursor(i.from+r))}return o}const Y4=t=>wn(t,e=>Ii(t,e,!0)),j4=t=>wn(t,e=>Ii(t,e,!1)),F4=t=>wn(t,e=>Ii(t,e,!Mt(t))),H4=t=>wn(t,e=>Ii(t,e,Mt(t))),G4=t=>wn(t,e=>Z.cursor(t.lineBlockAt(e.head).from,1)),Z4=t=>wn(t,e=>Z.cursor(t.lineBlockAt(e.head).to,-1));function K4(t,e,n){let i=!1,o=cr(t.selection,r=>{let s=Dn(t,r.head,-1)||Dn(t,r.head,1)||r.head>0&&Dn(t,r.head-1,1)||r.headK4(t,e,!1);function hn(t,e){let n=cr(t.state.selection,i=>{let o=e(i);return Z.range(i.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Un(t.state,n)),!0)}function x1(t,e){return hn(t,n=>t.moveByChar(n,e))}const S1=t=>x1(t,!Mt(t)),k1=t=>x1(t,Mt(t));function T1(t,e){return hn(t,n=>t.moveByGroup(n,e))}const e3=t=>T1(t,!Mt(t)),t3=t=>T1(t,Mt(t)),n3=t=>hn(t,e=>$u(t.state,e,!Mt(t))),i3=t=>hn(t,e=>$u(t.state,e,Mt(t)));function P1(t,e){return hn(t,n=>t.moveVertically(n,e))}const C1=t=>P1(t,!1),$1=t=>P1(t,!0);function E1(t,e){return hn(t,n=>t.moveVertically(n,e,_1(t).height))}const kg=t=>E1(t,!1),Tg=t=>E1(t,!0),o3=t=>hn(t,e=>Ii(t,e,!0)),r3=t=>hn(t,e=>Ii(t,e,!1)),s3=t=>hn(t,e=>Ii(t,e,!Mt(t))),l3=t=>hn(t,e=>Ii(t,e,Mt(t))),a3=t=>hn(t,e=>Z.cursor(t.lineBlockAt(e.head).from)),u3=t=>hn(t,e=>Z.cursor(t.lineBlockAt(e.head).to)),Pg=({state:t,dispatch:e})=>(e(Un(t,{anchor:0})),!0),Cg=({state:t,dispatch:e})=>(e(Un(t,{anchor:t.doc.length})),!0),$g=({state:t,dispatch:e})=>(e(Un(t,{anchor:t.selection.main.anchor,head:0})),!0),Eg=({state:t,dispatch:e})=>(e(Un(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),c3=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),h3=({state:t,dispatch:e})=>{let n=Mu(t).map(({from:i,to:o})=>Z.range(i,Math.min(o+1,t.doc.length)));return e(t.update({selection:Z.create(n),userEvent:"select"})),!0},d3=({state:t,dispatch:e})=>{let n=cr(t.selection,i=>{var o;let r=Ot(t).resolveInner(i.head,1);for(;!(r.from=i.to||r.to>i.to&&r.from<=i.from||!(!((o=r.parent)===null||o===void 0)&&o.parent));)r=r.parent;return Z.range(r.to,r.from)});return e(Un(t,n)),!0},f3=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=Z.create([n.main]):n.main.empty||(i=Z.create([Z.cursor(n.main.head)])),i?(e(Un(t,i)),!0):!1};function Eu(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,o=i.changeByRange(r=>{let{from:s,to:l}=r;if(s==l){let a=e(s);as&&(n="delete.forward",a=yl(t,a,!0)),s=Math.min(s,a),l=Math.max(l,a)}else s=yl(t,s,!1),l=yl(t,l,!0);return s==l?{range:r}:{changes:{from:s,to:l},range:Z.cursor(s)}});return o.changes.empty?!1:(t.dispatch(i.update(o,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ve.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function yl(t,e,n){if(t instanceof ve)for(let i of t.state.facet(ve.atomicRanges).map(o=>o(t)))i.between(e,e,(o,r)=>{oe&&(e=n?r:o)});return e}const M1=(t,e)=>Eu(t,n=>{let{state:i}=t,o=i.doc.lineAt(n),r,s;if(!e&&n>o.from&&nM1(t,!1),A1=t=>M1(t,!0),D1=(t,e)=>Eu(t,n=>{let i=n,{state:o}=t,r=o.doc.lineAt(i),s=o.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==n&&r.number!=(e?o.doc.lines:1)&&(i+=e?1:-1);break}let a=Et(r.text,i-r.from,e)+r.from,u=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=s(u);if(l!=null&&c!=l)break;(u!=" "||i!=n)&&(l=c),i=a}return i}),R1=t=>D1(t,!1),p3=t=>D1(t,!0),q1=t=>Eu(t,e=>{let n=t.lineBlockAt(e).to;return eEu(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),g3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Be.of(["",""])},range:Z.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},v3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let o=i.from,r=t.doc.lineAt(o),s=o==r.from?o-1:Et(r.text,o-r.from,!1)+r.from,l=o==r.to?o+1:Et(r.text,o-r.from,!0)+r.from;return{changes:{from:s,to:l,insert:t.doc.slice(o,l).append(t.doc.slice(s,o))},range:Z.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Mu(t){let e=[],n=-1;for(let i of t.selection.ranges){let o=t.doc.lineAt(i.from),r=t.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=t.doc.lineAt(i.to-1)),n>=o.number){let s=e[e.length-1];s.to=r.to,s.ranges.push(i)}else e.push({from:o.from,to:r.to,ranges:[i]});n=r.number+1}return e}function Q1(t,e,n){if(t.readOnly)return!1;let i=[],o=[];for(let r of Mu(t)){if(n?r.to==t.doc.length:r.from==0)continue;let s=t.doc.lineAt(n?r.to+1:r.from-1),l=s.length+1;if(n){i.push({from:r.to,to:s.to},{from:r.from,insert:s.text+t.lineBreak});for(let a of r.ranges)o.push(Z.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{i.push({from:s.from,to:r.from},{from:r.to,insert:t.lineBreak+s.text});for(let a of r.ranges)o.push(Z.range(a.anchor-l,a.head-l))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:Z.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const y3=({state:t,dispatch:e})=>Q1(t,e,!1),O3=({state:t,dispatch:e})=>Q1(t,e,!0);function N1(t,e,n){if(t.readOnly)return!1;let i=[];for(let o of Mu(t))n?i.push({from:o.from,insert:t.doc.slice(o.from,o.to)+t.lineBreak}):i.push({from:o.to,insert:t.lineBreak+t.doc.slice(o.from,o.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const w3=({state:t,dispatch:e})=>N1(t,e,!1),_3=({state:t,dispatch:e})=>N1(t,e,!0),b3=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Mu(e).map(({from:o,to:r})=>(o>0?o--:rt.moveVertically(o,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function x3(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ot(t).resolveInner(e),i=n.childBefore(e),o=n.childAfter(e),r;return i&&o&&i.to<=e&&o.from>=e&&(r=i.type.prop(De.closedBy))&&r.indexOf(o.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(i.to,o.from))?{from:i.to,to:o.from}:null}const S3=I1(!1),k3=I1(!0);function I1(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(o=>{let{from:r,to:s}=o,l=e.doc.lineAt(r),a=!t&&r==s&&x3(e,r);t&&(r=s=(s<=l.to?l:e.doc.lineAt(s)).to);let u=new bu(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=Jd(u,r);for(c==null&&(c=ar(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));sl.from&&r{let o=[];for(let s=i.from;s<=i.to;){let l=t.doc.lineAt(s);l.number>n&&(i.empty||i.to>l.from)&&(e(l,o,i),n=l.number),s=l.to+1}let r=t.changes(o);return{changes:o,range:Z.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const T3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new bu(t,{overrideIndentation:r=>{let s=n[r];return s??-1}}),o=pf(t,(r,s,l)=>{let a=Jd(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let u=/^\s*/.exec(r.text)[0],c=ds(t,a);(u!=c||l.fromt.readOnly?!1:(e(t.update(pf(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Ds)})}),{userEvent:"input.indent"})),!0),B1=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(pf(t,(n,i)=>{let o=/^\s*/.exec(n.text)[0];if(!o)return;let r=ar(o,t.tabSize),s=0,l=ds(t,Math.max(0,r-Qa(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),$3=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:X4,shift:n3},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:U4,shift:i3},{key:"Alt-ArrowUp",run:y3},{key:"Shift-Alt-ArrowUp",run:w3},{key:"Alt-ArrowDown",run:O3},{key:"Shift-Alt-ArrowDown",run:_3},{key:"Escape",run:f3},{key:"Mod-Enter",run:k3},{key:"Alt-l",mac:"Ctrl-l",run:h3},{key:"Mod-i",run:d3,preventDefault:!0},{key:"Mod-[",run:B1},{key:"Mod-]",run:V1},{key:"Mod-Alt-\\",run:T3},{key:"Shift-Mod-k",run:b3},{key:"Shift-Mod-\\",run:J4},{key:"Mod-/",run:_4},{key:"Alt-A",run:x4}].concat(C3),E3={key:"Tab",run:V1,shift:B1};function je(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i];typeof o=="string"?t.setAttribute(i,o):o!=null&&(t[i]=o)}e++}for(;et.normalize("NFKD"):t=>t;class nr{constructor(e,n,i=0,o=e.length,r,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,o),this.bufferStart=i,this.normalize=r?l=>r(Mg(l)):Mg,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return St(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Ld(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=sn(e);let o=this.normalize(n);for(let r=0,s=i;;r++){let l=o.charCodeAt(r),a=this.match(l,s);if(r==o.length-1){if(a)return this.value=a,this;break}s==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,o=i+n[0].length;if(this.matchPos=Wa(this.text,o+(i==o?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,o,n)))return this.value={from:i,to:o,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||o.to<=n){let l=new Xo(n,e.sliceString(n,i));return xc.set(e,l),l}if(o.from==n&&o.to==i)return o;let{text:r,from:s}=o;return s>n&&(r=e.sliceString(n,s)+r,s=n),o.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,o=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,o,n)))return this.value={from:i,to:o,match:n},this.matchPos=Wa(this.text,o+(i==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Xo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(z1.prototype[Symbol.iterator]=X1.prototype[Symbol.iterator]=function(){return this});function M3(t){try{return new RegExp(t,mf),!0}catch{return!1}}function Wa(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Fh(t){let e=je("input",{class:"cm-textfield",name:"line"}),n=je("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:La.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},je("label",t.state.phrase("Go to line"),": ",e)," ",je("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!o)return;let{state:r}=t,s=r.doc.lineAt(r.selection.main.head),[,l,a,u,c]=o,h=u?+u.slice(1):0,d=a?+a:s.number;if(a&&c){let g=d/100;l&&(g=g*(l=="-"?-1:1)+s.number/r.doc.lines),d=Math.round(r.doc.lines*g)}else a&&l&&(d=d*(l=="-"?-1:1)+s.number);let f=r.doc.line(Math.max(1,Math.min(r.doc.lines,d))),p=Z.cursor(f.from+Math.max(0,Math.min(h,f.length)));t.dispatch({effects:[La.of(!1),ve.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:n}}const La=Pe.define(),Ag=wt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(La)&&(t=n.value);return t},provide:t=>cs.from(t,e=>e?Fh:null)}),A3=t=>{let e=us(t,Fh);if(!e){let n=[La.of(!0)];t.state.field(Ag,!1)==null&&n.push(Pe.appendConfig.of([Ag,D3])),t.dispatch({effects:n}),e=us(t,Fh)}return e&&e.dom.querySelector("input").focus(),!0},D3=ve.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),R3={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},U1=we.define({combine(t){return zn(t,R3,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function q3(t){let e=[B3,V3];return t&&e.push(U1.of(t)),e}const Q3=xe.mark({class:"cm-selectionMatch"}),N3=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Dg(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Je.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Je.Word)}function I3(t,e,n,i){return t(e.sliceDoc(n,n+1))==Je.Word&&t(e.sliceDoc(i-1,i))==Je.Word}const V3=ht.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(U1),{state:n}=t,i=n.selection;if(i.ranges.length>1)return xe.none;let o=i.main,r,s=null;if(o.empty){if(!e.highlightWordAroundCursor)return xe.none;let a=n.wordAt(o.head);if(!a)return xe.none;s=n.charCategorizer(o.head),r=n.sliceDoc(a.from,a.to)}else{let a=o.to-o.from;if(a200)return xe.none;if(e.wholeWords){if(r=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!(Dg(s,n,o.from,o.to)&&I3(s,n,o.from,o.to)))return xe.none}else if(r=n.sliceDoc(o.from,o.to).trim(),!r)return xe.none}let l=[];for(let a of t.visibleRanges){let u=new nr(n.doc,r,a.from,a.to);for(;!u.next().done;){let{from:c,to:h}=u.value;if((!s||Dg(s,n,c,h))&&(o.empty&&c<=o.from&&h>=o.to?l.push(N3.range(c,h)):(c>=o.to||h<=o.from)&&l.push(Q3.range(c,h)),l.length>e.maxMatches))return xe.none}}return xe.set(l)}},{decorations:t=>t.decorations}),B3=ve.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),W3=({state:t,dispatch:e})=>{let{selection:n}=t,i=Z.create(n.ranges.map(o=>t.wordAt(o.head)||Z.cursor(o.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function L3(t,e){let{main:n,ranges:i}=t.selection,o=t.wordAt(n.head),r=o&&o.from==n.from&&o.to==n.to;for(let s=!1,l=new nr(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(s)return null;l=new nr(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(a=>a.from==l.value.from))continue;if(r){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const z3=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(r=>r.from===r.to))return W3({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(r=>t.sliceDoc(r.from,r.to)!=i))return!1;let o=L3(t,i);return o?(e(t.update({selection:t.selection.addRange(Z.range(o.from,o.to),!1),effects:ve.scrollIntoView(o.to)})),!0):!1},hr=we.define({combine(t){return zn(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new tR(e),scrollToMatch:e=>ve.scrollIntoView(e)})}});class Y1{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||M3(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new j3(this):new U3(this)}getCursor(e,n=0,i){let o=e.doc?e:qe.create({doc:e});return i==null&&(i=o.doc.length),this.regexp?xo(this,o,n,i):bo(this,o,n,i)}}class j1{constructor(e){this.spec=e}}function bo(t,e,n,i){return new nr(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:o=>o.toLowerCase(),t.wholeWord?X3(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function X3(t,e){return(n,i,o,r)=>((r>n||r+o.length=n)return null;o.push(i.value)}return o}highlight(e,n,i,o){let r=bo(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)o(r.value.from,r.value.to)}}function xo(t,e,n,i){return new z1(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Y3(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function za(t,e){return t.slice(Et(t,e,!1),e)}function Xa(t,e){return t.slice(e,Et(t,e))}function Y3(t){return(e,n,i)=>!i[0].length||(t(za(i.input,i.index))!=Je.Word||t(Xa(i.input,i.index))!=Je.Word)&&(t(Xa(i.input,i.index+i[0].length))!=Je.Word||t(za(i.input,i.index+i[0].length))!=Je.Word)}class j3 extends j1{nextMatch(e,n,i){let o=xo(this.spec,e,i,e.doc.length).next();return o.done&&(o=xo(this.spec,e,0,n).next()),o.done?null:o.value}prevMatchInRange(e,n,i){for(let o=1;;o++){let r=Math.max(n,i-o*1e4),s=xo(this.spec,e,r,i),l=null;for(;!s.next().done;)l=s.value;if(l&&(r==n||l.from>r+10))return l;if(r==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;o.push(i.value)}return o}highlight(e,n,i,o){let r=xo(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)o(r.value.from,r.value.to)}}const ys=Pe.define(),gf=Pe.define(),Mi=wt.define({create(t){return new Sc(Hh(t).create(),null)},update(t,e){for(let n of e.effects)n.is(ys)?t=new Sc(n.value.create(),t.panel):n.is(gf)&&(t=new Sc(t.query,n.value?vf:null));return t},provide:t=>cs.from(t,e=>e.panel)});class Sc{constructor(e,n){this.query=e,this.panel=n}}const F3=xe.mark({class:"cm-searchMatch"}),H3=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),G3=ht.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Mi))}update(t){let e=t.state.field(Mi);(e!=t.startState.field(Mi)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,i=new Ai;for(let o=0,r=n.visibleRanges,s=r.length;or[o+1].from-2*250;)a=r[++o].to;t.highlight(n.state,l,a,(u,c)=>{let h=n.state.selection.ranges.some(d=>d.from==u&&d.to==c);i.add(u,c,h?H3:F3)})}return i.finish()}},{decorations:t=>t.decorations});function Ns(t){return e=>{let n=e.state.field(Mi,!1);return n&&n.query.spec.valid?t(e,n):G1(e)}}const Ua=Ns((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let o=Z.single(i.from,i.to),r=t.state.facet(hr);return t.dispatch({selection:o,effects:[yf(t,i),r.scrollToMatch(o.main,t)],userEvent:"select.search"}),H1(t),!0}),Ya=Ns((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,o=e.prevMatch(n,i,i);if(!o)return!1;let r=Z.single(o.from,o.to),s=t.state.facet(hr);return t.dispatch({selection:r,effects:[yf(t,o),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),H1(t),!0}),Z3=Ns((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Z.create(n.map(i=>Z.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),K3=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:o}=n.main,r=[],s=0;for(let l=new nr(t.doc,t.sliceDoc(i,o));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(s=r.length),r.push(Z.range(l.value.from,l.value.to))}return e(t.update({selection:Z.create(r,s),userEvent:"select.search.matches"})),!0},Rg=Ns((t,{query:e})=>{let{state:n}=t,{from:i,to:o}=n.selection.main;if(n.readOnly)return!1;let r=e.nextMatch(n,i,i);if(!r)return!1;let s=[],l,a,u=[];if(r.from==i&&r.to==o&&(a=n.toText(e.getReplacement(r)),s.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(n,r.from,r.to),u.push(ve.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),r){let c=s.length==0||s[0].from>=r.to?0:r.to-r.from-a.length;l=Z.single(r.from-c,r.to-c),u.push(yf(t,r)),u.push(n.facet(hr).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:u,userEvent:"input.replace"}),!0}),J3=Ns((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(o=>{let{from:r,to:s}=o;return{from:r,to:s,insert:e.getReplacement(o)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ve.announce.of(i),userEvent:"input.replace.all"}),!0});function vf(t){return t.state.facet(hr).createPanel(t)}function Hh(t,e){var n,i,o,r,s;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let u=t.facet(hr);return new Y1({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(o=e==null?void 0:e.literal)!==null&&o!==void 0?o:u.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function F1(t){let e=us(t,vf);return e&&e.dom.querySelector("[main-field]")}function H1(t){let e=F1(t);e&&e==t.root.activeElement&&e.select()}const G1=t=>{let e=t.state.field(Mi,!1);if(e&&e.panel){let n=F1(t);if(n&&n!=t.root.activeElement){let i=Hh(t.state,e.query.spec);i.valid&&t.dispatch({effects:ys.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[gf.of(!0),e?ys.of(Hh(t.state,e.query.spec)):Pe.appendConfig.of(iR)]});return!0},Z1=t=>{let e=t.state.field(Mi,!1);if(!e||!e.panel)return!1;let n=us(t,vf);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:gf.of(!1)}),!0},eR=[{key:"Mod-f",run:G1,scope:"editor search-panel"},{key:"F3",run:Ua,shift:Ya,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ua,shift:Ya,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Z1,scope:"editor search-panel"},{key:"Mod-Shift-l",run:K3},{key:"Alt-g",run:A3},{key:"Mod-d",run:z3,preventDefault:!0}];class tR{constructor(e){this.view=e;let n=this.query=e.state.field(Mi).query.spec;this.commit=this.commit.bind(this),this.searchField=je("input",{value:n.search,placeholder:Yt(e,"Find"),"aria-label":Yt(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=je("input",{value:n.replace,placeholder:Yt(e,"Replace"),"aria-label":Yt(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=je("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=je("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=je("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(o,r,s){return je("button",{class:"cm-button",name:o,onclick:r,type:"button"},s)}this.dom=je("div",{onkeydown:o=>this.keydown(o),class:"cm-search"},[this.searchField,i("next",()=>Ua(e),[Yt(e,"next")]),i("prev",()=>Ya(e),[Yt(e,"previous")]),i("select",()=>Z3(e),[Yt(e,"all")]),je("label",null,[this.caseField,Yt(e,"match case")]),je("label",null,[this.reField,Yt(e,"regexp")]),je("label",null,[this.wordField,Yt(e,"by word")]),...e.state.readOnly?[]:[je("br"),this.replaceField,i("replace",()=>Rg(e),[Yt(e,"replace")]),i("replaceAll",()=>J3(e),[Yt(e,"replace all")])],je("button",{name:"close",onclick:()=>Z1(e),"aria-label":Yt(e,"close"),type:"button"},["×"])])}commit(){let e=new Y1({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ys.of(e)}))}keydown(e){xA(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ya:Ua)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Rg(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(ys)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(hr).top}}function Yt(t,e){return t.state.phrase(e)}const Ol=30,wl=/[\s\.,:;?!]/;function yf(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),o=t.state.doc.lineAt(n).to,r=Math.max(i.from,e-Ol),s=Math.min(o,n+Ol),l=t.state.sliceDoc(r,s);if(r!=i.from){for(let a=0;al.length-Ol;a--)if(!wl.test(l[a-1])&&wl.test(l[a])){l=l.slice(0,a);break}}return ve.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const nR=ve.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),iR=[Mi,go.low(G3),nR];class oR{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Ui{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let o=e,r=i.facet(ew).markerFilter;r&&(o=r(o));let s=xe.set(o.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?xe.widget({widget:new fR(l),diagnostic:l}).range(l.from):xe.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new Ui(s,n,ir(s))}}function ir(t,e=null,n=0){let i=null;return t.between(n,1e9,(o,r,{spec:s})=>{if(!(e&&s.diagnostic!=e))return i=new oR(o,r,s.diagnostic),!1}),i}function rR(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(i=>i.is(K1))||t.changes.touchesRange(n.from,n.to))}function sR(t,e){return t.field(Jt,!1)?e:e.concat(Pe.appendConfig.of(gR))}const K1=Pe.define(),Of=Pe.define(),J1=Pe.define(),Jt=wt.define({create(){return new Ui(xe.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);i=ir(n,t.selected.diagnostic,o)||ir(n,null,o)}t=new Ui(n,t.panel,i)}for(let n of e.effects)n.is(K1)?t=Ui.init(n.value,t.panel,e.state):n.is(Of)?t=new Ui(t.diagnostics,n.value?Au.open:null,t.selected):n.is(J1)&&(t=new Ui(t.diagnostics,t.panel,n.value));return t},provide:t=>[cs.from(t,e=>e.panel),ve.decorations.from(t,e=>e.diagnostics)]}),lR=xe.mark({class:"cm-lintRange cm-lintRange-active"});function aR(t,e,n){let{diagnostics:i}=t.state.field(Jt),o=[],r=2e8,s=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(a,u,{spec:c})=>{e>=a&&e<=u&&(a==u||(e>a||n>0)&&(enw(t,n,!1)))}const cR=t=>{let e=t.state.field(Jt,!1);(!e||!e.panel)&&t.dispatch({effects:sR(t.state,[Of.of(!0)])});let n=us(t,Au.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},qg=t=>{let e=t.state.field(Jt,!1);return!e||!e.panel?!1:(t.dispatch({effects:Of.of(!1)}),!0)},hR=t=>{let e=t.state.field(Jt,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},dR=[{key:"Mod-Shift-m",run:cR,preventDefault:!0},{key:"F8",run:hR}],ew=we.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},zn(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function tw(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;ir.toLowerCase()==o.toLowerCase())){e.push(o);continue e}}e.push("")}return e}function nw(t,e,n){var i;let o=n?tw(e.actions):[];return je("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},je("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,s)=>{let l=!1,a=d=>{if(d.preventDefault(),l)return;l=!0;let f=ir(t.state.field(Jt).diagnostics,e);f&&r.apply(t,f.from,f.to)},{name:u}=r,c=o[s]?u.indexOf(o[s]):-1,h=c<0?u:[u.slice(0,c),je("u",u.slice(c,c+1)),u.slice(c+1)];return je("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${u}${c<0?"":` (access key "${o[s]})"`}.`},h)}),e.source&&je("div",{class:"cm-diagnosticSource"},e.source))}class fR extends Xn{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return je("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Qg{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=nw(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Au{constructor(e){this.view=e,this.items=[];let n=o=>{if(o.keyCode==27)qg(this.view),this.view.focus();else if(o.keyCode==38||o.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(o.keyCode==40||o.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(o.keyCode==36)this.moveSelection(0);else if(o.keyCode==35)this.moveSelection(this.items.length-1);else if(o.keyCode==13)this.view.focus();else if(o.keyCode>=65&&o.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],s=tw(r.actions);for(let l=0;l{for(let r=0;rqg(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Jt).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let h=i;hi&&(this.items.splice(i,u-i),o=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{s.topl.bottom&&(this.list.scrollTop+=s.bottom-l.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Jt),i=ir(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:J1.of(i)})}static open(e){return new Au(e)}}function pR(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function _l(t){return pR(``,'width="6" height="3"')}const mR=ve.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:_l("#d11")},".cm-lintRange-warning":{backgroundImage:_l("orange")},".cm-lintRange-info":{backgroundImage:_l("#999")},".cm-lintRange-hint":{backgroundImage:_l("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),gR=[Jt,ve.decorations.compute([Jt],t=>{let{selected:e,panel:n}=t.field(Jt);return!e||!n||e.from==e.to?xe.none:xe.set([lR.range(e.from,e.to)])}),cD(aR,{hideOn:rR}),mR],vR=(()=>[OD(),bD(),BA(),M4(),FD(),$A(),RA(),qe.allowMultipleSelections.of(!0),qD(),NO(KD,{fallback:!0}),r8(),Y5(),i4(),eD(),iD(),YA(),q3(),Ms.of([...G5,...$3,...eR,...B4,...XD,...o1,...dR])])();/*! -* VueCodemirror v6.1.1 -* Copyright (c) Surmon. All rights reserved. -* Released under the MIT License. -* Surmon -*/var yR=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[vR]}),OR=Symbol("vue-codemirror-global-config"),Rt,wR=function(t){var e=t.onUpdate,n=t.onChange,i=t.onFocus,o=t.onBlur,r=function(s,l){var a={};for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&l.indexOf(u)<0&&(a[u]=s[u]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(s);c{o.value=d,e("update:code",o.value)},l=(d,f)=>{r.value=d,e("update:open",r.value),f&&e("save",o.value)};Me(()=>n.code,d=>{o.value=d}),Me(()=>n.open,d=>{r.value=d});const a=ve.theme({".cm-content":{fontFamily:"Cascadia Code, Consolas, Monaco, Menlo, Ubuntu Mono, Liberation Mono, DejaVu Sans Mono, Courier New, monospace",fontSize:"24px"}}),u={python:{extensions:[c4(),xg,a],tabSize:4},json:{extensions:[f8(),xg,a],tabSize:2}},c=Rl(),h=d=>{c.value=d.view};return(d,f)=>{const p=C("a-typography-text"),g=C("a-space"),w=C("a-modal");return M(),H(w,{open:O(r),width:"80vw",onOk:f[2]||(f[2]=y=>l(!1,!0)),onCancel:f[3]||(f[3]=y=>l(!1,!1))},{title:v(()=>[m(g,null,{default:v(()=>[m(O(C_)),ge(" "+pe(O(i)("components.codeEditorModal.title"))+" ",1),m(p,{copyable:{text:n.code}},{copyableTooltip:v(({copied:y})=>[y?(M(),se("span",CR,pe(O(i)("components.codeEditorModal.copy_success")),1)):(M(),se("span",PR,pe(O(i)("components.codeEditorModal.copy_code")),1))]),_:1},8,["copyable"])]),_:1})]),default:v(()=>[m(O(TR),{class:"code-editor",modelValue:O(o),"onUpdate:modelValue":f[0]||(f[0]=y=>xs(o)?o.value=y:o=y),placeholder:O(i)("components.codeEditorModal.please_enter_code"),style:{height:"80vh",minHeight:"400px"},autofocus:!0,"indent-with-tab":!0,"tab-size":u[n.language].tabSize,extensions:u[n.language].extensions,onReady:h,onChange:f[1]||(f[1]=y=>s(y))},null,8,["modelValue","placeholder","tab-size","extensions"])]),_:1},8,["open"])}}},$R={__name:"ProgrammingFunction",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"tools.programming_function",has_inputs:!0,template:{language:{required:!0,placeholder:"",show:!1,multiline:!1,value:"python",password:!1,options:[{value:"python",label:"Python"}],name:"language",display_name:"language",type:"str",clear_after_run:!0,list:!1,field_type:"select"},code:{required:!0,placeholder:"some code...",show:!1,multiline:!0,value:"",password:!1,name:"code",display_name:"code",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},list_input:{required:!0,placeholder:"",show:!1,multiline:!0,value:!1,password:!1,name:"list_input",display_name:"list_input",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);i.value.list_input||(i.value.list_input={required:!0,placeholder:"",show:!0,multiline:!0,value:!1,password:!1,name:"list_input",display_name:"list_input",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"});const o=zt({required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"",display_name:"",type:"str",clear_after_run:!1,list:!1,field_type:"input"}),r=h=>{o.multiline=h=="textarea"},s=oe(!1),l=()=>{s.value=!0},a=()=>{o.name=o.display_name,i.value[o.name]=JSON.parse(JSON.stringify(o)),s.value=!1},u=h=>{delete i.value[h]},c=zt({open:!1,code:""});return(h,d)=>{const f=C("a-select"),p=C("a-col"),g=C("a-textarea"),w=C("a-input"),y=C("a-button"),_=C("a-select-option"),T=C("a-form-item"),b=C("a-form"),k=C("a-drawer"),x=C("a-typography-paragraph"),$=C("a-checkbox"),L=C("a-row"),V=C("a-divider");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.tools.ProgrammingFunction.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/tools#h2-4"},{main:v(()=>[m(L,{type:"flex"},{default:v(()=>[m(p,{span:24},{default:v(()=>[m(F,{id:"language",name:i.value.language.display_name,required:"",type:"target",onDelete:d[1]||(d[1]=R=>u(h.field)),show:i.value.language.show,"onUpdate:show":d[2]||(d[2]=R=>i.value.language.show=R)},{default:v(()=>[m(f,{class:"field-content",style:{width:"100%"},value:i.value.language.value,"onUpdate:value":d[0]||(d[0]=R=>i.value.language.value=R),options:i.value.language.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),(M(!0),se(Te,null,rt(Object.keys(i.value),(R,z)=>(M(),se(Te,{key:z},[["language","code","output","list_input"].includes(R)?Oe("",!0):(M(),H(p,{key:0,span:24},{default:v(()=>[m(F,{id:R,name:`${i.value[R].display_name}: ${i.value[R].type}`,required:"",type:"target",deletable:"",onDelete:j=>u(R),show:i.value[R].show,"onUpdate:show":j=>i.value[R].show=j},{default:v(()=>[i.value[R].field_type=="select"?(M(),H(f,{key:0,class:"field-content",style:{width:"100%"},value:i.value[R].value,"onUpdate:value":j=>i.value[R].value=j,options:i.value[R].options},null,8,["value","onUpdate:value","options"])):i.value[R].field_type=="textarea"?(M(),H(g,{key:1,class:"field-content",value:i.value[R].value,"onUpdate:value":j=>i.value[R].value=j,autoSize:!0,showCount:!0,placeholder:i.value[R].placeholder},null,8,["value","onUpdate:value","placeholder"])):i.value[R].field_type=="input"?(M(),H(w,{key:2,class:"field-content",value:i.value[R].value,"onUpdate:value":j=>i.value[R].value=j,placeholder:i.value[R].placeholder},null,8,["value","onUpdate:value","placeholder"])):Oe("",!0)]),_:2},1032,["id","name","onDelete","show","onUpdate:show"])]),_:2},1024))],64))),128)),m(p,{span:24,style:{padding:"10px"}},{default:v(()=>[m(y,{type:"dashed",style:{width:"100%"},onClick:l},{default:v(()=>[m(O(kv)),ge(" "+pe(O(n)("components.nodes.tools.ProgrammingFunction.add_parameter")),1)]),_:1}),m(k,{open:s.value,"onUpdate:open":d[5]||(d[5]=R=>s.value=R),class:"custom-class",style:{color:"red"},title:O(n)("components.nodes.tools.ProgrammingFunction.add_parameter"),placement:"right"},{extra:v(()=>[m(y,{type:"primary",onClick:a},{default:v(()=>[ge(pe(O(n)("common.add")),1)]),_:1})]),default:v(()=>[m(b,null,{default:v(()=>[m(T,{label:O(n)("components.nodes.tools.ProgrammingFunction.add_parameter_type")},{default:v(()=>[m(f,{value:o.type,"onUpdate:value":d[3]||(d[3]=R=>o.type=R),style:{width:"120px"},onChange:r},{default:v(()=>[m(_,{value:"str"},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_str")),1)]),_:1}),m(_,{value:"int"},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_int")),1)]),_:1}),m(_,{value:"float"},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_float")),1)]),_:1}),m(_,{value:"bool"},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_bool")),1)]),_:1}),m(_,{value:"list"},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_list")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),m(T,{label:O(n)("components.nodes.tools.ProgrammingFunction.add_parameter_name")},{default:v(()=>[m(w,{value:o.display_name,"onUpdate:value":d[4]||(d[4]=R=>o.display_name=R)},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["open","title"])]),_:1}),m(p,{span:24},{default:v(()=>[m(F,{id:"code",name:O(n)("components.nodes.tools.ProgrammingFunction.code"),required:"",type:"target",show:i.value.code.show,"onUpdate:show":d[9]||(d[9]=R=>i.value.code.show=R)},{default:v(()=>[m(x,{ellipsis:{row:1,expandable:!1},content:i.value.code.value},null,8,["content"]),m(y,{type:"primary",onClick:d[6]||(d[6]=R=>c.open=!0)},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.ProgrammingFunction.open_editor")),1)]),_:1}),m(ow,{language:i.value.language.value,open:c.open,"onUpdate:open":d[7]||(d[7]=R=>c.open=R),code:i.value.code.value,"onUpdate:code":d[8]||(d[8]=R=>i.value.code.value=R)},null,8,["language","open","code"])]),_:1},8,["name","show"])]),_:1}),m(p,{span:24},{default:v(()=>[m(F,{id:"list_input",name:O(n)("components.nodes.tools.ProgrammingFunction.list_input"),required:"",type:"target",show:i.value.list_input.show,"onUpdate:show":d[11]||(d[11]=R=>i.value.list_input.show=R)},{inline:v(()=>[m($,{checked:i.value.list_input.value,"onUpdate:checked":d[10]||(d[10]=R=>i.value.list_input.value=R)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1}),m(V)]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.tools.ProgrammingFunction.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},ER=Object.freeze(Object.defineProperty({__proto__:null,default:$R},Symbol.toStringTag,{value:"Module"}));const MR={__name:"WorkflowSelect",props:{modelValue:{}},emits:xv(["selected"],["update:modelValue"]),setup(t,{emit:e}){const n=lu(t,"modelValue"),{t:i}=Ee(),o=oe(!0),r=Ss(),{userDatabases:s}=Ji(r),l=oe([]);su(async()=>{const[h,d]=await Promise.all([a.load({}),Sv("list",{})]);d.status==200&&(l.value=d.data),o.value=!1});const a=zt({columns:[{name:i("workspace.workflowSpaceMain.workflow_title"),dataIndex:"title",key:"title"},{title:i("workspace.workflowSpaceMain.tags"),key:"tags",dataIndex:"tags",filters:ye(()=>l.value.map(h=>({text:h.title,value:h.tid}))),width:"300px"},{title:i("workspace.workflowSpaceMain.update_time"),key:"update_time",dataIndex:"update_time",sorter:!0,sortDirections:["descend","ascend"],width:"200px"}],data:[],loading:!1,current:1,pageSize:10,total:0,pagination:ye(()=>({total:a.total,current:a.current,pageSize:a.pageSize})),selectTag:"all",selectTagChange:async()=>{a.loading=!0,await a.load({tags:[a.selectTag]}),a.loading=!1},searching:!1,searchText:"",hoverRowWid:null,customRow:h=>({style:{cursor:"pointer"},onClick:async d=>{(d.target.classList.contains("ant-table-cell")||d.target.classList.contains("workflow-title"))&&(await c(h.wid),e("selected",n.value))},onMouseenter:d=>{a.hoverRowWid=h.wid},onMouseleave:d=>{a.hoverRowWid=null}}),searchWorkflows:async()=>{a.loading=!0,a.searching=!0,await a.load({search_text:a.searchText}),a.searching=!1,a.loading=!1},clearSearch:async()=>{a.loading=!0,a.searching=!0,a.searchText="",await a.load({}),a.searching=!1,a.loading=!1},handleTableChange:(h,d,f)=>{a.load({page_size:h.pageSize,page:h.current,sort_field:f.field,sort_order:f.order,tags:d.tags,search_text:a.searchText})},load:async h=>{a.loading=!0;const d=await la("list",h);d.status==200?a.data=d.data.workflows.map(f=>(f.create_time=new Date(parseInt(f.create_time)).toLocaleString(),f.update_time=new Date(parseInt(f.update_time)).toLocaleString(),f)):To.error(d.msg),a.total=d.data.total,a.pageSize=d.data.page_size,a.current=d.data.page,a.loading=!1}}),u=oe({}),c=async h=>{o.value=!0;const d=await la("get",{wid:h});if(d.status!=200){To.error(i("workspace.workflowSpace.get_workflow_failed"));return}u.value=d.data,u.value.data.nodes.forEach(g=>{g.category=="vectorDb"&&(g.data.template.database.options=s.value.filter(w=>w.status=="VALID").map(w=>({value:w.vid,label:w.name})))});const f=dd(u.value),p=zt(f);n.value={wid:h,title:u.value.title,inputFields:p.inputFields,outputNodes:p.outputNodes,workflowInvokeOutputNodes:p.workflowInvokeOutputNodes},o.value=!1};return(h,d)=>{const f=C("a-input-search"),p=C("a-button"),g=C("a-space"),w=C("a-col"),y=C("a-row"),_=C("a-typography-text"),T=C("a-tag"),b=C("a-table"),k=C("a-spin");return M(),H(k,{spinning:o.value},{default:v(()=>[m(y,{justify:"space-between",align:"middle",gutter:[16,16]},{default:v(()=>[m(w,{span:24},{default:v(()=>[m(y,{type:"flex",align:"middle",justify:"space-between"},{default:v(()=>[m(w,{flex:"auto"},{default:v(()=>[m(g,null,{default:v(()=>[m(f,{value:a.searchText,"onUpdate:value":d[0]||(d[0]=x=>a.searchText=x),placeholder:O(i)("workspace.workflowSpaceMain.input_search_text"),"enter-button":"",onSearch:a.searchWorkflows,class:"search-input"},null,8,["value","placeholder","onSearch"]),m(p,{onClick:a.clearSearch},{default:v(()=>[ge(pe(O(i)("workspace.workflowSpaceMain.reset_search")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})]),_:1}),m(w,{span:24},{default:v(()=>[m(b,{loading:a.loading,columns:a.columns,customRow:a.customRow,"data-source":a.data,pagination:a.pagination,onChange:a.handleTableChange},{headerCell:v(({column:x})=>[x.key==="title"?(M(),se(Te,{key:0},[m(O(U_)),ge(" "+pe(O(i)("workspace.workflowSpaceMain.workflow_title")),1)],64)):x.key==="tags"?(M(),se(Te,{key:1},[m(O(z_)),ge(" "+pe(O(i)("workspace.workflowSpaceMain.tags")),1)],64)):x.key==="update_time"?(M(),se(Te,{key:2},[m(O(X_)),ge(" "+pe(O(i)("workspace.workflowSpaceMain.update_time")),1)],64)):Oe("",!0)]),bodyCell:v(({column:x,record:$})=>[x.key==="title"?(M(),H(g,{key:0},{default:v(()=>[m(_,{class:"workflow-title"},{default:v(()=>[ge(pe($.title),1)]),_:2},1024)]),_:2},1024)):x.key==="tags"?(M(),H(g,{key:1},{default:v(()=>[(M(!0),se(Te,null,rt($.tags,L=>(M(),H(T,{color:L.color,key:L.tid},{default:v(()=>[ge(pe(L.title),1)]),_:2},1032,["color"]))),128))]),_:2},1024)):Oe("",!0)]),_:1},8,["loading","columns","customRow","data-source","pagination","onChange"])]),_:1})]),_:1})]),_:1},8,["spinning"])}}},AR=lr(MR,[["__scopeId","data-v-169c3c13"]]),DR={__name:"WorkflowInvoke",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"tools.workflow_invoke",has_inputs:!0,template:{workflow_id:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"workflow_id",display_name:"workflow_id",type:"str",clear_after_run:!0,list:!1,field_type:"input"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template),o=oe(e.data.seleted_workflow_title),r=zt({open:!1,data:{},onWorkflowSelect:()=>{e.data.seleted_workflow_title=r.data.title,o.value=r.data.title,i.value.workflow_id.value=r.data.wid,Object.keys(i.value).forEach(a=>{["workflow_id"].includes(a)||delete i.value[a]}),r.data.inputFields.forEach(a=>{fd.includes(a.field_type)||(i.value[a.name]=JSON.parse(JSON.stringify(a)),i.value[a.name].node=i.value[a.name].nodeId)});const s=new Set;r.data.outputNodes.concat(r.data.workflowInvokeOutputNodes).forEach(a=>{const u=a.id.slice(0,8);let c=`${u}_${a.type}`;for(;s.has(c);)c=`${c}_${Math.floor(Math.random()*1e3)}`;s.add(c);let h=c,d="";a.type=="Text"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.text)),h=`${h}_${a.data.template.output_title.value}`,d="text"):a.type=="Audio"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.audio_url||{})),d="audio_url"):a.type=="Mindmap"||a.type=="Mermaid"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.content)),d="content"):a.type=="Echarts"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.option)),d="option"):a.type=="WorkflowInvokeOutput"&&(i.value[c]=JSON.parse(JSON.stringify(a.data.template.value)),d="value"),i.value[c].name=h,a.type=="WorkflowInvokeOutput"?i.value[c].display_name=`${u}_${a.data.template.display_name.value}`:i.value[c].display_name=`${u}_${a.type}`,i.value[c].show=!1,i.value[c].is_output=!0,i.value[c].node=a.id,i.value[c].output_field_key=d}),r.open=!1}});return(s,l)=>{const a=C("a-typography-text"),u=C("a-button"),c=C("a-modal"),h=C("a-col"),d=C("a-input"),f=C("a-divider"),p=C("a-select"),g=C("a-textarea"),w=C("a-checkbox"),y=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.tools.WorkflowInvoke.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/tools#h2-12"},{main:v(()=>[m(y,{type:"flex"},{default:v(()=>[m(h,{span:24,style:{padding:"5px 10px"}},{default:v(()=>[o.value?(M(),se(Te,{key:0},[m(a,{type:"secondary"},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.WorkflowInvoke.selected_workflow"))+": ",1)]),_:1}),m(a,null,{default:v(()=>[ge(pe(o.value),1)]),_:1})],64)):Oe("",!0),m(u,{type:"primary",block:"",onClick:l[0]||(l[0]=_=>r.open=!0)},{default:v(()=>[ge(pe(O(n)("components.nodes.tools.WorkflowInvoke.select_workflow")),1)]),_:1}),m(c,{open:r.open,title:O(n)("components.nodes.tools.WorkflowInvoke.select_workflow"),width:"80vw",onCancel:l[2]||(l[2]=_=>r.open=!1),footer:null},{default:v(()=>[m(AR,{modelValue:r.data,"onUpdate:modelValue":l[1]||(l[1]=_=>r.data=_),onSelected:r.onWorkflowSelect},null,8,["modelValue","onSelected"])]),_:1},8,["open","title"])]),_:1}),m(h,{span:24},{default:v(()=>[m(F,{id:"workflow_id",name:O(n)("components.nodes.tools.WorkflowInvoke.workflow_id"),required:"",type:"target",show:i.value.workflow_id.show,"onUpdate:show":l[4]||(l[4]=_=>i.value.workflow_id.show=_)},{default:v(()=>[m(d,{disabled:"",value:i.value.workflow_id.value,"onUpdate:value":l[3]||(l[3]=_=>i.value.workflow_id.value=_),placeholder:i.value.workflow_id.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(f,null,{default:v(()=>[ge(pe(O(n)("components.nodes.tools.WorkflowInvoke.workflow_fields")),1)]),_:1}),(M(!0),se(Te,null,rt(Object.keys(i.value),(_,T)=>(M(),se(Te,{key:T},[!["workflow_id"].includes(_)&&!i.value[_].is_output?(M(),H(h,{key:0,span:24},{default:v(()=>[m(F,{id:_,name:`${i.value[_].display_name}: ${i.value[_].type}`,required:"",type:"target",onDelete:b=>s.removeField(_),show:i.value[_].show,"onUpdate:show":b=>i.value[_].show=b},{inline:v(()=>[i.value[_].field_type=="checkbox"?(M(),H(w,{key:0,checked:i.value[_].value,"onUpdate:checked":b=>i.value[_].value=b},null,8,["checked","onUpdate:checked"])):Oe("",!0)]),default:v(()=>[i.value[_].field_type=="select"?(M(),H(p,{key:0,style:{width:"100%"},value:i.value[_].value,"onUpdate:value":b=>i.value[_].value=b,options:i.value[_].options},null,8,["value","onUpdate:value","options"])):i.value[_].field_type=="textarea"?(M(),H(g,{key:1,value:i.value[_].value,"onUpdate:value":b=>i.value[_].value=b,autoSize:!0,showCount:!0,placeholder:i.value[_].placeholder},null,8,["value","onUpdate:value","placeholder"])):i.value[_].field_type=="input"?(M(),H(d,{key:2,value:i.value[_].value,"onUpdate:value":b=>i.value[_].value=b,placeholder:i.value[_].placeholder},null,8,["value","onUpdate:value","placeholder"])):Oe("",!0)]),_:2},1032,["id","name","onDelete","show","onUpdate:show"])]),_:2},1024)):Oe("",!0)],64))),128))]),_:1})]),output:v(()=>[m(y,{type:"flex",style:{width:"100%"}},{default:v(()=>[(M(!0),se(Te,null,rt(Object.keys(i.value),(_,T)=>(M(),se(Te,{key:_},[i.value[_].is_output?(M(),H(h,{key:0,span:24},{default:v(()=>[m(F,{id:_,name:i.value[_].display_name,type:"source",nameOnly:""},null,8,["id","name"])]),_:2},1024)):Oe("",!0)],64))),128))]),_:1})]),_:1},8,["nodeId","title","description"])}}},RR=Object.freeze(Object.defineProperty({__proto__:null,default:DR},Symbol.toStringTag,{value:"Module"})),qR={__name:"ButtonTrigger",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"triggers.button_trigger",has_inputs:!1,template:{button_text:{required:!0,placeholder:"Run",show:!1,multiline:!0,value:"run",password:!1,name:"button_text",display_name:"button_text",type:"str",clear_after_run:!0,list:!1,field_type:"button"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.button_text.value=n("components.nodes.triggers.ButtonTrigger.run"),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.triggers.ButtonTrigger.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/triggers#h2-0"},{main:v(()=>[m(a,{type:" flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"button_text",name:O(n)("components.nodes.triggers.ButtonTrigger.button_text"),required:"",type:"target"},{default:v(()=>[m(s,{class:"field-content",value:i.value.button_text.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.button_text.value=u),placeholder:i.value.button_text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},QR=Object.freeze(Object.defineProperty({__proto__:null,default:qR},Symbol.toStringTag,{value:"Module"})),NR={__name:"AddData",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"vector_db.add_data",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},content_title:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content_title",display_name:"content_title",type:"str",clear_after_run:!0,list:!1,field_type:"input"},source_url:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"source_url",display_name:"source_url",type:"str",clear_after_run:!0,list:!1,field_type:"input"},data_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"}],name:"data_type",display_name:"data_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},split_method:{required:!0,placeholder:"",show:!1,multiline:!1,value:"general",password:!1,options:[{value:"general",label:"general"}],name:"split_method",display_name:"split_method",type:"str",clear_after_run:!0,list:!1,field_type:"select"},chunk_length:{required:!0,placeholder:"",show:!1,multiline:!0,value:500,password:!1,name:"chunk_length",display_name:"chunk_length",type:"str",clear_after_run:!0,list:!1,field_type:"number"},database:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,options:[],name:"database",display_name:"database",type:"str",clear_after_run:!0,list:!1,field_type:"select"},object_id:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"object_id",display_name:"object_id",type:"list|str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=Ss(),{userDatabases:o}=Ji(i),r=oe(e.data.template);return r.value.database.options=o.value.filter(s=>s.status=="VALID").map(s=>({value:s.vid,label:s.name})),r.value.split_method.options=r.value.split_method.options.map(s=>(s.label=n(`components.nodes.vectorDb.AddData.split_method_${s.value}`),s)),(s,l)=>{const a=C("a-input"),u=C("a-col"),c=C("a-select"),h=C("a-input-number"),d=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.vectorDb.AddData.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/vector-db#h2-0"},{main:v(()=>[m(d,{type:"flex"},{default:v(()=>[m(u,{span:24},{default:v(()=>[m(F,{id:"content_title",name:O(n)("components.nodes.vectorDb.AddData.content_title"),required:"",type:"target",show:r.value.content_title.show,"onUpdate:show":l[1]||(l[1]=f=>r.value.content_title.show=f)},{default:v(()=>[m(a,{class:"field-content",value:r.value.content_title.value,"onUpdate:value":l[0]||(l[0]=f=>r.value.content_title.value=f),placeholder:r.value.content_title.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"text",name:O(n)("components.nodes.vectorDb.AddData.text"),required:"",type:"target",show:r.value.text.show,"onUpdate:show":l[3]||(l[3]=f=>r.value.text.show=f)},{default:v(()=>[m(a,{class:"field-content",value:r.value.text.value,"onUpdate:value":l[2]||(l[2]=f=>r.value.text.value=f),placeholder:r.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"source_url",name:O(n)("components.nodes.vectorDb.AddData.source_url"),type:"target",show:r.value.source_url.show,"onUpdate:show":l[5]||(l[5]=f=>r.value.source_url.show=f)},{default:v(()=>[m(a,{class:"field-content",value:r.value.source_url.value,"onUpdate:value":l[4]||(l[4]=f=>r.value.source_url.value=f),placeholder:r.value.source_url.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),r.value.data_type.value=="text"?(M(),H(u,{key:0,span:24},{default:v(()=>[m(F,{id:"split_method",name:O(n)("components.nodes.vectorDb.AddData.split_method"),required:"",type:"target",show:r.value.split_method.show,"onUpdate:show":l[7]||(l[7]=f=>r.value.split_method.show=f)},{default:v(()=>[m(c,{style:{width:"100%"},value:r.value.split_method.value,"onUpdate:value":l[6]||(l[6]=f=>r.value.split_method.value=f),options:r.value.split_method.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})):Oe("",!0),r.value.data_type.value=="text"?(M(),H(u,{key:1,span:24},{default:v(()=>[m(F,{id:"chunk_length",name:O(n)("components.nodes.vectorDb.AddData.chunk_length"),required:"",type:"target",show:r.value.chunk_length.show,"onUpdate:show":l[9]||(l[9]=f=>r.value.chunk_length.show=f)},{default:v(()=>[m(h,{style:{width:"100%"},class:"field-content",value:r.value.chunk_length.value,"onUpdate:value":l[8]||(l[8]=f=>r.value.chunk_length.value=f),placeholder:r.value.chunk_length.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):Oe("",!0),m(u,{span:24},{default:v(()=>[m(F,{id:"data_type",name:O(n)("components.nodes.vectorDb.AddData.data_type"),required:"",type:"target",show:r.value.data_type.show,"onUpdate:show":l[11]||(l[11]=f=>r.value.data_type.show=f)},{default:v(()=>[m(c,{style:{width:"100%"},value:r.value.data_type.value,"onUpdate:value":l[10]||(l[10]=f=>r.value.data_type.value=f),options:r.value.data_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"database",name:O(n)("components.nodes.vectorDb.AddData.database"),required:"",type:"target",show:r.value.database.show,"onUpdate:show":l[13]||(l[13]=f=>r.value.database.show=f)},{default:v(()=>[m(c,{style:{width:"100%"},class:"field-content",value:r.value.database.value,"onUpdate:value":l[12]||(l[12]=f=>r.value.database.value=f),options:r.value.database.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"object_id",name:O(n)("components.nodes.vectorDb.AddData.object_id"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},IR=Object.freeze(Object.defineProperty({__proto__:null,default:NR},Symbol.toStringTag,{value:"Module"})),VR={__name:"DeleteData",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"vector_db.delete_data",has_inputs:!0,template:{object_id:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"object_id",display_name:"object_id",type:"list|str",clear_after_run:!0,list:!1,field_type:""},database:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,options:[],name:"database",display_name:"database",type:"str",clear_after_run:!0,list:!1,field_type:"select"},delete_success:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"delete_success",display_name:"delete_success",type:"list|bool",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=Ss(),{userDatabases:o}=Ji(i),r=oe(e.data.template);return r.value.database.options=o.value.filter(s=>s.status=="VALID").map(s=>({value:s.vid,label:s.name})),(s,l)=>{const a=C("a-input"),u=C("a-col"),c=C("a-select"),h=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.vectorDb.DeleteData.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/vector-db#h2-4"},{main:v(()=>[m(h,{type:"flex"},{default:v(()=>[m(u,{span:24},{default:v(()=>[m(F,{id:"object_id",name:O(n)("components.nodes.vectorDb.DeleteData.object_id"),required:"",type:"target",show:r.value.object_id.show,"onUpdate:show":l[1]||(l[1]=d=>r.value.object_id.show=d)},{default:v(()=>[m(a,{class:"field-content",value:r.value.object_id.value,"onUpdate:value":l[0]||(l[0]=d=>r.value.object_id.value=d),placeholder:r.value.object_id.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"database",name:O(n)("components.nodes.vectorDb.DeleteData.database"),required:"",type:"target",show:r.value.database.show,"onUpdate:show":l[3]||(l[3]=d=>r.value.database.show=d)},{default:v(()=>[m(c,{style:{width:"100%"},class:"field-content",value:r.value.database.value,"onUpdate:value":l[2]||(l[2]=d=>r.value.database.value=d),options:r.value.database.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"delete_success",name:O(n)("components.nodes.vectorDb.DeleteData.delete_success"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},BR=Object.freeze(Object.defineProperty({__proto__:null,default:VR},Symbol.toStringTag,{value:"Module"})),WR={__name:"Search",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"vector_db.search_data",has_inputs:!0,template:{search_text:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"search_text",display_name:"search_text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},data_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"}],name:"data_type",display_name:"data_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},database:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,options:[],name:"database",display_name:"database",type:"str",clear_after_run:!0,list:!1,field_type:"select"},count:{required:!0,placeholder:"",show:!1,multiline:!0,value:5,password:!1,name:"count",display_name:"count",type:"str",clear_after_run:!0,list:!1,field_type:"number"},output_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"},{value:"list",label:"List"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"output",display_name:"output",type:"list|str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=Ss(),{userDatabases:o}=Ji(i),r=oe(e.data.template);return r.value.database.options=o.value.filter(s=>s.status=="VALID").map(s=>({value:s.vid,label:s.name})),r.value.output_type.options=r.value.output_type.options.map(s=>(s.label=n(`components.nodes.vectorDb.Search.${s.value}`),s)),r.value.data_type.options=r.value.data_type.options.map(s=>(s.label=n(`components.nodes.vectorDb.Search.${s.value}`),s)),(s,l)=>{const a=C("a-input"),u=C("a-col"),c=C("a-select"),h=C("a-input-number"),d=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.vectorDb.Search.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/vector-db#h2-8"},{main:v(()=>[m(d,{type:"flex"},{default:v(()=>[m(u,{span:24},{default:v(()=>[m(F,{id:"search_text",name:O(n)("components.nodes.vectorDb.Search.search_text"),required:"",type:"target",show:r.value.search_text.show,"onUpdate:show":l[1]||(l[1]=f=>r.value.search_text.show=f)},{default:v(()=>[m(a,{class:"field-content",value:r.value.search_text.value,"onUpdate:value":l[0]||(l[0]=f=>r.value.search_text.value=f),placeholder:r.value.search_text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"data_type",name:O(n)("components.nodes.vectorDb.Search.data_type"),required:"",type:"target",show:r.value.data_type.show,"onUpdate:show":l[3]||(l[3]=f=>r.value.data_type.show=f)},{default:v(()=>[m(c,{style:{width:"100%"},value:r.value.data_type.value,"onUpdate:value":l[2]||(l[2]=f=>r.value.data_type.value=f),options:r.value.data_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"database",name:O(n)("components.nodes.vectorDb.Search.database"),required:"",type:"target",show:r.value.database.show,"onUpdate:show":l[5]||(l[5]=f=>r.value.database.show=f)},{default:v(()=>[m(c,{style:{width:"100%"},class:"field-content",value:r.value.database.value,"onUpdate:value":l[4]||(l[4]=f=>r.value.database.value=f),options:r.value.database.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"count",name:O(n)("components.nodes.vectorDb.Search.count"),required:"",type:"target",show:r.value.count.show,"onUpdate:show":l[7]||(l[7]=f=>r.value.count.show=f)},{default:v(()=>[m(h,{style:{width:"100%"},class:"field-content",value:r.value.count.value,"onUpdate:value":l[6]||(l[6]=f=>r.value.count.value=f),placeholder:r.value.count.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),m(u,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.vectorDb.Search.output_type"),required:"",type:"target",show:r.value.output_type.show,"onUpdate:show":l[9]||(l[9]=f=>r.value.output_type.show=f)},{default:v(()=>[m(c,{style:{width:"100%"},class:"field-content",value:r.value.output_type.value,"onUpdate:value":l[8]||(l[8]=f=>r.value.output_type.value=f),options:r.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(F,{id:"output",name:O(n)("components.nodes.vectorDb.Search.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},LR=Object.freeze(Object.defineProperty({__proto__:null,default:WR},Symbol.toStringTag,{value:"Module"})),zR={__name:"BilibiliCrawler",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"web_crawlers.bilibili_crawler",has_inputs:!0,template:{url_or_bvid:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"url_or_bvid",display_name:"url_or_bvid",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"str",password:!1,options:[{value:"str",label:"str"},{value:"list",label:"list"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output_subtitle:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_subtitle",display_name:"output_subtitle",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"},output_title:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.webCrawlers.BilibiliCrawler.${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.webCrawlers.BilibiliCrawler.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/web-crawlers#h2-0"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"url_or_bvid",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.url_or_bvid"),required:"",type:"target",show:i.value.url_or_bvid.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.url_or_bvid.show=c)},{default:v(()=>[m(s,{value:i.value.url_or_bvid.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.url_or_bvid.value=c)},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.output_type.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(u,{type:"flex",style:{width:"100%"}},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"output_title",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.output_title"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_subtitle",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.output_subtitle"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},XR=Object.freeze(Object.defineProperty({__proto__:null,default:zR},Symbol.toStringTag,{value:"Module"})),UR={__name:"TextCrawler",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"web_crawlers.text_crawler",has_inputs:!0,template:{url:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"url",display_name:"url",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output_text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_text",display_name:"output_text",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"},output_title:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.webCrawlers.TextCrawler.${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.webCrawlers.TextCrawler.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/web-crawlers#h2-4"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"url",name:O(n)("components.nodes.webCrawlers.TextCrawler.url"),required:"",type:"target",show:i.value.url.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.url.show=c)},{default:v(()=>[m(s,{value:i.value.url.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.url.value=c),placeholder:"https://example.com"},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.webCrawlers.TextCrawler.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.output_type.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(u,{type:"flex",style:{width:"100%"}},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"output_title",name:O(n)("components.nodes.webCrawlers.TextCrawler.output_title"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_text",name:O(n)("components.nodes.webCrawlers.TextCrawler.output_text"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},YR=Object.freeze(Object.defineProperty({__proto__:null,default:UR},Symbol.toStringTag,{value:"Module"})),jR={__name:"YoutubeCrawler",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"web_crawlers.youtube_crawler",has_inputs:!0,template:{url_or_video_id:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"url_or_video_id",display_name:"url_or_video_id",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"str",password:!1,options:[{value:"str",label:"str"},{value:"list",label:"list"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output_subtitle:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_subtitle",display_name:"output_subtitle",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"},output_title:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.webCrawlers.YoutubeCrawler.${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-row");return M(),H(ze,{nodeId:t.id,title:O(n)("components.nodes.webCrawlers.YoutubeCrawler.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/web-crawlers#h2-8"},{main:v(()=>[m(u,{type:"flex"},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"url_or_video_id",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.url_or_video_id"),required:"",type:"target",show:i.value.url_or_video_id.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.url_or_video_id.show=c)},{default:v(()=>[m(s,{value:i.value.url_or_video_id.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.url_or_video_id.value=c)},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_type",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.output_type.show=c)},{default:v(()=>[m(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:v(()=>[m(u,{type:"flex",style:{width:"100%"}},{default:v(()=>[m(l,{span:24},{default:v(()=>[m(F,{id:"output_title",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.output_title"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),m(l,{span:24},{default:v(()=>[m(F,{id:"output_subtitle",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.output_subtitle"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},FR=Object.freeze(Object.defineProperty({__proto__:null,default:jR},Symbol.toStringTag,{value:"Module"}));let xl;const HR=new Uint8Array(16);function GR(){if(!xl&&(xl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xl(HR)}const ZR=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ig={randomUUID:ZR};function Vg(t,e,n){if(Ig.randomUUID&&!e&&!t)return Ig.randomUUID();t=t||{};const i=t.random||(t.rng||GR)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=i[o];return e}return S_(i)}var KR={value:()=>{}};function wf(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Zl.prototype=wf.prototype={constructor:Zl,on:function(t,e){var n=this._,i=JR(t+"",n),o,r=-1,s=i.length;if(arguments.length<2){for(;++r0)for(var n=new Array(o),i=0,o,r;i=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Wg.hasOwnProperty(e)?{space:Wg[e],local:t}:t}function tq(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Gh&&e.documentElement.namespaceURI===Gh?e.createElement(t):e.createElementNS(n,t)}}function nq(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function rw(t){var e=Du(t);return(e.local?nq:tq)(e)}function iq(){}function _f(t){return t==null?iq:function(){return this.querySelector(t)}}function oq(t){typeof t!="function"&&(t=_f(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=T&&(T=_+1);!(k=w[T])&&++T=0;)(s=i[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function $q(t){t||(t=Eq);function e(h,d){return h&&d?t(h.__data__,d.__data__):!h-!d}for(var n=this._groups,i=n.length,o=new Array(i),r=0;re?1:t>=e?0:NaN}function Mq(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Aq(){return Array.from(this)}function Dq(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?Xq:typeof e=="function"?Yq:Uq)(t,e,n??"")):or(this.node(),t)}function or(t,e){return t.style.getPropertyValue(e)||cw(t).getComputedStyle(t,null).getPropertyValue(e)}function Fq(t){return function(){delete this[t]}}function Hq(t,e){return function(){this[t]=e}}function Gq(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Zq(t,e){return arguments.length>1?this.each((e==null?Fq:typeof e=="function"?Gq:Hq)(t,e)):this.node()[t]}function hw(t){return t.trim().split(/^|\s+/)}function bf(t){return t.classList||new dw(t)}function dw(t){this._node=t,this._names=hw(t.getAttribute("class")||"")}dw.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function fw(t,e){for(var n=bf(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function kQ(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,r;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Sl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Sl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=NQ.exec(t))?new Lt(e[1],e[2],e[3],1):(e=IQ.exec(t))?new Lt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=VQ.exec(t))?Sl(e[1],e[2],e[3],e[4]):(e=BQ.exec(t))?Sl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=WQ.exec(t))?Fg(e[1],e[2]/100,e[3]/100,1):(e=LQ.exec(t))?Fg(e[1],e[2]/100,e[3]/100,e[4]):Lg.hasOwnProperty(t)?Ug(Lg[t]):t==="transparent"?new Lt(NaN,NaN,NaN,0):null}function Ug(t){return new Lt(t>>16&255,t>>8&255,t&255,1)}function Sl(t,e,n,i){return i<=0&&(t=e=n=NaN),new Lt(t,e,n,i)}function UQ(t){return t instanceof Vs||(t=_s(t)),t?(t=t.rgb(),new Lt(t.r,t.g,t.b,t.opacity)):new Lt}function Jh(t,e,n,i){return arguments.length===1?UQ(t):new Lt(t,e,n,i??1)}function Lt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}xf(Lt,Jh,vw(Vs,{brighter(t){return t=t==null?Fa:Math.pow(Fa,t),new Lt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Os:Math.pow(Os,t),new Lt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Lt(oo(this.r),oo(this.g),oo(this.b),Ha(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:Yg,formatHex:Yg,formatHex8:YQ,formatRgb:jg,toString:jg}));function Yg(){return`#${Zi(this.r)}${Zi(this.g)}${Zi(this.b)}`}function YQ(){return`#${Zi(this.r)}${Zi(this.g)}${Zi(this.b)}${Zi((isNaN(this.opacity)?1:this.opacity)*255)}`}function jg(){const t=Ha(this.opacity);return`${t===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${t===1?")":`, ${t})`}`}function Ha(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function oo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Zi(t){return t=oo(t),(t<16?"0":"")+t.toString(16)}function Fg(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new gn(t,e,n,i)}function yw(t){if(t instanceof gn)return new gn(t.h,t.s,t.l,t.opacity);if(t instanceof Vs||(t=_s(t)),!t)return new gn;if(t instanceof gn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),r=Math.max(e,n,i),s=NaN,l=r-o,a=(r+o)/2;return l?(e===r?s=(n-i)/l+(n0&&a<1?0:s,new gn(s,l,a,t.opacity)}function jQ(t,e,n,i){return arguments.length===1?yw(t):new gn(t,e,n,i??1)}function gn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}xf(gn,jQ,vw(Vs,{brighter(t){return t=t==null?Fa:Math.pow(Fa,t),new gn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Os:Math.pow(Os,t),new gn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new Lt(kc(t>=240?t-240:t+120,o,i),kc(t,o,i),kc(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new gn(Hg(this.h),kl(this.s),kl(this.l),Ha(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=Ha(this.opacity);return`${t===1?"hsl(":"hsla("}${Hg(this.h)}, ${kl(this.s)*100}%, ${kl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Hg(t){return t=(t||0)%360,t<0?t+360:t}function kl(t){return Math.max(0,Math.min(1,t||0))}function kc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ow=t=>()=>t;function FQ(t,e){return function(n){return t+n*e}}function HQ(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function GQ(t){return(t=+t)==1?ww:function(e,n){return n-e?HQ(e,n,t):Ow(isNaN(e)?n:e)}}function ww(t,e){var n=e-t;return n?FQ(t,n):Ow(isNaN(t)?e:t)}const Gg=function t(e){var n=GQ(e);function i(o,r){var s=n((o=Jh(o)).r,(r=Jh(r)).r),l=n(o.g,r.g),a=n(o.b,r.b),u=ww(o.opacity,r.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return i.gamma=t,i}(1);function yi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ed=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Tc=new RegExp(ed.source,"g");function ZQ(t){return function(){return t}}function KQ(t){return function(e){return t(e)+""}}function JQ(t,e){var n=ed.lastIndex=Tc.lastIndex=0,i,o,r,s=-1,l=[],a=[];for(t=t+"",e=e+"";(i=ed.exec(t))&&(o=Tc.exec(e));)(r=o.index)>n&&(r=e.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(i=i[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:yi(i,o)})),n=Tc.lastIndex;return n180?c+=360:c-u>180&&(u+=360),d.push({i:h.push(o(h)+"rotate(",null,i)-2,x:yi(u,c)})):c&&h.push(o(h)+"rotate("+c+i)}function l(u,c,h,d){u!==c?d.push({i:h.push(o(h)+"skewX(",null,i)-2,x:yi(u,c)}):c&&h.push(o(h)+"skewX("+c+i)}function a(u,c,h,d,f,p){if(u!==h||c!==d){var g=f.push(o(f)+"scale(",null,",",null,")");p.push({i:g-4,x:yi(u,h)},{i:g-2,x:yi(c,d)})}else(h!==1||d!==1)&&f.push(o(f)+"scale("+h+","+d+")")}return function(u,c){var h=[],d=[];return u=t(u),c=t(c),r(u.translateX,u.translateY,c.translateX,c.translateY,h,d),s(u.rotate,c.rotate,h,d),l(u.skewX,c.skewX,h,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,h,d),u=c=null,function(f){for(var p=-1,g=d.length,w;++p=0&&t._call.call(void 0,e),t=t._next;--rr}function Jg(){ho=(Za=bs.now())+Ru,rr=Er=0;try{uN()}finally{rr=0,hN(),ho=0}}function cN(){var t=bs.now(),e=t-Za;e>Sw&&(Ru-=e,Za=t)}function hN(){for(var t,e=Ga,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ga=n);Mr=t,td(i)}function td(t){if(!rr){Er&&(Er=clearTimeout(Er));var e=t-ho;e>24?(t<1/0&&(Er=setTimeout(Jg,t-bs.now()-Ru)),_r&&(_r=clearInterval(_r))):(_r||(Za=bs.now(),_r=setInterval(cN,Sw)),rr=1,kw(Jg))}}function ev(t,e,n){var i=new Ka;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,n),i}var dN=wf("start","end","cancel","interrupt"),fN=[],Pw=0,tv=1,nd=2,Kl=3,nv=4,id=5,Jl=6;function qu(t,e,n,i,o,r){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;pN(t,n,{name:e,index:i,group:o,on:dN,tween:fN,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Pw})}function kf(t,e){var n=_n(t,e);if(n.state>Pw)throw new Error("too late; already scheduled");return n}function Yn(t,e){var n=_n(t,e);if(n.state>Kl)throw new Error("too late; already running");return n}function _n(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function pN(t,e,n){var i=t.__transition,o;i[e]=n,n.timer=Tw(r,0,n.time);function r(u){n.state=tv,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,h,d,f;if(n.state!==tv)return a();for(c in i)if(f=i[c],f.name===n.name){if(f.state===Kl)return ev(s);f.state===nv?(f.state=Jl,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+cnd&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function XN(t,e,n){var i,o,r=zN(e)?kf:Yn;return function(){var s=r(this,t),l=s.on;l!==i&&(o=(i=l).copy()).on(e,n),s.on=o}}function UN(t,e){var n=this._id;return arguments.length<2?_n(this.node(),n).on.on(t):this.each(XN(n,t,e))}function YN(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function jN(){return this.on("end.remove",YN(this._id))}function FN(t){var e=this._name,n=this._id;typeof t!="function"&&(t=_f(t));for(var i=this._groups,o=i.length,r=new Array(o),s=0;s()=>t;function OI(t,{sourceEvent:e,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ni(t,e,n){this.k=t,this.x=e,this.y=n}ni.prototype={constructor:ni,scale:function(t){return t===1?this:new ni(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ni(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+")"}};var Pf=new ni(1,0,0);ni.prototype;function Pc(t){t.stopImmediatePropagation()}function br(t){t.preventDefault(),t.stopImmediatePropagation()}function wI(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function _I(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function iv(){return this.__zoom||Pf}function bI(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function xI(){return navigator.maxTouchPoints||"ontouchstart"in this}function SI(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],r=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function kI(){var t=wI,e=_I,n=SI,i=bI,o=xI,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=lN,u=wf("start","zoom","end"),c,h,d,f=500,p=150,g=0,w=10;function y(S){S.property("__zoom",iv).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",R).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(S,A,P,E){var B=S.selection?S.selection():S;B.property("__zoom",iv),S!==B?k(S,A,P,E):B.interrupt().each(function(){x(this,arguments).event(E).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},y.scaleBy=function(S,A,P,E){y.scaleTo(S,function(){var B=this.__zoom.k,q=typeof A=="function"?A.apply(this,arguments):A;return B*q},P,E)},y.scaleTo=function(S,A,P,E){y.transform(S,function(){var B=e.apply(this,arguments),q=this.__zoom,N=P==null?b(B):typeof P=="function"?P.apply(this,arguments):P,te=q.invert(N),U=typeof A=="function"?A.apply(this,arguments):A;return n(T(_(q,U),N,te),B,s)},P,E)},y.translateBy=function(S,A,P,E){y.transform(S,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),s)},null,E)},y.translateTo=function(S,A,P,E,B){y.transform(S,function(){var q=e.apply(this,arguments),N=this.__zoom,te=E==null?b(q):typeof E=="function"?E.apply(this,arguments):E;return n(Pf.translate(te[0],te[1]).scale(N.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof P=="function"?-P.apply(this,arguments):-P),q,s)},E,B)};function _(S,A){return A=Math.max(r[0],Math.min(r[1],A)),A===S.k?S:new ni(A,S.x,S.y)}function T(S,A,P){var E=A[0]-P[0]*S.k,B=A[1]-P[1]*S.k;return E===S.x&&B===S.y?S:new ni(S.k,E,B)}function b(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function k(S,A,P,E){S.on("start.zoom",function(){x(this,arguments).event(E).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(E).end()}).tween("zoom",function(){var B=this,q=arguments,N=x(B,q).event(E),te=e.apply(B,q),U=P==null?b(te):typeof P=="function"?P.apply(B,q):P,le=Math.max(te[1][0]-te[0][0],te[1][1]-te[0][1]),ae=B.__zoom,G=typeof A=="function"?A.apply(B,q):A,Q=a(ae.invert(U).concat(le/ae.k),G.invert(U).concat(le/G.k));return function(ne){if(ne===1)ne=G;else{var ue=Q(ne),Ae=le/ue[2];ne=new ni(Ae,U[0]-ue[0]*Ae,U[1]-ue[1]*Ae)}N.zoom(null,ne)}})}function x(S,A,P){return!P&&S.__zooming||new $(S,A)}function $(S,A){this.that=S,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(S,A),this.taps=0}$.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,A){return this.mouse&&S!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var A=_i(this.that).datum();u.call(S,this.that,new OI(S,{sourceEvent:this.sourceEvent,target:y,type:S,transform:this.that.__zoom,dispatch:u}),A)}};function L(S,...A){if(!t.apply(this,arguments))return;var P=x(this,A).event(S),E=this.__zoom,B=Math.max(r[0],Math.min(r[1],E.k*Math.pow(2,i.apply(this,arguments)))),q=pi(S);if(P.wheel)(P.mouse[0][0]!==q[0]||P.mouse[0][1]!==q[1])&&(P.mouse[1]=E.invert(P.mouse[0]=q)),clearTimeout(P.wheel);else{if(E.k===B)return;P.mouse=[q,E.invert(q)],ea(this),P.start()}br(S),P.wheel=setTimeout(N,p),P.zoom("mouse",n(T(_(E,B),P.mouse[0],P.mouse[1]),P.extent,s));function N(){P.wheel=null,P.end()}}function V(S,...A){if(d||!t.apply(this,arguments))return;var P=S.currentTarget,E=x(this,A,!0).event(S),B=_i(S.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",le,!0),q=pi(S,P),N=S.clientX,te=S.clientY;RQ(S.view),Pc(S),E.mouse=[q,this.__zoom.invert(q)],ea(this),E.start();function U(ae){if(br(ae),!E.moved){var G=ae.clientX-N,Q=ae.clientY-te;E.moved=G*G+Q*Q>g}E.event(ae).zoom("mouse",n(T(E.that.__zoom,E.mouse[0]=pi(ae,P),E.mouse[1]),E.extent,s))}function le(ae){B.on("mousemove.zoom mouseup.zoom",null),qQ(ae.view,E.moved),br(ae),E.event(ae).end()}}function R(S,...A){if(t.apply(this,arguments)){var P=this.__zoom,E=pi(S.changedTouches?S.changedTouches[0]:S,this),B=P.invert(E),q=P.k*(S.shiftKey?.5:2),N=n(T(_(P,q),E,B),e.apply(this,A),s);br(S),l>0?_i(this).transition().duration(l).call(k,N,E,S):_i(this).call(y.transform,N,E,S)}}function z(S,...A){if(t.apply(this,arguments)){var P=S.touches,E=P.length,B=x(this,A,S.changedTouches.length===E).event(S),q,N,te,U;for(Pc(S),N=0;N{const o=e.style??{},r=i[`node-${t.type}`];return r?r(t):Ie("rect",{id:t.id,class:["vue-flow__minimap-node",e.class,{selected:t.selected,dragging:t.dragging}].join(" "),style:o,x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||o.background||o.backgroundColor,stroke:t.strokeColor,strokeWidth:t.strokeWidth,shapeRendering:t.shapeRendering,onClick:s=>n("click",s),onDblClick:s=>n("dblclick",s),onMouseenter:s=>n("mouseenter",s),onMousemove:s=>n("mousemove",s),onMouseleave:s=>n("mouseleave",s)})}}}),PI=["width","height","viewBox","aria-labelledby"],CI=["id"],$I=["d","fill","stroke","stroke-width"],EI={name:"MiniMap",compatConfig:{MODE:3}},MI=Le({...EI,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:null,height:null,ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:10},offsetScale:{default:5}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=hd(),i=200,o=150,{id:r,edges:s,viewport:l,translateExtent:a,dimensions:u,emits:c,nodes:h,d3Selection:d,d3Zoom:f}=Ze(),p=oe();ro(Mw,wv());const g=ye(()=>{var E;return t.width??((E=n.style)==null?void 0:E.width)??i}),w=ye(()=>{var E;return t.height??((E=n.style)==null?void 0:E.height)??o}),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",_=ye(()=>t.nodeColor instanceof Function?t.nodeColor:()=>t.nodeColor),T=ye(()=>t.nodeStrokeColor instanceof Function?t.nodeStrokeColor:()=>t.nodeStrokeColor),b=ye(()=>t.nodeClassName instanceof Function?t.nodeClassName:()=>t.nodeClassName),k=ye(()=>$d(h.value)),x=ye(()=>({x:-l.value.x/l.value.zoom,y:-l.value.y/l.value.zoom,width:u.value.width/l.value.zoom,height:u.value.height/l.value.zoom})),$=ye(()=>h.value&&h.value.length?r2(k.value,x.value):x.value),L=ye(()=>{const E=$.value.width/g.value,B=$.value.height/w.value;return Math.max(E,B)}),V=ye(()=>{const E=L.value*g.value,B=L.value*w.value,q=t.offsetScale*L.value;return{offset:q,x:$.value.x-(E-$.value.width)/2-q,y:$.value.y-(B-$.value.height)/2-q,width:E+q*2,height:B+q*2}}),R=ye(()=>!V.value.x||!V.value.y?"":` - M${V.value.x-V.value.offset},${V.value.y-V.value.offset} - h${V.value.width+V.value.offset*2} - v${V.value.height+V.value.offset*2} - h${-V.value.width-V.value.offset*2}z - M${x.value.x},${x.value.y} - h${x.value.width} - v${x.value.height} - h${-x.value.width}z`);sa(E=>{if(p.value){const B=_i(p.value),q=U=>{if(U.sourceEvent.type!=="wheel"||!d.value||!f.value)return;const le=-U.sourceEvent.deltaY*(U.sourceEvent.deltaMode===1?.05:U.sourceEvent.deltaMode?1:.002)*t.zoomStep,ae=l.value.zoom*2**le;f.value.scaleTo(d.value,ae)},N=U=>{if(U.sourceEvent.type!=="mousemove"||!d.value||!f.value)return;const le=L.value*Math.max(1,l.value.zoom)*(t.inversePan?-1:1),ae={x:l.value.x-U.sourceEvent.movementX*le,y:l.value.y-U.sourceEvent.movementY*le},G=[[0,0],[u.value.width,u.value.height]],Q=Pf.translate(ae.x,ae.y).scale(l.value.zoom),ne=f.value.constrain()(Q,G,a.value);f.value.transform(d.value,ne)},te=kI().on("zoom",t.pannable?N:()=>{}).on("zoom.wheel",t.zoomable?q:()=>{});B.call(te),E(()=>{B.on("zoom",null)})}},{flush:"post"});function z(E){const[B,q]=pi(E);e("click",{event:E,position:{x:B,y:q}})}function j(E,B){const q={event:E,node:B,connectedEdges:Kn([B],s.value)};c.miniMapNodeClick(q),e("nodeClick",q)}function J(E,B){const q={event:E,node:B,connectedEdges:Kn([B],s.value)};c.miniMapNodeDoubleClick(q),e("nodeDblclick",q)}function S(E,B){const q={event:E,node:B,connectedEdges:Kn([B],s.value)};c.miniMapNodeMouseEnter(q),e("nodeMouseenter",q)}function A(E,B){const q={event:E,node:B,connectedEdges:Kn([B],s.value)};c.miniMapNodeMouseMove(q),e("nodeMousemove",q)}function P(E,B){const q={event:E,node:B,connectedEdges:Kn([B],s.value)};c.miniMapNodeMouseLeave(q),e("nodeMouseleave",q)}return(E,B)=>(M(),H(O(q0),{position:t.position,class:en(["vue-flow__minimap",{pannable:t.pannable,zoomable:t.zoomable}])},{default:v(()=>[(M(),se("svg",{ref_key:"el",ref:p,width:O(g),height:O(w),viewBox:[O(V).x,O(V).y,O(V).width,O(V).height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${O(r)}`,onClick:z},[t.ariaLabel?(M(),se("title",{key:0,id:`vue-flow__minimap-${O(r)}`},pe(t.ariaLabel),9,CI)):Oe("",!0),(M(!0),se(Te,null,rt(O(h),q=>(M(),H(O(TI),{id:q.id,key:q.id,position:q.computedPosition,dimensions:q.dimensions,selected:q.selected,dragging:q.dragging,style:mt(q.style),class:en(O(b)(q)),color:O(_)(q),"border-radius":t.nodeBorderRadius,"stroke-color":O(T)(q),"stroke-width":t.nodeStrokeWidth,"shape-rendering":O(y),type:q.type,onClick:N=>j(N,q),onDblclick:N=>J(N,q),onMouseenter:N=>S(N,q),onMousemove:N=>A(N,q),onMouseleave:N=>P(N,q)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),Qe("path",{class:"vue-flow__minimap-mask",d:O(R),fill:t.maskColor,stroke:t.maskStrokeColor,"stroke-width":t.maskStrokeWidth,"fill-rule":"evenodd"},null,8,$I)],8,PI))]),_:1},8,["position","class"]))}});var fn=(t=>(t.Lines="lines",t.Dots="dots",t))(fn||{});const AI=function({dimensions:t,size:e,color:n}){return Ie("path",{stroke:n,"stroke-width":e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})},DI=function({radius:t,color:e}){return Ie("circle",{cx:t,cy:t,r:t,fill:e})};fn.Lines+"",fn.Dots+"";const RI=["id","x","y","width","height","patternTransform"],qI={key:2,height:"100",width:"100"},QI=["fill"],NI=["x","y","fill"],II={name:"Background",compatConfig:{MODE:3}},VI=Le({...II,props:{id:null,variant:{default:fn.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:2}},setup(t){const e={[fn.Dots]:"#81818a",[fn.Lines]:"#eee"},{id:n,viewport:i}=Ze(),o=ye(()=>{const[l,a]=Array.isArray(t.gap)?t.gap:[t.gap,t.gap],u=[l*i.value.zoom||1,a*i.value.zoom||1],c=t.size*i.value.zoom,h=t.variant===fn.Dots?[c/t.offset,c/t.offset]:[u[0]/t.offset,u[1]/t.offset];return{scaledGap:u,offset:h,size:c}}),r=ye(()=>`pattern-${n}${t.id?`-${t.id}`:""}`),s=ye(()=>t.patternColor||e[t.variant||fn.Dots]);return(l,a)=>(M(),se("svg",{class:"vue-flow__background vue-flow__container",style:mt({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[Ve(l.$slots,"pattern-container",{id:O(r)},()=>[Qe("pattern",{id:O(r),x:O(i).x%O(o).scaledGap[0],y:O(i).y%O(o).scaledGap[1],width:O(o).scaledGap[0],height:O(o).scaledGap[1],patternTransform:`translate(-${O(o).offset[0]},-${O(o).offset[1]})`,patternUnits:"userSpaceOnUse"},[Ve(l.$slots,"pattern",{},()=>[t.variant===O(fn).Lines?(M(),H(O(AI),{key:0,size:t.lineWidth,color:O(s),dimensions:O(o).scaledGap},null,8,["size","color","dimensions"])):t.variant===O(fn).Dots?(M(),H(O(DI),{key:1,color:O(s),radius:O(o).size/t.offset},null,8,["color","radius"])):Oe("",!0),t.bgColor?(M(),se("svg",qI,[Qe("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,QI)])):Oe("",!0)])],8,RI)]),Qe("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${O(r)})`},null,8,NI),Ve(l.$slots,"default",{id:O(r)})],4))}}),BI={name:"ControlButton",compatConfig:{MODE:3}},WI=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},LI={class:"vue-flow__controls-button"};function zI(t,e,n,i,o,r){return M(),se("button",LI,[Ve(t.$slots,"default")])}const Cl=WI(BI,[["render",zI]]),XI={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},UI=Qe("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),YI=[UI];function jI(t,e){return M(),se("svg",XI,YI)}const FI={render:jI},HI={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},GI=Qe("path",{d:"M0 0h32v4.2H0z"},null,-1),ZI=[GI];function KI(t,e){return M(),se("svg",HI,ZI)}const JI={render:KI},eV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},tV=Qe("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),nV=[tV];function iV(t,e){return M(),se("svg",eV,nV)}const oV={render:iV},rV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},sV=Qe("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),lV=[sV];function aV(t,e){return M(),se("svg",rV,lV)}const uV={render:aV},cV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},hV=Qe("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),dV=[hV];function fV(t,e){return M(),se("svg",cV,dV)}const pV={render:fV},mV={name:"Controls",compatConfig:{MODE:3}},gV=Le({...mV,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:l0.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const{nodesDraggable:n,nodesConnectable:i,elementsSelectable:o,setInteractive:r,zoomIn:s,zoomOut:l,fitView:a,viewport:u,minZoom:c,maxZoom:h}=Ze(),d=ye(()=>n.value||i.value||o.value),f=ye(()=>u.value.zoom<=c.value),p=ye(()=>u.value.zoom>=h.value);function g(){s(),e("zoomIn")}function w(){l(),e("zoomOut")}function y(){a(t.fitViewParams),e("fitView")}function _(){r(!d.value),e("interactionChange",!d.value)}return(T,b)=>(M(),H(O(q0),{class:"vue-flow__controls",position:t.position},{default:v(()=>[Ve(T.$slots,"top"),t.showZoom?(M(),se(Te,{key:0},[Ve(T.$slots,"control-zoom-in",{},()=>[m(Cl,{class:"vue-flow__controls-zoomin",disabled:O(p),onClick:g},{default:v(()=>[Ve(T.$slots,"icon-zoom-in",{},()=>[(M(),H(_o(O(FI))))])]),_:3},8,["disabled"])]),Ve(T.$slots,"control-zoom-out",{},()=>[m(Cl,{class:"vue-flow__controls-zoomout",disabled:O(f),onClick:w},{default:v(()=>[Ve(T.$slots,"icon-zoom-out",{},()=>[(M(),H(_o(O(JI))))])]),_:3},8,["disabled"])])],64)):Oe("",!0),t.showFitView?Ve(T.$slots,"control-fit-view",{key:1},()=>[m(Cl,{class:"vue-flow__controls-fitview",onClick:y},{default:v(()=>[Ve(T.$slots,"icon-fit-view",{},()=>[(M(),H(_o(O(oV))))])]),_:3})]):Oe("",!0),t.showInteractive?Ve(T.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(M(),H(Cl,{key:0,class:"vue-flow__controls-interactive",onClick:_},{default:v(()=>[O(d)?Ve(T.$slots,"icon-unlock",{key:0},()=>[(M(),H(_o(O(pV))))]):Oe("",!0),O(d)?Oe("",!0):Ve(T.$slots,"icon-lock",{key:1},()=>[(M(),H(_o(O(uV))))])]),_:3})):Oe("",!0)]):Oe("",!0),Ve(T.$slots,"default")]),_:3},8,["position"]))}}),vV={__name:"TagInput",props:{modelValue:{}},emits:["update:modelValue"],setup(t){const{t:e}=Ee(),n=lu(t,"modelValue"),i=oe([]);return su(async()=>{const{data:o}=await Sv("list",{});i.value=o.map(r=>({label:r.title,value:r.tid}))}),(o,r)=>{const s=C("a-select");return M(),H(s,{value:n.value,"onUpdate:value":r[0]||(r[0]=l=>n.value=l),mode:"tags",placeholder:O(e)("components.workspace.tagInput.select_tags"),style:{"min-width":"150px",width:"100%"},options:i.value},null,8,["value","placeholder","options"])}}};var yV=Object.defineProperty,Ja=Object.getOwnPropertySymbols,Aw=Object.prototype.hasOwnProperty,Dw=Object.prototype.propertyIsEnumerable,ov=(t,e,n)=>e in t?yV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Do=(t,e)=>{for(var n in e||(e={}))Aw.call(e,n)&&ov(t,n,e[n]);if(Ja)for(var n of Ja(e))Dw.call(e,n)&&ov(t,n,e[n]);return t},Rw=(t,e)=>{var n={};for(var i in t)Aw.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Ja)for(var i of Ja(t))e.indexOf(i)<0&&Dw.call(t,i)&&(n[i]=t[i]);return n};const qw="[vue-draggable-plus]: ";function OV(t){console.warn(qw+t)}function wV(t){console.error(qw+t)}function _V(t,e,n){Array.isArray(t)&&n>=0&&nn?n.toUpperCase():"")}function xV(t){return Object.keys(t).reduce((e,n)=>(typeof t[n]<"u"&&(e[bV(n)]=t[n]),e),{})}function SV(t,e){if(Array.isArray(t))return t.splice(e,1)}function kV(t,e,n){if(Array.isArray(t))return t.splice(e,0,n)}function TV(t){return typeof t>"u"}function PV(t){return typeof t=="string"}function rv(t,e,n){const i=t.children[n];t.insertBefore(e,i)}function Cc(t){t.parentNode&&t.parentNode.removeChild(t)}function CV(t,e=document){var n;let i=null;return typeof(e==null?void 0:e.querySelector)=="function"?i=(n=e==null?void 0:e.querySelector)==null?void 0:n.call(e,t):i=document.querySelector(t),i||OV(`Element not found: ${t}`),i}function $V(t,e,n=null){return function(...i){return t.apply(n,i),e.apply(n,i)}}function EV(t,e){const n=Do({},t);return Object.keys(e).forEach(i=>{n[i]?n[i]=$V(t[i],e[i]):n[i]=e[i]}),n}function MV(t){return t instanceof HTMLElement}function AV(t,e){Object.keys(t).forEach(n=>{e(n,t[n])})}/**! - * Sortable 1.15.0 - * @author RubaXa - * @author owenm - * @license MIT - */function sv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function Wn(t){for(var e=1;e=0)&&(n[o]=t[o]);return n}function qV(t,e){if(t==null)return{};var n=RV(t,e),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var QV="1.15.0";function ii(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var di=ii(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Bs=ii(/Edge/i),lv=ii(/firefox/i),zr=ii(/safari/i)&&!ii(/chrome/i)&&!ii(/android/i),Qw=ii(/iP(ad|od|hone)/i),Nw=ii(/chrome/i)&&ii(/android/i),Iw={capture:!1,passive:!1};function We(t,e,n){t.addEventListener(e,n,!di&&Iw)}function Ne(t,e,n){t.removeEventListener(e,n,!di&&Iw)}function eu(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function NV(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Cn(t,e,n,i){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&eu(t,e):eu(t,e))||i&&t===n)return t;if(t===n)break}while(t=NV(t))}return null}var av=/\s+/g;function jt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(av," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(av," ")}}function Se(t,e,n){var i=t&&t.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=n+(typeof n=="string"?"":"px")}}function Yo(t,e){var n="";if(typeof t=="string")n=t;else do{var i=Se(t,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Vw(t,e,n){if(t){var i=t.getElementsByTagName(e),o=0,r=i.length;if(n)for(;o=r:s=o<=r,!s)return i;if(i===In())break;i=Pi(i,!1)}return!1}function sr(t,e,n,i){for(var o=0,r=0,s=t.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=qV(n,UV);Ws.pluginEvent.bind(ke)(t,e,Wn({dragEl:he,parentEl:ot,ghostEl:Ce,rootEl:Ke,nextEl:zi,lastDownEl:na,cloneEl:et,cloneHidden:bi,dragStarted:Ar,putSortable:_t,activeSortable:ke.active,originalEvent:i,oldIndex:Ro,oldDraggableIndex:Ur,newIndex:Ft,newDraggableIndex:Oi,hideGhostForTarget:Yw,unhideGhostForTarget:jw,cloneNowHidden:function(){bi=!0},cloneNowShown:function(){bi=!1},dispatchSortableEvent:function(r){At({sortable:e,name:r,originalEvent:i})}},o))};function At(t){XV(Wn({putSortable:_t,cloneEl:et,targetEl:he,rootEl:Ke,oldIndex:Ro,oldDraggableIndex:Ur,newIndex:Ft,newDraggableIndex:Oi},t))}var he,ot,Ce,Ke,zi,na,et,bi,Ro,Ft,Ur,Oi,$l,_t,ko=!1,tu=!1,nu=[],Wi,dn,Mc,Ac,hv,dv,Ar,wo,Yr,jr=!1,El=!1,ia,Ct,Dc=[],od=!1,iu=[],Qu=typeof document<"u",Ml=Qw,fv=Bs||di?"cssFloat":"float",YV=Qu&&!Nw&&!Qw&&"draggable"in document.createElement("div"),zw=function(){if(Qu){if(di)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Xw=function(t,e){var n=Se(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=sr(t,0,e),r=sr(t,1,e),s=o&&Se(o),l=r&&Se(r),a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+dt(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+dt(r).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var c=s.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||a>=i&&n[fv]==="none"||r&&n[fv]==="none"&&a+u>i)?"vertical":"horizontal"},jV=function(t,e,n){var i=n?t.left:t.top,o=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,l=n?e.right:e.bottom,a=n?e.width:e.height;return i===s||o===l||i+r/2===s+a/2},FV=function(t,e){var n;return nu.some(function(i){var o=i[Kt].options.emptyInsertThreshold;if(!(!o||Cf(i))){var r=dt(i),s=t>=r.left-o&&t<=r.right+o,l=e>=r.top-o&&e<=r.bottom+o;if(s&&l)return n=i}}),n},Uw=function(t){function e(o,r){return function(s,l,a,u){var c=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(o==null&&(r||c))return!0;if(o==null||o===!1)return!1;if(r&&o==="clone")return o;if(typeof o=="function")return e(o(s,l,a,u),r)(s,l,a,u);var h=(r?s:l).options.group.name;return o===!0||typeof o=="string"&&o===h||o.join&&o.indexOf(h)>-1}}var n={},i=t.group;(!i||ta(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Yw=function(){!zw&&Ce&&Se(Ce,"display","none")},jw=function(){!zw&&Ce&&Se(Ce,"display","")};Qu&&!Nw&&document.addEventListener("click",function(t){if(tu)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),tu=!1,!1},!0);var Li=function(t){if(he){t=t.touches?t.touches[0]:t;var e=FV(t.clientX,t.clientY);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Kt]._onDragOver(n)}}},HV=function(t){he&&he.parentNode[Kt]._isOutsideThisEl(t.target)};function ke(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ci({},e),t[Kt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xw(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,s){r.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ke.supportPointer!==!1&&"PointerEvent"in window&&!zr,emptyInsertThreshold:5};Ws.initializePlugins(this,t,n);for(var i in n)!(i in e)&&(e[i]=n[i]);Uw(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:YV,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?We(t,"pointerdown",this._onTapStart):(We(t,"mousedown",this._onTapStart),We(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(We(t,"dragover",this),We(t,"dragenter",this)),nu.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ci(this,WV())}ke.prototype={constructor:ke,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(wo=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,he):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,o=i.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,a=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=i.filter;if(iB(n),!he&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&zr&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Cn(l,i.draggable,n,!1),!(l&&l.animated)&&na!==l)){if(Ro=rn(l),Ur=rn(l,i.draggable),typeof u=="function"){if(u.call(this,t,l,this)){At({sortable:e,rootEl:a,name:"filter",targetEl:l,toEl:n,fromEl:n}),Nt("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=Cn(a,c.trim(),n,!1),c)return At({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:n,toEl:n}),Nt("filter",e,{evt:t}),!0}),u)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Cn(a,i.handle,n,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,e,n){var i=this,o=i.el,r=i.options,s=o.ownerDocument,l;if(n&&!he&&n.parentNode===o){var a=dt(n);if(Ke=o,he=n,ot=he.parentNode,zi=he.nextSibling,na=n,$l=r.group,ke.dragged=he,Wi={target:he,clientX:(e||t).clientX,clientY:(e||t).clientY},hv=Wi.clientX-a.left,dv=Wi.clientY-a.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,he.style["will-change"]="all",l=function(){if(Nt("delayEnded",i,{evt:t}),ke.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!lv&&i.nativeDraggable&&(he.draggable=!0),i._triggerDragStart(t,e),At({sortable:i,name:"choose",originalEvent:t}),jt(he,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){Vw(he,u.trim(),Rc)}),We(s,"dragover",Li),We(s,"mousemove",Li),We(s,"touchmove",Li),We(s,"mouseup",i._onDrop),We(s,"touchend",i._onDrop),We(s,"touchcancel",i._onDrop),lv&&this.nativeDraggable&&(this.options.touchStartThreshold=4,he.draggable=!0),Nt("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Bs||di))){if(ke.eventCanceled){this._onDrop();return}We(s,"mouseup",i._disableDelayedDrag),We(s,"touchend",i._disableDelayedDrag),We(s,"touchcancel",i._disableDelayedDrag),We(s,"mousemove",i._delayedDragTouchMoveHandler),We(s,"touchmove",i._delayedDragTouchMoveHandler),r.supportPointer&&We(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){he&&Rc(he),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ne(t,"mouseup",this._disableDelayedDrag),Ne(t,"touchend",this._disableDelayedDrag),Ne(t,"touchcancel",this._disableDelayedDrag),Ne(t,"mousemove",this._delayedDragTouchMoveHandler),Ne(t,"touchmove",this._delayedDragTouchMoveHandler),Ne(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?We(document,"pointermove",this._onTouchMove):e?We(document,"touchmove",this._onTouchMove):We(document,"mousemove",this._onTouchMove):(We(he,"dragend",this),We(Ke,"dragstart",this._onDragStart));try{document.selection?oa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(ko=!1,Ke&&he){Nt("dragStarted",this,{evt:e}),this.nativeDraggable&&We(document,"dragover",HV);var n=this.options;!t&&jt(he,n.dragClass,!1),jt(he,n.ghostClass,!0),ke.active=this,t&&this._appendGhost(),At({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dn){this._lastX=dn.clientX,this._lastY=dn.clientY,Yw();for(var t=document.elementFromPoint(dn.clientX,dn.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dn.clientX,dn.clientY),t!==e);)e=t;if(he.parentNode[Kt]._isOutsideThisEl(t),e)do{if(e[Kt]){var n=void 0;if(n=e[Kt]._onDragOver({clientX:dn.clientX,clientY:dn.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);jw()}},_onTouchMove:function(t){if(Wi){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=Ce&&Yo(Ce,!0),s=Ce&&r&&r.a,l=Ce&&r&&r.d,a=Ml&&Ct&&cv(Ct),u=(o.clientX-Wi.clientX+i.x)/(s||1)+(a?a[0]-Dc[0]:0)/(s||1),c=(o.clientY-Wi.clientY+i.y)/(l||1)+(a?a[1]-Dc[1]:0)/(l||1);if(!ke.active&&!ko){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(At({rootEl:ot,name:"add",toEl:ot,fromEl:Ke,originalEvent:t}),At({sortable:this,name:"remove",toEl:ot,originalEvent:t}),At({rootEl:ot,name:"sort",toEl:ot,fromEl:Ke,originalEvent:t}),At({sortable:this,name:"sort",toEl:ot,originalEvent:t})),_t&&_t.save()):Ft!==Ro&&Ft>=0&&(At({sortable:this,name:"update",toEl:ot,originalEvent:t}),At({sortable:this,name:"sort",toEl:ot,originalEvent:t})),ke.active&&((Ft==null||Ft===-1)&&(Ft=Ro,Oi=Ur),At({sortable:this,name:"end",toEl:ot,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Nt("nulling",this),Ke=he=ot=Ce=zi=et=na=bi=Wi=dn=Ar=Ft=Oi=Ro=Ur=wo=Yr=_t=$l=ke.dragged=ke.ghost=ke.clone=ke.active=null,iu.forEach(function(t){t.checked=!0}),iu.length=Mc=Ac=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":he&&(this._onDragOver(t),GV(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,i=0,o=n.length,r=this.options;ii.right+o||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+o}function eB(t,e,n,i,o,r,s,l){var a=i?t.clientY:t.clientX,u=i?n.height:n.width,c=i?n.top:n.left,h=i?n.bottom:n.right,d=!1;if(!s){if(l&&iac+u*r/2:ah-ia)return-Yr}else if(a>c+u*(1-o)/2&&ah-u*r/2)?a>c+u/2?1:-1:0}function tB(t){return rn(he){k=g(k),l&&_.destroy(),l=new ke(k,w())};Me(s,()=>{l&&AV(w(),(k,x)=>{l==null||l.option(k,x)})},{deep:!0});const _={option:(k,x)=>l==null?void 0:l.option(k,x),destroy:()=>{l==null||l.destroy(),l=null},save:()=>l==null?void 0:l.save(),toArray:()=>l==null?void 0:l.toArray(),closest:(...k)=>l==null?void 0:l.closest(...k)},T=()=>_==null?void 0:_.option("disabled",!0),b=()=>_==null?void 0:_.option("disabled",!1);return lB(()=>{a&&y()}),sB(_.destroy),Do({start:y,pause:T,resume:b},_)}const ud=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],aB=["onUpdate","onStart","onAdd","onRemove","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target",...ud.map(t=>`on${t.replace(/^\S/,e=>e.toUpperCase())}`)],uB=Le({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:aB,emits:["update:modelValue",...ud],setup(t,{slots:e,emit:n,expose:i}){const o=hd(),r=ud.reduce((c,h)=>{const d=`on${h.replace(/^\S/,f=>f.toUpperCase())}`;return c[d]=f=>n(h,f),c},{}),s=ye(()=>{const c=bv(t),h=Rw(c,["modelValue"]),d=Object.entries(h).reduce((f,[p,g])=>{const w=O(g);return w!==void 0&&(f[p]=w),f},{});return Do(Do({},r),xV(Do(Do({},o),d)))}),l=ye({get:()=>t.modelValue,set:c=>n("update:modelValue",c)}),a=oe(),u=zt(ad(t.target||a,l,s));return i(u),()=>{if(e.default)return Ie(t.tag||"div",{ref:a},e.default(u))}}});const cB={class:"draggable-item-content"},hB={key:0},dB={key:1},fB={key:2},pB={key:3},mB={key:4},gB={key:5},vB={key:0,class:"ui-special-item-container"},yB={__name:"UIDesign",props:{modelValue:{}},emits:["update:modelValue"],setup(t){const e=lu(t,"modelValue"),{t:n}=Ee(),i=dd(e.value),o=zt(i),r=oe(o.inputFields),s=oe(o.outputNodes),l=oe(o.triggerNodes),a=oe([{id:"typography-paragraph",required:!0,placeholder:n("components.workspace.uiDesign.typography-paragraph.placeholder"),show:!1,multiline:!0,value:"",password:!1,name:"typography-paragraph",display_name:"typography-paragraph",type:"str",clear_after_run:!0,list:!1,field_type:"typography-paragraph"}]),u=()=>{e.value.data.ui={inputFields:r.value,outputNodes:s.value}},c=oe(!1),h=oe(),d=zt({animation:150,ghostClass:"ghost",handle:".handle",group:{name:"fields",pull:!1},onStart:()=>{c.value=!0},onAdd:()=>{u()},onEnd:()=>{u(),Ci(()=>{c.value=!1})}});ad(h,r,d);const f=oe(),p=zt({animation:150,ghostClass:"ghost",handle:".handle",group:{name:"fields",pull:!1},onStart:()=>{c.value=!0},onAdd:()=>{u()},onEnd:()=>{u(),Ci(()=>{c.value=!1})}});ad(f,s,p);const g=(w,y)=>{w.splice(y,1),u()};return(w,y)=>{const _=C("a-menu-item"),T=C("a-tooltip"),b=C("a-menu"),k=C("a-layout-sider"),x=C("a-typography-title"),$=C("a-select"),L=C("a-textarea"),V=C("a-input"),R=C("a-input-number"),z=C("a-checkbox"),j=C("a-form-item"),J=C("a-col"),S=C("a-row"),A=C("a-form"),P=C("a-divider"),E=C("a-button"),B=C("a-popconfirm"),q=C("a-space"),N=C("cron-ant"),te=C("a-card"),U=C("a-typography-paragraph"),le=C("a-layout-content"),ae=C("a-layout"),G=s_("highlight");return M(),H(ae,{class:"ui-design-layout","has-sider":"",style:{height:"100%","min-height":"calc(100vh - 40px - 40px)"}},{default:v(()=>[m(k,{style:{overflow:"auto",backgroundColor:"#fff"},class:"custom-scrollbar"},{default:v(()=>[m(b,{theme:"light",mode:"inline",ref:"siderMenu"},{default:v(()=>[m(O(uB),{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=Q=>a.value=Q),animation:"150",group:{name:"fields",pull:"clone",put:!1},sort:!1},{default:v(()=>[(M(!0),se(Te,null,rt(a.value,(Q,ne)=>(M(),H(T,{key:`node-${ne}`,title:O(n)(`components.workspace.uiDesign.${Q.name}.tip`),placement:"right"},{default:v(()=>[m(_,{class:"draggable-menu-item",id:Q.id},{default:v(()=>[m(O(Nu)),Qe("span",null,pe(O(n)(`components.workspace.uiDesign.${Q.name}.title`)),1)]),_:2},1032,["id"])]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"])]),_:1},512)]),_:1}),m(ae,{style:{"background-color":"#fff"}},{default:v(()=>[m(le,{style:{margin:"24px 16px 0",overflow:"initial"}},{default:v(()=>[m(S,{gutter:[16,16]},{default:v(()=>[m(J,{xxl:6,xl:8,lg:10,md:24},{default:v(()=>[m(S,{gutter:[16,16]},{default:v(()=>[m(x,{level:3},{default:v(()=>[m(O(q_),{class:"text-primary"}),ge(" "+pe(O(n)("workspace.workflowSpace.inputs")),1)]),_:1}),m(J,{span:24},{default:v(()=>[m(A,{layout:"vertical",ref_key:"inputFieldsEl",ref:h},{default:v(()=>[(M(!0),se(Te,null,rt(r.value,(Q,ne)=>(M(),se("div",{class:"draggable-item",key:`field-${Q}-${ne}`},[m(O(Nu),{class:"handle"}),O(fd).includes(Q.field_type)?Oe("",!0):(M(),H(j,{key:0,class:"draggable-item-content"},{label:v(()=>[ge(pe(Q.display_name),1)]),default:v(()=>[Q.category=="llms"&&Q=="temperature"?(M(),H(pd,{key:0,modelValue:Q.value,"onUpdate:modelValue":ue=>Q.value=ue},null,8,["modelValue","onUpdate:modelValue"])):Q.field_type=="select"?(M(),H($,{key:1,value:Q.value,"onUpdate:value":ue=>Q.value=ue,options:Q.options},null,8,["value","onUpdate:value","options"])):Q.field_type=="textarea"?(M(),H(L,{key:2,value:Q.value,"onUpdate:value":ue=>Q.value=ue,autoSize:!0,showCount:!0,placeholder:Q.placeholder},null,8,["value","onUpdate:value","placeholder"])):Q.field_type=="input"?(M(),H(V,{key:3,value:Q.value,"onUpdate:value":ue=>Q.value=ue,placeholder:Q.placeholder},null,8,["value","onUpdate:value","placeholder"])):Q.field_type=="number"?(M(),H(R,{key:4,value:Q.value,"onUpdate:value":ue=>Q.value=ue,placeholder:Q.placeholder},null,8,["value","onUpdate:value","placeholder"])):Q.field_type=="checkbox"?(M(),H(z,{key:5,checked:Q.value,"onUpdate:checked":ue=>Q.value=ue},null,8,["checked","onUpdate:checked"])):Q.field_type=="file"?(M(),H(Tv,{key:6,modelValue:Q.value,"onUpdate:modelValue":ue=>Q.value=ue},null,8,["modelValue","onUpdate:modelValue"])):Q.field_type=="list"?(M(),H(v_,{key:7,modelValue:Q.value,"onUpdate:modelValue":ue=>Q.value=ue},null,8,["modelValue","onUpdate:modelValue"])):Oe("",!0)]),_:2},1024)),Q.field_type=="typography-paragraph"?(M(),H(S,{key:1,class:"draggable-item-content"},{default:v(()=>[m(J,{span:24,class:"ui-special-item-container"},{default:v(()=>[m(L,{class:"ui-special-item",value:Q.value,"onUpdate:value":ue=>Q.value=ue,placeholder:Q.placeholder,"auto-size":"",onChange:u},null,8,["value","onUpdate:value","placeholder"]),m(O(Df),{class:"ui-special-item-delete",onClick:ue=>g(r.value,ne)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)):Oe("",!0)]))),128))]),_:1},512)]),_:1}),m(P),m(J,{span:24},{default:v(()=>[m(S,{gutter:[16,16]},{default:v(()=>[(M(!0),se(Te,null,rt(l.value,Q=>(M(),H(J,{key:`node-${Q.id}`,span:24},{default:v(()=>[Q.type=="ButtonTrigger"?(M(),H(E,{key:0,type:"primary",block:""},{default:v(()=>[ge(pe(Q.data.template.button_text.value),1)]),_:2},1024)):Q.type=="ScheduleTrigger"?(M(),H(te,{key:1,title:O(n)("components.nodes.triggers.ScheduleTrigger.schedule_settings")},{extra:v(()=>[m(q,null,{default:v(()=>[m(E,{type:"primary"},{default:v(()=>[ge(pe(O(n)("components.nodes.triggers.ScheduleTrigger.save_schedule_settings")),1)]),_:1}),m(B,{title:O(n)("workspace.workflowSpace.delete_schedule_trigger_confirm")},{default:v(()=>[m(E,{type:"primary",danger:""},{default:v(()=>[ge(pe(O(n)("workspace.workflowSpace.delete")),1)]),_:1})]),_:1},8,["title"])]),_:1})]),default:v(()=>[m(N,{modelValue:Q.data.template.schedule.value,"onUpdate:modelValue":ne=>Q.data.template.schedule.value=ne,"button-props":{type:"primary",shape:"round"},locale:w.language},null,8,["modelValue","onUpdate:modelValue","locale"])]),_:2},1032,["title"])):Oe("",!0)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1}),m(J,{xxl:18,xl:16,lg:14,md:24},{default:v(()=>[m(x,{level:3,style:{display:"flex","justify-content":"space-between"}},{default:v(()=>[Qe("span",null,[m(O(V_),{class:"text-primary"}),ge(" "+pe(O(n)("workspace.workflowSpace.outputs")),1)])]),_:1}),m(S,{gutter:[16,16],ref_key:"outputNodesEl",ref:f},{default:v(()=>[(M(!0),se(Te,null,rt(s.value,(Q,ne)=>(M(),H(J,{span:24,class:"draggable-item",key:`node-${Q.id}-${ne}`},{default:v(()=>{var ue;return[m(O(Nu),{class:"handle"}),Qe("div",cB,[Q.type=="Text"?(M(),se("div",hB,[m(x,{level:5},{default:v(()=>[ge(pe(Q.data.template.output_title.value),1)]),_:2},1024),Q.data.template.render_markdown.value?(M(),se(Te,{key:0},[Ic(m(O(l_),{source:Q.data.template.text.value,class:"markdown-body custom-hljs"},null,8,["source"]),[[G]]),m(U,{copyable:{text:Q.data.template.text.value}},null,8,["copyable"])],64)):(M(),H(U,{key:1,copyable:{text:Q.data.template.text.value}},{default:v(()=>[ge(pe(Q.data.template.text.value),1)]),_:2},1032,["copyable"]))])):Q.type=="Audio"?(M(),se("div",dB,[m(y_,{audios:[(ue=Q.data.template.audio_url)==null?void 0:ue.value]},null,8,["audios"])])):Q.type=="Mindmap"?(M(),se("div",fB,[m(O_,{content:Q.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):Q.type=="Mermaid"?(M(),se("div",pB,[m(w_,{content:Q.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):Q.type=="Echarts"?(M(),se("div",mB,[m(__,{option:Q.data.template.option.value,style:{width:"100%","min-height":"50vh"}},null,8,["option"])])):(M(),se("div",gB,[Q.field_type=="typography-paragraph"?(M(),se("div",vB,[m(L,{class:"ui-special-item",value:Q.value,"onUpdate:value":Ae=>Q.value=Ae,placeholder:Q.placeholder,"auto-size":"",onChange:u},null,8,["value","onUpdate:value","placeholder"]),m(O(Df),{class:"ui-special-item-delete",onClick:Ae=>g(s.value,ne)},null,8,["onClick"])])):Oe("",!0)]))])]}),_:2},1024))),128))]),_:1},512)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},OB=lr(yB,[["__scopeId","data-v-01ce6c33"]]);const wB={__name:"VueFlowStyleSettings",props:{modelValue:{}},emits:xv(["save"],["update:modelValue"]),setup(t,{emit:e}){const n=lu(t,"modelValue"),{t:i}=Ee(),o=oe(!1),r=()=>{e("save",n),o.value=!1};return(s,l)=>{const a=C("a-button"),u=C("a-select-option"),c=C("a-select"),h=C("a-form-item"),d=C("a-switch"),f=C("a-form"),p=C("a-drawer");return M(),se(Te,null,[m(a,{onClick:l[0]||(l[0]=g=>o.value=!0),class:"settings-button"},{default:v(()=>[ge(pe(O(i)("components.workspace.vueFlowStyleSettings.title")),1)]),_:1}),m(p,{open:o.value,"onUpdate:open":l[3]||(l[3]=g=>o.value=g),class:"custom-class",title:O(i)("components.workspace.vueFlowStyleSettings.title"),placement:"right"},{extra:v(()=>[m(a,{type:"primary",onClick:r},{default:v(()=>[ge(pe(O(i)("common.save")),1)]),_:1})]),default:v(()=>[m(f,{model:n.value,"label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off"},{default:v(()=>[m(h,{label:O(i)("components.workspace.vueFlowStyleSettings.edge_type"),name:"edge_type"},{default:v(()=>[m(c,{value:n.value.edge.type,"onUpdate:value":l[1]||(l[1]=g=>n.value.edge.type=g)},{default:v(()=>[m(u,{value:"bezier"},{default:v(()=>[ge(pe(O(i)("components.workspace.vueFlowStyleSettings.edge_type_bezier")),1)]),_:1}),m(u,{value:"step"},{default:v(()=>[ge(pe(O(i)("components.workspace.vueFlowStyleSettings.edge_type_step")),1)]),_:1}),m(u,{value:"smoothstep"},{default:v(()=>[ge(pe(O(i)("components.workspace.vueFlowStyleSettings.edge_type_smoothstep")),1)]),_:1}),m(u,{value:"straight"},{default:v(()=>[ge(pe(O(i)("components.workspace.vueFlowStyleSettings.edge_type_straight")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),m(h,{label:O(i)("components.workspace.vueFlowStyleSettings.edge_animated"),name:"edge_animated"},{default:v(()=>[m(d,{checked:n.value.edge.animated,"onUpdate:checked":l[2]||(l[2]=g=>n.value.edge.animated=g)},null,8,["checked"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["open","title"])],64)}}},_B=lr(wB,[["__scopeId","data-v-33ef65ae"]]);const bB={key:0,class:"loading-container"},xB={key:1,class:"editor-container"},SB={class:"title-container"},kB=["data-node-type"],TB={__name:"WorkflowEditor",setup(t){const{t:e}=Ee(),n=oe(!0),i=a_(),o=u_(),r=i.params.workflowId,s=oe(e("workspace.workflowEditor.workflow_canvas")),l=zt([e("workspace.workflowEditor.workflow_info"),e("workspace.workflowEditor.workflow_canvas"),e("workspace.workflowEditor.workflow_ui_design")]),a=Ss(),{userDatabases:u}=Ji(a),c=c_(),h=h_(),{vueFlowStyleSettings:d}=Ji(h),f=Od(),{nodeMessagesCount:p,nodeMessages:g}=Ji(f),w={change:(X,Y)=>{},delete:(X,Y)=>{T.value=T.value.filter(ce=>ce.id!==Y),T.value=T.value.filter(ce=>!(ce.source&&ce.source===Y||ce.target&&ce.target===Y))},clone:(X,Y)=>{const ce=T.value.find(ee=>ee.id===Y);ce.selected=!1;const de=JSON.parse(JSON.stringify(ce));de.id=Vg(),de.selected=!0,de.position.x+=50,de.position.y+=50,T.value.push(de)}};Me(()=>p.value,()=>{for(;g.value.length>0;){const{action:X,data:Y,nodeId:ce}=f.pop();w[X](Y,ce)}});const y=oe(""),_=oe({}),T=oe([]),b=()=>{le.value.forEach(X=>{X.type=d.value.edge.type,X.animated=d.value.edge.animated,X.style=d.value.edge.style}),h.setVueFlowStyleSettings(d.value)};su(async()=>{const X=la("get",{wid:r}),Y=x_("list",{}),ce=await X,de=await Y;if(de.status==200&&a.setUserDatabases(de.data),ce.status!=200){To.error(e("workspace.workflowSpace.get_workflow_failed")),o.push({name:"WorkflowSpaceMain"});return}_.value=ce.data,_.value.data.nodes.forEach(ee=>{var $e,it;ee.category=="vectorDb"?ee.data.template.database.options=u.value.filter(vt=>vt.status=="VALID").map(vt=>({value:vt.vid,label:vt.name})):ee.type=="CommentNode"&&(ee.dimensions={width:parseInt((($e=ee.style)==null?void 0:$e.width)||100),height:parseInt(((it=ee.style)==null?void 0:it.height)||50)})}),_.value.tags=_.value.tags.map(ee=>ee.tid),N(_.value.data),T.value=[..._.value.data.nodes,..._.value.data.edges],y.value=zs(_.value),n.value=!1});const k=()=>{const X=q();_.value.data={...X,ui:_.value.data.ui||{}}},x=oe(!1),$=oe({hasInput:!1,hasOutput:!1,hasTrigger:!1}),L=()=>{$.value={hasInput:!1,hasOutput:!1,hasTrigger:!1,noCycle:!1,noIsolatedNodes:!1};const X=p_(_.value);$.value.noCycle=X.noCycle,$.value.noIsolatedNodes=X.noIsolatedNodes;const Y=dd(_.value),ce=zt(Y);$.value.hasInput=ce.inputFields.filter(de=>!fd.includes(de.field_type)).length>0,$.value.hasOutput=ce.outputNodes.filter(de=>de.category=="outputs").length>0,$.value.hasTrigger=ce.triggerNodes.filter(de=>de.category=="triggers").length>0,Object.values($.value).some(de=>de===!1)&&(x.value=!0)},V=oe(!1),R=async()=>{V.value=!0;const X=_.value.data.ui||{},Y=q();_.value.data={...Y,ui:X},L();const ce=await la("update",{wid:r,..._.value});ce.status==200?(To.success(e("workspace.workflowSpace.save_success")),y.value=zs(_.value)):ce.data.status==400?To.error(e("workspace.workflowSpace.workflow_cant_invoke_itself")):To.error(e("workspace.workflowSpace.save_failed")),c.updateUserWorkflow(_.value),V.value=!1},z=async()=>{await o.push({name:"WorkflowUse",params:{workflowId:r}})},j=oe(!1),J=async()=>{await R(),await z()},S=async()=>{await z()},A=()=>{const X=_.value.data.ui||{},Y=q();_.value.data={...Y,ui:X},y.value!=zs(_.value)?j.value=!0:z()},{addEdges:P,updateEdge:E,onConnect:B,toObject:q,fromObject:N,viewport:te,vueFlowRef:U,edges:le}=Ze();B(X=>{X.type=d.value.edge.type,X.animated=d.value.edge.animated,X.style=d.value.edge.style,P([X])});const ae=({edge:X,connection:Y})=>{E(X,Y)},G=X=>{T.value=T.value.filter(Y=>!(Y.source===X.edge.source&&Y.target===X.edge.target&&Y.sourceHandle===X.edge.sourceHandle&&Y.targetHandle===X.edge.targetHandle))};let Q;const ne=X=>{Q&&document.body.removeChild(Q);let Y=X.target.getBoundingClientRect();Q=X.target.cloneNode(!0),Q.style.position="absolute",Q.style.top=Y.top+"px",Q.style.left=Y.left+"px",Q.style.width=Y.width+"px",Q.style.height=Y.height+"px",Q.style.opacity="0.5",Q.style.zIndex="1000",document.body.appendChild(Q)},ue=X=>{Q&&(Q.style.left=X.touches[0].clientX+"px",Q.style.top=X.touches[0].clientY+"px")},Ae=X=>{Q&&(document.body.removeChild(Q),Q=null);let Y=X.srcElement.dataset.nodeType;Y||(Y=X.srcElement.children[0].dataset.nodeType);const ce=K[Y],de=Vg(),ee=JSON.parse(JSON.stringify(I[Y].props.templateData));ee.description=e(`components.nodes.${ce}.${Y}.description`),Object.keys(ee.template).forEach(Vi=>{ee.template[Vi].display_name=e(`components.nodes.${ce}.${Y}.${Vi}`)});const $e=U.value.getBoundingClientRect(),{x:it,y:vt,zoom:bn}=te.value;let on=0,Pt=0;X.type=="touchend"?(on=X.changedTouches[0].clientX-$e.left,Pt=X.changedTouches[0].clientY-$e.top):(on=X.clientX-$e.left,Pt=X.clientY-$e.top);const dr={id:de,type:Y,category:ce,position:{x:(on-it)/bn,y:(Pt-vt)/bn},data:ee};T.value.push(dr)},D=Object.assign({"/src/components/nodes/assistedNodes/CommentNode.vue":i$,"/src/components/nodes/controlFlows/Conditional.vue":g$,"/src/components/nodes/controlFlows/Empty.vue":y$,"/src/components/nodes/controlFlows/JsonProcess.vue":w$,"/src/components/nodes/controlFlows/RandomChoice.vue":b$,"/src/components/nodes/fileProcessing/FileLoader.vue":S$,"/src/components/nodes/imageGeneration/StableDiffusion.vue":T$,"/src/components/nodes/llms/ChatGLM.vue":C$,"/src/components/nodes/llms/OpenAI.vue":E$,"/src/components/nodes/outputs/Document.vue":A$,"/src/components/nodes/outputs/Echarts.vue":R$,"/src/components/nodes/outputs/Email.vue":Q$,"/src/components/nodes/outputs/Mermaid.vue":I$,"/src/components/nodes/outputs/Mindmap.vue":B$,"/src/components/nodes/outputs/Text.vue":L$,"/src/components/nodes/outputs/WorkflowInvokeOutput.vue":X$,"/src/components/nodes/textProcessing/ListRender.vue":F$,"/src/components/nodes/textProcessing/MarkdownToHtml.vue":G$,"/src/components/nodes/textProcessing/TemplateCompose.vue":eE,"/src/components/nodes/textProcessing/TextInOut.vue":nE,"/src/components/nodes/textProcessing/TextSplitters.vue":oE,"/src/components/nodes/textProcessing/TextTruncation.vue":sE,"/src/components/nodes/tools/ImageSearch.vue":aE,"/src/components/nodes/tools/ProgrammingFunction.vue":ER,"/src/components/nodes/tools/WorkflowInvoke.vue":RR,"/src/components/nodes/triggers/ButtonTrigger.vue":QR,"/src/components/nodes/vectorDb/AddData.vue":IR,"/src/components/nodes/vectorDb/DeleteData.vue":BR,"/src/components/nodes/vectorDb/Search.vue":LR,"/src/components/nodes/webCrawlers/BilibiliCrawler.vue":XR,"/src/components/nodes/webCrawlers/TextCrawler.vue":YR,"/src/components/nodes/webCrawlers/YoutubeCrawler.vue":FR}),I={},ie={},K={};Object.entries(D).forEach(([X,Y])=>{const ce=X.match(/\/([^/]+)\.vue$/)[1];I[ce]=Ki(Y.default);const de=X.match(/\/([^/]+)\/[^/]+\.vue$/)[1];ie[de]||(ie[de]=[]),ie[de].push(ce),K[ce]=de});const re=zt({open:!1,code:"",openEditor:async()=>{let X=q();X.ui=_.value.data.ui||{},re.code=JSON.stringify(X,null,2),re.open=!0},updateCode:X=>{const Y=JSON.parse(X);_.value.data.ui=Y.ui||{},T.value=[...Y.nodes,...Y.edges],_.value.data.nodes=Y.nodes,_.value.data.edges=Y.edges,_.value.data.nodes.forEach(ce=>{ce.category=="vectorDb"&&(ce.data.template.database.options=u.value.filter(de=>de.status=="VALID").map(de=>({value:de.vid,label:de.name})))}),y.value=zs(_.value)}});return(X,Y)=>{const ce=C("a-spin"),de=C("a-typography-text"),ee=C("a-button"),$e=C("a-modal"),it=C("a-typography-link"),vt=C("a-col"),bn=C("a-segmented"),on=C("Caution"),Pt=C("a-typography-paragraph"),dr=C("a-space"),Vi=C("a-row"),fr=C("a-divider"),Hw=C("a-menu-item"),Gw=C("a-sub-menu"),Zw=C("a-menu"),Kw=C("a-layout-sider"),Jw=C("a-layout-content"),Mf=C("a-layout");return n.value?(M(),se("div",bB,[m(ce,{size:"large"})])):(M(),se("div",xB,[Qe("div",SB,[m(Vi,{type:"flex",align:"middle",justify:"space-between",gutter:[16,16],style:{width:"100%"}},{default:v(()=>[m(vt,{flex:"0 0"},{default:v(()=>[m(it,{onClick:A,style:{"text-wrap":"nowrap"}},{default:v(()=>[m(O(d_)),ge(" "+pe(O(e)("common.back"))+" ",1),m($e,{open:j.value,"onUpdate:open":Y[0]||(Y[0]=Ue=>j.value=Ue)},{title:v(()=>[m(de,{type:"warning"},{default:v(()=>[m(O(f_)),ge(" "+pe(O(e)("common.back")),1)]),_:1})]),footer:v(()=>[m(ee,{onClick:S},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.exit_without_save")),1)]),_:1}),m(ee,{type:"primary",onClick:J},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.save_and_exit")),1)]),_:1})]),default:v(()=>[ge(" "+pe(O(e)("workspace.workflowEditor.exit_not_saved_confirm"))+" ",1)]),_:1},8,["open"])]),_:1})]),_:1}),m(vt,{flex:"0 0"},{default:v(()=>[m(de,{class:"title",editable:{triggerType:["text","icon"]},content:_.value.title,"onUpdate:content":Y[1]||(Y[1]=Ue=>_.value.title=Ue)},null,8,["content"])]),_:1}),m(vt,{flex:"1 0",style:{display:"flex","justify-content":"center"}},{default:v(()=>[m(bn,{value:s.value,"onUpdate:value":Y[2]||(Y[2]=Ue=>s.value=Ue),options:l,onChange:k},null,8,["value","options"])]),_:1}),m(vt,{flex:"0 0",style:{display:"flex","justify-content":"end"}},{default:v(()=>[m(dr,null,{default:v(()=>[m(ee,{onClick:re.openEditor},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.edit_code"))+" ",1),m(ow,{language:"json",open:re.open,"onUpdate:open":Y[3]||(Y[3]=Ue=>re.open=Ue),code:re.code,"onUpdate:code":Y[4]||(Y[4]=Ue=>re.code=Ue),onSave:re.updateCode},null,8,["open","code","onSave"])]),_:1},8,["onClick"]),m(ee,{type:"primary",onClick:R,loading:V.value},{default:v(()=>[ge(pe(O(e)("common.save")),1)]),_:1},8,["loading"]),m($e,{open:x.value,"onUpdate:open":Y[5]||(Y[5]=Ue=>x.value=Ue),footer:null},{title:v(()=>[m(de,{type:"warning"},{default:v(()=>[m(on),ge(" "+pe(O(e)("workspace.workflowEditor.workflow_check_warning")),1)]),_:1})]),default:v(()=>[$.value.hasInput?Oe("",!0):(M(),H(Pt,{key:0,type:"danger"},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.workflow_has_no_inputs")),1)]),_:1})),$.value.hasOutput?Oe("",!0):(M(),H(Pt,{key:1,type:"danger"},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.workflow_has_no_outputs")),1)]),_:1})),$.value.hasTrigger?Oe("",!0):(M(),H(Pt,{key:2,type:"danger"},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.workflow_has_no_triggers")),1)]),_:1})),$.value.noCycle?Oe("",!0):(M(),H(Pt,{key:3,type:"danger"},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.workflow_has_cycles")),1)]),_:1})),$.value.noIsolatedNodes?Oe("",!0):(M(),H(Pt,{key:4,type:"danger"},{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.workflow_has_isolated_nodes")),1)]),_:1}))]),_:1},8,["open"])]),_:1})]),_:1})]),_:1})]),Ic(Qe("div",null,[m(Vi,{justify:"center"},{default:v(()=>[m(vt,{lg:10,md:12,sm:18,xs:24},{default:v(()=>[m(fr,null,{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.tags")),1)]),_:1}),m(vV,{modelValue:_.value.tags,"onUpdate:modelValue":Y[6]||(Y[6]=Ue=>_.value.tags=Ue)},null,8,["modelValue"]),m(fr,null,{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.brief_info")),1)]),_:1}),m(b_,{modelValue:_.value.brief,"onUpdate:modelValue":Y[7]||(Y[7]=Ue=>_.value.brief=Ue)},null,8,["modelValue"]),m(fr,null,{default:v(()=>[ge(pe(O(e)("workspace.workflowEditor.brief_images")),1)]),_:1}),Qe("div",null,[m(Tv,{modelValue:_.value.images,"onUpdate:modelValue":Y[8]||(Y[8]=Ue=>_.value.images=Ue),multiple:!0},null,8,["modelValue"])])]),_:1})]),_:1})],512),[[Rf,s.value==O(e)("workspace.workflowEditor.workflow_info")]]),Ic(m(Mf,{"has-sider":"",style:{height:"100%"}},{default:v(()=>[m(Kw,{style:{overflow:"auto",backgroundColor:"#fff"},class:"custom-scrollbar"},{default:v(()=>[m(Zw,{theme:"light",mode:"inline"},{default:v(()=>[(M(!0),se(Te,null,rt(Object.keys(ie),(Ue,e_)=>(M(),H(Gw,{key:`category-${e_}`},{title:v(()=>[ge(pe(O(e)(`components.nodes.${Ue}.title`)),1)]),default:v(()=>[(M(!0),se(Te,null,rt(ie[Ue],(Ls,t_)=>(M(),H(Hw,{"data-node-type":Ls,id:Ls,draggable:"true",onTouchstart:ne,onTouchmove:ue,onDragend:Ae,onTouchend:Ae,key:`node-${t_}`},{default:v(()=>[Qe("span",{"data-node-type":Ls},pe(O(e)(`components.nodes.${Ue}.${Ls}.title`)),9,kB)]),_:2},1032,["data-node-type","id"]))),128))]),_:2},1024))),128))]),_:1})]),_:1}),m(Mf,null,{default:v(()=>[m(Jw,{style:{margin:"24px 16px 0",overflow:"initial"}},{default:v(()=>[m(O(KT),{modelValue:T.value,"onUpdate:modelValue":Y[10]||(Y[10]=Ue=>T.value=Ue),"node-types":I,edgesUpdatable:!0,onEdgeUpdate:ae,onEdgeDoubleClick:G,"snap-to-grid":!0,"snap-grid":[20,20]},{default:v(()=>[m(O(MI)),m(O(gV)),m(O(VI),{variant:O(fn).Dots},null,8,["variant"]),m(_B,{modelValue:O(d),"onUpdate:modelValue":Y[9]||(Y[9]=Ue=>xs(d)?d.value=Ue:null),onSave:b},null,8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},512),[[Rf,s.value==O(e)("workspace.workflowEditor.workflow_canvas")]]),s.value==O(e)("workspace.workflowEditor.workflow_ui_design")?(M(),H(OB,{key:0,modelValue:_.value,"onUpdate:modelValue":Y[11]||(Y[11]=Ue=>_.value=Ue)},null,8,["modelValue"])):Oe("",!0)]))}}},LB=lr(TB,[["__scopeId","data-v-80e20e23"]]);export{LB as default}; diff --git a/backend/web/assets/WorkflowEditor-e7ec6859.css b/backend/web/assets/WorkflowEditor-14bce7c1.css similarity index 96% rename from backend/web/assets/WorkflowEditor-e7ec6859.css rename to backend/web/assets/WorkflowEditor-14bce7c1.css index 719bec3e..d719609c 100644 --- a/backend/web/assets/WorkflowEditor-e7ec6859.css +++ b/backend/web/assets/WorkflowEditor-14bce7c1.css @@ -1 +1 @@ -.comment-node[data-v-05111a7d]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:10px;width:100%;height:100%}.comment-node .title-container[data-v-05111a7d]{color:#fff;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:20px 10px 10px;border-top-left-radius:10px;border-top-right-radius:10px}.comment-node .title-container .comment-text[data-v-05111a7d]{color:#545454;width:100%}.comment-node .title-container .hint-popover[data-v-05111a7d]{font-size:14px;color:#a0a0a0}.comment-node .description-container[data-v-05111a7d]{padding:10px;color:#b8b8b8}.comment-node .main-container[data-v-05111a7d]{margin-bottom:10px}.comment-node .output-container[data-v-05111a7d]{padding:10px 0;display:flex}.comment-node .output-container[data-v-05111a7d]:empty{padding:0}.comment-node .output-container span[data-v-05111a7d]{float:right;margin-right:10px;color:#fff;font-size:18px}.comment-node .delete-button[data-v-05111a7d]{opacity:0}.comment-node:hover .delete-button[data-v-05111a7d]{opacity:1}.comment-node .vue-flow__resize-control{opacity:0}.comment-node:hover .vue-flow__resize-control{opacity:1}.vue-flow__resize-control{position:absolute}.vue-flow__resize-control.left,.vue-flow__resize-control.right{cursor:ew-resize}.vue-flow__resize-control.top,.vue-flow__resize-control.bottom{cursor:ns-resize}.vue-flow__resize-control.top.left,.vue-flow__resize-control.bottom.right{cursor:nwse-resize}.vue-flow__resize-control.bottom.left,.vue-flow__resize-control.top.right{cursor:nesw-resize}.vue-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.vue-flow__resize-control.handle.left{left:0;top:50%}.vue-flow__resize-control.handle.right{left:100%;top:50%}.vue-flow__resize-control.handle.top{left:50%;top:0}.vue-flow__resize-control.handle.bottom{left:50%;top:100%}.vue-flow__resize-control.handle.top.left,.vue-flow__resize-control.handle.bottom.left{left:0}.vue-flow__resize-control.handle.top.right,.vue-flow__resize-control.handle.bottom.right{left:100%}.vue-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.vue-flow__resize-control.line.left,.vue-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.vue-flow__resize-control.line.left{left:0;border-left-width:5px}.vue-flow__resize-control.line.right{left:100%;border-right-width:5px}.vue-flow__resize-control.line.top,.vue-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.vue-flow__resize-control.line.top{top:0;border-top-width:5px}.vue-flow__resize-control.line.bottom{border-bottom-width:5px;top:100%}.node{border:1px solid #777;border-radius:10px;background:white;display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:10px;min-width:150px;max-width:400px}.node .title-container{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:20px 10px 10px;border-top-left-radius:10px;border-top-right-radius:10px;border-bottom:1px solid #e2e2e2;background:#f8f8f8}.node .title-container .hint-popover{font-size:14px;color:#a0a0a0}.node .description-container{padding:10px;color:#b8b8b8}.node .main-container{margin-bottom:10px}.node .output-container{padding:10px 0;display:flex}.node .output-container:empty{padding:0}.node .output-container span{float:right;margin-right:10px;color:#fff;font-size:18px}.template-item-field[data-v-28cde401]{background:#f8f8f8;padding:10px 0;width:100%;height:100%;position:relative}.template-item-output-field[data-v-28cde401]{background-color:#28c5e5!important}.template-item-field-text[data-v-28cde401]{position:relative;padding:0 10px;display:flex;justify-content:flex-end;gap:5px}.template-item-field-text .show-in-use-interface-checkbox[data-v-28cde401]{flex-grow:1;display:flex;justify-content:flex-end}.template-item-field-content[data-v-28cde401]{position:relative;padding:0 10px}.template-item-field .delete-field-button[data-v-28cde401]{opacity:0;transition:opacity .2s ease-in-out}.template-item-field:hover .delete-field-button[data-v-28cde401]{opacity:1}.code-editor .cm-scroller::-webkit-scrollbar{width:6px;height:6px}.code-editor .cm-scroller::-webkit-scrollbar-thumb{background:#CCCCCC;border-radius:6px}.code-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.search-input[data-v-169c3c13]{min-width:300px;max-width:500px}.ghost[data-v-01ce6c33]{opacity:.5;background:#c8ebfb}.draggable-item[data-v-01ce6c33]{padding:10px;display:flex}.handle[data-v-01ce6c33]{cursor:move;margin-right:10px}.draggable-item-content[data-v-01ce6c33]{flex-grow:1}.ui-special-item-container[data-v-01ce6c33]{display:flex;align-items:center}.ui-special-item[data-v-01ce6c33]{flex-grow:1}.ui-special-item-delete[data-v-01ce6c33]{flex-grow:0;margin-left:10px}.ui-design-layout .draggable-menu-item{border:3px dashed #ccc;background-color:#b9f3ff3c}.ui-design-layout .ant-menu-item-active.draggable-menu-item:hover{background-color:#8ae7faa5!important}.settings-button[data-v-33ef65ae]{position:absolute;top:5px;right:5px;z-index:10}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__pane.selection{cursor:pointer}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.vue-flow__node.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.vue-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.vue-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.vue-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}:root{--vf-node-bg: #fff;--vf-node-text: #222;--vf-connection-path: #b1b1b7;--vf-handle: #555}.vue-flow__edge.updating .vue-flow__edge-path{stroke:#777}.vue-flow__edge-text{font-size:10px}.vue-flow__edge-textbg{fill:#fff}.vue-flow__connection-path{stroke:var(--vf-connection-path)}.vue-flow__node{cursor:grab}.vue-flow__node.selectable:focus,.vue-flow__node.selectable:focus-visible{outline:none}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{padding:10px;border-radius:3px;width:150px;font-size:12px;text-align:center;border-width:1px;border-style:solid;color:var(--vf-node-text);background-color:var(--vf-node-bg);border-color:var(--vf-node-color)}.vue-flow__node-default.selected,.vue-flow__node-default.selected:hover,.vue-flow__node-input.selected,.vue-flow__node-input.selected:hover,.vue-flow__node-output.selected,.vue-flow__node-output.selected:hover{box-shadow:0 0 0 .5px var(--vf-box-shadow)}.vue-flow__node-default .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.vue-flow__minimap{background-color:#fff}.vue-flow__minimap.pannable{cursor:grab}.vue-flow__minimap.dragging{cursor:grabbing}.vue-flow__minimap-mask.pannable{cursor:grab}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{max-width:12px;max-height:12px;overflow:visible}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}.loading-container[data-v-80e20e23]{display:flex;justify-content:center;align-items:center;height:100vh}.editor-container[data-v-80e20e23]{padding:20px 20px 0}.editor-container .title-container[data-v-80e20e23]{display:flex;align-items:center;height:40px;margin-bottom:20px}.editor-container .title-container .title[data-v-80e20e23]{white-space:nowrap;font-size:18px;margin-bottom:0;min-width:200px}.editor-container .ant-layout-sider[data-v-80e20e23]{height:calc(100vh - 80px)} +.comment-node[data-v-05111a7d]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:10px;width:100%;height:100%}.comment-node .title-container[data-v-05111a7d]{color:#fff;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:20px 10px 10px;border-top-left-radius:10px;border-top-right-radius:10px}.comment-node .title-container .comment-text[data-v-05111a7d]{color:#545454;width:100%}.comment-node .title-container .hint-popover[data-v-05111a7d]{font-size:14px;color:#a0a0a0}.comment-node .description-container[data-v-05111a7d]{padding:10px;color:#b8b8b8}.comment-node .main-container[data-v-05111a7d]{margin-bottom:10px}.comment-node .output-container[data-v-05111a7d]{padding:10px 0;display:flex}.comment-node .output-container[data-v-05111a7d]:empty{padding:0}.comment-node .output-container span[data-v-05111a7d]{float:right;margin-right:10px;color:#fff;font-size:18px}.comment-node .delete-button[data-v-05111a7d]{opacity:0}.comment-node:hover .delete-button[data-v-05111a7d]{opacity:1}.comment-node .vue-flow__resize-control{opacity:0}.comment-node:hover .vue-flow__resize-control{opacity:1}.vue-flow__resize-control{position:absolute}.vue-flow__resize-control.left,.vue-flow__resize-control.right{cursor:ew-resize}.vue-flow__resize-control.top,.vue-flow__resize-control.bottom{cursor:ns-resize}.vue-flow__resize-control.top.left,.vue-flow__resize-control.bottom.right{cursor:nwse-resize}.vue-flow__resize-control.bottom.left,.vue-flow__resize-control.top.right{cursor:nesw-resize}.vue-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.vue-flow__resize-control.handle.left{left:0;top:50%}.vue-flow__resize-control.handle.right{left:100%;top:50%}.vue-flow__resize-control.handle.top{left:50%;top:0}.vue-flow__resize-control.handle.bottom{left:50%;top:100%}.vue-flow__resize-control.handle.top.left,.vue-flow__resize-control.handle.bottom.left{left:0}.vue-flow__resize-control.handle.top.right,.vue-flow__resize-control.handle.bottom.right{left:100%}.vue-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.vue-flow__resize-control.line.left,.vue-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.vue-flow__resize-control.line.left{left:0;border-left-width:5px}.vue-flow__resize-control.line.right{left:100%;border-right-width:5px}.vue-flow__resize-control.line.top,.vue-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.vue-flow__resize-control.line.top{top:0;border-top-width:5px}.vue-flow__resize-control.line.bottom{border-bottom-width:5px;top:100%}.node{border:1px solid #777;border-radius:10px;background:white;display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:10px;min-width:150px;max-width:400px}.node .title-container{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:20px 10px 10px;border-top-left-radius:10px;border-top-right-radius:10px;border-bottom:1px solid #e2e2e2;background:#f8f8f8}.node .title-container .hint-popover{font-size:14px;color:#a0a0a0}.node .description-container{padding:10px;color:#b8b8b8}.node .main-container{margin-bottom:10px}.node .output-container{padding:10px 0;display:flex}.node .output-container:empty{padding:0}.node .output-container span{float:right;margin-right:10px;color:#fff;font-size:18px}.template-item-field[data-v-28cde401]{background:#f8f8f8;padding:10px 0;width:100%;height:100%;position:relative}.template-item-output-field[data-v-28cde401]{background-color:#28c5e5!important}.template-item-field-text[data-v-28cde401]{position:relative;padding:0 10px;display:flex;justify-content:flex-end;gap:5px}.template-item-field-text .show-in-use-interface-checkbox[data-v-28cde401]{flex-grow:1;display:flex;justify-content:flex-end}.template-item-field-content[data-v-28cde401]{position:relative;padding:0 10px}.template-item-field .delete-field-button[data-v-28cde401]{opacity:0;transition:opacity .2s ease-in-out}.template-item-field:hover .delete-field-button[data-v-28cde401]{opacity:1}.code-editor .cm-scroller::-webkit-scrollbar{width:6px;height:6px}.code-editor .cm-scroller::-webkit-scrollbar-thumb{background:#CCCCCC;border-radius:6px}.code-editor .cm-scroller::-webkit-scrollbar-track{background:transparent}.search-input[data-v-169c3c13]{min-width:300px;max-width:500px}.ghost[data-v-b6aba49e]{opacity:.5;background:#c8ebfb}.draggable-item[data-v-b6aba49e]{padding:10px;display:flex}.handle[data-v-b6aba49e]{cursor:move;margin-right:10px}.draggable-item-content[data-v-b6aba49e]{flex-grow:1}.ui-special-item-container[data-v-b6aba49e]{display:flex;align-items:center}.ui-special-item[data-v-b6aba49e]{flex-grow:1}.ui-special-item-delete[data-v-b6aba49e]{flex-grow:0;margin-left:10px}.ui-design-layout .draggable-menu-item{border:3px dashed #ccc;background-color:#b9f3ff3c}.ui-design-layout .ant-menu-item-active.draggable-menu-item:hover{background-color:#8ae7faa5!important}.settings-button[data-v-33ef65ae]{position:absolute;top:5px;right:5px;z-index:10}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__pane.selection{cursor:pointer}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.vue-flow__node.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.vue-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.vue-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.vue-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}:root{--vf-node-bg: #fff;--vf-node-text: #222;--vf-connection-path: #b1b1b7;--vf-handle: #555}.vue-flow__edge.updating .vue-flow__edge-path{stroke:#777}.vue-flow__edge-text{font-size:10px}.vue-flow__edge-textbg{fill:#fff}.vue-flow__connection-path{stroke:var(--vf-connection-path)}.vue-flow__node{cursor:grab}.vue-flow__node.selectable:focus,.vue-flow__node.selectable:focus-visible{outline:none}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{padding:10px;border-radius:3px;width:150px;font-size:12px;text-align:center;border-width:1px;border-style:solid;color:var(--vf-node-text);background-color:var(--vf-node-bg);border-color:var(--vf-node-color)}.vue-flow__node-default.selected,.vue-flow__node-default.selected:hover,.vue-flow__node-input.selected,.vue-flow__node-input.selected:hover,.vue-flow__node-output.selected,.vue-flow__node-output.selected:hover{box-shadow:0 0 0 .5px var(--vf-box-shadow)}.vue-flow__node-default .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.vue-flow__minimap{background-color:#fff}.vue-flow__minimap.pannable{cursor:grab}.vue-flow__minimap.dragging{cursor:grabbing}.vue-flow__minimap-mask.pannable{cursor:grab}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{max-width:12px;max-height:12px;overflow:visible}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}.loading-container[data-v-80e20e23]{display:flex;justify-content:center;align-items:center;height:100vh}.editor-container[data-v-80e20e23]{padding:20px 20px 0}.editor-container .title-container[data-v-80e20e23]{display:flex;align-items:center;height:40px;margin-bottom:20px}.editor-container .title-container .title[data-v-80e20e23]{white-space:nowrap;font-size:18px;margin-bottom:0;min-width:200px}.editor-container .ant-layout-sider[data-v-80e20e23]{height:calc(100vh - 80px)} diff --git a/backend/web/assets/WorkflowEditor-c7747b26.js b/backend/web/assets/WorkflowEditor-c7747b26.js new file mode 100644 index 00000000..e284b64c --- /dev/null +++ b/backend/web/assets/WorkflowEditor-c7747b26.js @@ -0,0 +1,51 @@ +import{c as p,A as au,d as i_,a as Le,r as oe,b as ve,o as E,e as le,f as Ve,u as O,n as en,g as yv,i as oi,h as Ov,w as Me,p as ro,j as Dl,t as st,k as wv,l as _v,m as Mt,q as bv,s as xv,v as Vn,x as g,F as Te,y as Je,z as xs,B as Sv,C as fo,D as uu,E as sa,G as Re,H as de,I as ye,J as mt,K,L as Ie,M as Ci,N as fh,O as Ki,P as C,Q as ph,R as pe,S as _o,T as o_,U as Ee,V as la,W as aa,X as r_,Y as Rf,Z as ql,_ as s_,$ as kv,a0 as cu,a1 as Ji,a2 as Tv,a3 as ua,a4 as To,a5 as mh,a6 as gh,a7 as Qf,a8 as l_,a9 as a_,aa as u_,ab as c_,ac as zs,ad as d_,ae as h_,af as f_}from"./index-ef7aa48c.js";import{_ as lr}from"./_plugin-vue_export-helper-c27b6911.js";import{I as po}from"./index-ace83a9e.js";import{_ as p_}from"./QuestionPopover-3baee3b6.js";import{_ as vh,M as m_,a as g_,b as v_,c as y_,d as O_,e as w_,f as __}from"./TextOutput-39ff842e.js";import{A as ca,_ as b_}from"./MarkdownEditor-de9455d7.js";import{u as Ss}from"./userDatabase-3faee336.js";import{_ as Pv}from"./UploaderFieldUse-7351b05e.js";import{d as x_}from"./database-2818470e.js";import{u as S_}from"./stringify-ec884b6d.js";var k_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"};const T_=k_;function Nf(t){for(var e=1;e({nodeMessages:[],nodeMessagesCount:0}),actions:{push(t){this.nodeMessages.push(t),this.nodeMessagesCount=this.nodeMessages.length},pop(){const t=this.nodeMessages.pop();return this.nodeMessagesCount=this.nodeMessages.length,t}}});function ks(t){return yv()?(Dl(t),!0):!1}function De(t){return typeof t=="function"?t():O(t)}const $v=typeof window<"u",U_=t=>typeof t<"u",Ev=()=>{};function Y_(t,e){function n(...i){return new Promise((o,r)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(o).catch(r)})}return n}const Mv=t=>t();function j_(t=Mv){const e=oe(!0);function n(){e.value=!1}function i(){e.value=!0}const o=(...r)=>{e.value&&t(...r)};return{isActive:wv(e),pause:n,resume:i,eventFilter:o}}function Wf(t,e=!1,n="Timeout"){return new Promise((i,o)=>{setTimeout(e?()=>o(n):i,t)})}function Lc(...t){if(t.length!==1)return st(...t);const e=t[0];return typeof e=="function"?wv(_v(()=>({get:e,set:Ev}))):oe(e)}var F_=Object.defineProperty,H_=Object.defineProperties,G_=Object.getOwnPropertyDescriptors,Lf=Object.getOwnPropertySymbols,Z_=Object.prototype.hasOwnProperty,K_=Object.prototype.propertyIsEnumerable,zf=(t,e,n)=>e in t?F_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J_=(t,e)=>{for(var n in e||(e={}))Z_.call(e,n)&&zf(t,n,e[n]);if(Lf)for(var n of Lf(e))K_.call(e,n)&&zf(t,n,e[n]);return t},eb=(t,e)=>H_(t,G_(e));function tb(t){if(!xs(t))return Sv(t);const e=Array.isArray(t.value)?new Array(t.value.length):{};for(const n in t.value)e[n]=_v(()=>({get(){return t.value[n]},set(i){if(Array.isArray(t.value)){const o=[...t.value];o[n]=i,t.value=o}else{const o=eb(J_({},t.value),{[n]:i});Object.setPrototypeOf(o,t.value),t.value=o}}}));return e}function zc(t,e=!1){function n(d,{flush:h="sync",deep:f=!1,timeout:m,throwOnTimeout:v}={}){let w=null;const y=[new Promise(_=>{w=Me(t,T=>{d(T)!==e&&(w==null||w(),_(T))},{flush:h,deep:f,immediate:!0})})];return m!=null&&y.push(Wf(m,v).then(()=>De(t)).finally(()=>w==null?void 0:w())),Promise.race(y)}function i(d,h){if(!xs(d))return n(T=>T===d,h);const{flush:f="sync",deep:m=!1,timeout:v,throwOnTimeout:w}=h??{};let y=null;const _=[new Promise(T=>{y=Me([t,d],([b,k])=>{e!==(b===k)&&(y==null||y(),T(b))},{flush:f,deep:m,immediate:!0})})];return v!=null&&_.push(Wf(v,w).then(()=>De(t)).finally(()=>(y==null||y(),De(t)))),Promise.race(_)}function o(d){return n(h=>!!h,d)}function r(d){return i(null,d)}function s(d){return i(void 0,d)}function l(d){return n(Number.isNaN,d)}function a(d,h){return n(f=>{const m=Array.from(f);return m.includes(d)||m.includes(De(d))},h)}function u(d){return c(1,d)}function c(d=1,h){let f=-1;return n(()=>(f+=1,f>=d),h)}return Array.isArray(De(t))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return zc(t,!e)}}:{toMatch:n,toBe:i,toBeTruthy:o,toBeNull:r,toBeNaN:l,toBeUndefined:s,changed:u,changedTimes:c,get not(){return zc(t,!e)}}}function $i(t){return zc(t)}var Xf=Object.getOwnPropertySymbols,nb=Object.prototype.hasOwnProperty,ib=Object.prototype.propertyIsEnumerable,ob=(t,e)=>{var n={};for(var i in t)nb.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Xf)for(var i of Xf(t))e.indexOf(i)<0&&ib.call(t,i)&&(n[i]=t[i]);return n};function rb(t,e,n={}){const i=n,{eventFilter:o=Mv}=i,r=ob(i,["eventFilter"]);return Me(t,Y_(o,e),r)}var sb=Object.defineProperty,lb=Object.defineProperties,ab=Object.getOwnPropertyDescriptors,da=Object.getOwnPropertySymbols,Av=Object.prototype.hasOwnProperty,Dv=Object.prototype.propertyIsEnumerable,Uf=(t,e,n)=>e in t?sb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ub=(t,e)=>{for(var n in e||(e={}))Av.call(e,n)&&Uf(t,n,e[n]);if(da)for(var n of da(e))Dv.call(e,n)&&Uf(t,n,e[n]);return t},cb=(t,e)=>lb(t,ab(e)),db=(t,e)=>{var n={};for(var i in t)Av.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&da)for(var i of da(t))e.indexOf(i)<0&&Dv.call(t,i)&&(n[i]=t[i]);return n};function vo(t,e,n={}){const i=n,{eventFilter:o}=i,r=db(i,["eventFilter"]),{eventFilter:s,pause:l,resume:a,isActive:u}=j_(o);return{stop:rb(t,e,cb(ub({},r),{eventFilter:s})),pause:l,resume:a,isActive:u}}function Xc(t){var e;const n=De(t);return(e=n==null?void 0:n.$el)!=null?e:n}const xh=$v?window:void 0;function Sh(...t){let e,n,i,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,o]=t,e=xh):[e,n,i,o]=t,!e)return Ev;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],s=()=>{r.forEach(c=>c()),r.length=0},l=(c,d,h,f)=>(c.addEventListener(d,h,f),()=>c.removeEventListener(d,h,f)),a=Me(()=>[Xc(e),De(o)],([c,d])=>{s(),c&&r.push(...n.flatMap(h=>i.map(f=>l(c,h,f,d))))},{immediate:!0,flush:"post"}),u=()=>{a(),s()};return ks(u),u}function hb(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function Yf(...t){let e,n,i={};t.length===3?(e=t[0],n=t[1],i=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],i=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:o=xh,eventName:r="keydown",passive:s=!1,dedupe:l=!1}=i,a=hb(e);return Sh(o,r,u=>{u.repeat&&De(l)||a(u)&&n(u)},s)}function fb(){const t=oe(!1);return fo()&&Vn(()=>{t.value=!0}),t}function pb(t){const e=fb();return ve(()=>(e.value,!!t()))}function mb(t){return JSON.parse(JSON.stringify(t))}var jf=Object.getOwnPropertySymbols,gb=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable,yb=(t,e)=>{var n={};for(var i in t)gb.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&jf)for(var i of jf(t))e.indexOf(i)<0&&vb.call(t,i)&&(n[i]=t[i]);return n};function Ob(t,e,n={}){const i=n,{window:o=xh}=i,r=yb(i,["window"]);let s;const l=pb(()=>o&&"ResizeObserver"in o),a=()=>{s&&(s.disconnect(),s=void 0)},u=ve(()=>Array.isArray(t)?t.map(h=>Xc(h)):[Xc(t)]),c=Me(u,h=>{if(a(),l.value&&o){s=new ResizeObserver(e);for(const f of h)f&&s.observe(f,r)}},{immediate:!0,flush:"post",deep:!0}),d=()=>{a(),c()};return ks(d),{isSupported:l,stop:d}}function Rr(t,e,n,i={}){var o,r,s;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:h}=i,f=fo(),m=n||(f==null?void 0:f.emit)||((o=f==null?void 0:f.$emit)==null?void 0:o.bind(f))||((s=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(f==null?void 0:f.proxy));let v=u;e||(e="modelValue"),v=u||v||`update:${e.toString()}`;const w=T=>l?typeof l=="function"?l(T):mb(T):T,y=()=>U_(t[e])?w(t[e]):d,_=T=>{h?h(T)&&m(v,T):m(v,T)};if(a){const T=y(),b=oe(T);return Me(()=>t[e],k=>b.value=w(k)),Me(b,k=>{(k!==t[e]||c)&&_(k)},{deep:c}),b}else return ve({get(){return y()},set(T){_(T)}})}var wb={value:()=>{}};function du(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Rl.prototype=du.prototype={constructor:Rl,on:function(t,e){var n=this._,i=_b(t+"",n),o,r=-1,s=i.length;if(arguments.length<2){for(;++r0)for(var n=new Array(o),i=0,o,r;i=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Hf.hasOwnProperty(e)?{space:Hf[e],local:t}:t}function xb(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Uc&&e.documentElement.namespaceURI===Uc?e.createElement(t):e.createElementNS(n,t)}}function Sb(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function qv(t){var e=hu(t);return(e.local?Sb:xb)(e)}function kb(){}function kh(t){return t==null?kb:function(){return this.querySelector(t)}}function Tb(t){typeof t!="function"&&(t=kh(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=T&&(T=_+1);!(k=w[T])&&++T=0;)(s=i[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function Zb(t){t||(t=Kb);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,i=n.length,o=new Array(i),r=0;re?1:t>=e?0:NaN}function Jb(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ex(){return Array.from(this)}function tx(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?hx:typeof e=="function"?px:fx)(t,e,n??"")):jo(this.node(),t)}function jo(t,e){return t.style.getPropertyValue(e)||Vv(t).getComputedStyle(t,null).getPropertyValue(e)}function gx(t){return function(){delete this[t]}}function vx(t,e){return function(){this[t]=e}}function yx(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Ox(t,e){return arguments.length>1?this.each((e==null?gx:typeof e=="function"?yx:vx)(t,e)):this.node()[t]}function Bv(t){return t.trim().split(/^|\s+/)}function Th(t){return t.classList||new Wv(t)}function Wv(t){this._node=t,this._names=Bv(t.getAttribute("class")||"")}Wv.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function Lv(t,e){for(var n=Th(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function jx(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,r;n()=>t;function Yc(t,{sourceEvent:e,subject:n,target:i,identifier:o,active:r,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Yc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function iS(t){return!t.ctrlKey&&!t.button}function oS(){return this.parentNode}function rS(t,e){return e??{x:t.x,y:t.y}}function sS(){return navigator.maxTouchPoints||"ontouchstart"in this}function lS(){var t=iS,e=oS,n=rS,i=sS,o={},r=du("start","drag","end"),s=0,l,a,u,c,d=0;function h(b){b.on("mousedown.drag",f).filter(i).on("touchstart.drag",w).on("touchmove.drag",y,nS).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(b,k){if(!(c||!t.call(this,b,k))){var x=T(this,e.call(this,b,k),b,k,"mouse");x&&(pn(b.view).on("mousemove.drag",m,Fr).on("mouseup.drag",v,Fr),Yv(b.view),Wu(b),u=!1,l=b.clientX,a=b.clientY,x("start",b))}}function m(b){if(Ro(b),!u){var k=b.clientX-l,x=b.clientY-a;u=k*k+x*x>d}o.mouse("drag",b)}function v(b){pn(b.view).on("mousemove.drag mouseup.drag",null),jv(b.view,u),Ro(b),o.mouse("end",b)}function w(b,k){if(t.call(this,b,k)){var x=b.changedTouches,$=e.call(this,b,k),W=x.length,Q,D;for(Q=0;Q>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Us(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Us(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=uS.exec(t))?new Bt(e[1],e[2],e[3],1):(e=cS.exec(t))?new Bt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=dS.exec(t))?Us(e[1],e[2],e[3],e[4]):(e=hS.exec(t))?Us(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=fS.exec(t))?np(e[1],e[2]/100,e[3]/100,1):(e=pS.exec(t))?np(e[1],e[2]/100,e[3]/100,e[4]):Gf.hasOwnProperty(t)?Jf(Gf[t]):t==="transparent"?new Bt(NaN,NaN,NaN,0):null}function Jf(t){return new Bt(t>>16&255,t>>8&255,t&255,1)}function Us(t,e,n,i){return i<=0&&(t=e=n=NaN),new Bt(t,e,n,i)}function vS(t){return t instanceof Ps||(t=Zr(t)),t?(t=t.rgb(),new Bt(t.r,t.g,t.b,t.opacity)):new Bt}function jc(t,e,n,i){return arguments.length===1?vS(t):new Bt(t,e,n,i??1)}function Bt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Ph(Bt,jc,Fv(Ps,{brighter(t){return t=t==null?fa:Math.pow(fa,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Hr:Math.pow(Hr,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Bt(eo(this.r),eo(this.g),eo(this.b),pa(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:ep,formatHex:ep,formatHex8:yS,formatRgb:tp,toString:tp}));function ep(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}`}function yS(){return`#${ji(this.r)}${ji(this.g)}${ji(this.b)}${ji((isNaN(this.opacity)?1:this.opacity)*255)}`}function tp(){const t=pa(this.opacity);return`${t===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${t===1?")":`, ${t})`}`}function pa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function eo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ji(t){return t=eo(t),(t<16?"0":"")+t.toString(16)}function np(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mn(t,e,n,i)}function Hv(t){if(t instanceof mn)return new mn(t.h,t.s,t.l,t.opacity);if(t instanceof Ps||(t=Zr(t)),!t)return new mn;if(t instanceof mn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),r=Math.max(e,n,i),s=NaN,l=r-o,a=(r+o)/2;return l?(e===r?s=(n-i)/l+(n0&&a<1?0:s,new mn(s,l,a,t.opacity)}function OS(t,e,n,i){return arguments.length===1?Hv(t):new mn(t,e,n,i??1)}function mn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Ph(mn,OS,Fv(Ps,{brighter(t){return t=t==null?fa:Math.pow(fa,t),new mn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Hr:Math.pow(Hr,t),new mn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new Bt(Lu(t>=240?t-240:t+120,o,i),Lu(t,o,i),Lu(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new mn(ip(this.h),Ys(this.s),Ys(this.l),pa(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=pa(this.opacity);return`${t===1?"hsl(":"hsla("}${ip(this.h)}, ${Ys(this.s)*100}%, ${Ys(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ip(t){return t=(t||0)%360,t<0?t+360:t}function Ys(t){return Math.max(0,Math.min(1,t||0))}function Lu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Gv=t=>()=>t;function wS(t,e){return function(n){return t+n*e}}function _S(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function bS(t){return(t=+t)==1?Zv:function(e,n){return n-e?_S(e,n,t):Gv(isNaN(e)?n:e)}}function Zv(t,e){var n=e-t;return n?wS(t,n):Gv(isNaN(t)?e:t)}const op=function t(e){var n=bS(e);function i(o,r){var s=n((o=jc(o)).r,(r=jc(r)).r),l=n(o.g,r.g),a=n(o.b,r.b),u=Zv(o.opacity,r.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return i.gamma=t,i}(1);function mi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Fc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zu=new RegExp(Fc.source,"g");function xS(t){return function(){return t}}function SS(t){return function(e){return t(e)+""}}function kS(t,e){var n=Fc.lastIndex=zu.lastIndex=0,i,o,r,s=-1,l=[],a=[];for(t=t+"",e=e+"";(i=Fc.exec(t))&&(o=zu.exec(e));)(r=o.index)>n&&(r=e.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(i=i[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:mi(i,o)})),n=zu.lastIndex;return n180?c+=360:c-u>180&&(u+=360),h.push({i:d.push(o(d)+"rotate(",null,i)-2,x:mi(u,c)})):c&&d.push(o(d)+"rotate("+c+i)}function l(u,c,d,h){u!==c?h.push({i:d.push(o(d)+"skewX(",null,i)-2,x:mi(u,c)}):c&&d.push(o(d)+"skewX("+c+i)}function a(u,c,d,h,f,m){if(u!==d||c!==h){var v=f.push(o(f)+"scale(",null,",",null,")");m.push({i:v-4,x:mi(u,d)},{i:v-2,x:mi(c,h)})}else(d!==1||h!==1)&&f.push(o(f)+"scale("+d+","+h+")")}return function(u,c){var d=[],h=[];return u=t(u),c=t(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,h),s(u.rotate,c.rotate,d,h),l(u.skewX,c.skewX,d,h),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,h),u=c=null,function(f){for(var m=-1,v=h.length,w;++m=0&&t._call.call(void 0,e),t=t._next;--Fo}function lp(){so=(ga=Kr.now())+fu,Fo=xr=0;try{RS()}finally{Fo=0,NS(),so=0}}function QS(){var t=Kr.now(),e=t-ga;e>t0&&(fu-=e,ga=t)}function NS(){for(var t,e=ma,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ma=n);Sr=t,Hc(i)}function Hc(t){if(!Fo){xr&&(xr=clearTimeout(xr));var e=t-so;e>24?(t<1/0&&(xr=setTimeout(lp,t-Kr.now()-fu)),pr&&(pr=clearInterval(pr))):(pr||(ga=Kr.now(),pr=setInterval(QS,t0)),Fo=1,n0(lp))}}function ap(t,e,n){var i=new va;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,n),i}var IS=du("start","end","cancel","interrupt"),VS=[],o0=0,up=1,Gc=2,Ql=3,cp=4,Zc=5,Nl=6;function pu(t,e,n,i,o,r){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;BS(t,n,{name:e,index:i,group:o,on:IS,tween:VS,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:o0})}function $h(t,e){var n=On(t,e);if(n.state>o0)throw new Error("too late; already scheduled");return n}function Ln(t,e){var n=On(t,e);if(n.state>Ql)throw new Error("too late; already running");return n}function On(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function BS(t,e,n){var i=t.__transition,o;i[e]=n,n.timer=i0(r,0,n.time);function r(u){n.state=up,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,h,f;if(n.state!==up)return a();for(c in i)if(f=i[c],f.name===n.name){if(f.state===Ql)return ap(s);f.state===cp?(f.state=Nl,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+cGc&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function gk(t,e,n){var i,o,r=mk(e)?$h:Ln;return function(){var s=r(this,t),l=s.on;l!==i&&(o=(i=l).copy()).on(e,n),s.on=o}}function vk(t,e){var n=this._id;return arguments.length<2?On(this.node(),n).on.on(t):this.each(gk(n,t,e))}function yk(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ok(){return this.on("end.remove",yk(this._id))}function wk(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kh(t));for(var i=this._groups,o=i.length,r=new Array(o),s=0;s()=>t;function Uk(t,{sourceEvent:e,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Jn(t,e,n){this.k=t,this.x=e,this.y=n}Jn.prototype={constructor:Jn,scale:function(t){return t===1?this:new Jn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Jn(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+")"}};var Ho=new Jn(1,0,0);Jn.prototype;function Xu(t){t.stopImmediatePropagation()}function mr(t){t.preventDefault(),t.stopImmediatePropagation()}function Yk(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function jk(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function dp(){return this.__zoom||Ho}function Fk(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Hk(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gk(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],r=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function Zk(){var t=Yk,e=jk,n=Gk,i=Fk,o=Hk,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=DS,u=du("start","zoom","end"),c,d,h,f=500,m=150,v=0,w=10;function y(S){S.property("__zoom",dp).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",Q).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(S,A,P,M){var V=S.selection?S.selection():S;V.property("__zoom",dp),S!==V?k(S,A,P,M):V.interrupt().each(function(){x(this,arguments).event(M).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},y.scaleBy=function(S,A,P,M){y.scaleTo(S,function(){var V=this.__zoom.k,R=typeof A=="function"?A.apply(this,arguments):A;return V*R},P,M)},y.scaleTo=function(S,A,P,M){y.transform(S,function(){var V=e.apply(this,arguments),R=this.__zoom,N=P==null?b(V):typeof P=="function"?P.apply(this,arguments):P,ne=R.invert(N),j=typeof A=="function"?A.apply(this,arguments):A;return n(T(_(R,j),N,ne),V,s)},P,M)},y.translateBy=function(S,A,P,M){y.transform(S,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),s)},null,M)},y.translateTo=function(S,A,P,M,V){y.transform(S,function(){var R=e.apply(this,arguments),N=this.__zoom,ne=M==null?b(R):typeof M=="function"?M.apply(this,arguments):M;return n(Ho.translate(ne[0],ne[1]).scale(N.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof P=="function"?-P.apply(this,arguments):-P),R,s)},M,V)};function _(S,A){return A=Math.max(r[0],Math.min(r[1],A)),A===S.k?S:new Jn(A,S.x,S.y)}function T(S,A,P){var M=A[0]-P[0]*S.k,V=A[1]-P[1]*S.k;return M===S.x&&V===S.y?S:new Jn(S.k,M,V)}function b(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function k(S,A,P,M){S.on("start.zoom",function(){x(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(M).end()}).tween("zoom",function(){var V=this,R=arguments,N=x(V,R).event(M),ne=e.apply(V,R),j=P==null?b(ne):typeof P=="function"?P.apply(V,R):P,ae=Math.max(ne[1][0]-ne[0][0],ne[1][1]-ne[0][1]),X=V.__zoom,G=typeof A=="function"?A.apply(V,R):A,F=a(X.invert(j).concat(ae/X.k),G.invert(j).concat(ae/G.k));return function(se){if(se===1)se=G;else{var _e=F(se),Qe=ae/_e[2];se=new Jn(Qe,j[0]-_e[0]*Qe,j[1]-_e[1]*Qe)}N.zoom(null,se)}})}function x(S,A,P){return!P&&S.__zooming||new $(S,A)}function $(S,A){this.that=S,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(S,A),this.taps=0}$.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,A){return this.mouse&&S!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var A=pn(this.that).datum();u.call(S,this.that,new Uk(S,{sourceEvent:this.sourceEvent,target:y,type:S,transform:this.that.__zoom,dispatch:u}),A)}};function W(S,...A){if(!t.apply(this,arguments))return;var P=x(this,A).event(S),M=this.__zoom,V=Math.max(r[0],Math.min(r[1],M.k*Math.pow(2,i.apply(this,arguments)))),R=Pn(S);if(P.wheel)(P.mouse[0][0]!==R[0]||P.mouse[0][1]!==R[1])&&(P.mouse[1]=M.invert(P.mouse[0]=R)),clearTimeout(P.wheel);else{if(M.k===V)return;P.mouse=[R,M.invert(R)],Il(this),P.start()}mr(S),P.wheel=setTimeout(N,m),P.zoom("mouse",n(T(_(M,V),P.mouse[0],P.mouse[1]),P.extent,s));function N(){P.wheel=null,P.end()}}function Q(S,...A){if(h||!t.apply(this,arguments))return;var P=S.currentTarget,M=x(this,A,!0).event(S),V=pn(S.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",ae,!0),R=Pn(S,P),N=S.clientX,ne=S.clientY;Yv(S.view),Xu(S),M.mouse=[R,this.__zoom.invert(R)],Il(this),M.start();function j(X){if(mr(X),!M.moved){var G=X.clientX-N,F=X.clientY-ne;M.moved=G*G+F*F>v}M.event(X).zoom("mouse",n(T(M.that.__zoom,M.mouse[0]=Pn(X,P),M.mouse[1]),M.extent,s))}function ae(X){V.on("mousemove.zoom mouseup.zoom",null),jv(X.view,M.moved),mr(X),M.event(X).end()}}function D(S,...A){if(t.apply(this,arguments)){var P=this.__zoom,M=Pn(S.changedTouches?S.changedTouches[0]:S,this),V=P.invert(M),R=P.k*(S.shiftKey?.5:2),N=n(T(_(P,R),M,V),e.apply(this,A),s);mr(S),l>0?pn(this).transition().duration(l).call(k,N,M,S):pn(this).call(y.transform,N,M,S)}}function z(S,...A){if(t.apply(this,arguments)){var P=S.touches,M=P.length,V=x(this,A,S.changedTouches.length===M).event(S),R,N,ne,j;for(Xu(S),N=0;N(t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom",t))(be||{}),Mh=(t=>(t.Partial="partial",t.Full="full",t))(Mh||{}),Po=(t=>(t.Bezier="default",t.SimpleBezier="simple-bezier",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t))(Po||{}),lo=(t=>(t.Strict="strict",t.Loose="loose",t))(lo||{}),Kc=(t=>(t.Arrow="arrow",t.ArrowClosed="arrowclosed",t))(Kc||{}),Qr=(t=>(t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal",t))(Qr||{}),a0=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(a0||{});const u0="vue-flow__node-desc",c0="vue-flow__edge-desc",Kk="vue-flow__aria-live",d0=["Enter"," ","Escape"],No={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function hp(t){return{...t.computedPosition||{x:0,y:0},width:t.dimensions.width||0,height:t.dimensions.height||0}}function Jc(t,e){const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),i=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*i)}function mu(t){return{width:t.offsetWidth,height:t.offsetHeight}}function si(t,e=0,n=1){return Math.min(Math.max(t,e),n)}function h0(t,e){return{x:si(t.x,e[0][0],e[1][0]),y:si(t.y,e[0][1],e[1][1])}}function fp(t){const e=t.getRootNode(),n=Ih();return"elementFromPoint"in e?e:n.document}function Go(t){return t&&typeof t=="object"&&"id"in t&&"source"in t&&"target"in t}function Jk(t){return Go(t)&&"sourceNode"in t&&"targetNode"in t}function Nr(t){return t&&typeof t=="object"&&"id"in t&&"position"in t&&!Go(t)}function Co(t){return Nr(t)&&"computedPosition"in t}function e2(t){return!!t.width&&!!t.height&&!!t.x&&!!t.y}function t2(t,e={}){let n=e;return Co(t)||(n={type:t.type??e.type??"default",dimensions:Ki({width:0,height:0}),handleBounds:{source:[],target:[]},computedPosition:Ki({z:0,...t.position}),draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,...e,data:Ge(t.data)?t.data:{},events:Ki(Ge(t.events)?t.events:{})}),Object.assign({},n,t,{id:t.id.toString()})}function f0(t,e={}){const n=Ge(t.events)?t.events:e.events&&Ge(e.events)?e.events:{},i=Ge(t.data)?t.data:e.data&&Ge(e.data)?e.data:{};return e=Jk(t)?e:{...e,sourceHandle:(t.sourceHandle?t.sourceHandle.toString():void 0)||e.sourceHandle,targetHandle:(t.targetHandle?t.targetHandle.toString():void 0)||e.targetHandle,type:t.type??e.type??"default",source:t.source.toString()||e.source,target:t.target.toString()||e.target,updatable:t.updatable??e.updatable,selectable:t.selectable??e.selectable,focusable:t.focusable??e.focusable,data:i,events:Ki(n),label:(t.label&&!ei(t.label)?Ki(t.label):t.label)||e.label,interactionWidth:t.interactionWidth||e.interactionWidth},Object.assign({},e,t,{id:t.id.toString()})}function p0({source:t,sourceHandle:e,target:n,targetHandle:i}){return`vueflow__edge-${t}${e??""}-${n}${i??""}`}function n2(t,e){return e.some(n=>Go(n)&&n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle))}function i2({x:t,y:e},{x:n,y:i,zoom:o}){return{x:t*o+n,y:e*o+i}}function m0({x:t,y:e},{x:n,y:i,zoom:o},r,[s,l]){const a={x:(t-n)/o,y:(e-i)/o};return r?{x:s*Math.round(a.x/s),y:l*Math.round(a.y/l)}:a}function g0(t,e){return{x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}}function ya({x:t,y:e,width:n,height:i}){return{x:t,y:e,x2:t+n,y2:e+i}}function v0({x:t,y:e,x2:n,y2:i}){return{x:t,y:e,width:n-t,height:i-e}}function o2(t,e){return v0(g0(ya(t),ya(e)))}function Ah(t){const e=t.reduce((n,{computedPosition:i={x:0,y:0},dimensions:o={width:0,height:0}}={})=>g0(n,ya({...i,...o})),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return v0(e)}function y0(t,e,{x:n,y:i,zoom:o}={x:0,y:0,zoom:1},r=!1,s=!1){const l={x:(e.x-n)/o,y:(e.y-i)/o,width:e.width/o,height:e.height/o};return t.filter(a=>{const{computedPosition:u={x:0,y:0},dimensions:c={width:0,height:0},selectable:d}=a;if(s&&!d)return!1;const h={...u,width:c.width||0,height:c.height||0},f=Jc(l,h),m=typeof c.width>"u"||typeof c.height>"u"||c.width===0||c.height===0,v=r&&f>0,w=c.width*c.height;return m||v||f>=w})}function Kn(t,e){const n=t.map(i=>ei(i)?i:i.id);return e.filter(i=>n.includes(i.source)||n.includes(i.target))}function pp(t,e,n,i,o,r=.1,s={x:0,y:0}){const l=e/(t.width*(1+r)),a=n/(t.height*(1+r)),u=Math.min(l,a),c=si(u,i,o),d=t.x+t.width/2,h=t.y+t.height/2,f=e/2-d*c+(s.x??0),m=n/2-h*c+(s.y??0);return{x:f,y:m,zoom:c}}function r2(t,e){return{x:e.x+t.x,y:e.y+t.y,z:(t.z>e.z?t.z:e.z)+1}}function O0(t,e){if(!t.parentNode)return!1;const n=e(t.parentNode);return n?n.selected?!0:O0(n,e):!1}function Fi(t,e){return typeof t>"u"?"":typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(n=>`${n}=${t[n]}`).join("&")}`}function mp(t,e,n){return tn?-si(Math.abs(t-n),1,50)/50:0}function w0(t,e){const n=mp(t.x,35,e.width-35)*20,i=mp(t.y,35,e.height-35)*20;return[n,i]}function Uu(t,e){if(e){const n=t.position.x+t.dimensions.width-e.dimensions.width,i=t.position.y+t.dimensions.height-e.dimensions.height;if(n>0||i>0||t.position.x<0||t.position.y<0){let o={};if(Zo(e.style)?o={...e.style(e)}:e.style&&(o={...e.style}),o.width=o.width??`${e.dimensions.width}px`,o.height=o.height??`${e.dimensions.height}px`,n>0)if(ei(o.width)){const r=Number(o.width.replace("px",""));o.width=`${r+n}px`}else o.width+=n;if(i>0)if(ei(o.height)){const r=Number(o.height.replace("px",""));o.height=`${r+i}px`}else o.height+=i;if(t.position.x<0){const r=Math.abs(t.position.x);if(e.position.x=e.position.x-r,ei(o.width)){const s=Number(o.width.replace("px",""));o.width=`${s+r}px`}else o.width+=r;t.position.x=0}if(t.position.y<0){const r=Math.abs(t.position.y);if(e.position.y=e.position.y-r,ei(o.height)){const s=Number(o.height.replace("px",""));o.height=`${s+r}px`}else o.height+=r;t.position.y=0}e.dimensions.width=Number(o.width.toString().replace("px","")),e.dimensions.height=Number(o.height.toString().replace("px","")),Zo(e.style)?e.style=r=>{const s=e.style;return{...s(r),...o}}:e.style={...e.style,...o}}}}function gp(t,e){t.filter(i=>i.type==="add"||i.type==="remove").forEach(i=>{if(i.type==="add")e.findIndex(o=>o.id===i.item.id)===-1&&e.push(i.item);else if(i.type==="remove"){const o=e.findIndex(r=>r.id===i.id);o!==-1&&e.splice(o,1)}});const n=e.map(i=>i.id);return e.forEach(i=>{var o,r;const s=t.filter(l=>l.id===i.id);for(const l of s)switch(l.type){case"select":i.selected=l.selected;break;case"position":if(Co(i)&&(typeof l.position<"u"&&(i.position=l.position),typeof l.dragging<"u"&&(i.dragging=l.dragging),i.expandParent&&i.parentNode)){const a=e[n.indexOf(i.parentNode)];a&&Co(a)&&Uu(i,a)}break;case"dimensions":if(Co(i)){if(typeof l.dimensions<"u"&&(i.dimensions=l.dimensions),typeof l.updateStyle<"u"&&(i.style={...i.style||{},width:`${(o=l.dimensions)==null?void 0:o.width}px`,height:`${(r=l.dimensions)==null?void 0:r.height}px`}),typeof l.resizing<"u"&&(i.resizing=l.resizing),i.expandParent&&i.parentNode){const a=e[n.indexOf(i.parentNode)];a&&Co(a)&&(a.initialized?Uu(i,a):Ci(()=>{Uu(i,a)}))}i.initialized||(i.initialized=!0)}break}}),e}function Gn(t,e){return{id:t,type:"select",selected:e}}function vp(t){return{item:t,type:"add"}}function Hs(t){return{id:t,type:"remove"}}function Yu(t,e){return t.reduce((n,i)=>{let o=e.includes(i.id);Ge(i.selectable)&&!i.selectable&&(o=!1);const r=Co(i)?"changedNodes":"changedEdges";return!i.selected&&o?n[r].push(Gn(i.id,!0)):i.selected&&!o&&n[r].push(Gn(i.id,!1)),n},{changedNodes:[],changedEdges:[]})}function me(t=()=>{}){const e=new Set,n=()=>e.size>0;t&&e.add(t);const i=o=>{e.delete(o)};return{on:o=>{e.has(t)&&e.delete(t),e.add(o);const r=()=>i(o);return ks(r),{off:r}},off:i,trigger:o=>Promise.all(Array.from(e).map(r=>r(o))),hasListeners:n}}function yp(t,e,n){let i=t;do{if(i&&i.matches(e))return!0;if(i===n)return!1;i=i.parentElement}while(i);return!1}function s2(t,e,n,i,o){return t.filter(r=>(r.selected||r.id===o)&&(!r.parentNode||!O0(r,i))&&(r.draggable||e&&typeof r.draggable>"u")).map(r=>{var s,l;return Ki({id:r.id,position:r.position||{x:0,y:0},distance:{x:n.x-((s=r.computedPosition)==null?void 0:s.x)||0,y:n.y-((l=r.computedPosition)==null?void 0:l.y)||0},from:r.computedPosition,extent:r.extent,parentNode:r.parentNode,dimensions:r.dimensions})})}function ju({id:t,dragItems:e,findNode:n}){const i=e.reduce((o,r)=>{const s=n(r.id);return s&&o.push(s),o},[]);return[t?i.find(o=>o.id===t):i[0],i]}function _0(t){if(Array.isArray(t))switch(t.length){case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];case 4:return t;default:return[0,0,0,0]}return[t,t,t,t]}function l2(t,e,n){const[i,o,r,s]=typeof t!="string"?_0(t.padding):[0,0,0,0];return n&&ti(n.computedPosition.x)&&ti(n.computedPosition.y)&&ti(n.dimensions.width)&&ti(n.dimensions.height)?[[n.computedPosition.x+s,n.computedPosition.y+i],[n.computedPosition.x+n.dimensions.width-o,n.computedPosition.y+n.dimensions.height-r]]:!1}function a2(t,e,n,i){let o=t.extent||n;if(o==="parent"||!Array.isArray(o)&&(o==null?void 0:o.range)==="parent")if(t.parentNode&&i&&t.dimensions.width&&t.dimensions.height){const r=l2(o,t,i);r&&(o=r)}else e(new xt(yt.NODE_EXTENT_INVALID,t.id)),o=n;else if(Array.isArray(o)){const r=(i==null?void 0:i.computedPosition.x)||0,s=(i==null?void 0:i.computedPosition.y)||0;o=[[o[0][0]+r,o[0][1]+s],[o[1][0]+r,o[1][1]+s]]}else if(o!=null&&o.range&&Array.isArray(o.range)){const[r,s,l,a]=_0(o.padding),u=(i==null?void 0:i.computedPosition.x)||0,c=(i==null?void 0:i.computedPosition.y)||0;o=[[o.range[0][0]+u+a,o.range[0][1]+c+r],[o.range[1][0]+u-s,o.range[1][1]+c-l]]}return o}function u2({width:t,height:e},n){return[n[0],[n[1][0]-(t||0),n[1][1]-(e||0)]]}function Dh(t,e,n,i,o){const r=u2(t.dimensions,a2(t,n,i,o)),s=h0(e,r);return{position:{x:s.x-((o==null?void 0:o.computedPosition.x)||0),y:s.y-((o==null?void 0:o.computedPosition.y)||0)},computedPosition:s}}function ed(t,e,n){const i=((n==null?void 0:n.x)??0)+e.x,o=((n==null?void 0:n.y)??0)+e.y,r=(n==null?void 0:n.width)??e.width,s=(n==null?void 0:n.height)??e.height;switch(t){case be.Top:return{x:i+r/2,y:o};case be.Right:return{x:i+r,y:o+s/2};case be.Bottom:return{x:i+r/2,y:o+s};case be.Left:return{x:i,y:o+s/2}}}function Op(t=[],e){return t.length?!e||t.length===1?t[0]:e&&t.find(n=>n.id===e)||null:null}function c2(t,e,n,i,o,r){const s=ed(n,{...t.dimensions,...t.computedPosition},e),l=ed(r,{...i.dimensions,...i.computedPosition},o);return{sourceX:s.x,sourceY:s.y,targetX:l.x,targetY:l.y}}function d2({sourcePos:t,targetPos:e,sourceWidth:n,sourceHeight:i,targetWidth:o,targetHeight:r,width:s,height:l,viewport:a}){const u={x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x+n,e.x+o),y2:Math.max(t.y+i,e.y+r)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=ya({x:(0-a.x)/a.zoom,y:(0-a.y)/a.zoom,width:s/a.zoom,height:l/a.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),h=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*h)>0}function h2(t,e,n=!1){const i=ti(t.zIndex);let o=i?t.zIndex:0;const r=e(t.source),s=e(t.target);return!r||!s?0:(n&&(o=i?t.zIndex:Math.max(r.computedPosition.z||0,s.computedPosition.z||0)),o)}var yt=(t=>(t.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",t.NODE_INVALID="NODE_INVALID",t.NODE_NOT_FOUND="NODE_NOT_FOUND",t.NODE_MISSING_PARENT="NODE_MISSING_PARENT",t.NODE_TYPE_MISSING="NODE_TYPE_MISSING",t.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",t.EDGE_INVALID="EDGE_INVALID",t.EDGE_NOT_FOUND="EDGE_NOT_FOUND",t.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",t.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",t.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",t.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",t.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",t.EDGE_ORPHANED="EDGE_ORPHANED",t))(yt||{});const wp={MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:t=>`Node is invalid +Node: ${t}`,NODE_NOT_FOUND:t=>`Node not found +Node: ${t}`,NODE_MISSING_PARENT:(t,e)=>`Node is missing a parent +Node: ${t} +Parent: ${e}`,NODE_TYPE_MISSING:t=>`Node type is missing +Type: ${t}`,NODE_EXTENT_INVALID:t=>`Only child nodes can use a parent extent +Node: ${t}`,EDGE_INVALID:t=>`An edge needs a source and a target +Edge: ${t}`,EDGE_SOURCE_MISSING:(t,e)=>`Edge source is missing +Edge: ${t} +Source: ${e}`,EDGE_TARGET_MISSING:(t,e)=>`Edge target is missing +Edge: ${t} +Target: ${e}`,EDGE_TYPE_MISSING:t=>`Edge type is missing +Type: ${t}`,EDGE_SOURCE_TARGET_SAME:(t,e,n)=>`Edge source and target are the same +Edge: ${t} +Source: ${e} +Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(t,e,n)=>`Edge source or target is missing +Edge: ${t} +Source: ${e} +Target: ${n}`,EDGE_ORPHANED:t=>`Edge was orphaned (suddenly missing source or target) and has been removed +Edge: ${t}`,EDGE_NOT_FOUND:t=>`Edge not found +Edge: ${t}`};let xt=class extends Error{constructor(e,...n){var i;super((i=wp[e])==null?void 0:i.call(wp,...n)),this.code=e}};function qh(t){return"clientX"in t}function to(t,e){var n,i;const o=qh(t),r=o?t.clientX:(n=t.touches)==null?void 0:n[0].clientX,s=o?t.clientY:(i=t.touches)==null?void 0:i[0].clientY;return{x:r-((e==null?void 0:e.left)??0),y:s-((e==null?void 0:e.top)??0)}}function ei(t){return typeof t=="string"}function Zo(t){return typeof t=="function"}function Fu(t){return typeof t=="boolean"}function ti(t){return typeof t=="number"}const Oa=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function b0(){return{handleDomNode:null,isValid:!1,connection:{source:"",target:"",sourceHandle:null,targetHandle:null},endHandle:null}}function Hu(t){t==null||t.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function _p(t,e,n,i){return(e[n]||[]).reduce((o,r)=>{var s,l;return`${t.id}-${r.id}-${n}`!==i&&o.push({id:r.id||null,type:n,nodeId:t.id,x:(((s=t.computedPosition)==null?void 0:s.x)??0)+r.x+r.width/2,y:(((l=t.computedPosition)==null?void 0:l.y)??0)+r.y+r.height/2,width:r.width,height:r.height}),o},[])}function f2(t,e,n,i,o,r){const{x:s,y:l}=to(t),a=e.elementsFromPoint(s,l).find(f=>f.classList.contains("vue-flow__handle"));if(a){const f=a.getAttribute("data-nodeid");if(f){const m=Rh(void 0,a),v=a.getAttribute("data-handleid"),w=r({nodeId:f,id:v,type:m});if(w)return{handle:{id:v,type:m,nodeId:f,x:n.x,y:n.y},validHandleResult:w}}}let u=[],c=1/0;if(o.forEach(f=>{const m=Math.sqrt((f.x-n.x)**2+(f.y-n.y)**2);if(m<=i){const v=r(f);m<=c&&(mf.isValid),h=u.some(({handle:f})=>f.type==="target");return u.find(({handle:f,validHandleResult:m})=>h?f.type==="target":d?m.isValid:!0)||u[0]}function bp(t,e,n,i,o,r,s,l,a,u){const c=r==="target",d=l.querySelector(`.vue-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),{x:h,y:f}=to(t),m=l.elementFromPoint(h,f),v=m!=null&&m.classList.contains("vue-flow__handle")?m:d,w=b0();if(v){w.handleDomNode=v;const y=Rh(void 0,v),_=v.getAttribute("data-nodeid"),T=v.getAttribute("data-handleid"),b=v.classList.contains("connectable"),k=v.classList.contains("connectableend"),x={source:c?_:i,sourceHandle:c?T:o,target:c?i:_,targetHandle:c?o:T};w.connection=x;const $=b&&k&&(n===lo.Strict?c&&y==="source"||!c&&y==="target":_!==i||T!==o);w.endHandle={nodeId:_,handleId:T,type:y},$&&(w.isValid=s(x,{edges:a,sourceNode:u(x.source),targetNode:u(x.target)}))}return w}function p2({nodes:t,nodeId:e,handleId:n,handleType:i}){return t.reduce((o,r)=>{const{handleBounds:s}=r;let l=[],a=[];return s&&(l=_p(r,s,"source",`${e}-${n}-${i}`),a=_p(r,s,"target",`${e}-${n}-${i}`)),o.push(...l,...a),o},[])}function Rh(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function m2(t,e){let n=null;return e?n="valid":t&&!e&&(n="invalid"),n}const g2=["production","prod"];function x0(t,...e){g2.includes("production")||console.warn(`[Vue Flow]: ${t}`,...e)}function xp(t,e,n){const i=e.querySelectorAll(`.vue-flow__handle${t}`);if(!i||!i.length)return;const o=Array.from(i),r=e.getBoundingClientRect();return o.map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(l.left-r.left)/n,y:(l.top-r.top)/n,...mu(s)}})}function td(t,e,n,i,o,r=!1,s){o.value=!1,t.selected?(r||t.selected&&e)&&(i([t]),Ci(()=>{s.blur()})):n([t])}function Ge(t){return typeof O(t)<"u"}function v2(t,e,n){if(!t.source||!t.target)return n(new xt(yt.EDGE_INVALID,t.id)),!1;let i;return Go(t)?i=t:i={...t,id:p0(t)},i=f0(i),n2(i,e)?!1:i}function y2(t,e,n,i,o,r){if(!e.source||!e.target)return r(new xt(yt.EDGE_INVALID,t.id)),!1;const s=i(t.id);if(!s)return r(new xt(yt.EDGE_NOT_FOUND,t.id)),!1;const{id:l,...a}=t,u={...a,id:o?p0(e):l,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle};return n.splice(n.indexOf(s),1,u),u}function Sp(t,e,n,i){const o={},r=t.reduce((l,a)=>{if(!Nr(a))return i(new xt(yt.NODE_INVALID)),l;const u=t2(a,{...n(a.id),parentNode:a.parentNode});return a.parentNode&&(o[a.parentNode]=!0),l.concat(u)},[]),s=[...r,...e];for(const l of r){const a=s.find(u=>u.id===l.parentNode);l.parentNode&&!a&&i(new xt(yt.NODE_MISSING_PARENT,l.id,l.parentNode)),(l.parentNode||o[l.id])&&(o[l.id]&&(l.isParent=!0),a&&(a.isParent=!0))}return r}function S0(t){const{vueFlowRef:e,snapToGrid:n,snapGrid:i,noDragClassName:o,nodes:r,nodeExtent:s,viewport:l,autoPanOnNodeDrag:a,nodesDraggable:u,panBy:c,findNode:d,multiSelectionActive:h,nodesSelectionActive:f,selectNodesOnDrag:m,removeSelectedElements:v,addSelectedNodes:w,updateNodePositions:y,emits:_}=Ze(),{onStart:T,onDrag:b,onStop:k,el:x,disabled:$,id:W,selectable:Q,dragHandle:D}=t,z=oe(!1);let H=[],L,S=null,A={x:void 0,y:void 0},P={x:0,y:0},M=null,V=0,R=!1;const N=D0(),ne=({x:ae,y:X})=>{A={x:ae,y:X};let G=!1;if(H=H.map(F=>{const se={x:ae-F.distance.x,y:X-F.distance.y};n.value&&(se.x=i.value[0]*Math.round(se.x/i.value[0]),se.y=i.value[1]*Math.round(se.y/i.value[1]));const{computedPosition:_e}=Dh(F,se,_.error,s.value,F.parentNode?d(F.parentNode):void 0);return G=G||F.position.x!==_e.x||F.position.y!==_e.y,F.position=_e,F}),!!G&&(y(H,!0,!0),z.value=!0,M)){const[F,se]=ju({id:W,dragItems:H,findNode:d});b({event:M,node:F,nodes:se})}},j=()=>{if(!S)return;const[ae,X]=w0(P,S);if(ae!==0||X!==0){const G={x:(A.x??0)-ae/l.value.zoom,y:(A.y??0)-X/l.value.zoom};c({x:ae,y:X})&&ne(G)}V=requestAnimationFrame(j)};return Me([()=>De($),x],([ae,X])=>{if(X){const G=pn(X);ae?G.on(".drag",null):(L=lS().on("start",F=>{var se;const _e=d(W);!m.value&&!h.value&&_e&&(_e.selected||v()),_e&&De(Q)&&m.value&&td(_e,h.value,w,v,f,!1,X);const Qe=N(F);if(A=Qe,H=s2(r.value,u.value,Qe,d,W),H.length){const[q,I]=ju({id:W,dragItems:H,findNode:d});T({event:F.sourceEvent,node:q,nodes:I})}S=((se=e.value)==null?void 0:se.getBoundingClientRect())||null,P=to(F.sourceEvent,S)}).on("drag",F=>{const se=N(F);!R&&a.value&&(R=!0,j()),(A.x!==se.xSnapped||A.y!==se.ySnapped)&&H.length&&(M=F.sourceEvent,P=to(F.sourceEvent,S),ne(se))}).on("end",F=>{if(z.value=!1,R=!1,cancelAnimationFrame(V),H.length){y(H,!1,!1);const[se,_e]=ju({id:W,dragItems:H,findNode:d});k({event:F.sourceEvent,node:se,nodes:_e})}}).filter(F=>{const se=F.target,_e=De(D);return!F.button&&(!o.value||!yp(se,`.${o.value}`,X)&&(!_e||yp(se,_e,X)))}),G.call(L))}}),z}function O2(){return{edgesChange:me(),nodesChange:me(),nodeDoubleClick:me(),nodeClick:me(),nodeMouseEnter:me(),nodeMouseMove:me(),nodeMouseLeave:me(),nodeContextMenu:me(),nodeDragStart:me(),nodeDrag:me(),nodeDragStop:me(),nodesInitialized:me(),miniMapNodeClick:me(),miniMapNodeDoubleClick:me(),miniMapNodeMouseEnter:me(),miniMapNodeMouseMove:me(),miniMapNodeMouseLeave:me(),connect:me(),connectStart:me(),connectEnd:me(),clickConnectStart:me(),clickConnectEnd:me(),paneReady:me(),move:me(),moveStart:me(),moveEnd:me(),selectionDragStart:me(),selectionDrag:me(),selectionDragStop:me(),selectionContextMenu:me(),selectionStart:me(),selectionEnd:me(),viewportChangeStart:me(),viewportChange:me(),viewportChangeEnd:me(),paneScroll:me(),paneClick:me(),paneContextMenu:me(),paneMouseEnter:me(),paneMouseMove:me(),paneMouseLeave:me(),edgeContextMenu:me(),edgeMouseEnter:me(),edgeMouseMove:me(),edgeMouseLeave:me(),edgeDoubleClick:me(),edgeClick:me(),edgeUpdateStart:me(),edgeUpdate:me(),edgeUpdateEnd:me(),updateNodeInternals:me(),error:me(t=>x0(t.message))}}function w2(t,e){uu(()=>{for(const[n,i]of Object.entries(e.value)){const o=r=>{t(n,r)};i.on(o),ks(()=>{i.off(o)})}})}function k0(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}const _2=["data-id","data-handleid","data-nodeid","data-handlepos"],b2={name:"Handle",compatConfig:{MODE:3}},xi=Le({...b2,props:{id:null,type:null,position:{default:be.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(t){const e=k0(t,["position","connectable","connectableStart","connectableEnd","id"]),n=Lc(e,"type","source"),i=Lc(e,"isValidConnection",void 0),{connectionStartHandle:o,connectionClickStartHandle:r,connectionEndHandle:s,vueFlowRef:l,nodesConnectable:a,noDragClassName:u,noPanClassName:c}=Ze(),{id:d,node:h,nodeEl:f,connectedEdges:m}=OT(),v=oe(),w=ve(()=>t.id??`${d}__handle-${t.position}`),y=ve(()=>typeof t.connectableStart<"u"?t.connectableStart:!0),_=ve(()=>typeof t.connectableEnd<"u"?t.connectableEnd:!0),{handlePointerDown:T,handleClick:b}=q0({nodeId:d,handleId:w,isValidConnection:i,type:n}),k=ve(()=>ei(t.connectable)&&t.connectable==="single"?!m.value.some(D=>{const z=D[`${n.value}Handle`];return D[n.value]!==d?!1:z?z===w.value:!0}):Zo(t.connectable)?t.connectable(h,m.value):Ge(t.connectable)?t.connectable:a.value),x=ve(()=>{var D,z,H,L,S,A;return((D=o.value)==null?void 0:D.nodeId)===d&&((z=o.value)==null?void 0:z.handleId)===w.value&&((H=o.value)==null?void 0:H.type)===n.value||((L=s.value)==null?void 0:L.nodeId)===d&&((S=s.value)==null?void 0:S.handleId)===w.value&&((A=s.value)==null?void 0:A.type)===n.value}),$=ve(()=>{var D,z,H;return((D=r.value)==null?void 0:D.nodeId)===d&&((z=r.value)==null?void 0:z.handleId)===w.value&&((H=r.value)==null?void 0:H.type)===n.value});$i(()=>h.initialized).toBe(!0,{flush:"post"}).then(()=>{var D;const z=(D=h.handleBounds[n.value])==null?void 0:D.find(V=>V.id===w.value);if(!l.value||z)return;const H=l.value.querySelector(".vue-flow__transformationpane");if(!f.value||!v.value||!H||!w.value)return;const L=f.value.getBoundingClientRect(),S=v.value.getBoundingClientRect(),A=window.getComputedStyle(H),{m22:P}=new window.DOMMatrixReadOnly(A.transform),M={id:w.value,position:t.position,x:(S.left-L.left)/P,y:(S.top-L.top)/P,...mu(v.value)};h.handleBounds[n.value]=[...h.handleBounds[n.value]??[],M]});function W(D){const z=qh(D);k.value&&y.value&&(z&&D.button===0||!z)&&T(D)}function Q(D){!d||!r.value&&!y.value||k.value&&b(D)}return(D,z)=>(E(),le("div",{ref_key:"handle",ref:v,"data-id":`${O(d)}-${O(w)}-${O(n)}`,"data-handleid":O(w),"data-nodeid":O(d),"data-handlepos":t.position,class:en(["vue-flow__handle",[`vue-flow__handle-${t.position}`,`vue-flow__handle-${O(w)}`,O(u),O(c),O(n),{connectable:O(k),connecting:O($),connectablestart:O(y),connectableend:O(_),connectionindicator:O(k)&&(O(y)&&!O(x)||O(_)&&O(x))}]]),onMousedown:W,onTouchstartPassive:W,onClick:Q},[Ve(D.$slots,"default",{id:t.id})],42,_2))}}),gu=function({sourcePosition:t=be.Bottom,targetPosition:e=be.Top,label:n,connectable:i=!0,isValidTargetPos:o,isValidSourcePos:r}){return[Ie(xi,{type:"target",position:e,connectable:i,isValidConnection:o}),typeof n!="string"&&n?Ie(n):Ie("div",{innerHTML:n}),Ie(xi,{type:"source",position:t,connectable:i,isValidConnection:r})]};gu.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable"];gu.inheritAttrs=!1;gu.compatConfig={MODE:3};const x2=gu,vu=function({sourcePosition:t=be.Bottom,label:e,connectable:n=!0,isValidSourcePos:i}){return[typeof e!="string"&&e?Ie(e):Ie("div",{innerHTML:e}),Ie(xi,{type:"source",position:t,connectable:n,isValidConnection:i})]};vu.props=["sourcePosition","label","isValidSourcePos","connectable"];vu.inheritAttrs=!1;vu.compatConfig={MODE:3};const S2=vu,yu=function({targetPosition:t=be.Top,label:e,connectable:n=!0,isValidTargetPos:i}){return[Ie(xi,{type:"target",position:t,connectable:n,isValidConnection:i}),typeof e!="string"&&e?Ie(e):Ie("div",{innerHTML:e})]};yu.props=["targetPosition","label","isValidTargetPos","connectable"];yu.inheritAttrs=!1;yu.compatConfig={MODE:3};const k2=yu,kp=Symbol("vueFlow"),Qh=Symbol("nodeId"),T0=Symbol("nodeRef"),T2=Symbol("edgeId"),P2=Symbol("edgeRef"),Ou=Symbol("slots"),C2=Le({name:"Node",compatConfig:{MODE:3},props:["name","type","id","draggable","selectable","focusable","connectable","node","resizeObserver"],setup(t){ro(Qh,t.id);const{id:e,edges:n,noPanClassName:i,selectNodesOnDrag:o,nodesSelectionActive:r,multiSelectionActive:s,emits:l,findNode:a,removeSelectedNodes:u,addSelectedNodes:c,updateNodeDimensions:d,onUpdateNodeInternals:h,getIntersectingNodes:f,getNodeTypes:m,nodeExtent:v,elevateNodesOnSelect:w,disableKeyboardA11y:y,ariaLiveMessage:_,snapToGrid:T,snapGrid:b}=Ze(),k=R0(),x=Rr(t,"node"),$=ve(()=>a(x.value.parentNode)),W=ve(()=>Kn([x.value],n.value)),Q=oe(null);ro(T0,Q);const{emit:D,on:z}=_T(x.value,l),H=S0({id:t.id,el:Q,disabled:()=>!t.draggable,selectable:()=>t.selectable,dragHandle:()=>x.value.dragHandle,onStart(G){D.dragStart({...G,intersections:f(x.value)})},onDrag(G){D.drag({...G,intersections:f(x.value)})},onStop(G){D.dragStop({...G,intersections:f(x.value)})}}),L=ve(()=>x.value.class instanceof Function?x.value.class(x.value):x.value.class),S=ve(()=>{const G=(x.value.style instanceof Function?x.value.style(x.value):x.value.style)||{},F=x.value.width instanceof Function?x.value.width(x.value):x.value.width,se=x.value.height instanceof Function?x.value.height(x.value):x.value.height;return F&&(G.width=typeof F=="string"?F:`${F}px`),se&&(G.height=typeof se=="string"?se:`${se}px`),G}),A=()=>Number(x.value.zIndex??S.value.zIndex??0);return h(G=>{G.includes(t.id)&&M()}),Vn(()=>{t.resizeObserver.observe(Q.value)}),fh(()=>{t.resizeObserver.unobserve(Q.value)}),Me([()=>x.value.type,()=>x.value.sourcePosition,()=>x.value.targetPosition],()=>{d([{id:t.id,nodeElement:Q.value,forceUpdate:!0}])},{flush:"pre"}),Me([()=>x.value.position.x,()=>x.value.position.y,()=>{var G;return(G=$.value)==null?void 0:G.computedPosition.x},()=>{var G;return(G=$.value)==null?void 0:G.computedPosition.y},()=>{var G;return(G=$.value)==null?void 0:G.computedPosition.z},()=>A(),()=>x.value.selected,()=>x.value.dimensions.height,()=>x.value.dimensions.width,()=>{var G;return(G=$.value)==null?void 0:G.dimensions.height},()=>{var G;return(G=$.value)==null?void 0:G.dimensions.width}],([G,F,se,_e,Qe,q])=>{const I={x:G,y:F,z:q+(w.value&&x.value.selected?1e3:0)};ti(se)&&ti(_e)?x.value.computedPosition=r2({x:se,y:_e,z:Qe},I):x.value.computedPosition=I},{flush:"post",immediate:!0}),Me([()=>x.value.extent,v],([G,F],[se,_e])=>{(G!==se||F!==_e)&&P()}),x.value.extent==="parent"||typeof x.value.extent=="object"&&"range"in x.value.extent&&x.value.extent.range==="parent"?$i(()=>x.value.initialized).toBe(!0).then(P):P(),()=>Ie("div",{ref:Q,"data-id":x.value.id,class:["vue-flow__node",`vue-flow__node-${t.type===!1?"default":t.name}`,{[i.value]:t.draggable,dragging:H==null?void 0:H.value,selected:x.value.selected,selectable:t.selectable,parent:x.value.isParent},L.value],style:{zIndex:x.value.computedPosition.z??A(),transform:`translate(${x.value.computedPosition.x}px,${x.value.computedPosition.y}px)`,pointerEvents:t.selectable||t.draggable?"all":"none",visibility:x.value.initialized?"visible":"hidden",...S.value},tabIndex:t.focusable?0:void 0,role:t.focusable?"button":void 0,"aria-describedby":y.value?void 0:`${u0}-${e}`,"aria-label":x.value.ariaLabel,onMouseenter:V,onMousemove:R,onMouseleave:N,onContextmenu:ne,onClick:ae,onDblclick:j,onKeydown:X},[Ie(t.type===!1?m.value.default:t.type,{id:x.value.id,type:x.value.type,data:x.value.data,events:{...x.value.events,...z},selected:!!x.value.selected,resizing:!!x.value.resizing,dragging:H.value,connectable:t.connectable,position:x.value.position,dimensions:x.value.dimensions,isValidTargetPos:x.value.isValidTargetPos,isValidSourcePos:x.value.isValidSourcePos,parent:x.value.parentNode,zIndex:x.value.computedPosition.z,targetPosition:x.value.targetPosition,sourcePosition:x.value.sourcePosition,label:x.value.label,dragHandle:x.value.dragHandle,onUpdateNodeInternals:M})]);function P(){const G=x.value.computedPosition;T.value&&(G.x=b.value[0]*Math.round(G.x/b.value[0]),G.y=b.value[1]*Math.round(G.y/b.value[1]));const{computedPosition:F,position:se}=Dh(x.value,G,l.error,v.value,$.value);(x.value.computedPosition.x!==F.x||x.value.computedPosition.y!==F.y)&&(x.value.computedPosition={...x.value.computedPosition,...F}),(x.value.position.x!==se.x||x.value.position.y!==se.y)&&(x.value.position=se)}function M(){Q.value&&d([{id:t.id,nodeElement:Q.value,forceUpdate:!0}])}function V(G){H!=null&&H.value||D.mouseEnter({event:G,node:x.value,connectedEdges:W.value})}function R(G){H!=null&&H.value||D.mouseMove({event:G,node:x.value,connectedEdges:W.value})}function N(G){H!=null&&H.value||D.mouseLeave({event:G,node:x.value,connectedEdges:W.value})}function ne(G){return D.contextMenu({event:G,node:x.value,connectedEdges:W.value})}function j(G){return D.doubleClick({event:G,node:x.value,connectedEdges:W.value})}function ae(G){t.selectable&&(!o.value||!t.draggable)&&td(x.value,s.value,c,u,r,!1,Q.value),D.click({event:G,node:x.value,connectedEdges:W.value})}function X(G){if(!id(G))if(d0.includes(G.key)&&t.selectable){const F=G.key==="Escape";td(x.value,s.value,c,u,r,F,Q.value)}else!y.value&&t.draggable&&x.value.selected&&No[G.key]&&(_.value=`Moved selected node ${G.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~x.value.position.x}, y: ${~~x.value.position.y}`,k({x:No[G.key].x,y:No[G.key].y},G.shiftKey))}}}),$2=C2,E2=["transform"],M2=["width","height","x","y","rx","ry"],A2=["y"],D2={name:"EdgeText",compatConfig:{MODE:3}},q2=Le({...D2,props:{"aria-activedescendant":null,"aria-atomic":{type:[Boolean,String]},"aria-autocomplete":null,"aria-busy":{type:[Boolean,String]},"aria-checked":{type:[Boolean,String]},"aria-colcount":null,"aria-colindex":null,"aria-colspan":null,"aria-controls":null,"aria-current":{type:[Boolean,String]},"aria-describedby":null,"aria-details":null,"aria-disabled":{type:[Boolean,String]},"aria-dropeffect":null,"aria-errormessage":null,"aria-expanded":{type:[Boolean,String]},"aria-flowto":null,"aria-grabbed":{type:[Boolean,String]},"aria-haspopup":{type:[Boolean,String]},"aria-hidden":{type:[Boolean,String]},"aria-invalid":{type:[Boolean,String]},"aria-keyshortcuts":null,"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":null,"aria-modal":{type:[Boolean,String]},"aria-multiline":{type:[Boolean,String]},"aria-multiselectable":{type:[Boolean,String]},"aria-orientation":null,"aria-owns":null,"aria-placeholder":null,"aria-posinset":null,"aria-pressed":{type:[Boolean,String]},"aria-readonly":{type:[Boolean,String]},"aria-relevant":null,"aria-required":{type:[Boolean,String]},"aria-roledescription":null,"aria-rowcount":null,"aria-rowindex":null,"aria-rowspan":null,"aria-selected":{type:[Boolean,String]},"aria-setsize":null,"aria-sort":null,"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,innerHTML:null,class:null,style:null,color:null,height:null,id:null,lang:null,max:null,media:null,method:null,min:null,name:null,target:null,type:null,width:null,role:null,tabindex:null,"accent-height":null,accumulate:null,additive:null,"alignment-baseline":null,allowReorder:null,alphabetic:null,amplitude:null,"arabic-form":null,ascent:null,attributeName:null,attributeType:null,autoReverse:null,azimuth:null,baseFrequency:null,"baseline-shift":null,baseProfile:null,bbox:null,begin:null,bias:null,by:null,calcMode:null,"cap-height":null,clip:null,"clip-path":null,clipPathUnits:null,"clip-rule":null,"color-interpolation":null,"color-interpolation-filters":null,"color-profile":null,"color-rendering":null,contentScriptType:null,contentStyleType:null,cursor:null,cx:null,cy:null,d:null,decelerate:null,descent:null,diffuseConstant:null,direction:null,display:null,divisor:null,"dominant-baseline":null,dur:null,dx:null,dy:null,edgeMode:null,elevation:null,"enable-background":null,end:null,exponent:null,externalResourcesRequired:null,fill:null,"fill-opacity":null,"fill-rule":null,filter:null,filterRes:null,filterUnits:null,"flood-color":null,"flood-opacity":null,focusable:null,"font-family":null,"font-size":null,"font-size-adjust":null,"font-stretch":null,"font-style":null,"font-variant":null,"font-weight":null,format:null,from:null,fx:null,fy:null,g1:null,g2:null,"glyph-name":null,"glyph-orientation-horizontal":null,"glyph-orientation-vertical":null,glyphRef:null,gradientTransform:null,gradientUnits:null,hanging:null,"horiz-adv-x":null,"horiz-origin-x":null,href:null,ideographic:null,"image-rendering":null,in2:null,in:null,intercept:null,k1:null,k2:null,k3:null,k4:null,k:null,kernelMatrix:null,kernelUnitLength:null,kerning:null,keyPoints:null,keySplines:null,keyTimes:null,lengthAdjust:null,"letter-spacing":null,"lighting-color":null,limitingConeAngle:null,local:null,"marker-end":null,markerHeight:null,"marker-mid":null,"marker-start":null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,mode:null,numOctaves:null,offset:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,"overline-position":null,"overline-thickness":null,"paint-order":null,"panose-1":null,pathLength:null,patternContentUnits:null,patternTransform:null,patternUnits:null,"pointer-events":null,points:null,pointsAtX:null,pointsAtY:null,pointsAtZ:null,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,r:null,radius:null,refX:null,refY:null,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:null,requiredFeatures:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,"shape-rendering":null,slope:null,spacing:null,specularConstant:null,specularExponent:null,speed:null,spreadMethod:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,"stop-color":null,"stop-opacity":null,"strikethrough-position":null,"strikethrough-thickness":null,string:null,stroke:null,"stroke-dasharray":null,"stroke-dashoffset":null,"stroke-linecap":null,"stroke-linejoin":null,"stroke-miterlimit":null,"stroke-opacity":null,"stroke-width":null,surfaceScale:null,systemLanguage:null,tableValues:null,targetX:null,targetY:null,"text-anchor":null,"text-decoration":null,textLength:null,"text-rendering":null,to:null,transform:null,u1:null,u2:null,"underline-position":null,"underline-thickness":null,unicode:null,"unicode-bidi":null,"unicode-range":null,"unitsPer-em":null,"v-alphabetic":null,values:null,"vector-effect":null,version:null,"vert-adv-y":null,"vert-origin-x":null,"vert-origin-y":null,"v-hanging":null,"v-ideographic":null,viewBox:null,viewTarget:null,visibility:null,"v-mathematical":null,widths:null,"word-spacing":null,"writing-mode":null,x1:null,x2:null,x:null,xChannelSelector:null,"x-height":null,xlinkActuate:null,xlinkArcrole:null,xlinkHref:null,xlinkRole:null,xlinkShow:null,xlinkTitle:null,xlinkType:null,xmlns:null,y1:null,y2:null,y:null,yChannelSelector:null,z:null,zoomAndPan:null,label:null,labelStyle:{default:{}},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:{}},labelBgPadding:{default:[2,4]},labelBgBorderRadius:{default:2}},setup(t){const e=oe({x:0,y:0,width:0,height:0}),n=oe(null),i=ve(()=>`translate(${t.x-e.value.width/2} ${t.y-e.value.height/2})`);Vn(o),Me([()=>t.x,()=>t.y,n,()=>t.label],o);function o(){if(!n.value)return;const r=n.value.getBBox();(r.width!==e.value.width||r.height!==e.value.height)&&(e.value=r)}return(r,s)=>(E(),le("g",{transform:O(i),class:"vue-flow__edge-textwrapper"},[t.labelShowBg?(E(),le("rect",{key:0,class:"vue-flow__edge-textbg",width:`${e.value.width+2*t.labelBgPadding[0]}px`,height:`${e.value.height+2*t.labelBgPadding[1]}px`,x:-t.labelBgPadding[0],y:-t.labelBgPadding[1],style:mt(t.labelBgStyle),rx:t.labelBgBorderRadius,ry:t.labelBgBorderRadius},null,12,M2)):ye("",!0),Re("text",o_(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:e.value.height/2,dy:"0.3em",style:t.labelStyle}),[Ve(r.$slots,"default",{},()=>[O(ei)(t.label)?(E(),le(Te,{key:1},[pe(de(t.label),1)],64)):(E(),K(_o(t.label),{key:0}))])],16,A2)],8,E2))}}),R2=["id","d","marker-end","marker-start"],Q2=["d","stroke-width"],N2={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},wu=Le({...N2,props:{labelStyle:null,labelShowBg:{type:Boolean,default:!0},labelBgStyle:null,labelBgPadding:null,labelBgBorderRadius:null,id:null,labelX:null,labelY:null,path:null,label:null,markerStart:null,markerEnd:null,interactionWidth:{default:20},style:null,ref:null},setup(t,{expose:e}){const n=k0(t,["interactionWidth","labelShowBg"]),i=oe(null),o=oe(null),r=oe(null),s=ph();return e({pathEl:i,interactionEl:o,labelEl:r}),(l,a)=>(E(),le(Te,null,[Re("path",{id:t.id,ref_key:"pathEl",ref:i,d:t.path,style:mt(O(n).style),class:en(["vue-flow__edge-path",O(s).class]),"marker-end":t.markerEnd,"marker-start":t.markerStart},null,14,R2),t.interactionWidth?(E(),le("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:t.path,"stroke-width":t.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Q2)):ye("",!0),t.label&&O(ti)(t.labelX)&&O(ti)(t.labelY)?(E(),K(q2,{key:1,ref_key:"labelEl",ref:r,x:t.labelX,y:t.labelY,label:t.label,"label-show-bg":t.labelShowBg,"label-bg-style":t.labelBgStyle,"label-bg-padding":t.labelBgPadding,"label-bg-border-radius":t.labelBgBorderRadius,"label-style":t.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):ye("",!0)],64))}});function P0({sourceX:t,sourceY:e,targetX:n,targetY:i}){const o=Math.abs(n-t)/2,r=n=0?.5*t:e*25*Math.sqrt(-t)}function Tp({pos:t,x1:e,y1:n,x2:i,y2:o,c:r}){let s,l;switch(t){case be.Left:s=e-Gs(e-i,r),l=n;break;case be.Right:s=e+Gs(i-e,r),l=n;break;case be.Top:s=e,l=n-Gs(n-o,r);break;case be.Bottom:s=e,l=n+Gs(o-n,r);break}return[s,l]}function $0({sourceX:t,sourceY:e,sourcePosition:n=be.Bottom,targetX:i,targetY:o,targetPosition:r=be.Top,curvature:s=.25}){const[l,a]=Tp({pos:n,x1:t,y1:e,x2:i,y2:o,c:s}),[u,c]=Tp({pos:r,x1:i,y1:o,x2:t,y2:e,c:s}),[d,h,f,m]=C0({sourceX:t,sourceY:e,targetX:i,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${t},${e} C${l},${a} ${u},${c} ${i},${o}`,d,h,f,m]}function Pp({pos:t,x1:e,y1:n,x2:i,y2:o}){let r,s;switch(t){case be.Left:case be.Right:r=.5*(e+i),s=n;break;case be.Top:case be.Bottom:r=e,s=.5*(n+o);break}return[r,s]}function E0({sourceX:t,sourceY:e,sourcePosition:n=be.Bottom,targetX:i,targetY:o,targetPosition:r=be.Top}){const[s,l]=Pp({pos:n,x1:t,y1:e,x2:i,y2:o}),[a,u]=Pp({pos:r,x1:i,y1:o,x2:t,y2:e}),[c,d,h,f]=C0({sourceX:t,sourceY:e,targetX:i,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${t},${e} C${s},${l} ${a},${u} ${i},${o}`,c,d,h,f]}const Cp={[be.Left]:{x:-1,y:0},[be.Right]:{x:1,y:0},[be.Top]:{x:0,y:-1},[be.Bottom]:{x:0,y:1}};function I2({source:t,sourcePosition:e=be.Bottom,target:n}){return e===be.Left||e===be.Right?t.xu[H],A=a[H]=z?(m=(W.x+Q.x)/2,v=f[0].y):(m=f[0].x,v=(W.y+Q.y)/2)}return[[t,{x:a.x-w.x,y:a.y-w.y},...f,{x:u.x-y.x,y:u.y-y.y},n],m,v,b,k]}function B2(t,e,n,i){const o=Math.min($p(t,e)/2,$p(e,n)/2,i),{x:r,y:s}=e;if(t.x===r&&r===n.x||t.y===s&&s===n.y)return`L${r} ${s}`;if(t.y===s){const u=t.x{let _;return y>0&&y{const[n,i,o]=$0({...t,sourcePosition:t.sourcePosition??be.Bottom,targetPosition:t.targetPosition??be.Top});return Ie(wu,{path:n,labelX:i,labelY:o,...e,...t})}}}),z2=L2,X2=Le({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(t,{attrs:e}){return()=>{const[n,i,o]=E0({...t,sourcePosition:t.sourcePosition??be.Bottom,targetPosition:t.targetPosition??be.Top});return Ie(wu,{path:n,labelX:i,labelY:o,...e,...t})}}}),U2=X2,Y2=Le({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(t,{attrs:e}){return()=>{const[n,i,o]=nd({...t,sourcePosition:t.sourcePosition??be.Bottom,targetPosition:t.targetPosition??be.Top});return Ie(wu,{path:n,labelX:i,labelY:o,...e,...t})}}}),M0=Y2,j2=Le({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(t,{attrs:e}){return()=>Ie(M0,{...t,...e,borderRadius:0})}}),F2=j2,H2=Le({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(t,{attrs:e}){return()=>{const[n,i,o]=W2(t);return Ie(wu,{path:n,labelX:i,labelY:o,...e,...t})}}}),G2=H2;function Z2(t,e,n){return n===be.Left?t-e:n===be.Right?t+e:t}function K2(t,e,n){return n===be.Top?t-e:n===be.Bottom?t+e:t}const Nh=function({radius:t=10,centerX:e=0,centerY:n=0,position:i=be.Top,type:o}){return Ie("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:Z2(e,t,i),cy:K2(n,t,i),r:t,stroke:"transparent",fill:"transparent"})};Nh.props=["radius","centerX","centerY","position","type"];Nh.compatConfig={MODE:3};const Ep=Nh,J2=Le({name:"Edge",compatConfig:{MODE:3},props:["name","type","id","updatable","selectable","focusable","edge"],setup(t){const{id:e,addSelectedEdges:n,connectionMode:i,edgeUpdaterRadius:o,emits:r,nodesSelectionActive:s,noPanClassName:l,getEdgeTypes:a,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:h}=Ze(),f=gT(t.edge,r),m=Rr(t,"edge"),v=oe(!1),w=oe(!1),y=oe(""),_=oe(null),T=oe("source"),b=oe(null);ro(T2,t.id),ro(P2,b);const k=ve(()=>m.value.class instanceof Function?m.value.class(m.value):m.value.class),x=ve(()=>m.value.style instanceof Function?m.value.style(m.value):m.value.style),{handlePointerDown:$}=q0({nodeId:y,handleId:_,type:T,isValidConnection:h,edgeUpdaterType:T,onEdgeUpdate:D,onEdgeUpdateEnd:z});return()=>{const j=d(m.value.source),ae=d(m.value.target);if(!j||!ae||!m.value||j.hidden||ae.hidden)return null;let X;i.value===lo.Strict?X=j.handleBounds.source:X=[...j.handleBounds.source||[],...j.handleBounds.target||[]];const G=Op(X,m.value.sourceHandle);let F;i.value===lo.Strict?F=ae.handleBounds.target:F=[...ae.handleBounds.target||[],...ae.handleBounds.source||[]];const se=Op(F,m.value.targetHandle),_e=G?G.position:be.Bottom,Qe=se?se.position:be.Top,{sourceX:q,sourceY:I,targetY:ie,targetX:ee}=c2(j,G,_e,ae,se,Qe);return m.value.sourceX=q,m.value.sourceY=I,m.value.targetX=ee,m.value.targetY=ie,Ie("g",{ref:b,key:t.id,"data-id":t.id,class:["vue-flow__edge",`vue-flow__edge-${t.type===!1?"default":t.name}`,l.value,k.value,{updating:v.value,selected:m.value.selected,animated:m.value.animated,inactive:!t.selectable}],onClick:L,onContextmenu:S,onDblclick:A,onMouseenter:P,onMousemove:M,onMouseleave:V,onKeyDown:t.focusable?ne:void 0,tabIndex:t.focusable?0:void 0,"aria-label":m.value.ariaLabel===null?void 0:m.value.ariaLabel||`Edge from ${m.value.source} to ${m.value.target}`,"aria-describedby":t.focusable?`${c0}-${e}`:void 0,role:t.focusable?"button":"img"},[w.value?null:Ie(t.type===!1?a.value.default:t.type,{id:t.id,sourceNode:j,targetNode:ae,source:m.value.source,target:m.value.target,type:m.value.type,updatable:t.updatable,selected:m.value.selected,animated:m.value.animated,label:m.value.label,labelStyle:m.value.labelStyle,labelShowBg:m.value.labelShowBg,labelBgStyle:m.value.labelBgStyle,labelBgPadding:m.value.labelBgPadding,labelBgBorderRadius:m.value.labelBgBorderRadius,data:m.value.data,events:{...m.value.events,...f.on},style:x.value,markerStart:`url(#${Fi(m.value.markerStart,e)})`,markerEnd:`url(#${Fi(m.value.markerEnd,e)})`,sourcePosition:_e,targetPosition:Qe,sourceX:q,sourceY:I,targetX:ee,targetY:ie,sourceHandleId:m.value.sourceHandle,targetHandleId:m.value.targetHandle,interactionWidth:m.value.interactionWidth}),[t.updatable==="source"||t.updatable===!0?[Ie("g",{onMousedown:R,onMouseenter:W,onMouseout:Q},Ie(Ep,{position:_e,centerX:q,centerY:I,radius:o.value,type:"source","data-type":"source"}))]:null,t.updatable==="target"||t.updatable===!0?[Ie("g",{onMousedown:N,onMouseenter:W,onMouseout:Q},Ie(Ep,{position:Qe,centerX:ee,centerY:ie,radius:o.value,type:"target","data-type":"target"}))]:null]])};function W(){v.value=!0}function Q(){v.value=!1}function D(j,ae){f.emit.update({event:j,edge:m.value,connection:ae})}function z(j){f.emit.updateEnd({event:j,edge:m.value}),w.value=!1}function H(j,ae){j.button===0&&(w.value=!0,y.value=ae?m.value.target:m.value.source,_.value=(ae?m.value.targetHandle:m.value.sourceHandle)??"",T.value=ae?"target":"source",f.emit.updateStart({event:j,edge:m.value}),$(j))}function L(j){const ae={event:j,edge:m.value};t.selectable&&(s.value=!1,n([m.value])),f.emit.click(ae)}function S(j){f.emit.contextMenu({event:j,edge:m.value})}function A(j){f.emit.doubleClick({event:j,edge:m.value})}function P(j){f.emit.mouseEnter({event:j,edge:m.value})}function M(j){f.emit.mouseMove({event:j,edge:m.value})}function V(j){f.emit.mouseLeave({event:j,edge:m.value})}function R(j){H(j,!0)}function N(j){H(j,!1)}function ne(j){var ae;d0.includes(j.key)&&t.selectable&&(j.key==="Escape"?((ae=b.value)==null||ae.blur(),u([c(t.id)])):n([c(t.id)]))}}}),eT=J2,tT={[be.Left]:be.Right,[be.Right]:be.Left,[be.Top]:be.Bottom,[be.Bottom]:be.Top},nT=Le({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var t;const{connectionMode:e,connectionStartHandle:n,connectionEndHandle:i,connectionPosition:o,connectionLineType:r,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:a,viewport:u,findNode:c}=Ze(),d=(t=oi(Ou))==null?void 0:t["connection-line"];return()=>{var h,f,m,v;if(!n.value)return null;const w=c(n.value.nodeId);if(!w)return null;const y=n.value.handleId,_=n.value.type,T=((h=i.value)==null?void 0:h.handleId)&&c(i.value.nodeId)||null,b=(o.value.x-u.value.x)/u.value.zoom,k=(o.value.y-u.value.y)/u.value.zoom,x=w.handleBounds;let $=x==null?void 0:x[_];if(e.value===lo.Loose&&($=$||(x==null?void 0:x[_==="source"?"target":"source"])),!$)return null;const W=(y?$.find(M=>M.id===y):$[0])??null,Q=(W==null?void 0:W.position)||be.Top,{x:D,y:z}=ed(Q,{...w.dimensions,...w.computedPosition},W),H=T&&((f=i.value)==null?void 0:f.handleId)&&((e.value===lo.Strict?(m=T.handleBounds[_==="source"?"target":"source"])==null?void 0:m.find(M=>{var V;return M.id===((V=i.value)==null?void 0:V.handleId)}):[...T.handleBounds.source||[],...T.handleBounds.target||[]].find(M=>{var V;return M.id===((V=i.value)==null?void 0:V.handleId)}))||((v=T.handleBounds[_??"target"])==null?void 0:v[0]))||null,L=Q?tT[Q]:null;if(!Q||!L)return null;const S=r.value??l.value.type;let A="";const P={sourceX:D,sourceY:z,sourcePosition:Q,targetX:b,targetY:k,targetPosition:L};return S===Po.Bezier?[A]=$0(P):S===Po.Step?[A]=nd({...P,borderRadius:0}):S===Po.SmoothStep?[A]=nd(P):S===Po.SimpleBezier?[A]=E0(P):A=`M${D},${z} ${b},${k}`,Ie("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Ie("g",{class:"vue-flow__connection"},d?Ie(d,{sourceX:D,sourceY:z,sourcePosition:Q,targetX:b,targetY:k,targetPosition:L,sourceNode:w,sourceHandle:W,targetNode:T,targetHandle:H,markerEnd:`url(#${Fi(l.value.markerEnd)})`,markerStart:`url(#${Fi(l.value.markerStart)})`,connectionStatus:a.value}):Ie("path",{d:A,class:[l.value.class,a,"vue-flow__connection-path"],style:s.value||l.value.style,"marker-end":`url(#${Fi(l.value.markerEnd)})`,"marker-start":`url(#${Fi(l.value.markerStart)})`})))}}}),iT=nT,oT=["tabIndex"],rT={name:"NodesSelection",compatConfig:{MODE:3}},sT=Le({...rT,setup(t){const e=Ze(),n=st(e,"emits"),i=st(e,"viewport"),o=st(e,"getSelectedNodes"),r=st(e,"noPanClassName"),s=st(e,"disableKeyboardA11y"),l=st(e,"userSelectionActive"),a=R0(),u=oe(null),c=S0({el:u,onStart(v){n.value.selectionDragStart(v)},onDrag(v){n.value.selectionDrag(v)},onStop(v){n.value.selectionDragStop(v)}});Vn(()=>{var v;s.value||(v=u.value)==null||v.focus({preventScroll:!0})});const d=ve(()=>Ah(o.value)),h=ve(()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`}));function f(v){n.value.selectionContextMenu({event:v,nodes:o.value})}function m(v){s.value||No[v.key]&&a({x:No[v.key].x,y:No[v.key].y},v.shiftKey)}return(v,w)=>!O(l)&&O(d).width&&O(d).height?(E(),le("div",{key:0,class:en(["vue-flow__nodesselection vue-flow__container",O(r)]),style:mt({transform:`translate(${O(i).x}px,${O(i).y}px) scale(${O(i).zoom})`})},[Re("div",{ref_key:"el",ref:u,class:en([{dragging:O(c)},"vue-flow__nodesselection-rect"]),style:mt(O(h)),tabIndex:O(s)?void 0:-1,onContextmenu:f,onKeydown:m},null,46,oT)],6)):ye("",!0)}}),lT={name:"UserSelection",compatConfig:{MODE:3}},aT=Le({...lT,props:{userSelectionRect:null},setup(t){return(e,n)=>(E(),le("div",{class:"vue-flow__selection vue-flow__container",style:mt({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),uT={input:S2,default:x2,output:k2},cT={default:z2,straight:G2,step:F2,smoothstep:M0,simplebezier:U2};function dT(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Mh.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Qr.Free,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:Po.Bezier,style:{}},connectionMode:lo.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:NaN,y:NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Oa()?"Meta":"Control",zoomActivationKeyCode:Oa()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:O2(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,disableKeyboardA11y:!1,ariaLiveMessage:"",__experimentalFeatures:{nestedFlow:!1}}}function A0(t){const e=dT();return t&&Object.keys(t).forEach(n=>{const i=t[n];Ge(i)&&(e[n]=i)}),e}function hT(t,e,n,i,o,r,s){const l=xT(i,o),a=q=>{const I=q??r.value??[];i.hooks.updateNodeInternals.trigger(I)},u=q=>{if(q)return i.nodes&&!r.value.length?i.nodes.find(I=>I.id===q):i.nodes[r.value.indexOf(q)]},c=q=>{if(q)return i.edges&&!s.value.length?i.edges.find(I=>I.id===q):i.edges[s.value.indexOf(q)]},d=(q,I,ie)=>{const ee=[];q.forEach(re=>{var U,Y;const ue={id:re.id,type:"position",dragging:ie,from:re.from};if(I&&(ue.position=re.position,re.parentNode)){const he=u(re.parentNode);ue.position={x:ue.position.x-(((U=he==null?void 0:he.computedPosition)==null?void 0:U.x)??0),y:ue.position.y-(((Y=he==null?void 0:he.computedPosition)==null?void 0:Y.y)??0)}}ee.push(ue)}),ee!=null&&ee.length&&i.hooks.nodesChange.trigger(ee)},h=q=>{var I;if(!i.vueFlowRef)return;const ie=i.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!ie)return;let ee;if((I=i.__experimentalFeatures)!=null&&I.nestedFlow){let U=[ie],Y=ie,ue;for(;!ue&&Y;)Y=Y.parentElement,ue=Y==null?void 0:Y.classList.contains("vue-flow__transformationpane"),ue&&(U=[Y,...U]);U.forEach(he=>{const te=window.getComputedStyle(he),{m22:$e}=new window.DOMMatrixReadOnly(te.transform);ee?ee*=$e:ee=$e})}else{const U=window.getComputedStyle(ie),{m22:Y}=new window.DOMMatrixReadOnly(U.transform);ee=Y}const re=q.reduce((U,Y)=>{const ue=u(Y.id);if(ue){const he=mu(Y.nodeElement);he.width&&he.height&&(ue.dimensions.width!==he.width||ue.dimensions.height!==he.height||Y.forceUpdate)&&(ue.handleBounds.source=xp(".source",Y.nodeElement,ee),ue.handleBounds.target=xp(".target",Y.nodeElement,ee),ue.dimensions=he,ue.initialized=!0,U.push({id:ue.id,type:"dimensions",dimensions:he}))}return U},[]);re.length&&i.hooks.nodesChange.trigger(re)},f=(q,I)=>{const ie=q.map(U=>U.id);let ee,re=[];if(i.multiSelectionActive)ee=ie.map(U=>Gn(U,I));else{const U=Yu([...i.nodes,...i.edges],ie);ee=U.changedNodes,re=U.changedEdges}ee.length&&i.hooks.nodesChange.trigger(ee),re.length&&i.hooks.edgesChange.trigger(re)},m=(q,I)=>{const ie=q.map(U=>U.id);let ee=[],re;if(i.multiSelectionActive)re=ie.map(U=>Gn(U,I));else{const U=Yu([...i.nodes,...i.edges],ie);ee=U.changedNodes,re=U.changedEdges}ee.length&&i.hooks.nodesChange.trigger(ee),re.length&&i.hooks.edgesChange.trigger(re)},v=(q,I)=>{const ie=q.filter(Nr).map(Y=>Y.id),ee=q.filter(Go).map(Y=>Y.id);let{changedNodes:re,changedEdges:U}=Yu([...i.nodes,...i.edges],[...ie,...ee]);i.multiSelectionActive&&(re=ie.map(Y=>Gn(Y,I)),U=ee.map(Y=>Gn(Y,I))),re.length&&i.hooks.nodesChange.trigger(re),U.length&&i.hooks.edgesChange.trigger(U)},w=q=>{f(q,!0)},y=q=>{m(q,!0)},_=q=>{v(q,!0)},T=q=>{if(!q.length)return f(q,!1);const I=q.map(ie=>ie.id).map(ie=>Gn(ie,!1));I.length&&i.hooks.nodesChange.trigger(I)},b=q=>{if(!q.length)return m(q,!1);const I=q.map(ie=>ie.id).map(ie=>Gn(ie,!1));I.length&&i.hooks.edgesChange.trigger(I)},k=q=>{if(!q||!q.length)return v([],!1);const I=q.reduce((ie,ee)=>{const re=Gn(ee.id,!1);return Nr(ee)?ie.nodes.push(re):ie.edges.push(re),ie},{nodes:[],edges:[]});I.nodes.length&&i.hooks.nodesChange.trigger(I.nodes),I.edges.length&&i.hooks.edgesChange.trigger(I.edges)},x=q=>{var I;(I=i.d3Zoom)==null||I.scaleExtent([q,i.maxZoom]),i.minZoom=q},$=q=>{var I;(I=i.d3Zoom)==null||I.scaleExtent([i.minZoom,q]),i.maxZoom=q},W=q=>{var I;(I=i.d3Zoom)==null||I.translateExtent(q),i.translateExtent=q},Q=q=>{i.nodeExtent=q,a(r.value)},D=q=>{i.nodesDraggable=q,i.nodesConnectable=q,i.elementsSelectable=q},z=q=>{const I=q instanceof Function?q(i.nodes):q;!i.initialized&&!I.length||(i.nodes=Sp(I,i.nodes,u,i.hooks.error.trigger))},H=q=>{const I=q instanceof Function?q(i.edges):q;if(!i.initialized&&!I.length)return;const ie=i.isValidConnection?I.filter(ee=>i.isValidConnection(ee,{edges:i.edges,sourceNode:u(ee.source),targetNode:u(ee.target)})):I;i.edges=ie.reduce((ee,re)=>{const U=u(re.source),Y=u(re.target),ue=!U||typeof U>"u",he=!Y||typeof Y>"u";if(ue&&he?i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_TARGET_MISSING,re.id,re.source,re.target)):(ue&&i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_MISSING,re.id,re.source)),he&&i.hooks.error.trigger(new xt(yt.EDGE_TARGET_MISSING,re.id,re.target))),ue||he)return ee;const te=c(re.id);return ee.push({...f0(re,Object.assign({},te,i.defaultEdgeOptions)),sourceNode:U,targetNode:Y}),ee},[])},L=q=>{const I=q instanceof Function?q([...i.nodes,...i.edges]):q;!i.initialized&&!I.length||(z(I.filter(Nr)),H(I.filter(Go)))},S=q=>{let I=q instanceof Function?q(i.nodes):q;I=Array.isArray(I)?I:[I];const ie=Sp(I,i.nodes,u,i.hooks.error.trigger).map(vp);ie.length&&i.hooks.nodesChange.trigger(ie)},A=q=>{let I=q instanceof Function?q(i.edges):q;I=Array.isArray(I)?I:[I];const ie=(i.isValidConnection?I.filter(ee=>i.isValidConnection(ee,{edges:i.edges,sourceNode:u(ee.source),targetNode:u(ee.target)})):I).reduce((ee,re)=>{const U=v2({...re,...i.defaultEdgeOptions},i.edges,i.hooks.error.trigger);if(U){const Y=u(U.source),ue=u(U.target),he=!Y||typeof Y>"u",te=!ue||typeof ue>"u";if(he&&te)return i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_TARGET_MISSING,U.id,U.source,U.target)),ee;if(he)return i.hooks.error.trigger(new xt(yt.EDGE_SOURCE_MISSING,U.id,U.source)),ee;if(te)return i.hooks.error.trigger(new xt(yt.EDGE_TARGET_MISSING,U.id,U.target)),ee;ee.push(vp({...U,sourceNode:Y,targetNode:ue}))}return ee},[]);ie.length&&i.hooks.edgesChange.trigger(ie)},P=(q,I=!0,ie=!1)=>{let ee=q instanceof Function?q(i.nodes):q;ee=Array.isArray(ee)?ee:[ee];const re=[],U=[];function Y(he){const te=Kn(he,i.edges).filter($e=>Ge($e.deletable)?$e.deletable:!0);U.push(...te.map($e=>Hs($e.id)))}function ue(he){const te=i.nodes.filter($e=>$e.parentNode===he);if(te.length){const $e=te.map(ot=>ot.id);re.push(...$e.map(ot=>Hs(ot))),I&&Y(te),te.forEach(ot=>{ue(ot.id)})}}ee.forEach(he=>{const te=typeof he=="string"?u(he):he;te&&(Ge(te.deletable)&&!te.deletable||(re.push(Hs(te.id)),I&&Y([te]),ie&&ue(te.id)))}),U.length&&i.hooks.edgesChange.trigger(U),re.length&&i.hooks.nodesChange.trigger(re)},M=q=>{let I=q instanceof Function?q(i.edges):q;I=Array.isArray(I)?I:[I];const ie=[];I.forEach(ee=>{const re=typeof ee=="string"?c(ee):ee;re&&(Ge(re.deletable)&&!re.deletable||ie.push(Hs(typeof ee=="string"?ee:ee.id)))}),i.hooks.edgesChange.trigger(ie)},V=(q,I,ie=!0)=>y2(q,I,i.edges,c,ie,i.hooks.error.trigger),R=q=>gp(q,i.nodes),N=q=>gp(q,i.edges),ne=(q,I,ie,ee=!1)=>{ee?i.connectionClickStartHandle=q:i.connectionStartHandle=q,i.connectionEndHandle=null,i.connectionStatus=null,I&&(i.connectionPosition=I)},j=(q,I=null,ie=null)=>{i.connectionStartHandle&&(i.connectionPosition=q,i.connectionEndHandle=I,i.connectionStatus=ie)},ae=(q,I)=>{i.connectionPosition={x:NaN,y:NaN},i.connectionEndHandle=null,i.connectionStatus=null,I?i.connectionClickStartHandle=null:i.connectionStartHandle=null},X=q=>{const I=e2(q),ie=I?null:u(q.id);return!I&&!ie?[null,null,I]:[I?q:hp(ie),ie,I]},G=(q,I=!0,ie)=>{const[ee,re,U]=X(q);return ee?(ie||i.nodes).filter(Y=>{if(!U&&(Y.id===re.id||!Y.computedPosition))return!1;const ue=hp(Y),he=Jc(ue,ee);return I&&he>0||he>=Number(q.width)*Number(q.height)}):[]},F=(q,I,ie=!0)=>{const[ee]=X(q);if(!ee)return!1;const re=Jc(ee,I);return ie&&re>0||re>=Number(q.width)*Number(q.height)},se=q=>{const{viewport:I,dimensions:ie,d3Zoom:ee,d3Selection:re,translateExtent:U}=i;if(!ee||!re||!q.x&&!q.y)return!1;const Y=Ho.translate(I.x+q.x,I.y+q.y).scale(I.zoom),ue=[[0,0],[ie.width,ie.height]],he=ee.constrain()(Y,ue,U),te=i.viewport.x!==he.x||i.viewport.y!==he.y||i.viewport.zoom!==he.k;return ee.transform(re,he),te},_e=q=>{const I=q instanceof Function?q(i):q,ie=["modelValue","nodes","edges","maxZoom","minZoom","translateExtent","nodeExtent","hooks","defaultEdgeOptions"],ee=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ge(I.defaultEdgeOptions)&&(i.defaultEdgeOptions=I.defaultEdgeOptions);const re=I.modelValue||I.nodes||I.edges?[]:void 0;re&&(I.modelValue&&re.push(...I.modelValue),I.nodes&&re.push(...I.nodes),I.edges&&re.push(...I.edges),L(re));const U=()=>{Ge(I.maxZoom)&&$(I.maxZoom),Ge(I.minZoom)&&x(I.minZoom),Ge(I.translateExtent)&&W(I.translateExtent),Ge(I.nodeExtent)&&Q(I.nodeExtent)};Object.keys(I).forEach(Y=>{const ue=Y,he=I[ue];![...ie,...ee].includes(ue)&&Ge(he)&&(i[ue]=he)}),i.d3Zoom?U():$i(()=>i.d3Zoom).not.toBeUndefined().then(U),i.initialized||(i.initialized=!0)},Qe={updateNodePositions:d,updateNodeDimensions:h,setElements:L,setNodes:z,setEdges:H,addNodes:S,addEdges:A,removeNodes:P,removeEdges:M,findNode:u,findEdge:c,updateEdge:V,applyEdgeChanges:N,applyNodeChanges:R,addSelectedElements:_,addSelectedNodes:w,addSelectedEdges:y,setMinZoom:x,setMaxZoom:$,setTranslateExtent:W,setNodeExtent:Q,removeSelectedElements:k,removeSelectedNodes:T,removeSelectedEdges:b,startConnection:ne,updateConnection:j,endConnection:ae,setInteractive:D,setState:_e,getIntersectingNodes:G,isNodeIntersecting:F,panBy:se,fitView:q=>l.value.fitView(q),zoomIn:q=>l.value.zoomIn(q),zoomOut:q=>l.value.zoomOut(q),zoomTo:(q,I)=>l.value.zoomTo(q,I),setViewport:(q,I)=>l.value.setViewport(q,I),setTransform:(q,I)=>l.value.setTransform(q,I),getViewport:()=>l.value.getViewport(),getTransform:()=>l.value.getTransform(),setCenter:(q,I,ie)=>l.value.setCenter(q,I,ie),fitBounds:(q,I)=>l.value.fitBounds(q,I),project:q=>l.value.project(q),toObject:()=>JSON.parse(JSON.stringify({nodes:i.nodes.map(q=>{const{computedPosition:I,handleBounds:ie,selected:ee,dimensions:re,isParent:U,resizing:Y,dragging:ue,initialized:he,...te}=q;return te}),edges:i.edges.map(q=>{const{selected:I,sourceNode:ie,targetNode:ee,...re}=q;return re}),position:[i.viewport.x,i.viewport.y],zoom:i.viewport.zoom,viewport:i.viewport})),fromObject:q=>{const{nodes:I,edges:ie,position:ee,zoom:re,viewport:U}=q;if(I&&z(I),ie&&H(ie),U!=null&&U.x&&U!=null&&U.y||ee){const Y=(U==null?void 0:U.x)||ee[0],ue=(U==null?void 0:U.y)||ee[1],he=(U==null?void 0:U.zoom)||re||i.viewport.zoom;$i(()=>l.value.initialized).toBe(!0).then(()=>{l.value.setViewport({x:Y,y:ue,zoom:he})})}},updateNodeInternals:a,$reset:()=>{const q=A0();if(i.edges=[],i.nodes=[],i.d3Zoom&&i.d3Selection){const I=Ho.translate(q.defaultViewport.x??0,q.defaultViewport.y??0).scale(si(q.defaultViewport.zoom??1,q.minZoom,q.maxZoom)),ie=i.viewportRef.getBoundingClientRect(),ee=[[0,0],[ie.width,ie.height]],re=i.d3Zoom.constrain()(I,ee,q.translateExtent);i.d3Zoom.transform(i.d3Selection,re)}_e(q)},$destroy:()=>{}};return $i(()=>l.value.initialized).toBe(!0,{flush:"pre"}).then(()=>{i.fitViewOnInit&&l.value.fitView(),i.hooks.paneReady.trigger({id:t,emits:e,vueFlowVersion:"1.22.3",...n,...i,...o,...Qe})}),Qe}function fT(t,e,n){const i=ve(()=>v=>t.nodes&&!e.value.length?t.nodes.find(w=>w.id===v):t.nodes[e.value.indexOf(v)]),o=ve(()=>v=>t.edges&&!n.value.length?t.edges.find(w=>w.id===v):t.edges[n.value.indexOf(v)]),r=ve(()=>{var v;const w={...cT,...t.edgeTypes},y=Object.keys(w);return(v=t.edges)==null||v.forEach(_=>_.type&&!y.includes(_.type)&&(w[_.type]=_.type)),w}),s=ve(()=>{var v;const w={...uT,...t.nodeTypes},y=Object.keys(w);return(v=t.nodes)==null||v.forEach(_=>_.type&&!y.includes(_.type)&&(w[_.type]=_.type)),w}),l=ve(()=>{const v=t.nodes.filter(w=>!w.hidden);return t.onlyRenderVisibleElements?v&&y0(v,{x:0,y:0,width:t.dimensions.width,height:t.dimensions.height},t.viewport,!0):v??[]}),a=(v,w,y)=>{if(w=w??i.value(v.source),y=y??i.value(v.target),!w||!y){t.hooks.error.trigger(new xt(yt.EDGE_ORPHANED,v.id));return}return!v.hidden&&!y.hidden&&!w.hidden},u=ve(()=>t.onlyRenderVisibleElements?t.edges.filter(v=>{const w=i.value(v.source),y=i.value(v.target);return a(v,w,y)&&d2({sourcePos:w.computedPosition||{x:0,y:0},targetPos:y.computedPosition||{x:0,y:0},sourceWidth:w.dimensions.width,sourceHeight:w.dimensions.height,targetWidth:y.dimensions.width,targetHeight:y.dimensions.height,width:t.dimensions.width,height:t.dimensions.height,viewport:t.viewport})}):t.edges.filter(v=>a(v))),c=ve(()=>[...l.value,...u.value]),d=ve(()=>t.nodes.filter(v=>v.selected)),h=ve(()=>t.edges.filter(v=>v.selected)),f=ve(()=>[...d.value??[],...h.value??[]]),m=ve(()=>l.value.filter(v=>v.initialized&&v.handleBounds!==void 0));return{getNode:i,getEdge:o,getElements:c,getEdgeTypes:r,getNodeTypes:s,getEdges:u,getNodes:l,getSelectedElements:f,getSelectedNodes:d,getSelectedEdges:h,getNodesInitialized:m}}let pT=class kr{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){return kr.instance||(kr.instance=new kr),kr.instance}set(e,n){return this.flows.set(e,n)}get(e){return this.flows.get(e)}remove(e){return this.flows.delete(e)}create(e,n){const i=A0(n),o=Mt(i),r={};Object.entries(o.hooks).forEach(([h,f])=>{const m=`on${h.charAt(0).toUpperCase()+h.slice(1)}`;r[m]=f.on});const s={};Object.entries(o.hooks).forEach(([h,f])=>{s[h]=f.trigger});const l=ve(()=>o.nodes.map(h=>h.id)),a=ve(()=>o.edges.map(h=>h.id)),u=fT(o,l,a),c=hT(e,s,r,o,u,l,a);c.setState(o);const d={...r,...u,...c,...tb(o),emits:s,id:e,vueFlowVersion:"1.22.3",$destroy:()=>{this.remove(e)}};return this.set(e,d),d}getId(){return`vue-flow-${this.currentId++}`}};function Ze(t){const e=pT.getInstance(),n=yv(),i=t==null?void 0:t.id,o=(n==null?void 0:n.vueFlowId)||i;let r;if(n){const s=oi(kp,null);typeof s<"u"&&s!==null&&(r=s)}if(r||o&&(r=e.get(o)),!r||r&&i&&i!==r.id){const s=i??e.getId(),l=e.create(s,t);r=l,Ov().run(()=>{Me(l.applyDefault,a=>{const u=d=>{l.applyNodeChanges(d)},c=d=>{l.applyEdgeChanges(d)};a?(l.onNodesChange(u),l.onEdgesChange(c)):(l.hooks.value.nodesChange.off(u),l.hooks.value.edgesChange.off(c))},{immediate:!0}),ks(()=>{if(r){const a=e.get(r.id);a?a.$destroy():x0(`No store instance found for id ${r.id} in storage.`)}})})}else t&&r.setState(t);return n&&(ro(kp,r),n.vueFlowId=r.id),r}function mT(){return{doubleClick:me(),click:me(),mouseEnter:me(),mouseMove:me(),mouseLeave:me(),contextMenu:me(),updateStart:me(),update:me(),updateEnd:me()}}function gT(t,e){const n=mT();return n.doubleClick.on(i=>{var o,r;e.edgeDoubleClick(i),(r=(o=t.events)==null?void 0:o.doubleClick)==null||r.call(o,i)}),n.click.on(i=>{var o,r;e.edgeClick(i),(r=(o=t.events)==null?void 0:o.click)==null||r.call(o,i)}),n.mouseEnter.on(i=>{var o,r;e.edgeMouseEnter(i),(r=(o=t.events)==null?void 0:o.mouseEnter)==null||r.call(o,i)}),n.mouseMove.on(i=>{var o,r;e.edgeMouseMove(i),(r=(o=t.events)==null?void 0:o.mouseMove)==null||r.call(o,i)}),n.mouseLeave.on(i=>{var o,r;e.edgeMouseLeave(i),(r=(o=t.events)==null?void 0:o.mouseLeave)==null||r.call(o,i)}),n.contextMenu.on(i=>{var o,r;e.edgeContextMenu(i),(r=(o=t.events)==null?void 0:o.contextMenu)==null||r.call(o,i)}),n.updateStart.on(i=>{var o,r;e.edgeUpdateStart(i),(r=(o=t.events)==null?void 0:o.updateStart)==null||r.call(o,i)}),n.update.on(i=>{var o,r;e.edgeUpdate(i),(r=(o=t.events)==null?void 0:o.update)==null||r.call(o,i)}),n.updateEnd.on(i=>{var o,r;e.edgeUpdateEnd(i),(r=(o=t.events)==null?void 0:o.updateEnd)==null||r.call(o,i)}),Object.entries(n).reduce((i,[o,r])=>(i.emit[o]=r.trigger,i.on[o]=r.on,i),{emit:{},on:{}})}function D0(){const{viewport:t,snapGrid:e,snapToGrid:n}=Ze();return({sourceEvent:i})=>{const o=i.touches?i.touches[0].clientX:i.clientX,r=i.touches?i.touches[0].clientY:i.clientY,s={x:(o-t.value.x)/t.value.zoom,y:(r-t.value.y)/t.value.zoom};return{xSnapped:n.value?e.value[0]*Math.round(s.x/e.value[0]):s.x,ySnapped:n.value?e.value[1]*Math.round(s.y/e.value[1]):s.y,...s}}}function Zs(){return!0}function q0({handleId:t,nodeId:e,type:n,isValidConnection:i,edgeUpdaterType:o,onEdgeUpdate:r,onEdgeUpdateEnd:s}){const{vueFlowRef:l,connectionMode:a,connectionRadius:u,connectOnClick:c,connectionClickStartHandle:d,nodesConnectable:h,autoPanOnConnect:f,findNode:m,panBy:v,getNodes:w,startConnection:y,updateConnection:_,endConnection:T,emits:b,viewport:k,edges:x,isValidConnection:$}=Ze();let W=null,Q=!1,D=null;function z(L){var S;const A=De(n)==="target",P=qh(L),M=fp(L.target);if(P&&L.button===0||!P){let V=function(re){q=to(re,_e);const{handle:U,validHandleResult:Y}=f2(re,M,m0(q,k.value,!1,[1,1]),u.value,ie,ue=>bp(re,ue,a.value,De(e),De(t),A?"target":"source",ne,M,x.value,m));if(j=U,I||(ee(),I=!0),W=Y.connection,Q=Y.isValid,D=Y.handleDomNode,_(j&&Q?i2({x:j.x,y:j.y},k.value):q,Y.endHandle,m2(!!j,Q)),!j&&!Q&&!D)return Hu(Qe);W&&W.source!==W.target&&D&&(Hu(Qe),Qe=D,D.classList.add("connecting","vue-flow__handle-connecting"),D.classList.toggle("valid",Q),D.classList.toggle("vue-flow__handle-valid",Q))},R=function(re){(j||D)&&W&&Q&&(r?r(re,W):b.connect(W)),b.connectEnd(re),o&&(s==null||s(re)),Hu(Qe),cancelAnimationFrame(ae),T(re),I=!1,Q=!1,W=null,D=null,M.removeEventListener("mousemove",V),M.removeEventListener("mouseup",R),M.removeEventListener("touchmove",V),M.removeEventListener("touchend",R)};const N=m(De(e));let ne=De(i)||$.value||Zs;!ne&&N&&(ne=(A?N.isValidSourcePos:N.isValidTargetPos)||Zs);let j,ae=0;const{x:X,y:G}=to(L),F=M==null?void 0:M.elementFromPoint(X,G),se=Rh(De(o),F),_e=(S=l.value)==null?void 0:S.getBoundingClientRect();if(!_e||!se)return;let Qe,q=to(L,_e),I=!1;const ie=p2({nodes:w.value,nodeId:De(e),handleId:De(t),handleType:se}),ee=()=>{if(!f)return;const[re,U]=w0(q,_e);v({x:re,y:U}),ae=requestAnimationFrame(ee)};y({nodeId:De(e),handleId:De(t),type:se},{x:X-_e.left,y:G-_e.top},L),b.connectStart({event:L,nodeId:De(e),handleId:De(t),handleType:se}),M.addEventListener("mousemove",V),M.addEventListener("mouseup",R),M.addEventListener("touchmove",V),M.addEventListener("touchend",R)}}function H(L){if(!c.value)return;const S=De(n)==="target";if(!d.value)b.clickConnectStart({event:L,nodeId:De(e),handleId:De(t)}),y({nodeId:De(e),type:De(n),handleId:De(t)},void 0,L,!0);else{let A=De(i)||$.value||Zs;const P=m(De(e));if(!A&&P&&(A=(S?P.isValidSourcePos:P.isValidTargetPos)||Zs),P&&(typeof P.connectable>"u"?h.value:P.connectable)===!1)return;const M=fp(L.target),{connection:V,isValid:R}=bp(L,{nodeId:De(e),id:De(t),type:De(n)},a.value,d.value.nodeId,d.value.handleId||null,d.value.type,A,M,x.value,m),N=V.source===V.target;R&&!N&&b.connect(V),b.clickConnectEnd(L),T(L,!0)}}return{handlePointerDown:z,handleClick:H}}function Ih(){return typeof window<"u"?window:{chrome:!1}}function id(t){var e,n;const i=((n=(e=t.composedPath)==null?void 0:e.call(t))==null?void 0:n[0])||t.target,o=Zo(i.hasAttribute)?i.hasAttribute("contenteditable"):!1,r=Zo(i.closest)?i.closest(".nokey"):null;return["INPUT","SELECT","TEXTAREA"].includes(i==null?void 0:i.nodeName)||o||!!r}function vT(t){return t.ctrlKey||t.metaKey||t.shiftKey}function Mp(t,e,n,i){const o=e.split("+").map(r=>r.trim().toLowerCase());return o.length===1?t===e:(i?n.delete(t.toLowerCase()):n.add(t.toLowerCase()),o.every((r,s)=>n.has(r)&&Array.from(n.values())[s]===o[s]))}function yT(t,e){return n=>Array.isArray(t)?t.some(i=>Mp(n.key,i,e,n.type==="keyup")):Mp(n.key,t,e,n.type==="keyup")}function Ir(t,e){const n=Ih(),i=oe(De(t)===!0);let o=!1;const r=new Set;return Me(i,()=>{e==null||e(i.value)}),Me(()=>De(t),(l,a)=>{if(n&&typeof n.addEventListener<"u"&&Sh(n,"blur",()=>{i.value=!1}),Fu(a)&&!Fu(l)&&s(),l===null){s();return}if(Fu(l)){i.value=l;return}(Array.isArray(l)||ei(l)&&l.includes("+"))&&(l=yT(l,r)),l&&(Yf(l,u=>{o=vT(u),!(!o&&id(u))&&(u.preventDefault(),i.value=!0)},{eventName:"keydown"}),Yf(l,u=>{if(i.value){if(!o&&id(u))return;s()}},{eventName:"keyup"}))},{immediate:!0}),i;function s(){o=!1,r.clear(),i.value=!1}}function OT(t){const e=t??oi(Qh,""),n=oi(T0,oe(null)),{findNode:i,edges:o,emits:r}=Ze(),s=i(e);return s||r.error(new xt(yt.NODE_NOT_FOUND,e)),{id:e,nodeEl:n,node:s,parentNode:ve(()=>i(s.parentNode)),connectedEdges:ve(()=>Kn([s],o.value))}}function wT(){return{doubleClick:me(),click:me(),mouseEnter:me(),mouseMove:me(),mouseLeave:me(),contextMenu:me(),dragStart:me(),drag:me(),dragStop:me()}}function _T(t,e){const n=wT();return n.doubleClick.on(i=>{var o,r;e.nodeDoubleClick(i),(r=(o=t.events)==null?void 0:o.doubleClick)==null||r.call(o,i)}),n.click.on(i=>{var o,r;e.nodeClick(i),(r=(o=t.events)==null?void 0:o.click)==null||r.call(o,i)}),n.mouseEnter.on(i=>{var o,r;e.nodeMouseEnter(i),(r=(o=t.events)==null?void 0:o.mouseEnter)==null||r.call(o,i)}),n.mouseMove.on(i=>{var o,r;e.nodeMouseMove(i),(r=(o=t.events)==null?void 0:o.mouseMove)==null||r.call(o,i)}),n.mouseLeave.on(i=>{var o,r;e.nodeMouseLeave(i),(r=(o=t.events)==null?void 0:o.mouseLeave)==null||r.call(o,i)}),n.contextMenu.on(i=>{var o,r;e.nodeContextMenu(i),(r=(o=t.events)==null?void 0:o.contextMenu)==null||r.call(o,i)}),n.dragStart.on(i=>{var o,r;e.nodeDragStart(i),(r=(o=t.events)==null?void 0:o.dragStart)==null||r.call(o,i)}),n.drag.on(i=>{var o,r;e.nodeDrag(i),(r=(o=t.events)==null?void 0:o.drag)==null||r.call(o,i)}),n.dragStop.on(i=>{var o,r;e.nodeDragStop(i),(r=(o=t.events)==null?void 0:o.dragStop)==null||r.call(o,i)}),Object.entries(n).reduce((i,[o,r])=>(i.emit[o]=r.trigger,i.on[o]=r.on,i),{emit:{},on:{}})}function R0(){const{getSelectedNodes:t,nodeExtent:e,updateNodePositions:n,findNode:i,snapGrid:o,snapToGrid:r,nodesDraggable:s,emits:l}=Ze();return(a,u=!1)=>{const c=r.value?o.value[0]:5,d=r.value?o.value[1]:5,h=u?4:1,f=a.x*c*h,m=a.y*d*h,v=t.value.filter(w=>w.draggable||s&&typeof w.draggable>"u").map(w=>{const y={x:w.computedPosition.x+f,y:w.computedPosition.y+m},{computedPosition:_}=Dh(w,y,l.error,e.value,w.parentNode?i(w.parentNode):void 0);return{id:w.id,position:_,from:w.position,distance:{x:a.x,y:a.y},dimensions:w.dimensions}});n(v,!0,!1)}}const Gu=.1;function fi(){return Promise.resolve(!1)}const bT={zoomIn:fi,zoomOut:fi,zoomTo:fi,fitView:fi,setCenter:fi,fitBounds:fi,project:t=>t,setViewport:fi,setTransform:fi,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),initialized:!1};function xT(t,e){const n=t,i=st(n,"nodes"),o=st(n,"d3Zoom"),r=st(n,"d3Selection"),s=st(n,"dimensions"),l=st(n,"translateExtent"),a=st(n,"minZoom"),u=st(n,"maxZoom"),c=st(n,"viewport"),d=st(n,"snapToGrid"),h=st(n,"snapGrid"),{getNodes:f}=e,m=oe(!1);$i(()=>!!o.value&&!!r.value&&!!s.value.width&&!!s.value.height).toBe(!0).then(()=>{m.value=!0});function v(y,_){return new Promise(T=>{r.value&&o.value?o.value.scaleBy(Zu(r.value,_,()=>{T(!0)}),y):T(!1)})}function w(y,_,T,b){return new Promise(k=>{const{x,y:$}=h0({x:-y,y:-_},l.value),W=Ho.translate(-x,-$).scale(T);r.value&&o.value?o.value.transform(Zu(r.value,b,()=>{k(!0)}),W):k(!1)})}return ve(()=>m.value?{initialized:!0,zoomIn:y=>v(1.2,y==null?void 0:y.duration),zoomOut:y=>v(1/1.2,y==null?void 0:y.duration),zoomTo:(y,_)=>new Promise(T=>{r.value&&o.value?o.value.scaleTo(Zu(r.value,_==null?void 0:_.duration,()=>{T(!0)}),y):T(!1)}),setViewport:(y,_)=>w(y.x,y.y,y.zoom,_==null?void 0:_.duration),setTransform:(y,_)=>w(y.x,y.y,y.zoom,_==null?void 0:_.duration),getViewport:()=>({x:c.value.x,y:c.value.y,zoom:c.value.zoom}),getTransform:()=>({x:c.value.x,y:c.value.y,zoom:c.value.zoom}),fitView:(y={padding:Gu,includeHiddenNodes:!1,duration:0})=>{const _=(y.includeHiddenNodes?i.value:f.value).filter($=>{var W;const Q=$.initialized&&$.dimensions.width&&$.dimensions.height;let D=!0;return(W=y.nodes)!=null&&W.length&&(D=y.nodes.includes($.id)),Q&&D});if(!_.length)return Promise.resolve(!1);const T=Ah(_),{x:b,y:k,zoom:x}=pp(T,s.value.width,s.value.height,y.minZoom??a.value,y.maxZoom??u.value,y.padding??Gu,y.offset);return w(b,k,x,y==null?void 0:y.duration)},setCenter:(y,_,T)=>{const b=typeof(T==null?void 0:T.zoom)<"u"?T.zoom:u.value,k=s.value.width/2-y*b,x=s.value.height/2-_*b;return w(k,x,b,T==null?void 0:T.duration)},fitBounds:(y,_={padding:Gu})=>{const{x:T,y:b,zoom:k}=pp(y,s.value.width,s.value.height,a.value,u.value,_.padding);return w(T,b,k,_==null?void 0:_.duration)},project:y=>m0(y,c.value,d.value,h.value)}:bT)}function Zu(t,e=0,n){return t.transition().duration(e).on("end",n)}function ST(t,e,n){const i=Ov();return i.run(()=>{const o=()=>{i.run(()=>{let m,v,w=!!(n.nodes.value.length||n.edges.value.length);m=vo([t.modelValue,()=>{var y,_;return(_=(y=t.modelValue)==null?void 0:y.value)==null?void 0:_.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setElements(y),!v&&!w&&y.length?w=!0:v==null||v.resume())}),v=vo([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([y,_])=>{var T;(T=t.modelValue)!=null&&T.value&&Array.isArray(t.modelValue.value)&&(m==null||m.pause(),t.modelValue.value=[...y,..._],Ci(()=>{m==null||m.resume()}))},{immediate:w}),Dl(()=>{m==null||m.stop(),v==null||v.stop()})})},r=()=>{i.run(()=>{let m,v,w=!!n.nodes.value.length;m=vo([t.nodes,()=>{var y,_;return(_=(y=t.nodes)==null?void 0:y.value)==null?void 0:_.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setNodes(y),!v&&!w&&y.length?w=!0:v==null||v.resume())}),v=vo([n.nodes,()=>n.nodes.value.length],([y])=>{var _;(_=t.nodes)!=null&&_.value&&Array.isArray(t.nodes.value)&&(m==null||m.pause(),t.nodes.value=[...y],Ci(()=>{m==null||m.resume()}))},{immediate:w}),Dl(()=>{m==null||m.stop(),v==null||v.stop()})})},s=()=>{i.run(()=>{let m,v,w=!!n.edges.value.length;m=vo([t.edges,()=>{var y,_;return(_=(y=t.edges)==null?void 0:y.value)==null?void 0:_.length}],([y])=>{y&&Array.isArray(y)&&(v==null||v.pause(),n.setEdges(y),!v&&!w&&y.length?w=!0:v==null||v.resume())}),v=vo([n.edges,()=>n.edges.value.length],([y])=>{var _;(_=t.edges)!=null&&_.value&&Array.isArray(t.edges.value)&&(m==null||m.pause(),t.edges.value=[...y],Ci(()=>{m==null||m.resume()}))},{immediate:w}),Dl(()=>{m==null||m.stop(),v==null||v.stop()})})},l=()=>{i.run(()=>{Me(()=>e.maxZoom,()=>{e.maxZoom&&Ge(e.maxZoom)&&n.setMaxZoom(e.maxZoom)})})},a=()=>{i.run(()=>{Me(()=>e.minZoom,()=>{e.minZoom&&Ge(e.minZoom)&&n.setMinZoom(e.minZoom)})})},u=()=>{i.run(()=>{Me(()=>e.translateExtent,()=>{e.translateExtent&&Ge(e.translateExtent)&&n.setTranslateExtent(e.translateExtent)})})},c=()=>{i.run(()=>{Me(()=>e.nodeExtent,()=>{e.nodeExtent&&Ge(e.nodeExtent)&&n.setNodeExtent(e.nodeExtent)})})},d=()=>{i.run(()=>{Me(()=>e.applyDefault,()=>{Ge(e.applyDefault)&&(n.applyDefault.value=e.applyDefault)})})},h=()=>{i.run(()=>{const m=async v=>{let w=v;Zo(e.autoConnect)&&(w=await e.autoConnect(v)),w!==!1&&n.addEdges([w])};Me(()=>e.autoConnect,()=>{Ge(e.autoConnect)&&(n.autoConnect.value=e.autoConnect)}),Me(n.autoConnect,(v,w,y)=>{v?n.onConnect(m):n.hooks.value.connect.off(m),y(()=>{n.hooks.value.connect.off(m)})},{immediate:!0})})},f=()=>{const m=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];Object.keys(e).forEach(v=>{if(!m.includes(v)){const w=Lc(e,v),y=n[v];i.run(()=>{Me(w,_=>{Ge(_)&&(y.value=_)},{flush:"pre"})})}})};o(),r(),s(),a(),l(),u(),c(),d(),h(),f()}),()=>i.stop()}function Ap(t,e){return{x:t.clientX-e.left,y:t.clientY-e.top}}const kT={name:"Pane",compatConfig:{MODE:3}},TT=Le({...kT,props:{isSelecting:{type:Boolean}},setup(t){const{id:e,vueFlowRef:n,getNodes:i,getEdges:o,viewport:r,emits:s,userSelectionActive:l,removeSelectedElements:a,panOnDrag:u,userSelectionRect:c,elementsSelectable:d,nodesSelectionActive:h,addSelectedElements:f,getSelectedEdges:m,getSelectedNodes:v,removeNodes:w,removeEdges:y,selectionMode:_,deleteKeyCode:T,multiSelectionKeyCode:b,multiSelectionActive:k}=Ze(),x=oe(null),$=oe(0),W=oe(0),Q=oe(),D=ve(()=>d.value&&(t.isSelecting||l.value));Ir(T,N=>{if(!N)return;const ne=i.value.reduce((j,ae)=>((!ae.selected&&ae.parentNode&&j.find(X=>X.id===ae.parentNode)||ae.selected)&&j.push(ae),j),[]);(ne||m.value)&&(m.value.length>0&&y(m.value),ne.length>0&&w(ne),h.value=!1,a())}),Ir(b,N=>{k.value=N});function z(){l.value=!1,c.value=null,$.value=0,W.value=0}function H(N){N.target!==x.value||D.value||(s.paneClick(N),a(),h.value=!1)}function L(N){var ne;if(N.target===x.value){if(Array.isArray(u.value)&&(ne=u.value)!=null&&ne.includes(2)){N.preventDefault();return}s.paneContextMenu(N)}}function S(N){N.target===x.value&&s.paneScroll(N)}function A(N){if(Q.value=n.value.getBoundingClientRect(),!D.value||!d||!t.isSelecting||N.button!==0||N.target!==x.value||!Q.value)return;const{x:ne,y:j}=Ap(N,Q.value);a(),c.value={width:0,height:0,startX:ne,startY:j,x:ne,y:j},l.value=!0,s.selectionStart(N)}function P(N){if(!D.value)return s.paneMouseMove(N);if(!t.isSelecting||!Q.value||!c.value)return;l.value||(l.value=!0),h.value&&(h.value=!1);const ne=Ap(N,Q.value),j=c.value.startX??0,ae=c.value.startY??0,X={...c.value,x:ne.x0,z(),s.selectionEnd(N))}function V(N){var ne;if(!D.value)return s.paneMouseLeave(N);l.value&&(h.value=$.value>0,(ne=s.selectionEnd)==null||ne.call(s,N)),z()}function R(N){D.value||s.paneMouseEnter(N)}return(N,ne)=>(E(),le("div",{ref_key:"container",ref:x,key:`pane-${O(e)}`,class:en(["vue-flow__pane vue-flow__container",{selection:t.isSelecting}]),onClick:H,onContextmenu:L,onWheelPassive:S,onMouseenter:R,onMousedown:A,onMousemove:P,onMouseup:M,onMouseleave:V},[Ve(N.$slots,"default"),O(l)&&O(c)?(E(),K(aT,{key:0,"user-selection-rect":O(c)},null,8,["user-selection-rect"])):ye("",!0),O(h)&&O(v).length?(E(),K(sT,{key:1})):ye("",!0)],34))}}),PT={class:"vue-flow__nodes vue-flow__container"},CT={name:"Nodes",compatConfig:{MODE:3}},$T=Le({...CT,setup(t){const e=oi(Ou),{nodesDraggable:n,nodesFocusable:i,elementsSelectable:o,nodesConnectable:r,getNodes:s,getNodesInitialized:l,getNodeTypes:a,updateNodeDimensions:u,emits:c}=Ze(),d=oe(),h=fo();$i(()=>s.value.length>0&&l.value.length===s.value.length).toBe(!0).then(()=>{Ci(()=>{c.nodesInitialized(l.value)})}),Vn(()=>{d.value=new ResizeObserver(_=>{const T=_.map(b=>({id:b.target.getAttribute("data-id"),nodeElement:b.target,forceUpdate:!0}));u(T)})}),fh(()=>{var _;return(_=d.value)==null?void 0:_.disconnect()});function f(_){return typeof _>"u"?n.value:_}function m(_){return typeof _>"u"?o.value:_}function v(_){return typeof _>"u"?r.value:_}function w(_){return typeof _>"u"?i.value:_}function y(_,T){const b=_||"default",k=e==null?void 0:e[`node-${b}`];if(k)return k;let x=T??a.value[b];if(typeof x=="string"&&h){const $=Object.keys(h.appContext.components);$&&$.includes(b)&&(x=C(b,!1))}return x&&typeof x!="string"?x:(c.error(new xt(yt.NODE_TYPE_MISSING,x)),!1)}return(_,T)=>(E(),le("div",PT,[d.value?(E(!0),le(Te,{key:0},Je(O(s),b=>(E(),K(O($2),{id:b.id,key:b.id,"resize-observer":d.value,type:y(b.type,b.template),name:b.type||"default",draggable:f(b.draggable),selectable:m(b.selectable),connectable:v(b.connectable),focusable:w(b.focusable),node:b},null,8,["id","resize-observer","type","name","draggable","selectable","connectable","focusable","node"]))),128)):ye("",!0)]))}}),ET=["id","markerWidth","markerHeight","markerUnits","orient"],MT=["stroke","stroke-width","fill"],AT=["stroke","stroke-width"],DT={name:"MarkerType",compatConfig:{MODE:3}},qT=Le({...DT,props:{id:null,type:null,color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(t){return(e,n)=>(E(),le("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===O(Kc).ArrowClosed?(E(),le("polyline",{key:0,stroke:t.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":t.strokeWidth,fill:t.color,points:"-5,-4 0,0 -5,4 -5,-4"},null,8,MT)):ye("",!0),t.type===O(Kc).Arrow?(E(),le("polyline",{key:1,stroke:t.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":t.strokeWidth,fill:"none",points:"-5,-4 0,0 -5,4"},null,8,AT)):ye("",!0)],8,ET))}}),RT={name:"MarkerDefinitions",compatConfig:{MODE:3}},QT=Le({...RT,setup(t){const e=Ze(),n=st(e,"id"),i=st(e,"edges"),o=st(e,"connectionLineOptions"),r=st(e,"defaultMarkerColor"),s=ve(()=>{const l=[],a=[],u=c=>{if(c){const d=Fi(c,n.value);l.includes(d)||(typeof c=="object"?a.push({...c,id:d,color:c.color||r.value}):a.push({id:d,color:r.value,type:c}),l.push(d))}};return[o.value.markerEnd,o.value.markerStart].forEach(u),i.value.reduce((c,d)=>([d.markerStart,d.markerEnd].forEach(u),c.sort((h,f)=>h.id.localeCompare(f.id))),a),a});return(l,a)=>(E(),le("defs",null,[(E(!0),le(Te,null,Je(O(s),u=>(E(),K(qT,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))]))}}),NT={class:"vue-flow__edges vue-flow__container"},IT={name:"Edges",compatConfig:{MODE:3}},VT=Le({...IT,setup(t){const e=oi(Ou),{edgesUpdatable:n,edgesFocusable:i,elementsSelectable:o,findNode:r,getEdges:s,getEdgeTypes:l,elevateEdgesOnSelect:a,dimensions:u,emits:c}=Ze(),d=fo();function h(w){return typeof w>"u"?o.value:w}function f(w){return typeof w>"u"?n.value:w}function m(w){return typeof w>"u"?i.value:w}function v(w,y){const _=w||"default",T=e==null?void 0:e[`edge-${_}`];if(T)return T;let b=y??l.value[_];if(typeof b=="string"&&d){const k=Object.keys(d.appContext.components);k&&k.includes(_)&&(b=C(_,!1))}return b&&typeof b!="string"?b:(c.error(new xt(yt.EDGE_TYPE_MISSING,b)),!1)}return(w,y)=>O(u).width&&O(u).height?(E(),le(Te,{key:0},[(E(),le("svg",NT,[p(QT)])),(E(!0),le(Te,null,Je(O(s),_=>(E(),le("svg",{key:_.id,class:"vue-flow__edges vue-flow__container",style:mt({zIndex:O(h2)(_,O(r),O(a))})},[p(O(eT),{id:_.id,edge:_,type:v(_.type,_.template),name:_.type||"default",selectable:h(_.selectable),updatable:f(_.updatable),focusable:m(_.focusable)},null,8,["id","edge","type","name","selectable","updatable","focusable"])],4))),128)),p(O(iT))],64)):ye("",!0)}}),BT=Re("div",{class:"vue-flow__edge-labels"},null,-1),WT={name:"Transform",compatConfig:{MODE:3}},LT=Le({...WT,setup(t){const{id:e,viewport:n,d3Zoom:i,d3Selection:o,dimensions:r}=Ze(),s=oe(!$v);return $i(()=>i.value&&o.value&&r.value.width>0&&r.value.height>0).toBe(!0).then(()=>{setTimeout(()=>{s.value=!0},1)}),(l,a)=>(E(),le("div",{key:`transform-${O(e)}`,class:"vue-flow__transformationpane vue-flow__container",style:mt({transform:`translate(${O(n).x}px,${O(n).y}px) scale(${O(n).zoom})`,opacity:s.value?void 0:0})},[p(VT),BT,p($T),Ve(l.$slots,"default")],4))}}),zT={name:"Viewport",compatConfig:{MODE:3}},XT=Le({...zT,setup(t){const{id:e,minZoom:n,maxZoom:i,defaultViewport:o,translateExtent:r,dimensions:s,zoomActivationKeyCode:l,selectionKeyCode:a,panActivationKeyCode:u,panOnScroll:c,panOnScrollMode:d,panOnScrollSpeed:h,panOnDrag:f,zoomOnDoubleClick:m,zoomOnPinch:v,zoomOnScroll:w,preventScrolling:y,noWheelClassName:_,noPanClassName:T,emits:b,connectionStartHandle:k,userSelectionActive:x,paneDragging:$,d3Zoom:W,d3Selection:Q,d3ZoomHandler:D,viewport:z,viewportRef:H}=Ze(),L=oe(),S=oe(!1),A=oe(!1),P=oe(!1),M=oe();let V=!1,R=0,N={x:0,y:0,zoom:0};const ne=Ir(u),j=ve(()=>!S.value&&f.value&&ne.value),ae=ve(()=>a.value!==!0&&S.value||a.value===!0&&!j.value);Vn(()=>{Ob(L,_e);const q=Ih();Sh(q,"resize",_e)}),Vn(()=>{const q=L.value,I=q.getBoundingClientRect(),ie=Zk().scaleExtent([n.value,i.value]).translateExtent(r.value),ee=pn(q).call(ie),re=ee.on("wheel.zoom"),U=Ho.translate(o.value.x??0,o.value.y??0).scale(si(o.value.zoom??1,n.value,i.value)),Y=[[0,0],[I.width,I.height]],ue=ie.constrain()(U,Y,r.value);ie.transform(ee,ue),ie.wheelDelta(G),W.value=ie,Q.value=ee,D.value=re,z.value={x:ue.x,y:ue.y,zoom:ue.k},H.value=q,Ir(a,te=>{S.value=te});const he=Ir(l);sa(()=>{S.value&&x.value&&!A.value?ie.on("zoom",null):!S.value&&!x.value&&ie.on("zoom",te=>{z.value={x:te.transform.x,y:te.transform.y,zoom:te.transform.k};const $e=se(te.transform);V=X(f.value,R??0),b.viewportChange($e),b.move({event:te,flowTransform:$e})})}),ie.on("start",te=>{var $e;if(!te.sourceEvent)return null;R=te.sourceEvent.button,A.value=!0;const ot=se(te.transform);(($e=te.sourceEvent)==null?void 0:$e.type)==="mousedown"&&($.value=!0),N=ot,b.viewportChangeStart(ot),b.moveStart({event:te,flowTransform:ot})}),ie.on("end",te=>{if(!te.sourceEvent)return null;if(A.value=!1,$.value=!1,X(f.value,R??0)&&!V&&b.paneContextMenu(te.sourceEvent),V=!1,F(N,te.transform)){const $e=se(te.transform);N=$e,b.viewportChangeEnd($e),b.moveEnd({event:te,flowTransform:$e})}}),sa(()=>{c.value&&!he.value&&!x.value?ee.on("wheel.zoom",te=>{if(Qe(te,_.value))return!1;te.preventDefault(),te.stopImmediatePropagation();const $e=ee.property("__zoom").k||1,ot=Oa();if(te.ctrlKey&&v&&ot){const hr=Pn(te),Vi=G(te),fr=$e*2**Vi;ie.scaleTo(ee,fr,hr,te);return}const vt=te.deltaMode===1?20:1;let bn=d.value===Qr.Vertical?0:te.deltaX*vt,on=d.value===Qr.Horizontal?0:te.deltaY*vt;!ot&&te.shiftKey&&d.value!==Qr.Vertical&&!bn&&on&&(bn=on,on=0),ie.translateBy(ee,-(bn/$e)*h.value,-(on/$e)*h.value);const Pt=se(ee.property("__zoom"));clearTimeout(M.value),P.value||(P.value=!0,b.moveStart({event:te,flowTransform:Pt}),b.viewportChangeStart(Pt)),P.value&&(b.move({event:te,flowTransform:Pt}),b.viewportChange(Pt),M.value=setTimeout(()=>{b.moveEnd({event:te,flowTransform:Pt}),b.viewportChangeEnd(Pt),P.value=!1},150))},{passive:!1}):typeof re<"u"&&ee.on("wheel.zoom",function(te,$e){if(!y.value||Qe(te,_.value))return null;te.preventDefault(),re.call(this,te,$e)},{passive:!1})}),ie.filter(te=>{var $e,ot;const vt=he.value||w.value,bn=v.value&&te.ctrlKey;if(te.button===1&&te.type==="mousedown"&&(($e=te.target)!=null&&$e.closest(".vue-flow__node")||(ot=te.target)!=null&&ot.closest(".vue-flow__edge")))return!0;if(!f.value&&!vt&&!c.value&&!m.value&&!v.value||x.value||!m.value&&te.type==="dblclick"||Qe(te,_.value)&&te.type==="wheel"||Qe(te,T.value)&&te.type!=="wheel"||!v.value&&te.ctrlKey&&te.type==="wheel"||!vt&&!c.value&&!bn&&te.type==="wheel"||!f.value&&(te.type==="mousedown"||te.type==="touchstart")||Array.isArray(f.value)&&!f.value.includes(te.button)&&(te.type==="mousedown"||te.type==="touchstart"))return!1;const on=Array.isArray(f.value)&&f.value.includes(te.button)||!te.button||te.button<=1;return(!te.ctrlKey||te.type==="wheel")&&on})});function X(q,I){return I===2&&Array.isArray(q)&&q.includes(2)}function G(q){const I=q.ctrlKey&&Oa()?10:1;return-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*I}function F(q,I){return q.x!==I.x&&!isNaN(I.x)||q.y!==I.y&&!isNaN(I.y)||q.zoom!==I.k&&!isNaN(I.k)}function se(q){return{x:q.x,y:q.y,zoom:q.k}}function _e(){if(!L.value)return;const{width:q,height:I}=mu(L.value);(q===0||I===0)&&b.error(new xt(yt.MISSING_VIEWPORT_DIMENSIONS)),s.value.width=q||500,s.value.height=I||500}function Qe(q,I){return q.target.closest(`.${I}`)}return(q,I)=>(E(),le(Te,null,[(E(),le("div",{ref_key:"viewportEl",ref:L,key:`viewport-${O(e)}`,class:"vue-flow__viewport vue-flow__container"},[p(TT,{"is-selecting":O(ae),class:en({connecting:!!O(k),dragging:O($),draggable:!!O(f)})},{default:g(()=>[p(LT,null,{default:g(()=>[Ve(q.$slots,"zoom-pane")]),_:3})]),_:3},8,["is-selecting","class"])])),Ve(q.$slots,"default")],64))}}),UT=["id"],YT=["id"],jT=["id"],FT={name:"A11yDescriptions",compatConfig:{MODE:3}},HT=Le({...FT,setup(t){const{id:e,disableKeyboardA11y:n,ariaLiveMessage:i}=Ze(),o={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"};return(r,s)=>(E(),le(Te,null,[Re("div",{id:`${O(u0)}-${O(e)}`,style:{display:"none"}}," Press enter or space to select a node. "+de(O(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,UT),Re("div",{id:`${O(c0)}-${O(e)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,YT),O(n)?ye("",!0):(E(),le("div",{key:0,id:`${O(Kk)}-${O(e)}`,"aria-live":"assertive","aria-atomic":"true",style:o},de(O(i)),9,jT))],64))}}),GT={name:"VueFlow",compatConfig:{MODE:3}},ZT=Le({...GT,props:{id:null,modelValue:null,nodes:null,edges:null,edgeTypes:null,nodeTypes:null,connectionMode:null,connectionLineType:null,connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:null,isValidConnection:{type:Function,default:void 0},deleteKeyCode:{type:[Boolean,String,Function],default:void 0},selectionKeyCode:{type:[Boolean,String,Function],default:void 0},multiSelectionKeyCode:{type:[Boolean,String,Function],default:void 0},zoomActivationKeyCode:{type:[Boolean,String,Function],default:void 0},panActivationKeyCode:{type:[Boolean,String,Function],default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:null,onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:Boolean,default:void 0},minZoom:null,maxZoom:null,defaultViewport:null,translateExtent:null,nodeExtent:null,defaultMarkerColor:null,zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:null,panOnScrollMode:null,zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:null,edgeUpdaterRadius:null,fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:null,noWheelClassName:null,noPanClassName:null,defaultEdgeOptions:null,elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},__experimentalFeatures:null},emits:["nodesChange","edgesChange","nodeDoubleClick","nodeClick","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeContextMenu","nodeDragStart","nodeDrag","nodeDragStop","nodesInitialized","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneReady","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdate","edgeUpdateEnd","updateNodeInternals","error","update:modelValue","update:nodes","update:edges"],setup(t,{expose:e,emit:n}){const i=t,o=Rr(i,"modelValue",n),r=Rr(i,"nodes",n),s=Rr(i,"edges",n),{vueFlowRef:l,hooks:a,getNodeTypes:u,getEdgeTypes:c,...d}=Ze(i),h=ST({modelValue:o,nodes:r,edges:s},i,{vueFlowRef:l,hooks:a,getNodeTypes:u,getEdgeTypes:c,...d});w2(n,a);const f=oe();return ro(Ou,bv()),xv(()=>{h()}),Vn(()=>{l.value=f.value}),e({vueFlowRef:l,hooks:a,getNodeTypes:u,getEdgeTypes:c,...d}),(m,v)=>(E(),le("div",{ref_key:"el",ref:f,class:"vue-flow"},[p(XT,null,{nodes:g(()=>[(E(!0),le(Te,null,Je(Object.keys(O(u)),w=>Ve(m.$slots,`node-${w}`)),256))]),edges:g(()=>[(E(!0),le(Te,null,Je(Object.keys(O(c)),w=>Ve(m.$slots,`edge-${w}`)),256))]),"connection-name":g(()=>[Ve(m.$slots,"connection-line")]),"zoom-pane":g(()=>[Ve(m.$slots,"zoom-pane")]),default:g(()=>[Ve(m.$slots,"default")]),_:3}),p(HT)],512))}}),KT={name:"Panel",compatConfig:{MODE:3}},Q0=Le({...KT,props:{position:null},setup(t){const e=t,{userSelectionActive:n}=Ze(),i=ve(()=>`${e.position}`.split("-"));return(o,r)=>(E(),le("div",{class:en(["vue-flow__panel",O(i)]),style:mt({pointerEvents:O(n)?"none":"all"})},[Ve(o.$slots,"default")],6))}});var od="http://www.w3.org/1999/xhtml";const Dp={svg:"http://www.w3.org/2000/svg",xhtml:od,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function N0(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Dp.hasOwnProperty(e)?{space:Dp[e],local:t}:t}function JT(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===od&&e.documentElement.namespaceURI===od?e.createElement(t):e.createElementNS(n,t)}}function eP(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function I0(t){var e=N0(t);return(e.local?eP:JT)(e)}function tP(){}function V0(t){return t==null?tP:function(){return this.querySelector(t)}}function nP(t){typeof t!="function"&&(t=V0(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=T&&(T=_+1);!(k=w[T])&&++T=0;)(s=i[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function $P(t){t||(t=EP);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,i=n.length,o=new Array(i),r=0;re?1:t>=e?0:NaN}function MP(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function AP(){return Array.from(this)}function DP(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?XP:typeof e=="function"?YP:UP)(t,e,n??"")):FP(this.node(),t)}function FP(t,e){return t.style.getPropertyValue(e)||L0(t).getComputedStyle(t,null).getPropertyValue(e)}function HP(t){return function(){delete this[t]}}function GP(t,e){return function(){this[t]=e}}function ZP(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function KP(t,e){return arguments.length>1?this.each((e==null?HP:typeof e=="function"?ZP:GP)(t,e)):this.node()[t]}function z0(t){return t.trim().split(/^|\s+/)}function Vh(t){return t.classList||new X0(t)}function X0(t){this._node=t,this._names=z0(t.getAttribute("class")||"")}X0.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function U0(t,e){for(var n=Vh(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function TC(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,r;n{}};function F0(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Vl.prototype=F0.prototype={constructor:Vl,on:function(t,e){var n=this._,i=NC(t+"",n),o,r=-1,s=i.length;if(arguments.length<2){for(;++r0)for(var n=new Array(o),i=0,o,r;i()=>t;function rd(t,{sourceEvent:e,subject:n,target:i,identifier:o,active:r,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}rd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function LC(t){return!t.ctrlKey&&!t.button}function zC(){return this.parentNode}function XC(t,e){return e??{x:t.x,y:t.y}}function UC(){return navigator.maxTouchPoints||"ontouchstart"in this}function YC(){var t=LC,e=zC,n=XC,i=UC,o={},r=F0("start","drag","end"),s=0,l,a,u,c,d=0;function h(b){b.on("mousedown.drag",f).filter(i).on("touchstart.drag",w).on("touchmove.drag",y,VC).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(b,k){if(!(c||!t.call(this,b,k))){var x=T(this,e.call(this,b,k),b,k,"mouse");x&&(Jr(b.view).on("mousemove.drag",m,es).on("mouseup.drag",v,es),BC(b.view),Ku(b),u=!1,l=b.clientX,a=b.clientY,x("start",b))}}function m(b){if(Io(b),!u){var k=b.clientX-l,x=b.clientY-a;u=k*k+x*x>d}o.mouse("drag",b)}function v(b){Jr(b.view).on("mousemove.drag mouseup.drag",null),WC(b.view,u),Io(b),o.mouse("end",b)}function w(b,k){if(t.call(this,b,k)){var x=b.changedTouches,$=e.call(this,b,k),W=x.length,Q,D;for(Q=0;Q(t.Line="line",t.Handle="handle",t))(_a||{});function jC({width:t,prevWidth:e,height:n,prevHeight:i,invertX:o,invertY:r}){const s=t-e,l=n-i,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&r&&(a[1]=a[1]*-1),a}const FC={name:"ResizeControl",compatConfig:{MODE:3}},Qp=Le({...FC,props:{nodeId:null,color:null,minWidth:{default:10},minHeight:{default:10},maxWidth:{default:Number.MAX_VALUE},maxHeight:{default:Number.MAX_VALUE},position:null,variant:{default:"handle"},shouldResize:{type:Function},keepAspectRatio:{type:[Boolean,Number],default:!1}},emits:["resizeStart","resize","resizeEnd"],setup(t,{emit:e}){const n=t,i={width:0,height:0,x:0,y:0},o={...i,pointerX:0,pointerY:0,aspectRatio:1},{findNode:r,emits:s}=Ze(),l=D0(),a=oe();let u=o,c=i;const d=ve(()=>n.variant===_a.Line?"right":"bottom-right"),h=ve(()=>n.position??d.value);sa(w=>{if(!a.value||!n.nodeId)return;const y=Jr(a.value),_=h.value.includes("right")||h.value.includes("left"),T=h.value.includes("bottom")||h.value.includes("top"),b=h.value.includes("left"),k=h.value.includes("top"),x=YC().on("start",$=>{const W=r(n.nodeId),{xSnapped:Q,ySnapped:D}=l($);c={width:(W==null?void 0:W.dimensions.width)??0,height:(W==null?void 0:W.dimensions.height)??0,x:(W==null?void 0:W.position.x)??0,y:(W==null?void 0:W.position.y)??0},u={...c,pointerX:Q,pointerY:D,aspectRatio:c.width/c.height},e("resizeStart",{event:$,params:c})}).on("drag",$=>{var W;const{xSnapped:Q,ySnapped:D}=l($),z=r(n.nodeId);if(z){const H=[],{pointerX:L,pointerY:S,width:A,height:P,x:M,y:V,aspectRatio:R}=u,{x:N,y:ne,width:j,height:ae}=c,X=Math.floor(_?Q-L:0),G=Math.floor(T?D-S:0);let F=si(A+(b?-X:X),n.minWidth,n.maxWidth),se=si(P+(k?-G:G),n.minHeight,n.maxHeight);if(n.keepAspectRatio){const ie=F/se;let ee=R;typeof n.keepAspectRatio=="number"&&ie!==n.keepAspectRatio&&(ee=n.keepAspectRatio);const re=_&&T,U=_&&!T,Y=T&&!_;F=ie<=ee&&re||Y?se*ee:F,se=ie>ee&&re||U?F/ee:se,F>=n.maxWidth?(F=n.maxWidth,se=n.maxWidth/ee):F<=n.minWidth&&(F=n.minWidth,se=n.minWidth/ee),se>=n.maxHeight?(se=n.maxHeight,F=n.maxHeight*ee):se<=n.minHeight&&(se=n.minHeight,F=n.minHeight*ee)}const _e=F!==j,Qe=se!==ae;if(b||k){const ie=b?M-(F-A):M,ee=k?V-(se-P):V,re=ie!==N&&_e,U=ee!==ne&&Qe;if(re||U){const Y={id:z.id,type:"position",from:z.position,position:{x:re?ie:N,y:U?ee:ne}};H.push(Y),c.x=Y.position.x,c.y=Y.position.y}}if(n.nodeId&&(_e||Qe)){const ie={id:n.nodeId,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:F,height:se}};H.push(ie),c.width=F,c.height=se}if(H.length===0)return;const q=jC({width:c.width,prevWidth:j,height:c.height,prevHeight:ae,invertX:b,invertY:k}),I={...c,direction:q};if(((W=n.shouldResize)==null?void 0:W.call(n,$,I))===!1)return;e("resize",{event:$,params:I}),s.nodesChange(H)}}).on("end",$=>{if(n.nodeId){const W={id:n.nodeId,type:"dimensions",resizing:!1};e("resizeEnd",{event:$,params:c}),s.nodesChange([W])}});y.call(x),w(()=>{y.on(".drag",null)})});const f=ve(()=>h.value.split("-")),m=ve(()=>n.variant===_a.Line?"borderColor":"backgroundColor"),v=ve(()=>n.color?{[m.value]:n.color}:{});return(w,y)=>(E(),le("div",{ref_key:"resizeControlRef",ref:a,class:en(["vue-flow__resize-control nodrag",[...O(f),t.variant]]),style:mt(O(v))},[Ve(w.$slots,"default")],6))}}),HC={name:"NodeResizer",compatConfig:{MODE:3},inheritAttrs:!1},GC=Le({...HC,props:{nodeId:null,color:null,handleClassName:null,handleStyle:null,lineClassName:null,lineStyle:null,isVisible:{type:Boolean,default:!0},minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,shouldResize:{type:Function},keepAspectRatio:{type:[Boolean,Number]}},emits:["resizeStart","resize","resizeEnd"],setup(t,{emit:e}){const n=t,{findNode:i,emits:o}=Ze(),r=["top-left","top-right","bottom-left","bottom-right"],s=["top","right","bottom","left"],l=oi(Qh,null),a=ve(()=>typeof n.nodeId=="string"?n.nodeId:l);return Me([()=>n.minWidth,()=>n.minHeight,()=>n.maxWidth,()=>n.maxHeight],([u,c,d,h])=>{const f=i(a.value);if(f){const m={id:f.id,type:"dimensions",updateStyle:!0,dimensions:{width:f.dimensions.width,height:f.dimensions.height}};u&&f.dimensions.widthd&&(m.dimensions.width=d),h&&f.dimensions.height>h&&(m.dimensions.height=h),(m.dimensions.width!==f.dimensions.width||m.dimensions.height!==f.dimensions.height)&&o.nodesChange([m])}},{flush:"post",immediate:!0}),(u,c)=>t.isVisible?(E(),le(Te,{key:0},[(E(),le(Te,null,Je(s,d=>p(Qp,{key:d,class:en(t.lineClassName),style:mt(t.lineStyle),"node-id":t.nodeId,position:d,variant:O(_a).Line,"keep-aspect-ratio":t.keepAspectRatio,color:t.color,"min-width":t.minWidth,"min-height":t.minHeight,"max-width":t.maxWidth,"max-height":t.maxHeight,"should-resize":t.shouldResize,onResizeStart:c[0]||(c[0]=h=>e("resizeStart",h)),onResize:c[1]||(c[1]=h=>e("resize",h)),onResizeEnd:c[2]||(c[2]=h=>e("resizeEnd",h))},null,8,["class","style","node-id","position","variant","keep-aspect-ratio","color","min-width","min-height","max-width","max-height","should-resize"])),64)),(E(),le(Te,null,Je(r,d=>p(Qp,{key:d,class:en(t.handleClassName),style:mt(t.handleStyle),"node-id":O(a),position:d,color:t.color,"min-width":t.minWidth,"min-height":t.minHeight,"max-width":t.maxWidth,"max-height":t.maxHeight,"should-resize":t.shouldResize,"keep-aspect-ratio":t.keepAspectRatio,onResizeStart:c[3]||(c[3]=h=>e("resizeStart",h)),onResize:c[4]||(c[4]=h=>e("resize",h)),onResizeEnd:c[5]||(c[5]=h=>e("resizeEnd",h))},null,8,["class","style","node-id","position","color","min-width","min-height","max-width","max-height","should-resize","keep-aspect-ratio"])),64))],64)):ye("",!0)}});const ZC={class:"comment-node"},KC={style:{width:"100%"}},JC={class:"title-container"},e$={__name:"CommentNode",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",has_inputs:!1,template:{comment:{required:!1,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"comment",display_name:"comment",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,n=bh(),i=(r,s)=>{n.push({action:r,data:s,nodeId:e.id})},o=oe(e.data.template);return(r,s)=>{const l=C("a-typography-title"),a=C("a-typography-link");return E(),le("div",ZC,[p(O(GC),{"min-width":"100","min-height":"30"}),Re("div",KC,[Re("div",JC,[p(l,{level:5,editable:"",content:o.value.comment.value,"onUpdate:content":s[0]||(s[0]=u=>o.value.comment.value=u),class:"comment-text"},null,8,["content"]),p(a,{onClick:s[1]||(s[1]=u=>i("delete")),class:"delete-button"},{default:g(()=>[p(O(Cv))]),_:1})])])])}}},t$=lr(e$,[["__scopeId","data-v-05111a7d"]]),n$=Object.freeze(Object.defineProperty({__proto__:null,default:t$},Symbol.toStringTag,{value:"Module"}));const i$={class:"node"},o$={style:{width:"100%"}},r$={class:"title-container"},s$={class:"description-container"},l$={class:"main-container"},a$={class:"output-container"},ze={__name:"BaseNode",props:{nodeId:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!1},documentLink:{type:String,required:!1,default:""}},setup(t){const e=t,n=bh(),i=(r,s)=>{n.push({action:r,data:s,nodeId:e.nodeId})},{t:o}=Ee();return(r,s)=>{const l=C("a-typography-title"),a=C("a-typography-link"),u=C("a-tooltip"),c=C("a-typography-paragraph");return E(),le("div",i$,[Re("div",o$,[Re("div",r$,[p(l,{level:3,style:{"flex-grow":"1"}},{default:g(()=>[pe(de(e.title)+" ",1),e.documentLink.length>0?(E(),K(p_,{key:0,contents:[{type:"link",text:O(o)("components.nodes.baseNode.document_link"),url:e.documentLink}],class:"hint-popover"},null,8,["contents"])):ye("",!0)]),_:1}),p(u,{color:"blue",title:O(o)("components.nodes.baseNode.clone_node")},{default:g(()=>[p(a,{onClick:s[0]||(s[0]=d=>i("clone"))},{default:g(()=>[p(O(W_))]),_:1})]),_:1},8,["title"]),p(u,{color:"red",title:O(o)("components.nodes.baseNode.delete_node")},{default:g(()=>[p(a,{onClick:s[1]||(s[1]=d=>i("delete"))},{default:g(()=>[p(O(Cv))]),_:1})]),_:1},8,["title"])]),Re("div",s$,[p(c,null,{default:g(()=>[pe(de(e.description),1)]),_:1})]),Re("div",l$,[Ve(r.$slots,"main")]),Re("div",a$,[Ve(r.$slots,"output")])])])}}};const u$={class:"template-item-field-text"},c$={key:1,class:"show-in-use-interface-checkbox"},d$={style:{position:"relative"}},h$={class:"template-item-field-content"},f$={__name:"BaseField",props:{id:{type:String,required:!0},name:{type:String,required:!0},required:{type:Boolean,default:!1},type:{type:String,required:!0},nameOnly:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},style:{type:Object,default:()=>({})},show:{type:Boolean,default:!0}},emits:["delete","update:show"],setup(t,{emit:e}){const n=t,{t:i}=Ee(),o=oe(n.show),r=a=>{o.value=a.target.checked,e("update:show",o.value)};Me(()=>n.show,a=>{o.value=a});const s=()=>{e("delete",n.id)},l=a=>({borderColor:a=="target"?"#94d574":"#e8de7f",borderWidth:"2px",backgroundColor:"#fff",width:"10px",height:"10px"});return(a,u)=>{const c=C("a-typography-text"),d=C("a-checkbox"),h=C("a-tooltip"),f=C("a-typography-link");return E(),le("div",{class:en(["template-item-field",n.type=="source"?"template-item-output-field":""]),style:mt(n.style)},[Re("div",u$,[p(c,null,{default:g(()=>[pe(de(n.name),1)]),_:1}),n.required?(E(),K(c,{key:0,type:"danger"},{default:g(()=>[pe(" *")]),_:1})):ye("",!0),Ve(a.$slots,"inline",{},void 0,!0),n.type=="target"?(E(),le("div",c$,[p(h,{title:O(i)("components.nodes.baseField.show_in_use_interface")},{default:g(()=>[p(d,{class:"field-show-checkbox",checked:o.value,onChange:r},{default:g(()=>[p(c,{type:"secondary"},{default:g(()=>[pe(de(O(i)("components.nodes.baseField.show")),1)]),_:1})]),_:1},8,["checked"])]),_:1},8,["title"])])):ye("",!0),n.deletable?(E(),K(f,{key:2,type:"danger",class:"delete-field-button",onClick:u[0]||(u[0]=m=>s())},{default:g(()=>[p(O(B_),{style:{float:"right"}})]),_:1})):ye("",!0)]),t.nameOnly?(E(),K(O(xi),{key:0,style:mt(l(n.type)),id:t.id,type:n.type,position:n.type=="target"?O(be).Left:O(be).Right,"connectable-start":n.type!="target","connectable-end":n.type=="target"},null,8,["style","id","type","position","connectable-start","connectable-end"])):ye("",!0),Re("div",d$,[Re("div",h$,[Ve(a.$slots,"default",{},void 0,!0)]),n.type=="target"?(E(),le(Te,{key:0},[t.nameOnly?ye("",!0):(E(),K(O(xi),{key:0,style:mt(l("target")),id:t.id,type:"target",position:O(be).Left,"connectable-start":!1,"connectable-end":!0},null,8,["style","id","position"])),t.nameOnly?ye("",!0):(E(),K(O(xi),{key:1,style:mt(l("source")),id:t.id,type:"source",position:O(be).Right,"connectable-start":!0,"connectable-end":!1},null,8,["style","id","position"]))],64)):(E(),le(Te,{key:1},[t.nameOnly?ye("",!0):(E(),K(O(xi),{key:0,style:mt(l(n.type)),id:t.id,type:n.type,position:O(be).Right,"connectable-start":!0,"connectable-end":!1},null,8,["style","id","type","position"]))],64))])],6)}}},Z=lr(f$,[["__scopeId","data-v-28cde401"]]),p$={__name:"Conditional",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.conditional",has_inputs:!0,template:{field_type:{required:!0,placeholder:"",show:!1,multiline:!0,value:"string",password:!1,options:[{value:"string",label:"Str"},{value:"number",label:"Number"}],name:"field_type",display_name:"field_type",type:"str",clear_after_run:!0,list:!0,field_type:"select"},left_field:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"left_field",display_name:"left_field",type:"str|float|int",clear_after_run:!0,list:!1,field_type:"input"},right_field:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"right_field",display_name:"right_field",type:"str|float|int",clear_after_run:!0,list:!1,field_type:"input"},operator:{required:!0,placeholder:"",show:!1,multiline:!0,value:"equal",password:!1,options:[{value:"equal",label:"equal",field_type:["string","number"]},{value:"not_equal",label:"not_equal",field_type:["string","number"]},{value:"greater_than",label:"greater_than",field_type:["number"]},{value:"less_than",label:"less_than",field_type:["number"]},{value:"greater_than_or_equal",label:"greater_than_or_equal",field_type:["number"]},{value:"less_than_or_equal",label:"less_than_or_equal",field_type:["number"]},{value:"include",label:"include",field_type:["string"]},{value:"not_include",label:"not_include",field_type:["string"]},{value:"is_empty",label:"is_empty",field_type:["string"]},{value:"is_not_empty",label:"is_not_empty",field_type:["string"]},{value:"starts_with",label:"starts_with",field_type:["string"]},{value:"ends_with",label:"ends_with",field_type:["string"]}],name:"operator",display_name:"operator",type:"str",clear_after_run:!0,list:!1,field_type:"input"},true_output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"true_output",display_name:"true_output",type:"str",clear_after_run:!0,list:!1,field_type:""},false_output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"false_output",display_name:"false_output",type:"str",clear_after_run:!0,list:!1,field_type:""},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);i.value.field_type.options=i.value.field_type.options.map(r=>(r.label=n(`components.nodes.controlFlows.Conditional.field_type_${r.value}`),r)),i.value.operator.options=i.value.operator.options.map(r=>(r.label=n(`components.nodes.controlFlows.Conditional.operator_${r.value}`),r));const o=ve(()=>i.value.field_type.value==="number"?i.value.operator.options.filter(r=>r.field_type.includes("number")):i.value.field_type.value==="string"?i.value.operator.options.filter(r=>r.field_type.includes("string")):i.value.operator.options);return(r,s)=>{const l=C("a-select"),a=C("a-col"),u=C("a-input"),c=C("a-input-number"),d=C("a-divider"),h=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.Conditional.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-0"},{main:g(()=>[p(h,{type:"flex"},{default:g(()=>[p(a,{span:24},{default:g(()=>[p(Z,{id:"field_type",name:O(n)("components.nodes.controlFlows.Conditional.field_type"),required:"",type:"target",show:i.value.field_type.show,"onUpdate:show":s[1]||(s[1]=f=>i.value.field_type.show=f)},{default:g(()=>[p(l,{style:{width:"100%"},class:"field-content",value:i.value.field_type.value,"onUpdate:value":s[0]||(s[0]=f=>i.value.field_type.value=f),options:i.value.field_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(a,{span:24},{default:g(()=>[p(Z,{id:"left_field",name:O(n)("components.nodes.controlFlows.Conditional.left_field"),required:"",type:"target",show:i.value.left_field.show,"onUpdate:show":s[4]||(s[4]=f=>i.value.left_field.show=f)},{default:g(()=>[i.value.field_type.value=="string"?(E(),K(u,{key:0,class:"field-content",value:i.value.left_field.value,"onUpdate:value":s[2]||(s[2]=f=>i.value.left_field.value=f),placeholder:i.value.left_field.placeholder},null,8,["value","placeholder"])):ye("",!0),i.value.field_type.value=="number"?(E(),K(c,{key:1,style:{width:"100%"},class:"field-content",value:i.value.left_field.value,"onUpdate:value":s[3]||(s[3]=f=>i.value.left_field.value=f),placeholder:i.value.left_field.placeholder},null,8,["value","placeholder"])):ye("",!0)]),_:1},8,["name","show"])]),_:1}),p(a,{span:24},{default:g(()=>[p(Z,{id:"operator",name:O(n)("components.nodes.controlFlows.Conditional.operator"),required:"",type:"target",show:i.value.operator.show,"onUpdate:show":s[6]||(s[6]=f=>i.value.operator.show=f)},{default:g(()=>[p(l,{style:{width:"100%"},class:"field-content",value:i.value.operator.value,"onUpdate:value":s[5]||(s[5]=f=>i.value.operator.value=f),options:o.value},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(a,{span:24},{default:g(()=>[p(Z,{id:"right_field",name:O(n)("components.nodes.controlFlows.Conditional.right_field"),required:"",type:"target",show:i.value.right_field.show,"onUpdate:show":s[9]||(s[9]=f=>i.value.right_field.show=f)},{default:g(()=>[i.value.field_type.value=="string"?(E(),K(u,{key:0,class:"field-content",value:i.value.right_field.value,"onUpdate:value":s[7]||(s[7]=f=>i.value.right_field.value=f),placeholder:i.value.right_field.placeholder},null,8,["value","placeholder"])):ye("",!0),i.value.field_type.value=="number"?(E(),K(c,{key:1,style:{width:"100%"},class:"field-content",value:i.value.right_field.value,"onUpdate:value":s[8]||(s[8]=f=>i.value.right_field.value=f),placeholder:i.value.right_field.placeholder},null,8,["value","placeholder"])):ye("",!0)]),_:1},8,["name","show"])]),_:1}),p(d),p(a,{span:24},{default:g(()=>[p(Z,{id:"true_output",name:O(n)("components.nodes.controlFlows.Conditional.true_output"),required:"",type:"target",show:i.value.true_output.show,"onUpdate:show":s[11]||(s[11]=f=>i.value.true_output.show=f)},{default:g(()=>[p(u,{class:"field-content",value:i.value.true_output.value,"onUpdate:value":s[10]||(s[10]=f=>i.value.true_output.value=f),placeholder:i.value.true_output.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(a,{span:24},{default:g(()=>[p(Z,{id:"false_output",name:O(n)("components.nodes.controlFlows.Conditional.false_output"),required:"",type:"target",show:i.value.false_output.show,"onUpdate:show":s[13]||(s[13]=f=>i.value.false_output.show=f)},{default:g(()=>[p(u,{class:"field-content",value:i.value.false_output.value,"onUpdate:value":s[12]||(s[12]=f=>i.value.false_output.value=f),placeholder:i.value.false_output.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.controlFlows.Conditional.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},m$=Object.freeze(Object.defineProperty({__proto__:null,default:p$},Symbol.toStringTag,{value:"Module"})),g$={__name:"Empty",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.empty",has_inputs:!0,template:{input:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"input",display_name:"input",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.Empty.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-4"},{main:g(()=>[p(l,{type:"flex"},{default:g(()=>[p(s,{span:24},{default:g(()=>[p(Z,{id:"input",name:O(n)("components.nodes.controlFlows.Empty.input"),required:"",type:"target",show:i.value.input.show,"onUpdate:show":r[0]||(r[0]=a=>i.value.input.show=a),nameOnly:""},null,8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.controlFlows.Empty.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},v$=Object.freeze(Object.defineProperty({__proto__:null,default:g$},Symbol.toStringTag,{value:"Module"})),y$={__name:"JsonProcess",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.json_process",has_inputs:!0,template:{input:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"input",display_name:"input",type:"str|dict",clear_after_run:!0,list:!1,field_type:"input"},process_mode:{required:!1,placeholder:"",show:!1,multiline:!1,value:"get_value",password:!1,options:[{value:"get_value",label:"get_value"},{value:"list_values",label:"list_values"},{value:"list_keys",label:"list_keys"}],name:"process_mode",display_name:"process_mode",type:"str",clear_after_run:!1,list:!0,field_type:"select"},key:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"key",display_name:"key",type:"str|list",clear_after_run:!0,list:!1,field_type:"input"},default_value:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"default_value",display_name:"default_value",type:"str|list",clear_after_run:!0,list:!1,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.process_mode.options=i.value.process_mode.options.map(o=>(o.label=n(`components.nodes.controlFlows.JsonProcess.process_mode_${o.value}`),o)),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-input"),c=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.JsonProcess.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-6"},{main:g(()=>[p(c,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"input",name:O(n)("components.nodes.common.input"),required:"",type:"target",show:i.value.input.show,"onUpdate:show":r[1]||(r[1]=d=>i.value.input.show=d)},{default:g(()=>[p(s,{class:"field-content",value:i.value.input.value,"onUpdate:value":r[0]||(r[0]=d=>i.value.input.value=d),autoSize:!0,showCount:!0,placeholder:i.value.input.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"input",name:O(n)("components.nodes.controlFlows.JsonProcess.process_mode"),required:"",type:"target",show:i.value.process_mode.show,"onUpdate:show":r[3]||(r[3]=d=>i.value.process_mode.show=d)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.process_mode.value,"onUpdate:value":r[2]||(r[2]=d=>i.value.process_mode.value=d),options:i.value.process_mode.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),i.value.process_mode.value=="get_value"?(E(),le(Te,{key:0},[p(l,{span:24},{default:g(()=>[p(Z,{id:"key",name:O(n)("components.nodes.controlFlows.JsonProcess.key"),required:"",type:"target",show:i.value.key.show,"onUpdate:show":r[5]||(r[5]=d=>i.value.key.show=d)},{default:g(()=>[p(u,{class:"field-content",value:i.value.key.value,"onUpdate:value":r[4]||(r[4]=d=>i.value.key.value=d),placeholder:i.value.key.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"default_value",name:O(n)("components.nodes.controlFlows.JsonProcess.default_value"),type:"target",show:i.value.default_value.show,"onUpdate:show":r[7]||(r[7]=d=>i.value.default_value.show=d)},{default:g(()=>[p(u,{class:"field-content",value:i.value.default_value.value,"onUpdate:value":r[6]||(r[6]=d=>i.value.default_value.value=d),placeholder:i.value.default_value.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})],64)):ye("",!0)]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.common.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},O$=Object.freeze(Object.defineProperty({__proto__:null,default:y$},Symbol.toStringTag,{value:"Module"})),w$={__name:"RandomChoice",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"control_flows.random_choice",has_inputs:!0,template:{input:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"input",display_name:"input",type:"list",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.controlFlows.RandomChoice.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/control-flows#h2-10"},{main:g(()=>[p(l,{type:"flex"},{default:g(()=>[p(s,{span:24},{default:g(()=>[p(Z,{id:"input",name:O(n)("components.nodes.controlFlows.RandomChoice.input"),required:"",type:"target",show:i.value.input.show,"onUpdate:show":r[0]||(r[0]=a=>i.value.input.show=a),nameOnly:""},null,8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.controlFlows.RandomChoice.output"),type:"source"},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},_$=Object.freeze(Object.defineProperty({__proto__:null,default:w$},Symbol.toStringTag,{value:"Module"})),b$={__name:"FileLoader",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"file_processing.file_loader",has_inputs:!0,template:{files:{required:!0,placeholder:"",show:!0,multiline:!0,value:[],password:!1,name:"files",display_name:"files",type:"str",clear_after_run:!0,list:!1,field_type:"file"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.fileProcessing.FileLoader.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/file-processing#h2-0"},{main:g(()=>[p(l,{type:"flex"},{default:g(()=>[p(s,{span:24},{default:g(()=>[p(Z,{id:"files",name:O(n)("components.nodes.fileProcessing.FileLoader.files"),required:"",type:"target",show:i.value.files.show,"onUpdate:show":r[0]||(r[0]=a=>i.value.files.show=a)},null,8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.fileProcessing.FileLoader.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},x$=Object.freeze(Object.defineProperty({__proto__:null,default:b$},Symbol.toStringTag,{value:"Module"})),S$={__name:"StableDiffusion",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"image_generation.stable_diffusion",has_inputs:!0,template:{prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"prompt",display_name:"prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},negative_prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"negative_prompt",display_name:"negative_prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},model:{required:!1,placeholder:"",show:!1,multiline:!1,value:"stable-diffusion-v1-5",password:!1,options:[{value:"stable-diffusion-v1-5",label:"stable-diffusion-v1-5"},{value:"stable-diffusion-512-v2-1",label:"stable-diffusion-512-v2-1"},{value:"stable-diffusion-768-v2-1",label:"stable-diffusion-768-v2-1"},{value:"stable-diffusion-xl-beta-v2-2-2",label:"stable-diffusion-xl-beta-v2-2-2"}],name:"model",display_name:"model",type:"str",clear_after_run:!1,list:!0,field_type:"select"},cfg_scale:{required:!0,placeholder:"",show:!1,multiline:!0,value:7,password:!1,name:"cfg_scale",display_name:"cfg_scale",type:"float",clear_after_run:!0,list:!1,field_type:"number"},sampler:{required:!1,placeholder:"",show:!1,multiline:!1,value:"k_dpmpp_2m",password:!1,options:[{value:"ddim",label:"ddim"},{value:"plms",label:"plms"},{value:"k_euler",label:"k_euler"},{value:"k_euler_ancestral",label:"k_euler_ancestral"},{value:"k_heun",label:"k_heun"},{value:"k_dpm_2",label:"k_dpm_2"},{value:"k_dpm_2_ancestral",label:"k_dpm_2_ancestral"},{value:"k_dpmpp_2s_ancestral",label:"k_dpmpp_2s_ancestral"},{value:"k_dpmpp_2m",label:"k_dpmpp_2m"},{value:"k_dpmpp_sde",label:"k_dpmpp_sde"}],name:"sampler",display_name:"sampler",type:"str",clear_after_run:!1,list:!0,field_type:"select"},width:{required:!0,placeholder:"",show:!1,multiline:!0,value:512,password:!1,name:"width",display_name:"width",type:"float",clear_after_run:!0,list:!1,field_type:"number"},height:{required:!0,placeholder:"",show:!1,multiline:!0,value:512,password:!1,name:"height",display_name:"height",type:"float",clear_after_run:!0,list:!1,field_type:"number"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"only_link",password:!1,options:[{value:"only_link",label:"only_link"},{value:"markdown",label:"markdown"},{value:"html",label:"html"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.imageGeneration.StableDiffusion.output_type_${o.value}`),o)),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-input-number"),c=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.imageGeneration.StableDiffusion.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/image-generation#h2-0"},{main:g(()=>[p(c,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"prompt",name:O(n)("components.nodes.imageGeneration.StableDiffusion.prompt"),required:"",type:"target",show:i.value.prompt.show,"onUpdate:show":r[1]||(r[1]=d=>i.value.prompt.show=d)},{default:g(()=>[p(s,{class:"field-content",value:i.value.prompt.value,"onUpdate:value":r[0]||(r[0]=d=>i.value.prompt.value=d),autoSize:!0,showCount:!0,placeholder:i.value.prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"negative_prompt",name:O(n)("components.nodes.imageGeneration.StableDiffusion.negative_prompt"),required:"",type:"target",show:i.value.negative_prompt.show,"onUpdate:show":r[3]||(r[3]=d=>i.value.negative_prompt.show=d)},{default:g(()=>[p(s,{class:"field-content",value:i.value.negative_prompt.value,"onUpdate:value":r[2]||(r[2]=d=>i.value.negative_prompt.value=d),autoSize:!0,showCount:!0,placeholder:i.value.negative_prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"model",name:O(n)("components.nodes.imageGeneration.StableDiffusion.model"),required:"",type:"target",show:i.value.model.show,"onUpdate:show":r[5]||(r[5]=d=>i.value.model.show=d)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.model.value,"onUpdate:value":r[4]||(r[4]=d=>i.value.model.value=d),options:i.value.model.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"cfg_scale",name:O(n)("components.nodes.imageGeneration.StableDiffusion.cfg_scale"),required:"",type:"target",show:i.value.cfg_scale.show,"onUpdate:show":r[7]||(r[7]=d=>i.value.cfg_scale.show=d)},{default:g(()=>[p(u,{value:i.value.cfg_scale.value,"onUpdate:value":r[6]||(r[6]=d=>i.value.cfg_scale.value=d),controls:!1,style:{width:"100%"}},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"sampler",name:O(n)("components.nodes.imageGeneration.StableDiffusion.sampler"),required:"",type:"target",show:i.value.sampler.show,"onUpdate:show":r[9]||(r[9]=d=>i.value.sampler.show=d)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.sampler.value,"onUpdate:value":r[8]||(r[8]=d=>i.value.sampler.value=d),options:i.value.sampler.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"width",name:O(n)("components.nodes.imageGeneration.StableDiffusion.width"),required:"",type:"target",show:i.value.width.show,"onUpdate:show":r[11]||(r[11]=d=>i.value.width.show=d)},{default:g(()=>[p(u,{value:i.value.width.value,"onUpdate:value":r[10]||(r[10]=d=>i.value.width.value=d),controls:!1,style:{width:"100%"}},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"height",name:O(n)("components.nodes.imageGeneration.StableDiffusion.height"),required:"",type:"target",show:i.value.height.show,"onUpdate:show":r[13]||(r[13]=d=>i.value.height.show=d)},{default:g(()=>[p(u,{value:i.value.height.value,"onUpdate:value":r[12]||(r[12]=d=>i.value.height.value=d),controls:!1,style:{width:"100%"}},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.imageGeneration.StableDiffusion.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[15]||(r[15]=d=>i.value.output_type.show=d)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[14]||(r[14]=d=>i.value.output_type.value=d),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.imageGeneration.StableDiffusion.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},k$=Object.freeze(Object.defineProperty({__proto__:null,default:S$},Symbol.toStringTag,{value:"Module"})),T$={__name:"ChatGLM",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"llms.chat_glm",has_inputs:!0,template:{prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"prompt",display_name:"prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},llm_model:{required:!1,placeholder:"",show:!1,multiline:!1,value:"chatglm-6b",password:!1,options:[{value:"chatglm-6b",label:"ChatGLM-6B"}],name:"llm_model",display_name:"llm_model",type:"str",clear_after_run:!1,list:!0,field_type:"select"},temperature:{required:!0,placeholder:"",show:!1,multiline:!0,value:.7,password:!1,name:"temperature",display_name:"temperature",type:"float",clear_after_run:!0,list:!1,field_type:"number"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.llms.ChatGLM.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/language-models#h2-4"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"prompt",name:O(n)("components.nodes.llms.ChatGLM.prompt"),required:"",type:"target",show:i.value.prompt.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.prompt.show=c)},{default:g(()=>[p(s,{class:"field-content",value:i.value.prompt.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.prompt.value=c),autoSize:!0,showCount:!0,placeholder:i.value.prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"llm_model",name:O(n)("components.nodes.llms.ChatGLM.llm_model"),required:"",type:"target",show:i.value.llm_model.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.llm_model.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.llm_model.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.llm_model.value=c),options:i.value.llm_model.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"temperature",name:O(n)("components.nodes.llms.ChatGLM.temperature"),required:"",type:"target",show:i.value.temperature.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.temperature.show=c)},{default:g(()=>[p(vh,{modelValue:i.value.temperature.value,"onUpdate:modelValue":r[4]||(r[4]=c=>i.value.temperature.value=c)},null,8,["modelValue"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.llms.ChatGLM.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},P$=Object.freeze(Object.defineProperty({__proto__:null,default:T$},Symbol.toStringTag,{value:"Module"})),C$={style:{display:"flex",gap:"5px","align-items":"center"}},$$={style:{display:"flex",gap:"5px","align-items":"center"}},E$={__name:"OpenAI",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"llms.open_ai",has_inputs:!0,template:{prompt:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"prompt",display_name:"prompt",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},llm_model:{required:!1,placeholder:"",show:!1,multiline:!1,value:"gpt-3.5-turbo",password:!1,options:[{value:"gpt-3.5-turbo",label:"gpt-3.5-turbo"},{value:"gpt-3.5-turbo-16k",label:"gpt-3.5-turbo-16k"},{value:"gpt-4",label:"gpt-4"},{value:"gpt-4-32k",label:"gpt-4-32k"}],name:"llm_model",display_name:"llm_model",type:"str",clear_after_run:!1,list:!0,field_type:"select"},temperature:{required:!0,placeholder:"",show:!1,multiline:!0,value:.7,password:!1,name:"temperature",display_name:"temperature",type:"float",clear_after_run:!0,list:!1,field_type:"number"},use_function_call:{required:!1,placeholder:"",show:!1,multiline:!0,value:!1,password:!1,name:"use_function_call",display_name:"use_function_call",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"},functions:{required:!1,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"functions",display_name:"functions",type:"list",clear_after_run:!0,list:!1,field_type:"select"},function_call_mode:{required:!1,placeholder:"",show:!1,multiline:!1,value:"auto",password:!1,options:[{value:"auto",label:"auto"},{value:"none",label:"none"}],name:"function_call_mode",display_name:"function_call_mode",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);i.value.use_function_call||(i.value.use_function_call={required:!0,placeholder:"",show:!1,multiline:!0,value:!1,password:!1,name:"use_function_call",display_name:"use_function_call",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"}),i.value.functions||(i.value.functions={required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"functions",display_name:"functions",type:"list",clear_after_run:!0,list:!1,field_type:"select"}),i.value.function_call_mode||(i.value.function_call_mode={required:!1,placeholder:"",show:!1,multiline:!1,value:"auto",password:!1,options:[{value:"auto",label:"auto"},{value:"none",label:"none"}],name:"function_call_mode",display_name:"function_call_mode",type:"str",clear_after_run:!1,list:!0,field_type:"select"});const o=()=>{i.value.function_call_mode.options=[{value:"auto",label:"auto"},{value:"none",label:"none"}],i.value.function_call_mode.options=i.value.function_call_mode.options.concat(i.value.functions.value.map(w=>({value:w.name,label:w.name})))},r=Mt({name:"",description:"",parameters:{type:"object",properties:{},required:[]}}),s=oe(!1),l=()=>{s.value=!0},a=()=>{i.value.functions.value.push(JSON.parse(JSON.stringify(r))),s.value=!1,r.name="",r.description="",r.parameters={type:"object",properties:{},required:[]},o()},u=w=>{i.value.functions.value.splice(w,1),o()},c=Mt({name:"",type:"string",description:""}),d=[{value:"string",label:"string"},{value:"number",label:"number"},{value:"integer",label:"integer"},{value:"object",label:"object"},{value:"array",label:"array"},{value:"boolean",label:"boolean"},{value:"null",label:"null"}],h=oe(!1),f=()=>{h.value=!0},m=()=>{r.parameters.properties[c.name]={type:c.type,description:c.description},h.value=!1,c.name="",c.type="string",c.description=""},v=w=>{delete r.parameters.properties[w]};return(w,y)=>{const _=C("a-textarea"),T=C("a-col"),b=C("a-select"),k=C("a-checkbox"),x=C("a-button"),$=C("a-row"),W=C("a-input"),Q=C("a-form-item"),D=C("a-checkbox-group"),z=C("a-form"),H=C("a-drawer");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.llms.OpenAI.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/language-models#h2-0"},{main:g(()=>[p($,{type:"flex"},{default:g(()=>[p(T,{span:24},{default:g(()=>[p(Z,{id:"prompt",name:O(n)("components.nodes.llms.OpenAI.prompt"),required:"",type:"target",show:i.value.prompt.show,"onUpdate:show":y[1]||(y[1]=L=>i.value.prompt.show=L)},{default:g(()=>[p(_,{class:"field-content",value:i.value.prompt.value,"onUpdate:value":y[0]||(y[0]=L=>i.value.prompt.value=L),autoSize:!0,showCount:!0,placeholder:i.value.prompt.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(T,{span:24},{default:g(()=>[p(Z,{id:"llm_model",name:O(n)("components.nodes.llms.OpenAI.llm_model"),required:"",type:"target",show:i.value.llm_model.show,"onUpdate:show":y[3]||(y[3]=L=>i.value.llm_model.show=L)},{default:g(()=>[p(b,{style:{width:"100%"},value:i.value.llm_model.value,"onUpdate:value":y[2]||(y[2]=L=>i.value.llm_model.value=L),options:i.value.llm_model.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(T,{span:24},{default:g(()=>[p(Z,{id:"temperature",name:O(n)("components.nodes.llms.OpenAI.temperature"),required:"",type:"target",show:i.value.temperature.show,"onUpdate:show":y[5]||(y[5]=L=>i.value.temperature.show=L)},{default:g(()=>[p(vh,{modelValue:i.value.temperature.value,"onUpdate:modelValue":y[4]||(y[4]=L=>i.value.temperature.value=L)},null,8,["modelValue"])]),_:1},8,["name","show"])]),_:1}),p(T,{span:24},{default:g(()=>[p(Z,{id:"use_function_call",name:O(n)("components.nodes.llms.OpenAI.use_function_call"),required:"",type:"target",show:i.value.use_function_call.show,"onUpdate:show":y[7]||(y[7]=L=>i.value.use_function_call.show=L)},{inline:g(()=>[p(k,{checked:i.value.use_function_call.value,"onUpdate:checked":y[6]||(y[6]=L=>i.value.use_function_call.value=L)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1}),la(p(T,{span:24},{default:g(()=>[p(Z,{id:"functions",name:O(n)("components.nodes.llms.OpenAI.functions"),type:"target",show:i.value.functions.show,"onUpdate:show":y[16]||(y[16]=L=>i.value.functions.show=L)},{default:g(()=>[p($,{type:"flex",gutter:[12,12]},{default:g(()=>[(E(!0),le(Te,null,Je(i.value.functions.value,(L,S)=>(E(),K(T,{span:24,key:S},{default:g(()=>[Re("div",C$,[pe(de(L.name)+" ",1),p(O(Wc),{onClick:A=>u(S)},null,8,["onClick"])])]),_:2},1024))),128)),p(T,{span:24},{default:g(()=>[p(x,{type:"dashed",block:"",onClick:l,class:"add-field-button"},{default:g(()=>[p(O(ca)),pe(" "+de(O(n)("components.nodes.llms.OpenAI.add_function")),1)]),_:1})]),_:1})]),_:1}),p(H,{open:s.value,"onUpdate:open":y[11]||(y[11]=L=>s.value=L),title:O(n)("components.nodes.llms.OpenAI.add_function"),placement:"right",width:500},{extra:g(()=>[p(x,{type:"primary",onClick:a},{default:g(()=>[pe(de(O(n)("common.add")),1)]),_:1})]),default:g(()=>[p(z,null,{default:g(()=>[p(Q,{label:O(n)("components.nodes.llms.OpenAI.function_name")},{default:g(()=>[p(W,{value:r.name,"onUpdate:value":y[8]||(y[8]=L=>r.name=L)},null,8,["value"])]),_:1},8,["label"]),p(Q,{label:O(n)("components.nodes.llms.OpenAI.function_description")},{default:g(()=>[p(_,{value:r.description,"onUpdate:value":y[9]||(y[9]=L=>r.description=L)},null,8,["value"])]),_:1},8,["label"]),p(Q,{label:O(n)("components.nodes.llms.OpenAI.function_parameters")},{default:g(()=>[p($,{type:"flex",gutter:[12,12]},{default:g(()=>[(E(!0),le(Te,null,Je(Object.keys(r.parameters.properties),(L,S)=>(E(),K(T,{span:24,key:S},{default:g(()=>[Re("div",$$,[pe(de(L)+" ",1),p(O(Wc),{onClick:A=>v(L)},null,8,["onClick"])])]),_:2},1024))),128)),p(T,{span:24},{default:g(()=>[p(x,{type:"dashed",style:{width:"100%"},onClick:f},{default:g(()=>[p(O(ca)),pe(" "+de(O(n)("components.nodes.llms.OpenAI.add_parameter")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["label"]),p(Q,{label:O(n)("components.nodes.llms.OpenAI.function_required_parameters")},{default:g(()=>[p(D,{value:r.parameters.required,"onUpdate:value":y[10]||(y[10]=L=>r.parameters.required=L),name:"checkboxgroup",options:Object.keys(r.parameters.properties).map(L=>({label:L,value:L}))},null,8,["value","options"])]),_:1},8,["label"])]),_:1})]),_:1},8,["open","title"]),p(H,{open:h.value,"onUpdate:open":y[15]||(y[15]=L=>h.value=L),title:O(n)("components.nodes.llms.OpenAI.add_parameter"),placement:"right"},{extra:g(()=>[p(x,{type:"primary",onClick:m},{default:g(()=>[pe(de(O(n)("common.add")),1)]),_:1})]),default:g(()=>[p(z,null,{default:g(()=>[p(Q,{label:O(n)("components.nodes.llms.OpenAI.parameter_name")},{default:g(()=>[p(W,{value:c.name,"onUpdate:value":y[12]||(y[12]=L=>c.name=L)},null,8,["value"])]),_:1},8,["label"]),p(Q,{label:O(n)("components.nodes.llms.OpenAI.parameter_description")},{default:g(()=>[p(_,{value:c.description,"onUpdate:value":y[13]||(y[13]=L=>c.description=L)},null,8,["value"])]),_:1},8,["label"]),p(Q,{label:O(n)("components.nodes.llms.OpenAI.parameter_type")},{default:g(()=>[p(b,{ref:"select",value:c.type,"onUpdate:value":y[14]||(y[14]=L=>c.type=L),options:d},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["open","title"])]),_:1},8,["name","show"])]),_:1},512),[[aa,i.value.use_function_call.value]]),la(p(T,{span:24},{default:g(()=>[p(Z,{id:"function_call_mode",name:O(n)("components.nodes.llms.OpenAI.function_call_mode"),type:"target",show:i.value.function_call_mode.show,"onUpdate:show":y[18]||(y[18]=L=>i.value.function_call_mode.show=L)},{default:g(()=>[p(b,{style:{width:"100%"},value:i.value.function_call_mode.value,"onUpdate:value":y[17]||(y[17]=L=>i.value.function_call_mode.value=L),options:i.value.function_call_mode.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1},512),[[aa,i.value.use_function_call.value]])]),_:1})]),output:g(()=>[p($,{type:"flex",style:{width:"100%"}},{default:g(()=>[p(T,{span:24},{default:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.llms.OpenAI.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),p(T,{span:24},{default:g(()=>[p(Z,{id:"function_call_output",name:O(n)("components.nodes.llms.OpenAI.function_call_output"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},M$=Object.freeze(Object.defineProperty({__proto__:null,default:E$},Symbol.toStringTag,{value:"Module"})),A$={__name:"Document",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.document",has_inputs:!0,template:{file_name:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"file_name",display_name:"file_name",type:"str",clear_after_run:!0,list:!1,field_type:"input"},content:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content",display_name:"content",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},export_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:".docx",password:!1,options:[{value:".docx",label:".docx"},{value:".xlsx",label:".xlsx"},{value:".txt",label:".txt"},{value:".md",label:".md"},{value:".json",label:".json"},{value:".csv",label:".csv"},{value:".html",label:".html"}],name:"export_type",display_name:"export_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},show_local_file:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_local_file",display_name:"show_local_file",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"},output:{required:!1,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!1,list:!1,field_type:"local_file"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-textarea"),c=C("a-checkbox"),d=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Document.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-4"},{main:g(()=>[p(d,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"file_name",name:O(n)("components.nodes.outputs.Document.file_name"),required:"",type:"target",show:i.value.file_name.show,"onUpdate:show":r[1]||(r[1]=h=>i.value.file_name.show=h)},{default:g(()=>[p(s,{class:"field-content",value:i.value.file_name.value,"onUpdate:value":r[0]||(r[0]=h=>i.value.file_name.value=h),placeholder:i.value.file_name.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"export_type",name:O(n)("components.nodes.outputs.Document.export_type"),required:"",type:"target",show:i.value.export_type.show,"onUpdate:show":r[3]||(r[3]=h=>i.value.export_type.show=h)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.export_type.value,"onUpdate:value":r[2]||(r[2]=h=>i.value.export_type.value=h),options:i.value.export_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"content",name:O(n)("components.nodes.outputs.Document.content"),required:"",type:"target",show:i.value.content.show,"onUpdate:show":r[5]||(r[5]=h=>i.value.content.show=h)},{default:g(()=>[p(u,{value:i.value.content.value,"onUpdate:value":r[4]||(r[4]=h=>i.value.content.value=h),autoSize:!0,showCount:!0,placeholder:i.value.content.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"show_local_file",name:O(n)("components.nodes.outputs.Document.show_local_file"),required:"",type:"target",show:i.value.show_local_file.show,"onUpdate:show":r[7]||(r[7]=h=>i.value.show_local_file.show=h)},{default:g(()=>[p(c,{checked:i.value.show_local_file.value,"onUpdate:checked":r[6]||(r[6]=h=>i.value.show_local_file.value=h)},{default:g(()=>[pe(de(O(n)("components.nodes.outputs.Document.show_local_file")),1)]),_:1},8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.outputs.Document.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},D$=Object.freeze(Object.defineProperty({__proto__:null,default:A$},Symbol.toStringTag,{value:"Module"})),q$={__name:"Echarts",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.echarts",has_inputs:!0,template:{option:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"option",display_name:"option",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},show_echarts:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_echarts",display_name:"show_echarts",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-checkbox"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Echarts.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-27"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"option",name:O(n)("components.nodes.outputs.Echarts.option"),required:"",type:"target",show:i.value.option.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.option.show=c)},{default:g(()=>[p(s,{value:i.value.option.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.option.value=c),autoSize:!0,showCount:!0,placeholder:i.value.option.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"show_echarts",name:O(n)("components.nodes.outputs.Echarts.show_echarts"),required:"",type:"target",show:i.value.show_echarts.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.show_echarts.show=c)},{inline:g(()=>[p(a,{checked:i.value.show_echarts.value,"onUpdate:checked":r[2]||(r[2]=c=>i.value.show_echarts.value=c)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},R$=Object.freeze(Object.defineProperty({__proto__:null,default:q$},Symbol.toStringTag,{value:"Module"})),Q$={__name:"Email",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.email",has_inputs:!0,template:{to_email:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"to_email",display_name:"to_email",type:"str",clear_after_run:!0,list:!1,field_type:"input"},subject:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"subject",display_name:"subject",type:"str",clear_after_run:!0,list:!1,field_type:"input"},content_html:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content_html",display_name:"content_html",type:"str",clear_after_run:!0,list:!1,field_type:"input"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Email.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-8"},{main:g(()=>[p(a,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"to_email",name:O(n)("components.nodes.outputs.Email.to_email"),required:"",type:"target",show:i.value.to_email.show,"onUpdate:show":r[1]||(r[1]=u=>i.value.to_email.show=u)},{default:g(()=>[p(s,{class:"field-content",value:i.value.to_email.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.to_email.value=u),placeholder:i.value.to_email.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"subject",name:O(n)("components.nodes.outputs.Email.subject"),required:"",type:"target",show:i.value.subject.show,"onUpdate:show":r[3]||(r[3]=u=>i.value.subject.show=u)},{default:g(()=>[p(s,{class:"field-content",value:i.value.subject.value,"onUpdate:value":r[2]||(r[2]=u=>i.value.subject.value=u),placeholder:i.value.subject.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"content_html",name:O(n)("components.nodes.outputs.Email.content_html"),required:"",type:"target",show:i.value.content_html.show,"onUpdate:show":r[5]||(r[5]=u=>i.value.content_html.show=u)},{default:g(()=>[p(s,{class:"field-content",value:i.value.content_html.value,"onUpdate:value":r[4]||(r[4]=u=>i.value.content_html.value=u),placeholder:i.value.content_html.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},N$=Object.freeze(Object.defineProperty({__proto__:null,default:Q$},Symbol.toStringTag,{value:"Module"})),I$={__name:"Mermaid",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.mermaid",has_inputs:!0,template:{content:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content",display_name:"content",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},show_mermaid:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_mermaid",display_name:"show_mermaid",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-checkbox"),u=C("a-row");return E(),K(ze,{title:O(n)("components.nodes.outputs.Mermaid.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-24"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"content",name:O(n)("components.nodes.outputs.Mermaid.content"),required:"",type:"target",show:i.value.content.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.content.show=c)},{default:g(()=>[p(s,{value:i.value.content.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.content.value=c),autoSize:!0,showCount:!0,placeholder:i.value.content.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"show_mermaid",name:O(n)("components.nodes.outputs.Mermaid.show_mermaid"),required:"",type:"target",show:i.value.show_mermaid.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.show_mermaid.show=c)},{inline:g(()=>[p(a,{checked:i.value.show_mermaid.value,"onUpdate:checked":r[2]||(r[2]=c=>i.value.show_mermaid.value=c)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["title","description"])}}},V$=Object.freeze(Object.defineProperty({__proto__:null,default:I$},Symbol.toStringTag,{value:"Module"})),B$={__name:"Mindmap",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.mindmap",has_inputs:!0,template:{content:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content",display_name:"content",type:"str|list",clear_after_run:!0,list:!1,field_type:"textarea"},show_mind_map:{required:!1,placeholder:"",show:!1,multiline:!1,value:!0,password:!1,name:"show_mind_map",display_name:"show_mind_map",type:"bool",clear_after_run:!1,list:!1,field_type:"checkbox"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-checkbox"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Mindmap.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-11"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"content",name:O(n)("components.nodes.outputs.Mindmap.content"),required:"",type:"target",show:i.value.content.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.content.show=c)},{default:g(()=>[p(s,{value:i.value.content.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.content.value=c),autoSize:!0,showCount:!0,placeholder:i.value.content.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"show_mind_map",name:O(n)("components.nodes.outputs.Mindmap.show_mind_map"),required:"",type:"target",show:i.value.show_mind_map.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.show_mind_map.show=c)},{inline:g(()=>[p(a,{checked:i.value.show_mind_map.value,"onUpdate:checked":r[2]||(r[2]=c=>i.value.show_mind_map.value=c)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},W$=Object.freeze(Object.defineProperty({__proto__:null,default:B$},Symbol.toStringTag,{value:"Module"})),L$={__name:"Text",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.text",has_inputs:!1,template:{text:{required:!0,placeholder:"",show:!0,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},render_markdown:{required:!0,placeholder:"",show:!1,multiline:!0,value:!0,password:!1,name:"render_markdown",display_name:"render_markdown",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"},output_title:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-input"),u=C("a-checkbox"),c=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.Text.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-14"},{main:g(()=>[p(c,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"text",name:O(n)("components.nodes.outputs.Text.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=d=>i.value.text.show=d)},{default:g(()=>[p(s,{value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=d=>i.value.text.value=d),autoSize:!0,showCount:!0,placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_title",name:O(n)("components.nodes.outputs.Text.output_title"),required:"",type:"target",show:i.value.output_title.show,"onUpdate:show":r[3]||(r[3]=d=>i.value.output_title.show=d)},{default:g(()=>[p(a,{class:"field-content",value:i.value.output_title.value,"onUpdate:value":r[2]||(r[2]=d=>i.value.output_title.value=d),placeholder:i.value.output_title.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"render_markdown",name:O(n)("components.nodes.outputs.Text.render_markdown"),required:"",type:"target",show:i.value.render_markdown.show,"onUpdate:show":r[5]||(r[5]=d=>i.value.render_markdown.show=d)},{inline:g(()=>[p(u,{checked:i.value.render_markdown.value,"onUpdate:checked":r[4]||(r[4]=d=>i.value.render_markdown.value=d)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.outputs.Text.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},z$=Object.freeze(Object.defineProperty({__proto__:null,default:L$},Symbol.toStringTag,{value:"Module"})),X$={__name:"WorkflowInvokeOutput",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"output.workflow_invoke_output",has_inputs:!1,template:{value:{required:!0,placeholder:"",show:!0,multiline:!0,value:"",password:!1,name:"value",display_name:"value",type:"any",clear_after_run:!0,list:!1,field_type:"textarea"},display_name:{required:!0,placeholder:"",show:!0,multiline:!0,value:"",password:!1,name:"display_name",display_name:"display_name",type:"any",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-col"),l=C("a-input"),a=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.outputs.WorkflowInvokeOutput.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/outputs#h2-30"},{main:g(()=>[p(a,{type:"flex"},{default:g(()=>[p(s,{span:24},{default:g(()=>[p(Z,{id:"value",name:O(n)("components.nodes.outputs.WorkflowInvokeOutput.value"),required:"",type:"target",show:i.value.value.show,"onUpdate:show":r[0]||(r[0]=u=>i.value.value.show=u)},null,8,["name","show"])]),_:1}),p(s,{span:24},{default:g(()=>[p(Z,{id:"display_name",name:O(n)("components.nodes.outputs.WorkflowInvokeOutput.display_name"),required:"",type:"target",show:i.value.display_name.show,"onUpdate:show":r[2]||(r[2]=u=>i.value.display_name.show=u)},{default:g(()=>[p(l,{class:"field-content",value:i.value.display_name.value,"onUpdate:value":r[1]||(r[1]=u=>i.value.display_name.value=u),placeholder:i.value.display_name.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},U$=Object.freeze(Object.defineProperty({__proto__:null,default:X$},Symbol.toStringTag,{value:"Module"})),Y$={style:{display:"flex",gap:"5px"}},j$={__name:"ListField",props:{id:{type:String,required:!0},name:{type:String,required:!0},required:{type:Boolean,default:!1},type:{type:String,required:!0},nameOnly:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},style:{type:Object,default:()=>({})},value:{type:Array,required:!0}},emits:["delete","update:value"],setup(t,{emit:e}){const n=t,{t:i}=Ee();let o=n.value;const r=(l,a)=>{o[a]=l,e("update:value",o)},s=l=>{o.splice(l,1),e("update:value",o)};return Me(()=>n.value,l=>{o=l}),(l,a)=>{const u=C("a-input"),c=C("a-col"),d=C("a-button"),h=C("a-row");return E(),K(Z,{id:n.id,name:n.name,required:n.required,type:n.type,nameOnly:n.nameOnly,deletable:n.deletable,style:mt(n.style),onDelete:a[1]||(a[1]=f=>e("delete",n.id))},{default:g(()=>[p(h,{type:"flex",gutter:[12,12]},{default:g(()=>[(E(!0),le(Te,null,Je(O(o),(f,m)=>(E(),K(c,{span:24,key:m},{default:g(()=>[Re("div",Y$,[p(u,{value:f,onInput:v=>r(v.target.value,m)},null,8,["value","onInput"]),p(O(Wc),{onClick:v=>s(m)},null,8,["onClick"])])]),_:2},1024))),128)),p(c,{span:24},{default:g(()=>[p(d,{type:"dashed",style:{width:"100%"},onClick:a[0]||(a[0]=f=>O(o).push(""))},{default:g(()=>[p(O(ca)),pe(" "+de(O(i)("components.nodes.listField.add_item")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","name","required","type","nameOnly","deletable","style"])}}},F$={__name:"ListRender",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.list_render",has_inputs:!0,template:{list:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"list",display_name:"list",type:"str",clear_after_run:!0,list:!0,field_type:"list"},separator:{required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"separator",display_name:"separator",type:"str",clear_after_run:!0,list:!0,field_type:"input"},output_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"},{value:"list",label:"List"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type||(i.value.output_type={required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"},{value:"list",label:"List"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"}),i.value.separator||(i.value.separator={required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"separator",display_name:"separator",type:"str",clear_after_run:!0,list:!0,field_type:"input"}),i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.textProcessing.ListRender.output_type_${o.value}`),o)),(o,r)=>{const s=C("a-col"),l=C("a-input"),a=C("a-select"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.ListRender.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-0"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(s,{span:24},{default:g(()=>[p(j$,{id:"list",name:O(n)("components.nodes.textProcessing.ListRender.list"),required:"",type:"target",value:i.value.list.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.list.value=c),show:i.value.list.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.list.show=c)},null,8,["name","value","show"])]),_:1}),i.value.output_type.value=="text"?(E(),K(s,{key:0,span:24},{default:g(()=>[p(Z,{id:"separator",name:O(n)("components.nodes.textProcessing.ListRender.separator"),required:"",type:"target",show:i.value.separator.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.separator.show=c)},{default:g(()=>[p(l,{style:{width:"100%"},class:"field-content",value:i.value.separator.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.separator.value=c),placeholder:i.value.separator.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):ye("",!0),p(s,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.textProcessing.ListRender.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.output_type.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[4]||(r[4]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.textProcessing.ListRender.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},H$=Object.freeze(Object.defineProperty({__proto__:null,default:F$},Symbol.toStringTag,{value:"Module"})),G$={__name:"MarkdownToHtml",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.markdown_to_html",has_inputs:!0,template:{markdown:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"markdown",display_name:"markdown",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},html:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"html",display_name:"html",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.MarkdownToHtml.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-4"},{main:g(()=>[p(a,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"markdown",name:O(n)("components.nodes.textProcessing.MarkdownToHtml.markdown"),required:"",type:"target",show:i.value.markdown.show,"onUpdate:show":r[1]||(r[1]=u=>i.value.markdown.show=u)},{default:g(()=>[p(s,{class:"field-content",value:i.value.markdown.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.markdown.value=u),autoSize:!0,showCount:!0,placeholder:i.value.markdown.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"html",name:O(n)("components.nodes.textProcessing.MarkdownToHtml.html"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},Z$=Object.freeze(Object.defineProperty({__proto__:null,default:G$},Symbol.toStringTag,{value:"Module"})),K$={__name:"TemplateEditorModal",props:{fields:{type:Object,required:!0,default:{}},open:{type:Boolean,required:!0,default:!1},template:{type:String,required:!0,default:""}},emits:["update:open","update:template"],setup(t,{emit:e}){const n=t,{t:i}=Ee();let o=oe(n.open),r=oe(n.template);const s=()=>{o.value=!1,e("update:open",o.value),e("update:template",r.value)},l=()=>{o.value=!1,e("update:open",o.value)};Me(()=>n.open,u=>{o.value=u}),Me(()=>n.template,u=>{r.value=u});const a=(u,c)=>{u.dataTransfer.setData("text/plain",`{{${c}}}`)};return(u,c)=>{const d=C("a-typography-text"),h=C("a-button"),f=C("a-space"),m=C("a-card"),v=C("a-col"),w=C("a-textarea"),y=C("a-row"),_=C("a-modal");return E(),K(_,{open:O(o),width:"80vw",onOk:s,onCancel:l,style:{"max-width":"1280px",width:"80vw"}},{title:g(()=>[p(O(r_)),pe(" "+de(O(i)("components.templateEditorModal.title")),1)]),default:g(()=>[p(y,{gutter:16},{default:g(()=>[p(v,{span:6},{default:g(()=>[p(m,null,{title:g(()=>[pe(de(O(i)("components.templateEditorModal.variable_fields"))+" ",1),p(d,{type:"secondary",style:{"font-size":"12px","font-weight":"normal"}},{default:g(()=>[pe(de(O(i)("components.templateEditorModal.drag_to_insert")),1)]),_:1})]),default:g(()=>[p(f,{direction:"vertical",style:{width:"100%"}},{default:g(()=>[(E(!0),le(Te,null,Je(Object.keys(n.fields),T=>(E(),le(Te,{key:T},[["template","output"].includes(T)?ye("",!0):(E(),K(h,{key:0,block:"",draggable:"true",onDragstart:b=>a(b,T)},{default:g(()=>[pe(de(T),1)]),_:2},1032,["onDragstart"]))],64))),128))]),_:1})]),_:1})]),_:1}),p(v,{span:18},{default:g(()=>[p(m,{title:O(i)("components.templateEditorModal.template")},{default:g(()=>[p(w,{value:O(r),"onUpdate:value":c[0]||(c[0]=T=>xs(r)?r.value=T:r=T),rows:20},null,8,["value"])]),_:1},8,["title"])]),_:1})]),_:1})]),_:1},8,["open"])}}},J$={style:{display:"flex",gap:"5px"}},eE={__name:"TemplateCompose",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.template_compose",has_inputs:!0,template:{template:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"template",display_name:"template",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template),o=Mt({required:!0,placeholder:"",show:!1,multiline:!1,value:"",options:[],password:!1,name:"",display_name:"",type:"str",clear_after_run:!1,list:!1,field_type:"input"}),r=f=>{o.multiline=f=="textarea"},s=oe(!1),l=()=>{s.value=!0},a=()=>{o.name=o.display_name,i.value[o.name]=JSON.parse(JSON.stringify(o)),s.value=!1,o.display_name="",o.options=[]},u=f=>{delete i.value[f]},c=(f,m)=>{o.options[m]={value:f,label:f}},d=f=>{o.options.splice(f,1)},h=oe(!1);return(f,m)=>{const v=C("a-select"),w=C("a-textarea"),y=C("a-input"),_=C("a-col"),T=C("a-button"),b=C("a-select-option"),k=C("a-form-item"),x=C("a-row"),$=C("a-form"),W=C("a-drawer"),Q=C("a-typography-paragraph"),D=C("a-divider");return E(),K(ze,{nodeId:t.id,style:{width:"400px"},title:O(n)("components.nodes.textProcessing.TemplateCompose.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-8"},{main:g(()=>[p(x,{style:{display:"block"}},{default:g(()=>[(E(!0),le(Te,null,Je(Object.keys(i.value),(z,H)=>(E(),le(Te,{key:H},[["template","output"].includes(z)?ye("",!0):(E(),K(_,{key:0,span:24},{default:g(()=>[p(Z,{id:z,name:i.value[z].display_name,required:"",type:"target",deletable:"",onDelete:L=>u(z),show:i.value[z].show,"onUpdate:show":L=>i.value[z].show=L},{default:g(()=>[i.value[z].field_type=="select"?(E(),K(v,{key:0,class:"field-content",style:{width:"100%"},value:i.value[z].value,"onUpdate:value":L=>i.value[z].value=L,options:i.value[z].options,placeholder:i.value[z].placeholder},null,8,["value","onUpdate:value","options","placeholder"])):i.value[z].field_type=="textarea"?(E(),K(w,{key:1,class:"field-content",value:i.value[z].value,"onUpdate:value":L=>i.value[z].value=L,autoSize:{minRows:1,maxRows:10},showCount:!0,placeholder:i.value[z].placeholder},null,8,["value","onUpdate:value","placeholder"])):i.value[z].field_type=="input"?(E(),K(y,{key:2,class:"field-content",value:i.value[z].value,"onUpdate:value":L=>i.value[z].value=L,placeholder:i.value[z].placeholder},null,8,["value","onUpdate:value","placeholder"])):ye("",!0)]),_:2},1032,["id","name","onDelete","show","onUpdate:show"])]),_:2},1024))],64))),128)),p(_,{span:24,style:{padding:"10px"}},{default:g(()=>[p(T,{type:"dashed",block:"",onClick:l,class:"add-field-button"},{default:g(()=>[p(O(Rf)),pe(" "+de(O(n)("components.nodes.textProcessing.TemplateCompose.add_field")),1)]),_:1}),p(W,{open:s.value,"onUpdate:open":m[3]||(m[3]=z=>s.value=z),class:"custom-class",title:O(n)("components.nodes.textProcessing.TemplateCompose.add_field"),placement:"right"},{extra:g(()=>[p(T,{type:"primary",onClick:a},{default:g(()=>[pe(de(O(n)("common.add")),1)]),_:1})]),default:g(()=>[p($,null,{default:g(()=>[p(k,{label:O(n)("components.nodes.textProcessing.TemplateCompose.add_field_type")},{default:g(()=>[p(v,{ref:"select",value:o.field_type,"onUpdate:value":m[0]||(m[0]=z=>o.field_type=z),style:{width:"120px"},onChange:r},{default:g(()=>[p(b,{value:"input"},{default:g(()=>[pe(de(O(n)("components.nodes.textProcessing.TemplateCompose.field_type_input")),1)]),_:1}),p(b,{value:"textarea"},{default:g(()=>[pe(de(O(n)("components.nodes.textProcessing.TemplateCompose.field_type_textarea")),1)]),_:1}),p(b,{value:"select"},{default:g(()=>[pe(de(O(n)("components.nodes.textProcessing.TemplateCompose.field_type_select")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),p(k,{label:O(n)("components.nodes.textProcessing.TemplateCompose.add_field_display_name")},{default:g(()=>[p(y,{value:o.display_name,"onUpdate:value":m[1]||(m[1]=z=>o.display_name=z)},null,8,["value"])]),_:1},8,["label"]),o.field_type=="select"?(E(),K(k,{key:0,label:O(n)("components.nodes.textProcessing.TemplateCompose.add_field_list_options")},{default:g(()=>[p(x,{type:"flex",gutter:[12,12]},{default:g(()=>[(E(!0),le(Te,null,Je(o.options,(z,H)=>(E(),K(_,{span:24,key:H},{default:g(()=>[Re("div",J$,[p(y,{value:z.value,onInput:L=>c(L.target.value,H)},null,8,["value","onInput"]),p(O(m_),{onClick:L=>d(H)},null,8,["onClick"])])]),_:2},1024))),128)),p(_,{span:24},{default:g(()=>[p(T,{type:"dashed",style:{width:"100%"},onClick:m[2]||(m[2]=z=>o.options.push(""))},{default:g(()=>[p(O(Rf)),pe(" "+de(O(n)("components.nodes.listField.add_item")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["label"])):ye("",!0)]),_:1})]),_:1},8,["open","title"])]),_:1})]),_:1}),p(Z,{id:"template",name:O(n)("components.nodes.textProcessing.TemplateCompose.template"),required:"",type:"target",show:i.value.template.show,"onUpdate:show":m[7]||(m[7]=z=>i.value.template.show=z)},{default:g(()=>[p(Q,{ellipsis:{row:1,expandable:!1},content:i.value.template.value},null,8,["content"]),p(T,{block:"",type:"primary",class:"open-template-editor-button",onClick:m[4]||(m[4]=z=>h.value=!0)},{default:g(()=>[pe(de(O(n)("components.nodes.textProcessing.TemplateCompose.open_template_editor")),1)]),_:1}),p(K$,{open:h.value,"onUpdate:open":m[5]||(m[5]=z=>h.value=z),template:i.value.template.value,"onUpdate:template":m[6]||(m[6]=z=>i.value.template.value=z),fields:i.value},null,8,["open","template","fields"])]),_:1},8,["name","show"]),p(D)]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.textProcessing.TemplateCompose.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},tE=Object.freeze(Object.defineProperty({__proto__:null,default:eE},Symbol.toStringTag,{value:"Module"})),nE={__name:"TextInOut",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.text_in_out",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.TextInOut.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-12"},{main:g(()=>[p(a,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"text",name:O(n)("components.nodes.textProcessing.TextInOut.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=u=>i.value.text.show=u)},{default:g(()=>[p(s,{class:"field-content",value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.text.value=u),placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.textProcessing.TextInOut.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},iE=Object.freeze(Object.defineProperty({__proto__:null,default:nE},Symbol.toStringTag,{value:"Module"})),oE={__name:"TextSplitters",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.text_splitters",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},split_method:{required:!0,placeholder:"",show:!1,multiline:!1,value:"general",password:!1,options:[{value:"general",label:"general"},{value:"delimiter",label:"delimiter"},{value:"markdown",label:"markdown"}],name:"split_method",display_name:"split_method",type:"str",clear_after_run:!0,list:!1,field_type:"select"},chunk_length:{required:!0,placeholder:"",show:!1,multiline:!0,value:500,password:!1,name:"chunk_length",display_name:"chunk_length",type:"str",clear_after_run:!0,list:!1,field_type:"number"},chunk_overlap:{required:!0,placeholder:"",show:!1,multiline:!0,value:30,password:!1,name:"chunk_overlap",display_name:"chunk_overlap",type:"str",clear_after_run:!0,list:!1,field_type:"number"},delimiter:{required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"delimiter",display_name:"delimiter",type:"str",clear_after_run:!0,list:!0,field_type:"input"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"list",clear_after_run:!0,list:!0,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.split_method.options=i.value.split_method.options.map(o=>(o.label=n(`components.nodes.textProcessing.TextSplitters.split_method_${o.value}`),o)),i.value.delimiter||(i.value.delimiter={required:!1,placeholder:"",show:!1,multiline:!0,value:"\\n",password:!1,name:"delimiter",display_name:"delimiter",type:"str",clear_after_run:!0,list:!0,field_type:"input"}),i.value.chunk_overlap||(i.value.chunk_overlap={required:!0,placeholder:"",show:!1,multiline:!0,value:30,password:!1,name:"chunk_overlap",display_name:"chunk_overlap",type:"str",clear_after_run:!0,list:!1,field_type:"number"}),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-select"),u=C("a-input-number"),c=C("a-input"),d=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.TextSplitters.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-16"},{main:g(()=>[p(d,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"text",name:O(n)("components.nodes.textProcessing.TextSplitters.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=h=>i.value.text.show=h)},{default:g(()=>[p(s,{class:"field-content",value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=h=>i.value.text.value=h),autoSize:!0,showCount:!0,placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"split_method",name:O(n)("components.nodes.textProcessing.TextSplitters.split_method"),required:"",type:"target",show:i.value.split_method.show,"onUpdate:show":r[3]||(r[3]=h=>i.value.split_method.show=h)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.split_method.value,"onUpdate:value":r[2]||(r[2]=h=>i.value.split_method.value=h),options:i.value.split_method.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),["general","markdown"].includes(i.value.split_method.value)?(E(),K(l,{key:0,span:24},{default:g(()=>[p(Z,{id:"chunk_length",name:O(n)("components.nodes.textProcessing.TextSplitters.chunk_length"),required:"",type:"target",show:i.value.chunk_length.show,"onUpdate:show":r[5]||(r[5]=h=>i.value.chunk_length.show=h)},{default:g(()=>[p(u,{style:{width:"100%"},class:"field-content",value:i.value.chunk_length.value,"onUpdate:value":r[4]||(r[4]=h=>i.value.chunk_length.value=h),placeholder:i.value.chunk_length.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):ye("",!0),["general","markdown"].includes(i.value.split_method.value)?(E(),K(l,{key:1,span:24},{default:g(()=>[p(Z,{id:"chunk_overlap",name:O(n)("components.nodes.textProcessing.TextSplitters.chunk_overlap"),required:"",type:"target",show:i.value.chunk_overlap.show,"onUpdate:show":r[7]||(r[7]=h=>i.value.chunk_overlap.show=h)},{default:g(()=>[p(u,{style:{width:"100%"},class:"field-content",value:i.value.chunk_overlap.value,"onUpdate:value":r[6]||(r[6]=h=>i.value.chunk_overlap.value=h),placeholder:i.value.chunk_overlap.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):ye("",!0),i.value.split_method.value=="delimiter"?(E(),K(l,{key:2,span:24},{default:g(()=>[p(Z,{id:"delimiter",name:O(n)("components.nodes.textProcessing.TextSplitters.delimiter"),required:"",type:"target",show:i.value.delimiter.show,"onUpdate:show":r[9]||(r[9]=h=>i.value.delimiter.show=h)},{default:g(()=>[p(c,{style:{width:"100%"},class:"field-content",value:i.value.delimiter.value,"onUpdate:value":r[8]||(r[8]=h=>i.value.delimiter.value=h),placeholder:i.value.delimiter.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):ye("",!0)]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.textProcessing.TextSplitters.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},rE=Object.freeze(Object.defineProperty({__proto__:null,default:oE},Symbol.toStringTag,{value:"Module"})),sE={__name:"TextTruncation",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"text_processing.text_truncation",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},truncate_method:{required:!0,placeholder:"",show:!1,multiline:!1,value:"general",password:!1,options:[{value:"general",label:"general"},{value:"markdown",label:"markdown"}],name:"truncate_method",display_name:"truncate_method",type:"str",clear_after_run:!0,list:!1,field_type:"select"},truncate_length:{required:!0,placeholder:"",show:!1,multiline:!0,value:2e3,password:!1,name:"truncate_length",display_name:"truncate_length",type:"str",clear_after_run:!0,list:!1,field_type:"number"},floating_range:{required:!0,placeholder:"",show:!1,multiline:!0,value:100,password:!1,name:"floating_range",display_name:"floating_range",type:"str",clear_after_run:!0,list:!1,field_type:"number"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"list",clear_after_run:!0,list:!0,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.truncate_method.options=i.value.truncate_method.options.map(o=>(o.label=n(`components.nodes.textProcessing.TextTruncation.truncate_method_${o.value}`),o)),(o,r)=>{const s=C("a-textarea"),l=C("a-col"),a=C("a-input-number"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.textProcessing.TextTruncation.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/text-processing#h2-20"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"text",name:O(n)("components.nodes.textProcessing.TextTruncation.text"),required:"",type:"target",show:i.value.text.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.text.show=c)},{default:g(()=>[p(s,{class:"field-content",value:i.value.text.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.text.value=c),autoSize:!0,showCount:!0,placeholder:i.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"truncate_length",name:O(n)("components.nodes.textProcessing.TextTruncation.truncate_length"),required:"",type:"target",show:i.value.truncate_length.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.truncate_length.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},class:"field-content",value:i.value.truncate_length.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.truncate_length.value=c),placeholder:i.value.truncate_length.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"floating_range",name:O(n)("components.nodes.textProcessing.TextTruncation.floating_range"),required:"",type:"target",show:i.value.floating_range.show,"onUpdate:show":r[5]||(r[5]=c=>i.value.floating_range.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},class:"field-content",value:i.value.floating_range.value,"onUpdate:value":r[4]||(r[4]=c=>i.value.floating_range.value=c),placeholder:i.value.floating_range.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.textProcessing.TextTruncation.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},lE=Object.freeze(Object.defineProperty({__proto__:null,default:sE},Symbol.toStringTag,{value:"Module"})),aE={__name:"ImageSearch",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"tools.image_search",has_inputs:!0,template:{search_text:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"search_text",display_name:"search_text",type:"str",clear_after_run:!0,list:!1,field_type:"input"},search_engine:{required:!0,placeholder:"",show:!1,multiline:!1,value:"bing",password:!1,options:[{value:"bing",label:"bing"},{value:"pexels",label:"pexels"}],name:"search_engine",display_name:"search_engine",type:"str",clear_after_run:!0,list:!1,field_type:"select"},count:{required:!0,placeholder:"",show:!1,multiline:!0,value:5,password:!1,name:"count",display_name:"count",type:"str",clear_after_run:!0,list:!1,field_type:"number"},output_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"markdown",password:!1,options:[{value:"text",label:"text"},{value:"markdown",label:"markdown"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"output",display_name:"output",type:"list|str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.search_engine.options=i.value.search_engine.options.map(o=>(o.label=n(`components.nodes.tools.ImageSearch.search_engine_${o.value}`),o)),i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.tools.ImageSearch.output_type_${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-input-number"),c=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.tools.ImageSearch.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/tools#h2-0"},{main:g(()=>[p(c,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"search_text",name:O(n)("components.nodes.tools.ImageSearch.search_text"),required:"",type:"target",show:i.value.search_text.show,"onUpdate:show":r[1]||(r[1]=d=>i.value.search_text.show=d)},{default:g(()=>[p(s,{class:"field-content",value:i.value.search_text.value,"onUpdate:value":r[0]||(r[0]=d=>i.value.search_text.value=d),placeholder:i.value.search_text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"search_engine",name:O(n)("components.nodes.tools.ImageSearch.search_engine"),required:"",type:"target",show:i.value.search_engine.show,"onUpdate:show":r[3]||(r[3]=d=>i.value.search_engine.show=d)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.search_engine.value,"onUpdate:value":r[2]||(r[2]=d=>i.value.search_engine.value=d),options:i.value.search_engine.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"count",name:O(n)("components.nodes.tools.ImageSearch.count"),required:"",type:"target",show:i.value.count.show,"onUpdate:show":r[5]||(r[5]=d=>i.value.count.show=d)},{default:g(()=>[p(u,{style:{width:"100%"},class:"field-content",value:i.value.count.value,"onUpdate:value":r[4]||(r[4]=d=>i.value.count.value=d),placeholder:i.value.count.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.tools.ImageSearch.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[7]||(r[7]=d=>i.value.output_type.show=d)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[6]||(r[6]=d=>i.value.output_type.value=d),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.tools.ImageSearch.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},uE=Object.freeze(Object.defineProperty({__proto__:null,default:aE},Symbol.toStringTag,{value:"Module"})),H0=1024;let cE=0,Ju=class{constructor(e,n){this.from=e,this.to=n}};class Ae{constructor(e={}){this.id=cE++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Xt.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Ae.closedBy=new Ae({deserialize:t=>t.split(" ")});Ae.openedBy=new Ae({deserialize:t=>t.split(" ")});Ae.group=new Ae({deserialize:t=>t.split(" ")});Ae.contextHash=new Ae({perNode:!0});Ae.lookAhead=new Ae({perNode:!0});Ae.mounted=new Ae({perNode:!0});const dE=Object.create(null);class Xt{constructor(e,n,i,o=0){this.name=e,this.props=n,this.id=i,this.flags=o}static define(e){let n=e.props&&e.props.length?Object.create(null):dE,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),o=new Xt(e.name||"",n,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(o)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[r[0].id]=r[1]}}return o}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Ae.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let o of i.split(" "))n[o]=e[i];return i=>{for(let o=i.prop(Ae.group),r=-1;r<(o?o.length:0);r++){let s=n[r<0?i.name:o[r]];if(s)return s}}}}Xt.none=new Xt("",Object.create(null),0,8);class Bh{constructor(e){this.types=e;for(let n=0;n0;for(let a=this.cursor(s|pt.IncludeAnonymous);;){let u=!1;if(a.from<=r&&a.to>=o&&(!l&&a.type.isAnonymous||n(a)!==!1)){if(a.firstChild())continue;u=!0}for(;u&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:zh(Xt.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,o)=>new ut(this.type,n,i,o,this.propValues),e.makeTree||((n,i,o)=>new ut(Xt.none,n,i,o)))}static build(e){return fE(e)}}ut.empty=new ut(Xt.none,[],[],0);class Wh{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Wh(this.buffer,this.index)}}class mo{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Xt.none}toString(){let e=[];for(let n=0;n0));a=s[a+3]);return l}slice(e,n,i){let o=this.buffer,r=new Uint16Array(n-e),s=0;for(let l=e,a=0;l=e&&ne;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Z0(t,e){let n=t.childBefore(e);for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(t=n,n=i.prevSibling):n=i}return t}function Ko(t,e,n,i){for(var o;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?l.length:-1;e!=u;e+=n){let c=l[e],d=a[e]+s.from;if(G0(o,i,d,d+c.length)){if(c instanceof mo){if(r&pt.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,n,i-d,o);if(h>-1)return new An(new hE(s,c,e,d),null,h)}else if(r&pt.IncludeAnonymous||!c.type.isAnonymous||Lh(c)){let h;if(!(r&pt.IgnoreMounts)&&c.props&&(h=c.prop(Ae.mounted))&&!h.overlay)return new yn(h.tree,d,e,s);let f=new yn(c,d,e,s);return r&pt.IncludeAnonymous||!f.type.isAnonymous?f:f.nextChild(n<0?c.children.length-1:0,n,i,o)}}}if(r&pt.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,i=0){let o;if(!(i&pt.IgnoreOverlays)&&(o=this._tree.prop(Ae.mounted))&&o.overlay){let r=e-this.from;for(let{from:s,to:l}of o.overlay)if((n>0?s<=r:s=r:l>r))return new yn(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new Sa(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,n=0){return Ko(this,e,n,!1)}resolveInner(e,n=0){return Ko(this,e,n,!0)}enterUnfinishedNodesBefore(e){return Z0(this,e)}getChild(e,n=null,i=null){let o=ba(this,e,n,i);return o.length?o[0]:null}getChildren(e,n=null,i=null){return ba(this,e,n,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return xa(this,e)}}function ba(t,e,n,i){let o=t.cursor(),r=[];if(!o.firstChild())return r;if(n!=null){for(;!o.type.is(n);)if(!o.nextSibling())return r}for(;;){if(i!=null&&o.type.is(i))return r;if(o.type.is(e)&&r.push(o.node),!o.nextSibling())return i==null?r:[]}}function xa(t,e,n=e.length-1){for(let i=t.parent;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class hE{constructor(e,n,i,o){this.parent=e,this.buffer=n,this.index=i,this.start=o}}class An{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:o}=this.context,r=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.context.start,i);return r<0?null:new An(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,i=0){if(i&pt.ExcludeBuffers)return null;let{buffer:o}=this.context,r=o.findChild(this.index+4,o.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return r<0?null:new An(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new An(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new An(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}cursor(e=0){return new Sa(this,e)}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,o=this.index+4,r=i.buffer[this.index+3];if(r>o){let s=i.buffer[this.index+1];e.push(i.slice(o,r,s)),n.push(0)}return new ut(this.type,e,n,this.to-this.from)}resolve(e,n=0){return Ko(this,e,n,!1)}resolveInner(e,n=0){return Ko(this,e,n,!0)}enterUnfinishedNodesBefore(e){return Z0(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,n=null,i=null){let o=ba(this,e,n,i);return o.length?o[0]:null}getChildren(e,n=null,i=null){return ba(this,e,n,i)}get node(){return this}matchContext(e){return xa(this,e)}}class Sa{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof yn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:o}=this.buffer;return this.type=n||o.set.types[o.buffer[e]],this.from=i+o.buffer[e+1],this.to=i+o.buffer[e+2],!0}yield(e){return e?e instanceof yn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:o}=this.buffer,r=o.findChild(this.index+4,o.buffer[this.index+3],e,n-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&pt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&pt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&pt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let o=i<0?0:this.stack[i]+4;if(this.index!=o)return this.yieldBuf(n.findChild(o,this.index,-1,0,4))}else{let o=n.buffer[this.index+3];if(o<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:o}=this;if(o){if(e>0){if(this.index-1)for(let r=n+e,s=e<0?-1:i._tree.children.length;r!=s;r+=e){let l=i._tree.children[r];if(this.mode&pt.IncludeAnonymous||l instanceof mo||!l.type.isAnonymous||Lh(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let s=e;s;s=s._parent)if(s.index==o){if(o==this.index)return s;n=s,i=r+1;break e}o=this.stack[--r]}for(let o=i;o=0;r--){if(r<0)return xa(this.node,e,o);let s=i[n.buffer[this.stack[r]]];if(!s.isAnonymous){if(e[o]&&e[o]!=s.name)return!1;o--}}return!0}}function Lh(t){return t.children.some(e=>e instanceof mo||!e.type.isAnonymous||Lh(e))}function fE(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:o=H0,reused:r=[],minRepeatType:s=i.types.length}=t,l=Array.isArray(n)?new Wh(n,n.length):n,a=i.types,u=0,c=0;function d(b,k,x,$,W){let{id:Q,start:D,end:z,size:H}=l,L=c;for(;H<0;)if(l.next(),H==-1){let V=r[Q];x.push(V),$.push(D-b);return}else if(H==-3){u=Q;return}else if(H==-4){c=Q;return}else throw new RangeError(`Unrecognized record size: ${H}`);let S=a[Q],A,P,M=D-b;if(z-D<=o&&(P=v(l.pos-k,W))){let V=new Uint16Array(P.size-P.skip),R=l.pos-P.size,N=V.length;for(;l.pos>R;)N=w(P.start,V,N);A=new mo(V,z-P.start,i),M=P.start-b}else{let V=l.pos-H;l.next();let R=[],N=[],ne=Q>=s?Q:-1,j=0,ae=z;for(;l.pos>V;)ne>=0&&l.id==ne&&l.size>=0?(l.end<=ae-o&&(f(R,N,D,j,l.end,ae,ne,L),j=R.length,ae=l.end),l.next()):d(D,V,R,N,ne);if(ne>=0&&j>0&&j-1&&j>0){let X=h(S);A=zh(S,R,N,0,R.length,0,z-D,X,X)}else A=m(S,R,N,z-D,L-z)}x.push(A),$.push(M)}function h(b){return(k,x,$)=>{let W=0,Q=k.length-1,D,z;if(Q>=0&&(D=k[Q])instanceof ut){if(!Q&&D.type==b&&D.length==$)return D;(z=D.prop(Ae.lookAhead))&&(W=x[Q]+D.length+z)}return m(b,k,x,$,W)}}function f(b,k,x,$,W,Q,D,z){let H=[],L=[];for(;b.length>$;)H.push(b.pop()),L.push(k.pop()+x-W);b.push(m(i.types[D],H,L,Q-W,z-Q)),k.push(W-x)}function m(b,k,x,$,W=0,Q){if(u){let D=[Ae.contextHash,u];Q=Q?[D].concat(Q):[D]}if(W>25){let D=[Ae.lookAhead,W];Q=Q?[D].concat(Q):[D]}return new ut(b,k,x,$,Q)}function v(b,k){let x=l.fork(),$=0,W=0,Q=0,D=x.end-o,z={size:0,start:0,skip:0};e:for(let H=x.pos-b;x.pos>H;){let L=x.size;if(x.id==k&&L>=0){z.size=$,z.start=W,z.skip=Q,Q+=4,$+=4,x.next();continue}let S=x.pos-L;if(L<0||S=s?4:0,P=x.start;for(x.next();x.pos>S;){if(x.size<0)if(x.size==-3)A+=4;else break e;else x.id>=s&&(A+=4);x.next()}W=P,$+=L,Q+=A}return(k<0||$==b)&&(z.size=$,z.start=W,z.skip=Q),z.size>4?z:void 0}function w(b,k,x){let{id:$,start:W,end:Q,size:D}=l;if(l.next(),D>=0&&$4){let H=l.pos-(D-4);for(;l.pos>H;)x=w(b,k,x)}k[--x]=z,k[--x]=Q-b,k[--x]=W-b,k[--x]=$}else D==-3?u=$:D==-4&&(c=$);return x}let y=[],_=[];for(;l.pos>0;)d(t.start||0,t.bufferStart||0,y,_,-1);let T=(e=t.length)!==null&&e!==void 0?e:y.length?_[0]+y[0].length:0;return new ut(a[t.topID],y.reverse(),_.reverse(),T)}const Ip=new WeakMap;function Bl(t,e){if(!t.isAnonymous||e instanceof mo||e.type!=t)return 1;let n=Ip.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof ut)){n=1;break}n+=Bl(t,i)}Ip.set(e,n)}return n}function zh(t,e,n,i,o,r,s,l,a){let u=0;for(let m=i;m=c)break;x+=$}if(T==b+1){if(x>c){let $=m[b];f($.children,$.positions,0,$.children.length,v[b]+_);continue}d.push(m[b])}else{let $=v[T-1]+m[T-1].length-k;d.push(zh(t,m,v,b,T,k,$,null,a))}h.push(k+_-r)}}return f(e,n,i,o,0),(l||a)(d,h,s)}class pE{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let o=this.map.get(e);o||this.map.set(e,o=new Map),o.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof An?this.setBuffer(e.context.buffer,e.index,n):e instanceof yn&&this.map.set(e.tree,n)}get(e){return e instanceof An?this.getBuffer(e.context.buffer,e.index):e instanceof yn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class no{constructor(e,n,i,o,r=!1,s=!1){this.from=e,this.to=n,this.tree=i,this.offset=o,this.open=(r?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let o=[new no(0,e.length,e,0,!1,i)];for(let r of n)r.to>e.length&&o.push(r);return o}static applyChanges(e,n,i=128){if(!n.length)return e;let o=[],r=1,s=e.length?e[0]:null;for(let l=0,a=0,u=0;;l++){let c=l=i)for(;s&&s.from=h.from||d<=h.to||u){let f=Math.max(h.from,a)-u,m=Math.min(h.to,d)-u;h=f>=m?null:new no(f,m,h.tree,h.offset+u,l>0,!!c)}if(h&&o.push(h),s.to>d)break;s=rnew Ju(o.from,o.to)):[new Ju(0,0)]:[new Ju(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let o=this.startParse(e,n,i);for(;;){let r=o.advance();if(r)return r}}}class mE{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Ae({perNode:!0});class ka{constructor(e,n,i,o,r,s,l,a,u,c=0,d){this.p=e,this.stack=n,this.state=i,this.reducePos=o,this.pos=r,this.score=s,this.buffer=l,this.bufferBase=a,this.curContext=u,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let o=e.parser.context;return new ka(e,[],n,i,i,0,[],0,o?new Vp(o,o.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,o=e&65535,{parser:r}=this.p,s=r.dynamicPrecedence(o);if(s&&(this.score+=s),i==0){this.pushState(r.getGoto(this.state,o,!0),this.reducePos),o=2e3&&!(!((n=this.p.parser.nodeSet.types[o])===null||n===void 0)&&n.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(o,a)}storeNode(e,n,i,o=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(n==i)return;if(s.buffer[l-2]>=n){s.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,n,i,o);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>i;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,o>4&&(o-=4);this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=i,this.buffer[s+3]=o}}shift(e,n,i){let o=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,o),n<=this.p.parser.maxNode&&this.buffer.push(n,o,i,4);else{let r=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(r,1)||(this.reducePos=i)),this.pushState(r,o),this.shiftContext(n,o),n<=s.maxNode&&this.buffer.push(n,o,i,4)}}apply(e,n,i){e&65536?this.reduce(e):this.shift(e,n,i)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let o=this.pos;this.reducePos=this.pos=o+e.length,this.pushState(n,o),this.buffer.push(i,o,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),o=e.bufferBase+n;for(;e&&o==e.bufferBase;)e=e.parent;return new ka(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,o,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new gE(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let o=[];for(let r=0,s;ra&1&&l==s)||o.push(n[r],s)}n=o}let i=[];for(let o=0;o>19,o=n&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],o,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(o,r)=>{if(!n.includes(o))return n.push(o),e.allActions(o,s=>{if(!(s&393216))if(s&65536){let l=(s>>19)-r;if(l>1){let a=s&65535,u=this.stack.length-l*3;if(u>=0&&e.getGoto(this.stack[u],a,!1)>=0)return l<<19|65536|a}}else{let l=i(s,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Vp{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class gE{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let o=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=o}}class Ta{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Ta(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Ta(this.stack,this.pos,this.index)}}function el(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,o=0;i=92&&s--,s>=34&&s--;let a=s-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}n?n[o++]=r:n=new e(r)}return n}class Wl{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Bp=new Wl;class vE{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Bp,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,o=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(o==this.ranges.length-1)return null;let s=this.ranges[++o];r+=s.from-i.to,i=s}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,o;if(n>=0&&n=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),o=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),o}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Bp,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let o of this.ranges){if(o.from>=n)break;o.to>e&&(i+=this.input.read(Math.max(o.from,e),Math.min(o.to,n)))}return i}}class Vo{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;yE(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Vo.prototype.contextual=Vo.prototype.fallback=Vo.prototype.extend=!1;Vo.prototype.fallback=Vo.prototype.extend=!1;class _u{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function yE(t,e,n,i,o,r){let s=0,l=1<0){let m=t[f];if(a.allows(m)&&(e.token.value==-1||e.token.value==m||OE(m,e.token.value,o,r))){e.acceptToken(m);break}}let c=e.next,d=0,h=t[s+2];if(e.next<0&&h>d&&t[u+h*3-3]==65535&&t[u+h*3-3]==65535){s=t[u+h*3-1];continue e}for(;d>1,m=u+f+(f<<1),v=t[m],w=t[m+1]||65536;if(c=w)d=f+1;else{s=t[m+2],e.advance();continue e}}break}}function Wp(t,e,n){for(let i=e,o;(o=t[i])!=65535;i++)if(o==n)return i-e;return-1}function OE(t,e,n,i){let o=Wp(n,i,e);return o<0||Wp(n,i,t)e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class wE{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Lp(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Lp(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(r instanceof ut){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+r.length}}}class _E{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Wl)}getActions(e){let n=0,i=null,{parser:o}=e.p,{tokenizers:r}=o,s=o.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let u=0;ud.end+25&&(a=Math.max(d.lookAhead,a)),d.value!=0)){let h=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(i=d,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Wl,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Wl,{pos:i,p:o}=e;return n.start=i,n.end=Math.min(i+1,o.stream.end),n.value=i==o.stream.end?o.parser.eofTerm:0,n}updateCachedToken(e,n,i){let o=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(o,e),i),e.value>-1){let{parser:r}=i.p;for(let s=0;s=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(o+1)}putAction(e,n,i,o){for(let r=0;re.bufferLength*4?new wE(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],o,r;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sn)i.push(l);else{if(this.advanceStack(l,i,e))continue;{o||(o=[],r=[]),o.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let s=o&&kE(o);if(s)return Ut&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Ut&&o&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&o){let s=this.stoppedAt!=null&&o[0].pos>this.stoppedAt?o[0]:this.runRecovery(o,r,i);if(s)return Ut&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(i.length>s)for(i.sort((l,a)=>a.score-l.score);i.length>s;)i.pop();i.some(l=>l.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let s=0;s500&&u.buffer.length>500)if((l.score-u.score||l.buffer.length-u.buffer.length)>0)i.splice(a--,1);else{i.splice(s--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&o>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(o);d;){let h=this.parser.nodeSet.types[d.type.id]==d.type?r.getGoto(e.state,d.type.id):-1;if(h>-1&&d.length&&(!u||(d.prop(Ae.contextHash)||0)==c))return e.useNode(d,h),Ut&&console.log(s+this.stackID(e)+` (via reuse of ${r.getName(d.type.id)})`),!0;if(!(d instanceof ut)||d.children.length==0||d.positions[0]>0)break;let f=d.children[0];if(f instanceof ut&&d.positions[0]==0)d=f;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Ut&&console.log(s+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let u=0;uo?n.push(m):i.push(m)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return zp(e,n),!0}}runRecovery(e,n,i){let o=null,r=!1;for(let s=0;s ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Ut&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let d=l.split(),h=c;for(let f=0;d.forceReduce()&&f<10&&(Ut&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)Ut&&(h=this.stackID(d)+" -> ");for(let f of l.recoverByInsert(a))Ut&&console.log(c+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,i);this.stream.end>l.pos?(u==l.pos&&(u++,a=0),l.recoverByDelete(a,u),Ut&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),zp(l,i)):(!o||o.scoret;class SE{constructor(e){this.start=e.start,this.shift=e.shift||tc,this.reduce=e.reduce||tc,this.reuse=e.reuse||tc,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ts extends K0{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;le.topRules[l][1]),o=[];for(let l=0;l=0)r(c,a,l[u++]);else{let d=l[u+-c];for(let h=-c;h>0;h--)r(l[u++],a,d);u++}}}this.nodeSet=new Bh(n.map((l,a)=>Xt.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:o[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=H0;let s=el(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new Vo(s,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let o=new bE(this,e,n,i);for(let r of this.wrappers)o=r(o,e,n,i);return o}getGoto(e,n,i=!1){let o=this.goto;if(n>=o[0])return-1;for(let r=o[n+1];;){let s=o[r++],l=s&1,a=o[r++];if(l&&i)return a;for(let u=r+(s>>1);r0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),o=i?n(i):void 0;for(let r=this.stateSlot(e,1);o==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Zn(this.data,r+2);else break;o=n(Zn(this.data,r+1))}return o}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Zn(this.data,i+2);else break;if(!(this.data[i+2]&1)){let o=this.data[i+1];n.some((r,s)=>s&1&&r==o)||n.push(this.data[i],o)}}return n}configure(e){let n=Object.assign(Object.create(ts.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let o=e.tokenizers.find(r=>r.from==i);return o?o.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,o)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let s=Object.assign(Object.assign({},i),{external:r.to});return n.specializers[o]=Xp(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let r of e.split(" ")){let s=n.indexOf(r);s>=0&&(i[s]=!0)}let o=null;for(let r=0;ri)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,i)<<1|e}return t.get}let TE=0;class $n{constructor(e,n,i){this.set=e,this.base=n,this.modified=i,this.id=TE++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let n=new $n([],null,[]);if(n.set.push(n),e)for(let i of e.set)n.set.push(i);return n}static defineModifier(){let e=new Pa;return n=>n.modified.indexOf(e)>-1?n:Pa.get(n.base||n,n.modified.concat(e).sort((i,o)=>i.id-o.id))}}let PE=0;class Pa{constructor(){this.instances=[],this.id=PE++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(l=>l.base==e&&CE(n,l.modified));if(i)return i;let o=[],r=new $n(o,e,n);for(let l of n)l.instances.push(r);let s=$E(n);for(let l of e.set)if(!l.modified.length)for(let a of s)o.push(Pa.get(l,a));return r}}function CE(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function $E(t){let e=[[]];for(let n=0;ni.length-n.length)}function Xh(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let o of n.split(" "))if(o){let r=[],s=2,l=o;for(let d=0;;){if(l=="..."&&d>0&&d+3==o.length){s=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+o);if(r.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),d+=h[0].length,d==o.length)break;let f=o[d++];if(d==o.length&&f=="!"){s=0;break}if(f!="/")throw new RangeError("Invalid path: "+o);l=o.slice(d)}let a=r.length-1,u=r[a];if(!u)throw new RangeError("Invalid path: "+o);let c=new Ca(i,s,a>0?r.slice(0,a):null);e[u]=c.sort(e[u])}}return J0.add(e)}const J0=new Ae;class Ca{constructor(e,n,i,o){this.tags=e,this.mode=n,this.context=i,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let s=o;for(let l of r)for(let a of l.set){let u=n[a.id];if(u){s=s?s+" "+u:u;break}}return s},scope:i}}function EE(t,e){let n=null;for(let i of t){let o=i.style(e);o&&(n=n?n+" "+o:o)}return n}function ME(t,e,n,i=0,o=t.length){let r=new AE(i,Array.isArray(e)?e:[e],n);r.highlightRange(t.cursor(),i,o,"",r.highlighters),r.flush(o)}class AE{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,o,r){let{type:s,from:l,to:a}=e;if(l>=i||a<=n)return;s.isTop&&(r=this.highlighters.filter(f=>!f.scope||f.scope(s)));let u=o,c=DE(e)||Ca.empty,d=EE(r,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(o+=(o?" ":"")+d)),this.startSpan(Math.max(n,l),u),c.opaque)return;let h=e.tree&&e.tree.prop(Ae.mounted);if(h&&h.overlay){let f=e.node.enter(h.overlay[0].from+l,1),m=this.highlighters.filter(w=>!w.scope||w.scope(h.tree.type)),v=e.firstChild();for(let w=0,y=l;;w++){let _=w=T||!e.nextSibling())););if(!_||T>i)break;y=_.to+l,y>n&&(this.highlightRange(f.cursor(),Math.max(n,_.from+l),Math.min(i,y),"",m),this.startSpan(Math.min(i,y),u))}v&&e.parent()}else if(e.firstChild()){h&&(o="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,o,r),this.startSpan(Math.min(i,e.to),u)}while(e.nextSibling());e.parent()}}}function DE(t){let e=t.type.prop(J0);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const fe=$n.define,tl=fe(),gi=fe(),Up=fe(gi),Yp=fe(gi),vi=fe(),nl=fe(vi),nc=fe(vi),Tn=fe(),Bi=fe(Tn),xn=fe(),Sn=fe(),sd=fe(),gr=fe(sd),il=fe(),B={comment:tl,lineComment:fe(tl),blockComment:fe(tl),docComment:fe(tl),name:gi,variableName:fe(gi),typeName:Up,tagName:fe(Up),propertyName:Yp,attributeName:fe(Yp),className:fe(gi),labelName:fe(gi),namespace:fe(gi),macroName:fe(gi),literal:vi,string:nl,docString:fe(nl),character:fe(nl),attributeValue:fe(nl),number:nc,integer:fe(nc),float:fe(nc),bool:fe(vi),regexp:fe(vi),escape:fe(vi),color:fe(vi),url:fe(vi),keyword:xn,self:fe(xn),null:fe(xn),atom:fe(xn),unit:fe(xn),modifier:fe(xn),operatorKeyword:fe(xn),controlKeyword:fe(xn),definitionKeyword:fe(xn),moduleKeyword:fe(xn),operator:Sn,derefOperator:fe(Sn),arithmeticOperator:fe(Sn),logicOperator:fe(Sn),bitwiseOperator:fe(Sn),compareOperator:fe(Sn),updateOperator:fe(Sn),definitionOperator:fe(Sn),typeOperator:fe(Sn),controlOperator:fe(Sn),punctuation:sd,separator:fe(sd),bracket:gr,angleBracket:fe(gr),squareBracket:fe(gr),paren:fe(gr),brace:fe(gr),content:Tn,heading:Bi,heading1:fe(Bi),heading2:fe(Bi),heading3:fe(Bi),heading4:fe(Bi),heading5:fe(Bi),heading6:fe(Bi),contentSeparator:fe(Tn),list:fe(Tn),quote:fe(Tn),emphasis:fe(Tn),strong:fe(Tn),link:fe(Tn),monospace:fe(Tn),strikethrough:fe(Tn),inserted:fe(),deleted:fe(),changed:fe(),invalid:fe(),meta:il,documentMeta:fe(il),annotation:fe(il),processingInstruction:fe(il),definition:$n.defineModifier(),constant:$n.defineModifier(),function:$n.defineModifier(),standard:$n.defineModifier(),local:$n.defineModifier(),special:$n.defineModifier()};ey([{tag:B.link,class:"tok-link"},{tag:B.heading,class:"tok-heading"},{tag:B.emphasis,class:"tok-emphasis"},{tag:B.strong,class:"tok-strong"},{tag:B.keyword,class:"tok-keyword"},{tag:B.atom,class:"tok-atom"},{tag:B.bool,class:"tok-bool"},{tag:B.url,class:"tok-url"},{tag:B.labelName,class:"tok-labelName"},{tag:B.inserted,class:"tok-inserted"},{tag:B.deleted,class:"tok-deleted"},{tag:B.literal,class:"tok-literal"},{tag:B.string,class:"tok-string"},{tag:B.number,class:"tok-number"},{tag:[B.regexp,B.escape,B.special(B.string)],class:"tok-string2"},{tag:B.variableName,class:"tok-variableName"},{tag:B.local(B.variableName),class:"tok-variableName tok-local"},{tag:B.definition(B.variableName),class:"tok-variableName tok-definition"},{tag:B.special(B.variableName),class:"tok-variableName2"},{tag:B.definition(B.propertyName),class:"tok-propertyName tok-definition"},{tag:B.typeName,class:"tok-typeName"},{tag:B.namespace,class:"tok-namespace"},{tag:B.className,class:"tok-className"},{tag:B.macroName,class:"tok-macroName"},{tag:B.propertyName,class:"tok-propertyName"},{tag:B.operator,class:"tok-operator"},{tag:B.comment,class:"tok-comment"},{tag:B.meta,class:"tok-meta"},{tag:B.invalid,class:"tok-invalid"},{tag:B.punctuation,class:"tok-punctuation"}]);const qE=Xh({String:B.string,Number:B.number,"True False":B.bool,PropertyName:B.propertyName,Null:B.null,",":B.separator,"[ ]":B.squareBracket,"{ }":B.brace}),RE=ts.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[qE],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});class Be{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){let o=[];return this.decompose(0,e,o,2),i.length&&i.decompose(0,i.length,o,3),this.decompose(n,this.length,o,1),En.from(o,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){let i=[];return this.decompose(e,n,i,0),En.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),o=new Vr(this),r=new Vr(e);for(let s=n,l=n;;){if(o.next(s),r.next(s),s=0,o.lineBreak!=r.lineBreak||o.done!=r.done||o.value!=r.value)return!1;if(l+=o.value.length,o.done||l>=i)return!0}}iter(e=1){return new Vr(this,e)}iterRange(e,n=this.length){return new ty(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let o=this.line(e).from;i=this.iterRange(o,Math.max(o,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new ny(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Be.empty:e.length<=32?new lt(e):En.from(lt.split(e,[]))}}class lt extends Be{constructor(e,n=QE(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,o){for(let r=0;;r++){let s=this.text[r],l=o+s.length;if((n?i:l)>=e)return new NE(o,l,i,s);o=l+1,i++}}decompose(e,n,i,o){let r=e<=0&&n>=this.length?this:new lt(jp(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(o&1){let s=i.pop(),l=Ll(r.text,s.text.slice(),0,r.length);if(l.length<=32)i.push(new lt(l,s.length+r.length));else{let a=l.length>>1;i.push(new lt(l.slice(0,a)),new lt(l.slice(a)))}}else i.push(r)}replace(e,n,i){if(!(i instanceof lt))return super.replace(e,n,i);let o=Ll(this.text,Ll(i.text,jp(this.text,0,e)),n),r=this.length+i.length-(n-e);return o.length<=32?new lt(o,r):En.from(lt.split(o,[]),r)}sliceString(e,n=this.length,i=` +`){let o="";for(let r=0,s=0;r<=n&&se&&s&&(o+=i),er&&(o+=l.slice(Math.max(0,e-r),n-r)),r=a+1}return o}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],o=-1;for(let r of e)i.push(r),o+=r.length+1,i.length==32&&(n.push(new lt(i,o)),i=[],o=-1);return o>-1&&n.push(new lt(i,o)),n}}class En extends Be{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,o){for(let r=0;;r++){let s=this.children[r],l=o+s.length,a=i+s.lines-1;if((n?a:l)>=e)return s.lineInner(e,n,i,o);o=l+1,i=a+1}}decompose(e,n,i,o){for(let r=0,s=0;s<=n&&r=s){let u=o&((s<=e?1:0)|(a>=n?2:0));s>=e&&a<=n&&!u?i.push(l):l.decompose(e-s,n-s,i,u)}s=a+1}}replace(e,n,i){if(i.lines=r&&n<=l){let a=s.replace(e-r,n-r,i),u=this.lines-s.lines+a.lines;if(a.lines>5-1&&a.lines>u>>5+1){let c=this.children.slice();return c[o]=a,new En(c,this.length-(n-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=` +`){let o="";for(let r=0,s=0;re&&r&&(o+=i),es&&(o+=l.sliceString(e-s,n-s,i)),s=a+1}return o}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof En))return 0;let i=0,[o,r,s,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;o+=n,r+=n){if(o==s||r==l)return i;let a=this.children[o],u=e.children[r];if(a!=u)return i+a.scanIdentical(u,n);i+=a.length+1}}static from(e,n=e.reduce((i,o)=>i+o.length+1,-1)){let i=0;for(let f of e)i+=f.lines;if(i<32){let f=[];for(let m of e)m.flatten(f);return new lt(f,n)}let o=Math.max(32,i>>5),r=o<<1,s=o>>1,l=[],a=0,u=-1,c=[];function d(f){let m;if(f.lines>r&&f instanceof En)for(let v of f.children)d(v);else f.lines>s&&(a>s||!a)?(h(),l.push(f)):f instanceof lt&&a&&(m=c[c.length-1])instanceof lt&&f.lines+m.lines<=32?(a+=f.lines,u+=f.length+1,c[c.length-1]=new lt(m.text.concat(f.text),m.length+1+f.length)):(a+f.lines>o&&h(),a+=f.lines,u+=f.length+1,c.push(f))}function h(){a!=0&&(l.push(c.length==1?c[0]:En.from(c,u)),u=-1,a=c.length=0)}for(let f of e)d(f);return h(),l.length==1?l[0]:new En(l,n)}}Be.empty=new lt([""],0);function QE(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ll(t,e,n=0,i=1e9){for(let o=0,r=0,s=!0;r=n&&(a>i&&(l=l.slice(0,i-o)),o0?1:(e instanceof lt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,o=this.nodes[i],r=this.offsets[i],s=r>>1,l=o instanceof lt?o.text.length:o.children.length;if(s==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(o instanceof lt){let a=o.text[s+(n<0?-1:0)];if(this.offsets[i]+=n,a.length>Math.max(0,e))return this.value=e==0?a:n>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=o.children[s+(n<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(n>0?1:(a instanceof lt?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ty{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Vr(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:o}=this.cursor.next(e);return this.pos+=(o.length+e)*n,this.value=o.length<=i?o:n<0?o.slice(o.length-i):o.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ny{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:o}=this.inner.next(e);return n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Be.prototype[Symbol.iterator]=function(){return this.iter()},Vr.prototype[Symbol.iterator]=ty.prototype[Symbol.iterator]=ny.prototype[Symbol.iterator]=function(){return this});class NE{constructor(e,n,i,o){this.from=e,this.to=n,this.number=i,this.text=o}get length(){return this.to-this.from}}let Bo="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=1;tt)return Bo[e-1]<=t;return!1}function Fp(t){return t>=127462&&t<=127487}const Hp=8205;function Et(t,e,n=!0,i=!0){return(n?iy:VE)(t,e,i)}function iy(t,e,n){if(e==t.length)return e;e&&oy(t.charCodeAt(e))&&ry(t.charCodeAt(e-1))&&e--;let i=St(t,e);for(e+=sn(i);e=0&&Fp(St(t,s));)r++,s-=2;if(r%2==0)break;e+=2}else break}return e}function VE(t,e,n){for(;e>0;){let i=iy(t,e-2,n);if(i=56320&&t<57344}function ry(t){return t>=55296&&t<56320}function St(t,e){let n=t.charCodeAt(e);if(!ry(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return oy(i)?(n-55296<<10)+(i-56320)+65536:n}function Uh(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function sn(t){return t<65536?1:2}const ld=/\r\n?|\n/;var Tt=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Tt||(Tt={}));class Qn{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return r+(e-o);r+=l}else{if(i!=Tt.Simple&&u>=e&&(i==Tt.TrackDel&&oe||i==Tt.TrackBefore&&oe))return null;if(u>e||u==e&&n<0&&!l)return e==o||n<0?r:r+a;r+=a}o=u}if(e>o)throw new RangeError(`Position ${e} is out of range for changeset of length ${o}`);return r}touchesRange(e,n=e){for(let i=0,o=0;i=0&&o<=n&&l>=e)return on?"cover":!0;o=l}return!1}toString(){let e="";for(let n=0;n=0?":"+o:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Qn(e)}static create(e){return new Qn(e)}}class ft extends Qn{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return ad(this,(n,i,o,r,s)=>e=e.replace(o,o+(i-n),s),!1),e}mapDesc(e,n=!1){return ud(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let o=0,r=0;o=0){n[o]=l,n[o+1]=s;let a=o>>1;for(;i.length0&&Si(i,n,r.text),r.forward(c),l+=c}let u=e[s++];for(;l>1].toJSON()))}return e}static of(e,n,i){let o=[],r=[],s=0,l=null;function a(c=!1){if(!c&&!o.length)return;sh||d<0||h>n)throw new RangeError(`Invalid change range ${d} to ${h} (in doc of length ${n})`);let m=f?typeof f=="string"?Be.of(f.split(i||ld)):f:Be.empty,v=m.length;if(d==h&&v==0)return;ds&&$t(o,d-s,-1),$t(o,h-d,v),Si(r,o,m),s=h}}return u(e),a(!l),l}static empty(e){return new ft(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let o=0;ol&&typeof s!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)n.push(r[0],0);else{for(;i.length=0&&n<=0&&n==t[o+1]?t[o]+=e:e==0&&t[o]==0?t[o+1]+=n:i?(t[o]+=e,t[o+1]+=n):t.push(e,n)}function Si(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)l=t.sections[s++],a=t.sections[s++];e(o,u,r,c,d),o=u,r=c}}}function ud(t,e,n,i=!1){let o=[],r=i?[]:null,s=new ns(t),l=new ns(e);for(let a=-1;;)if(s.ins==-1&&l.ins==-1){let u=Math.min(s.len,l.len);$t(o,u,-1),s.forward(u),l.forward(u)}else if(l.ins>=0&&(s.ins<0||a==s.i||s.off==0&&(l.len=0&&a=0){let u=0,c=s.len;for(;c;)if(l.ins==-1){let d=Math.min(c,l.len);u+=d,c-=d,l.forward(d)}else if(l.ins==0&&l.lena||s.ins>=0&&s.len>a)&&(l||i.length>u),r.forward2(a),s.forward(a)}}}}class ns{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Be.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Be.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Hi{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,n=-1){let i,o;return this.empty?i=o=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),o=e.mapPos(this.to,-1)),i==this.from&&o==this.to?this:new Hi(i,o,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return J.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return J.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return J.range(e.anchor,e.head)}static create(e,n,i){return new Hi(e,n,i)}}class J{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:J.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new J(e.ranges.map(n=>Hi.fromJSON(n)),e.main)}static single(e,n=e){return new J([J.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,o=0;oe?4:0)|r)}static normalized(e,n=0){let i=e[n];e.sort((o,r)=>o.from-r.from),n=e.indexOf(i);for(let o=1;or.head?J.range(a,l):J.range(l,a))}}return new J(e,n)}}function ly(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Yh=0;class Oe{constructor(e,n,i,o,r){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=o,this.id=Yh++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new Oe(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:jh),!!e.static,e.enables)}of(e){return new zl([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new zl(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new zl(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function jh(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class zl{constructor(e,n,i,o){this.dependencies=e,this.facet=n,this.type=i,this.value=o,this.id=Yh++}dynamicSlot(e){var n;let i=this.value,o=this.facet.compareInput,r=this.id,s=e[r]>>1,l=this.type==2,a=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?a=!0:d=="selection"?u=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||c.push(e[d.id]);return{create(d){return d.values[s]=i(d),1},update(d,h){if(a&&h.docChanged||u&&(h.docChanged||h.selection)||cd(d,c)){let f=i(d);if(l?!Gp(f,d.values[s],o):!o(f,d.values[s]))return d.values[s]=f,1}return 0},reconfigure:(d,h)=>{let f,m=h.config.address[r];if(m!=null){let v=Ea(h,m);if(this.dependencies.every(w=>w instanceof Oe?h.facet(w)===d.facet(w):w instanceof wt?h.field(w,!1)==d.field(w,!1):!0)||(l?Gp(f=i(d),v,o):o(f=i(d),v)))return d.values[s]=v,0}else f=i(d);return d.values[s]=f,1}}}}function Gp(t,e,n){if(t.length!=e.length)return!1;for(let i=0;it[a.id]),o=n.map(a=>a.type),r=i.filter(a=>!(a&1)),s=t[e.id]>>1;function l(a){let u=[];for(let c=0;ci===o),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Zp).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,o)=>{let r=i.values[n],s=this.updateF(r,o);return this.compareF(r,s)?0:(i.values[n]=s,1)},reconfigure:(i,o)=>o.config.address[this.id]!=null?(i.values[n]=o.field(this),0):(i.values[n]=this.create(i),1)}}init(e){return[this,Zp.of({field:this,create:e})]}get extension(){return this}}const Xi={lowest:4,low:3,default:2,high:1,highest:0};function vr(t){return e=>new ay(e,t)}const go={highest:vr(Xi.highest),high:vr(Xi.high),default:vr(Xi.default),low:vr(Xi.low),lowest:vr(Xi.lowest)};class ay{constructor(e,n){this.inner=e,this.prec=n}}class Cs{of(e){return new dd(this,e)}reconfigure(e){return Cs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class dd{constructor(e,n){this.compartment=e,this.inner=n}}class $a{constructor(e,n,i,o,r,s){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=o,this.staticValues=r,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,i){let o=[],r=Object.create(null),s=new Map;for(let h of WE(e,n,s))h instanceof wt?o.push(h):(r[h.facet.id]||(r[h.facet.id]=[])).push(h);let l=Object.create(null),a=[],u=[];for(let h of o)l[h.id]=u.length<<1,u.push(f=>h.slot(f));let c=i==null?void 0:i.config.facets;for(let h in r){let f=r[h],m=f[0].facet,v=c&&c[h]||[];if(f.every(w=>w.type==0))if(l[m.id]=a.length<<1|1,jh(v,f))a.push(i.facet(m));else{let w=m.combine(f.map(y=>y.value));a.push(i&&m.compare(w,i.facet(m))?i.facet(m):w)}else{for(let w of f)w.type==0?(l[w.id]=a.length<<1|1,a.push(w.value)):(l[w.id]=u.length<<1,u.push(y=>w.dynamicSlot(y)));l[m.id]=u.length<<1,u.push(w=>BE(w,m,f))}}let d=u.map(h=>h(l));return new $a(e,s,d,l,a,r)}}function WE(t,e,n){let i=[[],[],[],[],[]],o=new Map;function r(s,l){let a=o.get(s);if(a!=null){if(a<=l)return;let u=i[a].indexOf(s);u>-1&&i[a].splice(u,1),s instanceof dd&&n.delete(s.compartment)}if(o.set(s,l),Array.isArray(s))for(let u of s)r(u,l);else if(s instanceof dd){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(s.compartment)||s.inner;n.set(s.compartment,u),r(u,l)}else if(s instanceof ay)r(s.inner,s.prec);else if(s instanceof wt)i[l].push(s),s.provides&&r(s.provides,l);else if(s instanceof zl)i[l].push(s),s.facet.extensions&&r(s.facet.extensions,Xi.default);else{let u=s.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(u,l)}}return r(t,Xi.default),i.reduce((s,l)=>s.concat(l))}function Br(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let o=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|o}function Ea(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const uy=Oe.define(),cy=Oe.define({combine:t=>t.some(e=>e),static:!0}),dy=Oe.define({combine:t=>t.length?t[0]:void 0,static:!0}),hy=Oe.define(),fy=Oe.define(),py=Oe.define(),my=Oe.define({combine:t=>t.length?t[0]:!1});class di{constructor(e,n){this.type=e,this.value=n}static define(){return new LE}}class LE{of(e){return new di(this,e)}}class zE{constructor(e){this.map=e}of(e){return new Pe(this,e)}}class Pe{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Pe(this.type,n)}is(e){return this.type==e}static define(e={}){return new zE(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let o of e){let r=o.map(n);r&&i.push(r)}return i}}Pe.reconfigure=Pe.define();Pe.appendConfig=Pe.define();class gt{constructor(e,n,i,o,r,s){this.startState=e,this.changes=n,this.selection=i,this.effects=o,this.annotations=r,this.scrollIntoView=s,this._doc=null,this._state=null,i&&ly(i,n.newLength),r.some(l=>l.type==gt.time)||(this.annotations=r.concat(gt.time.of(Date.now())))}static create(e,n,i,o,r,s){return new gt(e,n,i,o,r,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(gt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}gt.time=di.define();gt.userEvent=di.define();gt.addToHistory=di.define();gt.remote=di.define();function XE(t,e){let n=[];for(let i=0,o=0;;){let r,s;if(i=t[i]))r=t[i++],s=t[i++];else if(o=0;o--){let r=i[o](t);r instanceof gt?t=r:Array.isArray(r)&&r.length==1&&r[0]instanceof gt?t=r[0]:t=vy(e,Wo(r),!1)}return t}function YE(t){let e=t.startState,n=e.facet(py),i=t;for(let o=n.length-1;o>=0;o--){let r=n[o](t);r&&Object.keys(r).length&&(i=gy(i,hd(e,r,t.changes.newLength),!0))}return i==t?t:gt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const jE=[];function Wo(t){return t==null?jE:Array.isArray(t)?t:[t]}var et=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(et||(et={}));const FE=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let fd;try{fd=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function HE(t){if(fd)return fd.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||FE.test(n)))return!0}return!1}function GE(t){return e=>{if(!/\S/.test(e))return et.Space;if(HE(e))return et.Word;for(let n=0;n-1)return et.Word;return et.Other}}class qe{constructor(e,n,i,o,r,s){this.config=e,this.doc=n,this.selection=i,this.values=o,this.status=e.statusTemplate.slice(),this.computeSlot=r,s&&(s._state=this);for(let l=0;lo.set(a,l)),n=null),o.set(s.value.compartment,s.value.extension)):s.is(Pe.reconfigure)?(n=null,i=s.value):s.is(Pe.appendConfig)&&(n=null,i=Wo(i).concat(s.value));let r;n?r=e.startState.values.slice():(n=$a.resolve(i,o,this),r=new qe(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new qe(n,e.newDoc,e.newSelection,r,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:J.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),o=this.changes(i.changes),r=[i.range],s=Wo(i.effects);for(let l=1;ls.spec.fromJSON(l,a)))}}return qe.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:n.extensions?o.concat([n.extensions]):o})}static create(e={}){let n=$a.resolve(e.extensions||[],new Map),i=e.doc instanceof Be?e.doc:Be.of((e.doc||"").split(n.staticFacet(qe.lineSeparator)||ld)),o=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return ly(o,i.length),n.staticFacet(cy)||(o=o.asSingle()),new qe(n,i,o,n.dynamicSlots.map(()=>null),(r,s)=>s.create(r),null)}get tabSize(){return this.facet(qe.tabSize)}get lineBreak(){return this.facet(qe.lineSeparator)||` +`}get readOnly(){return this.facet(my)}phrase(e,...n){for(let i of this.facet(qe.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,o)=>{if(o=="$")return"$";let r=+(o||1);return!r||r>n.length?i:n[r-1]})),e}languageDataAt(e,n,i=-1){let o=[];for(let r of this.facet(uy))for(let s of r(this,n,i))Object.prototype.hasOwnProperty.call(s,e)&&o.push(s[e]);return o}charCategorizer(e){return GE(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:o}=this.doc.lineAt(e),r=this.charCategorizer(e),s=e-i,l=e-i;for(;s>0;){let a=Et(n,s,!1);if(r(n.slice(a,s))!=et.Word)break;s=a}for(;lt.length?t[0]:4});qe.lineSeparator=dy;qe.readOnly=my;qe.phrases=Oe.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(o=>t[o]==e[o])}});qe.languageData=uy;qe.changeFilter=hy;qe.transactionFilter=fy;qe.transactionExtender=py;Cs.reconfigure=Pe.define();function zn(t,e,n={}){let i={};for(let o of t)for(let r of Object.keys(o)){let s=o[r],l=i[r];if(l===void 0)i[r]=s;else if(!(l===s||s===void 0))if(Object.hasOwnProperty.call(n,r))i[r]=n[r](l,s);else throw new Error("Config merge conflict for field "+r)}for(let o in e)i[o]===void 0&&(i[o]=e[o]);return i}class ao{eq(e){return this==e}range(e,n=e){return is.create(e,n,this)}}ao.prototype.startSide=ao.prototype.endSide=0;ao.prototype.point=!1;ao.prototype.mapMode=Tt.TrackDel;class is{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new is(e,n,i)}}function pd(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Fh{constructor(e,n,i,o){this.from=e,this.to=n,this.value=i,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,o=0){let r=i?this.to:this.from;for(let s=o,l=r.length;;){if(s==l)return s;let a=s+l>>1,u=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-n;if(a==s)return u>=0?s:l;u>=0?l=a:s=a+1}}between(e,n,i,o){for(let r=this.findIndex(n,-1e9,!0),s=this.findIndex(i,1e9,!1,r);rf||h==f&&u.startSide>0&&u.endSide<=0)continue;(f-h||u.endSide-u.startSide)<0||(s<0&&(s=h),u.point&&(l=Math.max(l,f-h)),i.push(u),o.push(h-s),r.push(f-s))}return{mapped:i.length?new Fh(o,r,i,l):null,pos:s}}}class Xe{constructor(e,n,i,o){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=o}static create(e,n,i,o){return new Xe(e,n,i,o)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:o=0,filterTo:r=this.length}=e,s=e.filter;if(n.length==0&&!s)return this;if(i&&(n=n.slice().sort(pd)),this.isEmpty)return n.length?Xe.of(n):this;let l=new yy(this,null,-1).goto(0),a=0,u=[],c=new Ai;for(;l.value||a=0){let d=n[a++];c.addInner(d.from,d.to,d.value)||u.push(d)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+s.length&&s.between(r,e-r,n-r,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return os.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return os.from(e).goto(n)}static compare(e,n,i,o,r=-1){let s=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=r),l=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=r),a=Kp(s,l,i),u=new yr(s,a,r),c=new yr(l,a,r);i.iterGaps((d,h,f)=>Jp(u,d,c,h,f,o)),i.empty&&i.length==0&&Jp(u,0,c,0,0,o)}static eq(e,n,i=0,o){o==null&&(o=1e9-1);let r=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),s=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=s.length)return!1;if(!r.length)return!0;let l=Kp(r,s),a=new yr(r,l,0).goto(i),u=new yr(s,l,0).goto(i);for(;;){if(a.to!=u.to||!md(a.active,u.active)||a.point&&(!u.point||!a.point.eq(u.point)))return!1;if(a.to>o)return!0;a.next(),u.next()}}static spans(e,n,i,o,r=-1){let s=new yr(e,null,r).goto(n),l=n,a=s.openStart;for(;;){let u=Math.min(s.to,i);if(s.point){let c=s.activeForPoint(s.to),d=s.pointFroml&&(o.span(l,u,s.active,a),a=s.openEnd(u));if(s.to>i)return a+(s.point&&s.to>i?1:0);l=s.to,s.next()}}static of(e,n=!1){let i=new Ai;for(let o of e instanceof is?[e]:n?ZE(e):e)i.add(o.from,o.to,o.value);return i.finish()}}Xe.empty=new Xe([],[],null,-1);function ZE(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(pd);e=i}return t}Xe.empty.nextLayer=Xe.empty;class Ai{finishChunk(e){this.chunks.push(new Fh(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new Ai)).add(e,n,i)}addInner(e,n,i){let o=e-this.lastTo||i.startSide-this.last.endSide;if(o<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return o<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(Xe.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Xe.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function Kp(t,e,n){let i=new Map;for(let r of t)for(let s=0;s=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&o.push(new yy(s,n,i,r));return o.length==1?o[0]:new os(o)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)ic(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)ic(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),ic(this.heap,0)}}}function ic(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let o=t[i];if(i+1=0&&(o=t[i+1],i++),n.compare(o)<0)break;t[i]=n,t[e]=o,e=i}}class yr{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=os.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){ol(this.active,e),ol(this.activeTo,e),ol(this.activeRank,e),this.minActive=em(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:o,rank:r}=this.cursor;for(;n-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>e){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),i&&ol(i,o)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[o]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function Jp(t,e,n,i,o,r){t.goto(e),n.goto(i);let s=i+o,l=i,a=i-e;for(;;){let u=t.to+a-n.to||t.endSide-n.endSide,c=u<0?t.to+a:n.to,d=Math.min(c,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&md(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(l,d,t.point,n.point):d>l&&!md(t.active,n.active)&&r.compareRange(l,d,t.active,n.active),c>s)break;l=c,u<=0&&t.next(),u>=0&&n.next()}}function md(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;i--)t[i+1]=t[i];t[e]=n}function em(t,e){let n=-1,i=1e9;for(let o=0;o=e)return o;if(o==t.length)break;r+=t.charCodeAt(o)==9?n-r%n:1,o=Et(t,o)}return i===!0?-1:t.length}const vd="ͼ",tm=typeof Symbol>"u"?"__"+vd:Symbol.for(vd),yd=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),nm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Di{constructor(e,n){this.rules=[];let{finish:i}=n||{};function o(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function r(s,l,a,u){let c=[],d=/^@(\w+)\b/.exec(s[0]),h=d&&d[1]=="keyframes";if(d&&l==null)return a.push(s[0]+";");for(let f in l){let m=l[f];if(/&/.test(f))r(f.split(/,\s*/).map(v=>s.map(w=>v.replace(/&/,w))).reduce((v,w)=>v.concat(w)),m,a);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+f+") should be a primitive value.");r(o(f),m,c,h)}else m!=null&&c.push(f.replace(/_.*/,"").replace(/[A-Z]/g,v=>"-"+v.toLowerCase())+": "+m+";")}(c.length||h)&&a.push((i&&!d&&!u?s.map(i):s).join(", ")+" {"+c.join(" ")+"}")}for(let s in e)r(o(s),e[s],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=nm[tm]||1;return nm[tm]=e+1,vd+e.toString(36)}static mount(e,n,i){let o=e[yd],r=i&&i.nonce;o?r&&o.setNonce(r):o=new KE(e,r),o.mount(Array.isArray(n)?n:[n])}}let im=new Map;class KE{constructor(e,n){let i=e.ownerDocument||e,o=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&o.CSSStyleSheet){let r=im.get(i);if(r)return e.adoptedStyleSheets=[r.sheet,...e.adoptedStyleSheets],e[yd]=r;this.sheet=new o.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],im.set(i,this)}else{this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[yd]=this}mount(e){let n=this.sheet,i=0,o=0;for(let r=0;r-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),n)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},JE=typeof navigator<"u"&&/Mac/.test(navigator.platform),eM=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var kt=0;kt<10;kt++)qi[48+kt]=qi[96+kt]=String(kt);for(var kt=1;kt<=24;kt++)qi[kt+111]="F"+kt;for(var kt=65;kt<=90;kt++)qi[kt]=String.fromCharCode(kt+32),rs[kt]=String.fromCharCode(kt);for(var oc in qi)rs.hasOwnProperty(oc)||(rs[oc]=qi[oc]);function tM(t){var e=JE&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||eM&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?rs:qi)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function Ma(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Od(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function nM(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Xl(t,e){if(!e.anchorNode)return!1;try{return Od(t,e.anchorNode)}catch{return!1}}function Jo(t){return t.nodeType==3?uo(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Aa(t,e,n,i){return n?om(t,e,n,i,-1)||om(t,e,n,i,1):!1}function Da(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function om(t,e,n,i,o){for(;;){if(t==n&&e==i)return!0;if(e==(o<0?0:Ri(t))){if(t.nodeName=="DIV")return!1;let r=t.parentNode;if(!r||r.nodeType!=1)return!1;e=Da(t)+(o<0?0:1),t=r}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=o<0?Ri(t):0}else return!1}}function Ri(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function bu(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function iM(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function oM(t,e,n,i,o,r,s,l){let a=t.ownerDocument,u=a.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let h,f=c==a.body;if(f)h=iM(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();h={left:w.left,right:w.left+c.clientWidth,top:w.top,bottom:w.top+c.clientHeight}}let m=0,v=0;if(o=="nearest")e.top0&&e.bottom>h.bottom+v&&(v=e.bottom-h.bottom+v+s)):e.bottom>h.bottom&&(v=e.bottom-h.bottom+s,n<0&&e.top-v0&&e.right>h.right+m&&(m=e.right-h.right+m+r)):e.right>h.right&&(m=e.right-h.right+r,n<0&&e.leftn.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;return null}class sM{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Ri(n):0),i,Math.min(e.focusOffset,i?Ri(i):0))}set(e,n,i,o){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=o}}let yo=null;function Oy(t){if(t.setActive)return t.setActive();if(yo)return t.focus(yo);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(yo==null?{get preventScroll(){return yo={preventScroll:!0},!0}}:void 0),!yo){yo=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}class Qt{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new Qt(e.parentNode,Da(e),n)}static after(e,n){return new Qt(e.parentNode,Da(e)+1,n)}}const Hh=[];class Fe{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,o=null,r;for(let s of this.children){if(s.flags&7){if(!s.dom&&(r=o?o.nextSibling:i.firstChild)){let l=Fe.get(r);(!l||!l.parent&&l.canReuseDOM(s))&&s.reuseDOM(r)}s.sync(e,n),s.flags&=-8}if(r=o?o.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&r!=s.dom&&(n.written=!0),s.dom.parentNode==i)for(;r&&r!=s.dom;)r=sm(r);else i.insertBefore(s.dom,r);o=s.dom}for(r=o?o.nextSibling:i.firstChild,r&&n&&n.node==i&&(n.written=!0);r;)r=sm(r)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let o=Ri(e)==0?0:n==0?-1:1;for(;;){let r=e.parentNode;if(r==this.dom)break;o==0&&r.firstChild!=r.lastChild&&(e==r.firstChild?o=-1:o=1),e=r}o<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!Fe.get(i);)i=i.nextSibling;if(!i)return this.length;for(let o=0,r=0;;o++){let s=this.children[o];if(s.dom==i)return r;r+=s.length+s.breakAfter}}domBoundsAround(e,n,i=0){let o=-1,r=-1,s=-1,l=-1;for(let a=0,u=i,c=i;an)return d.domBoundsAround(e,n,u);if(h>=e&&o==-1&&(o=a,r=u),u>n&&d.dom.parentNode==this.dom){s=a,l=c;break}c=h,u=h+d.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=Hh){this.markDirty();for(let o=e;othis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function xy(t,e,n,i,o,r,s,l,a){let{children:u}=t,c=u.length?u[e]:null,d=r.length?r[r.length-1]:null,h=d?d.breakAfter:s;if(!(e==i&&c&&!s&&!h&&r.length<2&&c.merge(n,o,r.length?d:null,n==0,l,a))){if(i0&&(!s&&r.length&&c.merge(n,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(nr)&&this.lineBreak(),o=s}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,s=1,l;if(this.lineSeparator?(r=n.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(l=o.exec(n))&&(r=l.index,s=l[0].length),this.append(n.slice(i,r<0?n.length:r)),r<0)break;if(this.lineBreak(),s>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=s-1);i=r+s}}readNode(e){if(e.cmIgnore)return;let n=Fe.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let o=i.iter();!o.next().done;)o.lineBreak?this.lineBreak():this.append(o.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(n,i.offset))}}function lm(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class am{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}let Zt=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},wd=typeof document<"u"?document:{documentElement:{style:{}}};const _d=/Edge\/(\d+)/.exec(Zt.userAgent),Ty=/MSIE \d/.test(Zt.userAgent),bd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Zt.userAgent),xu=!!(Ty||bd||_d),um=!xu&&/gecko\/(\d+)/i.test(Zt.userAgent),rc=!xu&&/Chrome\/(\d+)/.exec(Zt.userAgent),cm="webkitFontSmoothing"in wd.documentElement.style,Py=!xu&&/Apple Computer/.test(Zt.vendor),dm=Py&&(/Mobile\/\w+/.test(Zt.userAgent)||Zt.maxTouchPoints>2);var we={mac:dm||/Mac/.test(Zt.platform),windows:/Win/.test(Zt.platform),linux:/Linux|X11/.test(Zt.platform),ie:xu,ie_version:Ty?wd.documentMode||6:bd?+bd[1]:_d?+_d[1]:0,gecko:um,gecko_version:um?+(/Firefox\/(\d+)/.exec(Zt.userAgent)||[0,0])[1]:0,chrome:!!rc,chrome_version:rc?+rc[1]:0,ios:dm,android:/Android\b/.test(Zt.userAgent),webkit:cm,safari:Py,webkit_version:cm?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:wd.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const uM=256;class Bn extends Fe{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof Bn)||this.length-(n-e)+i.length>uM||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Bn(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new Qt(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return cM(this.dom,e,n)}}class li extends Fe{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let o of n)o.setParent(this)}setAttrs(e){if(wy(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,o,r,s){return i&&(!(i instanceof li&&i.mark.eq(this.mark))||e&&r<=0||ne&&n.push(i=e&&(o=r),i=a,r++}let s=this.length-e;return this.length=e,o>-1&&(this.children.length=o,this.markDirty()),new li(this.mark,n,s)}domAtPos(e){return Cy(this,e)}coordsAt(e,n){return Ey(this,e,n)}}function cM(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let o=e,r=e,s=0;e==0&&n<0||e==i&&n>=0?we.chrome||we.gecko||(e?(o--,s=1):r=0)?0:l.length-1];return we.safari&&!s&&a.width==0&&(a=Array.prototype.find.call(l,u=>u.width)||a),s?bu(a,s<0):a||null}class ki extends Fe{static create(e,n,i){return new ki(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=ki.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,n,i,o,r,s){return i&&(!(i instanceof ki)||!this.widget.compare(i.widget)||e>0&&r<=0||n0)?Qt.before(this.dom):Qt.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let o=this.dom.getClientRects(),r=null;if(!o.length)return null;let s=this.side?this.side<0:e>0;for(let l=s?o.length-1:0;r=o[l],!(e>0?l==0:l==o.length-1||r.top0?Qt.before(this.dom):Qt.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Be.empty}get isHidden(){return!0}}Bn.prototype.children=ki.prototype.children=er.prototype.children=Hh;function Cy(t,e){let n=t.dom,{children:i}=t,o=0;for(let r=0;or&&e0;r--){let s=i[r-1];if(s.dom.parentNode==n)return s.domAtPos(s.length)}for(let r=o;r0&&e instanceof li&&o.length&&(i=o[o.length-1])instanceof li&&i.mark.eq(e.mark)?$y(i,e.children[0],n-1):(o.push(e),e.setParent(t)),t.length+=e.length}function Ey(t,e,n){let i=null,o=-1,r=null,s=-1;function l(u,c){for(let d=0,h=0;d=c&&(f.children.length?l(f,c-h):(!r||r.isHidden&&n>0)&&(m>c||h==m&&f.getSide()>0)?(r=f,s=c-h):(h-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let r of i)if(r!=n&&(o.indexOf(r)==-1||t[r]!==e[r]))return!1;return!0}function Sd(t,e,n){let i=!1;if(e)for(let o in e)n&&o in n||(i=!0,o=="style"?t.style.cssText="":t.removeAttribute(o));if(n)for(let o in n)e&&e[o]==n[o]||(i=!0,o=="style"?t.style.cssText=n[o]:t.setAttribute(o,n[o]));return i}function hM(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Qi(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,o;if(e.isBlockGap)i=-5e8,o=4e8;else{let{start:r,end:s}=My(e,n);i=(r?n?-3e8:-1:5e8)-1,o=(s?n?2e8:1:-6e8)+1}return new Qi(e,i,o,n,e.widget||null,!0)}static line(e){return new Es(e)}static set(e,n=!1){return Xe.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}xe.none=Xe.empty;class $s extends xe{constructor(e){let{start:n,end:i}=My(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof $s&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&Gh(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}$s.prototype.point=!1;class Es extends xe{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Es&&this.spec.class==e.spec.class&&Gh(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Es.prototype.mapMode=Tt.TrackBefore;Es.prototype.point=!0;class Qi extends xe{constructor(e,n,i,o,r,s){super(n,i,r,e),this.block=o,this.isReplace=s,this.mapMode=o?n<=0?Tt.TrackBefore:Tt.TrackAfter:Tt.TrackDel}get type(){return this.startSide=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Qi&&fM(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Qi.prototype.point=!0;function My(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function fM(t,e){return t==e||!!(t&&e&&t.compare(e))}function kd(t,e,n,i=0){let o=n.length-1;o>=0&&n[o]+i>=t?n[o]=Math.max(n[o],e):n.push(t,e)}class qt extends Fe{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,o,r,s){if(i){if(!(i instanceof qt))return!1;this.dom||i.transferDOM(this)}return o&&this.setDeco(i?i.attrs:null),Sy(this,e,n,i?i.children:[],r,s),!0}split(e){let n=new qt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:o}=this.childPos(e);o&&(n.append(this.children[i].split(o),0),this.children[i].merge(o,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Gh(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){$y(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=xd(n,this.attrs||{})),i&&(this.attrs=xd({class:i},this.attrs||{}))}domAtPos(e){return Cy(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(wy(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Sd(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let o=this.dom.lastChild;for(;o&&Fe.get(o)instanceof li;)o=o.lastChild;if(!o||!this.length||o.nodeName!="BR"&&((i=Fe.get(o))===null||i===void 0?void 0:i.isEditable)==!1&&(!we.ios||!this.children.some(r=>r instanceof Bn))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof Bn)||/[^ -~]/.test(i.text))return null;let o=Jo(i.dom);if(o.length!=1)return null;e+=o[0].width,n=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=Ey(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:o}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-o.lineHeight)<2&&o.textHeight=n){if(r instanceof qt)return r;if(s>n)break}o=s+r.breakAfter}return null}}class io extends Fe{constructor(e,n,i){super(),this.widget=e,this.length=n,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,o,r,s){return i&&(!(i instanceof io)||!this.widget.compare(i.widget)||e>0&&r<=0||n0;){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let o=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(sl(new Bn(this.text.slice(this.textOff,this.textOff+o)),n),i),this.atCursorPos=!0,this.textOff+=o,e-=o,i=0}}span(e,n,i,o){this.buildText(n-e,i,o),this.pos=n,this.openStart<0&&(this.openStart=o)}point(e,n,i,o,r,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Qi){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(i instanceof Qi)if(i.block){let{type:a}=i;a==it.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new io(i.widget||new fm("div"),l,a))}else{let a=ki.create(i.widget||new fm("span"),l,l?0:i.startSide),u=this.atCursorPos&&!a.isEditable&&r<=o.length&&(e0),c=!a.isEditable&&(eo.length||i.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(o),u&&(d.append(sl(new er(1),o),r),r=o.length+Math.max(0,r-o.length)),d.append(sl(a,o),r),this.atCursorPos=c,this.pendingBuffer=c?eo.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=r)}static build(e,n,i,o,r){let s=new Wr(e,n,i,r);return s.openEnd=Xe.spans(o,n,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}function sl(t,e){for(let n of e)t=new li(n,[t],t.length);return t}class fm extends Xn{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Ay=Oe.define(),Dy=Oe.define(),qy=Oe.define(),Ry=Oe.define(),Td=Oe.define(),Qy=Oe.define(),Ny=Oe.define(),Iy=Oe.define({combine:t=>t.some(e=>e)}),Vy=Oe.define({combine:t=>t.some(e=>e)});class qa{constructor(e,n="nearest",i="nearest",o=5,r=5){this.range=e,this.y=n,this.x=i,this.yMargin=o,this.xMargin=r}map(e){return e.empty?this:new qa(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const pm=Pe.define({map:(t,e)=>t.map(e)});function an(t,e,n){let i=t.facet(Ry);i.length?i[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Su=Oe.define({combine:t=>t.length?t[0]:!0});let pM=0;const Tr=Oe.define();class dt{constructor(e,n,i,o){this.id=e,this.create=n,this.domEventHandlers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:i,provide:o,decorations:r}=n||{};return new dt(pM++,e,i,s=>{let l=[Tr.of(s)];return r&&l.push(ss.of(a=>{let u=a.plugin(s);return u?r(u):xe.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return dt.define(i=>new e(i),n)}}class sc{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(an(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){an(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){an(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const By=Oe.define(),Zh=Oe.define(),ss=Oe.define(),Kh=Oe.define(),Wy=Oe.define();function mm(t,e,n){let i=t.state.facet(Wy);if(!i.length)return i;let o=i.map(s=>s instanceof Function?s(t):s),r=[];return Xe.spans(o,e,n,{point(){},span(s,l,a,u){let c=r;for(let d=a.length-1;d>=0;d--,u--){let h=a[d].spec.bidiIsolate,f;if(h!=null)if(u>0&&c.length&&(f=c[c.length-1]).to==s&&f.direction==h)f.to=l,c=f.inner;else{let m={from:s,to:l,direction:h,inner:[]};c.push(m),c=m.inner}}}}),r}const Ly=Oe.define();function zy(t){let e=0,n=0,i=0,o=0;for(let r of t.state.facet(Ly)){let s=r(t);s&&(s.left!=null&&(e=Math.max(e,s.left)),s.right!=null&&(n=Math.max(n,s.right)),s.top!=null&&(i=Math.max(i,s.top)),s.bottom!=null&&(o=Math.max(o,s.bottom)))}return{left:e,right:n,top:i,bottom:o}}const Pr=Oe.define();class un{constructor(e,n,i,o){this.fromA=e,this.toA=n,this.fromB=i,this.toB=o}join(e){return new un(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let o=e[n-1];if(!(o.fromA>i.toA)){if(o.toAc)break;r+=2}if(!a)return i;new un(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),s=a.toA,l=a.toB}}}class Ra{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=ft.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let o=[];this.changes.iterChangedRanges((r,s,l,a)=>o.push(new un(r,s,l,a))),this.changedRanges=o}static create(e,n,i){return new Ra(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var nt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(nt||(nt={}));const ls=nt.LTR,Xy=nt.RTL;function Uy(t){let e=[];for(let n=0;n=n){if(l.level==i)return s;(r<0||(o!=0?o<0?l.fromn:e[r].level>l.level))&&(r=s)}}if(r<0)throw new RangeError("Index out of range");return r}}function Yy(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;v-=3)if(kn[v+1]==-f){let w=kn[v+2],y=w&2?o:w&4?w&1?r:o:0;y&&(Ye[d]=Ye[kn[v]]=y),l=v;break}}else{if(kn.length==189)break;kn[l++]=d,kn[l++]=h,kn[l++]=a}else if((m=Ye[d])==2||m==1){let v=m==o;a=v?0:1;for(let w=l-3;w>=0;w-=3){let y=kn[w+2];if(y&2)break;if(v)kn[w+2]|=2;else{if(y&4)break;kn[w+2]|=4}}}}}function _M(t,e,n,i){for(let o=0,r=i;o<=n.length;o++){let s=o?n[o-1].to:t,l=oa;)m==w&&(m=n[--v].from,w=v?n[v-1].to:t),Ye[--m]=f;a=c}else r=u,a++}}}function Cd(t,e,n,i,o,r,s){let l=i%2?2:1;if(i%2==o%2)for(let a=e,u=0;aa&&s.push(new Ti(a,v.from,f));let w=v.direction==ls!=!(f%2);$d(t,w?i+1:i,o,v.inner,v.from,v.to,s),a=v.to}m=v.to}else{if(m==n||(c?Ye[m]!=l:Ye[m]==l))break;m++}h?Cd(t,a,m,i+1,o,h,s):ae;){let c=!0,d=!1;if(!u||a>r[u-1].to){let v=Ye[a-1];v!=l&&(c=!1,d=v==16)}let h=!c&&l==1?[]:null,f=c?i:i+1,m=a;e:for(;;)if(u&&m==r[u-1].to){if(d)break e;let v=r[--u];if(!c)for(let w=v.from,y=u;;){if(w==e)break e;if(y&&r[y-1].to==w)w=r[--y].from;else{if(Ye[w-1]==l)break e;break}}if(h)h.push(v);else{v.toYe.length;)Ye[Ye.length]=256;let i=[],o=e==ls?0:1;return $d(t,o,o,n,0,t.length,i),i}function jy(t){return[new Ti(0,t,0)]}let Fy="";function xM(t,e,n,i,o){var r;let s=i.head-t.from,l=-1;if(s==0){if(!o||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),l=0)}else if(s==t.length){if(o)return null;let h=e[e.length-1];h.level!=n&&(s=h.side(!0,n),l=e.length-1)}l<0&&(l=Ti.find(e,s,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc));let a=e[l];s==a.side(o,n)&&(a=e[l+=o?1:-1],s=a.side(!o,n));let u=o==(a.dir==n),c=Et(t.text,s,u);if(Fy=t.text.slice(Math.min(s,c),Math.max(s,c)),c!=a.side(o,n))return J.cursor(c+t.from,u?-1:1,a.level);let d=l==(o?e.length-1:0)?null:e[l+(o?1:-1)];return!d&&a.level!=n?J.cursor(o?t.to:t.from,o?-1:1,n):d&&d.level0&&n.length&&(n.every(({fromA:l,toA:a})=>athis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let i=this.view.inputState.composing<0?null:kM(this.view,e.changes);if(this.hasComposition){this.markedForComposition.clear();let{from:l,to:a}=this.hasComposition;n=new un(l,a,e.changes.mapPos(l,-1),e.changes.mapPos(a,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(we.ie||we.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,r=this.updateDeco(),s=CM(o,r,e.changes);return n=un.extendWithRanges(n,s),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:o}=this.view;o.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=we.chrome||we.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,s),this.flags&=-8,s&&(s.written||o.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(s=>s.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?o[s]:null;if(!l)break;let{fromA:a,toA:u,fromB:c,toB:d}=l,h,f,m,v;if(i&&i.range.fromBc){let b=Wr.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),k=Wr.build(this.view.state.doc,i.range.toB,d,this.decorations,this.dynamicDecorationMap);f=b.breakAtStart,m=b.openStart,v=k.openEnd;let x=this.compositionView(i);k.breakAtStart?x.breakAfter=1:k.content.length&&x.merge(x.length,x.length,k.content[0],!1,k.openStart,0)&&(x.breakAfter=k.content[0].breakAfter,k.content.shift()),b.content.length&&x.merge(0,0,b.content[b.content.length-1],!0,0,b.openEnd)&&b.content.pop(),h=b.content.concat(x).concat(k.content)}else({content:h,breakAtStart:f,openStart:m,openEnd:v}=Wr.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:w,off:y}=r.findPos(u,1),{i:_,off:T}=r.findPos(a,-1);xy(this,_,T,w,y,h,f,m,v)}i&&this.fixCompositionDOM(i)}compositionView(e){let n=new Bn(e.text.nodeValue);n.flags|=8;for(let{deco:o}of e.marks)n=new li(o,[n],n.length);let i=new qt;return i.append(n,0),i}fixCompositionDOM(e){let n=(r,s)=>{s.flags|=8,this.markedForComposition.add(s);let l=Fe.get(r);l!=s&&(l&&(l.dom=null),s.setDOM(r))},i=this.childPos(e.range.fromB,1),o=this.children[i.i];n(e.line,o);for(let r=e.marks.length-1;r>=-1;r--)i=o.childPos(i.off,1),o=o.children[i.i],n(r>=0?e.marks[r].node:e.text,o)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,o=i==this.dom,r=!o&&Xl(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(o||n||r))return;let s=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.domAtPos(l.anchor),u=l.empty?a:this.domAtPos(l.head);if(we.gecko&&l.empty&&!this.hasComposition&&SM(a)){let d=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(d,a.node.childNodes[a.offset]||null)),a=u=new Qt(d,0),s=!0}let c=this.view.observer.selectionRange;(s||!c.focusNode||!Aa(a.node,a.offset,c.anchorNode,c.anchorOffset)||!Aa(u.node,u.offset,c.focusNode,c.focusOffset))&&(this.view.observer.ignore(()=>{we.android&&we.chrome&&this.dom.contains(c.focusNode)&&$M(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Ma(this.view.root);if(d)if(l.empty){if(we.gecko){let h=TM(a.node,a.offset);if(h&&h!=3){let f=Gy(a.node,a.offset,h==1?1:-1);f&&(a=new Qt(f,h==1?0:f.nodeValue.length))}}d.collapse(a.node,a.offset),l.bidiLevel!=null&&c.caretBidiLevel!=null&&(c.caretBidiLevel=l.bidiLevel)}else if(d.extend){d.collapse(a.node,a.offset);try{d.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();l.anchor>l.head&&([a,u]=[u,a]),h.setEnd(u.node,u.offset),h.setStart(a.node,a.offset),d.removeAllRanges(),d.addRange(h)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,u)),this.impreciseAnchor=a.precise?null:new Qt(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new Qt(c.focusNode,c.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=Ma(e.root),{anchorNode:o,anchorOffset:r}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let s=qt.find(this,n.head);if(!s)return;let l=s.posAtStart;if(n.head==l||n.head==l+s.length)return;let a=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!a||!u||a.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);i.collapse(c.node,c.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&i.collapse(o,r)}nearest(e){for(let n=e;n;){let i=Fe.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;ns||e==s&&r.type!=it.WidgetBefore&&r.type!=it.WidgetAfter&&(!o||n==2||this.children[o-1].breakAfter||this.children[o-1].type==it.WidgetBefore&&n>-2))return r.coordsAt(e-s,n);i=s}}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),o=this.children[n];if(!(o instanceof qt))return null;for(;o.children.length;){let{i:l,off:a}=o.childPos(i,1);for(;;l++){if(l==o.children.length)return null;if((o=o.children[l]).length)break}i=a}if(!(o instanceof Bn))return null;let r=Et(o.text,i);if(r==i)return null;let s=uo(o.dom,i,r).getClientRects();return!s.length||s[0].top>=s[0].bottom?null:s[0]}measureVisibleLineHeights(e){let n=[],{from:i,to:o}=e,r=this.view.contentDOM.clientWidth,s=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==nt.LTR;for(let u=0,c=0;co)break;if(u>=i){let f=d.dom.getBoundingClientRect();if(n.push(f.height),s){let m=d.dom.lastChild,v=m?Jo(m):[];if(v.length){let w=v[v.length-1],y=a?w.right-f.left:f.right-w.left;y>l&&(l=y,this.minWidth=r,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?nt.RTL:nt.LTR}measureTextSize(){for(let r of this.children)if(r instanceof qt){let s=r.measureTextSize();if(s)return s}let e=document.createElement("div"),n,i,o;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Jo(e.firstChild)[0];n=e.getBoundingClientRect().height,i=r?r.width/27:7,o=r?r.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:o}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new by(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,o=0;;o++){let r=o==n.viewports.length?null:n.viewports[o],s=r?r.from-1:this.length;if(s>i){let l=n.lineBlockAt(s).bottom-n.lineBlockAt(i).top;e.push(xe.replace({widget:new vm(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,s))}if(!r)break;i=r.to+1}return xe.set(e)}updateDeco(){let e=this.view.state.facet(ss).map((n,i)=>(this.dynamicDecorationMap[i]=typeof n=="function")?n(this.view):n);for(let n=e.length;nn.anchor?-1:1),o;if(!i)return;!n.empty&&(o=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,o.left),top:Math.min(i.top,o.top),right:Math.max(i.right,o.right),bottom:Math.max(i.bottom,o.bottom)});let r=zy(this.view),s={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom};oM(this.view.scrollDOM,s,n.head-1)return null;a+=f.text.length}if(u=u.parentNode,!u)return null;let c=Fe.get(u);if(c){r=c.posAtStart+a,s=r+l;break}}}return{from:r,to:s,node:i}}function kM(t,e){let n=Hy(t,e.newLength-e.length);if(!n)return null;let{from:i,to:o,node:r}=n,s=e.mapPos(i,-1),l=e.mapPos(o,1),a=r.nodeValue;if(/[\n\r]/.test(a))return null;if(l-s!=a.length){let h=e.mapPos(i,1),f=e.mapPos(o,-1);if(f-h==a.length)s=h,l=f;else if(t.state.doc.sliceString(l-a.length,l)==a)s=l-a.length;else if(t.state.doc.sliceString(s,s+a.length)==a)l=s+a.length;else return null}let{main:u}=t.state.selection;if(t.state.doc.sliceString(s,l)!=a||s>u.head||l0)i=i.childNodes[o-1],o=Ri(i);else break}if(n>=0)for(let i=t,o=e;;){if(i.nodeType==3)return i;if(i.nodeType==1&&o=0)i=i.childNodes[o],o=0;else break}return null}function TM(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e0;){let u=Et(o.text,s,!1);if(i(o.text.slice(u,s))!=a)break;s=u}for(;lt?e.left-t:Math.max(0,t-e.right)}function AM(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function lc(t,e){return t.tope.top+1}function ym(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ed(t,e,n){let i,o,r,s,l=!1,a,u,c,d;for(let m=t.firstChild;m;m=m.nextSibling){let v=Jo(m);for(let w=0;wT||s==T&&r>_){i=m,o=y,r=_,s=T;let b=T?n0?w0)}_==0?n>y.bottom&&(!c||c.bottomy.top)&&(u=m,d=y):c&&lc(c,y)?c=Om(c,y.bottom):d&&lc(d,y)&&(d=ym(d,y.top))}}if(c&&c.bottom>=n?(i=a,o=c):d&&d.top<=n&&(i=u,o=d),!i)return{node:t,offset:0};let h=Math.max(o.left,Math.min(o.right,e));if(i.nodeType==3)return wm(i,h,n);if(l&&i.contentEditable!="false")return Ed(i,h,n);let f=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(o.left+o.right)/2?1:0);return{node:t,offset:f}}function wm(t,e,n){let i=t.nodeValue.length,o=-1,r=1e9,s=0;for(let l=0;ln?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d=(c.left+c.right)/2,f=h;if((we.chrome||we.gecko)&&uo(t,l).getBoundingClientRect().left==c.right&&(f=!h),d<=0)return{node:t,offset:l+(f?1:0)};o=l+(f?1:0),r=d}}}return{node:t,offset:o>-1?o:s>0?t.nodeValue.length:0}}function Zy(t,e,n,i=-1){var o,r;let s=t.contentDOM.getBoundingClientRect(),l=s.top+t.viewState.paddingTop,a,{docHeight:u}=t.viewState,{x:c,y:d}=e,h=d-l;if(h<0)return 0;if(h>u)return t.state.doc.length;for(let b=t.viewState.heightOracle.textHeight/2,k=!1;a=t.elementAtHeight(h),a.type!=it.Text;)for(;h=i>0?a.bottom+b:a.top-b,!(h>=0&&h<=u);){if(k)return n?null:0;k=!0,i=-i}d=l+h;let f=a.from;if(ft.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:_m(t,s,a,c,d);let m=t.dom.ownerDocument,v=t.root.elementFromPoint?t.root:m,w=v.elementFromPoint(c,d);w&&!t.contentDOM.contains(w)&&(w=null),w||(c=Math.max(s.left+1,Math.min(s.right-1,c)),w=v.elementFromPoint(c,d),w&&!t.contentDOM.contains(w)&&(w=null));let y,_=-1;if(w&&((o=t.docView.nearest(w))===null||o===void 0?void 0:o.isEditable)!=!1){if(m.caretPositionFromPoint){let b=m.caretPositionFromPoint(c,d);b&&({offsetNode:y,offset:_}=b)}else if(m.caretRangeFromPoint){let b=m.caretRangeFromPoint(c,d);b&&({startContainer:y,startOffset:_}=b,(!t.contentDOM.contains(y)||we.safari&&DM(y,_,c)||we.chrome&&qM(y,_,c))&&(y=void 0))}}if(!y||!t.docView.dom.contains(y)){let b=qt.find(t.docView,f);if(!b)return h>a.top+a.height/2?a.to:a.from;({node:y,offset:_}=Ed(b.dom,c,d))}let T=t.docView.nearest(y);if(!T)return null;if(T.isWidget&&((r=T.dom)===null||r===void 0?void 0:r.nodeType)==1){let b=T.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,a=Math.floor((o-n.top-(t.defaultLineHeight-l)*.5)/l);r+=a*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+gd(s,r,t.state.tabSize)}function DM(t,e,n){let i;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(let o=t.nextSibling;o;o=o.nextSibling)if(o.nodeType!=1||o.nodeName!="BR")return!1;return uo(t,i-1,i).getBoundingClientRect().left>n}function qM(t,e,n){if(e!=0)return!1;for(let o=t;;){let r=o.parentNode;if(!r||r.nodeType!=1||r.firstChild!=o)return!1;if(r.classList.contains("cm-line"))break;o=r}let i=t.nodeType==1?t.getBoundingClientRect():uo(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function Md(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let i of n.type)if(i.to>e||i.to==e&&(i.to==n.to||i.type==it.Text))return i}return n}function RM(t,e,n,i){let o=Md(t,e.head),r=!i||o.type!=it.Text||!(t.lineWrapping||o.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head);if(r){let s=t.dom.getBoundingClientRect(),l=t.textDirectionAt(o.from),a=t.posAtCoords({x:n==(l==nt.LTR)?s.right-1:s.left+1,y:(r.top+r.bottom)/2});if(a!=null)return J.cursor(a,n?-1:1)}return J.cursor(n?o.to:o.from,n?-1:1)}function bm(t,e,n,i){let o=t.state.doc.lineAt(e.head),r=t.bidiSpans(o),s=t.textDirectionAt(o.from);for(let l=e,a=null;;){let u=xM(o,r,s,l,n),c=Fy;if(!u){if(o.number==(n?t.state.doc.lines:1))return l;c=` +`,o=t.state.doc.line(o.number+(n?1:-1)),r=t.bidiSpans(o),u=J.cursor(n?o.from:o.to)}if(a){if(!a(c))return l}else{if(!i)return u;a=i(c)}l=u}}function QM(t,e,n){let i=t.state.charCategorizer(e),o=i(n);return r=>{let s=i(r);return o==et.Space&&(o=s),o==s}}function NM(t,e,n,i){let o=e.head,r=n?1:-1;if(o==(n?t.state.doc.length:0))return J.cursor(o,e.assoc);let s=e.goalColumn,l,a=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(o),c=t.documentTop;if(u)s==null&&(s=u.left-a.left),l=r<0?u.top:u.bottom;else{let f=t.viewState.lineBlockAt(o);s==null&&(s=Math.min(a.right-a.left,t.defaultCharacterWidth*(o-f.from))),l=(r<0?f.top:f.bottom)+c}let d=a.left+s,h=i??t.viewState.heightOracle.textHeight>>1;for(let f=0;;f+=10){let m=l+(h+f)*r,v=Zy(t,{x:d,y:m},!1,r);if(ma.bottom||(r<0?vo))return J.cursor(v,e.assoc,void 0,s)}}function Ul(t,e,n){for(;;){let i=0;for(let o of t)o.between(e-1,e+1,(r,s,l)=>{if(e>r&&eo(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:J.cursor(i,i{this.ignoreDuringComposition(o)||o.type=="keydown"&&this.keydown(e,o)||(this.mustFlushObserver(o)&&e.observer.forceFlush(),this.runCustomHandlers(o.type,e,o)?o.preventDefault():i(e,o))};for(let i in ct){let o=ct[i];e.contentDOM.addEventListener(i,r=>{xm(e,r)&&n(o,r)},Ad[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{if(i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&(n(ct.mousedown,i),!i.defaultPrevented&&i.button==2)){let o=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=o,200)}}),e.scrollDOM.addEventListener("drop",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&n(ct.drop,i)}),we.chrome&&we.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,we.safari&&e.contentDOM.addEventListener("input",()=>null),we.gecko&&KM(e.contentDOM.ownerDocument)}ensureHandlers(e,n){var i;let o;this.customHandlers=[];for(let r of n)if(o=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:o});for(let s in o)this.registeredEvents.indexOf(s)<0&&s!="scroll"&&(this.registeredEvents.push(s),e.contentDOM.addEventListener(s,l=>{xm(e,l)&&this.runCustomHandlers(s,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,n,i){for(let o of this.customHandlers){let r=o.handlers[e];if(r)try{if(r.call(o.plugin,i,n)||i.defaultPrevented)return!0}catch(s){an(n.state,s)}}return!1}runScrollHandlers(e,n){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let o=i.handlers.scroll;if(o)try{o.call(i.plugin,n,e)}catch(r){an(e.state,r)}}}keydown(e,n){if(this.lastKeyCode=n.keyCode,this.lastKeyTime=Date.now(),n.keyCode==9&&Date.now()o.keyCode==n.keyCode))&&!n.ctrlKey||VM.indexOf(n.key)>-1&&n.ctrlKey&&!n.shiftKey)?(this.pendingIOSKey=i||n,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let n=this.pendingIOSKey;return n?(this.pendingIOSKey=void 0,Lo(e.contentDOM,n.key,n.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:we.safari&&!we.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Ky=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],VM="dthko",Jy=[16,17,18,20,91,92,224,225],ll=6;function al(t){return Math.max(0,t)*.7+8}function BM(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class WM{constructor(e,n,i,o){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParent=rM(e.contentDOM),this.atoms=e.state.facet(Kh).map(s=>s(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(qe.allowMultipleSelections)&&LM(e,n),this.dragging=XM(e,n)&&iO(n)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var n;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&BM(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let i=0,o=0,r=((n=this.scrollParent)===null||n===void 0?void 0:n.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},s=zy(this.view);e.clientX-s.left<=r.left+ll?i=-al(r.left-e.clientX):e.clientX+s.right>=r.right-ll&&(i=al(e.clientX-r.right)),e.clientY-s.top<=r.top+ll?o=-al(r.top-e.clientY):e.clientY+s.bottom>=r.bottom-ll&&(o=al(e.clientY-r.bottom)),this.setScrollSpeed(i,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let i=0;ithis.select(this.lastEvent),20)}}function LM(t,e){let n=t.state.facet(Ay);return n.length?n[0](e):we.mac?e.metaKey:e.ctrlKey}function zM(t,e){let n=t.state.facet(Dy);return n.length?n[0](e):we.mac?!e.altKey:!e.ctrlKey}function XM(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=Ma(t.root);if(!i||i.rangeCount==0)return!0;let o=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&s.top<=e.clientY&&s.bottom>=e.clientY)return!0}return!1}function xm(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Fe.get(n))&&i.ignoreEvent(e))return!1;return!0}const ct=Object.create(null),Ad=Object.create(null),eO=we.ie&&we.ie_version<15||we.ios&&we.webkit_version<604;function UM(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),tO(t,n.value)},50)}function tO(t,e){let{state:n}=t,i,o=1,r=n.toText(e),s=r.lines==n.selection.ranges.length;if(Dd!=null&&n.selection.ranges.every(a=>a.empty)&&Dd==r.toString()){let a=-1;i=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==a)return{range:u};a=c.from;let d=n.toText((s?r.line(o++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:J.cursor(u.from+d.length)}})}else s?i=n.changeByRange(a=>{let u=r.line(o++);return{changes:{from:a.from,to:a.to,insert:u.text},range:J.cursor(a.from+u.length)}}):i=n.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ct.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select"),e.keyCode==27&&(t.inputState.lastEscPress=Date.now())};ct.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};ct.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Ad.touchstart=Ad.touchmove={passive:!0};ct.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let i of t.state.facet(qy))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=FM(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new WM(t,e,n,i)),i&&t.observer.ignore(()=>Oy(t.contentDOM)),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(e)}};function Sm(t,e,n,i){if(i==1)return J.cursor(e,n);if(i==2)return EM(t.state,e,n);{let o=qt.find(t.docView,e),r=t.state.doc.lineAt(o?o.posAtEnd:e),s=o?o.posAtStart:r.from,l=o?o.posAtEnd:r.to;return lt>=e.top&&t<=e.bottom,km=(t,e,n)=>nO(e,n)&&t>=n.left&&t<=n.right;function YM(t,e,n,i){let o=qt.find(t.docView,e);if(!o)return 1;let r=e-o.posAtStart;if(r==0)return 1;if(r==o.length)return-1;let s=o.coordsAt(r,-1);if(s&&km(n,i,s))return-1;let l=o.coordsAt(r,1);return l&&km(n,i,l)?1:s&&nO(i,s)?-1:1}function Tm(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:YM(t,n,e.clientX,e.clientY)}}const jM=we.ie&&we.ie_version<=11;let Pm=null,Cm=0,$m=0;function iO(t){if(!jM)return t.detail;let e=Pm,n=$m;return Pm=t,$m=Date.now(),Cm=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Cm+1)%3:1}function FM(t,e){let n=Tm(t,e),i=iO(e),o=t.state.selection;return{update(r){r.docChanged&&(n.pos=r.changes.mapPos(n.pos),o=o.map(r.changes))},get(r,s,l){let a=Tm(t,r),u,c=Sm(t,a.pos,a.bias,i);if(n.pos!=a.pos&&!s){let d=Sm(t,n.pos,n.bias,i),h=Math.min(d.from,c.from),f=Math.max(d.to,c.to);c=h1&&(u=HM(o,a.pos))?u:l?o.addRange(c):J.create([c])}}}function HM(t,e){for(let n=0;n=e)return J.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}ct.dragstart=(t,e)=>{let{selection:{main:n}}=t.state,{mouseSelection:i}=t.inputState;i&&(i.dragging=n),e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove")};function Em(t,e,n,i){if(!n)return;let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=t.inputState,s=i&&r&&r.dragging&&zM(t,e)?{from:r.dragging.from,to:r.dragging.to}:null,l={from:o,insert:n},a=t.state.changes(s?[s,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(o,-1),head:a.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"})}ct.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let n=e.dataTransfer.files;if(n&&n.length){e.preventDefault();let i=Array(n.length),o=0,r=()=>{++o==n.length&&Em(t,e,i.filter(s=>s!=null).join(t.state.lineBreak),!1)};for(let s=0;s{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[s]=l.result),r()},l.readAsText(n[s])}}else Em(t,e,e.dataTransfer.getData("Text"),!0)};ct.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let n=eO?null:e.clipboardData;n?(tO(t,n.getData("text/plain")||n.getData("text/uri-text")),e.preventDefault()):UM(t)};function GM(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function ZM(t){let e=[],n=[],i=!1;for(let o of t.selection.ranges)o.empty||(e.push(t.sliceDoc(o.from,o.to)),n.push(o));if(!e.length){let o=-1;for(let{from:r}of t.selection.ranges){let s=t.doc.lineAt(r);s.number>o&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),o=s.number}i=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:i}}let Dd=null;ct.copy=ct.cut=(t,e)=>{let{text:n,ranges:i,linewise:o}=ZM(t.state);if(!n&&!o)return;Dd=o?n:null;let r=eO?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",n)):GM(t,n),e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};const oO=di.define();function rO(t,e){let n=[];for(let i of t.facet(Ny)){let o=i(t,e);o&&n.push(o)}return n?t.update({effects:n,annotations:oO.of(!0)}):null}function sO(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=rO(t.state,e);n?t.dispatch(n):t.update([])}},10)}ct.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),sO(t)};ct.blur=t=>{t.observer.clearSelectionRange(),sO(t)};ct.compositionstart=ct.compositionupdate=t=>{t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)};ct.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,we.chrome&&we.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50)};ct.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ct.beforeinput=(t,e)=>{var n;let i;if(we.chrome&&we.android&&(i=Ky.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};const Mm=new Set;function KM(t){Mm.has(t)||(Mm.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Am=["pre-wrap","normal","pre-line","break-spaces"];class JM{constructor(e){this.lineWrapping=e,this.doc=Be.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Am.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i-1,a=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=o,this.lineLength=r,a){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,n){this.height!=n&&(Math.abs(this.height-n)>Yl&&(e.heightChanged=!0),this.height=n)}replace(e,n,i){return Nt.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,o){let r=this,s=i.doc;for(let l=o.length-1;l>=0;l--){let{fromA:a,toA:u,fromB:c,toB:d}=o[l],h=r.lineAt(a,He.ByPosNoHeight,i.setDoc(n),0,0),f=h.to>=u?h:r.lineAt(u,He.ByPosNoHeight,i,0,0);for(d+=f.to-u,u=f.to;l>0&&h.from<=o[l-1].toA;)a=o[l-1].fromA,c=o[l-1].fromB,l--,ar*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),i+=1+l.break,o-=l.size}else if(r>o*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(o=r&&s(this.blockAt(0,i,o,r))}updateHeight(e,n=0,i=!1,o){return o&&o.from<=n&&o.more&&this.setHeight(e,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ht extends lO{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,o){return new Mn(o,this.length,i,this.height,this.breaks)}replace(e,n,i){let o=i[0];return i.length==1&&(o instanceof Ht||o instanceof bt&&o.flags&4)&&Math.abs(this.length-o.length)<10?(o instanceof bt?o=new Ht(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):Nt.of(i)}updateHeight(e,n=0,i=!1,o){return o&&o.from<=n&&o.more?this.setHeight(e,o.heights[o.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class bt extends Nt{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,o=e.doc.lineAt(n+this.length).number,r=o-i+1,s,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);s=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else s=this.height/r;return{firstLine:i,lastLine:o,perLine:s,perChar:l}}blockAt(e,n,i,o){let{firstLine:r,lastLine:s,perLine:l,perChar:a}=this.heightMetrics(n,o);if(n.lineWrapping){let u=o+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),c=n.doc.lineAt(u),d=l+c.length*a,h=Math.max(i,e-d/2);return new Mn(c.from,c.length,h,d,0)}else{let u=Math.max(0,Math.min(s-r,Math.floor((e-i)/l))),{from:c,length:d}=n.doc.line(r+u);return new Mn(c,d,i+l*u,l,0)}}lineAt(e,n,i,o,r){if(n==He.ByHeight)return this.blockAt(e,i,o,r);if(n==He.ByPosNoHeight){let{from:f,to:m}=i.doc.lineAt(e);return new Mn(f,m-f,0,0,0)}let{firstLine:s,perLine:l,perChar:a}=this.heightMetrics(i,r),u=i.doc.lineAt(e),c=l+u.length*a,d=u.number-s,h=o+l*d+a*(u.from-r-d);return new Mn(u.from,u.length,Math.max(o,Math.min(h,o+this.height-c)),c,0)}forEachLine(e,n,i,o,r,s){e=Math.max(e,r),n=Math.min(n,r+this.length);let{firstLine:l,perLine:a,perChar:u}=this.heightMetrics(i,r);for(let c=e,d=o;c<=n;){let h=i.doc.lineAt(c);if(c==e){let m=h.number-l;d+=a*m+u*(e-r-m)}let f=a+u*h.length;s(new Mn(h.from,h.length,d,f,0)),d+=f,c=h.to+1}}replace(e,n,i){let o=this.length-n;if(o>0){let r=i[i.length-1];r instanceof bt?i[i.length-1]=new bt(r.length+o):i.push(null,new bt(o-1))}if(e>0){let r=i[0];r instanceof bt?i[0]=new bt(e+r.length):i.unshift(new bt(e-1),null)}return Nt.of(i)}decomposeLeft(e,n){n.push(new bt(e-1),null)}decomposeRight(e,n){n.push(null,new bt(this.length-e-1))}updateHeight(e,n=0,i=!1,o){let r=n+this.length;if(o&&o.from<=n+this.length&&o.more){let s=[],l=Math.max(n,o.from),a=-1;for(o.from>n&&s.push(new bt(o.from-n-1).updateHeight(e,n));l<=r&&o.more;){let c=e.doc.lineAt(l).length;s.length&&s.push(null);let d=o.heights[o.index++];a==-1?a=d:Math.abs(d-a)>=Yl&&(a=-2);let h=new Ht(c,d);h.outdated=!1,s.push(h),l+=c+1}l<=r&&s.push(null,new bt(r-l).updateHeight(e,l));let u=Nt.of(s);return(a<0||Math.abs(u.height-this.height)>=Yl||Math.abs(a-this.heightMetrics(e,n).perLine)>=Yl)&&(e.heightChanged=!0),u}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class tA extends Nt{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,o){let r=i+this.left.height;return el))return u;let c=n==He.ByPosNoHeight?He.ByPosNoHeight:He.ByPos;return a?u.join(this.right.lineAt(l,c,i,s,l)):this.left.lineAt(l,c,i,o,r).join(u)}forEachLine(e,n,i,o,r,s){let l=o+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,n,i,l,a,s);else{let u=this.lineAt(a,He.ByPos,i,o,r);e=e&&u.from<=n&&s(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,l,a,s)}}replace(e,n,i){let o=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-o,n-o,i));let r=[];e>0&&this.decomposeLeft(e,r);let s=r.length;for(let l of i)r.push(l);if(e>0&&Dm(r,s-1),n=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,o=i+this.break;if(e>=o)return this.right.decomposeRight(e-o,n);e2*n.size||n.size>2*e.size?Nt.of(this.break?[e,null,n]:[e,n]):(this.left=e,this.right=n,this.height=e.height+n.height,this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,o){let{left:r,right:s}=this,l=n+r.length+this.break,a=null;return o&&o.from<=n+r.length&&o.more?a=r=r.updateHeight(e,n,i,o):r.updateHeight(e,n,i),o&&o.from<=l+s.length&&o.more?a=s=s.updateHeight(e,l,i,o):s.updateHeight(e,l,i),a?this.balanced(r,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Dm(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof bt&&(i=t[e+1])instanceof bt&&t.splice(e-1,3,new bt(n.length+1+i.length))}const nA=5;class Jh{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),o=this.nodes[this.nodes.length-1];o instanceof Ht?o.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ht(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e=nA)&&this.addLineDeco(o,r,s)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ht(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new bt(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ht)return e;let n=new Ht(0,-1);return this.nodes.push(n),n}addBlock(e){var n;this.enterLine();let i=(n=e.deco)===null||n===void 0?void 0:n.type;i==it.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,i!=it.WidgetBefore&&(this.covering=e)}addLineDeco(e,n,i){let o=this.ensureLine();o.length+=i,o.collapsed+=i,o.widgetHeight=Math.max(o.widgetHeight,e),o.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ht)&&!this.isCovered?this.nodes.push(new Ht(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let h=c.getBoundingClientRect();r=Math.max(r,h.left),s=Math.min(s,h.right),l=Math.max(l,h.top),a=u==t.parentNode?h.bottom:Math.min(a,h.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:r-n.left,right:Math.max(r,s)-n.left,top:l-(n.top+e),bottom:Math.max(l,a)-(n.top+e)}}function sA(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class uc{constructor(e,n,i){this.from=e,this.to=n,this.size=i}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new JM(n),this.stateDeco=e.facet(ss).filter(i=>typeof i!="function"),this.heightMap=Nt.empty().applyChanges(this.stateDeco,Be.empty,this.heightOracle.setDoc(e.doc),[new un(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=xe.set(this.lineGaps.map(i=>i.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let o=i?n.head:n.anchor;if(!e.some(({from:r,to:s})=>o>=r&&o<=s)){let{from:r,to:s}=this.lineBlockAt(o);e.push(new ul(r,s))}}this.viewports=e.sort((i,o)=>i.from-o.from),this.scaler=this.heightMap.height<=7e6?Rm:new cA(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:Cr(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ss).filter(c=>typeof c!="function");let o=e.changedRanges,r=un.extendWithRanges(o,iA(i,this.stateDeco,e?e.changes:ft.empty(this.state.doc.length))),s=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=s&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,n));let u=!e.changes.empty||e.flags&2||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),u&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Vy)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),o=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?nt.RTL:nt.LTR;let s=this.heightOracle.mustRefreshForWrapping(r),l=n.getBoundingClientRect(),a=s||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,c=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;(this.paddingTop!=d||this.paddingBottom!=h)&&(this.paddingTop=d,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(o.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8),this.scrollTop!=e.scrollDOM.scrollTop&&(this.scrollAnchorHeight=-1,this.scrollTop=e.scrollDOM.scrollTop),this.scrolledToBottom=_y(e.scrollDOM);let f=(this.printing?sA:rA)(n,this.paddingTop),m=f.top-this.pixelViewport.top,v=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let y=l.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),a){let T=e.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(T)&&(s=!0),s||o.lineWrapping&&Math.abs(y-this.contentDOMWidth)>o.charWidth){let{lineHeight:b,charWidth:k,textHeight:x}=e.docView.measureTextSize();s=b>0&&o.refresh(r,b,k,x,y/k,T),s&&(e.docView.minWidth=0,u|=8)}m>0&&v>0?c=Math.max(m,v):m<0&&v<0&&(c=Math.min(m,v)),o.heightChanged=!1;for(let b of this.viewports){let k=b.from==this.viewport.from?T:e.docView.measureVisibleLineHeights(b);this.heightMap=(s?Nt.empty().applyChanges(this.stateDeco,Be.empty,this.heightOracle,[new un(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(o,0,s,new eA(b.from,k))}o.heightChanged&&(u|=2)}let _=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return _&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(u&2||_)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),o=this.heightMap,r=this.heightOracle,{visibleTop:s,visibleBottom:l}=this,a=new ul(o.lineAt(s-i*1e3,He.ByHeight,r,0,0).from,o.lineAt(l+(1-i)*1e3,He.ByHeight,r,0,0).to);if(n){let{head:u}=n.range;if(ua.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=o.lineAt(u,He.ByPos,r,0,0),h;n.y=="center"?h=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=l+Math.max(10,Math.min(i,250)))&&o>s-2*1e3&&r>1,s=o<<1;if(this.defaultTextDirection!=nt.LTR&&!i)return[];let l=[],a=(u,c,d,h)=>{if(c-uu&&ww.from>=d.from&&w.to<=d.to&&Math.abs(w.from-u)w.fromy));if(!v){if(cw.from<=c&&w.to>=c)){let w=n.moveToLineBoundary(J.cursor(c),!1,!0).head;w>u&&(c=w)}v=new uc(u,c,this.gapSize(d,u,c,h))}l.push(v)};for(let u of this.viewportLines){if(u.lengthu.from&&a(u.from,h,u,c),fn.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Xe.spans(e,this.viewport.from,this.viewport.to,{span(o,r){n.push({from:o,to:r})},point(){}},20);let i=n.length!=this.visibleRanges.length||this.visibleRanges.some((o,r)=>o.from!=n[r].from||o.to!=n[r].to);return this.visibleRanges=n,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Cr(this.heightMap.lineAt(e,He.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return Cr(this.heightMap.lineAt(this.scaler.fromDOM(e),He.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Cr(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ul{constructor(e,n){this.from=e,this.to=n}}function aA(t,e,n){let i=[],o=t,r=0;return Xe.spans(n,t,e,{span(){},point(s,l){s>o&&(i.push({from:o,to:s}),r+=s-o),o=l}},20),o=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let o=0;;o++){let{from:r,to:s}=e[o],l=s-r;if(i<=l)return r+i;i-=l}}function dl(t,e){let n=0;for(let{from:i,to:o}of t.ranges){if(e<=o){n+=e-i;break}n+=o-i}return n/t.total}function uA(t,e){for(let n of t)if(e(n))return n}const Rm={toDOM(t){return t},fromDOM(t){return t},scale:1};class cA{constructor(e,n,i){let o=0,r=0,s=0;this.viewports=i.map(({from:l,to:a})=>{let u=n.lineAt(l,He.ByPos,e,0,0).top,c=n.lineAt(a,He.ByPos,e,0,0).bottom;return o+=c-u,{from:l,to:a,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-o)/(n.height-o);for(let l of this.viewports)l.domTop=s+(l.top-r)*this.scale,s=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let n=0,i=0,o=0;;n++){let r=nCr(o,e)):t._content)}const hl=Oe.define({combine:t=>t.join(" ")}),qd=Oe.define({combine:t=>t.indexOf(!0)>-1}),Rd=Di.newName(),aO=Di.newName(),uO=Di.newName(),cO={"&light":"."+aO,"&dark":"."+uO};function Qd(t,e,n){return new Di(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,o=>{if(o=="&")return t;if(!n||!n[o])throw new RangeError(`Unsupported selector: ${o}`);return n[o]}):t+" "+i}})}const dA=Qd("."+Rd,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},cO);class hA{constructor(e,n,i,o){this.typeOver=o,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:s}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let l=r||s?[]:mA(e),a=new ky(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=gA(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Od(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),u=s&&s.node==l.anchorNode&&s.offset==l.anchorOffset||!Od(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=J.single(u,a)}}}function dO(t,e){let n,{newSel:i}=e,o=t.state.selection.main,r=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=o.from,u=null;(r===8||we.android&&e.text.length=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,o.to))}:(we.mac||we.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=J.single(i.main.anchor-1,i.main.head-1)),n={from:o.from,to:o.to,insert:Be.of([" "])}):we.chrome&&n&&n.from==n.to&&n.from==o.head&&n.insert.toString()==` + `&&t.lineWrapping&&(i&&(i=J.single(i.main.anchor-1,i.main.head-1)),n={from:o.from,to:o.to,insert:Be.of([" "])}),n){if(we.ios&&t.inputState.flushIOSKey(t)||we.android&&(n.from==o.from&&n.to==o.to&&n.insert.length==1&&n.insert.lines==2&&Lo(t.contentDOM,"Enter",13)||(n.from==o.from-1&&n.to==o.to&&n.insert.length==0||r==8&&n.insert.lengtho.head)&&Lo(t.contentDOM,"Backspace",8)||n.from==o.from&&n.to==o.to+1&&n.insert.length==0&&Lo(t.contentDOM,"Delete",46)))return!0;let s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l,a=()=>l||(l=fA(t,n,i));return t.state.facet(Qy).some(u=>u(t,n.from,n.to,s,a))||t.dispatch(a()),!0}else if(i&&!i.main.eq(o)){let s=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(s=!0),l=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:s,userEvent:l}),!0}else return!1}function fA(t,e,n){let i,o=t.state,r=o.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=r.frome.to?o.sliceDoc(e.to,r.to):"";i=o.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+a))}else{let l=o.changes(e),a=n&&n.main.to<=l.newLength?n.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let u=t.state.sliceDoc(e.from,e.to),c=Hy(t,e.insert.length-(e.to-e.from))||t.state.doc.lineAt(r.head),d=r.to-e.to,h=r.to-r.from;i=o.changeByRange(f=>{if(f.from==r.from&&f.to==r.to)return{changes:l,range:a||f.map(l)};let m=f.to-d,v=m-u.length;if(f.to-f.from!=h||t.state.sliceDoc(v,m)!=u||c&&f.to>=c.from&&f.from<=c.to)return{range:f};let w=o.changes({from:v,to:m,insert:e.insert}),y=f.to-r.to;return{changes:w,range:a?J.range(Math.max(0,a.anchor+y),Math.max(0,a.head+y)):f.map(w)}})}else i={changes:l,selection:a&&o.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),o.update(i,{userEvent:s,scrollIntoView:!0})}function pA(t,e,n,i){let o=Math.min(t.length,e.length),r=0;for(;r0&&l>0&&t.charCodeAt(s-1)==e.charCodeAt(l-1);)s--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(s,l));n-=s+a-r}if(s=s?r-n:0;r-=a,l=r+(l-s),s=r}else if(l=l?r-n:0;r-=a,s=r+(s-l),l=r}return{from:r,toA:s,toB:l}}function mA(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:o,focusOffset:r}=t.observer.selectionRange;return n&&(e.push(new am(n,i)),(o!=n||r!=i)&&e.push(new am(o,r))),e}function gA(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?J.single(n+e,i+e):null}const vA={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},cc=we.ie&&we.ie_version<=11;class yA{constructor(e){this.view=e,this.active=!1,this.selectionRange=new sM,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(we.ie&&we.ie_version<=11||we.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),cc&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,o=this.selectionRange;if(i.state.facet(Su)?i.root.activeElement!=this.dom:!Xl(i.dom,o))return;let r=o.anchorNode&&i.docView.nearest(o.anchorNode);if(r&&r.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(we.ie&&we.ie_version<=11||we.android&&we.chrome)&&!i.state.selection.main.empty&&o.focusNode&&Aa(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=we.safari&&e.root.nodeType==11&&nM(this.dom.ownerDocument)==this.dom&&OA(this.view)||Ma(e.root);if(!n||this.selectionRange.eq(n))return!1;let i=Xl(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&Lo(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(o)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,o=!1;for(let r of e){let s=this.readMutation(r);s&&(s.typeOver&&(o=!0),n==-1?{from:n,to:i}=s:(n=Math.min(s.from,n),i=Math.max(s.to,i)))}return{from:n,to:i,typeOver:o}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),o=this.selectionChanged&&Xl(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new hA(this.view,e,n,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return!1;let i=this.view.state,o=dO(this.view,n);return this.view.state==i&&this.view.update([]),o}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=Qm(n,e.previousSibling||e.target.previousSibling,-1),o=Qm(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:o?n.posBefore(o):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,n,i,o;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(o=this.resizeContent)===null||o===void 0||o.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Qm(t,e,n){for(;e;){let i=Fe.get(e);if(i&&i.parent==t)return i;let o=e.parentNode;e=o!=t.dom?o:n>0?e.nextSibling:e.previousSibling}return null}function OA(t){let e=null;function n(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let i=e.startContainer,o=e.startOffset,r=e.endContainer,s=e.endOffset,l=t.docView.domAtPos(t.state.selection.main.anchor);return Aa(l.node,l.offset,r,s)&&([i,o,r,s]=[r,s,i,o]),{anchorNode:i,anchorOffset:o,focusNode:r,focusOffset:s}}class ge{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(o=>n(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||lM(e.parent)||document,this.viewState=new qm(e.state||qe.create(e)),this.plugins=this.state.facet(Tr).map(i=>new sc(i));for(let i of this.plugins)i.update(this);this.observer=new yA(this),this.inputState=new IM(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new gm(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let n=e.length==1&&e[0]instanceof gt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,o,r=this.state;for(let h of e){if(h.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=h.state}if(this.destroyed){this.viewState.state=r;return}let s=this.hasFocus,l=0,a=null;e.some(h=>h.annotation(oO))?(this.inputState.notifiedFocused=s,l=1):s!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=s,a=rO(r,s),a||(l=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(qe.phrases)!=this.state.facet(qe.phrases))return this.setState(r);o=Ra.create(this,r,e),o.flags|=l;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(d&&(d=d.map(h.changes)),h.scrollIntoView){let{main:f}=h.state.selection;d=new qa(f.empty?f:J.cursor(f.head,f.head>f.anchor?-1:1))}for(let f of h.effects)f.is(pm)&&(d=f.value)}this.viewState.update(o,d),this.bidiCache=Qa.update(this.bidiCache,o.changes),o.empty||(this.updatePlugins(o),this.inputState.update(o)),n=this.docView.update(o),this.state.facet(Pr)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(o.startState.facet(hl)!=o.state.facet(hl)&&(this.viewState.mustMeasureContent=!0),(n||i||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!o.empty)for(let h of this.state.facet(Td))h(o);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!dO(this,c)&&u.force&&Lo(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new qm(e),this.plugins=e.facet(Tr).map(i=>new sc(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new gm(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Tr),i=e.state.facet(Tr);if(n!=i){let o=[];for(let r of i){let s=n.indexOf(r);if(s<0)o.push(new sc(r));else{let l=this.plugins[s];l.mustUpdate=e,o.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let o of this.plugins)o.mustUpdate=e;for(let o=0;o-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,{scrollTop:o}=i,{scrollAnchorPos:r,scrollAnchorHeight:s}=this.viewState;o!=this.viewState.scrollTop&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(s<0)if(_y(i))r=-1,s=this.viewState.heightMap.height;else{let f=this.viewState.scrollAnchorAt(o);r=f.from,s=f.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];a&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(f=>{try{return f.read(this)}catch(m){return an(this.state,m),Nm}}),d=Ra.create(this,this.state,[]),h=!1;d.flags|=a,n?n.flags|=a:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),h=this.docView.update(d));for(let f=0;f1||m<-1){o=i.scrollTop=o+m,s=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(Td))l(n)}get themeClasses(){return Rd+" "+(this.state.facet(qd)?uO:aO)+" "+this.state.facet(hl)}updateAttrs(){let e=Im(this,By,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Su)?"true":"false",class:"cm-content",style:`${we.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Im(this,Zh,n);let i=this.observer.ignore(()=>{let o=Sd(this.contentDOM,this.contentAttrs,n),r=Sd(this.dom,this.editorAttrs,e);return o||r});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let o of i.effects)if(o.is(ge.announce)){n&&(this.announceDOM.textContent=""),n=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=o.value}}mountStyles(){this.styleModules=this.state.facet(Pr);let e=this.state.facet(ge.cspNonce);Di.mount(this.root,this.styleModules.concat(dA).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;ni.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return ac(this,e,bm(this,e,n,i))}moveByGroup(e,n){return ac(this,e,bm(this,e,n,i=>QM(this,e.head,i)))}moveToLineBoundary(e,n,i=!0){return RM(this,e,n,i)}moveVertically(e,n,i){return ac(this,e,NM(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),Zy(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let o=this.state.doc.lineAt(e),r=this.bidiSpans(o),s=r[Ti.find(r,e-o.from,-1,n)];return bu(i,s.dir==nt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Iy)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>wA)return jy(e.length);let n=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||Yy(r.isolates,i=mm(this,e.from,e.to))))return r.order;i||(i=mm(this,e.from,e.to));let o=bM(e.text,n,i);return this.bidiCache.push(new Qa(e.from,e.to,n,i,!0,o)),o}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||we.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Oy(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return pm.of(new qa(typeof e=="number"?J.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}static domEventHandlers(e){return dt.define(()=>({}),{eventHandlers:e})}static theme(e,n){let i=Di.newName(),o=[hl.of(i),Pr.of(Qd(`.${i}`,e))];return n&&n.dark&&o.push(qd.of(!0)),o}static baseTheme(e){return go.lowest(Pr.of(Qd("."+Rd,e,cO)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),o=i&&Fe.get(i)||Fe.get(e);return((n=o==null?void 0:o.rootView)===null||n===void 0?void 0:n.view)||null}}ge.styleModule=Pr;ge.inputHandler=Qy;ge.focusChangeEffect=Ny;ge.perLineTextDirection=Iy;ge.exceptionSink=Ry;ge.updateListener=Td;ge.editable=Su;ge.mouseSelectionStyle=qy;ge.dragMovesSelection=Dy;ge.clickAddsSelectionRange=Ay;ge.decorations=ss;ge.atomicRanges=Kh;ge.bidiIsolatedRanges=Wy;ge.scrollMargins=Ly;ge.darkTheme=qd;ge.cspNonce=Oe.define({combine:t=>t.length?t[0]:""});ge.contentAttributes=Zh;ge.editorAttributes=By;ge.lineWrapping=ge.contentAttributes.of({class:"cm-lineWrapping"});ge.announce=Pe.define();const wA=4096,Nm={};class Qa{constructor(e,n,i,o,r,s){this.from=e,this.to=n,this.dir=i,this.isolates=o,this.fresh=r,this.order=s}static update(e,n){if(n.empty&&!e.some(r=>r.fresh))return e;let i=[],o=e.length?e[e.length-1].dir:nt.LTR;for(let r=Math.max(0,e.length-10);r=0;o--){let r=i[o],s=typeof r=="function"?r(t):r;s&&xd(s,n)}return n}const _A=we.mac?"mac":we.windows?"win":we.linux?"linux":"key";function bA(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let o,r,s,l;for(let a=0;ai.concat(o),[]))),n}function SA(t,e,n){return fO(hO(t.state),e,t,n)}let wi=null;const kA=4e3;function TA(t,e=_A){let n=Object.create(null),i=Object.create(null),o=(s,l)=>{let a=i[s];if(a==null)i[s]=l;else if(a!=l)throw new Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},r=(s,l,a,u,c)=>{var d,h;let f=n[s]||(n[s]=Object.create(null)),m=l.split(/ (?!$)/).map(y=>bA(y,e));for(let y=1;y{let b=wi={view:T,prefix:_,scope:s};return setTimeout(()=>{wi==b&&(wi=null)},kA),!0}]})}let v=m.join(" ");o(v,!1);let w=f[v]||(f[v]={preventDefault:!1,stopPropagation:!1,run:((h=(d=f._any)===null||d===void 0?void 0:d.run)===null||h===void 0?void 0:h.slice())||[]});a&&w.run.push(a),u&&(w.preventDefault=!0),c&&(w.stopPropagation=!0)};for(let s of t){let l=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let u of l){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let d in c)c[d].run.push(s.any)}let a=s[e]||s.key;if(a)for(let u of l)r(u,a,s.run,s.preventDefault,s.stopPropagation),s.shift&&r(u,"Shift-"+a,s.shift,s.preventDefault,s.stopPropagation)}return n}function fO(t,e,n,i){let o=tM(e),r=St(o,0),s=sn(r)==o.length&&o!=" ",l="",a=!1,u=!1,c=!1;wi&&wi.view==n&&wi.scope==i&&(l=wi.prefix+" ",Jy.indexOf(e.keyCode)<0&&(u=!0,wi=null));let d=new Set,h=w=>{if(w){for(let y of w.run)if(!d.has(y)&&(d.add(y),y(n,e)))return w.stopPropagation&&(c=!0),!0;w.preventDefault&&(w.stopPropagation&&(c=!0),u=!0)}return!1},f=t[i],m,v;return f&&(h(f[l+fl(o,e,!s)])?a=!0:s&&(e.altKey||e.metaKey||e.ctrlKey)&&!(we.windows&&e.ctrlKey&&e.altKey)&&(m=qi[e.keyCode])&&m!=o?(h(f[l+fl(m,e,!0)])||e.shiftKey&&(v=rs[e.keyCode])!=o&&v!=m&&h(f[l+fl(v,e,!1)]))&&(a=!0):s&&e.shiftKey&&h(f[l+fl(o,e,!0)])&&(a=!0),!a&&h(f._any)&&(a=!0)),u&&(a=!0),a&&c&&e.stopPropagation(),a}class As{constructor(e,n,i,o,r){this.className=e,this.left=n,this.top=i,this.width=o,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let o=e.coordsAtPos(i.head,i.assoc||1);if(!o)return[];let r=pO(e);return[new As(n,o.left-r.left,o.top-r.top,null,o.bottom-o.top)]}else return PA(e,n,i)}}function pO(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==nt.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function Bm(t,e,n){let i=J.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(i,!0,!0).from),type:it.Text}}function PA(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),o=Math.min(n.to,t.viewport.to),r=t.textDirection==nt.LTR,s=t.contentDOM,l=s.getBoundingClientRect(),a=pO(t),u=s.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=l.right-(c?parseInt(c.paddingRight):0),f=Md(t,i),m=Md(t,o),v=f.type==it.Text?f:null,w=m.type==it.Text?m:null;if(v&&(t.lineWrapping||f.widgetLineBreaks)&&(v=Bm(t,i,v)),w&&(t.lineWrapping||m.widgetLineBreaks)&&(w=Bm(t,o,w)),v&&w&&v.from==w.from)return _(T(n.from,n.to,v));{let k=v?T(n.from,null,v):b(f,!1),x=w?T(null,n.to,w):b(m,!0),$=[];return(v||f).to<(w||m).from-(v&&w?1:0)||f.widgetLineBreaks>1&&k.bottom+t.defaultLineHeight/2H&&S.from=P)break;N>A&&z(Math.max(R,A),k==null&&R<=H,Math.min(N,P),x==null&&N>=L,V.dir)}if(A=M.to+1,A>=P)break}return D.length==0&&z(H,k==null,L,x==null,t.textDirection),{top:W,bottom:Q,horizontal:D}}function b(k,x){let $=l.top+(x?k.top:k.bottom);return{top:$,bottom:$,horizontal:[]}}}function CA(t,e){return t.constructor==e.constructor&&t.eq(e)}class $A{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(jl)!=e.state.facet(jl)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(jl);for(;n!CA(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let o of e)o.update&&n&&o.constructor&&this.drawn[i].constructor&&o.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(o.draw(),n);for(;n;){let o=n.nextSibling;n.remove(),n=o}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const jl=Oe.define();function mO(t){return[dt.define(e=>new $A(e,t)),jl.of(t)]}const gO=!we.ios,as=Oe.define({combine(t){return zn(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function EA(t={}){return[as.of(t),MA,AA,DA,Vy.of(!0)]}function vO(t){return t.startState.facet(as)!=t.state.facet(as)}const MA=mO({above:!0,markers(t){let{state:e}=t,n=e.facet(as),i=[];for(let o of e.selection.ranges){let r=o==e.selection.main;if(o.empty?!r||gO:n.drawRangeCursor){let s=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=o.empty?o:J.cursor(o.head,o.head>o.anchor?-1:1);for(let a of As.forRange(t,s,l))i.push(a)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=vO(t);return n&&Wm(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Wm(e.state,t)},class:"cm-cursorLayer"});function Wm(t,e){e.style.animationDuration=t.facet(as).cursorBlinkRate+"ms"}const AA=mO({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:As.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||vO(t)},class:"cm-selectionLayer"}),yO={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};gO&&(yO[".cm-line"].caretColor="transparent !important");const DA=go.highest(ge.theme(yO)),OO=Pe.define({map(t,e){return t==null?null:e.mapPos(t)}}),$r=wt.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(OO)?i.value:n,t)}}),qA=dt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field($r);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field($r)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let t=this.view.state.field($r),e=t!=null&&this.view.coordsAtPos(t);if(!e)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-n.left+this.view.scrollDOM.scrollLeft,top:e.top-n.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(t){this.cursor&&(t?(this.cursor.style.left=t.left+"px",this.cursor.style.top=t.top+"px",this.cursor.style.height=t.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field($r)!=t&&this.view.dispatch({effects:OO.of(t)})}},{eventHandlers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function RA(){return[$r,qA]}function Lm(t,e,n,i,o){e.lastIndex=0;for(let r=t.iterRange(n,i),s=n,l;!r.next().done;s+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)o(s+l.index,l)}function QA(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:o,to:r}of n)o=Math.max(t.state.doc.lineAt(o).from,o-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=o?i[i.length-1].to=r:i.push({from:o,to:r});return i}class NA{constructor(e){const{regexp:n,decoration:i,decorate:o,boundary:r,maxLength:s=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,o)this.addMatch=(l,a,u,c)=>o(c,u,u+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,u,c)=>{let d=i(l,a,u);d&&c(u,u+l[0].length,d)};else if(i)this.addMatch=(l,a,u,c)=>c(u,u+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=s}createDeco(e){let n=new Ai,i=n.add.bind(n);for(let{from:o,to:r}of QA(e,this.maxLength))Lm(e.state.doc,this.regexp,o,r,(s,l)=>this.addMatch(l,e,s,i));return n.finish()}updateDeco(e,n){let i=1e9,o=-1;return e.docChanged&&e.changes.iterChanges((r,s,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):o>-1?this.updateRange(e.view,n.map(e.changes),i,o):n}updateRange(e,n,i,o){for(let r of e.visibleRanges){let s=Math.max(r.from,i),l=Math.min(r.to,o);if(l>s){let a=e.state.doc.lineAt(s),u=a.toa.from;s--)if(this.boundary.test(a.text[s-1-a.from])){c=s;break}for(;lh.push(y.range(v,w));if(a==u)for(this.regexp.lastIndex=c-a.from;(f=this.regexp.exec(a.text))&&f.indexthis.addMatch(w,e,v,m));n=n.update({filterFrom:c,filterTo:d,filter:(v,w)=>vd,add:h})}}return n}}const Nd=/x/.unicode!=null?"gu":"g",IA=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Nd),VA={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let dc=null;function BA(){var t;if(dc==null&&typeof document<"u"&&document.body){let e=document.body.style;dc=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return dc||!1}const Fl=Oe.define({combine(t){let e=zn(t,{render:null,specialChars:IA,addSpecialChars:null});return(e.replaceTabs=!BA())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Nd)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Nd)),e}});function WA(t={}){return[Fl.of(t),LA()]}let zm=null;function LA(){return zm||(zm=dt.fromClass(class{constructor(t){this.view=t,this.decorations=xe.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Fl)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new NA({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:o}=n.state,r=St(e[0],0);if(r==9){let s=o.lineAt(i),l=n.state.tabSize,a=ar(s.text,l,i-s.from);return xe.replace({widget:new YA((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=xe.replace({widget:new UA(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Fl);t.startState.facet(Fl)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const zA="•";function XA(t){return t>=32?zA:t==10?"␤":String.fromCharCode(9216+t)}class UA extends Xn{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=XA(this.code),i=e.state.phrase("Control character")+" "+(VA[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,i,n);if(o)return o;let r=document.createElement("span");return r.textContent=n,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class YA extends Xn{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function jA(){return HA}const FA=xe.line({class:"cm-activeLine"}),HA=dt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let o=t.lineBlockAt(i.head);o.from>e&&(n.push(FA.range(o.from)),e=o.from)}return xe.set(n)}},{decorations:t=>t.decorations});class GA extends Xn{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}coordsAt(e){let n=e.firstChild?Jo(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),o=bu(n[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return o.bottom-o.top>r*1.5?{left:o.left,right:o.right,top:o.top,bottom:o.top+r}:o}ignoreEvent(){return!1}}function ZA(t){return dt.fromClass(class{constructor(e){this.view=e,this.placeholder=t?xe.set([xe.widget({widget:new GA(t),side:1}).range(0)]):xe.none}get decorations(){return this.view.state.doc.length?xe.none:this.placeholder}},{decorations:e=>e.decorations})}const Id=2e3;function KA(t,e,n){let i=Math.min(e.line,n.line),o=Math.max(e.line,n.line),r=[];if(e.off>Id||n.off>Id||e.col<0||n.col<0){let s=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let a=i;a<=o;a++){let u=t.doc.line(a);u.length<=l&&r.push(J.range(u.from+s,u.to+l))}}else{let s=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let a=i;a<=o;a++){let u=t.doc.line(a),c=gd(u.text,s,t.tabSize,!0);if(c<0)r.push(J.cursor(u.to));else{let d=gd(u.text,l,t.tabSize);r.push(J.range(u.from+c,u.from+d))}}}return r}function JA(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function Xm(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),o=n-i.from,r=o>Id?-1:o==i.length?JA(t,e.clientX):ar(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:r,off:o}}function eD(t,e){let n=Xm(t,e),i=t.state.selection;return n?{update(o){if(o.docChanged){let r=o.changes.mapPos(o.startState.doc.line(n.line).from),s=o.state.doc.lineAt(r);n={line:s.number,col:n.col,off:Math.min(n.off,s.length)},i=i.map(o.changes)}},get(o,r,s){let l=Xm(t,o);if(!l)return i;let a=KA(t.state,n,l);return a.length?s?J.create(a.concat(i.ranges)):J.create(a):i}}:null}function tD(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return ge.mouseSelectionStyle.of((n,i)=>e(i)?eD(n,i):null)}const nD={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},iD={style:"cursor: crosshair"};function oD(t={}){let[e,n]=nD[t.key||"Alt"],i=dt.fromClass(class{constructor(o){this.view=o,this.isDown=!1}set(o){this.isDown!=o&&(this.isDown=o,this.view.update([]))}},{eventHandlers:{keydown(o){this.set(o.keyCode==e||n(o))},keyup(o){(o.keyCode==e||!n(o))&&this.set(!1)},mousemove(o){this.set(n(o))}}});return[i,ge.contentAttributes.of(o=>{var r;return!((r=o.plugin(i))===null||r===void 0)&&r.isDown?iD:null})]}const pl="-10000px";class wO{constructor(e,n,i){this.facet=n,this.createTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o),this.tooltipViews=this.tooltips.map(i)}update(e){var n;let i=e.state.facet(this.facet),o=i.filter(s=>s);if(i===this.input){for(let s of this.tooltipViews)s.update&&s.update(e);return!1}let r=[];for(let s=0;s{var e,n,i;return{position:we.ios?"absolute":((e=t.find(o=>o.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(o=>o.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(o=>o.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||rD}}}),Um=new WeakMap,_O=dt.fromClass(class{constructor(t){this.view=t,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(hc);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new wO(t,ef,n=>this.createTooltip(n)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(hc);if(i.position!=this.position){this.position=i.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",e.dom.appendChild(n)}return e.dom.style.position=this.position,e.dom.style.top=pl,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(t=n.destroy)===null||t===void 0||t.call(n);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((e,n)=>{let i=this.manager.tooltipViews[n];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(hc).tooltipSpace(this.view)}}writeMeasure(t){var e;let{editor:n,space:i}=t,o=[];for(let r=0;r=Math.min(n.bottom,i.bottom)||u.rightMath.min(n.right,i.right)+.1){a.style.top=pl;continue}let d=s.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,h=d?7:0,f=c.right-c.left,m=(e=Um.get(l))!==null&&e!==void 0?e:c.bottom-c.top,v=l.offset||lD,w=this.view.textDirection==nt.LTR,y=c.width>i.right-i.left?w?i.left:i.right-c.width:w?Math.min(u.left-(d?14:0)+v.x,i.right-f):Math.max(i.left,u.left-f+(d?14:0)-v.x),_=!!s.above;!s.strictSide&&(_?u.top-(c.bottom-c.top)-v.yi.bottom)&&_==i.bottom-u.bottom>u.top-i.top&&(_=!_);let T=(_?u.top-i.top:i.bottom-u.bottom)-h;if(Ty&&x.topb&&(b=_?x.top-m-2-h:x.bottom+h+2);this.position=="absolute"?(a.style.top=b-t.parent.top+"px",a.style.left=y-t.parent.left+"px"):(a.style.top=b+"px",a.style.left=y+"px"),d&&(d.style.left=`${u.left+(w?v.x:-v.x)-(y+14-7)}px`),l.overlap!==!0&&o.push({left:y,top:b,right:k,bottom:b+m}),a.classList.toggle("cm-tooltip-above",_),a.classList.toggle("cm-tooltip-below",!_),l.positioned&&l.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=pl}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),sD=ge.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),lD={x:0,y:0},ef=Oe.define({enables:[_O,sD]}),Na=Oe.define();class tf{static create(e){return new tf(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new wO(e,Na,n=>this.createHostedView(n))}createHostedView(e){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(n.dom),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}}const aD=ef.compute([Na],t=>{let e=t.facet(Na).filter(n=>n);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.filter(n=>n.end!=null).map(n=>n.end)),create:tf.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class uD{constructor(e,n,i,o,r){this.view=e,this.source=n,this.field=i,this.setHover=o,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;el.bottom||n.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(o)).find(c=>c.from<=o&&c.to>=o),u=a&&a.dir==nt.RTL?-1:1;r=n.x{this.pending==l&&(this.pending=null,a&&e.dispatch({effects:this.setHover.of(a)}))},a=>an(e.state,a,"hover tooltip"))}else s&&e.dispatch({effects:this.setHover.of(s)})}mousemove(e){var n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!Ym(this.lastMove.target)||this.pending){let{pos:o}=i||this.pending,r=(n=i==null?void 0:i.end)!==null&&n!==void 0?n:o;(o==r?this.view.posAtCoords(this.lastMove)!=o:!cD(this.view,o,r,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&!Ym(e.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Ym(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function cD(t,e,n,i,o,r){let s=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>i||s.righto||Math.min(s.bottom,l)=e&&a<=n}function dD(t,e={}){let n=Pe.define(),i=wt.define({create(){return null},update(o,r){if(o&&(e.hideOnChange&&(r.docChanged||r.selection)||e.hideOn&&e.hideOn(r,o)))return null;if(o&&r.docChanged){let s=r.changes.mapPos(o.pos,-1,Tt.TrackDel);if(s==null)return null;let l=Object.assign(Object.create(null),o);l.pos=s,o.end!=null&&(l.end=r.changes.mapPos(o.end)),o=l}for(let s of r.effects)s.is(n)&&(o=s.value),s.is(hD)&&(o=null);return o},provide:o=>Na.from(o)});return[i,dt.define(o=>new uD(o,t,i,n,e.hoverTime||300)),aD]}function bO(t,e){let n=t.plugin(_O);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const hD=Pe.define(),jm=Oe.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function us(t,e){let n=t.plugin(xO),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const xO=dt.fromClass(class{constructor(t){this.input=t.state.facet(cs),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(jm);this.top=new ml(t,!0,e.topContainer),this.bottom=new ml(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(jm);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ml(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ml(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(cs);if(n!=this.input){let i=n.filter(a=>a),o=[],r=[],s=[],l=[];for(let a of i){let u=this.specs.indexOf(a),c;u<0?(c=a(t.view),l.push(c)):(c=this.panels[u],c.update&&c.update(t)),o.push(c),(c.top?r:s).push(c)}this.specs=i,this.panels=o,this.top.sync(r),this.bottom.sync(s);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ge.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class ml{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=Fm(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=Fm(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Fm(t){let e=t.nextSibling;return t.remove(),e}const cs=Oe.define({enables:xO});class ai extends ao{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}ai.prototype.elementClass="";ai.prototype.toDOM=void 0;ai.prototype.mapMode=Tt.TrackBefore;ai.prototype.startSide=ai.prototype.endSide=-1;ai.prototype.point=!0;const Hl=Oe.define(),fD={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Xe.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Lr=Oe.define();function pD(t){return[SO(),Lr.of(Object.assign(Object.assign({},fD),t))]}const Vd=Oe.define({combine:t=>t.some(e=>e)});function SO(t){let e=[mD];return t&&t.fixed===!1&&e.push(Vd.of(!0)),e}const mD=dt.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=t.state.facet(Lr).map(e=>new Gm(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(Vd),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Vd)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Xe.iter(this.view.state.facet(Hl),this.view.viewport.from),i=[],o=this.gutters.map(r=>new gD(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let s=!0;for(let l of r.type)if(l.type==it.Text&&s){Bd(n,i,l.from);for(let a of o)a.line(this.view,l,i);s=!1}else if(l.widget)for(let a of o)a.widget(this.view,l)}else if(r.type==it.Text){Bd(n,i,r.from);for(let s of o)s.line(this.view,r,i)}for(let r of o)r.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Lr),n=t.state.facet(Lr),i=t.docChanged||t.heightChanged||t.viewportChanged||!Xe.eq(t.startState.facet(Hl),t.state.facet(Hl),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let o of this.gutters)o.update(t)&&(i=!0);else{i=!0;let o=[];for(let r of n){let s=e.indexOf(r);s<0?o.push(new Gm(this.view,r)):(this.gutters[s].update(t),o.push(this.gutters[s]))}for(let r of this.gutters)r.dom.remove(),o.indexOf(r)<0&&r.destroy();for(let r of o)this.dom.appendChild(r.dom);this.gutters=o}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>ge.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==nt.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}})});function Hm(t){return Array.isArray(t)?t:[t]}function Bd(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class gD{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=Xe.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:o}=this,r=n.top-this.height;if(this.i==o.elements.length){let s=new kO(e,n.height,r,i);o.elements.push(s),o.dom.appendChild(s.dom)}else o.elements[this.i].update(e,n.height,r,i);this.height=n.bottom,this.i++}line(e,n,i){let o=[];Bd(this.cursor,o,n.from),i.length&&(o=o.concat(i));let r=this.gutter.config.lineMarker(e,n,o);r&&o.unshift(r);let s=this.gutter;o.length==0&&!s.config.renderEmptyElements||this.addElement(e,n,o)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n);i&&this.addElement(e,n,[i])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Gm{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,o=>{let r=o.target,s;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();s=(a.top+a.bottom)/2}else s=o.clientY;let l=e.lineBlockAtHeight(s-e.documentTop);n.domEventHandlers[i](e,l,o)&&o.preventDefault()});this.markers=Hm(n.markers(e)),n.initialSpacer&&(this.spacer=new kO(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Hm(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let o=this.config.updateSpacer(this.spacer.markers[0],e);o!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[o])}let i=e.view.viewport;return!Xe.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class kO{constructor(e,n,i,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,o)}update(e,n,i,o){this.height!=n&&(this.dom.style.height=(this.height=n)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),vD(this.markers,o)||this.setMarkers(e,o)}setMarkers(e,n){let i="cm-gutterElement",o=this.dom.firstChild;for(let r=0,s=0;;){let l=s,a=rr(l,a,u)||s(l,a,u):s}return i}})}});class fc extends ai{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function pc(t,e){return t.state.facet(Eo).formatNumber(e,t.state)}const OD=Lr.compute([Eo],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(yD)},lineMarker(e,n,i){return i.some(o=>o.toDOM)?null:new fc(pc(e,e.state.doc.lineAt(n.from).number))},widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(Eo)!=e.state.facet(Eo),initialSpacer(e){return new fc(pc(e,Zm(e.state.doc.lines)))},updateSpacer(e,n){let i=pc(n.view,Zm(n.view.state.doc.lines));return i==e.number?e:new fc(i)},domEventHandlers:t.facet(Eo).domEventHandlers}));function wD(t={}){return[Eo.of(t),SO(),OD]}function Zm(t){let e=9;for(;e{let e=[],n=-1;for(let i of t.selection.ranges){let o=t.doc.lineAt(i.head).from;o>n&&(n=o,e.push(_D.range(o)))}return Xe.of(e)});function xD(){return bD}var mc;const Mo=new Ae;function SD(t){return Oe.define({combine:t?e=>e.concat(t):void 0})}const kD=new Ae;class vn{constructor(e,n,i=[],o=""){this.data=e,this.name=o,qe.prototype.hasOwnProperty("tree")||Object.defineProperty(qe.prototype,"tree",{get(){return Ot(this)}}),this.parser=n,this.extension=[Ni.of(this),qe.languageData.of((r,s,l)=>{let a=Km(r,s,l),u=a.type.prop(Mo);if(!u)return[];let c=r.facet(u),d=a.type.prop(kD);if(d){let h=a.resolve(s-a.from,l);for(let f of d)if(f.test(h,r)){let m=r.facet(f.facet);return f.type=="replace"?m:m.concat(c)}}return c})].concat(i)}isActiveAt(e,n,i=-1){return Km(e,n,i).type.prop(Mo)==this.data}findRegions(e){let n=e.facet(Ni);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],o=(r,s)=>{if(r.prop(Mo)==this.data){i.push({from:s,to:s+r.length});return}let l=r.prop(Ae.mounted);if(l){if(l.tree.prop(Mo)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+s,to:a.to+s});else i.push({from:s,to:s+r.length});return}else if(l.overlay){let a=i.length;if(o(l.tree,l.overlay[0].from+s),i.length>a)return}}for(let a=0;ai.isTop?n:void 0)]}),e.name)}configure(e,n){return new ds(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ot(t){let e=t.field(vn.state,!1);return e?e.tree:ut.empty}class TD{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Or=null;class Ia{constructor(e,n,i=[],o,r,s,l,a){this.parser=e,this.state=n,this.fragments=i,this.tree=o,this.treeLen=r,this.viewport=s,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new Ia(e,n,[],ut.empty,0,i,[],null)}startParse(){return this.parser.startParse(new TD(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=ut.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let o=Date.now()+e;e=()=>Date.now()>o}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(no.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Or;Or=this;try{return e()}finally{Or=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=Jm(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:o,treeLen:r,viewport:s,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((u,c,d,h)=>a.push({fromA:u,toA:c,fromB:d,toB:h})),i=no.applyChanges(i,a),o=ut.empty,r=0,s={from:e.mapPos(s.from,-1),to:e.mapPos(s.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);ce.from&&(this.fragments=Jm(this.fragments,o,r),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends K0{createParse(n,i,o){let r=o[0].from,s=o[o.length-1].to;return{parsedPos:r,advance(){let a=Or;if(a){for(let u of o)a.tempSkipped.push(u);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=s,new ut(Xt.none,[],[],s-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Or}}function Jm(t,e,n){return no.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class tr{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new tr(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=Ia.create(e.facet(Ni).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new tr(i)}}vn.state=wt.define({create:tr.init,update(t,e){for(let n of e.effects)if(n.is(vn.setState))return n.value;return e.startState.facet(Ni)!=e.state.facet(Ni)?tr.init(e.state):t.apply(e)}});let TO=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(TO=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const gc=typeof navigator<"u"&&(!((mc=navigator.scheduling)===null||mc===void 0)&&mc.isInputPending)?()=>navigator.scheduling.isInputPending():null,PD=dt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(vn.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(vn.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=TO(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndo+1e3,a=r.context.work(()=>gc&&gc()||Date.now()>s,o+(l?0:1e5));this.chunkBudget-=Date.now()-n,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:vn.setState.of(new tr(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>an(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ni=Oe.define({combine(t){return t.length?t[0]:null},enables:t=>[vn.state,PD,ge.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class PO{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const CD=Oe.define(),Ds=Oe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Va(t){let e=t.facet(Ds);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function hs(t,e){let n="",i=t.tabSize,o=t.facet(Ds)[0];if(o==" "){for(;e>=i;)n+=" ",e-=i;o=" "}for(let r=0;r=e?$D(t,n,e):null}class ku{constructor(e,n={}){this.state=e,this.options=n,this.unit=Va(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:o,simulateDoubleBreak:r}=this.options;return o!=null&&o>=i.from&&o<=i.to?r&&o==e?{text:"",from:e}:(n<0?o-1&&(r+=s-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,n=e.length){return ar(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:o}=this.lineAt(e,n),r=this.options.overrideIndentation;if(r){let s=r(o);if(s>-1)return s}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const of=new Ae;function $D(t,e,n){return CO(e.resolveInner(n).enterUnfinishedNodesBefore(n),n,t)}function ED(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function MD(t){let e=t.type.prop(of);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Ae.closedBy))){let o=t.lastChild,r=o&&i.indexOf(o.name)>-1;return s=>$O(s,!0,1,void 0,r&&!ED(s)?o.from:void 0)}return t.parent==null?AD:null}function CO(t,e,n){for(;t;t=t.parent){let i=MD(t);if(i)return i(rf.create(n,e,t))}return null}function AD(){return 0}class rf extends ku{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.node=i}static create(e,n,i){return new rf(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(DD(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){let e=this.node.parent;return e?CO(e,this.pos,this.base):0}}function DD(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function qD(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let o=t.options.simulateBreak,r=t.state.doc.lineAt(n.from),s=o==null||o<=r.from?r.to:Math.min(r.to,o);for(let l=n.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.from$O(i,e,n,t)}function $O(t,e,n,i,o){let r=t.textAfter,s=r.match(/^\s*/)[0].length,l=i&&r.slice(s,s+i.length)==i||o==t.pos+s,a=e?qD(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*n)}function eg({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const RD=200;function QD(){return qe.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,o=n.lineAt(i);if(i>o.from+RD)return t;let r=n.sliceString(o.from,i);if(!e.some(u=>u.test(r)))return t;let{state:s}=t,l=-1,a=[];for(let{head:u}of s.selection.ranges){let c=s.doc.lineAt(u);if(c.from==l)continue;l=c.from;let d=nf(s,c.from);if(d==null)continue;let h=/^\s*/.exec(c.text)[0],f=hs(s,d);h!=f&&a.push({from:c.from,to:c.from+h.length,insert:f})}return a.length?[t,{changes:a,sequential:!0}]:t})}const ND=Oe.define(),sf=new Ae;function EO(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(r&&s.from=e&&a.to>n&&(r=a)}}return r}function VD(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Ba(t,e,n){for(let i of t.facet(ND)){let o=i(t,e,n);if(o)return o}return ID(t,e,n)}function MO(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Tu=Pe.define({map:MO}),qs=Pe.define({map:MO});function AO(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const co=wt.define({create(){return xe.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(Tu)&&!BD(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(lf),o=i?xe.replace({widget:new jD(i(e.state,n.value))}):tg;t=t.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(qs)&&(t=t.update({filter:(i,o)=>n.value.from!=i||n.value.to!=o,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:i}=e.selection.main;t.between(i,i,(o,r)=>{oi&&(n=!0)}),n&&(t=t.update({filterFrom:i,filterTo:i,filter:(o,r)=>r<=i||o>=i}))}return t},provide:t=>ge.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,o)=>{n.push(i,o)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!o||o.from>r)&&(o={from:r,to:s})}),o}function BD(t,e,n){let i=!1;return t.between(e,e,(o,r)=>{o==e&&r==n&&(i=!0)}),i}function DO(t,e){return t.field(co,!1)?e:e.concat(Pe.appendConfig.of(RO()))}const WD=t=>{for(let e of AO(t)){let n=Ba(t.state,e.from,e.to);if(n)return t.dispatch({effects:DO(t.state,[Tu.of(n),qO(t,n)])}),!0}return!1},LD=t=>{if(!t.state.field(co,!1))return!1;let e=[];for(let n of AO(t)){let i=Wa(t.state,n.from,n.to);i&&e.push(qs.of(i),qO(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function qO(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,o=t.state.doc.lineAt(e.to).number;return ge.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${o}.`)}const zD=t=>{let{state:e}=t,n=[];for(let i=0;i{let e=t.state.field(co,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,o)=>{n.push(qs.of({from:i,to:o}))}),t.dispatch({effects:n}),!0},UD=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:WD},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:LD},{key:"Ctrl-Alt-[",run:zD},{key:"Ctrl-Alt-]",run:XD}],YD={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},lf=Oe.define({combine(t){return zn(t,YD)}});function RO(t){let e=[co,GD];return t&&e.push(lf.of(t)),e}function QO(t,e){let{state:n}=t,i=n.facet(lf),o=s=>{let l=t.lineBlockAt(t.posAtDOM(s.target)),a=Wa(t.state,l.from,l.to);a&&t.dispatch({effects:qs.of(a)}),s.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,o,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=o,r}const tg=xe.replace({widget:new class extends Xn{toDOM(t){return QO(t,null)}}});class jD extends Xn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return QO(e,this.value)}}const FD={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class yc extends ai{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function HD(t={}){let e=Object.assign(Object.assign({},FD),t),n=new yc(e,!0),i=new yc(e,!1),o=dt.fromClass(class{constructor(s){this.from=s.viewport.from,this.markers=this.buildMarkers(s)}update(s){(s.docChanged||s.viewportChanged||s.startState.facet(Ni)!=s.state.facet(Ni)||s.startState.field(co,!1)!=s.state.field(co,!1)||Ot(s.startState)!=Ot(s.state)||e.foldingChanged(s))&&(this.markers=this.buildMarkers(s.view))}buildMarkers(s){let l=new Ai;for(let a of s.viewportLineBlocks){let u=Wa(s.state,a.from,a.to)?i:Ba(s.state,a.from,a.to)?n:null;u&&l.add(a.from,a.from,u)}return l.finish()}}),{domEventHandlers:r}=e;return[o,pD({class:"cm-foldGutter",markers(s){var l;return((l=s.plugin(o))===null||l===void 0?void 0:l.markers)||Xe.empty},initialSpacer(){return new yc(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(s,l,a)=>{if(r.click&&r.click(s,l,a))return!0;let u=Wa(s.state,l.from,l.to);if(u)return s.dispatch({effects:qs.of(u)}),!0;let c=Ba(s.state,l.from,l.to);return c?(s.dispatch({effects:Tu.of(c)}),!0):!1}})}),RO()]}const GD=ge.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Rs{constructor(e,n){this.specs=e;let i;function o(l){let a=Di.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof n.all=="string"?n.all:n.all?o(n.all):void 0,s=n.scope;this.scope=s instanceof vn?l=>l.prop(Mo)==s.data:s?l=>l==s:void 0,this.style=ey(e.map(l=>({tag:l.tag,class:l.class||o(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Di(i):null,this.themeType=n.themeType}static define(e,n){return new Rs(e,n||{})}}const Wd=Oe.define(),NO=Oe.define({combine(t){return t.length?[t[0]]:null}});function Oc(t){let e=t.facet(Wd);return e.length?e:t.facet(NO)}function IO(t,e){let n=[KD],i;return t instanceof Rs&&(t.module&&n.push(ge.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(NO.of(t)):i?n.push(Wd.computeN([ge.darkTheme],o=>o.facet(ge.darkTheme)==(i=="dark")?[t]:[])):n.push(Wd.of(t)),n}class ZD{constructor(e){this.markCache=Object.create(null),this.tree=Ot(e.state),this.decorations=this.buildDeco(e,Oc(e.state))}update(e){let n=Ot(e.state),i=Oc(e.state),o=i!=Oc(e.startState);n.length{i.add(s,l,this.markCache[a]||(this.markCache[a]=xe.mark({class:a})))},o,r);return i.finish()}}const KD=go.high(dt.fromClass(ZD,{decorations:t=>t.decorations})),JD=Rs.define([{tag:B.meta,color:"#404740"},{tag:B.link,textDecoration:"underline"},{tag:B.heading,textDecoration:"underline",fontWeight:"bold"},{tag:B.emphasis,fontStyle:"italic"},{tag:B.strong,fontWeight:"bold"},{tag:B.strikethrough,textDecoration:"line-through"},{tag:B.keyword,color:"#708"},{tag:[B.atom,B.bool,B.url,B.contentSeparator,B.labelName],color:"#219"},{tag:[B.literal,B.inserted],color:"#164"},{tag:[B.string,B.deleted],color:"#a11"},{tag:[B.regexp,B.escape,B.special(B.string)],color:"#e40"},{tag:B.definition(B.variableName),color:"#00f"},{tag:B.local(B.variableName),color:"#30a"},{tag:[B.typeName,B.namespace],color:"#085"},{tag:B.className,color:"#167"},{tag:[B.special(B.variableName),B.macroName],color:"#256"},{tag:B.definition(B.propertyName),color:"#00c"},{tag:B.comment,color:"#940"},{tag:B.invalid,color:"#f00"}]),e8=ge.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),VO=1e4,BO="()[]{}",WO=Oe.define({combine(t){return zn(t,{afterCursor:!0,brackets:BO,maxScanDistance:VO,renderMatch:i8})}}),t8=xe.mark({class:"cm-matchingBracket"}),n8=xe.mark({class:"cm-nonmatchingBracket"});function i8(t){let e=[],n=t.matched?t8:n8;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const o8=wt.define({create(){return xe.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(WO);for(let o of e.state.selection.ranges){if(!o.empty)continue;let r=Dn(e.state,o.head,-1,i)||o.head>0&&Dn(e.state,o.head-1,1,i)||i.afterCursor&&(Dn(e.state,o.head,1,i)||o.headge.decorations.from(t)}),r8=[o8,e8];function s8(t={}){return[WO.of(t),r8]}const l8=new Ae;function Ld(t,e,n){let i=t.prop(e<0?Ae.openedBy:Ae.closedBy);if(i)return i;if(t.name.length==1){let o=n.indexOf(t.name);if(o>-1&&o%2==(e<0?1:0))return[n[o+e]]}return null}function zd(t){let e=t.type.prop(l8);return e?e(t.node):t}function Dn(t,e,n,i={}){let o=i.maxScanDistance||VO,r=i.brackets||BO,s=Ot(t),l=s.resolveInner(e,n);for(let a=l;a;a=a.parent){let u=Ld(a.type,n,r);if(u&&a.from0?e>=c.from&&ec.from&&e<=c.to))return a8(t,e,n,a,c,u,r)}}return u8(t,e,n,s,l.type,o,r)}function a8(t,e,n,i,o,r,s){let l=i.parent,a={from:o.from,to:o.to},u=0,c=l==null?void 0:l.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(u==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let h=0;!c.next().done&&h<=r;){let f=c.value;n<0&&(h+=f.length);let m=e+h*n;for(let v=n>0?0:f.length-1,w=n>0?f.length:-1;v!=w;v+=n){let y=s.indexOf(f[v]);if(!(y<0||i.resolveInner(m+v,1).type!=o))if(y%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:m+v,to:m+v+1},matched:y>>1==a>>1};d--}}n>0&&(h+=f.length)}return c.done?{start:u,matched:!1}:null}const c8=Object.create(null),ng=[Xt.none],ig=[],d8=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])d8[t]=h8(c8,e);function wc(t,e){ig.indexOf(t)>-1||(ig.push(t),console.warn(e))}function h8(t,e){let n=null;for(let r of e.split(".")){let s=t[r]||B[r];s?typeof s=="function"?n?n=s(n):wc(r,`Modifier ${r} used at start of tag`):n?wc(r,`Tag ${r} used as modifier`):n=s:wc(r,`Unknown highlighting tag ${r}`)}if(!n)return 0;let i=e.replace(/ /g,"_"),o=Xt.define({id:ng.length,name:i,props:[Xh({[i]:n})]});return ng.push(o),o.id}const f8=ds.define({name:"json",parser:RE.configure({props:[of.add({Object:eg({except:/^\s*\}/}),Array:eg({except:/^\s*\]/})}),sf.add({"Object Array":EO})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function p8(){return new PO(f8)}const m8=1,LO=196,zO=197,g8=198,og=199,v8=200,y8=201,O8=202,w8=2,_8=203,b8=204,x8=3,S8=205,k8=206,T8=4,P8=207,C8=208,$8=5,E8=209,M8=26,A8=27,D8=51,q8=52,R8=57,Q8=58,N8=59,I8=61,V8=62,B8=63,W8=64,L8=65,z8=67,X8=246,U8=74,Y8=265,j8=129,F8=150,H8=151,G8=154,fs=10,ps=13,af=32,Pu=9,uf=35,Z8=40,K8=46,rg=123,XO=39,UO=34,J8=92,e5=new Set([A8,D8,q8,Y8,z8,j8,Q8,N8,X8,W8,L8,U8,V8,B8,F8,H8,G8]);function _c(t){return t==fs||t==ps}const t5=new _u((t,e)=>{let n;if(t.next<0)t.acceptToken(y8);else if(e.context.depth<0)_c(t.next)&&t.acceptToken(v8,1);else if(((n=t.peek(-1))<0||_c(n))&&e.canShift(og)){let i=0;for(;t.next==af||t.next==Pu;)t.advance(),i++;(t.next==fs||t.next==ps||t.next==uf)&&t.acceptToken(og,-i)}else _c(t.next)&&t.acceptToken(g8,1)},{contextual:!0}),n5=new _u((t,e)=>{let n=e.context.depth;if(n<0)return;let i=t.peek(-1);if(i==fs||i==ps){let o=0,r=0;for(;;){if(t.next==af)o++;else if(t.next==Pu)o+=8-o%8;else break;t.advance(),r++}o!=n&&t.next!=fs&&t.next!=ps&&t.next!=uf&&(o{for(let e=0;e<5;e++){if(t.next!="print".charCodeAt(e))return;t.advance()}if(!/\w/.test(String.fromCharCode(t.next)))for(let e=0;;e++){let n=t.peek(e);if(!(n==af||n==Pu)){n!=Z8&&n!=K8&&n!=fs&&n!=ps&&n!=uf&&t.acceptToken(m8);return}}});function Cu(t,e,n,i,o){return new _u(r=>{let s=r.pos;for(;!(r.next<0);)if(r.next==rg)if(r.peek(1)==rg)r.advance(2);else{if(r.pos==s){r.acceptToken(i,1);return}break}else if(r.next==J8)r.advance(),r.next>=0&&r.advance();else if(r.next==t&&(e==1||r.peek(1)==t&&r.peek(2)==t)){if(r.pos==s){r.acceptToken(o,e);return}break}else r.advance();r.pos>s&&r.acceptToken(n)})}const l5=Cu(XO,1,O8,w8,_8),a5=Cu(UO,1,b8,x8,S8),u5=Cu(XO,3,k8,T8,P8),c5=Cu(UO,3,C8,$8,E8),d5=Xh({'async "*" "**" FormatConversion FormatSpec':B.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":B.controlKeyword,"in not and or is del":B.operatorKeyword,"from def class global nonlocal lambda":B.definitionKeyword,import:B.moduleKeyword,"with as print":B.keyword,Boolean:B.bool,None:B.null,VariableName:B.variableName,"CallExpression/VariableName":B.function(B.variableName),"FunctionDefinition/VariableName":B.function(B.definition(B.variableName)),"ClassDefinition/VariableName":B.definition(B.className),PropertyName:B.propertyName,"CallExpression/MemberExpression/PropertyName":B.function(B.propertyName),Comment:B.lineComment,Number:B.number,String:B.string,FormatString:B.special(B.string),UpdateOp:B.updateOperator,"ArithOp!":B.arithmeticOperator,BitOp:B.bitwiseOperator,CompareOp:B.compareOperator,AssignOp:B.definitionOperator,Ellipsis:B.punctuation,At:B.meta,"( )":B.paren,"[ ]":B.squareBracket,"{ }":B.brace,".":B.derefOperator,", ;":B.separator}),h5={__proto__:null,await:48,or:58,and:60,in:64,not:66,is:68,if:74,else:76,lambda:80,yield:98,from:100,async:106,for:108,None:168,True:170,False:170,del:184,pass:188,break:192,continue:196,return:200,raise:208,import:212,as:214,global:218,nonlocal:220,assert:224,elif:234,while:238,try:244,except:246,finally:248,with:252,def:256,class:266,match:277,case:283},f5=ts.deserialize({version:14,states:"#!OO`Q#yOOP$_OSOOO%hQ&nO'#H^OOQS'#Cq'#CqOOQS'#Cr'#CrO'WQ#xO'#CpO(yQ&nO'#H]OOQS'#H^'#H^OOQS'#DW'#DWOOQS'#H]'#H]O)gQ#xO'#DaO)zQ#xO'#DhO*[Q#xO'#DlOOQS'#Dw'#DwO*oO,UO'#DwO*wO7[O'#DwO+POWO'#DxO+[O`O'#DxO+gOpO'#DxO+rO!bO'#DxO-tQ&nO'#G}OOQS'#G}'#G}O'WQ#xO'#G|O/WQ&nO'#G|OOQS'#Ee'#EeO/oQ#xO'#EfOOQS'#G{'#G{O/yQ#xO'#GzOOQV'#Gz'#GzO0UQ#xO'#FXOOQS'#G`'#G`O0ZQ#xO'#FWOOQV'#IS'#ISOOQV'#Gy'#GyOOQV'#Fp'#FpQ`Q#yOOO'WQ#xO'#CsO0iQ#xO'#DPO0pQ#xO'#DTO1OQ#xO'#HbO1`Q&nO'#EYO'WQ#xO'#EZOOQS'#E]'#E]OOQS'#E_'#E_OOQS'#Ea'#EaO1tQ#xO'#EcO2[Q#xO'#EgO0UQ#xO'#EiO2oQ&nO'#EiO0UQ#xO'#ElO/oQ#xO'#EoO/oQ#xO'#EsO/oQ#xO'#EvO2zQ#xO'#ExO3RQ#xO'#E}O3^Q#xO'#EyO/oQ#xO'#E}O0UQ#xO'#FPO0UQ#xO'#FUO3cQ#xO'#FZP3jO#xO'#GxPOOO)CBl)CBlOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Ck'#CkOOQS'#Cl'#ClOOQS'#Cn'#CnO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO'WQ#xO,59QO3uQ#xO'#DqOOQS,5:[,5:[O4YQ#xO'#HlOOQS,5:_,5:_O4gQMlO,5:_O4lQ&nO,59[O0iQ#xO,59dO0iQ#xO,59dO0iQ#xO,59dO7[Q#xO,59dO7aQ#xO,59dO7hQ#xO,59lO7oQ#xO'#H]O8uQ#xO'#H[OOQS'#H['#H[OOQS'#D^'#D^O9^Q#xO,59cO'WQ#xO,59cO9lQ#xO,59cOOQS,59{,59{O9qQ#xO,5:TO'WQ#xO,5:TOOQS,5:S,5:SO:PQ#xO,5:SO:UQ#xO,5:ZO'WQ#xO,5:ZO'WQ#xO,5:XOOQS,5:W,5:WO:gQ#xO,5:WO:lQ#xO,5:YOOOO'#Fx'#FxO:qO,UO,5:cOOQS,5:c,5:cOOOO'#Fy'#FyO:yO7[O,5:cO;RQ#xO'#DyOOOW'#Fz'#FzO;cOWO,5:dOOQS,5:d,5:dO;RQ#xO'#D}OOO`'#F}'#F}O;nO`O,5:dO;RQ#xO'#EOOOOp'#GO'#GOO;yOpO,5:dO;RQ#xO'#EPOOO!b'#GP'#GPOWOOQS'#Du'#DuOOQS1G/y1G/yOOQS1G/O1G/OO!-ZQ&nO1G/OO!-bQ&nO1G/OO0iQ#xO1G/OO!-}Q#xO1G/WOOQS'#D]'#D]O/oQ#xO,59vOOQS1G.}1G.}O!.UQ#xO1G/gO!.fQ#xO1G/gO!.nQ#xO1G/hO'WQ#xO'#HdO!.sQ#xO'#HdO!.xQ&nO1G.}O!/YQ#xO,59kO!0`Q#xO,5>SO!0pQ#xO,5>SO!0xQ#xO1G/oO!0}Q&nO1G/oOOQS1G/n1G/nO!1_Q#xO,5=}O!2UQ#xO,5=}O/oQ#xO1G/sO!2sQ#xO1G/uO!2xQ&nO1G/uO!3YQ&nO1G/sOOQS1G/r1G/rOOQS1G/t1G/tOOOO-E9v-E9vOOQS1G/}1G/}OOOO-E9w-E9wO!3jQ#xO'#HwO/oQ#xO'#HwO!3xQ#xO,5:eOOOW-E9x-E9xOOQS1G0O1G0OO!4TQ#xO,5:iOOO`-E9{-E9{O!4`Q#xO,5:jOOOp-E9|-E9|O!4kQ#xO,5:kOOO!b-E9}-E9}OOQS-E:O-E:OO!4vQ!LUO1G3SO!5gQ&nO1G3SO'WQ#xO,5jOOQS1G1_1G1_O!6gQ#xO1G1_OOQS'#DX'#DXO/oQ#xO,5=yOOQS,5=y,5=yO!6lQ#xO'#FqO!6wQ#xO,59qO!7PQ#xO1G/ZO!7ZQ&nO,5=}OOQS1G3h1G3hOOQS,5:p,5:pO!7zQ#xO'#G|OOQS,5PO!8{Q#xO,5>PO/oQ#xO1G0mO/oQ#xO1G0mO0UQ#xO1G0oOOQS-E:T-E:TO!9^Q#xO1G0oO!9iQ#xO1G0oO!9nQ#xO,5>mO!9|Q#xO,5>mO!:[Q#xO,5>iO!:rQ#xO,5>iO!;TQ#{O1G0yO!>cQ#{O1G0|O!AnQ#xO,5>oO!AxQ#xO,5>oO!BQQ&nO,5>oO/oQ#xO1G1OO!B[Q#xO1G1OO3^Q#xO1G1TO! RQ#xO1G1VOOQV,5;`,5;`O!BaQ#zO,5;`O!BfQ#{O1G1PO!EwQ#xO'#G]O3^Q#xO1G1PO3^Q#xO1G1PO!FUQ#xO,5>pO!FcQ#xO,5>pO0UQ#xO,5>pOOQV1G1T1G1TO!FkQ#xO'#FRO!F|QMlO1G1VOOQV1G1[1G1[O3^Q#xO1G1[O!GUQ#xO'#F]OOQV1G1a1G1aO! `Q&nO1G1aPOOO1G3O1G3OP!GZOSO1G3OOOQS,5>V,5>VOOQS'#Dr'#DrO/oQ#xO,5>VO!G`Q#xO,5>UO!GsQ#xO,5>UOOQS1G/w1G/wO!G{Q#xO,5>XO!H]Q#xO,5>XO!HeQ#xO,5>XO!HxQ#xO,5>XO!IYQ#xO,5>XOOQS1G3r1G3rOOQS7+$j7+$jO!7PQ#xO7+$rO!J{Q#xO1G/OO!KSQ#xO1G/OOOQS1G/b1G/bOOQS,5<_,5<_O'WQ#xO,5<_OOQS7+%R7+%RO!KZQ#xO7+%ROOQS-E9q-E9qOOQS7+%S7+%SO!KkQ#xO,5>OO'WQ#xO,5>OOOQS7+$i7+$iO!KpQ#xO7+%RO!KxQ#xO7+%SO!K}Q#xO1G3nOOQS7+%Z7+%ZO!L_Q#xO1G3nO!LgQ#xO7+%ZOOQS,5<^,5<^O'WQ#xO,5<^O!LlQ#xO1G3iOOQS-E9p-E9pO!McQ#xO7+%_OOQS7+%a7+%aO!MqQ#xO1G3iO!N`Q#xO7+%aO!NeQ#xO1G3oO!NuQ#xO1G3oO!N}Q#xO7+%_O# SQ#xO,5>cO# jQ#xO,5>cO# jQ#xO,5>cO# xO$ISO'#D{O#!TO#tO'#HxOOOW1G0P1G0PO#!YQ#xO1G0POOO`1G0T1G0TO#!bQ#xO1G0TOOOp1G0U1G0UO#!jQ#xO1G0UOOO!b1G0V1G0VO#!rQ#xO1G0VO#!zQ!LUO7+(nO##kQ&nO1G2XP#$UQ#xO'#GROOQS,5d,5>dOOOW7+%k7+%kOOO`7+%o7+%oOOOp7+%p7+%pOOO!b7+%q7+%qO#7{Q#xO1G3SO#8fQ#xO1G3SP'WQ#xO'#FtO/oQ#xO<lO#9YQ#xO,5>lO0UQ#xO,5>lO#9kQ#xO,5>kOOQS<rO#AdQ#xO,5>rOOQS,5>r,5>rO#AoQ#xO,5>qO#BQQ#xO,5>qOOQS1G1X1G1XOOQS,5;o,5;oO#BYQ#xO1G1cP#B_Q#xO'#FvO#BoQ#xO1G1}O#CSQ#xO1G1}O#CdQ#xO1G1}P#CoQ#xO'#FwO#C|Q#xO7+)_O#D^Q#xO7+)_O#D^Q#xO7+)_O#DfQ#xO7+)_O#DvQ#xO7+)UO7hQ#xO7+)UOOQSAN>XAN>XO#EaQ#xO<eAN>eO/oQ#xO1G1{O#EqQ&nO1G1{P#E{Q#xO'#FuOOQS1G2R1G2RP#FYQ#xO'#F{O#FgQ#xO7+)iO#F}Q#xO,5:hOOOO-E9z-E9zO#GYQ#xO7+(nOOQSAN?_AN?_O#GsQ#xO,5QOOQSANB[ANB[OOOO7+%n7+%nOOQS7+'x7+'xO$'{Q#xO<tO$*qQ#xO,5>tO0UQ#xO,5vO#MRQ#xO,5>vOOQS1G1o1G1oO$.iQ&nO,5wO$.wQ#xO,5>wOOQS1G1r1G1rOOQS7+'R7+'RP#MRQ#xO'#GfO$/PQ#xO1G4bO$/ZQ#xO1G4bO$/cQ#xO1G4bOOQS7+%V7+%VO$/qQ#xO1G1sO$0PQ&nO'#F`O$0WQ#xO,5=POOQS,5=P,5=PO$0fQ#xO1G4cOOQS-E:c-E:cO#MRQ#xO,5=OO$0mQ#xO,5=OO$0rQ#xO7+)|OOQS-E:b-E:bO$0|Q#xO7+)|O#MRQ#xO,5e>hPP'Z'ZPP?QPP'Z'ZPP'Z'Z'Z'Z'Z?U?{'ZP@OP@UD]GyPG}HZH_HcHg'ZPPPHkHq'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RPHwPIOIUPIOPIOIOPPPIOPKTPK^KdKjKTPIOKpPIOPKwK}PLRLgMUMoLRLRMuNSLRLRLRLRNhNnNqNvNy! T! Z! g! y!!P!!Z!!a!!}!#T!#Z!#a!#k!#q!#w!#}!$T!$Z!$m!$w!$}!%T!%Z!%e!%k!%q!%w!&R!&X!&c!&i!&r!&x!'X!'a!'k!'rPPPPPPPPPPPPPPPPP!'x!'{!(R!([!(f!(qPPPPPPPPPPPP!-e!.y!2s!6TPP!6]!6o!6x!7n!7e!7w!7}!8Q!8T!8W!8`!9PPPPPPPPPP!9S!9cPPPP!:R!:_!:k!:q!:z!:}!;T!;Z!;a!;dP!;l!;u!x|}#@S}!O#AW!O!P#Ci!P!Q#N_!Q!R$!y!R![$&w![!]$1e!]!^$3s!^!_$4w!_!`$7c!`!a$8m!a!b%T!b!c$;U!c!d$W!e!h$W#V#Y$Q<%lO$Xc&m!b&eS&hW%k!TOX%TXY=|Y[%T[]=|]p%Tpq=|qr%Trs&Vsw%Twx/Xx#O%T#O#P?d#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s?i[&m!bOY%TYZ=|Z]%T]^=|^#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=P;=`<%l8^<%lO%T!q@hd&m!b&eS&hWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`#O%T#O#P7o#P#T%T#T#UBz#U#f%T#f#gBz#g#hBz#h#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qBR]oR&m!b&eS&hWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qCV]!nR&m!b&eS&hWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cDXa&m!b&eS&csOYE^YZ%TZ]E^]^%T^rE^rs!)|swE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cEia&m!b&eS&hW&csOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cFw]&m!b&eS&csOr%Trs'Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cGya&m!b&hW&csOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxIOx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cIXa&m!b&hW&csOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxJ^x#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#_Jg_&m!b&hW&csOYJ^YZ1XZ]J^]^1X^rJ^rsKfs#OJ^#O#PL`#P#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`!!o<%lOJ^#_KmZ&m!b&csOr1Xrs2ys#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#_LeW&m!bO#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`! r;=`<%lL}<%lOJ^{MUZ&hW&csOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l<%lOL}{M|V&csOr4`rs5ds#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`{NfRO;'SL};'S;=`No;=`OL}{Nv[&hW&csOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lL}<%lOL}{! oP;=`<%lL}#_! y[&hW&csOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lJ^<%lOL}#_!!rP;=`<%lJ^#c!!zW&m!bO#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!(q;=`<%l!#d<%lOE^!P!#m]&eS&hW&csOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!%Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k<%lO!#d!P!$mX&eS&csOr8^rs9rsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`^s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!>e_U!T&m!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!?ds#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!?k_U!T&m!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!3`s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!@q[U!T&m!bOY!=UYZ1XZ]!=U]^1X^#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!Ec;=`<%l4`<%lO!=U!]!AnZU!T&hWOY!AgYZ4`Z]!Ag]^4`^r!Agrs!Bas#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!BfZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!CXs#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!C^ZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!4Ys#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!DUWU!TOY!AgYZ4`Z]!Ag]^4`^;'S!Ag;'S;=`!Dn;=`<%l4`<%lO!Ag!]!DsW&hWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!Ag<%lO4`!]!E`P;=`<%l!Ag#o!EhW&hWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!=U<%lO4`#o!FTP;=`<%l!=U#s!F_[U!T&m!bOY!+|YZ%TZ]!+|]^%T^#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Mq;=`<%l8^<%lO!+|!a!G^]U!T&eS&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!H^]U!T&eSOY!GTYZ8^Z]!GT]^8^^r!GTrs!IVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!I^]U!T&eSOY!GTYZ8^Z]!GT]^8^^r!GTrs!5wsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!J^]U!T&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!KVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!K^]U!T&hWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!Agx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!L[WU!TOY!GTYZ8^Z]!GT]^8^^;'S!GT;'S;=`!Lt;=`<%l8^<%lO!GT!a!L{Y&eS&hWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`Q<%lO$TP;=`<%l$ei&m!b&eS&hW&b`%}sOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$Q<%lO$Q<%lO$Q<%lO$Q<%lO$Q<%lO$h5[t]||-1}],tokenPrec:7205});class YO{constructor(e,n,i){this.state=e,this.pos=n,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let n=Ot(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),o=n.text.slice(i-n.from,this.pos-n.from),r=o.search(FO(e,!1));return r<0?null:{from:i+r,to:this.pos,text:o.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,n){e=="abort"&&this.abortListeners&&this.abortListeners.push(n)}}function sg(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function p5(t){let e=Object.create(null),n=Object.create(null);for(let{label:o}of t){e[o[0]]=!0;for(let r=1;rtypeof o=="string"?{label:o}:o),[n,i]=e.every(o=>/^\w+$/.test(o.label))?[/\w*$/,/\w+$/]:p5(e);return o=>{let r=o.matchBefore(i);return r||o.explicit?{from:r?r.from:o.pos,options:e,validFor:n}:null}}function m5(t,e){return n=>{for(let i=Ot(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class lg{constructor(e,n,i,o){this.completion=e,this.source=n,this.match=i,this.score=o}}function Ei(t){return t.selection.main.from}function FO(t,e){var n;let{source:i}=t,o=e&&i[0]!="^",r=i[i.length-1]!="$";return!o&&!r?t:new RegExp(`${o?"^":""}(?:${i})${r?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const HO=di.define();function g5(t,e,n,i){let{main:o}=t.selection,r=n-o.from,s=i-o.from;return Object.assign(Object.assign({},t.changeByRange(l=>l!=o&&n!=i&&t.sliceDoc(l.from+r,l.from+s)!=t.sliceDoc(n,i)?{range:l}:{changes:{from:l.from+r,to:i==o.from?l.to:l.from+s,insert:e},range:J.cursor(l.from+r+e.length)})),{userEvent:"input.complete"})}const ag=new WeakMap;function v5(t){if(!Array.isArray(t))return t;let e=ag.get(t);return e||ag.set(t,e=jO(t)),e}const cf=Pe.define(),ms=Pe.define();class y5{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(x=Uh(k))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!_||$==1&&w||b==0&&$!=0)&&(n[d]==k||i[d]==k&&(h=!0)?s[d++]=_:s.length&&(y=!1)),b=$,_+=sn(k)}return d==a&&s[0]==0&&y?this.result(-100+(h?-200:0),s,e):f==a&&m==0?this.ret(-200-e.length+(v==e.length?0:-100),[0,v]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):f==a?this.ret(-200+-700-e.length,[m,v]):d==a?this.result(-100+(h?-200:0)+-700+(y?0:-1100),s,e):n.length==2?!1:this.result((o[0]?-700:0)+-200+-1100,o,e)}result(e,n,i){let o=[],r=0;for(let s of n){let l=s+(this.astral?sn(St(i,s)):1);r&&o[r-1]==s?o[r-1]=l:(o[r++]=s,o[r++]=l)}return this.ret(e-i.length,o)}}const Wt=Oe.define({combine(t){return zn(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:O5,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>ug(e(i),n(i)),optionClass:(e,n)=>i=>ug(e(i),n(i)),addToOptions:(e,n)=>e.concat(n)})}});function ug(t,e){return t?e?t+" "+e:t:e}function O5(t,e,n,i,o){let r=t.textDirection==nt.RTL,s=r,l=!1,a="top",u,c,d=e.left-o.left,h=o.right-e.right,f=i.right-i.left,m=i.bottom-i.top;if(s&&d=m||v>e.top?u=n.bottom-e.top:(a="bottom",u=e.bottom-n.top)}return{style:`${a}: ${u}px; max-width: ${c}px`,class:"cm-completionInfo-"+(l?r?"left-narrow":"right-narrow":s?"left":"right")}}function w5(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(o=>"cm-completionIcon-"+o)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,o){let r=document.createElement("span");r.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let a=0;al&&r.appendChild(document.createTextNode(s.slice(l,u)));let d=r.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(s.slice(u,c))),d.className="cm-completionMatchedText",l=c}return ln.position-i.position).map(n=>n.render)}function cg(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let o=Math.floor(e/n);return{from:o*n,to:(o+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class _5{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let o=e.state.field(n),{options:r,selected:s}=o.open,l=e.state.facet(Wt);this.optionContent=w5(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=cg(r.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{for(let u=a.target,c;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(c=/-(\d+)$/.exec(u.id))&&+c[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Wt).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:ms.of(null)})}),this.list=this.dom.appendChild(this.createListBox(r,o.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var n,i,o;let r=e.state.field(this.stateField),s=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=s&&(this.updateSel(),((n=r.open)===null||n===void 0?void 0:n.disabled)!=((i=s.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((o=r.open)===null||o===void 0)&&o.disabled)))}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=cg(n.options.length,n.selected,this.view.state.facet(Wt).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(n.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:i}=n.options[n.selected],{info:o}=i;if(!o)return;let r=typeof o=="string"?document.createTextNode(o):o(i);if(!r)return;"then"in r?r.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,i)}).catch(s=>an(this.view.state,s,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:o,destroy:r}=e;i.appendChild(o),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,o=this.range.from;i;i=i.nextSibling,o++)i.nodeName!="LI"||!i.id?o--:o==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return n&&x5(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),o=e.getBoundingClientRect(),r=this.space;if(!r){let s=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:s.innerWidth,bottom:s.innerHeight}}return o.top>Math.min(r.bottom,n.bottom)-10||o.bottomi.from||i.from==0))if(r=h,typeof u!="string"&&u.header)o.appendChild(u.header(u));else{let f=o.appendChild(document.createElement("completion-section"));f.textContent=h}}const c=o.appendChild(document.createElement("li"));c.id=n+"-"+s,c.setAttribute("role","option");let d=this.optionClass(l);d&&(c.className=d);for(let h of this.optionContent){let f=h(l,this.view.state,a);f&&c.appendChild(f)}}return i.from&&o.classList.add("cm-completionListIncompleteTop"),i.tonew _5(n,t,e)}function x5(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.topn.bottom&&(t.scrollTop+=i.bottom-n.bottom)}function dg(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function S5(t,e){let n=[],i=null,o=a=>{n.push(a);let{section:u}=a.completion;if(u){i||(i=[]);let c=typeof u=="string"?u:u.name;i.some(d=>d.name==c)||i.push(typeof u=="string"?{name:c}:u)}};for(let a of t)if(a.hasResult()){let u=a.result.getMatch;if(a.result.filter===!1)for(let c of a.result.options)o(new lg(c,a.source,u?u(c):[],1e9-n.length));else{let c=new y5(e.sliceDoc(a.from,a.to));for(let d of a.result.options)if(c.match(d.label)){let h=d.displayLabel?u?u(d,c.matched):[]:c.matched;o(new lg(d,a.source,h,c.score+(d.boost||0)))}}}if(i){let a=Object.create(null),u=0,c=(d,h)=>{var f,m;return((f=d.rank)!==null&&f!==void 0?f:1e9)-((m=h.rank)!==null&&m!==void 0?m:1e9)||(d.namec.score-u.score||l(u.completion,c.completion))){let u=a.completion;!s||s.label!=u.label||s.detail!=u.detail||s.type!=null&&u.type!=null&&s.type!=u.type||s.apply!=u.apply||s.boost!=u.boost?r.push(a):dg(a.completion)>dg(s)&&(r[r.length-1]=a),s=a.completion}return r}class Ao{constructor(e,n,i,o,r,s){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=o,this.selected=r,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Ao(this.options,hg(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,o,r){let s=S5(e,n);if(!s.length)return o&&e.some(a=>a.state==1)?new Ao(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;let l=n.facet(Wt).selectOnOpen?0:-1;if(o&&o.selected!=l&&o.selected!=-1){let a=o.options[o.selected].completion;for(let u=0;uu.hasResult()?Math.min(a,u.from):a,1e8),create:b5(Gt,KO),above:r.aboveCursor},o?o.timestamp:Date.now(),l,!1)}map(e){return new Ao(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class La{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new La(P5,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(Wt),r=(i.override||n.languageDataAt("autocomplete",Ei(n)).map(v5)).map(l=>(this.active.find(u=>u.source==l)||new Vt(l,this.active.some(u=>u.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let s=this.open;s&&e.docChanged&&(s=s.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!k5(r,this.active)?s=Ao.build(r,n,this.id,s,i):s&&s.disabled&&!r.some(l=>l.state==1)&&(s=null),!s&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new Vt(l.source,0):l));for(let l of e.effects)l.is(ZO)&&(s=s&&s.setSelected(l.value,this.id));return r==this.active&&s==this.open?this:new La(r,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:T5}}function k5(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const P5=[];function Ud(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class Vt{constructor(e,n,i=-1){this.source=e,this.state=n,this.explicitPos=i}hasResult(){return!1}update(e,n){let i=Ud(e),o=this;i?o=o.handleUserEvent(e,i,n):e.docChanged?o=o.handleChange(e):e.selection&&o.state!=0&&(o=new Vt(o.source,0));for(let r of e.effects)if(r.is(cf))o=new Vt(o.source,1,r.value?Ei(e.state):-1);else if(r.is(ms))o=new Vt(o.source,0);else if(r.is(GO))for(let s of r.value)s.source==o.source&&(o=s);return o}handleUserEvent(e,n,i){return n=="delete"||!i.activateOnTyping?this.map(e.changes):new Vt(this.source,1)}handleChange(e){return e.changes.touchesRange(Ei(e.startState))?new Vt(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Vt(this.source,this.state,e.mapPos(this.explicitPos))}}class zo extends Vt{constructor(e,n,i,o,r){super(e,2,n),this.result=i,this.from=o,this.to=r}hasResult(){return!0}handleUserEvent(e,n,i){var o;let r=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=Ei(e.state);if((this.explicitPos<0?l<=r:ls||n=="delete"&&Ei(e.startState)==this.from)return new Vt(this.source,n=="input"&&i.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),u;return C5(this.result.validFor,e.state,r,s)?new zo(this.source,a,this.result,r,s):this.result.update&&(u=this.result.update(this.result,r,s,new YO(e.state,l,a>=0)))?new zo(this.source,a,u,u.from,(o=u.to)!==null&&o!==void 0?o:Ei(e.state)):new Vt(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Vt(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new zo(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function C5(t,e,n,i){if(!t)return!1;let o=e.sliceDoc(n,i);return typeof t=="function"?t(o,n,i,e):FO(t,!0).test(o)}const GO=Pe.define({map(t,e){return t.map(n=>n.map(e))}}),ZO=Pe.define(),Gt=wt.define({create(){return La.start()},update(t,e){return t.update(e)},provide:t=>[ef.from(t,e=>e.tooltip),ge.contentAttributes.from(t,e=>e.attrs)]});function KO(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Gt).active.find(o=>o.source==e.source);return i instanceof zo?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},g5(t.state,n,i.from,i.to)),{annotations:HO.of(e.completion)})):n(t,e.completion,i.from,i.to),!0):!1}function gl(t,e="option"){return n=>{let i=n.state.field(Gt,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+o*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:ZO.of(l)}),!0}}const $5=t=>{let e=t.state.field(Gt,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Gt,!1)?(t.dispatch({effects:cf.of(!0)}),!0):!1,M5=t=>{let e=t.state.field(Gt,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:ms.of(null)}),!0)};class A5{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const fg=50,D5=50,q5=1e3,R5=dt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(Gt).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Gt);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Gt)==e)return;let n=t.transactions.some(i=>(i.selection||i.docChanged)&&!Ud(i));for(let i=0;iD5&&Date.now()-o.time>q5){for(let r of o.context.abortListeners)try{r()}catch(s){an(this.view.state,s)}o.context.abortListeners=null,this.running.splice(i--,1)}else o.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(o=>o.active.source==i.source))?setTimeout(()=>this.startUpdate(),fg):-1,this.composing!=0)for(let i of t.transactions)Ud(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(Gt);for(let n of e.active)n.state==1&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=Ei(e),i=new YO(e,n,t.explicitPos==n),o=new A5(t,i);this.running.push(o),Promise.resolve(t.source(i)).then(r=>{o.context.aborted||(o.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:ms.of(null)}),an(this.view.state,r)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),fg))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Wt);for(let i=0;is.source==o.active.source);if(r&&r.state==1)if(o.done==null){let s=new Vt(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.state!=1&&e.push(s)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:GO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Gt,!1);if(e&&e.tooltip&&this.view.state.facet(Wt).closeOnBlur){let n=e.open&&bO(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&this.view.dispatch({effects:ms.of(null)})}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:cf.of(!1)}),20),this.composing=0}}}),JO=ge.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Q5{constructor(e,n,i,o){this.field=e,this.line=n,this.from=i,this.to=o}}class df{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Tt.TrackDel),i=e.mapPos(this.to,1,Tt.TrackDel);return n==null||i==null?null:new df(this.field,n,i)}}class hf{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],o=[n],r=e.doc.lineAt(n),s=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let u=s,c=/^\t*/.exec(a)[0].length;for(let d=0;dnew df(a.field,o[a.line]+a.from,o[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let n=[],i=[],o=[],r;for(let s of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(s);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",u=-1;for(let c=0;c=u&&d.field++}o.push(new Q5(u,i.length,r.index,r.index+a.length)),s=s.slice(0,r.index)+a+s.slice(r.index+r[0].length)}for(let l;l=/\\([{}])/.exec(s);){s=s.slice(0,l.index)+l[1]+s.slice(l.index+l[0].length);for(let a of o)a.line==i.length&&a.from>l.index&&(a.from--,a.to--)}i.push(s)}return new hf(i,o)}}let N5=xe.widget({widget:new class extends Xn{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),I5=xe.mark({class:"cm-snippetField"});class ur{constructor(e,n){this.ranges=e,this.active=n,this.deco=xe.set(e.map(i=>(i.from==i.to?N5:I5).range(i.from,i.to)))}map(e){let n=[];for(let i of this.ranges){let o=i.map(e);if(!o)return null;n.push(o)}return new ur(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const Qs=Pe.define({map(t,e){return t&&t.map(e)}}),V5=Pe.define(),gs=wt.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Qs))return n.value;if(n.is(V5)&&t)return new ur(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ge.decorations.from(t,e=>e?e.deco:xe.none)});function ff(t,e){return J.create(t.filter(n=>n.field==e).map(n=>J.range(n.from,n.to)))}function B5(t){let e=hf.parse(t);return(n,i,o,r)=>{let{text:s,ranges:l}=e.instantiate(n.state,o),a={changes:{from:o,to:r,insert:Be.of(s)},scrollIntoView:!0,annotations:i?HO.of(i):void 0};if(l.length&&(a.selection=ff(l,0)),l.length>1){let u=new ur(l,0),c=a.effects=[Qs.of(u)];n.state.field(gs,!1)===void 0&&c.push(Pe.appendConfig.of([gs,U5,Y5,JO]))}n.dispatch(n.state.update(a))}}function e1(t){return({state:e,dispatch:n})=>{let i=e.field(gs,!1);if(!i||t<0&&i.active==0)return!1;let o=i.active+t,r=t>0&&!i.ranges.some(s=>s.field==o+t);return n(e.update({selection:ff(i.ranges,o),effects:Qs.of(r?null:new ur(i.ranges,o))})),!0}}const W5=({state:t,dispatch:e})=>t.field(gs,!1)?(e(t.update({effects:Qs.of(null)})),!0):!1,L5=e1(1),z5=e1(-1),X5=[{key:"Tab",run:L5,shift:z5},{key:"Escape",run:W5}],pg=Oe.define({combine(t){return t.length?t[0]:X5}}),U5=go.highest(Ms.compute([pg],t=>t.facet(pg)));function Fn(t,e){return Object.assign(Object.assign({},e),{apply:B5(t)})}const Y5=ge.domEventHandlers({mousedown(t,e){let n=e.state.field(gs,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let o=n.ranges.find(r=>r.from<=i&&r.to>=i);return!o||o.field==n.active?!1:(e.dispatch({selection:ff(n.ranges,o.field),effects:Qs.of(n.ranges.some(r=>r.field>o.field)?new ur(n.ranges,o.field):null)}),!0)}}),vs={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Gi=Pe.define({map(t,e){let n=e.mapPos(t,-1,Tt.TrackAfter);return n??void 0}}),pf=new class extends ao{};pf.startSide=1;pf.endSide=-1;const t1=wt.define({create(){return Xe.empty},update(t,e){if(e.selection){let n=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;n!=e.changes.mapPos(i,-1)&&(t=Xe.empty)}t=t.map(e.changes);for(let n of e.effects)n.is(Gi)&&(t=t.update({add:[pf.range(n.value,n.value+1)]}));return t}});function j5(){return[H5,t1]}const bc="()[]{}<>";function n1(t){for(let e=0;e{if((F5?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(i.length>2||i.length==2&&sn(St(i,0))==1||e!=o.from||n!=o.to)return!1;let r=K5(t.state,i);return r?(t.dispatch(r),!0):!1}),G5=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=i1(t,t.selection.main.head).brackets||vs.brackets,o=null,r=t.changeByRange(s=>{if(s.empty){let l=J5(t.doc,s.head);for(let a of i)if(a==l&&$u(t.doc,s.head)==n1(St(a,0)))return{changes:{from:s.head-a.length,to:s.head+a.length},range:J.cursor(s.head-a.length)}}return{range:o=s}});return o||e(t.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!o},Z5=[{key:"Backspace",run:G5}];function K5(t,e){let n=i1(t,t.selection.main.head),i=n.brackets||vs.brackets;for(let o of i){let r=n1(St(o,0));if(e==o)return r==o?n4(t,o,i.indexOf(o+o+o)>-1,n):e4(t,o,r,n.before||vs.before);if(e==r&&o1(t,t.selection.main.from))return t4(t,o,r)}return null}function o1(t,e){let n=!1;return t.field(t1).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function $u(t,e){let n=t.sliceString(e,e+2);return n.slice(0,sn(St(n,0)))}function J5(t,e){let n=t.sliceString(e-2,e);return sn(St(n,0))==n.length?n:n.slice(1)}function e4(t,e,n,i){let o=null,r=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:Gi.of(s.to+e.length),range:J.range(s.anchor+e.length,s.head+e.length)};let l=$u(t.doc,s.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:Gi.of(s.head+e.length),range:J.cursor(s.head+e.length)}:{range:o=s}});return o?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function t4(t,e,n){let i=null,o=t.changeByRange(r=>r.empty&&$u(t.doc,r.head)==n?{changes:{from:r.head,to:r.head+n.length,insert:n},range:J.cursor(r.head+n.length)}:i={range:r});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function n4(t,e,n,i){let o=i.stringPrefixes||vs.stringPrefixes,r=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Gi.of(l.to+e.length),range:J.range(l.anchor+e.length,l.head+e.length)};let a=l.head,u=$u(t.doc,a),c;if(u==e){if(mg(t,a))return{changes:{insert:e+e,from:a},effects:Gi.of(a+e.length),range:J.cursor(a+e.length)};if(o1(t,a)){let h=n&&t.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+h.length,insert:h},range:J.cursor(a+h.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(c=gg(t,a-2*e.length,o))>-1&&mg(t,c))return{changes:{insert:e+e+e+e,from:a},effects:Gi.of(a+e.length),range:J.cursor(a+e.length)};if(t.charCategorizer(a)(u)!=et.Word&&gg(t,a,o)>-1&&!i4(t,a,e,o))return{changes:{insert:e+e,from:a},effects:Gi.of(a+e.length),range:J.cursor(a+e.length)}}return{range:r=l}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function mg(t,e){let n=Ot(t).resolveInner(e+1);return n.parent&&n.from==e}function i4(t,e,n,i){let o=Ot(t).resolveInner(e,-1),r=i.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(o.from,Math.min(o.to,o.from+n.length+r)),a=l.indexOf(n);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=o.firstChild;for(;c&&c.from==o.from&&c.to-c.from>n.length+a;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=o.to==e&&o.parent;if(!u)break;o=u}return!1}function gg(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=et.Word)return e;for(let o of n){let r=e-o.length;if(t.sliceDoc(r,e)==o&&i(t.sliceDoc(r-1,r))!=et.Word)return r}return-1}function o4(t={}){return[Gt,Wt.of(t),R5,r4,JO]}const r1=[{key:"Ctrl-Space",run:E5},{key:"Escape",run:M5},{key:"ArrowDown",run:gl(!0)},{key:"ArrowUp",run:gl(!1)},{key:"PageDown",run:gl(!0,"page")},{key:"PageUp",run:gl(!1,"page")},{key:"Enter",run:$5}],r4=go.highest(Ms.computeN([Wt],t=>t.facet(Wt).defaultKeymap?[r1]:[])),vg=new pE,s1=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function vl(t){return(e,n,i)=>{if(i)return!1;let o=e.node.getChild("VariableName");return o&&n(o,t),!0}}const s4={FunctionDefinition:vl("function"),ClassDefinition:vl("class"),ForStatement(t,e,n){if(n){for(let i=t.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")e(i,"variable");else if(i.name=="in")break}},ImportStatement(t,e){var n,i;let{node:o}=t,r=((n=o.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let s=o.getChild("import");s;s=s.nextSibling)s.name=="VariableName"&&((i=s.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&e(s,r?"variable":"namespace")},AssignStatement(t,e){for(let n=t.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")e(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(t,e){for(let n=null,i=t.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&e(i,"variable"),n=i},CapturePattern:vl("variable"),AsPattern:vl("variable"),__proto__:null};function l1(t,e){let n=vg.get(e);if(n)return n;let i=[],o=!0;function r(s,l){let a=t.sliceString(s.from,s.to);i.push({label:a,type:l})}return e.cursor(pt.IncludeAnonymous).iterate(s=>{if(s.name){let l=s4[s.name];if(l&&l(s,r,o)||!o&&s1.has(s.name))return!1;o=!1}else if(s.to-s.from>8192){for(let l of l1(t,s.node))i.push(l);return!1}}),vg.set(e,i),i}const yg=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,a1=["String","FormatString","Comment","PropertyName"];function l4(t){let e=Ot(t.state).resolveInner(t.pos,-1);if(a1.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&yg.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let o=e;o;o=o.parent)s1.has(o.name)&&(i=i.concat(l1(t.state.doc,o)));return{options:i,from:n?e.from:t.pos,validFor:yg}}const a4=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(t=>({label:t,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(t=>({label:t,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(t=>({label:t,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(t=>({label:t,type:"function"}))),u4=[Fn("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),Fn("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),Fn("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),Fn("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),Fn(`if \${}: + +`,{label:"if",detail:"block",type:"keyword"}),Fn("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),Fn("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),Fn("import ${module}",{label:"import",detail:"statement",type:"keyword"}),Fn("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],c4=m5(a1,jO(a4.concat(u4)));function Og(t,e){let n=t.baseIndentFor(e),i=t.lineAt(t.pos,-1),o=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&t.node.ton?null:n+t.unit}const xc=ds.define({name:"python",parser:f5.configure({props:[of.add({Body:t=>{var e;return(e=Og(t,t.node))!==null&&e!==void 0?e:t.continue()},IfStatement:t=>/^\s*(else:|elif )/.test(t.textAfter)?t.baseIndent:t.continue(),TryStatement:t=>/^\s*(except |finally:|else:)/.test(t.textAfter)?t.baseIndent:t.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":vc({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":vc({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":vc({closing:"]"}),"String FormatString":()=>null,Script:t=>{if(t.pos+/\s*/.exec(t.textAfter)[0].length>=t.node.to){let e=null;for(let n=t.node,i=n.to;n=n.lastChild,!(!n||n.to!=i);)n.type.name=="Body"&&(e=n);if(e){let n=Og(t,e);if(n!=null)return n}}return t.continue()}}),sf.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":EO,Body:(t,e)=>({from:t.from+1,to:t.to-(t.to==e.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function d4(){return new PO(xc,[xc.data.of({autocomplete:l4}),xc.data.of({autocomplete:c4})])}const h4="#e5c07b",wg="#e06c75",f4="#56b6c2",p4="#ffffff",Gl="#abb2bf",Yd="#7d8799",m4="#61afef",g4="#98c379",_g="#d19a66",v4="#c678dd",y4="#21252b",bg="#2c313a",xg="#282c34",Sc="#353a42",O4="#3E4451",Sg="#528bff",w4=ge.theme({"&":{color:Gl,backgroundColor:xg},".cm-content":{caretColor:Sg},".cm-cursor, .cm-dropCursor":{borderLeftColor:Sg},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:O4},".cm-panels":{backgroundColor:y4,color:Gl},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:xg,color:Yd,border:"none"},".cm-activeLineGutter":{backgroundColor:bg},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Sc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Sc,borderBottomColor:Sc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:bg,color:Gl}}},{dark:!0}),_4=Rs.define([{tag:B.keyword,color:v4},{tag:[B.name,B.deleted,B.character,B.propertyName,B.macroName],color:wg},{tag:[B.function(B.variableName),B.labelName],color:m4},{tag:[B.color,B.constant(B.name),B.standard(B.name)],color:_g},{tag:[B.definition(B.name),B.separator],color:Gl},{tag:[B.typeName,B.className,B.number,B.changed,B.annotation,B.modifier,B.self,B.namespace],color:h4},{tag:[B.operator,B.operatorKeyword,B.url,B.escape,B.regexp,B.link,B.special(B.string)],color:f4},{tag:[B.meta,B.comment],color:Yd},{tag:B.strong,fontWeight:"bold"},{tag:B.emphasis,fontStyle:"italic"},{tag:B.strikethrough,textDecoration:"line-through"},{tag:B.link,color:Yd,textDecoration:"underline"},{tag:B.heading,fontWeight:"bold",color:wg},{tag:[B.atom,B.bool,B.special(B.variableName)],color:_g},{tag:[B.processingInstruction,B.string,B.inserted],color:g4},{tag:B.invalid,color:p4}]),kg=[w4,IO(_4)],b4=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=gf(t.state,n.from);return i.line?x4(t):i.block?k4(t):!1};function mf(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let o=t(e,n);return o?(i(n.update(o)),!0):!1}}const x4=mf(C4,0),S4=mf(u1,0),k4=mf((t,e)=>u1(t,e,P4(e)),0);function gf(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const wr=50;function T4(t,{open:e,close:n},i,o){let r=t.sliceDoc(i-wr,i),s=t.sliceDoc(o,o+wr),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(s)[0].length,u=r.length-l;if(r.slice(u-e.length,u)==e&&s.slice(a,a+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:o+a,margin:a&&1}};let c,d;o-i<=2*wr?c=d=t.sliceDoc(i,o):(c=t.sliceDoc(i,i+wr),d=t.sliceDoc(o-wr,o));let h=/^\s*/.exec(c)[0].length,f=/\s*$/.exec(d)[0].length,m=d.length-f-n.length;return c.slice(h,h+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:i+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:o-f-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function P4(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),o=n.to<=i.to?i:t.doc.lineAt(n.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=o.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:o.to})}return e}function u1(t,e,n=e.selection.ranges){let i=n.map(r=>gf(e,r.from).block);if(!i.every(r=>r))return null;let o=n.map((r,s)=>T4(e,i[s],r.from,r.to));if(t!=2&&!o.every(r=>r))return{changes:e.changes(n.map((r,s)=>o[s]?[]:[{from:r.from,insert:i[s].open+" "},{from:r.to,insert:" "+i[s].close}]))};if(t!=1&&o.some(r=>r)){let r=[];for(let s=0,l;so&&(r==s||s>d.from)){o=d.from;let h=/^\s*/.exec(d.text)[0].length,f=h==d.length,m=d.text.slice(h,h+u.length)==u?h:-1;hr.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:u,empty:c,single:d}of i)(d||!c)&&r.push({from:l.from+u,insert:a+" "});let s=e.changes(r);return{changes:s,selection:e.selection.map(s,1)}}else if(t!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:s,comment:l,token:a}of i)if(l>=0){let u=s.from+l,c=u+a.length;s.text[c-s.from]==" "&&c++,r.push({from:u,to:c})}return{changes:r}}return null}const jd=di.define(),$4=di.define(),E4=Oe.define(),c1=Oe.define({combine(t){return zn(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,o)=>e(i,o)||n(i,o)})}});function M4(t){let e=0;return t.iterChangedRanges((n,i)=>e=i),e}const d1=wt.define({create(){return qn.empty},update(t,e){let n=e.state.facet(c1),i=e.annotation(jd);if(i){let a=e.docChanged?J.single(M4(e.changes)):void 0,u=Lt.fromTransaction(e,a),c=i.side,d=c==0?t.undone:t.done;return u?d=za(d,d.length,n.minDepth,u):d=p1(d,e.startState.selection),new qn(c==0?i.rest:d,c==0?d:i.rest)}let o=e.annotation($4);if((o=="full"||o=="before")&&(t=t.isolate()),e.annotation(gt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Lt.fromTransaction(e),s=e.annotation(gt.time),l=e.annotation(gt.userEvent);return r?t=t.addChanges(r,s,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,l,n.newGroupDelay)),(o=="full"||o=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new qn(t.done.map(Lt.fromJSON),t.undone.map(Lt.fromJSON))}});function A4(t={}){return[d1,c1.of(t),ge.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?h1:e.inputType=="historyRedo"?Fd:null;return i?(e.preventDefault(),i(n)):!1}})]}function Eu(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let o=n.field(d1,!1);if(!o)return!1;let r=o.pop(t,n,e);return r?(i(r),!0):!1}}const h1=Eu(0,!1),Fd=Eu(1,!1),D4=Eu(0,!0),q4=Eu(1,!0);class Lt{constructor(e,n,i,o,r){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=o,this.selectionsAfter=r}setSelAfter(e){return new Lt(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(o=>o.toJSON())}}static fromJSON(e){return new Lt(e.changes&&ft.fromJSON(e.changes),[],e.mapped&&Qn.fromJSON(e.mapped),e.startSelection&&J.fromJSON(e.startSelection),e.selectionsAfter.map(J.fromJSON))}static fromTransaction(e,n){let i=ln;for(let o of e.startState.facet(E4)){let r=o(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Lt(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,ln)}static selection(e){return new Lt(void 0,ln,void 0,void 0,e)}}function za(t,e,n,i){let o=e+1>n+20?e-n-1:0,r=t.slice(o,e);return r.push(i),r}function R4(t,e){let n=[],i=!1;return t.iterChangedRanges((o,r)=>n.push(o,r)),e.iterChangedRanges((o,r,s,l)=>{for(let a=0;a=u&&s<=c&&(i=!0)}}),i}function Q4(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function f1(t,e){return t.length?e.length?t.concat(e):t:e}const ln=[],N4=200;function p1(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-N4));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),za(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Lt.selection([e])]}function I4(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function kc(t,e){if(!t.length)return t;let n=t.length,i=ln;for(;n;){let o=V4(t[n-1],e,i);if(o.changes&&!o.changes.empty||o.effects.length){let r=t.slice(0,n);return r[n-1]=o,r}else e=o.mapped,n--,i=o.selectionsAfter}return i.length?[Lt.selection(i)]:ln}function V4(t,e,n){let i=f1(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):ln,n);if(!t.changes)return Lt.selection(i);let o=t.changes.map(e),r=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(r):r;return new Lt(o,Pe.mapEffects(t.effects,e),s,t.startSelection.map(r),i)}const B4=/^(input\.type|delete)($|\.)/;class qn{constructor(e,n,i=0,o=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=o}isolate(){return this.prevTime?new qn(this.done,this.undone):this}addChanges(e,n,i,o,r){let s=this.done,l=s[s.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||B4.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):Mu(n,e))}function At(t){return t.textDirectionAt(t.state.selection.main.head)==nt.LTR}const g1=t=>m1(t,!At(t)),v1=t=>m1(t,At(t));function y1(t,e){return wn(t,n=>n.empty?t.moveByGroup(n,e):Mu(n,e))}const L4=t=>y1(t,!At(t)),z4=t=>y1(t,At(t));function X4(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Au(t,e,n){let i=Ot(t).resolveInner(e.head),o=n?Ae.closedBy:Ae.openedBy;for(let a=e.head;;){let u=n?i.childAfter(a):i.childBefore(a);if(!u)break;X4(t,u,o)?i=u:a=n?u.to:u.from}let r=i.type.prop(o),s,l;return r&&(s=n?Dn(t,i.from,1):Dn(t,i.to,-1))&&s.matched?l=n?s.end.to:s.end.from:l=n?i.to:i.from,J.cursor(l,n?-1:1)}const U4=t=>wn(t,e=>Au(t.state,e,!At(t))),Y4=t=>wn(t,e=>Au(t.state,e,At(t)));function O1(t,e){return wn(t,n=>{if(!n.empty)return Mu(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const w1=t=>O1(t,!1),_1=t=>O1(t,!0);function b1(t){let e=t.scrollDOM.clientHeights.empty?t.moveVertically(s,e,n.height):Mu(s,e));if(o.eq(i.selection))return!1;let r;if(n.selfScroll){let s=t.coordsAtPos(i.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,u=l.bottom-n.marginBottom;s&&s.top>a&&s.bottomx1(t,!1),Hd=t=>x1(t,!0);function Ii(t,e,n){let i=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,n);if(o.head==e.head&&o.head!=(n?i.to:i.from)&&(o=t.moveToLineBoundary(e,n,!1)),!n&&o.head==i.from&&i.length){let r=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(o=J.cursor(i.from+r))}return o}const j4=t=>wn(t,e=>Ii(t,e,!0)),F4=t=>wn(t,e=>Ii(t,e,!1)),H4=t=>wn(t,e=>Ii(t,e,!At(t))),G4=t=>wn(t,e=>Ii(t,e,At(t))),Z4=t=>wn(t,e=>J.cursor(t.lineBlockAt(e.head).from,1)),K4=t=>wn(t,e=>J.cursor(t.lineBlockAt(e.head).to,-1));function J4(t,e,n){let i=!1,o=cr(t.selection,r=>{let s=Dn(t,r.head,-1)||Dn(t,r.head,1)||r.head>0&&Dn(t,r.head-1,1)||r.headJ4(t,e,!1);function dn(t,e){let n=cr(t.state.selection,i=>{let o=e(i);return J.range(i.anchor,o.head,o.goalColumn,o.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(Un(t.state,n)),!0)}function S1(t,e){return dn(t,n=>t.moveByChar(n,e))}const k1=t=>S1(t,!At(t)),T1=t=>S1(t,At(t));function P1(t,e){return dn(t,n=>t.moveByGroup(n,e))}const t3=t=>P1(t,!At(t)),n3=t=>P1(t,At(t)),i3=t=>dn(t,e=>Au(t.state,e,!At(t))),o3=t=>dn(t,e=>Au(t.state,e,At(t)));function C1(t,e){return dn(t,n=>t.moveVertically(n,e))}const $1=t=>C1(t,!1),E1=t=>C1(t,!0);function M1(t,e){return dn(t,n=>t.moveVertically(n,e,b1(t).height))}const Pg=t=>M1(t,!1),Cg=t=>M1(t,!0),r3=t=>dn(t,e=>Ii(t,e,!0)),s3=t=>dn(t,e=>Ii(t,e,!1)),l3=t=>dn(t,e=>Ii(t,e,!At(t))),a3=t=>dn(t,e=>Ii(t,e,At(t))),u3=t=>dn(t,e=>J.cursor(t.lineBlockAt(e.head).from)),c3=t=>dn(t,e=>J.cursor(t.lineBlockAt(e.head).to)),$g=({state:t,dispatch:e})=>(e(Un(t,{anchor:0})),!0),Eg=({state:t,dispatch:e})=>(e(Un(t,{anchor:t.doc.length})),!0),Mg=({state:t,dispatch:e})=>(e(Un(t,{anchor:t.selection.main.anchor,head:0})),!0),Ag=({state:t,dispatch:e})=>(e(Un(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),d3=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),h3=({state:t,dispatch:e})=>{let n=qu(t).map(({from:i,to:o})=>J.range(i,Math.min(o+1,t.doc.length)));return e(t.update({selection:J.create(n),userEvent:"select"})),!0},f3=({state:t,dispatch:e})=>{let n=cr(t.selection,i=>{var o;let r=Ot(t).resolveInner(i.head,1);for(;!(r.from=i.to||r.to>i.to&&r.from<=i.from||!(!((o=r.parent)===null||o===void 0)&&o.parent));)r=r.parent;return J.range(r.to,r.from)});return e(Un(t,n)),!0},p3=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=J.create([n.main]):n.main.empty||(i=J.create([J.cursor(n.main.head)])),i?(e(Un(t,i)),!0):!1};function Du(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,o=i.changeByRange(r=>{let{from:s,to:l}=r;if(s==l){let a=e(s);as&&(n="delete.forward",a=yl(t,a,!0)),s=Math.min(s,a),l=Math.max(l,a)}else s=yl(t,s,!1),l=yl(t,l,!0);return s==l?{range:r}:{changes:{from:s,to:l},range:J.cursor(s)}});return o.changes.empty?!1:(t.dispatch(i.update(o,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ge.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function yl(t,e,n){if(t instanceof ge)for(let i of t.state.facet(ge.atomicRanges).map(o=>o(t)))i.between(e,e,(o,r)=>{oe&&(e=n?r:o)});return e}const A1=(t,e)=>Du(t,n=>{let{state:i}=t,o=i.doc.lineAt(n),r,s;if(!e&&n>o.from&&nA1(t,!1),D1=t=>A1(t,!0),q1=(t,e)=>Du(t,n=>{let i=n,{state:o}=t,r=o.doc.lineAt(i),s=o.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==n&&r.number!=(e?o.doc.lines:1)&&(i+=e?1:-1);break}let a=Et(r.text,i-r.from,e)+r.from,u=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=s(u);if(l!=null&&c!=l)break;(u!=" "||i!=n)&&(l=c),i=a}return i}),R1=t=>q1(t,!1),m3=t=>q1(t,!0),Q1=t=>Du(t,e=>{let n=t.lineBlockAt(e).to;return eDu(t,e=>{let n=t.lineBlockAt(e).from;return e>n?n:Math.max(0,e-1)}),v3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Be.of(["",""])},range:J.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},y3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let o=i.from,r=t.doc.lineAt(o),s=o==r.from?o-1:Et(r.text,o-r.from,!1)+r.from,l=o==r.to?o+1:Et(r.text,o-r.from,!0)+r.from;return{changes:{from:s,to:l,insert:t.doc.slice(o,l).append(t.doc.slice(s,o))},range:J.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function qu(t){let e=[],n=-1;for(let i of t.selection.ranges){let o=t.doc.lineAt(i.from),r=t.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=t.doc.lineAt(i.to-1)),n>=o.number){let s=e[e.length-1];s.to=r.to,s.ranges.push(i)}else e.push({from:o.from,to:r.to,ranges:[i]});n=r.number+1}return e}function N1(t,e,n){if(t.readOnly)return!1;let i=[],o=[];for(let r of qu(t)){if(n?r.to==t.doc.length:r.from==0)continue;let s=t.doc.lineAt(n?r.to+1:r.from-1),l=s.length+1;if(n){i.push({from:r.to,to:s.to},{from:r.from,insert:s.text+t.lineBreak});for(let a of r.ranges)o.push(J.range(Math.min(t.doc.length,a.anchor+l),Math.min(t.doc.length,a.head+l)))}else{i.push({from:s.from,to:r.from},{from:r.to,insert:t.lineBreak+s.text});for(let a of r.ranges)o.push(J.range(a.anchor-l,a.head-l))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:J.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const O3=({state:t,dispatch:e})=>N1(t,e,!1),w3=({state:t,dispatch:e})=>N1(t,e,!0);function I1(t,e,n){if(t.readOnly)return!1;let i=[];for(let o of qu(t))n?i.push({from:o.from,insert:t.doc.slice(o.from,o.to)+t.lineBreak}):i.push({from:o.to,insert:t.lineBreak+t.doc.slice(o.from,o.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const _3=({state:t,dispatch:e})=>I1(t,e,!1),b3=({state:t,dispatch:e})=>I1(t,e,!0),x3=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(qu(e).map(({from:o,to:r})=>(o>0?o--:rt.moveVertically(o,!0)).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function S3(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Ot(t).resolveInner(e),i=n.childBefore(e),o=n.childAfter(e),r;return i&&o&&i.to<=e&&o.from>=e&&(r=i.type.prop(Ae.closedBy))&&r.indexOf(o.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(i.to,o.from))?{from:i.to,to:o.from}:null}const k3=V1(!1),T3=V1(!0);function V1(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(o=>{let{from:r,to:s}=o,l=e.doc.lineAt(r),a=!t&&r==s&&S3(e,r);t&&(r=s=(s<=l.to?l:e.doc.lineAt(s)).to);let u=new ku(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=nf(u,r);for(c==null&&(c=ar(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));sl.from&&r{let o=[];for(let s=i.from;s<=i.to;){let l=t.doc.lineAt(s);l.number>n&&(i.empty||i.to>l.from)&&(e(l,o,i),n=l.number),s=l.to+1}let r=t.changes(o);return{changes:o,range:J.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const P3=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new ku(t,{overrideIndentation:r=>{let s=n[r];return s??-1}}),o=vf(t,(r,s,l)=>{let a=nf(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let u=/^\s*/.exec(r.text)[0],c=hs(t,a);(u!=c||l.fromt.readOnly?!1:(e(t.update(vf(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Ds)})}),{userEvent:"input.indent"})),!0),W1=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(vf(t,(n,i)=>{let o=/^\s*/.exec(n.text)[0];if(!o)return;let r=ar(o,t.tabSize),s=0,l=hs(t,Math.max(0,r-Va(t)));for(;s({mac:t.key,run:t.run,shift:t.shift}))),E3=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:U4,shift:i3},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Y4,shift:o3},{key:"Alt-ArrowUp",run:O3},{key:"Shift-Alt-ArrowUp",run:_3},{key:"Alt-ArrowDown",run:w3},{key:"Shift-Alt-ArrowDown",run:b3},{key:"Escape",run:p3},{key:"Mod-Enter",run:T3},{key:"Alt-l",mac:"Ctrl-l",run:h3},{key:"Mod-i",run:f3,preventDefault:!0},{key:"Mod-[",run:W1},{key:"Mod-]",run:B1},{key:"Mod-Alt-\\",run:P3},{key:"Shift-Mod-k",run:x3},{key:"Shift-Mod-\\",run:e3},{key:"Mod-/",run:b4},{key:"Alt-A",run:S4}].concat($3),M3={key:"Tab",run:B1,shift:W1};function je(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i];typeof o=="string"?t.setAttribute(i,o):o!=null&&(t[i]=o)}e++}for(;et.normalize("NFKD"):t=>t;class nr{constructor(e,n,i=0,o=e.length,r,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,o),this.bufferStart=i,this.normalize=r?l=>r(Dg(l)):Dg,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return St(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=Uh(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=sn(e);let o=this.normalize(n);for(let r=0,s=i;;r++){let l=o.charCodeAt(r),a=this.match(l,s);if(r==o.length-1){if(a)return this.value=a,this;break}s==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,o=i+n[0].length;if(this.matchPos=Xa(this.text,o+(i==o?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,o,n)))return this.value={from:i,to:o,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||o.to<=n){let l=new Xo(n,e.sliceString(n,i));return Tc.set(e,l),l}if(o.from==n&&o.to==i)return o;let{text:r,from:s}=o;return s>n&&(r=e.sliceString(n,s)+r,s=n),o.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,o=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,o,n)))return this.value={from:i,to:o,match:n},this.matchPos=Xa(this.text,o+(i==o?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Xo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(X1.prototype[Symbol.iterator]=U1.prototype[Symbol.iterator]=function(){return this});function A3(t){try{return new RegExp(t,yf),!0}catch{return!1}}function Xa(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function Zd(t){let e=je("input",{class:"cm-textfield",name:"line"}),n=je("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Ua.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},je("label",t.state.phrase("Go to line"),": ",e)," ",je("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!o)return;let{state:r}=t,s=r.doc.lineAt(r.selection.main.head),[,l,a,u,c]=o,d=u?+u.slice(1):0,h=a?+a:s.number;if(a&&c){let v=h/100;l&&(v=v*(l=="-"?-1:1)+s.number/r.doc.lines),h=Math.round(r.doc.lines*v)}else a&&l&&(h=h*(l=="-"?-1:1)+s.number);let f=r.doc.line(Math.max(1,Math.min(r.doc.lines,h))),m=J.cursor(f.from+Math.max(0,Math.min(d,f.length)));t.dispatch({effects:[Ua.of(!1),ge.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:n}}const Ua=Pe.define(),qg=wt.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ua)&&(t=n.value);return t},provide:t=>cs.from(t,e=>e?Zd:null)}),D3=t=>{let e=us(t,Zd);if(!e){let n=[Ua.of(!0)];t.state.field(qg,!1)==null&&n.push(Pe.appendConfig.of([qg,q3])),t.dispatch({effects:n}),e=us(t,Zd)}return e&&e.dom.querySelector("input").focus(),!0},q3=ge.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),R3={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Y1=Oe.define({combine(t){return zn(t,R3,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Q3(t){let e=[W3,B3];return t&&e.push(Y1.of(t)),e}const N3=xe.mark({class:"cm-selectionMatch"}),I3=xe.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Rg(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=et.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=et.Word)}function V3(t,e,n,i){return t(e.sliceDoc(n,n+1))==et.Word&&t(e.sliceDoc(i-1,i))==et.Word}const B3=dt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Y1),{state:n}=t,i=n.selection;if(i.ranges.length>1)return xe.none;let o=i.main,r,s=null;if(o.empty){if(!e.highlightWordAroundCursor)return xe.none;let a=n.wordAt(o.head);if(!a)return xe.none;s=n.charCategorizer(o.head),r=n.sliceDoc(a.from,a.to)}else{let a=o.to-o.from;if(a200)return xe.none;if(e.wholeWords){if(r=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!(Rg(s,n,o.from,o.to)&&V3(s,n,o.from,o.to)))return xe.none}else if(r=n.sliceDoc(o.from,o.to).trim(),!r)return xe.none}let l=[];for(let a of t.visibleRanges){let u=new nr(n.doc,r,a.from,a.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!s||Rg(s,n,c,d))&&(o.empty&&c<=o.from&&d>=o.to?l.push(I3.range(c,d)):(c>=o.to||d<=o.from)&&l.push(N3.range(c,d)),l.length>e.maxMatches))return xe.none}}return xe.set(l)}},{decorations:t=>t.decorations}),W3=ge.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),L3=({state:t,dispatch:e})=>{let{selection:n}=t,i=J.create(n.ranges.map(o=>t.wordAt(o.head)||J.cursor(o.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function z3(t,e){let{main:n,ranges:i}=t.selection,o=t.wordAt(n.head),r=o&&o.from==n.from&&o.to==n.to;for(let s=!1,l=new nr(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(s)return null;l=new nr(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),s=!0}else{if(s&&i.some(a=>a.from==l.value.from))continue;if(r){let a=t.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const X3=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(r=>r.from===r.to))return L3({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(r=>t.sliceDoc(r.from,r.to)!=i))return!1;let o=z3(t,i);return o?(e(t.update({selection:t.selection.addRange(J.range(o.from,o.to),!1),effects:ge.scrollIntoView(o.to)})),!0):!1},dr=Oe.define({combine(t){return zn(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new nq(e),scrollToMatch:e=>ge.scrollIntoView(e)})}});class j1{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||A3(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new F3(this):new Y3(this)}getCursor(e,n=0,i){let o=e.doc?e:qe.create({doc:e});return i==null&&(i=o.doc.length),this.regexp?xo(this,o,n,i):bo(this,o,n,i)}}class F1{constructor(e){this.spec=e}}function bo(t,e,n,i){return new nr(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:o=>o.toLowerCase(),t.wholeWord?U3(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function U3(t,e){return(n,i,o,r)=>((r>n||r+o.length=n)return null;o.push(i.value)}return o}highlight(e,n,i,o){let r=bo(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)o(r.value.from,r.value.to)}}function xo(t,e,n,i){return new X1(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?j3(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function Ya(t,e){return t.slice(Et(t,e,!1),e)}function ja(t,e){return t.slice(e,Et(t,e))}function j3(t){return(e,n,i)=>!i[0].length||(t(Ya(i.input,i.index))!=et.Word||t(ja(i.input,i.index))!=et.Word)&&(t(ja(i.input,i.index+i[0].length))!=et.Word||t(Ya(i.input,i.index+i[0].length))!=et.Word)}class F3 extends F1{nextMatch(e,n,i){let o=xo(this.spec,e,i,e.doc.length).next();return o.done&&(o=xo(this.spec,e,0,n).next()),o.done?null:o.value}prevMatchInRange(e,n,i){for(let o=1;;o++){let r=Math.max(n,i-o*1e4),s=xo(this.spec,e,r,i),l=null;for(;!s.next().done;)l=s.value;if(l&&(r==n||l.from>r+10))return l;if(r==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(n,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=n)return null;o.push(i.value)}return o}highlight(e,n,i,o){let r=xo(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)o(r.value.from,r.value.to)}}const ys=Pe.define(),Of=Pe.define(),Mi=wt.define({create(t){return new Pc(Kd(t).create(),null)},update(t,e){for(let n of e.effects)n.is(ys)?t=new Pc(n.value.create(),t.panel):n.is(Of)&&(t=new Pc(t.query,n.value?wf:null));return t},provide:t=>cs.from(t,e=>e.panel)});class Pc{constructor(e,n){this.query=e,this.panel=n}}const H3=xe.mark({class:"cm-searchMatch"}),G3=xe.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Z3=dt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Mi))}update(t){let e=t.state.field(Mi);(e!=t.startState.field(Mi)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return xe.none;let{view:n}=this,i=new Ai;for(let o=0,r=n.visibleRanges,s=r.length;or[o+1].from-2*250;)a=r[++o].to;t.highlight(n.state,l,a,(u,c)=>{let d=n.state.selection.ranges.some(h=>h.from==u&&h.to==c);i.add(u,c,d?G3:H3)})}return i.finish()}},{decorations:t=>t.decorations});function Ns(t){return e=>{let n=e.state.field(Mi,!1);return n&&n.query.spec.valid?t(e,n):Z1(e)}}const Fa=Ns((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let o=J.single(i.from,i.to),r=t.state.facet(dr);return t.dispatch({selection:o,effects:[_f(t,i),r.scrollToMatch(o.main,t)],userEvent:"select.search"}),G1(t),!0}),Ha=Ns((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,o=e.prevMatch(n,i,i);if(!o)return!1;let r=J.single(o.from,o.to),s=t.state.facet(dr);return t.dispatch({selection:r,effects:[_f(t,o),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),G1(t),!0}),K3=Ns((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:J.create(n.map(i=>J.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),J3=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:o}=n.main,r=[],s=0;for(let l=new nr(t.doc,t.sliceDoc(i,o));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(s=r.length),r.push(J.range(l.value.from,l.value.to))}return e(t.update({selection:J.create(r,s),userEvent:"select.search.matches"})),!0},Qg=Ns((t,{query:e})=>{let{state:n}=t,{from:i,to:o}=n.selection.main;if(n.readOnly)return!1;let r=e.nextMatch(n,i,i);if(!r)return!1;let s=[],l,a,u=[];if(r.from==i&&r.to==o&&(a=n.toText(e.getReplacement(r)),s.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(n,r.from,r.to),u.push(ge.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),r){let c=s.length==0||s[0].from>=r.to?0:r.to-r.from-a.length;l=J.single(r.from-c,r.to-c),u.push(_f(t,r)),u.push(n.facet(dr).scrollToMatch(l.main,t))}return t.dispatch({changes:s,selection:l,effects:u,userEvent:"input.replace"}),!0}),eq=Ns((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(o=>{let{from:r,to:s}=o;return{from:r,to:s,insert:e.getReplacement(o)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ge.announce.of(i),userEvent:"input.replace.all"}),!0});function wf(t){return t.state.facet(dr).createPanel(t)}function Kd(t,e){var n,i,o,r,s;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let u=t.facet(dr);return new j1({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(o=e==null?void 0:e.literal)!==null&&o!==void 0?o:u.literal,regexp:(r=e==null?void 0:e.regexp)!==null&&r!==void 0?r:u.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:u.wholeWord})}function H1(t){let e=us(t,wf);return e&&e.dom.querySelector("[main-field]")}function G1(t){let e=H1(t);e&&e==t.root.activeElement&&e.select()}const Z1=t=>{let e=t.state.field(Mi,!1);if(e&&e.panel){let n=H1(t);if(n&&n!=t.root.activeElement){let i=Kd(t.state,e.query.spec);i.valid&&t.dispatch({effects:ys.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[Of.of(!0),e?ys.of(Kd(t.state,e.query.spec)):Pe.appendConfig.of(oq)]});return!0},K1=t=>{let e=t.state.field(Mi,!1);if(!e||!e.panel)return!1;let n=us(t,wf);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Of.of(!1)}),!0},tq=[{key:"Mod-f",run:Z1,scope:"editor search-panel"},{key:"F3",run:Fa,shift:Ha,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Fa,shift:Ha,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:K1,scope:"editor search-panel"},{key:"Mod-Shift-l",run:J3},{key:"Alt-g",run:D3},{key:"Mod-d",run:X3,preventDefault:!0}];class nq{constructor(e){this.view=e;let n=this.query=e.state.field(Mi).query.spec;this.commit=this.commit.bind(this),this.searchField=je("input",{value:n.search,placeholder:Yt(e,"Find"),"aria-label":Yt(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=je("input",{value:n.replace,placeholder:Yt(e,"Replace"),"aria-label":Yt(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=je("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=je("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=je("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(o,r,s){return je("button",{class:"cm-button",name:o,onclick:r,type:"button"},s)}this.dom=je("div",{onkeydown:o=>this.keydown(o),class:"cm-search"},[this.searchField,i("next",()=>Fa(e),[Yt(e,"next")]),i("prev",()=>Ha(e),[Yt(e,"previous")]),i("select",()=>K3(e),[Yt(e,"all")]),je("label",null,[this.caseField,Yt(e,"match case")]),je("label",null,[this.reField,Yt(e,"regexp")]),je("label",null,[this.wordField,Yt(e,"by word")]),...e.state.readOnly?[]:[je("br"),this.replaceField,i("replace",()=>Qg(e),[Yt(e,"replace")]),i("replaceAll",()=>eq(e),[Yt(e,"replace all")])],je("button",{name:"close",onclick:()=>K1(e),"aria-label":Yt(e,"close"),type:"button"},["×"])])}commit(){let e=new j1({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ys.of(e)}))}keydown(e){SA(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ha:Fa)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Qg(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(ys)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(dr).top}}function Yt(t,e){return t.state.phrase(e)}const Ol=30,wl=/[\s\.,:;?!]/;function _f(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),o=t.state.doc.lineAt(n).to,r=Math.max(i.from,e-Ol),s=Math.min(o,n+Ol),l=t.state.sliceDoc(r,s);if(r!=i.from){for(let a=0;al.length-Ol;a--)if(!wl.test(l[a-1])&&wl.test(l[a])){l=l.slice(0,a);break}}return ge.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const iq=ge.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),oq=[Mi,go.low(Z3),iq];class rq{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Ui{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let o=e,r=i.facet(tw).markerFilter;r&&(o=r(o));let s=xe.set(o.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?xe.widget({widget:new pq(l),diagnostic:l}).range(l.from):xe.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new Ui(s,n,ir(s))}}function ir(t,e=null,n=0){let i=null;return t.between(n,1e9,(o,r,{spec:s})=>{if(!(e&&s.diagnostic!=e))return i=new rq(o,r,s.diagnostic),!1}),i}function sq(t,e){let n=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(i=>i.is(J1))||t.changes.touchesRange(n.from,n.to))}function lq(t,e){return t.field(Jt,!1)?e:e.concat(Pe.appendConfig.of(vq))}const J1=Pe.define(),bf=Pe.define(),ew=Pe.define(),Jt=wt.define({create(){return new Ui(xe.none,null,null)},update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),i=null;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);i=ir(n,t.selected.diagnostic,o)||ir(n,null,o)}t=new Ui(n,t.panel,i)}for(let n of e.effects)n.is(J1)?t=Ui.init(n.value,t.panel,e.state):n.is(bf)?t=new Ui(t.diagnostics,n.value?Ru.open:null,t.selected):n.is(ew)&&(t=new Ui(t.diagnostics,t.panel,n.value));return t},provide:t=>[cs.from(t,e=>e.panel),ge.decorations.from(t,e=>e.diagnostics)]}),aq=xe.mark({class:"cm-lintRange cm-lintRange-active"});function uq(t,e,n){let{diagnostics:i}=t.state.field(Jt),o=[],r=2e8,s=0;i.between(e-(n<0?1:0),e+(n>0?1:0),(a,u,{spec:c})=>{e>=a&&e<=u&&(a==u||(e>a||n>0)&&(eiw(t,n,!1)))}const dq=t=>{let e=t.state.field(Jt,!1);(!e||!e.panel)&&t.dispatch({effects:lq(t.state,[bf.of(!0)])});let n=us(t,Ru.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Ng=t=>{let e=t.state.field(Jt,!1);return!e||!e.panel?!1:(t.dispatch({effects:bf.of(!1)}),!0)},hq=t=>{let e=t.state.field(Jt,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},fq=[{key:"Mod-Shift-m",run:dq,preventDefault:!0},{key:"F8",run:hq}],tw=Oe.define({combine(t){return Object.assign({sources:t.map(e=>e.source)},zn(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n}))}});function nw(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;ir.toLowerCase()==o.toLowerCase())){e.push(o);continue e}}e.push("")}return e}function iw(t,e,n){var i;let o=n?nw(e.actions):[];return je("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},je("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,s)=>{let l=!1,a=h=>{if(h.preventDefault(),l)return;l=!0;let f=ir(t.state.field(Jt).diagnostics,e);f&&r.apply(t,f.from,f.to)},{name:u}=r,c=o[s]?u.indexOf(o[s]):-1,d=c<0?u:[u.slice(0,c),je("u",u.slice(c,c+1)),u.slice(c+1)];return je("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${u}${c<0?"":` (access key "${o[s]})"`}.`},d)}),e.source&&je("div",{class:"cm-diagnosticSource"},e.source))}class pq extends Xn{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return je("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Ig{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=iw(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ru{constructor(e){this.view=e,this.items=[];let n=o=>{if(o.keyCode==27)Ng(this.view),this.view.focus();else if(o.keyCode==38||o.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(o.keyCode==40||o.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(o.keyCode==36)this.moveSelection(0);else if(o.keyCode==35)this.moveSelection(this.items.length-1);else if(o.keyCode==13)this.view.focus();else if(o.keyCode>=65&&o.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],s=nw(r.actions);for(let l=0;l{for(let r=0;rNg(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Jt).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let d=i;di&&(this.items.splice(i,u-i),o=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),r=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),i++});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{s.topl.bottom&&(this.list.scrollTop+=s.bottom-l.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Jt),i=ir(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:ew.of(i)})}static open(e){return new Ru(e)}}function mq(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function _l(t){return mq(``,'width="6" height="3"')}const gq=ge.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:_l("#d11")},".cm-lintRange-warning":{backgroundImage:_l("orange")},".cm-lintRange-info":{backgroundImage:_l("#999")},".cm-lintRange-hint":{backgroundImage:_l("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),vq=[Jt,ge.decorations.compute([Jt],t=>{let{selected:e,panel:n}=t.field(Jt);return!e||!n||e.from==e.to?xe.none:xe.set([aq.range(e.from,e.to)])}),dD(uq,{hideOn:sq}),gq],yq=(()=>[wD(),xD(),WA(),A4(),HD(),EA(),RA(),qe.allowMultipleSelections.of(!0),QD(),IO(JD,{fallback:!0}),s8(),j5(),o4(),tD(),oD(),jA(),Q3(),Ms.of([...Z5,...E3,...tq,...W4,...UD,...r1,...fq])])();/*! +* VueCodemirror v6.1.1 +* Copyright (c) Surmon. All rights reserved. +* Released under the MIT License. +* Surmon +*/var Oq=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[yq]}),wq=Symbol("vue-codemirror-global-config"),Rt,_q=function(t){var e=t.onUpdate,n=t.onChange,i=t.onFocus,o=t.onBlur,r=function(s,l){var a={};for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&l.indexOf(u)<0&&(a[u]=s[u]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(s);c{o.value=h,e("update:code",o.value)},l=(h,f)=>{r.value=h,e("update:open",r.value),f&&e("save",o.value)};Me(()=>n.code,h=>{o.value=h}),Me(()=>n.open,h=>{r.value=h});const a=ge.theme({".cm-content":{fontFamily:"Cascadia Code, Consolas, Monaco, Menlo, Ubuntu Mono, Liberation Mono, DejaVu Sans Mono, Courier New, monospace",fontSize:"24px"}}),u={python:{extensions:[d4(),kg,a],tabSize:4},json:{extensions:[p8(),kg,a],tabSize:2}},c=ql(),d=h=>{c.value=h.view};return(h,f)=>{const m=C("a-typography-text"),v=C("a-space"),w=C("a-modal");return E(),K(w,{open:O(r),width:"80vw",onOk:f[2]||(f[2]=y=>l(!1,!0)),onCancel:f[3]||(f[3]=y=>l(!1,!1))},{title:g(()=>[p(v,null,{default:g(()=>[p(O(C_)),pe(" "+de(O(i)("components.codeEditorModal.title"))+" ",1),p(m,{copyable:{text:n.code}},{copyableTooltip:g(({copied:y})=>[y?(E(),le("span",$q,de(O(i)("components.codeEditorModal.copy_success")),1)):(E(),le("span",Cq,de(O(i)("components.codeEditorModal.copy_code")),1))]),_:1},8,["copyable"])]),_:1})]),default:g(()=>[p(O(Pq),{class:"code-editor",modelValue:O(o),"onUpdate:modelValue":f[0]||(f[0]=y=>xs(o)?o.value=y:o=y),placeholder:O(i)("components.codeEditorModal.please_enter_code"),style:{height:"80vh",minHeight:"400px"},autofocus:!0,"indent-with-tab":!0,"tab-size":u[n.language].tabSize,extensions:u[n.language].extensions,onReady:d,onChange:f[1]||(f[1]=y=>s(y))},null,8,["modelValue","placeholder","tab-size","extensions"])]),_:1},8,["open"])}}},Eq={__name:"ProgrammingFunction",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"tools.programming_function",has_inputs:!0,template:{language:{required:!0,placeholder:"",show:!1,multiline:!1,value:"python",password:!1,options:[{value:"python",label:"Python"}],name:"language",display_name:"language",type:"str",clear_after_run:!0,list:!1,field_type:"select"},code:{required:!0,placeholder:"some code...",show:!1,multiline:!0,value:"",password:!1,name:"code",display_name:"code",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},list_input:{required:!0,placeholder:"",show:!1,multiline:!0,value:!1,password:!1,name:"list_input",display_name:"list_input",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output",display_name:"output",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);i.value.list_input||(i.value.list_input={required:!0,placeholder:"",show:!0,multiline:!0,value:!1,password:!1,name:"list_input",display_name:"list_input",type:"bool",clear_after_run:!0,list:!1,field_type:"checkbox"});const o=Mt({required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"",display_name:"",type:"str",clear_after_run:!1,list:!1,field_type:"input"}),r=d=>{o.multiline=d=="textarea"},s=oe(!1),l=()=>{s.value=!0},a=()=>{o.name=o.display_name,i.value[o.name]=JSON.parse(JSON.stringify(o)),s.value=!1},u=d=>{delete i.value[d]},c=Mt({open:!1,code:""});return(d,h)=>{const f=C("a-select"),m=C("a-col"),v=C("a-textarea"),w=C("a-input"),y=C("a-button"),_=C("a-select-option"),T=C("a-form-item"),b=C("a-form"),k=C("a-drawer"),x=C("a-typography-paragraph"),$=C("a-checkbox"),W=C("a-row"),Q=C("a-divider");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.tools.ProgrammingFunction.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/tools#h2-4"},{main:g(()=>[p(W,{type:"flex"},{default:g(()=>[p(m,{span:24},{default:g(()=>[p(Z,{id:"language",name:i.value.language.display_name,required:"",type:"target",onDelete:h[1]||(h[1]=D=>u(d.field)),show:i.value.language.show,"onUpdate:show":h[2]||(h[2]=D=>i.value.language.show=D)},{default:g(()=>[p(f,{class:"field-content",style:{width:"100%"},value:i.value.language.value,"onUpdate:value":h[0]||(h[0]=D=>i.value.language.value=D),options:i.value.language.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),(E(!0),le(Te,null,Je(Object.keys(i.value),(D,z)=>(E(),le(Te,{key:z},[["language","code","output","list_input"].includes(D)?ye("",!0):(E(),K(m,{key:0,span:24},{default:g(()=>[p(Z,{id:D,name:`${i.value[D].display_name}: ${i.value[D].type}`,required:"",type:"target",deletable:"",onDelete:H=>u(D),show:i.value[D].show,"onUpdate:show":H=>i.value[D].show=H},{default:g(()=>[i.value[D].field_type=="select"?(E(),K(f,{key:0,class:"field-content",style:{width:"100%"},value:i.value[D].value,"onUpdate:value":H=>i.value[D].value=H,options:i.value[D].options},null,8,["value","onUpdate:value","options"])):i.value[D].field_type=="textarea"?(E(),K(v,{key:1,class:"field-content",value:i.value[D].value,"onUpdate:value":H=>i.value[D].value=H,autoSize:!0,showCount:!0,placeholder:i.value[D].placeholder},null,8,["value","onUpdate:value","placeholder"])):i.value[D].field_type=="input"?(E(),K(w,{key:2,class:"field-content",value:i.value[D].value,"onUpdate:value":H=>i.value[D].value=H,placeholder:i.value[D].placeholder},null,8,["value","onUpdate:value","placeholder"])):ye("",!0)]),_:2},1032,["id","name","onDelete","show","onUpdate:show"])]),_:2},1024))],64))),128)),p(m,{span:24,style:{padding:"10px"}},{default:g(()=>[p(y,{type:"dashed",style:{width:"100%"},onClick:l},{default:g(()=>[p(O(ca)),pe(" "+de(O(n)("components.nodes.tools.ProgrammingFunction.add_parameter")),1)]),_:1}),p(k,{open:s.value,"onUpdate:open":h[5]||(h[5]=D=>s.value=D),class:"custom-class",style:{color:"red"},title:O(n)("components.nodes.tools.ProgrammingFunction.add_parameter"),placement:"right"},{extra:g(()=>[p(y,{type:"primary",onClick:a},{default:g(()=>[pe(de(O(n)("common.add")),1)]),_:1})]),default:g(()=>[p(b,null,{default:g(()=>[p(T,{label:O(n)("components.nodes.tools.ProgrammingFunction.add_parameter_type")},{default:g(()=>[p(f,{value:o.type,"onUpdate:value":h[3]||(h[3]=D=>o.type=D),style:{width:"120px"},onChange:r},{default:g(()=>[p(_,{value:"str"},{default:g(()=>[pe(de(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_str")),1)]),_:1}),p(_,{value:"int"},{default:g(()=>[pe(de(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_int")),1)]),_:1}),p(_,{value:"float"},{default:g(()=>[pe(de(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_float")),1)]),_:1}),p(_,{value:"bool"},{default:g(()=>[pe(de(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_bool")),1)]),_:1}),p(_,{value:"list"},{default:g(()=>[pe(de(O(n)("components.nodes.tools.ProgrammingFunction.parameter_type_list")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),p(T,{label:O(n)("components.nodes.tools.ProgrammingFunction.add_parameter_name")},{default:g(()=>[p(w,{value:o.display_name,"onUpdate:value":h[4]||(h[4]=D=>o.display_name=D)},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1},8,["open","title"])]),_:1}),p(m,{span:24},{default:g(()=>[p(Z,{id:"code",name:O(n)("components.nodes.tools.ProgrammingFunction.code"),required:"",type:"target",show:i.value.code.show,"onUpdate:show":h[9]||(h[9]=D=>i.value.code.show=D)},{default:g(()=>[p(x,{ellipsis:{row:1,expandable:!1},content:i.value.code.value},null,8,["content"]),p(y,{type:"primary",onClick:h[6]||(h[6]=D=>c.open=!0)},{default:g(()=>[pe(de(O(n)("components.nodes.tools.ProgrammingFunction.open_editor")),1)]),_:1}),p(rw,{language:i.value.language.value,open:c.open,"onUpdate:open":h[7]||(h[7]=D=>c.open=D),code:i.value.code.value,"onUpdate:code":h[8]||(h[8]=D=>i.value.code.value=D)},null,8,["language","open","code"])]),_:1},8,["name","show"])]),_:1}),p(m,{span:24},{default:g(()=>[p(Z,{id:"list_input",name:O(n)("components.nodes.tools.ProgrammingFunction.list_input"),required:"",type:"target",show:i.value.list_input.show,"onUpdate:show":h[11]||(h[11]=D=>i.value.list_input.show=D)},{inline:g(()=>[p($,{checked:i.value.list_input.value,"onUpdate:checked":h[10]||(h[10]=D=>i.value.list_input.value=D)},null,8,["checked"])]),_:1},8,["name","show"])]),_:1})]),_:1}),p(Q)]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.tools.ProgrammingFunction.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},Mq=Object.freeze(Object.defineProperty({__proto__:null,default:Eq},Symbol.toStringTag,{value:"Module"}));const Aq={__name:"WorkflowSelect",props:{modelValue:{}},emits:kv(["selected"],["update:modelValue"]),setup(t,{emit:e}){const n=cu(t,"modelValue"),{t:i}=Ee(),o=oe(!0),r=Ss(),{userDatabases:s}=Ji(r),l=oe([]);uu(async()=>{const[d,h]=await Promise.all([a.load({}),Tv("list",{})]);h.status==200&&(l.value=h.data),o.value=!1});const a=Mt({columns:[{name:i("workspace.workflowSpaceMain.workflow_title"),dataIndex:"title",key:"title"},{title:i("workspace.workflowSpaceMain.tags"),key:"tags",dataIndex:"tags",filters:ve(()=>l.value.map(d=>({text:d.title,value:d.tid}))),width:"300px"},{title:i("workspace.workflowSpaceMain.update_time"),key:"update_time",dataIndex:"update_time",sorter:!0,sortDirections:["descend","ascend"],width:"200px"}],data:[],loading:!1,current:1,pageSize:10,total:0,pagination:ve(()=>({total:a.total,current:a.current,pageSize:a.pageSize})),selectTag:"all",selectTagChange:async()=>{a.loading=!0,await a.load({tags:[a.selectTag]}),a.loading=!1},searching:!1,searchText:"",hoverRowWid:null,customRow:d=>({style:{cursor:"pointer"},onClick:async h=>{(h.target.classList.contains("ant-table-cell")||h.target.classList.contains("workflow-title"))&&(await c(d.wid),e("selected",n.value))},onMouseenter:h=>{a.hoverRowWid=d.wid},onMouseleave:h=>{a.hoverRowWid=null}}),searchWorkflows:async()=>{a.loading=!0,a.searching=!0,await a.load({search_text:a.searchText}),a.searching=!1,a.loading=!1},clearSearch:async()=>{a.loading=!0,a.searching=!0,a.searchText="",await a.load({}),a.searching=!1,a.loading=!1},handleTableChange:(d,h,f)=>{a.load({page_size:d.pageSize,page:d.current,sort_field:f.field,sort_order:f.order,tags:h.tags,search_text:a.searchText})},load:async d=>{a.loading=!0;const h=await ua("list",d);h.status==200?a.data=h.data.workflows.map(f=>(f.create_time=new Date(parseInt(f.create_time)).toLocaleString(),f.update_time=new Date(parseInt(f.update_time)).toLocaleString(),f)):To.error(h.msg),a.total=h.data.total,a.pageSize=h.data.page_size,a.current=h.data.page,a.loading=!1}}),u=oe({}),c=async d=>{o.value=!0;const h=await ua("get",{wid:d});if(h.status!=200){To.error(i("workspace.workflowSpace.get_workflow_failed"));return}u.value=h.data,u.value.data.nodes.forEach(v=>{v.category=="vectorDb"&&(v.data.template.database.options=s.value.filter(w=>w.status=="VALID").map(w=>({value:w.vid,label:w.name})))});const f=mh(u.value),m=Mt(f);n.value={wid:d,title:u.value.title,inputFields:m.inputFields,outputNodes:m.outputNodes,workflowInvokeOutputNodes:m.workflowInvokeOutputNodes},o.value=!1};return(d,h)=>{const f=C("a-input-search"),m=C("a-button"),v=C("a-space"),w=C("a-col"),y=C("a-row"),_=C("a-typography-text"),T=C("a-tag"),b=C("a-table"),k=C("a-spin");return E(),K(k,{spinning:o.value},{default:g(()=>[p(y,{justify:"space-between",align:"middle",gutter:[16,16]},{default:g(()=>[p(w,{span:24},{default:g(()=>[p(y,{type:"flex",align:"middle",justify:"space-between"},{default:g(()=>[p(w,{flex:"auto"},{default:g(()=>[p(v,null,{default:g(()=>[p(f,{value:a.searchText,"onUpdate:value":h[0]||(h[0]=x=>a.searchText=x),placeholder:O(i)("workspace.workflowSpaceMain.input_search_text"),"enter-button":"",onSearch:a.searchWorkflows,class:"search-input"},null,8,["value","placeholder","onSearch"]),p(m,{onClick:a.clearSearch},{default:g(()=>[pe(de(O(i)("workspace.workflowSpaceMain.reset_search")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1})]),_:1}),p(w,{span:24},{default:g(()=>[p(b,{loading:a.loading,columns:a.columns,customRow:a.customRow,"data-source":a.data,pagination:a.pagination,onChange:a.handleTableChange},{headerCell:g(({column:x})=>[x.key==="title"?(E(),le(Te,{key:0},[p(O(X_)),pe(" "+de(O(i)("workspace.workflowSpaceMain.workflow_title")),1)],64)):x.key==="tags"?(E(),le(Te,{key:1},[p(O(L_)),pe(" "+de(O(i)("workspace.workflowSpaceMain.tags")),1)],64)):x.key==="update_time"?(E(),le(Te,{key:2},[p(O(z_)),pe(" "+de(O(i)("workspace.workflowSpaceMain.update_time")),1)],64)):ye("",!0)]),bodyCell:g(({column:x,record:$})=>[x.key==="title"?(E(),K(v,{key:0},{default:g(()=>[p(_,{class:"workflow-title"},{default:g(()=>[pe(de($.title),1)]),_:2},1024)]),_:2},1024)):x.key==="tags"?(E(),K(v,{key:1},{default:g(()=>[(E(!0),le(Te,null,Je($.tags,W=>(E(),K(T,{color:W.color,key:W.tid},{default:g(()=>[pe(de(W.title),1)]),_:2},1032,["color"]))),128))]),_:2},1024)):ye("",!0)]),_:1},8,["loading","columns","customRow","data-source","pagination","onChange"])]),_:1})]),_:1})]),_:1},8,["spinning"])}}},Dq=lr(Aq,[["__scopeId","data-v-169c3c13"]]),qq={__name:"WorkflowInvoke",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"tools.workflow_invoke",has_inputs:!0,template:{workflow_id:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"workflow_id",display_name:"workflow_id",type:"str",clear_after_run:!0,list:!1,field_type:"input"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template),o=oe(e.data.seleted_workflow_title),r=Mt({open:!1,data:{},onWorkflowSelect:()=>{e.data.seleted_workflow_title=r.data.title,o.value=r.data.title,i.value.workflow_id.value=r.data.wid,Object.keys(i.value).forEach(a=>{["workflow_id"].includes(a)||delete i.value[a]}),r.data.inputFields.forEach(a=>{gh.includes(a.field_type)||(i.value[a.name]=JSON.parse(JSON.stringify(a)),i.value[a.name].node=i.value[a.name].nodeId)});const s=new Set;r.data.outputNodes.concat(r.data.workflowInvokeOutputNodes).forEach(a=>{const u=a.id.slice(0,8);let c=`${u}_${a.type}`;for(;s.has(c);)c=`${c}_${Math.floor(Math.random()*1e3)}`;s.add(c);let d=c,h="";a.type=="Text"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.text)),d=`${d}_${a.data.template.output_title.value}`,h="text"):a.type=="Audio"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.audio_url||{})),h="audio_url"):a.type=="Mindmap"||a.type=="Mermaid"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.content)),h="content"):a.type=="Echarts"?(i.value[c]=JSON.parse(JSON.stringify(a.data.template.option)),h="option"):a.type=="WorkflowInvokeOutput"&&(i.value[c]=JSON.parse(JSON.stringify(a.data.template.value)),h="value"),i.value[c].name=d,a.type=="WorkflowInvokeOutput"?i.value[c].display_name=`${u}_${a.data.template.display_name.value}`:i.value[c].display_name=`${u}_${a.type}`,i.value[c].show=!1,i.value[c].is_output=!0,i.value[c].node=a.id,i.value[c].output_field_key=h}),r.open=!1}});return(s,l)=>{const a=C("a-typography-text"),u=C("a-button"),c=C("a-modal"),d=C("a-col"),h=C("a-input"),f=C("a-divider"),m=C("a-select"),v=C("a-textarea"),w=C("a-checkbox"),y=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.tools.WorkflowInvoke.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/tools#h2-12"},{main:g(()=>[p(y,{type:"flex"},{default:g(()=>[p(d,{span:24,style:{padding:"5px 10px"}},{default:g(()=>[o.value?(E(),le(Te,{key:0},[p(a,{type:"secondary"},{default:g(()=>[pe(de(O(n)("components.nodes.tools.WorkflowInvoke.selected_workflow"))+": ",1)]),_:1}),p(a,null,{default:g(()=>[pe(de(o.value),1)]),_:1})],64)):ye("",!0),p(u,{type:"primary",block:"",onClick:l[0]||(l[0]=_=>r.open=!0)},{default:g(()=>[pe(de(O(n)("components.nodes.tools.WorkflowInvoke.select_workflow")),1)]),_:1}),p(c,{open:r.open,title:O(n)("components.nodes.tools.WorkflowInvoke.select_workflow"),width:"80vw",onCancel:l[2]||(l[2]=_=>r.open=!1),footer:null},{default:g(()=>[p(Dq,{modelValue:r.data,"onUpdate:modelValue":l[1]||(l[1]=_=>r.data=_),onSelected:r.onWorkflowSelect},null,8,["modelValue","onSelected"])]),_:1},8,["open","title"])]),_:1}),p(d,{span:24},{default:g(()=>[p(Z,{id:"workflow_id",name:O(n)("components.nodes.tools.WorkflowInvoke.workflow_id"),required:"",type:"target",show:i.value.workflow_id.show,"onUpdate:show":l[4]||(l[4]=_=>i.value.workflow_id.show=_)},{default:g(()=>[p(h,{disabled:"",value:i.value.workflow_id.value,"onUpdate:value":l[3]||(l[3]=_=>i.value.workflow_id.value=_),placeholder:i.value.workflow_id.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(f,null,{default:g(()=>[pe(de(O(n)("components.nodes.tools.WorkflowInvoke.workflow_fields")),1)]),_:1}),(E(!0),le(Te,null,Je(Object.keys(i.value),(_,T)=>(E(),le(Te,{key:T},[!["workflow_id"].includes(_)&&!i.value[_].is_output?(E(),K(d,{key:0,span:24},{default:g(()=>[p(Z,{id:_,name:`${i.value[_].display_name}: ${i.value[_].type}`,required:"",type:"target",onDelete:b=>s.removeField(_),show:i.value[_].show,"onUpdate:show":b=>i.value[_].show=b},{inline:g(()=>[i.value[_].field_type=="checkbox"?(E(),K(w,{key:0,checked:i.value[_].value,"onUpdate:checked":b=>i.value[_].value=b},null,8,["checked","onUpdate:checked"])):ye("",!0)]),default:g(()=>[i.value[_].field_type=="select"?(E(),K(m,{key:0,style:{width:"100%"},value:i.value[_].value,"onUpdate:value":b=>i.value[_].value=b,options:i.value[_].options},null,8,["value","onUpdate:value","options"])):i.value[_].field_type=="textarea"?(E(),K(v,{key:1,value:i.value[_].value,"onUpdate:value":b=>i.value[_].value=b,autoSize:!0,showCount:!0,placeholder:i.value[_].placeholder},null,8,["value","onUpdate:value","placeholder"])):i.value[_].field_type=="input"?(E(),K(h,{key:2,value:i.value[_].value,"onUpdate:value":b=>i.value[_].value=b,placeholder:i.value[_].placeholder},null,8,["value","onUpdate:value","placeholder"])):ye("",!0)]),_:2},1032,["id","name","onDelete","show","onUpdate:show"])]),_:2},1024)):ye("",!0)],64))),128))]),_:1})]),output:g(()=>[p(y,{type:"flex",style:{width:"100%"}},{default:g(()=>[(E(!0),le(Te,null,Je(Object.keys(i.value),(_,T)=>(E(),le(Te,{key:_},[i.value[_].is_output?(E(),K(d,{key:0,span:24},{default:g(()=>[p(Z,{id:_,name:i.value[_].display_name,type:"source",nameOnly:""},null,8,["id","name"])]),_:2},1024)):ye("",!0)],64))),128))]),_:1})]),_:1},8,["nodeId","title","description"])}}},Rq=Object.freeze(Object.defineProperty({__proto__:null,default:qq},Symbol.toStringTag,{value:"Module"})),Qq={__name:"ButtonTrigger",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"triggers.button_trigger",has_inputs:!1,template:{button_text:{required:!0,placeholder:"Run",show:!1,multiline:!0,value:"run",password:!1,name:"button_text",display_name:"button_text",type:"str",clear_after_run:!0,list:!1,field_type:"button"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.button_text.value=n("components.nodes.triggers.ButtonTrigger.run"),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.triggers.ButtonTrigger.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/triggers#h2-0"},{main:g(()=>[p(a,{type:" flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"button_text",name:O(n)("components.nodes.triggers.ButtonTrigger.button_text"),required:"",type:"target"},{default:g(()=>[p(s,{class:"field-content",value:i.value.button_text.value,"onUpdate:value":r[0]||(r[0]=u=>i.value.button_text.value=u),placeholder:i.value.button_text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},Nq=Object.freeze(Object.defineProperty({__proto__:null,default:Qq},Symbol.toStringTag,{value:"Module"})),Iq={__name:"AddData",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"vector_db.add_data",has_inputs:!0,template:{text:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"text",display_name:"text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},content_title:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"content_title",display_name:"content_title",type:"str",clear_after_run:!0,list:!1,field_type:"input"},source_url:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"source_url",display_name:"source_url",type:"str",clear_after_run:!0,list:!1,field_type:"input"},data_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"}],name:"data_type",display_name:"data_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},split_method:{required:!0,placeholder:"",show:!1,multiline:!1,value:"general",password:!1,options:[{value:"general",label:"general"}],name:"split_method",display_name:"split_method",type:"str",clear_after_run:!0,list:!1,field_type:"select"},chunk_length:{required:!0,placeholder:"",show:!1,multiline:!0,value:500,password:!1,name:"chunk_length",display_name:"chunk_length",type:"str",clear_after_run:!0,list:!1,field_type:"number"},database:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,options:[],name:"database",display_name:"database",type:"str",clear_after_run:!0,list:!1,field_type:"select"},object_id:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"object_id",display_name:"object_id",type:"list|str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=Ss(),{userDatabases:o}=Ji(i),r=oe(e.data.template);return r.value.database.options=o.value.filter(s=>s.status=="VALID").map(s=>({value:s.vid,label:s.name})),r.value.split_method.options=r.value.split_method.options.map(s=>(s.label=n(`components.nodes.vectorDb.AddData.split_method_${s.value}`),s)),(s,l)=>{const a=C("a-input"),u=C("a-col"),c=C("a-select"),d=C("a-input-number"),h=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.vectorDb.AddData.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/vector-db#h2-0"},{main:g(()=>[p(h,{type:"flex"},{default:g(()=>[p(u,{span:24},{default:g(()=>[p(Z,{id:"content_title",name:O(n)("components.nodes.vectorDb.AddData.content_title"),required:"",type:"target",show:r.value.content_title.show,"onUpdate:show":l[1]||(l[1]=f=>r.value.content_title.show=f)},{default:g(()=>[p(a,{class:"field-content",value:r.value.content_title.value,"onUpdate:value":l[0]||(l[0]=f=>r.value.content_title.value=f),placeholder:r.value.content_title.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"text",name:O(n)("components.nodes.vectorDb.AddData.text"),required:"",type:"target",show:r.value.text.show,"onUpdate:show":l[3]||(l[3]=f=>r.value.text.show=f)},{default:g(()=>[p(a,{class:"field-content",value:r.value.text.value,"onUpdate:value":l[2]||(l[2]=f=>r.value.text.value=f),placeholder:r.value.text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"source_url",name:O(n)("components.nodes.vectorDb.AddData.source_url"),type:"target",show:r.value.source_url.show,"onUpdate:show":l[5]||(l[5]=f=>r.value.source_url.show=f)},{default:g(()=>[p(a,{class:"field-content",value:r.value.source_url.value,"onUpdate:value":l[4]||(l[4]=f=>r.value.source_url.value=f),placeholder:r.value.source_url.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),r.value.data_type.value=="text"?(E(),K(u,{key:0,span:24},{default:g(()=>[p(Z,{id:"split_method",name:O(n)("components.nodes.vectorDb.AddData.split_method"),required:"",type:"target",show:r.value.split_method.show,"onUpdate:show":l[7]||(l[7]=f=>r.value.split_method.show=f)},{default:g(()=>[p(c,{style:{width:"100%"},value:r.value.split_method.value,"onUpdate:value":l[6]||(l[6]=f=>r.value.split_method.value=f),options:r.value.split_method.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})):ye("",!0),r.value.data_type.value=="text"?(E(),K(u,{key:1,span:24},{default:g(()=>[p(Z,{id:"chunk_length",name:O(n)("components.nodes.vectorDb.AddData.chunk_length"),required:"",type:"target",show:r.value.chunk_length.show,"onUpdate:show":l[9]||(l[9]=f=>r.value.chunk_length.show=f)},{default:g(()=>[p(d,{style:{width:"100%"},class:"field-content",value:r.value.chunk_length.value,"onUpdate:value":l[8]||(l[8]=f=>r.value.chunk_length.value=f),placeholder:r.value.chunk_length.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1})):ye("",!0),p(u,{span:24},{default:g(()=>[p(Z,{id:"data_type",name:O(n)("components.nodes.vectorDb.AddData.data_type"),required:"",type:"target",show:r.value.data_type.show,"onUpdate:show":l[11]||(l[11]=f=>r.value.data_type.show=f)},{default:g(()=>[p(c,{style:{width:"100%"},value:r.value.data_type.value,"onUpdate:value":l[10]||(l[10]=f=>r.value.data_type.value=f),options:r.value.data_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"database",name:O(n)("components.nodes.vectorDb.AddData.database"),required:"",type:"target",show:r.value.database.show,"onUpdate:show":l[13]||(l[13]=f=>r.value.database.show=f)},{default:g(()=>[p(c,{style:{width:"100%"},class:"field-content",value:r.value.database.value,"onUpdate:value":l[12]||(l[12]=f=>r.value.database.value=f),options:r.value.database.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"object_id",name:O(n)("components.nodes.vectorDb.AddData.object_id"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},Vq=Object.freeze(Object.defineProperty({__proto__:null,default:Iq},Symbol.toStringTag,{value:"Module"})),Bq={__name:"DeleteData",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"vector_db.delete_data",has_inputs:!0,template:{object_id:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"object_id",display_name:"object_id",type:"list|str",clear_after_run:!0,list:!1,field_type:""},database:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,options:[],name:"database",display_name:"database",type:"str",clear_after_run:!0,list:!1,field_type:"select"},delete_success:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"delete_success",display_name:"delete_success",type:"list|bool",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=Ss(),{userDatabases:o}=Ji(i),r=oe(e.data.template);return r.value.database.options=o.value.filter(s=>s.status=="VALID").map(s=>({value:s.vid,label:s.name})),(s,l)=>{const a=C("a-input"),u=C("a-col"),c=C("a-select"),d=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.vectorDb.DeleteData.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/vector-db#h2-4"},{main:g(()=>[p(d,{type:"flex"},{default:g(()=>[p(u,{span:24},{default:g(()=>[p(Z,{id:"object_id",name:O(n)("components.nodes.vectorDb.DeleteData.object_id"),required:"",type:"target",show:r.value.object_id.show,"onUpdate:show":l[1]||(l[1]=h=>r.value.object_id.show=h)},{default:g(()=>[p(a,{class:"field-content",value:r.value.object_id.value,"onUpdate:value":l[0]||(l[0]=h=>r.value.object_id.value=h),placeholder:r.value.object_id.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"database",name:O(n)("components.nodes.vectorDb.DeleteData.database"),required:"",type:"target",show:r.value.database.show,"onUpdate:show":l[3]||(l[3]=h=>r.value.database.show=h)},{default:g(()=>[p(c,{style:{width:"100%"},class:"field-content",value:r.value.database.value,"onUpdate:value":l[2]||(l[2]=h=>r.value.database.value=h),options:r.value.database.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"delete_success",name:O(n)("components.nodes.vectorDb.DeleteData.delete_success"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},Wq=Object.freeze(Object.defineProperty({__proto__:null,default:Bq},Symbol.toStringTag,{value:"Module"})),Lq={__name:"Search",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"vector_db.search_data",has_inputs:!0,template:{search_text:{required:!0,placeholder:"",show:!1,multiline:!1,value:"",password:!1,name:"search_text",display_name:"search_text",type:"str",clear_after_run:!0,list:!1,field_type:"textarea"},data_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"}],name:"data_type",display_name:"data_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},database:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,options:[],name:"database",display_name:"database",type:"str",clear_after_run:!0,list:!1,field_type:"select"},count:{required:!0,placeholder:"",show:!1,multiline:!0,value:5,password:!1,name:"count",display_name:"count",type:"str",clear_after_run:!0,list:!1,field_type:"number"},output_type:{required:!0,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"},{value:"list",label:"List"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!0,list:!1,field_type:"select"},output:{required:!0,placeholder:"",show:!1,multiline:!0,value:[],password:!1,name:"output",display_name:"output",type:"list|str",clear_after_run:!0,list:!1,field_type:""}}}},setup(t){const e=t,{t:n}=Ee(),i=Ss(),{userDatabases:o}=Ji(i),r=oe(e.data.template);return r.value.database.options=o.value.filter(s=>s.status=="VALID").map(s=>({value:s.vid,label:s.name})),r.value.output_type.options=r.value.output_type.options.map(s=>(s.label=n(`components.nodes.vectorDb.Search.${s.value}`),s)),r.value.data_type.options=r.value.data_type.options.map(s=>(s.label=n(`components.nodes.vectorDb.Search.${s.value}`),s)),(s,l)=>{const a=C("a-input"),u=C("a-col"),c=C("a-select"),d=C("a-input-number"),h=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.vectorDb.Search.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/vector-db#h2-8"},{main:g(()=>[p(h,{type:"flex"},{default:g(()=>[p(u,{span:24},{default:g(()=>[p(Z,{id:"search_text",name:O(n)("components.nodes.vectorDb.Search.search_text"),required:"",type:"target",show:r.value.search_text.show,"onUpdate:show":l[1]||(l[1]=f=>r.value.search_text.show=f)},{default:g(()=>[p(a,{class:"field-content",value:r.value.search_text.value,"onUpdate:value":l[0]||(l[0]=f=>r.value.search_text.value=f),placeholder:r.value.search_text.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"data_type",name:O(n)("components.nodes.vectorDb.Search.data_type"),required:"",type:"target",show:r.value.data_type.show,"onUpdate:show":l[3]||(l[3]=f=>r.value.data_type.show=f)},{default:g(()=>[p(c,{style:{width:"100%"},value:r.value.data_type.value,"onUpdate:value":l[2]||(l[2]=f=>r.value.data_type.value=f),options:r.value.data_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"database",name:O(n)("components.nodes.vectorDb.Search.database"),required:"",type:"target",show:r.value.database.show,"onUpdate:show":l[5]||(l[5]=f=>r.value.database.show=f)},{default:g(()=>[p(c,{style:{width:"100%"},class:"field-content",value:r.value.database.value,"onUpdate:value":l[4]||(l[4]=f=>r.value.database.value=f),options:r.value.database.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"count",name:O(n)("components.nodes.vectorDb.Search.count"),required:"",type:"target",show:r.value.count.show,"onUpdate:show":l[7]||(l[7]=f=>r.value.count.show=f)},{default:g(()=>[p(d,{style:{width:"100%"},class:"field-content",value:r.value.count.value,"onUpdate:value":l[6]||(l[6]=f=>r.value.count.value=f),placeholder:r.value.count.placeholder},null,8,["value","placeholder"])]),_:1},8,["name","show"])]),_:1}),p(u,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.vectorDb.Search.output_type"),required:"",type:"target",show:r.value.output_type.show,"onUpdate:show":l[9]||(l[9]=f=>r.value.output_type.show=f)},{default:g(()=>[p(c,{style:{width:"100%"},class:"field-content",value:r.value.output_type.value,"onUpdate:value":l[8]||(l[8]=f=>r.value.output_type.value=f),options:r.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(Z,{id:"output",name:O(n)("components.nodes.vectorDb.Search.output"),type:"source",nameOnly:""},null,8,["name"])]),_:1},8,["nodeId","title","description"])}}},zq=Object.freeze(Object.defineProperty({__proto__:null,default:Lq},Symbol.toStringTag,{value:"Module"})),Xq={__name:"BilibiliCrawler",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"web_crawlers.bilibili_crawler",has_inputs:!0,template:{url_or_bvid:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"url_or_bvid",display_name:"url_or_bvid",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"str",password:!1,options:[{value:"str",label:"str"},{value:"list",label:"list"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output_subtitle:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_subtitle",display_name:"output_subtitle",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"},output_title:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.webCrawlers.BilibiliCrawler.${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.webCrawlers.BilibiliCrawler.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/web-crawlers#h2-0"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"url_or_bvid",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.url_or_bvid"),required:"",type:"target",show:i.value.url_or_bvid.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.url_or_bvid.show=c)},{default:g(()=>[p(s,{value:i.value.url_or_bvid.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.url_or_bvid.value=c)},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.output_type.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(u,{type:"flex",style:{width:"100%"}},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"output_title",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.output_title"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_subtitle",name:O(n)("components.nodes.webCrawlers.BilibiliCrawler.output_subtitle"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},Uq=Object.freeze(Object.defineProperty({__proto__:null,default:Xq},Symbol.toStringTag,{value:"Module"})),Yq={__name:"TextCrawler",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"web_crawlers.text_crawler",has_inputs:!0,template:{url:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"url",display_name:"url",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"text",password:!1,options:[{value:"text",label:"Text"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output_text:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_text",display_name:"output_text",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"},output_title:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.webCrawlers.TextCrawler.${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.webCrawlers.TextCrawler.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/web-crawlers#h2-4"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"url",name:O(n)("components.nodes.webCrawlers.TextCrawler.url"),required:"",type:"target",show:i.value.url.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.url.show=c)},{default:g(()=>[p(s,{value:i.value.url.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.url.value=c),placeholder:"https://example.com"},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.webCrawlers.TextCrawler.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.output_type.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(u,{type:"flex",style:{width:"100%"}},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"output_title",name:O(n)("components.nodes.webCrawlers.TextCrawler.output_title"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_text",name:O(n)("components.nodes.webCrawlers.TextCrawler.output_text"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},jq=Object.freeze(Object.defineProperty({__proto__:null,default:Yq},Symbol.toStringTag,{value:"Module"})),Fq={__name:"YoutubeCrawler",props:{id:{type:String,required:!0},data:{type:Object,required:!0},templateData:{description:"description",task_name:"web_crawlers.youtube_crawler",has_inputs:!0,template:{url_or_video_id:{required:!0,placeholder:"",show:!0,multiline:!1,value:"",password:!1,name:"url_or_video_id",display_name:"url_or_video_id",type:"str",clear_after_run:!0,list:!1,field_type:"input"},output_type:{required:!1,placeholder:"",show:!1,multiline:!1,value:"str",password:!1,options:[{value:"str",label:"str"},{value:"list",label:"list"}],name:"output_type",display_name:"output_type",type:"str",clear_after_run:!1,list:!0,field_type:"select"},output_subtitle:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_subtitle",display_name:"output_subtitle",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"},output_title:{required:!0,placeholder:"",show:!1,multiline:!0,value:"",password:!1,name:"output_title",display_name:"output_title",type:"str|dict",clear_after_run:!0,list:!1,field_type:"textarea"}}}},setup(t){const e=t,{t:n}=Ee(),i=oe(e.data.template);return i.value.output_type.options=i.value.output_type.options.map(o=>(o.label=n(`components.nodes.webCrawlers.YoutubeCrawler.${o.value}`),o)),(o,r)=>{const s=C("a-input"),l=C("a-col"),a=C("a-select"),u=C("a-row");return E(),K(ze,{nodeId:t.id,title:O(n)("components.nodes.webCrawlers.YoutubeCrawler.title"),description:e.data.description,documentLink:"https://vectorvein.com/help/docs/web-crawlers#h2-8"},{main:g(()=>[p(u,{type:"flex"},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"url_or_video_id",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.url_or_video_id"),required:"",type:"target",show:i.value.url_or_video_id.show,"onUpdate:show":r[1]||(r[1]=c=>i.value.url_or_video_id.show=c)},{default:g(()=>[p(s,{value:i.value.url_or_video_id.value,"onUpdate:value":r[0]||(r[0]=c=>i.value.url_or_video_id.value=c)},null,8,["value"])]),_:1},8,["name","show"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_type",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.output_type"),required:"",type:"target",show:i.value.output_type.show,"onUpdate:show":r[3]||(r[3]=c=>i.value.output_type.show=c)},{default:g(()=>[p(a,{style:{width:"100%"},value:i.value.output_type.value,"onUpdate:value":r[2]||(r[2]=c=>i.value.output_type.value=c),options:i.value.output_type.options},null,8,["value","options"])]),_:1},8,["name","show"])]),_:1})]),_:1})]),output:g(()=>[p(u,{type:"flex",style:{width:"100%"}},{default:g(()=>[p(l,{span:24},{default:g(()=>[p(Z,{id:"output_title",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.output_title"),type:"source",nameOnly:""},null,8,["name"])]),_:1}),p(l,{span:24},{default:g(()=>[p(Z,{id:"output_subtitle",name:O(n)("components.nodes.webCrawlers.YoutubeCrawler.output_subtitle"),type:"source",nameOnly:""},null,8,["name"])]),_:1})]),_:1})]),_:1},8,["nodeId","title","description"])}}},Hq=Object.freeze(Object.defineProperty({__proto__:null,default:Fq},Symbol.toStringTag,{value:"Module"}));let xl;const Gq=new Uint8Array(16);function Zq(){if(!xl&&(xl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xl(Gq)}const Kq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Bg={randomUUID:Kq};function Wg(t,e,n){if(Bg.randomUUID&&!e&&!t)return Bg.randomUUID();t=t||{};const i=t.random||(t.rng||Zq)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=i[o];return e}return S_(i)}var Jq={value:()=>{}};function xf(){for(var t=0,e=arguments.length,n={},i;t=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Zl.prototype=xf.prototype={constructor:Zl,on:function(t,e){var n=this._,i=eR(t+"",n),o,r=-1,s=i.length;if(arguments.length<2){for(;++r0)for(var n=new Array(o),i=0,o,r;i=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),zg.hasOwnProperty(e)?{space:zg[e],local:t}:t}function nR(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Jd&&e.documentElement.namespaceURI===Jd?e.createElement(t):e.createElementNS(n,t)}}function iR(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function sw(t){var e=Qu(t);return(e.local?iR:nR)(e)}function oR(){}function Sf(t){return t==null?oR:function(){return this.querySelector(t)}}function rR(t){typeof t!="function"&&(t=Sf(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o=T&&(T=_+1);!(k=w[T])&&++T=0;)(s=i[o])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function ER(t){t||(t=MR);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,i=n.length,o=new Array(i),r=0;re?1:t>=e?0:NaN}function AR(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function DR(){return Array.from(this)}function qR(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?UR:typeof e=="function"?jR:YR)(t,e,n??"")):or(this.node(),t)}function or(t,e){return t.style.getPropertyValue(e)||dw(t).getComputedStyle(t,null).getPropertyValue(e)}function HR(t){return function(){delete this[t]}}function GR(t,e){return function(){this[t]=e}}function ZR(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function KR(t,e){return arguments.length>1?this.each((e==null?HR:typeof e=="function"?ZR:GR)(t,e)):this.node()[t]}function hw(t){return t.trim().split(/^|\s+/)}function kf(t){return t.classList||new fw(t)}function fw(t){this._node=t,this._names=hw(t.getAttribute("class")||"")}fw.prototype={add:function(t){var e=this._names.indexOf(t);e<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}};function pw(t,e){for(var n=kf(t),i=-1,o=e.length;++i=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function TQ(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,o=e.length,r;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Sl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Sl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=IQ.exec(t))?new zt(e[1],e[2],e[3],1):(e=VQ.exec(t))?new zt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=BQ.exec(t))?Sl(e[1],e[2],e[3],e[4]):(e=WQ.exec(t))?Sl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=LQ.exec(t))?Gg(e[1],e[2]/100,e[3]/100,1):(e=zQ.exec(t))?Gg(e[1],e[2]/100,e[3]/100,e[4]):Xg.hasOwnProperty(t)?jg(Xg[t]):t==="transparent"?new zt(NaN,NaN,NaN,0):null}function jg(t){return new zt(t>>16&255,t>>8&255,t&255,1)}function Sl(t,e,n,i){return i<=0&&(t=e=n=NaN),new zt(t,e,n,i)}function YQ(t){return t instanceof Vs||(t=_s(t)),t?(t=t.rgb(),new zt(t.r,t.g,t.b,t.opacity)):new zt}function nh(t,e,n,i){return arguments.length===1?YQ(t):new zt(t,e,n,i??1)}function zt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Tf(zt,nh,yw(Vs,{brighter(t){return t=t==null?Za:Math.pow(Za,t),new zt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Os:Math.pow(Os,t),new zt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new zt(oo(this.r),oo(this.g),oo(this.b),Ka(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:Fg,formatHex:Fg,formatHex8:jQ,formatRgb:Hg,toString:Hg}));function Fg(){return`#${Zi(this.r)}${Zi(this.g)}${Zi(this.b)}`}function jQ(){return`#${Zi(this.r)}${Zi(this.g)}${Zi(this.b)}${Zi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Hg(){const t=Ka(this.opacity);return`${t===1?"rgb(":"rgba("}${oo(this.r)}, ${oo(this.g)}, ${oo(this.b)}${t===1?")":`, ${t})`}`}function Ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function oo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Zi(t){return t=oo(t),(t<16?"0":"")+t.toString(16)}function Gg(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new gn(t,e,n,i)}function Ow(t){if(t instanceof gn)return new gn(t.h,t.s,t.l,t.opacity);if(t instanceof Vs||(t=_s(t)),!t)return new gn;if(t instanceof gn)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),r=Math.max(e,n,i),s=NaN,l=r-o,a=(r+o)/2;return l?(e===r?s=(n-i)/l+(n0&&a<1?0:s,new gn(s,l,a,t.opacity)}function FQ(t,e,n,i){return arguments.length===1?Ow(t):new gn(t,e,n,i??1)}function gn(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Tf(gn,FQ,yw(Vs,{brighter(t){return t=t==null?Za:Math.pow(Za,t),new gn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Os:Math.pow(Os,t),new gn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,o=2*n-i;return new zt(Cc(t>=240?t-240:t+120,o,i),Cc(t,o,i),Cc(t<120?t+240:t-120,o,i),this.opacity)},clamp(){return new gn(Zg(this.h),kl(this.s),kl(this.l),Ka(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=Ka(this.opacity);return`${t===1?"hsl(":"hsla("}${Zg(this.h)}, ${kl(this.s)*100}%, ${kl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Zg(t){return t=(t||0)%360,t<0?t+360:t}function kl(t){return Math.max(0,Math.min(1,t||0))}function Cc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ww=t=>()=>t;function HQ(t,e){return function(n){return t+n*e}}function GQ(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function ZQ(t){return(t=+t)==1?_w:function(e,n){return n-e?GQ(e,n,t):ww(isNaN(e)?n:e)}}function _w(t,e){var n=e-t;return n?HQ(t,n):ww(isNaN(t)?e:t)}const Kg=function t(e){var n=ZQ(e);function i(o,r){var s=n((o=nh(o)).r,(r=nh(r)).r),l=n(o.g,r.g),a=n(o.b,r.b),u=_w(o.opacity,r.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return i.gamma=t,i}(1);function yi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ih=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$c=new RegExp(ih.source,"g");function KQ(t){return function(){return t}}function JQ(t){return function(e){return t(e)+""}}function eN(t,e){var n=ih.lastIndex=$c.lastIndex=0,i,o,r,s=-1,l=[],a=[];for(t=t+"",e=e+"";(i=ih.exec(t))&&(o=$c.exec(e));)(r=o.index)>n&&(r=e.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(i=i[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:yi(i,o)})),n=$c.lastIndex;return n180?c+=360:c-u>180&&(u+=360),h.push({i:d.push(o(d)+"rotate(",null,i)-2,x:yi(u,c)})):c&&d.push(o(d)+"rotate("+c+i)}function l(u,c,d,h){u!==c?h.push({i:d.push(o(d)+"skewX(",null,i)-2,x:yi(u,c)}):c&&d.push(o(d)+"skewX("+c+i)}function a(u,c,d,h,f,m){if(u!==d||c!==h){var v=f.push(o(f)+"scale(",null,",",null,")");m.push({i:v-4,x:yi(u,d)},{i:v-2,x:yi(c,h)})}else(d!==1||h!==1)&&f.push(o(f)+"scale("+d+","+h+")")}return function(u,c){var d=[],h=[];return u=t(u),c=t(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,h),s(u.rotate,c.rotate,d,h),l(u.skewX,c.skewX,d,h),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,h),u=c=null,function(f){for(var m=-1,v=h.length,w;++m=0&&t._call.call(void 0,e),t=t._next;--rr}function tv(){ho=(eu=bs.now())+Nu,rr=Er=0;try{cN()}finally{rr=0,hN(),ho=0}}function dN(){var t=bs.now(),e=t-eu;e>kw&&(Nu-=e,eu=t)}function hN(){for(var t,e=Ja,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ja=n);Mr=t,oh(i)}function oh(t){if(!rr){Er&&(Er=clearTimeout(Er));var e=t-ho;e>24?(t<1/0&&(Er=setTimeout(tv,t-bs.now()-Nu)),_r&&(_r=clearInterval(_r))):(_r||(eu=bs.now(),_r=setInterval(dN,kw)),rr=1,Tw(tv))}}function nv(t,e,n){var i=new tu;return e=e==null?0:+e,i.restart(o=>{i.stop(),t(o+e)},e,n),i}var fN=xf("start","end","cancel","interrupt"),pN=[],Cw=0,iv=1,rh=2,Kl=3,ov=4,sh=5,Jl=6;function Iu(t,e,n,i,o,r){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;mN(t,n,{name:e,index:i,group:o,on:fN,tween:pN,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Cw})}function Cf(t,e){var n=_n(t,e);if(n.state>Cw)throw new Error("too late; already scheduled");return n}function Yn(t,e){var n=_n(t,e);if(n.state>Kl)throw new Error("too late; already running");return n}function _n(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function mN(t,e,n){var i=t.__transition,o;i[e]=n,n.timer=Pw(r,0,n.time);function r(u){n.state=iv,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,h,f;if(n.state!==iv)return a();for(c in i)if(f=i[c],f.name===n.name){if(f.state===Kl)return nv(s);f.state===ov?(f.state=Jl,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+crh&&i.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function UN(t,e,n){var i,o,r=XN(e)?Cf:Yn;return function(){var s=r(this,t),l=s.on;l!==i&&(o=(i=l).copy()).on(e,n),s.on=o}}function YN(t,e){var n=this._id;return arguments.length<2?_n(this.node(),n).on.on(t):this.each(UN(n,t,e))}function jN(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function FN(){return this.on("end.remove",jN(this._id))}function HN(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Sf(t));for(var i=this._groups,o=i.length,r=new Array(o),s=0;s()=>t;function wI(t,{sourceEvent:e,target:n,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ni(t,e,n){this.k=t,this.x=e,this.y=n}ni.prototype={constructor:ni,scale:function(t){return t===1?this:new ni(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ni(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+")"}};var Ef=new ni(1,0,0);ni.prototype;function Ec(t){t.stopImmediatePropagation()}function br(t){t.preventDefault(),t.stopImmediatePropagation()}function _I(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function bI(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function rv(){return this.__zoom||Ef}function xI(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function SI(){return navigator.maxTouchPoints||"ontouchstart"in this}function kI(t,e,n){var i=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],r=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function TI(){var t=_I,e=bI,n=kI,i=xI,o=SI,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=aN,u=xf("start","zoom","end"),c,d,h,f=500,m=150,v=0,w=10;function y(S){S.property("__zoom",rv).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",Q).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",z).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(S,A,P,M){var V=S.selection?S.selection():S;V.property("__zoom",rv),S!==V?k(S,A,P,M):V.interrupt().each(function(){x(this,arguments).event(M).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},y.scaleBy=function(S,A,P,M){y.scaleTo(S,function(){var V=this.__zoom.k,R=typeof A=="function"?A.apply(this,arguments):A;return V*R},P,M)},y.scaleTo=function(S,A,P,M){y.transform(S,function(){var V=e.apply(this,arguments),R=this.__zoom,N=P==null?b(V):typeof P=="function"?P.apply(this,arguments):P,ne=R.invert(N),j=typeof A=="function"?A.apply(this,arguments):A;return n(T(_(R,j),N,ne),V,s)},P,M)},y.translateBy=function(S,A,P,M){y.transform(S,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),s)},null,M)},y.translateTo=function(S,A,P,M,V){y.transform(S,function(){var R=e.apply(this,arguments),N=this.__zoom,ne=M==null?b(R):typeof M=="function"?M.apply(this,arguments):M;return n(Ef.translate(ne[0],ne[1]).scale(N.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof P=="function"?-P.apply(this,arguments):-P),R,s)},M,V)};function _(S,A){return A=Math.max(r[0],Math.min(r[1],A)),A===S.k?S:new ni(A,S.x,S.y)}function T(S,A,P){var M=A[0]-P[0]*S.k,V=A[1]-P[1]*S.k;return M===S.x&&V===S.y?S:new ni(S.k,M,V)}function b(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function k(S,A,P,M){S.on("start.zoom",function(){x(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(M).end()}).tween("zoom",function(){var V=this,R=arguments,N=x(V,R).event(M),ne=e.apply(V,R),j=P==null?b(ne):typeof P=="function"?P.apply(V,R):P,ae=Math.max(ne[1][0]-ne[0][0],ne[1][1]-ne[0][1]),X=V.__zoom,G=typeof A=="function"?A.apply(V,R):A,F=a(X.invert(j).concat(ae/X.k),G.invert(j).concat(ae/G.k));return function(se){if(se===1)se=G;else{var _e=F(se),Qe=ae/_e[2];se=new ni(Qe,j[0]-_e[0]*Qe,j[1]-_e[1]*Qe)}N.zoom(null,se)}})}function x(S,A,P){return!P&&S.__zooming||new $(S,A)}function $(S,A){this.that=S,this.args=A,this.active=0,this.sourceEvent=null,this.extent=e.apply(S,A),this.taps=0}$.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,A){return this.mouse&&S!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var A=_i(this.that).datum();u.call(S,this.that,new wI(S,{sourceEvent:this.sourceEvent,target:y,type:S,transform:this.that.__zoom,dispatch:u}),A)}};function W(S,...A){if(!t.apply(this,arguments))return;var P=x(this,A).event(S),M=this.__zoom,V=Math.max(r[0],Math.min(r[1],M.k*Math.pow(2,i.apply(this,arguments)))),R=pi(S);if(P.wheel)(P.mouse[0][0]!==R[0]||P.mouse[0][1]!==R[1])&&(P.mouse[1]=M.invert(P.mouse[0]=R)),clearTimeout(P.wheel);else{if(M.k===V)return;P.mouse=[R,M.invert(R)],ea(this),P.start()}br(S),P.wheel=setTimeout(N,m),P.zoom("mouse",n(T(_(M,V),P.mouse[0],P.mouse[1]),P.extent,s));function N(){P.wheel=null,P.end()}}function Q(S,...A){if(h||!t.apply(this,arguments))return;var P=S.currentTarget,M=x(this,A,!0).event(S),V=_i(S.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",ae,!0),R=pi(S,P),N=S.clientX,ne=S.clientY;RQ(S.view),Ec(S),M.mouse=[R,this.__zoom.invert(R)],ea(this),M.start();function j(X){if(br(X),!M.moved){var G=X.clientX-N,F=X.clientY-ne;M.moved=G*G+F*F>v}M.event(X).zoom("mouse",n(T(M.that.__zoom,M.mouse[0]=pi(X,P),M.mouse[1]),M.extent,s))}function ae(X){V.on("mousemove.zoom mouseup.zoom",null),QQ(X.view,M.moved),br(X),M.event(X).end()}}function D(S,...A){if(t.apply(this,arguments)){var P=this.__zoom,M=pi(S.changedTouches?S.changedTouches[0]:S,this),V=P.invert(M),R=P.k*(S.shiftKey?.5:2),N=n(T(_(P,R),M,V),e.apply(this,A),s);br(S),l>0?_i(this).transition().duration(l).call(k,N,M,S):_i(this).call(y.transform,N,M,S)}}function z(S,...A){if(t.apply(this,arguments)){var P=S.touches,M=P.length,V=x(this,A,S.changedTouches.length===M).event(S),R,N,ne,j;for(Ec(S),N=0;N{const o=e.style??{},r=i[`node-${t.type}`];return r?r(t):Ie("rect",{id:t.id,class:["vue-flow__minimap-node",e.class,{selected:t.selected,dragging:t.dragging}].join(" "),style:o,x:t.position.x,y:t.position.y,rx:t.borderRadius,ry:t.borderRadius,width:t.dimensions.width,height:t.dimensions.height,fill:t.color||o.background||o.backgroundColor,stroke:t.strokeColor,strokeWidth:t.strokeWidth,shapeRendering:t.shapeRendering,onClick:s=>n("click",s),onDblClick:s=>n("dblclick",s),onMouseenter:s=>n("mouseenter",s),onMousemove:s=>n("mousemove",s),onMouseleave:s=>n("mouseleave",s)})}}}),CI=["width","height","viewBox","aria-labelledby"],$I=["id"],EI=["d","fill","stroke","stroke-width"],MI={name:"MiniMap",compatConfig:{MODE:3}},AI=Le({...MI,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:null,height:null,ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:10},offsetScale:{default:5}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(t,{emit:e}){const n=ph(),i=200,o=150,{id:r,edges:s,viewport:l,translateExtent:a,dimensions:u,emits:c,nodes:d,d3Selection:h,d3Zoom:f}=Ze(),m=oe();ro(Aw,bv());const v=ve(()=>{var M;return t.width??((M=n.style)==null?void 0:M.width)??i}),w=ve(()=>{var M;return t.height??((M=n.style)==null?void 0:M.height)??o}),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",_=ve(()=>t.nodeColor instanceof Function?t.nodeColor:()=>t.nodeColor),T=ve(()=>t.nodeStrokeColor instanceof Function?t.nodeStrokeColor:()=>t.nodeStrokeColor),b=ve(()=>t.nodeClassName instanceof Function?t.nodeClassName:()=>t.nodeClassName),k=ve(()=>Ah(d.value)),x=ve(()=>({x:-l.value.x/l.value.zoom,y:-l.value.y/l.value.zoom,width:u.value.width/l.value.zoom,height:u.value.height/l.value.zoom})),$=ve(()=>d.value&&d.value.length?o2(k.value,x.value):x.value),W=ve(()=>{const M=$.value.width/v.value,V=$.value.height/w.value;return Math.max(M,V)}),Q=ve(()=>{const M=W.value*v.value,V=W.value*w.value,R=t.offsetScale*W.value;return{offset:R,x:$.value.x-(M-$.value.width)/2-R,y:$.value.y-(V-$.value.height)/2-R,width:M+R*2,height:V+R*2}}),D=ve(()=>!Q.value.x||!Q.value.y?"":` + M${Q.value.x-Q.value.offset},${Q.value.y-Q.value.offset} + h${Q.value.width+Q.value.offset*2} + v${Q.value.height+Q.value.offset*2} + h${-Q.value.width-Q.value.offset*2}z + M${x.value.x},${x.value.y} + h${x.value.width} + v${x.value.height} + h${-x.value.width}z`);sa(M=>{if(m.value){const V=_i(m.value),R=j=>{if(j.sourceEvent.type!=="wheel"||!h.value||!f.value)return;const ae=-j.sourceEvent.deltaY*(j.sourceEvent.deltaMode===1?.05:j.sourceEvent.deltaMode?1:.002)*t.zoomStep,X=l.value.zoom*2**ae;f.value.scaleTo(h.value,X)},N=j=>{if(j.sourceEvent.type!=="mousemove"||!h.value||!f.value)return;const ae=W.value*Math.max(1,l.value.zoom)*(t.inversePan?-1:1),X={x:l.value.x-j.sourceEvent.movementX*ae,y:l.value.y-j.sourceEvent.movementY*ae},G=[[0,0],[u.value.width,u.value.height]],F=Ef.translate(X.x,X.y).scale(l.value.zoom),se=f.value.constrain()(F,G,a.value);f.value.transform(h.value,se)},ne=TI().on("zoom",t.pannable?N:()=>{}).on("zoom.wheel",t.zoomable?R:()=>{});V.call(ne),M(()=>{V.on("zoom",null)})}},{flush:"post"});function z(M){const[V,R]=pi(M);e("click",{event:M,position:{x:V,y:R}})}function H(M,V){const R={event:M,node:V,connectedEdges:Kn([V],s.value)};c.miniMapNodeClick(R),e("nodeClick",R)}function L(M,V){const R={event:M,node:V,connectedEdges:Kn([V],s.value)};c.miniMapNodeDoubleClick(R),e("nodeDblclick",R)}function S(M,V){const R={event:M,node:V,connectedEdges:Kn([V],s.value)};c.miniMapNodeMouseEnter(R),e("nodeMouseenter",R)}function A(M,V){const R={event:M,node:V,connectedEdges:Kn([V],s.value)};c.miniMapNodeMouseMove(R),e("nodeMousemove",R)}function P(M,V){const R={event:M,node:V,connectedEdges:Kn([V],s.value)};c.miniMapNodeMouseLeave(R),e("nodeMouseleave",R)}return(M,V)=>(E(),K(O(Q0),{position:t.position,class:en(["vue-flow__minimap",{pannable:t.pannable,zoomable:t.zoomable}])},{default:g(()=>[(E(),le("svg",{ref_key:"el",ref:m,width:O(v),height:O(w),viewBox:[O(Q).x,O(Q).y,O(Q).width,O(Q).height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${O(r)}`,onClick:z},[t.ariaLabel?(E(),le("title",{key:0,id:`vue-flow__minimap-${O(r)}`},de(t.ariaLabel),9,$I)):ye("",!0),(E(!0),le(Te,null,Je(O(d),R=>(E(),K(O(PI),{id:R.id,key:R.id,position:R.computedPosition,dimensions:R.dimensions,selected:R.selected,dragging:R.dragging,style:mt(R.style),class:en(O(b)(R)),color:O(_)(R),"border-radius":t.nodeBorderRadius,"stroke-color":O(T)(R),"stroke-width":t.nodeStrokeWidth,"shape-rendering":O(y),type:R.type,onClick:N=>H(N,R),onDblclick:N=>L(N,R),onMouseenter:N=>S(N,R),onMousemove:N=>A(N,R),onMouseleave:N=>P(N,R)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),Re("path",{class:"vue-flow__minimap-mask",d:O(D),fill:t.maskColor,stroke:t.maskStrokeColor,"stroke-width":t.maskStrokeWidth,"fill-rule":"evenodd"},null,8,EI)],8,CI))]),_:1},8,["position","class"]))}});var fn=(t=>(t.Lines="lines",t.Dots="dots",t))(fn||{});const DI=function({dimensions:t,size:e,color:n}){return Ie("path",{stroke:n,"stroke-width":e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})},qI=function({radius:t,color:e}){return Ie("circle",{cx:t,cy:t,r:t,fill:e})};fn.Lines+"",fn.Dots+"";const RI=["id","x","y","width","height","patternTransform"],QI={key:2,height:"100",width:"100"},NI=["fill"],II=["x","y","fill"],VI={name:"Background",compatConfig:{MODE:3}},BI=Le({...VI,props:{id:null,variant:{default:fn.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:null,bgColor:null,height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:2}},setup(t){const e={[fn.Dots]:"#81818a",[fn.Lines]:"#eee"},{id:n,viewport:i}=Ze(),o=ve(()=>{const[l,a]=Array.isArray(t.gap)?t.gap:[t.gap,t.gap],u=[l*i.value.zoom||1,a*i.value.zoom||1],c=t.size*i.value.zoom,d=t.variant===fn.Dots?[c/t.offset,c/t.offset]:[u[0]/t.offset,u[1]/t.offset];return{scaledGap:u,offset:d,size:c}}),r=ve(()=>`pattern-${n}${t.id?`-${t.id}`:""}`),s=ve(()=>t.patternColor||e[t.variant||fn.Dots]);return(l,a)=>(E(),le("svg",{class:"vue-flow__background vue-flow__container",style:mt({height:`${t.height>100?100:t.height}%`,width:`${t.width>100?100:t.width}%`})},[Ve(l.$slots,"pattern-container",{id:O(r)},()=>[Re("pattern",{id:O(r),x:O(i).x%O(o).scaledGap[0],y:O(i).y%O(o).scaledGap[1],width:O(o).scaledGap[0],height:O(o).scaledGap[1],patternTransform:`translate(-${O(o).offset[0]},-${O(o).offset[1]})`,patternUnits:"userSpaceOnUse"},[Ve(l.$slots,"pattern",{},()=>[t.variant===O(fn).Lines?(E(),K(O(DI),{key:0,size:t.lineWidth,color:O(s),dimensions:O(o).scaledGap},null,8,["size","color","dimensions"])):t.variant===O(fn).Dots?(E(),K(O(qI),{key:1,color:O(s),radius:O(o).size/t.offset},null,8,["color","radius"])):ye("",!0),t.bgColor?(E(),le("svg",QI,[Re("rect",{width:"100%",height:"100%",fill:t.bgColor},null,8,NI)])):ye("",!0)])],8,RI)]),Re("rect",{x:t.x,y:t.y,width:"100%",height:"100%",fill:`url(#${O(r)})`},null,8,II),Ve(l.$slots,"default",{id:O(r)})],4))}}),WI={name:"ControlButton",compatConfig:{MODE:3}},LI=(t,e)=>{const n=t.__vccOpts||t;for(const[i,o]of e)n[i]=o;return n},zI={class:"vue-flow__controls-button"};function XI(t,e,n,i,o,r){return E(),le("button",zI,[Ve(t.$slots,"default")])}const Cl=LI(WI,[["render",XI]]),UI={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},YI=Re("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),jI=[YI];function FI(t,e){return E(),le("svg",UI,jI)}const HI={render:FI},GI={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},ZI=Re("path",{d:"M0 0h32v4.2H0z"},null,-1),KI=[ZI];function JI(t,e){return E(),le("svg",GI,KI)}const eV={render:JI},tV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},nV=Re("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),iV=[nV];function oV(t,e){return E(),le("svg",tV,iV)}const rV={render:oV},sV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},lV=Re("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"},null,-1),aV=[lV];function uV(t,e){return E(),le("svg",sV,aV)}const cV={render:uV},dV={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},hV=Re("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),fV=[hV];function pV(t,e){return E(),le("svg",dV,fV)}const mV={render:pV},gV={name:"Controls",compatConfig:{MODE:3}},vV=Le({...gV,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:null,position:{default:a0.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(t,{emit:e}){const{nodesDraggable:n,nodesConnectable:i,elementsSelectable:o,setInteractive:r,zoomIn:s,zoomOut:l,fitView:a,viewport:u,minZoom:c,maxZoom:d}=Ze(),h=ve(()=>n.value||i.value||o.value),f=ve(()=>u.value.zoom<=c.value),m=ve(()=>u.value.zoom>=d.value);function v(){s(),e("zoomIn")}function w(){l(),e("zoomOut")}function y(){a(t.fitViewParams),e("fitView")}function _(){r(!h.value),e("interactionChange",!h.value)}return(T,b)=>(E(),K(O(Q0),{class:"vue-flow__controls",position:t.position},{default:g(()=>[Ve(T.$slots,"top"),t.showZoom?(E(),le(Te,{key:0},[Ve(T.$slots,"control-zoom-in",{},()=>[p(Cl,{class:"vue-flow__controls-zoomin",disabled:O(m),onClick:v},{default:g(()=>[Ve(T.$slots,"icon-zoom-in",{},()=>[(E(),K(_o(O(HI))))])]),_:3},8,["disabled"])]),Ve(T.$slots,"control-zoom-out",{},()=>[p(Cl,{class:"vue-flow__controls-zoomout",disabled:O(f),onClick:w},{default:g(()=>[Ve(T.$slots,"icon-zoom-out",{},()=>[(E(),K(_o(O(eV))))])]),_:3},8,["disabled"])])],64)):ye("",!0),t.showFitView?Ve(T.$slots,"control-fit-view",{key:1},()=>[p(Cl,{class:"vue-flow__controls-fitview",onClick:y},{default:g(()=>[Ve(T.$slots,"icon-fit-view",{},()=>[(E(),K(_o(O(rV))))])]),_:3})]):ye("",!0),t.showInteractive?Ve(T.$slots,"control-interactive",{key:2},()=>[t.showInteractive?(E(),K(Cl,{key:0,class:"vue-flow__controls-interactive",onClick:_},{default:g(()=>[O(h)?Ve(T.$slots,"icon-unlock",{key:0},()=>[(E(),K(_o(O(mV))))]):ye("",!0),O(h)?ye("",!0):Ve(T.$slots,"icon-lock",{key:1},()=>[(E(),K(_o(O(cV))))])]),_:3})):ye("",!0)]):ye("",!0),Ve(T.$slots,"default")]),_:3},8,["position"]))}}),yV={__name:"TagInput",props:{modelValue:{}},emits:["update:modelValue"],setup(t){const{t:e}=Ee(),n=cu(t,"modelValue"),i=oe([]);return uu(async()=>{const{data:o}=await Tv("list",{});i.value=o.map(r=>({label:r.title,value:r.tid}))}),(o,r)=>{const s=C("a-select");return E(),K(s,{value:n.value,"onUpdate:value":r[0]||(r[0]=l=>n.value=l),mode:"tags",placeholder:O(e)("components.workspace.tagInput.select_tags"),style:{"min-width":"150px",width:"100%"},options:i.value},null,8,["value","placeholder","options"])}}};var OV=Object.defineProperty,nu=Object.getOwnPropertySymbols,Dw=Object.prototype.hasOwnProperty,qw=Object.prototype.propertyIsEnumerable,sv=(t,e,n)=>e in t?OV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Do=(t,e)=>{for(var n in e||(e={}))Dw.call(e,n)&&sv(t,n,e[n]);if(nu)for(var n of nu(e))qw.call(e,n)&&sv(t,n,e[n]);return t},Rw=(t,e)=>{var n={};for(var i in t)Dw.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&nu)for(var i of nu(t))e.indexOf(i)<0&&qw.call(t,i)&&(n[i]=t[i]);return n};const Qw="[vue-draggable-plus]: ";function wV(t){console.warn(Qw+t)}function _V(t){console.error(Qw+t)}function bV(t,e,n){Array.isArray(t)&&n>=0&&nn?n.toUpperCase():"")}function SV(t){return Object.keys(t).reduce((e,n)=>(typeof t[n]<"u"&&(e[xV(n)]=t[n]),e),{})}function kV(t,e){if(Array.isArray(t))return t.splice(e,1)}function TV(t,e,n){if(Array.isArray(t))return t.splice(e,0,n)}function PV(t){return typeof t>"u"}function CV(t){return typeof t=="string"}function lv(t,e,n){const i=t.children[n];t.insertBefore(e,i)}function Mc(t){t.parentNode&&t.parentNode.removeChild(t)}function $V(t,e=document){var n;let i=null;return typeof(e==null?void 0:e.querySelector)=="function"?i=(n=e==null?void 0:e.querySelector)==null?void 0:n.call(e,t):i=document.querySelector(t),i||wV(`Element not found: ${t}`),i}function EV(t,e,n=null){return function(...i){return t.apply(n,i),e.apply(n,i)}}function MV(t,e){const n=Do({},t);return Object.keys(e).forEach(i=>{n[i]?n[i]=EV(t[i],e[i]):n[i]=e[i]}),n}function AV(t){return t instanceof HTMLElement}function DV(t,e){Object.keys(t).forEach(n=>{e(n,t[n])})}/**! + * Sortable 1.15.0 + * @author RubaXa + * @author owenm + * @license MIT + */function av(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function Wn(t){for(var e=1;e=0)&&(n[o]=t[o]);return n}function QV(t,e){if(t==null)return{};var n=RV(t,e),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var NV="1.15.0";function ii(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var hi=ii(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Bs=ii(/Edge/i),uv=ii(/firefox/i),zr=ii(/safari/i)&&!ii(/chrome/i)&&!ii(/android/i),Nw=ii(/iP(ad|od|hone)/i),Iw=ii(/chrome/i)&&ii(/android/i),Vw={capture:!1,passive:!1};function We(t,e,n){t.addEventListener(e,n,!hi&&Vw)}function Ne(t,e,n){t.removeEventListener(e,n,!hi&&Vw)}function iu(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function IV(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Cn(t,e,n,i){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&iu(t,e):iu(t,e))||i&&t===n)return t;if(t===n)break}while(t=IV(t))}return null}var cv=/\s+/g;function jt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(cv," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(cv," ")}}function Se(t,e,n){var i=t&&t.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=n+(typeof n=="string"?"":"px")}}function Yo(t,e){var n="";if(typeof t=="string")n=t;else do{var i=Se(t,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Bw(t,e,n){if(t){var i=t.getElementsByTagName(e),o=0,r=i.length;if(n)for(;o=r:s=o<=r,!s)return i;if(i===In())break;i=Pi(i,!1)}return!1}function sr(t,e,n,i){for(var o=0,r=0,s=t.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=QV(n,YV);Ws.pluginEvent.bind(ke)(t,e,Wn({dragEl:ce,parentEl:rt,ghostEl:Ce,rootEl:Ke,nextEl:zi,lastDownEl:na,cloneEl:tt,cloneHidden:bi,dragStarted:Ar,putSortable:_t,activeSortable:ke.active,originalEvent:i,oldIndex:qo,oldDraggableIndex:Ur,newIndex:Ft,newDraggableIndex:Oi,hideGhostForTarget:jw,unhideGhostForTarget:Fw,cloneNowHidden:function(){bi=!0},cloneNowShown:function(){bi=!1},dispatchSortableEvent:function(r){Dt({sortable:e,name:r,originalEvent:i})}},o))};function Dt(t){UV(Wn({putSortable:_t,cloneEl:tt,targetEl:ce,rootEl:Ke,oldIndex:qo,oldDraggableIndex:Ur,newIndex:Ft,newDraggableIndex:Oi},t))}var ce,rt,Ce,Ke,zi,na,tt,bi,qo,Ft,Ur,Oi,$l,_t,ko=!1,ou=!1,ru=[],Wi,hn,qc,Rc,fv,pv,Ar,wo,Yr,jr=!1,El=!1,ia,Ct,Qc=[],lh=!1,su=[],Vu=typeof document<"u",Ml=Nw,mv=Bs||hi?"cssFloat":"float",jV=Vu&&!Iw&&!Nw&&"draggable"in document.createElement("div"),Xw=function(){if(Vu){if(hi)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Uw=function(t,e){var n=Se(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=sr(t,0,e),r=sr(t,1,e),s=o&&Se(o),l=r&&Se(r),a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+ht(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ht(r).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var c=s.float==="left"?"left":"right";return r&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||a>=i&&n[mv]==="none"||r&&n[mv]==="none"&&a+u>i)?"vertical":"horizontal"},FV=function(t,e,n){var i=n?t.left:t.top,o=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,l=n?e.right:e.bottom,a=n?e.width:e.height;return i===s||o===l||i+r/2===s+a/2},HV=function(t,e){var n;return ru.some(function(i){var o=i[Kt].options.emptyInsertThreshold;if(!(!o||Mf(i))){var r=ht(i),s=t>=r.left-o&&t<=r.right+o,l=e>=r.top-o&&e<=r.bottom+o;if(s&&l)return n=i}}),n},Yw=function(t){function e(o,r){return function(s,l,a,u){var c=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(o==null&&(r||c))return!0;if(o==null||o===!1)return!1;if(r&&o==="clone")return o;if(typeof o=="function")return e(o(s,l,a,u),r)(s,l,a,u);var d=(r?s:l).options.group.name;return o===!0||typeof o=="string"&&o===d||o.join&&o.indexOf(d)>-1}}var n={},i=t.group;(!i||ta(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},jw=function(){!Xw&&Ce&&Se(Ce,"display","none")},Fw=function(){!Xw&&Ce&&Se(Ce,"display","")};Vu&&!Iw&&document.addEventListener("click",function(t){if(ou)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ou=!1,!1},!0);var Li=function(t){if(ce){t=t.touches?t.touches[0]:t;var e=HV(t.clientX,t.clientY);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Kt]._onDragOver(n)}}},GV=function(t){ce&&ce.parentNode[Kt]._isOutsideThisEl(t.target)};function ke(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ci({},e),t[Kt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Uw(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(r,s){r.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ke.supportPointer!==!1&&"PointerEvent"in window&&!zr,emptyInsertThreshold:5};Ws.initializePlugins(this,t,n);for(var i in n)!(i in e)&&(e[i]=n[i]);Yw(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:jV,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?We(t,"pointerdown",this._onTapStart):(We(t,"mousedown",this._onTapStart),We(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(We(t,"dragover",this),We(t,"dragenter",this)),ru.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ci(this,LV())}ke.prototype={constructor:ke,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(wo=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,ce):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,o=i.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,a=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=i.filter;if(oB(n),!ce&&!(/mousedown|pointerdown/.test(r)&&t.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&zr&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Cn(l,i.draggable,n,!1),!(l&&l.animated)&&na!==l)){if(qo=rn(l),Ur=rn(l,i.draggable),typeof u=="function"){if(u.call(this,t,l,this)){Dt({sortable:e,rootEl:a,name:"filter",targetEl:l,toEl:n,fromEl:n}),It("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=Cn(a,c.trim(),n,!1),c)return Dt({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:n,toEl:n}),It("filter",e,{evt:t}),!0}),u)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Cn(a,i.handle,n,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,e,n){var i=this,o=i.el,r=i.options,s=o.ownerDocument,l;if(n&&!ce&&n.parentNode===o){var a=ht(n);if(Ke=o,ce=n,rt=ce.parentNode,zi=ce.nextSibling,na=n,$l=r.group,ke.dragged=ce,Wi={target:ce,clientX:(e||t).clientX,clientY:(e||t).clientY},fv=Wi.clientX-a.left,pv=Wi.clientY-a.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,ce.style["will-change"]="all",l=function(){if(It("delayEnded",i,{evt:t}),ke.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!uv&&i.nativeDraggable&&(ce.draggable=!0),i._triggerDragStart(t,e),Dt({sortable:i,name:"choose",originalEvent:t}),jt(ce,r.chosenClass,!0)},r.ignore.split(",").forEach(function(u){Bw(ce,u.trim(),Nc)}),We(s,"dragover",Li),We(s,"mousemove",Li),We(s,"touchmove",Li),We(s,"mouseup",i._onDrop),We(s,"touchend",i._onDrop),We(s,"touchcancel",i._onDrop),uv&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ce.draggable=!0),It("delayStart",this,{evt:t}),r.delay&&(!r.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Bs||hi))){if(ke.eventCanceled){this._onDrop();return}We(s,"mouseup",i._disableDelayedDrag),We(s,"touchend",i._disableDelayedDrag),We(s,"touchcancel",i._disableDelayedDrag),We(s,"mousemove",i._delayedDragTouchMoveHandler),We(s,"touchmove",i._delayedDragTouchMoveHandler),r.supportPointer&&We(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,r.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ce&&Nc(ce),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ne(t,"mouseup",this._disableDelayedDrag),Ne(t,"touchend",this._disableDelayedDrag),Ne(t,"touchcancel",this._disableDelayedDrag),Ne(t,"mousemove",this._delayedDragTouchMoveHandler),Ne(t,"touchmove",this._delayedDragTouchMoveHandler),Ne(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?We(document,"pointermove",this._onTouchMove):e?We(document,"touchmove",this._onTouchMove):We(document,"mousemove",this._onTouchMove):(We(ce,"dragend",this),We(Ke,"dragstart",this._onDragStart));try{document.selection?oa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(ko=!1,Ke&&ce){It("dragStarted",this,{evt:e}),this.nativeDraggable&&We(document,"dragover",GV);var n=this.options;!t&&jt(ce,n.dragClass,!1),jt(ce,n.ghostClass,!0),ke.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(hn){this._lastX=hn.clientX,this._lastY=hn.clientY,jw();for(var t=document.elementFromPoint(hn.clientX,hn.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(hn.clientX,hn.clientY),t!==e);)e=t;if(ce.parentNode[Kt]._isOutsideThisEl(t),e)do{if(e[Kt]){var n=void 0;if(n=e[Kt]._onDragOver({clientX:hn.clientX,clientY:hn.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Fw()}},_onTouchMove:function(t){if(Wi){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,o=t.touches?t.touches[0]:t,r=Ce&&Yo(Ce,!0),s=Ce&&r&&r.a,l=Ce&&r&&r.d,a=Ml&&Ct&&hv(Ct),u=(o.clientX-Wi.clientX+i.x)/(s||1)+(a?a[0]-Qc[0]:0)/(s||1),c=(o.clientY-Wi.clientY+i.y)/(l||1)+(a?a[1]-Qc[1]:0)/(l||1);if(!ke.active&&!ko){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(Dt({rootEl:rt,name:"add",toEl:rt,fromEl:Ke,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:rt,originalEvent:t}),Dt({rootEl:rt,name:"sort",toEl:rt,fromEl:Ke,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:rt,originalEvent:t})),_t&&_t.save()):Ft!==qo&&Ft>=0&&(Dt({sortable:this,name:"update",toEl:rt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:rt,originalEvent:t})),ke.active&&((Ft==null||Ft===-1)&&(Ft=qo,Oi=Ur),Dt({sortable:this,name:"end",toEl:rt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){It("nulling",this),Ke=ce=rt=Ce=zi=tt=na=bi=Wi=hn=Ar=Ft=Oi=qo=Ur=wo=Yr=_t=$l=ke.dragged=ke.ghost=ke.clone=ke.active=null,su.forEach(function(t){t.checked=!0}),su.length=qc=Rc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ce&&(this._onDragOver(t),ZV(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,i=0,o=n.length,r=this.options;ii.right+o||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+o}function tB(t,e,n,i,o,r,s,l){var a=i?t.clientY:t.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!s){if(l&&iac+u*r/2:ad-ia)return-Yr}else if(a>c+u*(1-o)/2&&ad-u*r/2)?a>c+u/2?1:-1:0}function nB(t){return rn(ce){k=v(k),l&&_.destroy(),l=new ke(k,w())};Me(s,()=>{l&&DV(w(),(k,x)=>{l==null||l.option(k,x)})},{deep:!0});const _={option:(k,x)=>l==null?void 0:l.option(k,x),destroy:()=>{l==null||l.destroy(),l=null},save:()=>l==null?void 0:l.save(),toArray:()=>l==null?void 0:l.toArray(),closest:(...k)=>l==null?void 0:l.closest(...k)},T=()=>_==null?void 0:_.option("disabled",!0),b=()=>_==null?void 0:_.option("disabled",!1);return aB(()=>{a&&y()}),lB(_.destroy),Do({start:y,pause:T,resume:b},_)}const hh=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],uB=["onUpdate","onStart","onAdd","onRemove","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target",...hh.map(t=>`on${t.replace(/^\S/,e=>e.toUpperCase())}`)],cB=Le({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:uB,emits:["update:modelValue",...hh],setup(t,{slots:e,emit:n,expose:i}){const o=ph(),r=hh.reduce((c,d)=>{const h=`on${d.replace(/^\S/,f=>f.toUpperCase())}`;return c[h]=f=>n(d,f),c},{}),s=ve(()=>{const c=Sv(t),d=Rw(c,["modelValue"]),h=Object.entries(d).reduce((f,[m,v])=>{const w=O(v);return w!==void 0&&(f[m]=w),f},{});return Do(Do({},r),SV(Do(Do({},o),h)))}),l=ve({get:()=>t.modelValue,set:c=>n("update:modelValue",c)}),a=oe(),u=Mt(dh(t.target||a,l,s));return i(u),()=>{if(e.default)return Ie(t.tag||"div",{ref:a},e.default(u))}}});const dB={class:"draggable-item-content"},hB={key:0},fB={key:1},pB={key:2},mB={key:3},gB={key:4},vB={key:5},yB={key:0,class:"ui-special-item-container"},OB={__name:"UIDesign",props:{modelValue:{}},emits:["update:modelValue"],setup(t){const e=cu(t,"modelValue"),{t:n}=Ee(),i=mh(e.value),o=Mt(i),r=oe(o.inputFields),s=oe(o.outputNodes),l=oe(o.triggerNodes),a=oe([{id:"typography-paragraph",required:!0,placeholder:n("components.workspace.uiDesign.typography-paragraph.placeholder"),show:!1,multiline:!0,value:"",password:!1,name:"typography-paragraph",display_name:"typography-paragraph",type:"str",clear_after_run:!0,list:!1,field_type:"typography-paragraph"}]),u=()=>{e.value.data.ui={inputFields:r.value,outputNodes:s.value}},c=oe(!1),d=oe(),h=Mt({animation:150,ghostClass:"ghost",handle:".handle",group:{name:"fields",pull:!1},onStart:()=>{c.value=!0},onAdd:()=>{u()},onEnd:()=>{u(),Ci(()=>{c.value=!1})}});dh(d,r,h);const f=oe(),m=Mt({animation:150,ghostClass:"ghost",handle:".handle",group:{name:"fields",pull:!1},onStart:()=>{c.value=!0},onAdd:()=>{u()},onEnd:()=>{u(),Ci(()=>{c.value=!1})}});dh(f,s,m);const v=(w,y)=>{w.splice(y,1),u()};return(w,y)=>{const _=C("a-menu-item"),T=C("a-tooltip"),b=C("a-menu"),k=C("a-layout-sider"),x=C("a-typography-title"),$=C("a-select"),W=C("a-textarea"),Q=C("a-input"),D=C("a-input-number"),z=C("a-checkbox"),H=C("a-form-item"),L=C("a-col"),S=C("a-row"),A=C("a-form"),P=C("a-divider"),M=C("a-button"),V=C("a-popconfirm"),R=C("a-space"),N=C("cron-ant"),ne=C("a-card"),j=C("a-layout-content"),ae=C("a-layout");return E(),K(ae,{class:"ui-design-layout","has-sider":"",style:{height:"100%","min-height":"calc(100vh - 40px - 40px)"}},{default:g(()=>[p(k,{style:{overflow:"auto",backgroundColor:"#fff"},class:"custom-scrollbar"},{default:g(()=>[p(b,{theme:"light",mode:"inline",ref:"siderMenu"},{default:g(()=>[p(O(cB),{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=X=>a.value=X),animation:"150",group:{name:"fields",pull:"clone",put:!1},sort:!1},{default:g(()=>[(E(!0),le(Te,null,Je(a.value,(X,G)=>(E(),K(T,{key:`node-${G}`,title:O(n)(`components.workspace.uiDesign.${X.name}.tip`),placement:"right"},{default:g(()=>[p(_,{class:"draggable-menu-item",id:X.id},{default:g(()=>[p(O(Bu)),Re("span",null,de(O(n)(`components.workspace.uiDesign.${X.name}.title`)),1)]),_:2},1032,["id"])]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"])]),_:1},512)]),_:1}),p(ae,{style:{"background-color":"#fff"}},{default:g(()=>[p(j,{style:{margin:"24px 16px 0",overflow:"initial"}},{default:g(()=>[p(S,{gutter:[16,16]},{default:g(()=>[p(L,{xxl:6,xl:8,lg:10,md:24},{default:g(()=>[p(S,{gutter:[16,16]},{default:g(()=>[p(x,{level:3},{default:g(()=>[p(O(R_),{class:"text-primary"}),pe(" "+de(O(n)("workspace.workflowSpace.inputs")),1)]),_:1}),p(L,{span:24},{default:g(()=>[p(A,{layout:"vertical",ref_key:"inputFieldsEl",ref:d},{default:g(()=>[(E(!0),le(Te,null,Je(r.value,(X,G)=>(E(),le("div",{class:"draggable-item",key:`field-${X}-${G}`},[p(O(Bu),{class:"handle"}),O(gh).includes(X.field_type)?ye("",!0):(E(),K(H,{key:0,class:"draggable-item-content"},{label:g(()=>[pe(de(X.display_name),1)]),default:g(()=>[X.category=="llms"&&X=="temperature"?(E(),K(vh,{key:0,modelValue:X.value,"onUpdate:modelValue":F=>X.value=F},null,8,["modelValue","onUpdate:modelValue"])):X.field_type=="select"?(E(),K($,{key:1,value:X.value,"onUpdate:value":F=>X.value=F,options:X.options},null,8,["value","onUpdate:value","options"])):X.field_type=="textarea"?(E(),K(W,{key:2,value:X.value,"onUpdate:value":F=>X.value=F,autoSize:!0,showCount:!0,placeholder:X.placeholder},null,8,["value","onUpdate:value","placeholder"])):X.field_type=="input"?(E(),K(Q,{key:3,value:X.value,"onUpdate:value":F=>X.value=F,placeholder:X.placeholder},null,8,["value","onUpdate:value","placeholder"])):X.field_type=="number"?(E(),K(D,{key:4,value:X.value,"onUpdate:value":F=>X.value=F,placeholder:X.placeholder},null,8,["value","onUpdate:value","placeholder"])):X.field_type=="checkbox"?(E(),K(z,{key:5,checked:X.value,"onUpdate:checked":F=>X.value=F},null,8,["checked","onUpdate:checked"])):X.field_type=="file"?(E(),K(Pv,{key:6,modelValue:X.value,"onUpdate:modelValue":F=>X.value=F},null,8,["modelValue","onUpdate:modelValue"])):X.field_type=="list"?(E(),K(g_,{key:7,modelValue:X.value,"onUpdate:modelValue":F=>X.value=F},null,8,["modelValue","onUpdate:modelValue"])):ye("",!0)]),_:2},1024)),X.field_type=="typography-paragraph"?(E(),K(S,{key:1,class:"draggable-item-content"},{default:g(()=>[p(L,{span:24,class:"ui-special-item-container"},{default:g(()=>[p(W,{class:"ui-special-item",value:X.value,"onUpdate:value":F=>X.value=F,placeholder:X.placeholder,"auto-size":"",onChange:u},null,8,["value","onUpdate:value","placeholder"]),p(O(Qf),{class:"ui-special-item-delete",onClick:F=>v(r.value,G)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)):ye("",!0)]))),128))]),_:1},512)]),_:1}),p(P),p(L,{span:24},{default:g(()=>[p(S,{gutter:[16,16]},{default:g(()=>[(E(!0),le(Te,null,Je(l.value,X=>(E(),K(L,{key:`node-${X.id}`,span:24},{default:g(()=>[X.type=="ButtonTrigger"?(E(),K(M,{key:0,type:"primary",block:""},{default:g(()=>[pe(de(X.data.template.button_text.value),1)]),_:2},1024)):X.type=="ScheduleTrigger"?(E(),K(ne,{key:1,title:O(n)("components.nodes.triggers.ScheduleTrigger.schedule_settings")},{extra:g(()=>[p(R,null,{default:g(()=>[p(M,{type:"primary"},{default:g(()=>[pe(de(O(n)("components.nodes.triggers.ScheduleTrigger.save_schedule_settings")),1)]),_:1}),p(V,{title:O(n)("workspace.workflowSpace.delete_schedule_trigger_confirm")},{default:g(()=>[p(M,{type:"primary",danger:""},{default:g(()=>[pe(de(O(n)("workspace.workflowSpace.delete")),1)]),_:1})]),_:1},8,["title"])]),_:1})]),default:g(()=>[p(N,{modelValue:X.data.template.schedule.value,"onUpdate:modelValue":G=>X.data.template.schedule.value=G,"button-props":{type:"primary",shape:"round"},locale:w.language},null,8,["modelValue","onUpdate:modelValue","locale"])]),_:2},1032,["title"])):ye("",!0)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1}),p(L,{xxl:18,xl:16,lg:14,md:24},{default:g(()=>[p(x,{level:3,style:{display:"flex","justify-content":"space-between"}},{default:g(()=>[Re("span",null,[p(O(V_),{class:"text-primary"}),pe(" "+de(O(n)("workspace.workflowSpace.outputs")),1)])]),_:1}),p(S,{gutter:[16,16],ref_key:"outputNodesEl",ref:f},{default:g(()=>[(E(!0),le(Te,null,Je(s.value,(X,G)=>(E(),K(L,{span:24,class:"draggable-item",key:`node-${X.id}-${G}`},{default:g(()=>{var F;return[p(O(Bu),{class:"handle"}),Re("div",dB,[X.type=="Text"?(E(),le("div",hB,[p(x,{level:5},{default:g(()=>[pe(de(X.data.template.output_title.value),1)]),_:2},1024),p(v_,{text:X.data.template.text.value,renderMarkdown:X.data.template.render_markdown.value},null,8,["text","renderMarkdown"])])):X.type=="Audio"?(E(),le("div",fB,[p(y_,{audios:[(F=X.data.template.audio_url)==null?void 0:F.value]},null,8,["audios"])])):X.type=="Mindmap"?(E(),le("div",pB,[p(O_,{content:X.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):X.type=="Mermaid"?(E(),le("div",mB,[p(w_,{content:X.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):X.type=="Echarts"?(E(),le("div",gB,[p(__,{option:X.data.template.option.value,style:{width:"100%","min-height":"50vh"}},null,8,["option"])])):(E(),le("div",vB,[X.field_type=="typography-paragraph"?(E(),le("div",yB,[p(W,{class:"ui-special-item",value:X.value,"onUpdate:value":se=>X.value=se,placeholder:X.placeholder,"auto-size":"",onChange:u},null,8,["value","onUpdate:value","placeholder"]),p(O(Qf),{class:"ui-special-item-delete",onClick:se=>v(s.value,G)},null,8,["onClick"])])):ye("",!0)]))])]}),_:2},1024))),128))]),_:1},512)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}},wB=lr(OB,[["__scopeId","data-v-b6aba49e"]]);const _B={__name:"VueFlowStyleSettings",props:{modelValue:{}},emits:kv(["save"],["update:modelValue"]),setup(t,{emit:e}){const n=cu(t,"modelValue"),{t:i}=Ee(),o=oe(!1),r=()=>{e("save",n),o.value=!1};return(s,l)=>{const a=C("a-button"),u=C("a-select-option"),c=C("a-select"),d=C("a-form-item"),h=C("a-switch"),f=C("a-form"),m=C("a-drawer");return E(),le(Te,null,[p(a,{onClick:l[0]||(l[0]=v=>o.value=!0),class:"settings-button"},{default:g(()=>[pe(de(O(i)("components.workspace.vueFlowStyleSettings.title")),1)]),_:1}),p(m,{open:o.value,"onUpdate:open":l[3]||(l[3]=v=>o.value=v),class:"custom-class",title:O(i)("components.workspace.vueFlowStyleSettings.title"),placement:"right"},{extra:g(()=>[p(a,{type:"primary",onClick:r},{default:g(()=>[pe(de(O(i)("common.save")),1)]),_:1})]),default:g(()=>[p(f,{model:n.value,"label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off"},{default:g(()=>[p(d,{label:O(i)("components.workspace.vueFlowStyleSettings.edge_type"),name:"edge_type"},{default:g(()=>[p(c,{value:n.value.edge.type,"onUpdate:value":l[1]||(l[1]=v=>n.value.edge.type=v)},{default:g(()=>[p(u,{value:"bezier"},{default:g(()=>[pe(de(O(i)("components.workspace.vueFlowStyleSettings.edge_type_bezier")),1)]),_:1}),p(u,{value:"step"},{default:g(()=>[pe(de(O(i)("components.workspace.vueFlowStyleSettings.edge_type_step")),1)]),_:1}),p(u,{value:"smoothstep"},{default:g(()=>[pe(de(O(i)("components.workspace.vueFlowStyleSettings.edge_type_smoothstep")),1)]),_:1}),p(u,{value:"straight"},{default:g(()=>[pe(de(O(i)("components.workspace.vueFlowStyleSettings.edge_type_straight")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),p(d,{label:O(i)("components.workspace.vueFlowStyleSettings.edge_animated"),name:"edge_animated"},{default:g(()=>[p(h,{checked:n.value.edge.animated,"onUpdate:checked":l[2]||(l[2]=v=>n.value.edge.animated=v)},null,8,["checked"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["open","title"])],64)}}},bB=lr(_B,[["__scopeId","data-v-33ef65ae"]]);const xB={key:0,class:"loading-container"},SB={key:1,class:"editor-container"},kB={class:"title-container"},TB=["data-node-type"],PB={__name:"WorkflowEditor",setup(t){const{t:e}=Ee(),n=oe(!0),i=l_(),o=a_(),r=i.params.workflowId,s=oe(e("workspace.workflowEditor.workflow_canvas")),l=Mt([e("workspace.workflowEditor.workflow_info"),e("workspace.workflowEditor.workflow_canvas"),e("workspace.workflowEditor.workflow_ui_design")]),a=Ss(),{userDatabases:u}=Ji(a),c=u_(),d=c_(),{vueFlowStyleSettings:h}=Ji(d),f=bh(),{nodeMessagesCount:m,nodeMessages:v}=Ji(f),w={change:(U,Y)=>{},delete:(U,Y)=>{T.value=T.value.filter(ue=>ue.id!==Y),T.value=T.value.filter(ue=>!(ue.source&&ue.source===Y||ue.target&&ue.target===Y))},clone:(U,Y)=>{const ue=T.value.find(te=>te.id===Y);ue.selected=!1;const he=JSON.parse(JSON.stringify(ue));he.id=Wg(),he.selected=!0,he.position.x+=50,he.position.y+=50,T.value.push(he)}};Me(()=>m.value,()=>{for(;v.value.length>0;){const{action:U,data:Y,nodeId:ue}=f.pop();w[U](Y,ue)}});const y=oe(""),_=oe({}),T=oe([]),b=()=>{ae.value.forEach(U=>{U.type=h.value.edge.type,U.animated=h.value.edge.animated,U.style=h.value.edge.style}),d.setVueFlowStyleSettings(h.value)};uu(async()=>{const U=ua("get",{wid:r}),Y=x_("list",{}),ue=await U,he=await Y;if(he.status==200&&a.setUserDatabases(he.data),ue.status!=200){To.error(e("workspace.workflowSpace.get_workflow_failed")),o.push({name:"WorkflowSpaceMain"});return}_.value=ue.data,_.value.data.nodes.forEach(te=>{var $e,ot;te.category=="vectorDb"?te.data.template.database.options=u.value.filter(vt=>vt.status=="VALID").map(vt=>({value:vt.vid,label:vt.name})):te.type=="CommentNode"&&(te.dimensions={width:parseInt((($e=te.style)==null?void 0:$e.width)||100),height:parseInt(((ot=te.style)==null?void 0:ot.height)||50)})}),_.value.tags=_.value.tags.map(te=>te.tid),N(_.value.data),T.value=[..._.value.data.nodes,..._.value.data.edges],y.value=zs(_.value),n.value=!1});const k=()=>{const U=R();_.value.data={...U,ui:_.value.data.ui||{}}},x=oe(!1),$=oe({hasInput:!1,hasOutput:!1,hasTrigger:!1}),W=()=>{$.value={hasInput:!1,hasOutput:!1,hasTrigger:!1,noCycle:!1,noIsolatedNodes:!1};const U=f_(_.value);$.value.noCycle=U.noCycle,$.value.noIsolatedNodes=U.noIsolatedNodes;const Y=mh(_.value),ue=Mt(Y);$.value.hasInput=ue.inputFields.filter(he=>!gh.includes(he.field_type)).length>0,$.value.hasOutput=ue.outputNodes.filter(he=>he.category=="outputs").length>0,$.value.hasTrigger=ue.triggerNodes.filter(he=>he.category=="triggers").length>0,Object.values($.value).some(he=>he===!1)&&(x.value=!0)},Q=oe(!1),D=async()=>{Q.value=!0;const U=_.value.data.ui||{},Y=R();_.value.data={...Y,ui:U},W();const ue=await ua("update",{wid:r,..._.value});ue.status==200?(To.success(e("workspace.workflowSpace.save_success")),y.value=zs(_.value)):ue.data.status==400?To.error(e("workspace.workflowSpace.workflow_cant_invoke_itself")):To.error(e("workspace.workflowSpace.save_failed")),c.updateUserWorkflow(_.value),Q.value=!1},z=async()=>{await o.push({name:"WorkflowUse",params:{workflowId:r}})},H=oe(!1),L=async()=>{await D(),await z()},S=async()=>{await z()},A=()=>{const U=_.value.data.ui||{},Y=R();_.value.data={...Y,ui:U},y.value!=zs(_.value)?H.value=!0:z()},{addEdges:P,updateEdge:M,onConnect:V,toObject:R,fromObject:N,viewport:ne,vueFlowRef:j,edges:ae}=Ze();V(U=>{U.type=h.value.edge.type,U.animated=h.value.edge.animated,U.style=h.value.edge.style,P([U])});const X=({edge:U,connection:Y})=>{M(U,Y)},G=U=>{T.value=T.value.filter(Y=>!(Y.source===U.edge.source&&Y.target===U.edge.target&&Y.sourceHandle===U.edge.sourceHandle&&Y.targetHandle===U.edge.targetHandle))};let F;const se=U=>{F&&document.body.removeChild(F);let Y=U.target.getBoundingClientRect();F=U.target.cloneNode(!0),F.style.position="absolute",F.style.top=Y.top+"px",F.style.left=Y.left+"px",F.style.width=Y.width+"px",F.style.height=Y.height+"px",F.style.opacity="0.5",F.style.zIndex="1000",document.body.appendChild(F)},_e=U=>{F&&(F.style.left=U.touches[0].clientX+"px",F.style.top=U.touches[0].clientY+"px")},Qe=U=>{F&&(document.body.removeChild(F),F=null);let Y=U.srcElement.dataset.nodeType;Y||(Y=U.srcElement.children[0].dataset.nodeType);const ue=ee[Y],he=Wg(),te=JSON.parse(JSON.stringify(I[Y].props.templateData));te.description=e(`components.nodes.${ue}.${Y}.description`),Object.keys(te.template).forEach(Vi=>{te.template[Vi].display_name=e(`components.nodes.${ue}.${Y}.${Vi}`)});const $e=j.value.getBoundingClientRect(),{x:ot,y:vt,zoom:bn}=ne.value;let on=0,Pt=0;U.type=="touchend"?(on=U.changedTouches[0].clientX-$e.left,Pt=U.changedTouches[0].clientY-$e.top):(on=U.clientX-$e.left,Pt=U.clientY-$e.top);const hr={id:he,type:Y,category:ue,position:{x:(on-ot)/bn,y:(Pt-vt)/bn},data:te};T.value.push(hr)},q=Object.assign({"/src/components/nodes/assistedNodes/CommentNode.vue":n$,"/src/components/nodes/controlFlows/Conditional.vue":m$,"/src/components/nodes/controlFlows/Empty.vue":v$,"/src/components/nodes/controlFlows/JsonProcess.vue":O$,"/src/components/nodes/controlFlows/RandomChoice.vue":_$,"/src/components/nodes/fileProcessing/FileLoader.vue":x$,"/src/components/nodes/imageGeneration/StableDiffusion.vue":k$,"/src/components/nodes/llms/ChatGLM.vue":P$,"/src/components/nodes/llms/OpenAI.vue":M$,"/src/components/nodes/outputs/Document.vue":D$,"/src/components/nodes/outputs/Echarts.vue":R$,"/src/components/nodes/outputs/Email.vue":N$,"/src/components/nodes/outputs/Mermaid.vue":V$,"/src/components/nodes/outputs/Mindmap.vue":W$,"/src/components/nodes/outputs/Text.vue":z$,"/src/components/nodes/outputs/WorkflowInvokeOutput.vue":U$,"/src/components/nodes/textProcessing/ListRender.vue":H$,"/src/components/nodes/textProcessing/MarkdownToHtml.vue":Z$,"/src/components/nodes/textProcessing/TemplateCompose.vue":tE,"/src/components/nodes/textProcessing/TextInOut.vue":iE,"/src/components/nodes/textProcessing/TextSplitters.vue":rE,"/src/components/nodes/textProcessing/TextTruncation.vue":lE,"/src/components/nodes/tools/ImageSearch.vue":uE,"/src/components/nodes/tools/ProgrammingFunction.vue":Mq,"/src/components/nodes/tools/WorkflowInvoke.vue":Rq,"/src/components/nodes/triggers/ButtonTrigger.vue":Nq,"/src/components/nodes/vectorDb/AddData.vue":Vq,"/src/components/nodes/vectorDb/DeleteData.vue":Wq,"/src/components/nodes/vectorDb/Search.vue":zq,"/src/components/nodes/webCrawlers/BilibiliCrawler.vue":Uq,"/src/components/nodes/webCrawlers/TextCrawler.vue":jq,"/src/components/nodes/webCrawlers/YoutubeCrawler.vue":Hq}),I={},ie={},ee={};Object.entries(q).forEach(([U,Y])=>{const ue=U.match(/\/([^/]+)\.vue$/)[1];I[ue]=Ki(Y.default);const he=U.match(/\/([^/]+)\/[^/]+\.vue$/)[1];ie[he]||(ie[he]=[]),ie[he].push(ue),ee[ue]=he});const re=Mt({open:!1,code:"",openEditor:async()=>{let U=R();U.ui=_.value.data.ui||{},re.code=JSON.stringify(U,null,2),re.open=!0},updateCode:U=>{const Y=JSON.parse(U);_.value.data.ui=Y.ui||{},T.value=[...Y.nodes,...Y.edges],_.value.data.nodes=Y.nodes,_.value.data.edges=Y.edges,_.value.data.nodes.forEach(ue=>{ue.category=="vectorDb"&&(ue.data.template.database.options=u.value.filter(he=>he.status=="VALID").map(he=>({value:he.vid,label:he.name})))}),y.value=zs(_.value)}});return(U,Y)=>{const ue=C("a-spin"),he=C("a-typography-text"),te=C("a-button"),$e=C("a-modal"),ot=C("a-typography-link"),vt=C("a-col"),bn=C("a-segmented"),on=C("Caution"),Pt=C("a-typography-paragraph"),hr=C("a-space"),Vi=C("a-row"),fr=C("a-divider"),Gw=C("a-menu-item"),Zw=C("a-sub-menu"),Kw=C("a-menu"),Jw=C("a-layout-sider"),e_=C("a-layout-content"),qf=C("a-layout");return n.value?(E(),le("div",xB,[p(ue,{size:"large"})])):(E(),le("div",SB,[Re("div",kB,[p(Vi,{type:"flex",align:"middle",justify:"space-between",gutter:[16,16],style:{width:"100%"}},{default:g(()=>[p(vt,{flex:"0 0"},{default:g(()=>[p(ot,{onClick:A,style:{"text-wrap":"nowrap"}},{default:g(()=>[p(O(d_)),pe(" "+de(O(e)("common.back"))+" ",1),p($e,{open:H.value,"onUpdate:open":Y[0]||(Y[0]=Ue=>H.value=Ue)},{title:g(()=>[p(he,{type:"warning"},{default:g(()=>[p(O(h_)),pe(" "+de(O(e)("common.back")),1)]),_:1})]),footer:g(()=>[p(te,{onClick:S},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.exit_without_save")),1)]),_:1}),p(te,{type:"primary",onClick:L},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.save_and_exit")),1)]),_:1})]),default:g(()=>[pe(" "+de(O(e)("workspace.workflowEditor.exit_not_saved_confirm"))+" ",1)]),_:1},8,["open"])]),_:1})]),_:1}),p(vt,{flex:"0 0"},{default:g(()=>[p(he,{class:"title",editable:{triggerType:["text","icon"]},content:_.value.title,"onUpdate:content":Y[1]||(Y[1]=Ue=>_.value.title=Ue)},null,8,["content"])]),_:1}),p(vt,{flex:"1 0",style:{display:"flex","justify-content":"center"}},{default:g(()=>[p(bn,{value:s.value,"onUpdate:value":Y[2]||(Y[2]=Ue=>s.value=Ue),options:l,onChange:k},null,8,["value","options"])]),_:1}),p(vt,{flex:"0 0",style:{display:"flex","justify-content":"end"}},{default:g(()=>[p(hr,null,{default:g(()=>[p(te,{onClick:re.openEditor},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.edit_code"))+" ",1),p(rw,{language:"json",open:re.open,"onUpdate:open":Y[3]||(Y[3]=Ue=>re.open=Ue),code:re.code,"onUpdate:code":Y[4]||(Y[4]=Ue=>re.code=Ue),onSave:re.updateCode},null,8,["open","code","onSave"])]),_:1},8,["onClick"]),p(te,{type:"primary",onClick:D,loading:Q.value},{default:g(()=>[pe(de(O(e)("common.save")),1)]),_:1},8,["loading"]),p($e,{open:x.value,"onUpdate:open":Y[5]||(Y[5]=Ue=>x.value=Ue),footer:null},{title:g(()=>[p(he,{type:"warning"},{default:g(()=>[p(on),pe(" "+de(O(e)("workspace.workflowEditor.workflow_check_warning")),1)]),_:1})]),default:g(()=>[$.value.hasInput?ye("",!0):(E(),K(Pt,{key:0,type:"danger"},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.workflow_has_no_inputs")),1)]),_:1})),$.value.hasOutput?ye("",!0):(E(),K(Pt,{key:1,type:"danger"},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.workflow_has_no_outputs")),1)]),_:1})),$.value.hasTrigger?ye("",!0):(E(),K(Pt,{key:2,type:"danger"},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.workflow_has_no_triggers")),1)]),_:1})),$.value.noCycle?ye("",!0):(E(),K(Pt,{key:3,type:"danger"},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.workflow_has_cycles")),1)]),_:1})),$.value.noIsolatedNodes?ye("",!0):(E(),K(Pt,{key:4,type:"danger"},{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.workflow_has_isolated_nodes")),1)]),_:1}))]),_:1},8,["open"])]),_:1})]),_:1})]),_:1})]),la(Re("div",null,[p(Vi,{justify:"center"},{default:g(()=>[p(vt,{lg:10,md:12,sm:18,xs:24},{default:g(()=>[p(fr,null,{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.tags")),1)]),_:1}),p(yV,{modelValue:_.value.tags,"onUpdate:modelValue":Y[6]||(Y[6]=Ue=>_.value.tags=Ue)},null,8,["modelValue"]),p(fr,null,{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.brief_info")),1)]),_:1}),p(b_,{modelValue:_.value.brief,"onUpdate:modelValue":Y[7]||(Y[7]=Ue=>_.value.brief=Ue)},null,8,["modelValue"]),p(fr,null,{default:g(()=>[pe(de(O(e)("workspace.workflowEditor.brief_images")),1)]),_:1}),Re("div",null,[p(Pv,{modelValue:_.value.images,"onUpdate:modelValue":Y[8]||(Y[8]=Ue=>_.value.images=Ue),multiple:!0},null,8,["modelValue"])])]),_:1})]),_:1})],512),[[aa,s.value==O(e)("workspace.workflowEditor.workflow_info")]]),la(p(qf,{"has-sider":"",style:{height:"100%"}},{default:g(()=>[p(Jw,{style:{overflow:"auto",backgroundColor:"#fff"},class:"custom-scrollbar"},{default:g(()=>[p(Kw,{theme:"light",mode:"inline"},{default:g(()=>[(E(!0),le(Te,null,Je(Object.keys(ie),(Ue,t_)=>(E(),K(Zw,{key:`category-${t_}`},{title:g(()=>[pe(de(O(e)(`components.nodes.${Ue}.title`)),1)]),default:g(()=>[(E(!0),le(Te,null,Je(ie[Ue],(Ls,n_)=>(E(),K(Gw,{"data-node-type":Ls,id:Ls,draggable:"true",onTouchstart:se,onTouchmove:_e,onDragend:Qe,onTouchend:Qe,key:`node-${n_}`},{default:g(()=>[Re("span",{"data-node-type":Ls},de(O(e)(`components.nodes.${Ue}.${Ls}.title`)),9,TB)]),_:2},1032,["data-node-type","id"]))),128))]),_:2},1024))),128))]),_:1})]),_:1}),p(qf,null,{default:g(()=>[p(e_,{style:{margin:"24px 16px 0",overflow:"initial"}},{default:g(()=>[p(O(ZT),{modelValue:T.value,"onUpdate:modelValue":Y[10]||(Y[10]=Ue=>T.value=Ue),"node-types":I,edgesUpdatable:!0,onEdgeUpdate:X,onEdgeDoubleClick:G,"snap-to-grid":!0,"snap-grid":[20,20]},{default:g(()=>[p(O(AI)),p(O(vV)),p(O(BI),{variant:O(fn).Dots},null,8,["variant"]),p(bB,{modelValue:O(h),"onUpdate:modelValue":Y[9]||(Y[9]=Ue=>xs(h)?h.value=Ue:null),onSave:b},null,8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},512),[[aa,s.value==O(e)("workspace.workflowEditor.workflow_canvas")]]),s.value==O(e)("workspace.workflowEditor.workflow_ui_design")?(E(),K(wB,{key:0,modelValue:_.value,"onUpdate:modelValue":Y[11]||(Y[11]=Ue=>_.value=Ue)},null,8,["modelValue"])):ye("",!0)]))}}},LB=lr(PB,[["__scopeId","data-v-80e20e23"]]);export{LB as default}; diff --git a/backend/web/assets/WorkflowRunRecordsDrawer-55188329.js b/backend/web/assets/WorkflowRunRecordsDrawer-31cf6fb4.js similarity index 92% rename from backend/web/assets/WorkflowRunRecordsDrawer-55188329.js rename to backend/web/assets/WorkflowRunRecordsDrawer-31cf6fb4.js index 0ab4f6f0..2a57c63a 100644 --- a/backend/web/assets/WorkflowRunRecordsDrawer-55188329.js +++ b/backend/web/assets/WorkflowRunRecordsDrawer-31cf6fb4.js @@ -1 +1 @@ -import{c as o,A as O,U as Y,r as k,m as Z,b as K,aq as z,a2 as N,P as v,o as d,e as w,x as m,R as f,H as p,u as c,F as h,I as x,K as e1,am as t1}from"./index-51905ea3.js";var r1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM340 683v77c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-77c-10.1 3.3-20.8 5-32 5s-21.9-1.8-32-5zm64-198V264c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v221c10.1-3.3 20.8-5 32-5s21.9 1.8 32 5zm-64 198c10.1 3.3 20.8 5 32 5s21.9-1.8 32-5c41.8-13.5 72-52.7 72-99s-30.2-85.5-72-99c-10.1-3.3-20.8-5-32-5s-21.9 1.8-32 5c-41.8 13.5-72 52.7-72 99s30.2 85.5 72 99zm.1-115.7c.3-.6.7-1.2 1-1.8v-.1l1.2-1.8c.1-.2.2-.3.3-.5.3-.5.7-.9 1-1.4.1-.1.2-.3.3-.4.5-.6.9-1.1 1.4-1.6l.3-.3 1.2-1.2.4-.4c.5-.5 1-.9 1.6-1.4.6-.5 1.1-.9 1.7-1.3.2-.1.3-.2.5-.3.5-.3.9-.7 1.4-1 .1-.1.3-.2.4-.3.6-.4 1.2-.7 1.9-1.1.1-.1.3-.1.4-.2.5-.3 1-.5 1.6-.8l.6-.3c.7-.3 1.3-.6 2-.8.7-.3 1.4-.5 2.1-.7.2-.1.4-.1.6-.2.6-.2 1.1-.3 1.7-.4.2 0 .3-.1.5-.1.7-.2 1.5-.3 2.2-.4.2 0 .3 0 .5-.1.6-.1 1.2-.1 1.8-.2h.6c.8 0 1.5-.1 2.3-.1s1.5 0 2.3.1h.6c.6 0 1.2.1 1.8.2.2 0 .3 0 .5.1.7.1 1.5.2 2.2.4.2 0 .3.1.5.1.6.1 1.2.3 1.7.4.2.1.4.1.6.2.7.2 1.4.4 2.1.7.7.2 1.3.5 2 .8l.6.3c.5.2 1.1.5 1.6.8.1.1.3.1.4.2.6.3 1.3.7 1.9 1.1.1.1.3.2.4.3.5.3 1 .6 1.4 1 .2.1.3.2.5.3.6.4 1.2.9 1.7 1.3s1.1.9 1.6 1.4l.4.4 1.2 1.2.3.3c.5.5 1 1.1 1.4 1.6.1.1.2.3.3.4.4.4.7.9 1 1.4.1.2.2.3.3.5l1.2 1.8s0 .1.1.1a36.18 36.18 0 015.1 18.5c0 6-1.5 11.7-4.1 16.7-.3.6-.7 1.2-1 1.8 0 0 0 .1-.1.1l-1.2 1.8c-.1.2-.2.3-.3.5-.3.5-.7.9-1 1.4-.1.1-.2.3-.3.4-.5.6-.9 1.1-1.4 1.6l-.3.3-1.2 1.2-.4.4c-.5.5-1 .9-1.6 1.4-.6.5-1.1.9-1.7 1.3-.2.1-.3.2-.5.3-.5.3-.9.7-1.4 1-.1.1-.3.2-.4.3-.6.4-1.2.7-1.9 1.1-.1.1-.3.1-.4.2-.5.3-1 .5-1.6.8l-.6.3c-.7.3-1.3.6-2 .8-.7.3-1.4.5-2.1.7-.2.1-.4.1-.6.2-.6.2-1.1.3-1.7.4-.2 0-.3.1-.5.1-.7.2-1.5.3-2.2.4-.2 0-.3 0-.5.1-.6.1-1.2.1-1.8.2h-.6c-.8 0-1.5.1-2.3.1s-1.5 0-2.3-.1h-.6c-.6 0-1.2-.1-1.8-.2-.2 0-.3 0-.5-.1-.7-.1-1.5-.2-2.2-.4-.2 0-.3-.1-.5-.1-.6-.1-1.2-.3-1.7-.4-.2-.1-.4-.1-.6-.2-.7-.2-1.4-.4-2.1-.7-.7-.2-1.3-.5-2-.8l-.6-.3c-.5-.2-1.1-.5-1.6-.8-.1-.1-.3-.1-.4-.2-.6-.3-1.3-.7-1.9-1.1-.1-.1-.3-.2-.4-.3-.5-.3-1-.6-1.4-1-.2-.1-.3-.2-.5-.3-.6-.4-1.2-.9-1.7-1.3s-1.1-.9-1.6-1.4l-.4-.4-1.2-1.2-.3-.3c-.5-.5-1-1.1-1.4-1.6-.1-.1-.2-.3-.3-.4-.4-.4-.7-.9-1-1.4-.1-.2-.2-.3-.3-.5l-1.2-1.8v-.1c-.4-.6-.7-1.2-1-1.8-2.6-5-4.1-10.7-4.1-16.7s1.5-11.7 4.1-16.7zM620 539v221c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V539c-10.1 3.3-20.8 5-32 5s-21.9-1.8-32-5zm64-198v-77c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v77c10.1-3.3 20.8-5 32-5s21.9 1.8 32 5zm-64 198c10.1 3.3 20.8 5 32 5s21.9-1.8 32-5c41.8-13.5 72-52.7 72-99s-30.2-85.5-72-99c-10.1-3.3-20.8-5-32-5s-21.9 1.8-32 5c-41.8 13.5-72 52.7-72 99s30.2 85.5 72 99zm.1-115.7c.3-.6.7-1.2 1-1.8v-.1l1.2-1.8c.1-.2.2-.3.3-.5.3-.5.7-.9 1-1.4.1-.1.2-.3.3-.4.5-.6.9-1.1 1.4-1.6l.3-.3 1.2-1.2.4-.4c.5-.5 1-.9 1.6-1.4.6-.5 1.1-.9 1.7-1.3.2-.1.3-.2.5-.3.5-.3.9-.7 1.4-1 .1-.1.3-.2.4-.3.6-.4 1.2-.7 1.9-1.1.1-.1.3-.1.4-.2.5-.3 1-.5 1.6-.8l.6-.3c.7-.3 1.3-.6 2-.8.7-.3 1.4-.5 2.1-.7.2-.1.4-.1.6-.2.6-.2 1.1-.3 1.7-.4.2 0 .3-.1.5-.1.7-.2 1.5-.3 2.2-.4.2 0 .3 0 .5-.1.6-.1 1.2-.1 1.8-.2h.6c.8 0 1.5-.1 2.3-.1s1.5 0 2.3.1h.6c.6 0 1.2.1 1.8.2.2 0 .3 0 .5.1.7.1 1.5.2 2.2.4.2 0 .3.1.5.1.6.1 1.2.3 1.7.4.2.1.4.1.6.2.7.2 1.4.4 2.1.7.7.2 1.3.5 2 .8l.6.3c.5.2 1.1.5 1.6.8.1.1.3.1.4.2.6.3 1.3.7 1.9 1.1.1.1.3.2.4.3.5.3 1 .6 1.4 1 .2.1.3.2.5.3.6.4 1.2.9 1.7 1.3s1.1.9 1.6 1.4l.4.4 1.2 1.2.3.3c.5.5 1 1.1 1.4 1.6.1.1.2.3.3.4.4.4.7.9 1 1.4.1.2.2.3.3.5l1.2 1.8v.1a36.18 36.18 0 015.1 18.5c0 6-1.5 11.7-4.1 16.7-.3.6-.7 1.2-1 1.8v.1l-1.2 1.8c-.1.2-.2.3-.3.5-.3.5-.7.9-1 1.4-.1.1-.2.3-.3.4-.5.6-.9 1.1-1.4 1.6l-.3.3-1.2 1.2-.4.4c-.5.5-1 .9-1.6 1.4-.6.5-1.1.9-1.7 1.3-.2.1-.3.2-.5.3-.5.3-.9.7-1.4 1-.1.1-.3.2-.4.3-.6.4-1.2.7-1.9 1.1-.1.1-.3.1-.4.2-.5.3-1 .5-1.6.8l-.6.3c-.7.3-1.3.6-2 .8-.7.3-1.4.5-2.1.7-.2.1-.4.1-.6.2-.6.2-1.1.3-1.7.4-.2 0-.3.1-.5.1-.7.2-1.5.3-2.2.4-.2 0-.3 0-.5.1-.6.1-1.2.1-1.8.2h-.6c-.8 0-1.5.1-2.3.1s-1.5 0-2.3-.1h-.6c-.6 0-1.2-.1-1.8-.2-.2 0-.3 0-.5-.1-.7-.1-1.5-.2-2.2-.4-.2 0-.3-.1-.5-.1-.6-.1-1.2-.3-1.7-.4-.2-.1-.4-.1-.6-.2-.7-.2-1.4-.4-2.1-.7-.7-.2-1.3-.5-2-.8l-.6-.3c-.5-.2-1.1-.5-1.6-.8-.1-.1-.3-.1-.4-.2-.6-.3-1.3-.7-1.9-1.1-.1-.1-.3-.2-.4-.3-.5-.3-1-.6-1.4-1-.2-.1-.3-.2-.5-.3-.6-.4-1.2-.9-1.7-1.3s-1.1-.9-1.6-1.4l-.4-.4-1.2-1.2-.3-.3c-.5-.5-1-1.1-1.4-1.6-.1-.1-.2-.3-.3-.4-.4-.4-.7-.9-1-1.4-.1-.2-.2-.3-.3-.5l-1.2-1.8v-.1c-.4-.6-.7-1.2-1-1.8-2.6-5-4.1-10.7-4.1-16.7s1.5-11.7 4.1-16.7z"}}]},name:"control",theme:"outlined"};const n1=r1;function T(n){for(var e=1;e{_.value=!0,await l.load({}),a.value=!1},A=()=>{_.value=!1},B=[{text:r("components.workspace.workflowRunRecordsDrawer.status_not_started"),value:"NOT_STARTED"},{text:r("components.workspace.workflowRunRecordsDrawer.status_queued"),value:"QUEUED"},{text:r("components.workspace.workflowRunRecordsDrawer.status_running"),value:"RUNNING"},{text:r("components.workspace.workflowRunRecordsDrawer.status_finished"),value:"FINISHED"},{text:r("components.workspace.workflowRunRecordsDrawer.status_failed"),value:"FAILED"}],C=k([{title:r("components.workspace.workflowRunRecordsDrawer.start_time"),key:"start_time",dataIndex:"start_time",sorter:!0,sortDirections:["descend","ascend"],width:"156px"},{title:r("components.workspace.workflowRunRecordsDrawer.end_time"),key:"end_time",dataIndex:"end_time",sorter:!0,sortDirections:["descend","ascend"],width:"156px"},{title:r("components.workspace.workflowRunRecordsDrawer.status"),key:"status",dataIndex:"status",filters:B,width:"150px"},{title:r("common.action"),key:"action",width:"100px"}]);t.showWorkflowTitle&&C.value.splice(0,0,{title:r("components.workspace.workflowRunRecordsDrawer.workflow_title"),key:"workflow_title",dataIndex:"workflow_title"});const l=Z({data:[],loading:!1,current:1,pageSize:10,total:0,pagination:K(()=>({total:l.total,current:l.current,pageSize:l.pageSize})),handleTableChange:(g,i,s)=>{l.load({page_size:g.pageSize,page:g.current,sort_field:s.field,sort_order:s.order,status:i.status})},load:async g=>{l.loading=!0;const i=await z("list",{wid:t.workflowId,...g});i.status==200?l.data=i.data.records.map(s=>(s.start_time=s.start_time?new Date(s.start_time).toLocaleString():"-",s.end_time=s.end_time?new Date(s.end_time).toLocaleString():"-",s)):N.error(i.msg),l.total=i.data.total,l.pageSize=i.data.page_size,l.current=i.data.page,l.loading=!1}}),U=async(g,i)=>{if(a.value=!0,t.openType=="detail"){const s=await z("get",{rid:g});s.status==200?(e("open-record",s.data),_.value=!1):N.error(s.msg)}else e("open-record",{rid:g,wid:i.wid}),_.value=!1;a.value=!1};return(g,i)=>{const s=v("a-button"),q=v("a-tag"),L=v("a-typography-link"),W=v("a-table"),G=v("a-col"),Q=v("a-row"),J=v("a-spin"),X=v("a-drawer");return d(),w(h,null,[o(s,{type:t.buttonType,onClick:M},{default:m(()=>[f(p(c(r)("components.workspace.workflowRunRecordsDrawer.workflows_run_records")),1)]),_:1},8,["type"]),o(X,{title:c(r)("components.workspace.workflowRunRecordsDrawer.my_workflows_run_records"),width:c(I),open:_.value,onClose:A},{default:m(()=>[o(J,{spinning:a.value},{default:m(()=>[o(Q,{justify:"space-between",align:"middle"},{default:m(()=>[o(G,{span:24},{default:m(()=>[o(W,{loading:l.loading,columns:C.value,customRow:l.customRow,"data-source":l.data,pagination:l.pagination,onChange:l.handleTableChange},{headerCell:m(({column:u})=>[u.key==="workflow_title"?(d(),w(h,{key:0},[o(c(g1)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.workflow_title")),1)],64)):u.key==="start_time"?(d(),w(h,{key:1},[o(c(j)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.start_time")),1)],64)):u.key==="end_time"?(d(),w(h,{key:2},[o(c(j)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.end_time")),1)],64)):u.key==="status"?(d(),w(h,{key:3},[o(c(f1)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.status")),1)],64)):u.key==="used_credits"?(d(),w(h,{key:4},[o(c(y1)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.used_credits")),1)],64)):u.key==="action"?(d(),w(h,{key:5},[o(c(o1)),f(" "+p(c(r)("common.action")),1)],64)):x("",!0)]),bodyCell:m(({column:u,record:y})=>[u.key==="workflow_title"?(d(),w(h,{key:0},[f(p(y.workflow.title),1)],64)):u.key==="status"?(d(),e1(q,{key:1,color:E[y.status]},{default:m(()=>[f(p(c(r)(`components.workspace.workflowRunRecordsDrawer.status_${y.status.toLowerCase()}`)),1)]),_:2},1032,["color"])):u.key==="action"?(d(),w("div",O1,[o(L,{onClick:t1(k1=>U(y.rid,y.workflow),["prevent"])},{default:m(()=>[f(p(c(r)("components.workspace.workflowRunRecordsDrawer.check_record")),1)]),_:2},1032,["onClick"])])):x("",!0)]),_:1},8,["loading","columns","customRow","data-source","pagination","onChange"])]),_:1})]),_:1})]),_:1},8,["spinning"])]),_:1},8,["title","width","open"])],64)}}};export{o1 as C,j as F,R1 as _}; +import{c as o,A as y,U as Y,r as O,m as Z,b as K,aq as z,a4 as N,P as v,o as d,e as w,x as m,R as f,H as p,u as c,F as h,I as x,K as e1,ak as t1}from"./index-ef7aa48c.js";var r1={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM340 683v77c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-77c-10.1 3.3-20.8 5-32 5s-21.9-1.8-32-5zm64-198V264c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v221c10.1-3.3 20.8-5 32-5s21.9 1.8 32 5zm-64 198c10.1 3.3 20.8 5 32 5s21.9-1.8 32-5c41.8-13.5 72-52.7 72-99s-30.2-85.5-72-99c-10.1-3.3-20.8-5-32-5s-21.9 1.8-32 5c-41.8 13.5-72 52.7-72 99s30.2 85.5 72 99zm.1-115.7c.3-.6.7-1.2 1-1.8v-.1l1.2-1.8c.1-.2.2-.3.3-.5.3-.5.7-.9 1-1.4.1-.1.2-.3.3-.4.5-.6.9-1.1 1.4-1.6l.3-.3 1.2-1.2.4-.4c.5-.5 1-.9 1.6-1.4.6-.5 1.1-.9 1.7-1.3.2-.1.3-.2.5-.3.5-.3.9-.7 1.4-1 .1-.1.3-.2.4-.3.6-.4 1.2-.7 1.9-1.1.1-.1.3-.1.4-.2.5-.3 1-.5 1.6-.8l.6-.3c.7-.3 1.3-.6 2-.8.7-.3 1.4-.5 2.1-.7.2-.1.4-.1.6-.2.6-.2 1.1-.3 1.7-.4.2 0 .3-.1.5-.1.7-.2 1.5-.3 2.2-.4.2 0 .3 0 .5-.1.6-.1 1.2-.1 1.8-.2h.6c.8 0 1.5-.1 2.3-.1s1.5 0 2.3.1h.6c.6 0 1.2.1 1.8.2.2 0 .3 0 .5.1.7.1 1.5.2 2.2.4.2 0 .3.1.5.1.6.1 1.2.3 1.7.4.2.1.4.1.6.2.7.2 1.4.4 2.1.7.7.2 1.3.5 2 .8l.6.3c.5.2 1.1.5 1.6.8.1.1.3.1.4.2.6.3 1.3.7 1.9 1.1.1.1.3.2.4.3.5.3 1 .6 1.4 1 .2.1.3.2.5.3.6.4 1.2.9 1.7 1.3s1.1.9 1.6 1.4l.4.4 1.2 1.2.3.3c.5.5 1 1.1 1.4 1.6.1.1.2.3.3.4.4.4.7.9 1 1.4.1.2.2.3.3.5l1.2 1.8s0 .1.1.1a36.18 36.18 0 015.1 18.5c0 6-1.5 11.7-4.1 16.7-.3.6-.7 1.2-1 1.8 0 0 0 .1-.1.1l-1.2 1.8c-.1.2-.2.3-.3.5-.3.5-.7.9-1 1.4-.1.1-.2.3-.3.4-.5.6-.9 1.1-1.4 1.6l-.3.3-1.2 1.2-.4.4c-.5.5-1 .9-1.6 1.4-.6.5-1.1.9-1.7 1.3-.2.1-.3.2-.5.3-.5.3-.9.7-1.4 1-.1.1-.3.2-.4.3-.6.4-1.2.7-1.9 1.1-.1.1-.3.1-.4.2-.5.3-1 .5-1.6.8l-.6.3c-.7.3-1.3.6-2 .8-.7.3-1.4.5-2.1.7-.2.1-.4.1-.6.2-.6.2-1.1.3-1.7.4-.2 0-.3.1-.5.1-.7.2-1.5.3-2.2.4-.2 0-.3 0-.5.1-.6.1-1.2.1-1.8.2h-.6c-.8 0-1.5.1-2.3.1s-1.5 0-2.3-.1h-.6c-.6 0-1.2-.1-1.8-.2-.2 0-.3 0-.5-.1-.7-.1-1.5-.2-2.2-.4-.2 0-.3-.1-.5-.1-.6-.1-1.2-.3-1.7-.4-.2-.1-.4-.1-.6-.2-.7-.2-1.4-.4-2.1-.7-.7-.2-1.3-.5-2-.8l-.6-.3c-.5-.2-1.1-.5-1.6-.8-.1-.1-.3-.1-.4-.2-.6-.3-1.3-.7-1.9-1.1-.1-.1-.3-.2-.4-.3-.5-.3-1-.6-1.4-1-.2-.1-.3-.2-.5-.3-.6-.4-1.2-.9-1.7-1.3s-1.1-.9-1.6-1.4l-.4-.4-1.2-1.2-.3-.3c-.5-.5-1-1.1-1.4-1.6-.1-.1-.2-.3-.3-.4-.4-.4-.7-.9-1-1.4-.1-.2-.2-.3-.3-.5l-1.2-1.8v-.1c-.4-.6-.7-1.2-1-1.8-2.6-5-4.1-10.7-4.1-16.7s1.5-11.7 4.1-16.7zM620 539v221c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V539c-10.1 3.3-20.8 5-32 5s-21.9-1.8-32-5zm64-198v-77c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v77c10.1-3.3 20.8-5 32-5s21.9 1.8 32 5zm-64 198c10.1 3.3 20.8 5 32 5s21.9-1.8 32-5c41.8-13.5 72-52.7 72-99s-30.2-85.5-72-99c-10.1-3.3-20.8-5-32-5s-21.9 1.8-32 5c-41.8 13.5-72 52.7-72 99s30.2 85.5 72 99zm.1-115.7c.3-.6.7-1.2 1-1.8v-.1l1.2-1.8c.1-.2.2-.3.3-.5.3-.5.7-.9 1-1.4.1-.1.2-.3.3-.4.5-.6.9-1.1 1.4-1.6l.3-.3 1.2-1.2.4-.4c.5-.5 1-.9 1.6-1.4.6-.5 1.1-.9 1.7-1.3.2-.1.3-.2.5-.3.5-.3.9-.7 1.4-1 .1-.1.3-.2.4-.3.6-.4 1.2-.7 1.9-1.1.1-.1.3-.1.4-.2.5-.3 1-.5 1.6-.8l.6-.3c.7-.3 1.3-.6 2-.8.7-.3 1.4-.5 2.1-.7.2-.1.4-.1.6-.2.6-.2 1.1-.3 1.7-.4.2 0 .3-.1.5-.1.7-.2 1.5-.3 2.2-.4.2 0 .3 0 .5-.1.6-.1 1.2-.1 1.8-.2h.6c.8 0 1.5-.1 2.3-.1s1.5 0 2.3.1h.6c.6 0 1.2.1 1.8.2.2 0 .3 0 .5.1.7.1 1.5.2 2.2.4.2 0 .3.1.5.1.6.1 1.2.3 1.7.4.2.1.4.1.6.2.7.2 1.4.4 2.1.7.7.2 1.3.5 2 .8l.6.3c.5.2 1.1.5 1.6.8.1.1.3.1.4.2.6.3 1.3.7 1.9 1.1.1.1.3.2.4.3.5.3 1 .6 1.4 1 .2.1.3.2.5.3.6.4 1.2.9 1.7 1.3s1.1.9 1.6 1.4l.4.4 1.2 1.2.3.3c.5.5 1 1.1 1.4 1.6.1.1.2.3.3.4.4.4.7.9 1 1.4.1.2.2.3.3.5l1.2 1.8v.1a36.18 36.18 0 015.1 18.5c0 6-1.5 11.7-4.1 16.7-.3.6-.7 1.2-1 1.8v.1l-1.2 1.8c-.1.2-.2.3-.3.5-.3.5-.7.9-1 1.4-.1.1-.2.3-.3.4-.5.6-.9 1.1-1.4 1.6l-.3.3-1.2 1.2-.4.4c-.5.5-1 .9-1.6 1.4-.6.5-1.1.9-1.7 1.3-.2.1-.3.2-.5.3-.5.3-.9.7-1.4 1-.1.1-.3.2-.4.3-.6.4-1.2.7-1.9 1.1-.1.1-.3.1-.4.2-.5.3-1 .5-1.6.8l-.6.3c-.7.3-1.3.6-2 .8-.7.3-1.4.5-2.1.7-.2.1-.4.1-.6.2-.6.2-1.1.3-1.7.4-.2 0-.3.1-.5.1-.7.2-1.5.3-2.2.4-.2 0-.3 0-.5.1-.6.1-1.2.1-1.8.2h-.6c-.8 0-1.5.1-2.3.1s-1.5 0-2.3-.1h-.6c-.6 0-1.2-.1-1.8-.2-.2 0-.3 0-.5-.1-.7-.1-1.5-.2-2.2-.4-.2 0-.3-.1-.5-.1-.6-.1-1.2-.3-1.7-.4-.2-.1-.4-.1-.6-.2-.7-.2-1.4-.4-2.1-.7-.7-.2-1.3-.5-2-.8l-.6-.3c-.5-.2-1.1-.5-1.6-.8-.1-.1-.3-.1-.4-.2-.6-.3-1.3-.7-1.9-1.1-.1-.1-.3-.2-.4-.3-.5-.3-1-.6-1.4-1-.2-.1-.3-.2-.5-.3-.6-.4-1.2-.9-1.7-1.3s-1.1-.9-1.6-1.4l-.4-.4-1.2-1.2-.3-.3c-.5-.5-1-1.1-1.4-1.6-.1-.1-.2-.3-.3-.4-.4-.4-.7-.9-1-1.4-.1-.2-.2-.3-.3-.5l-1.2-1.8v-.1c-.4-.6-.7-1.2-1-1.8-2.6-5-4.1-10.7-4.1-16.7s1.5-11.7 4.1-16.7z"}}]},name:"control",theme:"outlined"};const n1=r1;function T(n){for(var e=1;e{_.value=!0,await l.load({}),a.value=!1},A=()=>{_.value=!1},B=[{text:r("components.workspace.workflowRunRecordsDrawer.status_not_started"),value:"NOT_STARTED"},{text:r("components.workspace.workflowRunRecordsDrawer.status_queued"),value:"QUEUED"},{text:r("components.workspace.workflowRunRecordsDrawer.status_running"),value:"RUNNING"},{text:r("components.workspace.workflowRunRecordsDrawer.status_finished"),value:"FINISHED"},{text:r("components.workspace.workflowRunRecordsDrawer.status_failed"),value:"FAILED"}],C=O([{title:r("components.workspace.workflowRunRecordsDrawer.start_time"),key:"start_time",dataIndex:"start_time",sorter:!0,sortDirections:["descend","ascend"],width:"156px"},{title:r("components.workspace.workflowRunRecordsDrawer.end_time"),key:"end_time",dataIndex:"end_time",sorter:!0,sortDirections:["descend","ascend"],width:"156px"},{title:r("components.workspace.workflowRunRecordsDrawer.status"),key:"status",dataIndex:"status",filters:B,width:"150px"},{title:r("common.action"),key:"action",width:"100px"}]);t.showWorkflowTitle&&C.value.splice(0,0,{title:r("components.workspace.workflowRunRecordsDrawer.workflow_title"),key:"workflow_title",dataIndex:"workflow_title"});const l=Z({data:[],loading:!1,current:1,pageSize:10,total:0,pagination:K(()=>({total:l.total,current:l.current,pageSize:l.pageSize})),handleTableChange:(g,i,s)=>{l.load({page_size:g.pageSize,page:g.current,sort_field:s.field,sort_order:s.order,status:i.status})},load:async g=>{l.loading=!0;const i=await z("list",{wid:t.workflowId,...g});i.status==200?l.data=i.data.records.map(s=>(s.start_time=s.start_time?new Date(s.start_time).toLocaleString():"-",s.end_time=s.end_time?new Date(s.end_time).toLocaleString():"-",s)):N.error(i.msg),l.total=i.data.total,l.pageSize=i.data.page_size,l.current=i.data.page,l.loading=!1}}),U=async(g,i)=>{if(a.value=!0,t.openType=="detail"){const s=await z("get",{rid:g});s.status==200?(e("open-record",s.data),_.value=!1):N.error(s.msg)}else e("open-record",{rid:g,wid:i.wid}),_.value=!1;a.value=!1};return(g,i)=>{const s=v("a-button"),q=v("a-tag"),L=v("a-typography-link"),W=v("a-table"),G=v("a-col"),Q=v("a-row"),J=v("a-spin"),X=v("a-drawer");return d(),w(h,null,[o(s,{type:t.buttonType,onClick:M},{default:m(()=>[f(p(c(r)("components.workspace.workflowRunRecordsDrawer.workflows_run_records")),1)]),_:1},8,["type"]),o(X,{title:c(r)("components.workspace.workflowRunRecordsDrawer.my_workflows_run_records"),width:c(I),open:_.value,onClose:A},{default:m(()=>[o(J,{spinning:a.value},{default:m(()=>[o(Q,{justify:"space-between",align:"middle"},{default:m(()=>[o(G,{span:24},{default:m(()=>[o(W,{loading:l.loading,columns:C.value,customRow:l.customRow,"data-source":l.data,pagination:l.pagination,onChange:l.handleTableChange},{headerCell:m(({column:u})=>[u.key==="workflow_title"?(d(),w(h,{key:0},[o(c(g1)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.workflow_title")),1)],64)):u.key==="start_time"?(d(),w(h,{key:1},[o(c(j)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.start_time")),1)],64)):u.key==="end_time"?(d(),w(h,{key:2},[o(c(j)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.end_time")),1)],64)):u.key==="status"?(d(),w(h,{key:3},[o(c(f1)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.status")),1)],64)):u.key==="used_credits"?(d(),w(h,{key:4},[o(c(k1)),f(" "+p(c(r)("components.workspace.workflowRunRecordsDrawer.used_credits")),1)],64)):u.key==="action"?(d(),w(h,{key:5},[o(c(o1)),f(" "+p(c(r)("common.action")),1)],64)):x("",!0)]),bodyCell:m(({column:u,record:k})=>[u.key==="workflow_title"?(d(),w(h,{key:0},[f(p(k.workflow.title),1)],64)):u.key==="status"?(d(),e1(q,{key:1,color:E[k.status]},{default:m(()=>[f(p(c(r)(`components.workspace.workflowRunRecordsDrawer.status_${k.status.toLowerCase()}`)),1)]),_:2},1032,["color"])):u.key==="action"?(d(),w("div",y1,[o(L,{onClick:t1(O1=>U(k.rid,k.workflow),["prevent"])},{default:m(()=>[f(p(c(r)("components.workspace.workflowRunRecordsDrawer.check_record")),1)]),_:2},1032,["onClick"])])):x("",!0)]),_:1},8,["loading","columns","customRow","data-source","pagination","onChange"])]),_:1})]),_:1})]),_:1},8,["spinning"])]),_:1},8,["title","width","open"])],64)}}};export{o1 as C,j as F,R1 as _}; diff --git a/backend/web/assets/WorkflowSpace-0fcbdd01.js b/backend/web/assets/WorkflowSpace-0fcbdd01.js deleted file mode 100644 index 398e3258..00000000 --- a/backend/web/assets/WorkflowSpace-0fcbdd01.js +++ /dev/null @@ -1 +0,0 @@ -import{c as t,A as R,U as z,r as d,ac as F,$ as W,ab as T,a9 as E,aa as G,w as q,P as s,o as i,e as I,x as a,K as p,u as f,R as k,H as y,G as J,F as Q,y as X,a1 as Y,a2 as Z,M as ee}from"./index-51905ea3.js";import{U as te,_ as oe}from"./NewWorkflowModal-1c07a1e7.js";import{_ as ae}from"./_plugin-vue_export-helper-c27b6911.js";import"./AddOne-dbc3bffb.js";import"./index-fb7c1fe5.js";var ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"};const se=ne;function V(r){for(var e=1;e{v.value=m.params.workflowId,w.value=[m.params.workflowId]});const w=d([v.value]),O=d(["user-workflows"]),L=d(1),x=d(),M=()=>{x.value.showModal()},P=async m=>{const l=await Y("create",{title:e("workspace.workflowSpace.new_workflow")+L.value,language:_.value});if(l.status!=200){Z.error(l.msg);return}const n=l.data;n.update_time=new Date(n.update_time).toLocaleString(),n.create_time=new Date(n.create_time).toLocaleString(),S.addUserWorkflow(n),ee(()=>{w.value=[n.wid],K.push(`/workflow/${n.wid}`)})};return(m,l)=>{const n=s("a-skeleton"),H=s("router-link"),g=s("a-menu-item"),$=s("a-tooltip"),A=s("a-sub-menu"),B=s("a-menu"),N=s("a-layout-sider"),j=s("router-view"),C=s("a-layout-content"),D=s("a-layout");return i(),I("div",ce,[t(D,{class:"layout"},{default:a(()=>[t(N,{width:"200",style:{background:"#fff"},breakpoint:"lg","collapsed-width":"0"},{default:a(()=>[o.value?(i(),p(n,{key:0,active:""})):(i(),p(B,{key:1,selectedKeys:w.value,"onUpdate:selectedKeys":l[0]||(l[0]=c=>w.value=c),openKeys:O.value,"onUpdate:openKeys":l[1]||(l[1]=c=>O.value=c),mode:"inline",style:{height:"100%"}},{default:a(()=>[t(g,{key:"my_index"},{default:a(()=>[t(H,{to:"/workflow/"},{default:a(()=>[t(f(le)),k(" "+y(f(e)("workspace.workflowSpace.workflow_index")),1)]),_:1})]),_:1}),t(A,{key:"user-workflows"},{title:a(()=>[J("span",null,[t(f(te)),k(" "+y(f(e)("workspace.workflowSpace.user_fast_access_workflows")),1)])]),default:a(()=>[(i(!0),I(Q,null,X(f(U),c=>(i(),p(g,{key:c.wid},{default:a(()=>[t($,{placement:"topLeft",title:c.title},{default:a(()=>[t(H,{to:`/workflow/${c.wid}`},{default:a(()=>[k(y(c.title),1)]),_:2},1032,["to"])]),_:2},1032,["title"])]),_:2},1024))),128)),t(g,{key:"add",onClick:M},{default:a(()=>[k(" + "+y(f(e)("workspace.workflowSpace.add_new_workflow")),1)]),_:1}),t(oe,{ref_key:"newWorkflowModal",ref:x,onCreate:P},null,512)]),_:1})]),_:1},8,["selectedKeys","openKeys"]))]),_:1}),t(C,{style:{padding:"0 24px",minHeight:"280px"}},{default:a(()=>[o.value?(i(),p(n,{key:0,active:""})):(i(),p(j,{key:v.value}))]),_:1})]),_:1})])}}},we=ae(ue,[["__scopeId","data-v-4edfc794"]]);export{we as default}; diff --git a/backend/web/assets/WorkflowSpace-659ac1dd.css b/backend/web/assets/WorkflowSpace-659ac1dd.css deleted file mode 100644 index b8e2f627..00000000 --- a/backend/web/assets/WorkflowSpace-659ac1dd.css +++ /dev/null @@ -1 +0,0 @@ -.space-container[data-v-4edfc794]{height:calc(100vh - 64px)}.space-container .layout[data-v-4edfc794]{height:100%;padding:24px 0;background:#fff} diff --git a/backend/web/assets/WorkflowSpace-859f20d4.js b/backend/web/assets/WorkflowSpace-859f20d4.js new file mode 100644 index 00000000..db6c6629 --- /dev/null +++ b/backend/web/assets/WorkflowSpace-859f20d4.js @@ -0,0 +1 @@ +import{c as a,A as $,U as z,r as d,ab as C,a1 as H,aa as F,a8 as M,a9 as T,w as E,P as s,o as i,e as I,x as o,K as p,u as f,R as k,H as y,G,F as q,y as J,a3 as Q,a4 as X,M as Y}from"./index-ef7aa48c.js";import{U as Z}from"./NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js";import{_ as ee}from"./_plugin-vue_export-helper-c27b6911.js";var te={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"};const oe=te;function V(r){for(var e=1;e{v.value=m.params.workflowId,w.value=[m.params.workflowId]});const w=d([v.value]),O=d(["user-workflows"]),K=d(1);d();const L=async m=>{const l=await Q("create",{title:e("workspace.workflowSpace.new_workflow")+K.value,language:_.value});if(l.status!=200){X.error(l.msg);return}const n=l.data;n.update_time=new Date(n.update_time).toLocaleString(),n.create_time=new Date(n.create_time).toLocaleString(),S.addUserWorkflow(n),Y(()=>{w.value=[n.wid],W.push(`/workflow/editor/${n.wid}`)})};return(m,l)=>{const n=s("a-skeleton"),x=s("router-link"),g=s("a-menu-item"),P=s("a-tooltip"),A=s("a-sub-menu"),B=s("a-menu"),j=s("a-layout-sider"),D=s("router-view"),N=s("a-layout-content"),R=s("a-layout");return i(),I("div",se,[a(R,{class:"layout"},{default:o(()=>[a(j,{width:"200",style:{background:"#fff"},breakpoint:"lg","collapsed-width":"0"},{default:o(()=>[t.value?(i(),p(n,{key:0,active:""})):(i(),p(B,{key:1,selectedKeys:w.value,"onUpdate:selectedKeys":l[0]||(l[0]=c=>w.value=c),openKeys:O.value,"onUpdate:openKeys":l[1]||(l[1]=c=>O.value=c),mode:"inline",style:{height:"100%"}},{default:o(()=>[a(g,{key:"my_index"},{default:o(()=>[a(x,{to:"/workflow/"},{default:o(()=>[a(f(ne)),k(" "+y(f(e)("workspace.workflowSpace.workflow_index")),1)]),_:1})]),_:1}),a(A,{key:"user-workflows"},{title:o(()=>[G("span",null,[a(f(Z)),k(" "+y(f(e)("workspace.workflowSpace.user_fast_access_workflows")),1)])]),default:o(()=>[(i(!0),I(q,null,J(f(U),c=>(i(),p(g,{key:c.wid},{default:o(()=>[a(P,{placement:"topLeft",title:c.title},{default:o(()=>[a(x,{to:`/workflow/${c.wid}`},{default:o(()=>[k(y(c.title),1)]),_:2},1032,["to"])]),_:2},1032,["title"])]),_:2},1024))),128)),a(g,{key:"add",onClick:L},{default:o(()=>[k(" + "+y(f(e)("workspace.workflowSpace.add_new_workflow")),1)]),_:1})]),_:1})]),_:1},8,["selectedKeys","openKeys"]))]),_:1}),a(N,{style:{padding:"0 24px",minHeight:"280px"}},{default:o(()=>[t.value?(i(),p(n,{key:0,active:""})):(i(),p(D,{key:v.value}))]),_:1})]),_:1})])}}},ie=ee(re,[["__scopeId","data-v-bfed40eb"]]);export{ie as default}; diff --git a/backend/web/assets/WorkflowSpace-fb9ee385.css b/backend/web/assets/WorkflowSpace-fb9ee385.css new file mode 100644 index 00000000..0093b2c7 --- /dev/null +++ b/backend/web/assets/WorkflowSpace-fb9ee385.css @@ -0,0 +1 @@ +.space-container[data-v-bfed40eb]{height:calc(100vh - 64px)}.space-container .layout[data-v-bfed40eb]{height:100%;padding:24px 0;background:#fff} diff --git a/backend/web/assets/WorkflowSpaceMain-5fe037a4.js b/backend/web/assets/WorkflowSpaceMain-5fe037a4.js deleted file mode 100644 index af1fb9ca..00000000 --- a/backend/web/assets/WorkflowSpaceMain-5fe037a4.js +++ /dev/null @@ -1 +0,0 @@ -import{c as t,A as J,U as Q,ac as Z,$ as E,r as O,m as K,P as i,o as _,K as b,x as o,u as c,R as m,H as g,ai as Se,aj as Oe,L as Me,ak as xe,aa as we,ab as We,D as me,a0 as Te,b as X,a1 as B,a2 as T,e as v,W as $e,F as $,I as Y,a7 as ge,ae as Ce,al as ze,y as H,am as Pe,an as q,M as ce,ao as ie,a5 as Re,G,a8 as Ae,a9 as je,ap as Le}from"./index-51905ea3.js";import{_ as ue}from"./QuestionPopover-c8fa17cc.js";import{_ as Ve}from"./MarkdownEditor-38e43a8d.js";import{_ as Be,U as De}from"./NewWorkflowModal-1c07a1e7.js";import{_ as Ue,F as Ie,C as Fe}from"./WorkflowRunRecordsDrawer-55188329.js";import{_ as ee}from"./_plugin-vue_export-helper-c27b6911.js";import"./AddOne-dbc3bffb.js";import"./index-fb7c1fe5.js";var He={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Ne=He;function de(r){for(var e=1;e{x.value=S,s.title=k,s.brief=R,M.value=!0}});const w=O(!1),y=O(),n=()=>{s.title="",s.brief="",s.share_to_community=!1},P=async()=>{try{await y.value.validate(),w.value=!0;const S=await Se("create",{wid:x.value,language:p.value,...s});if(S.status==200){const k=`https://vectorvein.com/workspace/workflow/template/${S.data.tid}`;Oe.success({title:a("components.workspace.shareWorkflowModal.share_success"),content:()=>Me(xe,{href:k,copyable:!0},[k])})}else message.error(S.msg);w.value=!1,M.value=!1}catch(S){w.value=!1,console.log("error",S)}};return(S,k)=>{const R=i("a-input"),L=i("a-form-item"),D=i("a-checkbox"),U=i("a-form"),I=i("a-modal");return _(),b(I,{open:M.value,"onUpdate:open":k[3]||(k[3]=l=>M.value=l),title:c(a)("components.workspace.shareWorkflowModal.share_workflow"),onOk:P,confirmLoading:w.value,onCancel:n},{default:o(()=>[t(U,{ref_key:"formRef",ref:y,model:s},{default:o(()=>[t(L,{rules:[{required:!0}],label:c(a)("components.workspace.shareWorkflowModal.title"),name:"title"},{default:o(()=>[t(R,{value:s.title,"onUpdate:value":k[0]||(k[0]=l=>s.title=l)},null,8,["value"])]),_:1},8,["label"]),t(L,{rules:[{required:!0,min:10,message:c(a)("components.workspace.shareWorkflowModal.brief_min_require",{count:10})}],name:"brief"},{label:o(()=>[m(g(c(a)("components.workspace.shareWorkflowModal.brief"))+" ",1),t(ue,{contents:[c(a)("components.workspace.shareWorkflowModal.brief_hint1"),c(a)("components.workspace.shareWorkflowModal.brief_hint2")]},null,8,["contents"])]),default:o(()=>[(_(),b(Ve,{markdown:s.brief,"onUpdate:markdown":k[1]||(k[1]=l=>s.brief=l),key:x.value},null,8,["markdown"]))]),_:1},8,["rules"]),t(L,{name:"share_to_community"},{label:o(()=>[m(g(c(a)("components.workspace.shareWorkflowModal.share_to_community"))+" ",1),t(ue,{contents:[c(a)("components.workspace.shareWorkflowModal.share_to_community_brief")]},null,8,["contents"])]),default:o(()=>[t(D,{checked:s.share_to_community,"onUpdate:checked":k[2]||(k[2]=l=>s.share_to_community=l)},null,8,["checked"])]),_:1})]),_:1},8,["model"])]),_:1},8,["open","title","confirmLoading"])}}};const rt={key:0,class:"space-container"},lt={key:2,class:"action-container"},ct={__name:"MyWorkflows",setup(r){const{t:e}=Q(),a=O(!0),u=O(!1),p=we(),M=Z(),{language:x}=E(M),s=We(),{userWorkflows:W,userWorkflowsTotal:w}=E(s),y=O([]);me(async()=>{const[l,d]=await Promise.all([n.load({}),Te("list",{})]);d.status==200&&(y.value=d.data),a.value=!1});const n=K({columns:[{name:e("workspace.workflowSpaceMain.workflow_title"),dataIndex:"title",key:"title"},{title:e("workspace.workflowSpaceMain.tags"),key:"tags",dataIndex:"tags",filters:X(()=>y.value.map(l=>({text:l.title,value:l.tid}))),width:"300px"},{title:e("workspace.workflowSpaceMain.update_time"),key:"update_time",dataIndex:"update_time",sorter:!0,sortDirections:["descend","ascend"],width:"200px"},{title:e("common.action"),key:"action",width:"300px"}],data:W.value,loading:!1,current:1,pageSize:10,total:w.value,pagination:X(()=>({total:n.total,current:n.current,pageSize:n.pageSize})),selectTag:"all",selectTagChange:async()=>{n.loading=!0,await n.load({tags:[n.selectTag]}),n.loading=!1},searching:!1,searchText:"",hoverRowWid:null,customRow:l=>({style:{cursor:"pointer"},onClick:d=>{(d.target.classList.contains("ant-table-cell")||d.target.classList.contains("workflow-title"))&&p.push(`/workflow/${l.wid}`)},onMouseenter:d=>{n.hoverRowWid=l.wid},onMouseleave:d=>{n.hoverRowWid=null}}),searchWorkflows:async()=>{n.loading=!0,n.searching=!0,await n.load({search_text:n.searchText}),n.searching=!1,n.loading=!1},clearSearch:async()=>{n.loading=!0,n.searching=!0,n.searchText="",await n.load({}),n.searching=!1,n.loading=!1},handleTableChange:(l,d,f)=>{n.load({page_size:l.pageSize,page:l.current,sort_field:f.field,sort_order:f.order,tags:d.tags})},load:async l=>{n.loading=!0;const d=await B("list",l);d.status==200?n.data=d.data.workflows.map(f=>(f.create_time=new Date(f.create_time).toLocaleString(),f.update_time=new Date(f.update_time).toLocaleString(),f)):T.error(d.msg),n.total=d.data.total,n.pageSize=d.data.page_size,n.current=d.data.page,n.loading=!1}}),P=async l=>{(await B("delete",{wid:l})).status==200?(T.success(e("workspace.workflowSpace.delete_success")),s.deleteUserWorkflow(l),n.load({})):T.error(e("workspace.workflowSpace.delete_failed"))},S=async l=>{(await B("add_to_fast_access",{wid:l})).status==200?(T.success(e("workspace.workflowSpace.add_to_fast_access_success")),q(s,!0),n.data=n.data.map(f=>(f.wid==l&&(f.is_fast_access=!0),f))):T.error(e("workspace.workflowSpace.add_to_fast_access_failed"))},k=async l=>{(await B("delete_from_fast_access",{wid:l})).status==200?(T.success(e("workspace.workflowSpace.delete_from_fast_access_success")),q(s,!0),n.data=n.data.map(f=>(f.wid==l&&(f.is_fast_access=!1),f))):T.error(e("workspace.workflowSpace.delete_from_fast_access_failed"))},R=O(),L=O(),D=async l=>{a.value=!0;const d=await B("create",{title:e("workspace.workflowSpace.new_workflow"),language:x.value});if(d.status!=200){T.error(d.msg);return}const f=d.data;q(s,!0),ce(async()=>{await p.push(`/workflow/editor/${f.wid}`)})},U=async l=>{a.value=!0;const d=await B("get",{wid:l});if(d.status!=200){T.error(e("workspace.workflowSpace.clone_failed"));return}const f=await B("create",{...d.data,title:d.data.title+" "+e("workspace.workflowSpace.clone_workflow")});if(f.status!=200){T.error(f.data.msg);return}const F=f.data;q(s,!0),ce(async()=>{await p.push(`/workflow/${F.wid}`)})},I=async l=>{await p.push(`/workflow/${l.wid}?rid=${l.rid}`)};return(l,d)=>{const f=i("a-skeleton"),F=i("a-input-search"),h=i("a-button"),C=i("a-space"),A=i("a-col"),se=i("a-row"),re=i("a-divider"),ke=i("a-typography-text"),N=i("a-typography-link"),le=i("a-tooltip"),he=i("a-tag"),ye=i("a-popconfirm"),ve=i("a-table"),be=i("a-spin");return a.value?(_(),v("div",rt,[t(f,{active:""})])):(_(),b(be,{key:1,spinning:u.value,class:"space-container"},{default:o(()=>[t(se,{justify:"space-between",align:"middle",gutter:[16,16]},{default:o(()=>[t(A,{span:24},{default:o(()=>[t(se,{type:"flex",align:"middle",justify:"space-between"},{default:o(()=>[t(A,{flex:"auto"},{default:o(()=>[t(C,null,{default:o(()=>[t(F,{value:n.searchText,"onUpdate:value":d[0]||(d[0]=z=>n.searchText=z),placeholder:c(e)("workspace.workflowSpaceMain.input_search_text"),"enter-button":"",onSearch:n.searchWorkflows,class:"search-input"},null,8,["value","placeholder","onSearch"]),t(h,{onClick:n.clearSearch},{default:o(()=>[m(g(c(e)("workspace.workflowSpaceMain.reset_search")),1)]),_:1},8,["onClick"])]),_:1})]),_:1}),t(A,{flex:"auto",style:{display:"flex","justify-content":"end"}},{default:o(()=>[t(C,null,{default:o(()=>[t(h,{type:"primary",onClick:D},{default:o(()=>[t(c($e)),m(" "+g(c(e)("workspace.workflowSpaceMain.create_workflow")),1)]),_:1}),t(Be,{ref_key:"newWorkflowModal",ref:L,onCreate:D},null,512),t(Ue,{buttonType:"default",openType:"simple",showWorkflowTitle:!0,onOpenRecord:I})]),_:1})]),_:1})]),_:1})]),_:1}),t(re),t(A,{span:24},{default:o(()=>[t(ve,{loading:n.loading,columns:n.columns,customRow:n.customRow,"data-source":n.data,pagination:n.pagination,onChange:n.handleTableChange},{headerCell:o(({column:z})=>[z.key==="title"?(_(),v($,{key:0},[t(c(Xe)),m(" "+g(c(e)("workspace.workflowSpaceMain.workflow_title")),1)],64)):z.key==="tags"?(_(),v($,{key:1},[t(c(nt)),m(" "+g(c(e)("workspace.workflowSpaceMain.tags")),1)],64)):z.key==="update_time"?(_(),v($,{key:2},[t(c(Ie)),m(" "+g(c(e)("workspace.workflowSpaceMain.update_time")),1)],64)):z.key==="action"?(_(),v($,{key:3},[t(c(Fe)),m(" "+g(c(e)("common.action")),1)],64)):Y("",!0)]),bodyCell:o(({column:z,record:j})=>[z.key==="title"?(_(),b(C,{key:0},{default:o(()=>[t(ke,{class:"workflow-title"},{default:o(()=>[m(g(j.title),1)]),_:2},1024),j.is_fast_access?(_(),b(le,{key:1,title:c(e)("workspace.workflowSpace.delete_from_fast_access")},{default:o(()=>[t(N,{onClick:V=>k(j.wid)},{default:o(()=>[t(c(ze))]),_:2},1032,["onClick"])]),_:2},1032,["title"])):(_(),b(le,{key:0,title:c(e)("workspace.workflowSpace.add_to_fast_access")},{default:o(()=>[t(N,{onClick:V=>S(j.wid)},{default:o(()=>[ge(t(c(et),null,null,512),[[Ce,n.hoverRowWid==j.wid]])]),_:2},1032,["onClick"])]),_:2},1032,["title"]))]),_:2},1024)):z.key==="tags"?(_(),b(C,{key:1},{default:o(()=>[(_(!0),v($,null,H(j.tags,V=>(_(),b(he,{color:V.color,key:V.tid},{default:o(()=>[m(g(V.title),1)]),_:2},1032,["color"]))),128))]),_:2},1024)):z.key==="action"?(_(),v("div",lt,[t(N,{onClick:Pe(V=>U(j.wid),["prevent"])},{default:o(()=>[m(g(c(e)("workspace.workflowSpace.clone_workflow")),1)]),_:2},1032,["onClick"]),t(re,{type:"vertical"}),t(ye,{title:c(e)("workspace.workflowSpace.delete_confirm"),onConfirm:V=>P(j.wid)},{default:o(()=>[t(N,{type:"danger"},{default:o(()=>[m(g(c(e)("workspace.workflowSpace.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])])):Y("",!0)]),_:1},8,["loading","columns","customRow","data-source","pagination","onChange"]),t(st,{ref_key:"shareWorkflowModalRef",ref:R},null,512)]),_:1})]),_:1})]),_:1},8,["spinning"]))}}},it=ee(ct,[["__scopeId","data-v-1c18b54c"]]);const ut={key:0},dt={class:"template-card-title-container"},pt=["src"],_t={__name:"WorkflowTemplatesMarket",setup(r){const{t:e}=Q(),a=O(!0),u=we(),p=Z(),{language:M}=E(p),x=O([]);me(async()=>{a.value=!1;const[W,w]=await Promise.all([s.load({is_official:!0}),ie("list_tags",{})]);w.status==200&&(x.value=w.data),a.value=!1});const s=K({data:[],loading:!0,current:1,pageSize:100,total:0,pagination:X(()=>({total:s.total,current:s.current,pageSize:s.pageSize})),selectTag:"all",selectTagChange:async()=>{s.loading=!0,await s.load({tags:[s.selectTag],is_official:!0}),s.loading=!1},hoverRowWid:null,handleTableChange:(W,w,y)=>{s.load({page_size:W.pageSize,page:W.current,sort_field:y.field,sort_order:y.order,tags:w.tags})},load:async W=>{s.loading=!0;const w=await ie("list_templates",{client:"PC",...W});w.status==200?s.data=w.data.templates.map(y=>(y.create_time=new Date(y.create_time).toLocaleString(),y.update_time=new Date(y.update_time).toLocaleString(),y)):T.error(w.msg),s.total=w.data.total,s.pageSize=w.data.page_size,s.current=w.data.page,s.loading=!1}});return(W,w)=>{const y=i("a-skeleton"),n=i("a-typography-title"),P=i("a-col"),S=i("a-row"),k=i("a-typography-text"),R=i("a-radio-button"),L=i("a-radio-group"),D=i("a-space"),U=i("a-divider"),I=i("a-tag"),l=i("a-carousel"),d=i("a-card"),f=i("a-spin"),F=Re("highlight");return _(),v($,null,[a.value?(_(),v("div",ut,[t(y,{active:""})])):(_(),b(S,{key:1,align:"middle",gutter:[16,16]},{default:o(()=>[t(P,{span:24},{default:o(()=>[t(S,{type:"flex",align:"middle",justify:"space-between"},{default:o(()=>[t(P,{flex:"auto"},{default:o(()=>[t(n,{title:3},{default:o(()=>[m(g(c(e)("workspace.workflowSpaceMain.official_workflow_template")),1)]),_:1})]),_:1})]),_:1})]),_:1}),t(P,{span:24},{default:o(()=>[t(D,null,{default:o(()=>[t(k,null,{default:o(()=>[m(g(c(e)("workspace.workflowTemplate.workflow_template_tags")),1)]),_:1}),t(L,{value:s.selectTag,"onUpdate:value":w[0]||(w[0]=h=>s.selectTag=h),"button-style":"solid",onChange:s.selectTagChange},{default:o(()=>[t(R,{value:"all"},{default:o(()=>[m(g(c(e)("common.all")),1)]),_:1}),(_(!0),v($,null,H(x.value,h=>(_(),v($,{key:h.tid},[c(M)==h.language?(_(),b(R,{key:0,value:h.tid},{default:o(()=>[m(g(h.title),1)]),_:2},1032,["value"])):Y("",!0)],64))),128))]),_:1},8,["value","onChange"])]),_:1})]),_:1}),t(U),t(P,{span:24},{default:o(()=>[t(f,{spinning:s.loading},{default:o(()=>[t(S,{gutter:[16,16]},{default:o(()=>[(_(!0),v($,null,H(s.data,h=>(_(),b(P,{lg:6,md:8,sm:12,xs:24,key:h.tid,onClick:C=>c(u).push(`/workflow/template/${h.tid}`)},{default:o(()=>[t(d,{class:"template-card",hoverable:""},{title:o(()=>[G("div",dt,[t(n,{level:4},{default:o(()=>[m(g(h.title),1)]),_:2},1024),(_(!0),v($,null,H(h.tags,(C,A)=>(_(),b(I,{key:A,color:C.color},{default:o(()=>[m(g(C.title),1)]),_:2},1032,["color"]))),128))])]),default:o(()=>[h.images.length>0?(_(),b(l,{key:0,autoplay:"",arrows:""},{default:o(()=>[(_(!0),v($,null,H(h.images,(C,A)=>(_(),v("div",{key:A},[G("img",{src:C,class:"card-image"},null,8,pt)]))),128))]),_:2},1024)):ge((_(),b(c(Ae),{key:1,source:h.brief,class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"])),[[F]])]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["spinning"])]),_:1})]),_:1})),t(U)],64)}}},ft=ee(_t,[["__scopeId","data-v-de40d531"]]);const wt={__name:"WorkflowSpaceMain",setup(r){const{t:e}=Q(),a=je(),u=O(a.query.tab?a.query.tab:"my-workflows"),p=M=>{window.history.pushState(null,"",Le(a.path,{tab:M}))};return(M,x)=>{const s=i("a-tab-pane"),W=i("a-tabs");return _(),b(W,{activeKey:u.value,"onUpdate:activeKey":x[0]||(x[0]=w=>u.value=w),onChange:p},{default:o(()=>[t(s,{key:"my-workflows"},{tab:o(()=>[G("span",null,[t(c(De)),m(" "+g(c(e)("workspace.workflowSpaceMain.my_workflows")),1)])]),default:o(()=>[t(it)]),_:1}),t(s,{key:"official-workflow-templates"},{tab:o(()=>[G("span",null,[t(c(Ee)),m(" "+g(c(e)("workspace.workflowSpaceMain.official_workflow_template")),1)])]),default:o(()=>[t(ft)]),_:1})]),_:1},8,["activeKey"])}}},Ot=ee(wt,[["__scopeId","data-v-52e25006"]]);export{Ot as default}; diff --git a/backend/web/assets/WorkflowSpaceMain-90b977ed.css b/backend/web/assets/WorkflowSpaceMain-a9d4ce5d.css similarity index 91% rename from backend/web/assets/WorkflowSpaceMain-90b977ed.css rename to backend/web/assets/WorkflowSpaceMain-a9d4ce5d.css index 59bd9b07..299b7e04 100644 --- a/backend/web/assets/WorkflowSpaceMain-90b977ed.css +++ b/backend/web/assets/WorkflowSpaceMain-a9d4ce5d.css @@ -1 +1 @@ -.search-input[data-v-1c18b54c]{min-width:300px;max-width:500px}.template-card{height:335px}.template-card .template-card-title-container{margin-top:10px;margin-bottom:10px}.template-card .ant-card-body{height:250px}.template-card .ant-card-body .markdown-body{height:100%;overflow-y:scroll}.card-image[data-v-de40d531]{width:100%;height:202px;object-fit:cover}.space-container[data-v-52e25006]{height:calc(100vh - 64px)} +.search-input[data-v-1c18b54c]{min-width:300px;max-width:500px}.template-card{height:335px}.template-card .template-card-title-container{margin-top:10px;margin-bottom:10px}.template-card .ant-card-body{height:250px}.template-card .ant-card-body .markdown-body{height:100%;overflow-y:scroll}.card-image[data-v-de40d531]{width:100%;height:202px;object-fit:cover}.space-container[data-v-4b53fd36]{height:calc(100vh - 64px)} diff --git a/backend/web/assets/WorkflowSpaceMain-deef18a5.js b/backend/web/assets/WorkflowSpaceMain-deef18a5.js new file mode 100644 index 00000000..2daaf83a --- /dev/null +++ b/backend/web/assets/WorkflowSpaceMain-deef18a5.js @@ -0,0 +1 @@ +import{c as t,A as J,U as q,r as x,P as c,o as _,K as S,x as o,G as N,u as l,R as m,H as g,ab as Z,a1 as Y,m as K,ag as Se,ah as Oe,L as Me,ai as xe,a9 as ee,aa as We,D as me,a2 as Te,b as Q,a3 as B,a4 as $,e as O,Y as $e,F as C,I as X,V as ge,W as Ce,aj as ze,y as H,ak as Pe,al as G,M as ie,am as ue,an as Ae,ao as Re,a8 as je,ap as Le}from"./index-ef7aa48c.js";import{_ as de}from"./QuestionPopover-3baee3b6.js";import{A as Ve,_ as Be}from"./MarkdownEditor-de9455d7.js";import{U as De}from"./NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js";import{_ as Ue,F as Ie,C as Fe}from"./WorkflowRunRecordsDrawer-31cf6fb4.js";import{_ as te}from"./_plugin-vue_export-helper-c27b6911.js";import"./index-ace83a9e.js";var He={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Ne=He;function pe(r){for(var e=1;e{u.value=!0},M=s=>{u.value=!1,a("create",{id:s})};return e({showModal:W}),(s,y)=>{const f=c("a-typography-text"),k=c("a-card"),n=c("a-col"),T=c("a-row"),b=c("a-modal");return _(),S(b,{open:u.value,"onUpdate:open":y[1]||(y[1]=h=>u.value=h),width:"50vw",title:l(d)("components.workspace.newWorkflowModal.create_new_workflow"),footer:null},{default:o(()=>[t(T,{gutter:[16,16]},{default:o(()=>[t(n,{xs:24,md:12,lg:6},{default:o(()=>[t(k,{class:"template-card-small",hoverable:"",style:{width:"240px"},onClick:y[0]||(y[0]=h=>M("empty"))},{default:o(()=>[N("div",st,[t(f,{class:"text-primary"},{default:o(()=>[t(l(Ve),{style:{"font-size":"100px"}})]),_:1}),t(f,null,{default:o(()=>[m(g(l(d)("components.workspace.newWorkflowModal.empty_workflow")),1)]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["open","title"])}}},lt={__name:"ShareWorkflowModal",setup(r,{expose:e}){const{t:a}=q(),d=Z(),{language:u}=Y(d),W=x(!1),M=x(),s=K({title:"",brief:"",share_to_community:!1});e({showModal:({wid:b,title:h,brief:A})=>{M.value=b,s.title=h,s.brief=A,W.value=!0}});const f=x(!1),k=x(),n=()=>{s.title="",s.brief="",s.share_to_community=!1},T=async()=>{try{await k.value.validate(),f.value=!0;const b=await Se("create",{wid:M.value,language:u.value,...s});if(b.status==200){const h=`https://vectorvein.com/workspace/workflow/template/${b.data.tid}`;Oe.success({title:a("components.workspace.shareWorkflowModal.share_success"),content:()=>Me(xe,{href:h,copyable:!0},[h])})}else message.error(b.msg);f.value=!1,W.value=!1}catch(b){f.value=!1,console.log("error",b)}};return(b,h)=>{const A=c("a-input"),L=c("a-form-item"),D=c("a-checkbox"),U=c("a-form"),I=c("a-modal");return _(),S(I,{open:W.value,"onUpdate:open":h[3]||(h[3]=i=>W.value=i),title:l(a)("components.workspace.shareWorkflowModal.share_workflow"),onOk:T,confirmLoading:f.value,onCancel:n},{default:o(()=>[t(U,{ref_key:"formRef",ref:k,model:s},{default:o(()=>[t(L,{rules:[{required:!0}],label:l(a)("components.workspace.shareWorkflowModal.title"),name:"title"},{default:o(()=>[t(A,{value:s.title,"onUpdate:value":h[0]||(h[0]=i=>s.title=i)},null,8,["value"])]),_:1},8,["label"]),t(L,{rules:[{required:!0,min:10,message:l(a)("components.workspace.shareWorkflowModal.brief_min_require",{count:10})}],name:"brief"},{label:o(()=>[m(g(l(a)("components.workspace.shareWorkflowModal.brief"))+" ",1),t(de,{contents:[l(a)("components.workspace.shareWorkflowModal.brief_hint1"),l(a)("components.workspace.shareWorkflowModal.brief_hint2")]},null,8,["contents"])]),default:o(()=>[(_(),S(Be,{markdown:s.brief,"onUpdate:markdown":h[1]||(h[1]=i=>s.brief=i),key:M.value},null,8,["markdown"]))]),_:1},8,["rules"]),t(L,{name:"share_to_community"},{label:o(()=>[m(g(l(a)("components.workspace.shareWorkflowModal.share_to_community"))+" ",1),t(de,{contents:[l(a)("components.workspace.shareWorkflowModal.share_to_community_brief")]},null,8,["contents"])]),default:o(()=>[t(D,{checked:s.share_to_community,"onUpdate:checked":h[2]||(h[2]=i=>s.share_to_community=i)},null,8,["checked"])]),_:1})]),_:1},8,["model"])]),_:1},8,["open","title","confirmLoading"])}}};const ct={key:0,class:"space-container"},it={key:2,class:"action-container"},ut={__name:"MyWorkflows",setup(r){const{t:e}=q(),a=x(!0),d=x(!1),u=ee(),W=Z(),{language:M}=Y(W),s=We(),{userWorkflows:y,userWorkflowsTotal:f}=Y(s),k=x([]);me(async()=>{const[i,p]=await Promise.all([n.load({}),Te("list",{})]);p.status==200&&(k.value=p.data),a.value=!1});const n=K({columns:[{name:e("workspace.workflowSpaceMain.workflow_title"),dataIndex:"title",key:"title"},{title:e("workspace.workflowSpaceMain.tags"),key:"tags",dataIndex:"tags",filters:Q(()=>k.value.map(i=>({text:i.title,value:i.tid}))),width:"300px"},{title:e("workspace.workflowSpaceMain.update_time"),key:"update_time",dataIndex:"update_time",sorter:!0,sortDirections:["descend","ascend"],width:"200px"},{title:e("common.action"),key:"action",width:"300px"}],data:y.value,loading:!1,current:1,pageSize:10,total:f.value,pagination:Q(()=>({total:n.total,current:n.current,pageSize:n.pageSize})),selectTag:"all",selectTagChange:async()=>{n.loading=!0,await n.load({tags:[n.selectTag]}),n.loading=!1},searching:!1,searchText:"",hoverRowWid:null,customRow:i=>({style:{cursor:"pointer"},onClick:p=>{(p.target.classList.contains("ant-table-cell")||p.target.classList.contains("workflow-title"))&&u.push(`/workflow/${i.wid}`)},onMouseenter:p=>{n.hoverRowWid=i.wid},onMouseleave:p=>{n.hoverRowWid=null}}),searchWorkflows:async()=>{n.loading=!0,n.searching=!0,await n.load({search_text:n.searchText}),n.searching=!1,n.loading=!1},clearSearch:async()=>{n.loading=!0,n.searching=!0,n.searchText="",await n.load({}),n.searching=!1,n.loading=!1},handleTableChange:(i,p,w)=>{n.load({page_size:i.pageSize,page:i.current,sort_field:w.field,sort_order:w.order,tags:p.tags})},load:async i=>{n.loading=!0;const p=await B("list",i);p.status==200?n.data=p.data.workflows.map(w=>(w.create_time=new Date(w.create_time).toLocaleString(),w.update_time=new Date(w.update_time).toLocaleString(),w)):$.error(p.msg),n.total=p.data.total,n.pageSize=p.data.page_size,n.current=p.data.page,n.loading=!1}}),T=async i=>{(await B("delete",{wid:i})).status==200?($.success(e("workspace.workflowSpace.delete_success")),s.deleteUserWorkflow(i),n.load({})):$.error(e("workspace.workflowSpace.delete_failed"))},b=async i=>{(await B("add_to_fast_access",{wid:i})).status==200?($.success(e("workspace.workflowSpace.add_to_fast_access_success")),G(s,!0),n.data=n.data.map(w=>(w.wid==i&&(w.is_fast_access=!0),w))):$.error(e("workspace.workflowSpace.add_to_fast_access_failed"))},h=async i=>{(await B("delete_from_fast_access",{wid:i})).status==200?($.success(e("workspace.workflowSpace.delete_from_fast_access_success")),G(s,!0),n.data=n.data.map(w=>(w.wid==i&&(w.is_fast_access=!1),w))):$.error(e("workspace.workflowSpace.delete_from_fast_access_failed"))},A=x(),L=x(),D=async i=>{a.value=!0;const p=await B("create",{title:e("workspace.workflowSpace.new_workflow"),language:M.value});if(p.status!=200){$.error(p.msg);return}const w=p.data;G(s,!0),ie(async()=>{await u.push(`/workflow/editor/${w.wid}`)})},U=async i=>{a.value=!0;const p=await B("get",{wid:i});if(p.status!=200){$.error(e("workspace.workflowSpace.clone_failed"));return}const w=await B("create",{...p.data,title:p.data.title+" "+e("workspace.workflowSpace.clone_workflow")});if(w.status!=200){$.error(w.data.msg);return}const F=w.data;G(s,!0),ie(async()=>{await u.push(`/workflow/${F.wid}`)})},I=async i=>{await u.push(`/workflow/${i.wid}?rid=${i.rid}`)};return(i,p)=>{const w=c("a-skeleton"),F=c("a-input-search"),v=c("a-button"),z=c("a-space"),R=c("a-col"),re=c("a-row"),le=c("a-divider"),ke=c("a-typography-text"),E=c("a-typography-link"),ce=c("a-tooltip"),he=c("a-tag"),ye=c("a-popconfirm"),ve=c("a-table"),be=c("a-spin");return a.value?(_(),O("div",ct,[t(w,{active:""})])):(_(),S(be,{key:1,spinning:d.value,class:"space-container"},{default:o(()=>[t(re,{justify:"space-between",align:"middle",gutter:[16,16]},{default:o(()=>[t(R,{span:24},{default:o(()=>[t(re,{type:"flex",align:"middle",justify:"space-between"},{default:o(()=>[t(R,{flex:"auto"},{default:o(()=>[t(z,null,{default:o(()=>[t(F,{value:n.searchText,"onUpdate:value":p[0]||(p[0]=P=>n.searchText=P),placeholder:l(e)("workspace.workflowSpaceMain.input_search_text"),"enter-button":"",onSearch:n.searchWorkflows,class:"search-input"},null,8,["value","placeholder","onSearch"]),t(v,{onClick:n.clearSearch},{default:o(()=>[m(g(l(e)("workspace.workflowSpaceMain.reset_search")),1)]),_:1},8,["onClick"])]),_:1})]),_:1}),t(R,{flex:"auto",style:{display:"flex","justify-content":"end"}},{default:o(()=>[t(z,null,{default:o(()=>[t(v,{type:"primary",onClick:D},{default:o(()=>[t(l($e)),m(" "+g(l(e)("workspace.workflowSpaceMain.create_workflow")),1)]),_:1}),t(rt,{ref_key:"newWorkflowModal",ref:L,onCreate:D},null,512),t(Ue,{buttonType:"default",openType:"simple",showWorkflowTitle:!0,onOpenRecord:I})]),_:1})]),_:1})]),_:1})]),_:1}),t(le),t(R,{span:24},{default:o(()=>[t(ve,{loading:n.loading,columns:n.columns,customRow:n.customRow,"data-source":n.data,pagination:n.pagination,onChange:n.handleTableChange},{headerCell:o(({column:P})=>[P.key==="title"?(_(),O(C,{key:0},[t(l(Qe)),m(" "+g(l(e)("workspace.workflowSpaceMain.workflow_title")),1)],64)):P.key==="tags"?(_(),O(C,{key:1},[t(l(nt)),m(" "+g(l(e)("workspace.workflowSpaceMain.tags")),1)],64)):P.key==="update_time"?(_(),O(C,{key:2},[t(l(Ie)),m(" "+g(l(e)("workspace.workflowSpaceMain.update_time")),1)],64)):P.key==="action"?(_(),O(C,{key:3},[t(l(Fe)),m(" "+g(l(e)("common.action")),1)],64)):X("",!0)]),bodyCell:o(({column:P,record:j})=>[P.key==="title"?(_(),S(z,{key:0},{default:o(()=>[t(ke,{class:"workflow-title"},{default:o(()=>[m(g(j.title),1)]),_:2},1024),j.is_fast_access?(_(),S(ce,{key:1,title:l(e)("workspace.workflowSpace.delete_from_fast_access")},{default:o(()=>[t(E,{onClick:V=>h(j.wid)},{default:o(()=>[t(l(ze))]),_:2},1032,["onClick"])]),_:2},1032,["title"])):(_(),S(ce,{key:0,title:l(e)("workspace.workflowSpace.add_to_fast_access")},{default:o(()=>[t(E,{onClick:V=>b(j.wid)},{default:o(()=>[ge(t(l(et),null,null,512),[[Ce,n.hoverRowWid==j.wid]])]),_:2},1032,["onClick"])]),_:2},1032,["title"]))]),_:2},1024)):P.key==="tags"?(_(),S(z,{key:1},{default:o(()=>[(_(!0),O(C,null,H(j.tags,V=>(_(),S(he,{color:V.color,key:V.tid},{default:o(()=>[m(g(V.title),1)]),_:2},1032,["color"]))),128))]),_:2},1024)):P.key==="action"?(_(),O("div",it,[t(E,{onClick:Pe(V=>U(j.wid),["prevent"])},{default:o(()=>[m(g(l(e)("workspace.workflowSpace.clone_workflow")),1)]),_:2},1032,["onClick"]),t(le,{type:"vertical"}),t(ye,{title:l(e)("workspace.workflowSpace.delete_confirm"),onConfirm:V=>T(j.wid)},{default:o(()=>[t(E,{type:"danger"},{default:o(()=>[m(g(l(e)("workspace.workflowSpace.delete")),1)]),_:1})]),_:2},1032,["title","onConfirm"])])):X("",!0)]),_:1},8,["loading","columns","customRow","data-source","pagination","onChange"]),t(lt,{ref_key:"shareWorkflowModalRef",ref:A},null,512)]),_:1})]),_:1})]),_:1},8,["spinning"]))}}},dt=te(ut,[["__scopeId","data-v-1c18b54c"]]);const pt={key:0},_t={class:"template-card-title-container"},ft=["src"],wt={__name:"WorkflowTemplatesMarket",setup(r){const{t:e}=q(),a=x(!0),d=ee(),u=Z(),{language:W}=Y(u),M=x([]);me(async()=>{a.value=!1;const[y,f]=await Promise.all([s.load({is_official:!0}),ue("list_tags",{})]);f.status==200&&(M.value=f.data),a.value=!1});const s=K({data:[],loading:!0,current:1,pageSize:100,total:0,pagination:Q(()=>({total:s.total,current:s.current,pageSize:s.pageSize})),selectTag:"all",selectTagChange:async()=>{s.loading=!0,await s.load({tags:[s.selectTag],is_official:!0}),s.loading=!1},hoverRowWid:null,handleTableChange:(y,f,k)=>{s.load({page_size:y.pageSize,page:y.current,sort_field:k.field,sort_order:k.order,tags:f.tags})},load:async y=>{s.loading=!0;const f=await ue("list_templates",{client:"PC",...y});f.status==200?s.data=f.data.templates.map(k=>(k.create_time=new Date(k.create_time).toLocaleString(),k.update_time=new Date(k.update_time).toLocaleString(),k)):$.error(f.msg),s.total=f.data.total,s.pageSize=f.data.page_size,s.current=f.data.page,s.loading=!1}});return(y,f)=>{const k=c("a-skeleton"),n=c("a-typography-title"),T=c("a-col"),b=c("a-row"),h=c("a-typography-text"),A=c("a-radio-button"),L=c("a-radio-group"),D=c("a-space"),U=c("a-divider"),I=c("a-tag"),i=c("a-carousel"),p=c("a-card"),w=c("a-spin"),F=Ae("highlight");return _(),O(C,null,[a.value?(_(),O("div",pt,[t(k,{active:""})])):(_(),S(b,{key:1,align:"middle",gutter:[16,16]},{default:o(()=>[t(T,{span:24},{default:o(()=>[t(b,{type:"flex",align:"middle",justify:"space-between"},{default:o(()=>[t(T,{flex:"auto"},{default:o(()=>[t(n,{title:3},{default:o(()=>[m(g(l(e)("workspace.workflowSpaceMain.official_workflow_template")),1)]),_:1})]),_:1})]),_:1})]),_:1}),t(T,{span:24},{default:o(()=>[t(D,null,{default:o(()=>[t(h,null,{default:o(()=>[m(g(l(e)("workspace.workflowTemplate.workflow_template_tags")),1)]),_:1}),t(L,{value:s.selectTag,"onUpdate:value":f[0]||(f[0]=v=>s.selectTag=v),"button-style":"solid",onChange:s.selectTagChange},{default:o(()=>[t(A,{value:"all"},{default:o(()=>[m(g(l(e)("common.all")),1)]),_:1}),(_(!0),O(C,null,H(M.value,v=>(_(),O(C,{key:v.tid},[l(W)==v.language?(_(),S(A,{key:0,value:v.tid},{default:o(()=>[m(g(v.title),1)]),_:2},1032,["value"])):X("",!0)],64))),128))]),_:1},8,["value","onChange"])]),_:1})]),_:1}),t(U),t(T,{span:24},{default:o(()=>[t(w,{spinning:s.loading},{default:o(()=>[t(b,{gutter:[16,16]},{default:o(()=>[(_(!0),O(C,null,H(s.data,v=>(_(),S(T,{lg:6,md:8,sm:12,xs:24,key:v.tid,onClick:z=>l(d).push(`/workflow/template/${v.tid}`)},{default:o(()=>[t(p,{class:"template-card",hoverable:""},{title:o(()=>[N("div",_t,[t(n,{level:4},{default:o(()=>[m(g(v.title),1)]),_:2},1024),(_(!0),O(C,null,H(v.tags,(z,R)=>(_(),S(I,{key:R,color:z.color},{default:o(()=>[m(g(z.title),1)]),_:2},1032,["color"]))),128))])]),default:o(()=>[v.images.length>0?(_(),S(i,{key:0,autoplay:"",arrows:""},{default:o(()=>[(_(!0),O(C,null,H(v.images,(z,R)=>(_(),O("div",{key:R},[N("img",{src:z,class:"card-image"},null,8,ft)]))),128))]),_:2},1024)):ge((_(),S(l(Re),{key:1,source:v.brief,class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"])),[[F]])]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["spinning"])]),_:1})]),_:1})),t(U)],64)}}},mt=te(wt,[["__scopeId","data-v-de40d531"]]);const gt={__name:"WorkflowSpaceMain",setup(r){const{t:e}=q(),a=je(),d=ee(),u=x(a.query.tab?a.query.tab:"my-workflows"),W=async M=>{await d.push(Le(a.path,{tab:M}))};return(M,s)=>{const y=c("a-tab-pane"),f=c("a-tabs");return _(),S(f,{activeKey:u.value,"onUpdate:activeKey":s[0]||(s[0]=k=>u.value=k),onChange:W},{default:o(()=>[t(y,{key:"my-workflows"},{tab:o(()=>[N("span",null,[t(l(De)),m(" "+g(l(e)("workspace.workflowSpaceMain.my_workflows")),1)])]),default:o(()=>[t(dt)]),_:1}),t(y,{key:"official-workflow-templates"},{tab:o(()=>[N("span",null,[t(l(Ee)),m(" "+g(l(e)("workspace.workflowSpaceMain.official_workflow_template")),1)])]),default:o(()=>[t(mt)]),_:1})]),_:1},8,["activeKey"])}}},Mt=te(gt,[["__scopeId","data-v-4b53fd36"]]);export{Mt as default}; diff --git a/backend/web/assets/WorkflowSpaceUse-4d5d179e.js b/backend/web/assets/WorkflowSpaceUse-4d5d179e.js deleted file mode 100644 index 1cfa1f2d..00000000 --- a/backend/web/assets/WorkflowSpaceUse-4d5d179e.js +++ /dev/null @@ -1 +0,0 @@ -import{c as t,U as Ee,ac as He,$ as _e,r as w,ab as ze,a9 as Ae,aa as Oe,D as Be,a1 as A,a2 as g,a3 as ee,m as te,aq as qe,b as Pe,P as i,a5 as Je,o as s,e as p,K as f,x as o,R as y,H as v,u as r,G as D,y as R,F as M,a7 as W,a8 as O,I as U,ae,a4 as Ze,ar as Ge,as as pe}from"./index-51905ea3.js";import{u as Ke}from"./userDatabase-87373af7.js";import{_ as Qe,a as Xe,b as Ye,c as et,d as tt,e as at}from"./EchartsRenderer-3d08027d.js";import{_ as ot}from"./UploaderFieldUse-71f49711.js";import{_ as lt}from"./WorkflowRunRecordsDrawer-55188329.js";import{d as st}from"./database-adffb067.js";import{_ as nt}from"./_plugin-vue_export-helper-c27b6911.js";import{I as B}from"./index-fb7c1fe5.js";const rt=B("edit",!0,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M7 42H43",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M11 26.7199V34H18.3172L39 13.3081L31.6951 6L11 26.7199Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),it=B("full-screen-one",!1,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M6 6L16 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M6 41.8995L16 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M42.0001 41.8995L32.1006 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M41.8995 6L32 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M33 6H42V15",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M42 33V42H33",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M15 42H6V33",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M6 15V6H15",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),ut=B("lightning",!0,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M19 4H37L26 18H41L17 44L22 25H8L19 4Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),ct=B("off-screen-one",!1,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M6 6L16 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M6 41.8995L16 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M42.0001 41.8995L32.1006 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M41.8995 6L32 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M32 7V16H41",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M16 7V16H7",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M16 41V32H7",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M32 41V32H40.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])});const dt={key:0,class:"space-container"},kt=["src"],_t=["src"],pt={key:0},ft={key:0},wt={key:1},vt={key:2},mt={key:3},ht={key:4},yt={key:5},gt={key:6},St={key:0},Lt={__name:"WorkflowSpaceUse",setup(e){const{t:n}=Ee(),fe=He(),{language:we,setting:ve}=_e(fe),oe=Ke(),{userDatabases:me}=_e(oe),le=w(!0),he=w(!1),se=ze(),q=Ae(),P=Oe(),J=q.params.workflowId,Z=w(!1),ye=w(window.innerWidth<=768?"90vw":"60vw"),S=w(!1),$=w([]),T=w([]),N=w([]);Be(async()=>{const k=A("get",{wid:J}),u=st("list",{}),c=await k,l=await u;if(l.status==200&&oe.setUserDatabases(l.data),c.status!=200){g.error(n("workspace.workflowSpace.get_workflow_failed")),P.push({name:"WorkflowSpaceMain"});return}d.value=c.data,d.value.data.nodes.forEach(C=>{C.category=="vectorDb"&&(C.data.template.database.options=me.value.filter(x=>x.status=="VALID").map(x=>({value:x.vid,label:x.name})))});const m=ee(d.value),h=te(m);if($.value=h.inputFields,T.value=h.outputNodes,N.value=h.triggerNodes,G.value=JSON.parse(JSON.stringify(d.value)),q.query.rid){const x=await qe("get",{rid:q.query.rid});try{ie(x.data)}catch{g.error(n("workspace.workflowSpace.get_workflow_record_failed"))}}le.value=!1});const d=w({}),G=w({}),b=w(!1),K=w(null),E=w(null),ge=async()=>{E.value=null,H.value=!1;let k=!0;try{$.value.forEach(l=>{let m=!0;l.field_type!="checkbox"&&l.show&&l.required&&((l.field_type=="file"&&l.value.length==0||l.field_type=="number"&&typeof l.value!="number"||!l.value&&!l.value===0)&&(m=!1),m||(g.error(n("workspace.workflowSpace.field_is_empty",{field:l.display_name})),k=!1))})}catch{k=!1}if(!k)return;let u=JSON.parse(JSON.stringify(G.value));u.data.nodes.forEach(l=>{l.data.has_inputs&&Ge(l)&&!["triggers"].includes(l.category)&&Object.keys(l.data.template).forEach(m=>{l.data.template[m].show&&(l.data.template[m].value=d.value.data.nodes.find(h=>h.id==l.id).data.template[m].value)})}),b.value=!0,u.data.setting=ve.value.data;const c=await A("run",u);c.status==200?(g.success(n("workspace.workflowSpace.submit_workflow_success")),E.value=c.data.rid,K.value=setInterval(async()=>{const l=await A("check_status",{rid:E.value});if(l.status==200){g.success(n("workspace.workflowSpace.run_workflow_success")),clearInterval(K.value),b.value=!1,d.value=l.data;const m=ee(d.value),h=te(m);$.value=h.inputFields,T.value=h.outputNodes,N.value=h.triggerNodes}else l.status==500&&(b.value=!1,I.value="FAILED",g.error(n("workspace.workflowSpace.run_workflow_failed")),clearInterval(K.value),re(l.data.error_task),H.value=!0)},1e3)):(g.error(n("workspace.workflowSpace.submit_workflow_failed")),b.value=!1)},Se=async()=>{b.value=!0,(await pe("update",{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,...d.value})).status==200?g.success(n("workspace.workflowSpace.update_schedule_success")):g.error(n("workspace.workflowSpace.update_schedule_failed")),b.value=!1},ne=w(!1),Le=async()=>{ne.value=!0,(await pe("delete",{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,...d.value})).status==200?g.success(n("workspace.workflowSpace.delete_schedule_success")):g.error(n("workspace.workflowSpace.delete_schedule_failed")),ne.value=!1},be=async()=>{(await A("delete",{wid:d.value.wid})).status==200?(g.success(n("workspace.workflowSpace.delete_success")),se.deleteUserWorkflow(d.value.wid),se.deleteUserWorkflow(d.value.wid,!0),P.push({name:"WorkflowSpaceMain"})):g.error(n("workspace.workflowSpace.delete_failed"))},je=()=>{P.push({name:"WorkflowEditor",params:{workflowId:J}})},H=w(!1),I=w(""),Q=w(""),xe=Pe(()=>I.value=="FINISHED"?"success":I.value=="FAILED"?"error":"info"),re=k=>{let[u,c]=(k||".").split(".");u=u.split("_").map((l,m)=>m===0?l.charAt(0).toLowerCase()+l.slice(1):l.charAt(0).toUpperCase()+l.slice(1)).join(""),u=="output"&&(u="outputs"),c=c.split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(""),c=="OpenAi"?c="OpenAI":c=="ChatGlm"?c="ChatGLM":c=="SearchData"&&u=="vectorDb"&&(c="Search"),Q.value=`${u}.${c}`},ie=k=>{E.value=k.rid,I.value=k.status,d.value.data={...k.data,ui:G.value.data.ui||{}},re(k.data.error_task);const u=ee(d.value),c=te(u);$.value=c.inputFields,T.value=c.outputNodes,N.value=c.triggerNodes,H.value=!0},We=k=>{window.pywebview.api.open_local_file(k)};return(k,u)=>{const c=i("a-skeleton"),l=i("a-typography-title"),m=i("a-typography-text"),h=i("a-divider"),C=i("a-carousel"),x=i("a-modal"),X=i("a-typography-link"),Ue=i("a-tag"),Y=i("a-space"),L=i("a-col"),F=i("a-button"),ue=i("a-popconfirm"),V=i("a-row"),Ie=i("a-alert"),Ve=i("a-select"),De=i("a-textarea"),Me=i("a-input"),$e=i("a-input-number"),Ce=i("a-checkbox"),Fe=i("a-form-item"),Re=i("a-form"),Te=i("cron-ant"),Ne=i("a-card"),ce=i("a-tooltip"),de=i("a-typography-paragraph"),ke=i("a-spin"),z=Je("highlight");return le.value?(s(),p("div",dt,[t(c,{active:""})])):(s(),f(ke,{key:1,spinning:he.value,class:"space-container"},{default:o(()=>[t(V,{justify:"space-between",align:"middle"},{default:o(()=>[t(L,null,{default:o(()=>[t(l,null,{default:o(()=>[y(v(d.value.title),1)]),_:1}),t(Y,null,{default:o(()=>[t(m,{type:"secondary"},{default:o(()=>[y(v(r(n)("workspace.workflowSpace.update_time",{time:new Date(d.value.update_time).toLocaleString()})),1)]),_:1}),t(h,{type:"vertical"}),t(X,{onClick:u[1]||(u[1]=a=>Z.value=!0)},{default:o(()=>[y(v(r(n)("workspace.workflowSpace.brief"))+" ",1),t(x,{open:Z.value,title:r(n)("workspace.workflowSpace.brief"),width:ye.value,footer:null,class:"introduction-modal",onCancel:u[0]||(u[0]=a=>Z.value=!1)},{default:o(()=>[t(C,{autoplay:"",arrows:"","dots-class":"slick-dots slick-thumb"},{customPaging:o(a=>[D("a",null,[D("img",{src:d.value.images[a.i]},null,8,kt)])]),default:o(()=>[(s(!0),p(M,null,R(d.value.images,(a,j)=>(s(),p("div",{key:j},[D("img",{src:a},null,8,_t)]))),128))]),_:1}),W(t(r(O),{source:d.value.brief,class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[z]])]),_:1},8,["open","title","width"])]),_:1}),t(h,{type:"vertical"}),(s(!0),p(M,null,R(d.value.tags,(a,j)=>(s(),f(Ue,{color:a.color,key:j},{default:o(()=>[y(v(a.title),1)]),_:2},1032,["color"]))),128))]),_:1})]),_:1}),t(L,null,{default:o(()=>[t(Y,null,{default:o(()=>[t(lt,{workflowId:r(J),onOpenRecord:ie},null,8,["workflowId"]),t(F,{onClick:je},{default:o(()=>[y(v(r(n)("workspace.workflowSpace.edit")),1)]),_:1}),t(ue,{placement:"leftTop",title:r(n)("workspace.workflowSpace.delete_confirm"),onConfirm:be},{default:o(()=>[t(F,{type:"primary",danger:""},{default:o(()=>[y(v(r(n)("workspace.workflowSpace.delete")),1)]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})]),_:1}),t(h),t(V,{gutter:[16,16]},{default:o(()=>[H.value?(s(),f(L,{key:0,span:24},{default:o(()=>[t(Ie,{type:xe.value,"show-icon":""},{message:o(()=>[D("span",null,v(r(n)("workspace.workflowSpace.record_status",{status:r(n)(`components.workspace.workflowRunRecordsDrawer.status_${I.value.toLowerCase()}`)})),1),t(h,{type:"vertical"}),I.value=="FAILED"&&Q.value!="."?(s(),p("span",pt,v(r(n)("workspace.workflowSpace.record_error_task",{task:r(n)("components.nodes."+Q.value+".title")})),1)):U("",!0)]),_:1},8,["type"])]),_:1})):U("",!0),W(t(L,{xxl:6,xl:8,lg:10,md:24},{default:o(()=>[t(V,{gutter:[16,16]},{default:o(()=>[t(l,{level:3},{default:o(()=>[t(r(rt),{fill:"#28c5e5"}),y(" "+v(r(n)("workspace.workflowSpace.inputs")),1)]),_:1}),t(L,{span:24},{default:o(()=>[t(Re,{layout:"vertical"},{default:o(()=>[(s(!0),p(M,null,R($.value,(a,j)=>(s(),p("div",{key:`field-${a}-${j}`},[r(Ze).includes(a.field_type)?U("",!0):(s(),f(Fe,{key:0},{label:o(()=>[y(v(a.display_name),1)]),default:o(()=>[a.category=="llms"&&a=="temperature"?(s(),f(Qe,{key:0,modelValue:a.value,"onUpdate:modelValue":_=>a.value=_},null,8,["modelValue","onUpdate:modelValue"])):a.field_type=="select"?(s(),f(Ve,{key:1,value:a.value,"onUpdate:value":_=>a.value=_,options:a.options},null,8,["value","onUpdate:value","options"])):a.field_type=="textarea"?(s(),f(De,{key:2,value:a.value,"onUpdate:value":_=>a.value=_,autoSize:!0,showCount:!0,placeholder:a.placeholder},null,8,["value","onUpdate:value","placeholder"])):a.field_type=="input"?(s(),f(Me,{key:3,value:a.value,"onUpdate:value":_=>a.value=_,placeholder:a.placeholder},null,8,["value","onUpdate:value","placeholder"])):a.field_type=="number"?(s(),f($e,{key:4,value:a.value,"onUpdate:value":_=>a.value=_,placeholder:a.placeholder},null,8,["value","onUpdate:value","placeholder"])):a.field_type=="checkbox"?(s(),f(Ce,{key:5,checked:a.value,"onUpdate:checked":_=>a.value=_},null,8,["checked","onUpdate:checked"])):a.field_type=="file"?(s(),f(ot,{key:6,modelValue:a.value,"onUpdate:modelValue":_=>a.value=_},null,8,["modelValue","onUpdate:modelValue"])):a.field_type=="list"?(s(),f(Xe,{key:7,modelValue:a.value,"onUpdate:modelValue":_=>a.value=_},null,8,["modelValue","onUpdate:modelValue"])):U("",!0)]),_:2},1024)),a.field_type=="typography-paragraph"?(s(),f(V,{key:1},{default:o(()=>[t(L,{span:24,class:"ui-special-item-container"},{default:o(()=>[W(t(r(O),{source:a.value,class:"markdown-body custom-hljs ui-special-item"},null,8,["source"]),[[z]])]),_:2},1024)]),_:2},1024)):U("",!0)]))),128))]),_:1})]),_:1}),t(h),t(L,{span:24},{default:o(()=>[t(V,{gutter:[16,16]},{default:o(()=>[(s(!0),p(M,null,R(N.value,a=>(s(),f(L,{key:`node-${a.id}`,span:24},{default:o(()=>[a.type=="ButtonTrigger"?(s(),f(F,{key:0,type:"primary",block:"",onClick:ge,loading:b.value},{default:o(()=>[y(v(a.data.template.button_text.value),1)]),_:2},1032,["loading"])):a.type=="ScheduleTrigger"?(s(),f(Ne,{key:1,title:r(n)("components.nodes.triggers.ScheduleTrigger.schedule_settings")},{extra:o(()=>[t(Y,null,{default:o(()=>[t(F,{type:"primary",onClick:Se,loading:b.value},{default:o(()=>[y(v(r(n)("components.nodes.triggers.ScheduleTrigger.save_schedule_settings")),1)]),_:1},8,["loading"]),t(ue,{title:r(n)("workspace.workflowSpace.delete_schedule_trigger_confirm"),onConfirm:Le},{default:o(()=>[t(F,{type:"primary",danger:""},{default:o(()=>[y(v(r(n)("workspace.workflowSpace.delete")),1)]),_:1})]),_:1},8,["title"])]),_:1})]),default:o(()=>[t(Te,{modelValue:a.data.template.schedule.value,"onUpdate:modelValue":j=>a.data.template.schedule.value=j,"button-props":{type:"primary",shape:"round"},locale:r(we)},null,8,["modelValue","onUpdate:modelValue","locale"])]),_:2},1032,["title"])):U("",!0)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1},512),[[ae,!S.value]]),t(L,{xxl:S.value?24:18,xl:S.value?24:16,lg:S.value?24:14,md:24},{default:o(()=>[t(l,{level:3,style:{display:"flex","justify-content":"space-between"}},{default:o(()=>[D("span",null,[t(r(ut),{fill:"#28c5e5"}),y(" "+v(r(n)("workspace.workflowSpace.outputs")),1)]),D("span",null,[t(ce,{title:r(n)("workspace.workflowSpace.maximize_output")},{default:o(()=>[W(t(r(it),{onClick:u[2]||(u[2]=a=>S.value=!S.value)},null,512),[[ae,!S.value]])]),_:1},8,["title"]),t(ce,{title:r(n)("workspace.workflowSpace.normalize_output")},{default:o(()=>[W(t(r(ct),{onClick:u[3]||(u[3]=a=>S.value=!S.value)},null,512),[[ae,S.value]])]),_:1},8,["title"])])]),_:1}),t(ke,{spinning:b.value},{default:o(()=>[t(V,{gutter:[16,16]},{default:o(()=>[(s(!0),p(M,null,R(T.value,(a,j)=>(s(),f(L,{span:24,class:"draggable-item",key:`node-${a.id}-${j}`},{default:o(()=>{var _;return[a.type=="Text"?(s(),p("div",ft,[t(l,{level:5},{default:o(()=>[y(v(a.data.template.output_title.value),1)]),_:2},1024),a.data.template.render_markdown.value?(s(),p(M,{key:0},[W(t(r(O),{source:a.data.template.text.value,class:"markdown-body custom-hljs"},null,8,["source"]),[[z]]),t(de,{copyable:{text:a.data.template.text.value}},null,8,["copyable"])],64)):(s(),f(de,{key:1,copyable:{text:a.data.template.text.value}},{default:o(()=>[y(v(a.data.template.text.value),1)]),_:2},1032,["copyable"]))])):a.type=="Document"?(s(),p("div",wt,[t(X,{onClick:bt=>We(a.data.template.output.value)},{default:o(()=>[y(v(a.data.template.output.value),1)]),_:2},1032,["onClick"])])):a.type=="Audio"?(s(),p("div",vt,[t(Ye,{audios:[(_=a.data.template.audio_url)==null?void 0:_.value]},null,8,["audios"])])):a.type=="Mindmap"?(s(),p("div",mt,[t(et,{content:a.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):a.type=="Mermaid"?(s(),p("div",ht,[t(tt,{content:a.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):a.type=="Echarts"?(s(),p("div",yt,[t(at,{option:a.data.template.option.value,style:{width:"100%","min-height":"50vh"}},null,8,["option"])])):(s(),p("div",gt,[a.field_type=="typography-paragraph"?(s(),p("div",St,[W(t(r(O),{source:a.value,class:"markdown-body custom-hljs ui-special-item"},null,8,["source"]),[[z]])])):U("",!0)]))]}),_:2},1024))),128))]),_:1})]),_:1},8,["spinning"])]),_:1},8,["xxl","xl","lg"])]),_:1})]),_:1},8,["spinning"]))}}},$t=nt(Lt,[["__scopeId","data-v-bcc5261e"]]);export{$t as default}; diff --git a/backend/web/assets/WorkflowSpaceUse-a2195012.css b/backend/web/assets/WorkflowSpaceUse-a2195012.css deleted file mode 100644 index 073fee02..00000000 --- a/backend/web/assets/WorkflowSpaceUse-a2195012.css +++ /dev/null @@ -1 +0,0 @@ -.space-container[data-v-bcc5261e]{height:calc(100vh - 64px)}.ui-special-item[data-v-bcc5261e]{margin-bottom:24px}[data-v-bcc5261e] .slick-dots{position:relative;height:auto}[data-v-bcc5261e] .slick-slide img{border:5px solid #fff;display:block;margin:auto;max-width:80%;max-height:60vh}[data-v-bcc5261e] .slick-arrow{display:none!important}[data-v-bcc5261e] .slick-thumb{bottom:0}[data-v-bcc5261e] .slick-thumb li{width:60px;height:45px}[data-v-bcc5261e] .slick-thumb li img{width:100%;height:100%;filter:grayscale(100%);display:block}[data-v-bcc5261e] .slick-thumb li.slick-active img{filter:grayscale(0%)} diff --git a/backend/web/assets/WorkflowSpaceUse-b6815112.js b/backend/web/assets/WorkflowSpaceUse-b6815112.js new file mode 100644 index 00000000..79356897 --- /dev/null +++ b/backend/web/assets/WorkflowSpaceUse-b6815112.js @@ -0,0 +1 @@ +import{c as t,U as Ne,ab as Ee,a1 as ke,r as p,aa as He,a8 as ze,a9 as Ae,D as Oe,a3 as z,a4 as y,a5 as Y,m as ee,aq as Be,b as qe,P as i,an as Pe,o as s,e as f,K as w,x as o,R as g,H as m,u as r,G as I,y as F,F as R,V as D,ao as te,I as x,W as ae,a6 as Je,ar as Ze,as as _e}from"./index-ef7aa48c.js";import{u as Ge}from"./userDatabase-3faee336.js";import{_ as Ke,a as Qe,b as Xe,c as Ye,d as et,e as tt,f as at}from"./TextOutput-39ff842e.js";import{_ as ot}from"./UploaderFieldUse-7351b05e.js";import{_ as lt}from"./WorkflowRunRecordsDrawer-31cf6fb4.js";import{d as st}from"./database-2818470e.js";import{_ as nt}from"./_plugin-vue_export-helper-c27b6911.js";import{I as A}from"./index-ace83a9e.js";const rt=A("edit",!0,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M7 42H43",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M11 26.7199V34H18.3172L39 13.3081L31.6951 6L11 26.7199Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),it=A("full-screen-one",!1,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M6 6L16 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M6 41.8995L16 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M42.0001 41.8995L32.1006 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M41.8995 6L32 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M33 6H42V15",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M42 33V42H33",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M15 42H6V33",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M6 15V6H15",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])}),ut=A("lightning",!0,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M19 4H37L26 18H41L17 44L22 25H8L19 4Z",fill:e.colors[1],stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linejoin":e.strokeLinejoin},null)])}),ct=A("off-screen-one",!1,function(e){return t("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},[t("path",{d:"M6 6L16 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M6 41.8995L16 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M42.0001 41.8995L32.1006 32",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M41.8995 6L32 15.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M32 7V16H41",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M16 7V16H7",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M16 41V32H7",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null),t("path",{d:"M32 41V32H40.8995",stroke:e.colors[0],"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin},null)])});const dt={key:0,class:"space-container"},kt=["src"],_t=["src"],pt={key:0},ft={key:0},wt={key:1},vt={key:2},mt={key:3},ht={key:4},gt={key:5},yt={key:6},St={key:0},Lt={__name:"WorkflowSpaceUse",setup(e){const{t:n}=Ne(),pe=Ee(),{language:fe,setting:we}=ke(pe),oe=Ge(),{userDatabases:ve}=ke(oe),le=p(!0),me=p(!1),se=He(),O=ze(),B=Ae(),q=O.params.workflowId,P=p(!1),he=p(window.innerWidth<=768?"90vw":"60vw"),S=p(!1),M=p([]),T=p([]),N=p([]);Oe(async()=>{const k=z("get",{wid:q}),u=st("list",{}),c=await k,l=await u;if(l.status==200&&oe.setUserDatabases(l.data),c.status!=200){y.error(n("workspace.workflowSpace.get_workflow_failed")),B.push({name:"WorkflowSpaceMain"});return}d.value=c.data,d.value.data.nodes.forEach($=>{$.category=="vectorDb"&&($.data.template.database.options=ve.value.filter(W=>W.status=="VALID").map(W=>({value:W.vid,label:W.name})))});const v=Y(d.value),h=ee(v);if(M.value=h.inputFields,T.value=h.outputNodes,N.value=h.triggerNodes,J.value=JSON.parse(JSON.stringify(d.value)),O.query.rid){const W=await Be("get",{rid:O.query.rid});try{ie(W.data)}catch{y.error(n("workspace.workflowSpace.get_workflow_record_failed"))}}le.value=!1});const d=p({}),J=p({}),b=p(!1),Z=p(null),E=p(null),ge=async()=>{E.value=null,H.value=!1;let k=!0;try{M.value.forEach(l=>{let v=!0;l.field_type!="checkbox"&&l.show&&l.required&&((l.field_type=="file"&&l.value.length==0||l.field_type=="number"&&typeof l.value!="number"||!l.value&&!l.value===0)&&(v=!1),v||(y.error(n("workspace.workflowSpace.field_is_empty",{field:l.display_name})),k=!1))})}catch{k=!1}if(!k)return;let u=JSON.parse(JSON.stringify(J.value));u.data.nodes.forEach(l=>{l.data.has_inputs&&Ze(l)&&!["triggers"].includes(l.category)&&Object.keys(l.data.template).forEach(v=>{l.data.template[v].show&&(l.data.template[v].value=d.value.data.nodes.find(h=>h.id==l.id).data.template[v].value)})}),b.value=!0,u.data.setting=we.value.data;const c=await z("run",u);c.status==200?(y.success(n("workspace.workflowSpace.submit_workflow_success")),E.value=c.data.rid,Z.value=setInterval(async()=>{const l=await z("check_status",{rid:E.value});if(l.status==200){y.success(n("workspace.workflowSpace.run_workflow_success")),clearInterval(Z.value),b.value=!1,d.value=l.data;const v=Y(d.value),h=ee(v);M.value=h.inputFields,T.value=h.outputNodes,N.value=h.triggerNodes}else l.status==500&&(b.value=!1,U.value="FAILED",y.error(n("workspace.workflowSpace.run_workflow_failed")),clearInterval(Z.value),re(l.data.error_task),H.value=!0)},1e3)):(y.error(n("workspace.workflowSpace.submit_workflow_failed")),b.value=!1)},ye=async()=>{b.value=!0,(await _e("update",{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,...d.value})).status==200?y.success(n("workspace.workflowSpace.update_schedule_success")):y.error(n("workspace.workflowSpace.update_schedule_failed")),b.value=!1},ne=p(!1),Se=async()=>{ne.value=!0,(await _e("delete",{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,...d.value})).status==200?y.success(n("workspace.workflowSpace.delete_schedule_success")):y.error(n("workspace.workflowSpace.delete_schedule_failed")),ne.value=!1},Le=async()=>{(await z("delete",{wid:d.value.wid})).status==200?(y.success(n("workspace.workflowSpace.delete_success")),se.deleteUserWorkflow(d.value.wid),se.deleteUserWorkflow(d.value.wid,!0),B.push({name:"WorkflowSpaceMain"})):y.error(n("workspace.workflowSpace.delete_failed"))},be=()=>{B.push({name:"WorkflowEditor",params:{workflowId:q}})},H=p(!1),U=p(""),G=p(""),je=qe(()=>U.value=="FINISHED"?"success":U.value=="FAILED"?"error":"info"),re=k=>{let[u,c]=(k||".").split(".");u=u.split("_").map((l,v)=>v===0?l.charAt(0).toLowerCase()+l.slice(1):l.charAt(0).toUpperCase()+l.slice(1)).join(""),u=="output"&&(u="outputs"),c=c.split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(""),c=="OpenAi"?c="OpenAI":c=="ChatGlm"?c="ChatGLM":c=="SearchData"&&u=="vectorDb"&&(c="Search"),G.value=`${u}.${c}`},ie=k=>{E.value=k.rid,U.value=k.status,d.value.data={...k.data,ui:J.value.data.ui||{}},re(k.data.error_task);const u=Y(d.value),c=ee(u);M.value=c.inputFields,T.value=c.outputNodes,N.value=c.triggerNodes,H.value=!0},We=k=>{window.pywebview.api.open_local_file(k)};return(k,u)=>{const c=i("a-skeleton"),l=i("a-typography-title"),v=i("a-typography-text"),h=i("a-divider"),$=i("a-carousel"),W=i("a-modal"),K=i("a-typography-link"),xe=i("a-tag"),Q=i("a-space"),L=i("a-col"),C=i("a-button"),ue=i("a-popconfirm"),V=i("a-row"),Ue=i("a-alert"),Ve=i("a-select"),Ie=i("a-textarea"),De=i("a-input"),Me=i("a-input-number"),$e=i("a-checkbox"),Ce=i("a-form-item"),Fe=i("a-form"),Re=i("cron-ant"),Te=i("a-card"),ce=i("a-tooltip"),de=i("a-spin"),X=Pe("highlight");return le.value?(s(),f("div",dt,[t(c,{active:""})])):(s(),w(de,{key:1,spinning:me.value,class:"space-container"},{default:o(()=>[t(V,{justify:"space-between",align:"middle"},{default:o(()=>[t(L,null,{default:o(()=>[t(l,null,{default:o(()=>[g(m(d.value.title),1)]),_:1}),t(Q,null,{default:o(()=>[t(v,{type:"secondary"},{default:o(()=>[g(m(r(n)("workspace.workflowSpace.update_time",{time:new Date(d.value.update_time).toLocaleString()})),1)]),_:1}),t(h,{type:"vertical"}),t(K,{onClick:u[1]||(u[1]=a=>P.value=!0)},{default:o(()=>[g(m(r(n)("workspace.workflowSpace.brief"))+" ",1),t(W,{open:P.value,title:r(n)("workspace.workflowSpace.brief"),width:he.value,footer:null,class:"introduction-modal",onCancel:u[0]||(u[0]=a=>P.value=!1)},{default:o(()=>[t($,{autoplay:"",arrows:"","dots-class":"slick-dots slick-thumb"},{customPaging:o(a=>[I("a",null,[I("img",{src:d.value.images[a.i]},null,8,kt)])]),default:o(()=>[(s(!0),f(R,null,F(d.value.images,(a,j)=>(s(),f("div",{key:j},[I("img",{src:a},null,8,_t)]))),128))]),_:1}),D(t(r(te),{source:d.value.brief,class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[X]])]),_:1},8,["open","title","width"])]),_:1}),t(h,{type:"vertical"}),(s(!0),f(R,null,F(d.value.tags,(a,j)=>(s(),w(xe,{color:a.color,key:j},{default:o(()=>[g(m(a.title),1)]),_:2},1032,["color"]))),128))]),_:1})]),_:1}),t(L,null,{default:o(()=>[t(Q,null,{default:o(()=>[t(lt,{workflowId:r(q),onOpenRecord:ie},null,8,["workflowId"]),t(C,{onClick:be},{default:o(()=>[g(m(r(n)("workspace.workflowSpace.edit")),1)]),_:1}),t(ue,{placement:"leftTop",title:r(n)("workspace.workflowSpace.delete_confirm"),onConfirm:Le},{default:o(()=>[t(C,{type:"primary",danger:""},{default:o(()=>[g(m(r(n)("workspace.workflowSpace.delete")),1)]),_:1})]),_:1},8,["title"])]),_:1})]),_:1})]),_:1}),t(h),t(V,{gutter:[16,16]},{default:o(()=>[H.value?(s(),w(L,{key:0,span:24},{default:o(()=>[t(Ue,{type:je.value,"show-icon":""},{message:o(()=>[I("span",null,m(r(n)("workspace.workflowSpace.record_status",{status:r(n)(`components.workspace.workflowRunRecordsDrawer.status_${U.value.toLowerCase()}`)})),1),t(h,{type:"vertical"}),U.value=="FAILED"&&G.value!="."?(s(),f("span",pt,m(r(n)("workspace.workflowSpace.record_error_task",{task:r(n)("components.nodes."+G.value+".title")})),1)):x("",!0)]),_:1},8,["type"])]),_:1})):x("",!0),D(t(L,{xxl:6,xl:8,lg:10,md:24},{default:o(()=>[t(V,{gutter:[16,16]},{default:o(()=>[t(l,{level:3},{default:o(()=>[t(r(rt),{fill:"#28c5e5"}),g(" "+m(r(n)("workspace.workflowSpace.inputs")),1)]),_:1}),t(L,{span:24},{default:o(()=>[t(Fe,{layout:"vertical"},{default:o(()=>[(s(!0),f(R,null,F(M.value,(a,j)=>(s(),f("div",{key:`field-${a}-${j}`},[r(Je).includes(a.field_type)?x("",!0):(s(),w(Ce,{key:0},{label:o(()=>[g(m(a.display_name),1)]),default:o(()=>[a.category=="llms"&&a=="temperature"?(s(),w(Ke,{key:0,modelValue:a.value,"onUpdate:modelValue":_=>a.value=_},null,8,["modelValue","onUpdate:modelValue"])):a.field_type=="select"?(s(),w(Ve,{key:1,value:a.value,"onUpdate:value":_=>a.value=_,options:a.options},null,8,["value","onUpdate:value","options"])):a.field_type=="textarea"?(s(),w(Ie,{key:2,value:a.value,"onUpdate:value":_=>a.value=_,autoSize:!0,showCount:!0,placeholder:a.placeholder},null,8,["value","onUpdate:value","placeholder"])):a.field_type=="input"?(s(),w(De,{key:3,value:a.value,"onUpdate:value":_=>a.value=_,placeholder:a.placeholder},null,8,["value","onUpdate:value","placeholder"])):a.field_type=="number"?(s(),w(Me,{key:4,value:a.value,"onUpdate:value":_=>a.value=_,placeholder:a.placeholder},null,8,["value","onUpdate:value","placeholder"])):a.field_type=="checkbox"?(s(),w($e,{key:5,checked:a.value,"onUpdate:checked":_=>a.value=_},null,8,["checked","onUpdate:checked"])):a.field_type=="file"?(s(),w(ot,{key:6,modelValue:a.value,"onUpdate:modelValue":_=>a.value=_},null,8,["modelValue","onUpdate:modelValue"])):a.field_type=="list"?(s(),w(Qe,{key:7,modelValue:a.value,"onUpdate:modelValue":_=>a.value=_},null,8,["modelValue","onUpdate:modelValue"])):x("",!0)]),_:2},1024)),a.field_type=="typography-paragraph"?(s(),w(V,{key:1},{default:o(()=>[t(L,{span:24,class:"ui-special-item-container"},{default:o(()=>[D(t(r(te),{source:a.value,class:"markdown-body custom-hljs ui-special-item"},null,8,["source"]),[[X]])]),_:2},1024)]),_:2},1024)):x("",!0)]))),128))]),_:1})]),_:1}),t(h),t(L,{span:24},{default:o(()=>[t(V,{gutter:[16,16]},{default:o(()=>[(s(!0),f(R,null,F(N.value,a=>(s(),w(L,{key:`node-${a.id}`,span:24},{default:o(()=>[a.type=="ButtonTrigger"?(s(),w(C,{key:0,type:"primary",block:"",onClick:ge,loading:b.value},{default:o(()=>[g(m(a.data.template.button_text.value),1)]),_:2},1032,["loading"])):a.type=="ScheduleTrigger"?(s(),w(Te,{key:1,title:r(n)("components.nodes.triggers.ScheduleTrigger.schedule_settings")},{extra:o(()=>[t(Q,null,{default:o(()=>[t(C,{type:"primary",onClick:ye,loading:b.value},{default:o(()=>[g(m(r(n)("components.nodes.triggers.ScheduleTrigger.save_schedule_settings")),1)]),_:1},8,["loading"]),t(ue,{title:r(n)("workspace.workflowSpace.delete_schedule_trigger_confirm"),onConfirm:Se},{default:o(()=>[t(C,{type:"primary",danger:""},{default:o(()=>[g(m(r(n)("workspace.workflowSpace.delete")),1)]),_:1})]),_:1},8,["title"])]),_:1})]),default:o(()=>[t(Re,{modelValue:a.data.template.schedule.value,"onUpdate:modelValue":j=>a.data.template.schedule.value=j,"button-props":{type:"primary",shape:"round"},locale:r(fe)},null,8,["modelValue","onUpdate:modelValue","locale"])]),_:2},1032,["title"])):x("",!0)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1},512),[[ae,!S.value]]),t(L,{xxl:S.value?24:18,xl:S.value?24:16,lg:S.value?24:14,md:24},{default:o(()=>[t(l,{level:3,style:{display:"flex","justify-content":"space-between"}},{default:o(()=>[I("span",null,[t(r(ut),{fill:"#28c5e5"}),g(" "+m(r(n)("workspace.workflowSpace.outputs")),1)]),I("span",null,[t(ce,{title:r(n)("workspace.workflowSpace.maximize_output")},{default:o(()=>[D(t(r(it),{onClick:u[2]||(u[2]=a=>S.value=!S.value)},null,512),[[ae,!S.value]])]),_:1},8,["title"]),t(ce,{title:r(n)("workspace.workflowSpace.normalize_output")},{default:o(()=>[D(t(r(ct),{onClick:u[3]||(u[3]=a=>S.value=!S.value)},null,512),[[ae,S.value]])]),_:1},8,["title"])])]),_:1}),t(de,{spinning:b.value},{default:o(()=>[t(V,{gutter:[16,16]},{default:o(()=>[(s(!0),f(R,null,F(T.value,(a,j)=>(s(),w(L,{span:24,class:"draggable-item",key:`node-${a.id}-${j}`},{default:o(()=>{var _;return[a.type=="Text"?(s(),f("div",ft,[t(l,{level:5},{default:o(()=>[g(m(a.data.template.output_title.value),1)]),_:2},1024),t(Xe,{text:a.data.template.text.value,renderMarkdown:a.data.template.render_markdown.value},null,8,["text","renderMarkdown"])])):a.type=="Document"?(s(),f("div",wt,[t(K,{onClick:bt=>We(a.data.template.output.value)},{default:o(()=>[g(m(a.data.template.output.value),1)]),_:2},1032,["onClick"])])):a.type=="Audio"?(s(),f("div",vt,[t(Ye,{audios:[(_=a.data.template.audio_url)==null?void 0:_.value]},null,8,["audios"])])):a.type=="Mindmap"?(s(),f("div",mt,[t(et,{content:a.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):a.type=="Mermaid"?(s(),f("div",ht,[t(tt,{content:a.data.template.content.value,style:{width:"100%","min-height":"50vh"}},null,8,["content"])])):a.type=="Echarts"?(s(),f("div",gt,[t(at,{option:a.data.template.option.value,style:{width:"100%","min-height":"50vh"}},null,8,["option"])])):(s(),f("div",yt,[a.field_type=="typography-paragraph"?(s(),f("div",St,[D(t(r(te),{source:a.value,class:"markdown-body custom-hljs ui-special-item"},null,8,["source"]),[[X]])])):x("",!0)]))]}),_:2},1024))),128))]),_:1})]),_:1},8,["spinning"])]),_:1},8,["xxl","xl","lg"])]),_:1})]),_:1},8,["spinning"]))}}},$t=nt(Lt,[["__scopeId","data-v-68ee690c"]]);export{$t as default}; diff --git a/backend/web/assets/WorkflowSpaceUse-de96bfae.css b/backend/web/assets/WorkflowSpaceUse-de96bfae.css new file mode 100644 index 00000000..423b149d --- /dev/null +++ b/backend/web/assets/WorkflowSpaceUse-de96bfae.css @@ -0,0 +1 @@ +.space-container[data-v-68ee690c]{height:calc(100vh - 64px)}.ui-special-item[data-v-68ee690c]{margin-bottom:24px}[data-v-68ee690c] .slick-dots{position:relative;height:auto}[data-v-68ee690c] .slick-slide img{border:5px solid #fff;display:block;margin:auto;max-width:80%;max-height:60vh}[data-v-68ee690c] .slick-arrow{display:none!important}[data-v-68ee690c] .slick-thumb{bottom:0}[data-v-68ee690c] .slick-thumb li{width:60px;height:45px}[data-v-68ee690c] .slick-thumb li img{width:100%;height:100%;filter:grayscale(100%);display:block}[data-v-68ee690c] .slick-thumb li.slick-active img{filter:grayscale(0%)} diff --git a/backend/web/assets/WorkflowTemplate-1699e51b.js b/backend/web/assets/WorkflowTemplate-1699e51b.js new file mode 100644 index 00000000..85946ded --- /dev/null +++ b/backend/web/assets/WorkflowTemplate-1699e51b.js @@ -0,0 +1 @@ +import{U as G,r as v,a8 as H,a9 as K,aa as q,D as z,am as J,a4 as h,P as o,an as O,o as l,e as i,c as e,K as d,x as t,R as r,H as n,u as c,G as p,y as V,F as S,I as D,V as Q,ao as X,a3 as Y}from"./index-ef7aa48c.js";import{_ as Z}from"./_plugin-vue_export-helper-c27b6911.js";const ee={key:0,class:"space-container"},te={style:{"margin-bottom":"10px"}},oe={style:{"margin-bottom":"10px"}},ae=["src"],se=["src"],le={__name:"WorkflowTemplate",setup(re){const{t:s}=G(),b=v(!0),U=v(!1),B=H(),T=K(),m=q(),C=B.params.workflowTemplateId,a=v({});z(async()=>{const u=await J("get_template",{tid:C});if(u.status!=200){h.error(s("workspace.workflowSpace.get_workflow_failed")),T.push({name:"Workspace"});return}a.value=u.data,b.value=!1});const N=async()=>{const u=await Y("create",a.value);if(u.status==200)h.success(s("workspace.workflowTemplate.add_success"));else{h.error(s("workspace.workflowTemplate.add_failed"));return}const x=a.value;m.addUserWorkflow(x),m.setUserWorkflowsTotal(m.userWorkflowsTotal+1),T.push({name:"WorkflowUse",params:{workflowId:u.data.wid}})};return(u,x)=>{const P=o("a-skeleton"),j=o("router-link"),W=o("a-breadcrumb-item"),M=o("a-breadcrumb"),R=o("a-typography-title"),f=o("a-typography-text"),w=o("a-divider"),A=o("a-tag"),k=o("a-space"),F=o("a-button"),y=o("a-col"),I=o("a-row"),L=o("a-carousel"),$=o("a-spin"),E=O("highlight");return b.value?(l(),i("div",ee,[e(P,{active:""})])):(l(),d($,{key:1,spinning:U.value,class:"space-container"},{default:t(()=>[e(M,null,{default:t(()=>[e(W,null,{default:t(()=>[e(j,{to:"/workflow?tab=official-workflow-templates"},{default:t(()=>[r(n(c(s)("workspace.workflowSpaceMain.official_workflow_template")),1)]),_:1})]),_:1}),e(W,null,{default:t(()=>[r(n(a.value.title),1)]),_:1})]),_:1}),e(I,{justify:"space-around"},{default:t(()=>[e(y,{lg:12,md:12,sm:24,xs:24},{default:t(()=>[e(R,null,{default:t(()=>[r(n(`${c(s)("workspace.workflowTemplate.template")}: ${a.value.title}`),1)]),_:1}),p("div",te,[e(k,null,{default:t(()=>[e(f,{type:"secondary"},{default:t(()=>[r(n(c(s)("common.update_time_format",{time:new Date(a.value.update_time).toLocaleString()})),1)]),_:1}),e(w,{type:"vertical"}),(l(!0),i(S,null,V(a.value.tags,(_,g)=>(l(),d(A,{color:_.color,key:g},{default:t(()=>[r(n(_.title),1)]),_:2},1032,["color"]))),128))]),_:1})]),p("div",oe,[e(k,null,{default:t(()=>[e(f,{type:"secondary"},{default:t(()=>[r(n(c(s)("workspace.workflowTemplate.author",{author:"VectorVein"})),1)]),_:1}),e(w,{type:"vertical"}),a.value.used_count>10?(l(),d(f,{key:0,type:"secondary"},{default:t(()=>[r(n(c(s)("workspace.workflowTemplate.used_count",{count:a.value.used_count})),1)]),_:1})):D("",!0)]),_:1})]),e(k,null,{default:t(()=>[e(F,{type:"primary",onClick:N},{default:t(()=>[r(n(c(s)("workspace.workflowTemplate.add_to_my_workflows")),1)]),_:1})]),_:1})]),_:1})]),_:1}),e(w),e(I,{justify:"space-around"},{default:t(()=>[a.value.images.length>0?(l(),d(y,{key:0,lg:12,md:12,sm:24,xs:24},{default:t(()=>[e(L,{autoplay:"",arrows:"","dots-class":"slick-dots slick-thumb"},{customPaging:t(_=>[p("a",null,[p("img",{src:a.value.images[_.i]},null,8,ae)])]),default:t(()=>[(l(!0),i(S,null,V(a.value.images,(_,g)=>(l(),i("div",{key:g},[p("img",{src:_},null,8,se)]))),128))]),_:1})]),_:1})):D("",!0),e(y,{lg:12,md:12,sm:24,xs:24},{default:t(()=>[Q(e(c(X),{source:a.value.brief,class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[E]])]),_:1})]),_:1})]),_:1},8,["spinning"]))}}},ue=Z(le,[["__scopeId","data-v-a33f182f"]]);export{ue as default}; diff --git a/backend/web/assets/WorkflowTemplate-99a45f9a.js b/backend/web/assets/WorkflowTemplate-99a45f9a.js deleted file mode 100644 index b4f3ce06..00000000 --- a/backend/web/assets/WorkflowTemplate-99a45f9a.js +++ /dev/null @@ -1 +0,0 @@ -import{U as G,r as v,a9 as H,aa as K,ab as q,D as z,ao as J,a2 as h,P as o,a5 as O,o as l,e as i,c as e,K as d,x as t,R as r,H as n,u as c,G as p,y as S,F as V,I as D,a7 as Q,a8 as X,a1 as Y}from"./index-51905ea3.js";import{_ as Z}from"./_plugin-vue_export-helper-c27b6911.js";const ee={key:0,class:"space-container"},te={style:{"margin-bottom":"10px"}},oe={style:{"margin-bottom":"10px"}},ae=["src"],se=["src"],le={__name:"WorkflowTemplate",setup(re){const{t:s}=G(),b=v(!0),U=v(!1),B=H(),T=K(),m=q(),C=B.params.workflowTemplateId,a=v({});z(async()=>{const u=await J("get_template",{tid:C});if(u.status!=200){h.error(s("workspace.workflowSpace.get_workflow_failed")),T.push({name:"Workspace"});return}a.value=u.data,b.value=!1});const N=async()=>{const u=await Y("create",a.value);if(u.status==200)h.success(s("workspace.workflowTemplate.add_success"));else{h.error(s("workspace.workflowTemplate.add_failed"));return}const x=a.value;m.addUserWorkflow(x),m.setUserWorkflowsTotal(m.userWorkflowsTotal+1),T.push({name:"WorkflowUse",params:{workflowId:u.data.wid}})};return(u,x)=>{const P=o("a-skeleton"),j=o("router-link"),W=o("a-breadcrumb-item"),M=o("a-breadcrumb"),R=o("a-typography-title"),f=o("a-typography-text"),w=o("a-divider"),A=o("a-tag"),k=o("a-space"),F=o("a-button"),y=o("a-col"),I=o("a-row"),L=o("a-carousel"),$=o("a-spin"),E=O("highlight");return b.value?(l(),i("div",ee,[e(P,{active:""})])):(l(),d($,{key:1,spinning:U.value,class:"space-container"},{default:t(()=>[e(M,null,{default:t(()=>[e(W,null,{default:t(()=>[e(j,{to:"/workflow?tab=official-workflow-templates"},{default:t(()=>[r(n(c(s)("workspace.workflowSpaceMain.official_workflow_template")),1)]),_:1})]),_:1}),e(W,null,{default:t(()=>[r(n(a.value.title),1)]),_:1})]),_:1}),e(I,{justify:"space-around"},{default:t(()=>[e(y,{lg:12,md:12,sm:24,xs:24},{default:t(()=>[e(R,null,{default:t(()=>[r(n(`${c(s)("workspace.workflowTemplate.template")}: ${a.value.title}`),1)]),_:1}),p("div",te,[e(k,null,{default:t(()=>[e(f,{type:"secondary"},{default:t(()=>[r(n(c(s)("common.update_time_format",{time:new Date(a.value.update_time).toLocaleString()})),1)]),_:1}),e(w,{type:"vertical"}),(l(!0),i(V,null,S(a.value.tags,(_,g)=>(l(),d(A,{color:_.color,key:g},{default:t(()=>[r(n(_.title),1)]),_:2},1032,["color"]))),128))]),_:1})]),p("div",oe,[e(k,null,{default:t(()=>[e(f,{type:"secondary"},{default:t(()=>[r(n(c(s)("workspace.workflowTemplate.author",{author:"VectorVein"})),1)]),_:1}),e(w,{type:"vertical"}),a.value.used_count>10?(l(),d(f,{key:0,type:"secondary"},{default:t(()=>[r(n(c(s)("workspace.workflowTemplate.used_count",{count:a.value.used_count})),1)]),_:1})):D("",!0)]),_:1})]),e(k,null,{default:t(()=>[e(F,{type:"primary",onClick:N},{default:t(()=>[r(n(c(s)("workspace.workflowTemplate.add_to_my_workflows")),1)]),_:1})]),_:1})]),_:1})]),_:1}),e(w),e(I,{justify:"space-around"},{default:t(()=>[a.value.images.length>0?(l(),d(y,{key:0,lg:12,md:12,sm:24,xs:24},{default:t(()=>[e(L,{autoplay:"",arrows:"","dots-class":"slick-dots slick-thumb"},{customPaging:t(_=>[p("a",null,[p("img",{src:a.value.images[_.i]},null,8,ae)])]),default:t(()=>[(l(!0),i(V,null,S(a.value.images,(_,g)=>(l(),i("div",{key:g},[p("img",{src:_},null,8,se)]))),128))]),_:1})]),_:1})):D("",!0),e(y,{lg:12,md:12,sm:24,xs:24},{default:t(()=>[Q(e(c(X),{source:a.value.brief,class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[E]])]),_:1})]),_:1})]),_:1},8,["spinning"]))}}},ue=Z(le,[["__scopeId","data-v-a33f182f"]]);export{ue as default}; diff --git a/backend/web/assets/arc-b070a76c.js b/backend/web/assets/arc-b070a76c.js new file mode 100644 index 00000000..ea70d2df --- /dev/null +++ b/backend/web/assets/arc-b070a76c.js @@ -0,0 +1 @@ +import{w as ln,c as z}from"./path-53f90ab3.js";import{am as an,an as G,ao as q,ap as rn,aq as y,$ as on,ar as K,as as _,at as un,au as t,av as sn,aw as tn,ax as fn}from"./TextOutput-39ff842e.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function xn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,m=a-A,r=m*O-n*i;if(!(r*ru*u+F*F&&($=P,j=x),{cx:$,cy:j,x01:-n,y01:-m,x11:$*(v/T-1),y11:j*(v/T-1)}}function vn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=mn,B=pn,a=null,O=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=A.apply(this,arguments)-rn,C=un(c-f),o=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(C>on-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*G(c),r*q(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,R=f,T=c,w=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(r*r+s*s)),P=_(un(s-r)/2,+I.apply(this,arguments)),x=P,d=P,e,u;if(j>y){var F=sn(j/r*q($)),L=sn(j/s*q($));(w-=F*2)>y?(F*=o?1:-1,R+=F,T-=F):(w=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=o?1:-1,p+=L,g-=L):(S=0,p=g=(f+c)/2)}var H=s*G(p),J=s*q(p),M=r*G(T),N=r*q(T);if(P>y){var Q=s*G(g),U=s*q(g),W=r*G(R),X=r*q(R),E;if(Cy?d>y?(e=V(W,X,H,J,s,d,o),u=V(Q,U,M,N,s,d,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),dy)||!(w>y)?a.lineTo(M,N):x>y?(e=V(M,N,Q,U,r,-x,o),u=V(H,J,W,X,r,-x,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),xu*u+F*F&&(Z=P,j=d),{cx:Z,cy:j,x01:-n,y01:-m,x11:Z*(v/T-1),y11:j*(v/T-1)}}function vn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=mn,B=pn,a=null,O=ln(i);function i(){var n,m,r=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-rn,c=A.apply(this,arguments)-rn,C=un(c-f),o=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(C>on-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!o),r>y&&(a.moveTo(r*G(c),r*q(c)),a.arc(0,0,r,c,f,o));else{var p=f,g=c,R=f,T=c,w=C,S=C,Z=B.apply(this,arguments)/2,j=Z>y&&(D?+D.apply(this,arguments):K(r*r+s*s)),P=_(un(s-r)/2,+I.apply(this,arguments)),d=P,x=P,e,u;if(j>y){var F=sn(j/r*q(Z)),L=sn(j/s*q(Z));(w-=F*2)>y?(F*=o?1:-1,R+=F,T-=F):(w=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=o?1:-1,p+=L,g-=L):(S=0,p=g=(f+c)/2)}var H=s*G(p),J=s*q(p),M=r*G(T),N=r*q(T);if(P>y){var Q=s*G(g),U=s*q(g),W=r*G(R),X=r*q(R),E;if(Cy?x>y?(e=V(W,X,H,J,s,x,o),u=V(Q,U,M,N,s,x,o),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(w>y)?a.lineTo(M,N):d>y?(e=V(M,N,Q,U,r,-d,o),u=V(H,J,W,X,r,-d,o),a.lineTo(e.cx+e.x01,e.cy+e.y01),d"u"&&(D.yylloc={});var se=D.yylloc;h.push(se);var Ne=D.options&&D.options.ranges;typeof Mt.yy.parseError=="function"?this.parseError=Mt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Be(){var z;return z=g.pop()||D.lex()||ge,typeof z!="number"&&(z instanceof Array&&(g=z,z=g.pop()),z=x.symbols_[z]||z),z}for(var M,Lt,N,ae,Bt={},zt,X,be,Wt;;){if(Lt=m[m.length-1],this.defaultActions[Lt]?N=this.defaultActions[Lt]:((M===null||typeof M>"u")&&(M=Be()),N=Vt[Lt]&&Vt[Lt][M]),typeof N>"u"||!N.length||!N[0]){var re="";Wt=[];for(zt in Vt[Lt])this.terminals_[zt]&&zt>Me&&Wt.push("'"+this.terminals_[zt]+"'");D.showPosition?re="Parse error on line "+(Pt+1)+`: +import{s as Ye,g as Ie,h as Ve,i as je,j as Ut,k as Ee,m as Ue,l as Fe,n as Yt,o as Qt,p as _e,q as Xe,w as ze,r as le,t as xe,u as We}from"./TextOutput-39ff842e.js";import{d as Qe,g as He}from"./svgDrawCommon-42e92da3-fd0afe46.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";var qt=function(){var e=function(Ot,_,x,m){for(x=x||{},m=Ot.length;m--;x[Ot[m]]=_);return x},t=[1,6],a=[1,7],o=[1,8],l=[1,9],i=[1,16],s=[1,11],r=[1,12],n=[1,13],u=[1,14],y=[1,15],d=[1,27],p=[1,33],C=[1,34],T=[1,35],R=[1,36],S=[1,37],L=[1,72],Y=[1,73],Q=[1,74],H=[1,75],q=[1,76],G=[1,77],K=[1,78],J=[1,38],Z=[1,39],$=[1,40],tt=[1,41],et=[1,42],it=[1,43],nt=[1,44],st=[1,45],at=[1,46],rt=[1,47],lt=[1,48],ot=[1,49],ct=[1,50],ht=[1,51],ut=[1,52],dt=[1,53],ft=[1,54],pt=[1,55],yt=[1,56],gt=[1,57],bt=[1,59],_t=[1,60],xt=[1,61],mt=[1,62],vt=[1,63],Et=[1,64],kt=[1,65],At=[1,66],Ct=[1,67],wt=[1,68],Tt=[1,69],Nt=[24,52],$t=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],It=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],v=[1,94],E=[1,95],k=[1,96],A=[1,97],w=[15,24,52],fe=[7,8,9,10,18,22,25,26,27,28],pe=[15,24,43,52],Xt=[15,24,43,52,86,87,89,90],St=[15,43],te=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],ee={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(_,x,m,g,O,h,Vt){var f=h.length-1;switch(O){case 4:g.setDirection("TB");break;case 5:g.setDirection("BT");break;case 6:g.setDirection("RL");break;case 7:g.setDirection("LR");break;case 11:g.parseDirective("%%{","open_directive");break;case 12:break;case 13:h[f]=h[f].trim().replace(/'/g,'"'),g.parseDirective(h[f],"arg_directive");break;case 14:g.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:g.setC4Type(h[f-3]);break;case 26:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 27:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 28:this.$=h[f].trim(),g.setTitle(this.$);break;case 29:case 30:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 35:case 36:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 37:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 38:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 39:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 40:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 41:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 42:g.popBoundaryParseStack();break;case 46:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 47:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 48:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 49:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 50:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 51:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 52:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 53:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 54:g.addContainer("container",...h[f]),this.$=h[f];break;case 55:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 56:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 57:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 58:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 59:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 60:g.addComponent("component",...h[f]),this.$=h[f];break;case 61:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 62:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 63:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 64:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 65:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 67:g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.addRel("birel",...h[f]),this.$=h[f];break;case 69:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 70:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 71:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 72:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 73:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 74:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 75:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 76:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 77:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 78:this.$=[h[f]];break;case 79:h[f].unshift(h[f-1]),this.$=h[f];break;case 80:case 82:this.$=h[f].trim();break;case 81:let Pt={};Pt[h[f-1].trim()]=h[f].trim(),this.$=Pt;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:t,8:a,9:o,10:l,11:5,12:10,18:i,22:s,25:r,26:n,27:u,28:y},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:t,8:a,9:o,10:l,11:5,12:10,18:i,22:s,25:r,26:n,27:u,28:y},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:d},e([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:p,33:C,34:T,36:R,38:S,39:58,40:70,42:71,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,53:32,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt},{23:79,29:29,30:30,31:31,32:p,33:C,34:T,36:R,38:S,39:58,40:70,42:71,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,53:32,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt},{23:80,29:29,30:30,31:31,32:p,33:C,34:T,36:R,38:S,39:58,40:70,42:71,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,53:32,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt},{23:81,29:29,30:30,31:31,32:p,33:C,34:T,36:R,38:S,39:58,40:70,42:71,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,53:32,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt},{23:82,29:29,30:30,31:31,32:p,33:C,34:T,36:R,38:S,39:58,40:70,42:71,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,53:32,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},e(Nt,[2,20],{53:32,39:58,40:70,42:71,30:87,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt}),e(Nt,[2,21]),e($t,[2,23],{15:[1,88]}),e(Nt,[2,43],{15:[1,89]}),e(It,[2,26]),e(It,[2,27]),{35:[1,90]},{37:[1,91]},e(It,[2,30]),{45:92,85:93,86:v,87:E,89:k,90:A},{45:98,85:93,86:v,87:E,89:k,90:A},{45:99,85:93,86:v,87:E,89:k,90:A},{45:100,85:93,86:v,87:E,89:k,90:A},{45:101,85:93,86:v,87:E,89:k,90:A},{45:102,85:93,86:v,87:E,89:k,90:A},{45:103,85:93,86:v,87:E,89:k,90:A},{45:104,85:93,86:v,87:E,89:k,90:A},{45:105,85:93,86:v,87:E,89:k,90:A},{45:106,85:93,86:v,87:E,89:k,90:A},{45:107,85:93,86:v,87:E,89:k,90:A},{45:108,85:93,86:v,87:E,89:k,90:A},{45:109,85:93,86:v,87:E,89:k,90:A},{45:110,85:93,86:v,87:E,89:k,90:A},{45:111,85:93,86:v,87:E,89:k,90:A},{45:112,85:93,86:v,87:E,89:k,90:A},{45:113,85:93,86:v,87:E,89:k,90:A},{45:114,85:93,86:v,87:E,89:k,90:A},{45:115,85:93,86:v,87:E,89:k,90:A},{45:116,85:93,86:v,87:E,89:k,90:A},e(w,[2,66]),{45:117,85:93,86:v,87:E,89:k,90:A},{45:118,85:93,86:v,87:E,89:k,90:A},{45:119,85:93,86:v,87:E,89:k,90:A},{45:120,85:93,86:v,87:E,89:k,90:A},{45:121,85:93,86:v,87:E,89:k,90:A},{45:122,85:93,86:v,87:E,89:k,90:A},{45:123,85:93,86:v,87:E,89:k,90:A},{45:124,85:93,86:v,87:E,89:k,90:A},{45:125,85:93,86:v,87:E,89:k,90:A},{45:126,85:93,86:v,87:E,89:k,90:A},{45:127,85:93,86:v,87:E,89:k,90:A},{30:128,39:58,40:70,42:71,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,53:32,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt},{15:[1,130],43:[1,129]},{45:131,85:93,86:v,87:E,89:k,90:A},{45:132,85:93,86:v,87:E,89:k,90:A},{45:133,85:93,86:v,87:E,89:k,90:A},{45:134,85:93,86:v,87:E,89:k,90:A},{45:135,85:93,86:v,87:E,89:k,90:A},{45:136,85:93,86:v,87:E,89:k,90:A},{45:137,85:93,86:v,87:E,89:k,90:A},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},e(fe,[2,9]),{14:142,21:d},{21:[2,13]},{1:[2,15]},e(Nt,[2,22]),e($t,[2,24],{31:31,29:143,32:p,33:C,34:T,36:R,38:S}),e(Nt,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:p,33:C,34:T,36:R,38:S,44:L,46:Y,47:Q,48:H,49:q,50:G,51:K,54:J,55:Z,56:$,57:tt,58:et,59:it,60:nt,61:st,62:at,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt,75:_t,76:xt,77:mt,78:vt,79:Et,80:kt,81:At,82:Ct,83:wt,84:Tt}),e(It,[2,28]),e(It,[2,29]),e(w,[2,46]),e(pe,[2,78],{85:93,45:145,86:v,87:E,89:k,90:A}),e(Xt,[2,80]),{88:[1,146]},e(Xt,[2,82]),e(Xt,[2,83]),e(w,[2,47]),e(w,[2,48]),e(w,[2,49]),e(w,[2,50]),e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(w,[2,59]),e(w,[2,60]),e(w,[2,61]),e(w,[2,62]),e(w,[2,63]),e(w,[2,64]),e(w,[2,65]),e(w,[2,67]),e(w,[2,68]),e(w,[2,69]),e(w,[2,70]),e(w,[2,71]),e(w,[2,72]),e(w,[2,73]),e(w,[2,74]),e(w,[2,75]),e(w,[2,76]),e(w,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},e(St,[2,35]),e(St,[2,36]),e(St,[2,37]),e(St,[2,38]),e(St,[2,39]),e(St,[2,40]),e(St,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},e($t,[2,25]),e(Nt,[2,45]),e(pe,[2,79]),e(Xt,[2,81]),e(w,[2,31]),e(w,[2,42]),e(te,[2,32]),e(te,[2,33],{15:[1,152]}),e(fe,[2,10]),e(te,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(_,x){if(x.recoverable)this.trace(_);else{var m=new Error(_);throw m.hash=x,m}},parse:function(_){var x=this,m=[0],g=[],O=[null],h=[],Vt=this.table,f="",Pt=0,ye=0,Me=2,ge=1,Le=h.slice.call(arguments,1),D=Object.create(this.lexer),Mt={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(Mt.yy[ne]=this.yy[ne]);D.setInput(_,Mt.yy),Mt.yy.lexer=D,Mt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var se=D.yylloc;h.push(se);var Ne=D.options&&D.options.ranges;typeof Mt.yy.parseError=="function"?this.parseError=Mt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Be(){var z;return z=g.pop()||D.lex()||ge,typeof z!="number"&&(z instanceof Array&&(g=z,z=g.pop()),z=x.symbols_[z]||z),z}for(var M,Lt,N,ae,Bt={},zt,X,be,Wt;;){if(Lt=m[m.length-1],this.defaultActions[Lt]?N=this.defaultActions[Lt]:((M===null||typeof M>"u")&&(M=Be()),N=Vt[Lt]&&Vt[Lt][M]),typeof N>"u"||!N.length||!N[0]){var re="";Wt=[];for(zt in Vt[Lt])this.terminals_[zt]&&zt>Me&&Wt.push("'"+this.terminals_[zt]+"'");D.showPosition?re="Parse error on line "+(Pt+1)+`: `+D.showPosition()+` Expecting `+Wt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":re="Parse error on line "+(Pt+1)+": Unexpected "+(M==ge?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(re,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:se,expected:Wt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lt+", token: "+M);switch(N[0]){case 1:m.push(M),O.push(D.yytext),h.push(D.yylloc),m.push(N[1]),M=null,ye=D.yyleng,f=D.yytext,Pt=D.yylineno,se=D.yylloc;break;case 2:if(X=this.productions_[N[1]][1],Bt.$=O[O.length-X],Bt._$={first_line:h[h.length-(X||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(X||1)].first_column,last_column:h[h.length-1].last_column},Ne&&(Bt._$.range=[h[h.length-(X||1)].range[0],h[h.length-1].range[1]]),ae=this.performAction.apply(Bt,[f,ye,Pt,Mt.yy,N[1],O,h].concat(Le)),typeof ae<"u")return ae;X&&(m=m.slice(0,-1*X*2),O=O.slice(0,-1*X),h=h.slice(0,-1*X)),m.push(this.productions_[N[1]][0]),O.push(Bt.$),h.push(Bt._$),be=Vt[m[m.length-2]][m[m.length-1]],m.push(be);break;case 3:return!0}}return!0}},Pe=function(){var Ot={EOF:1,parseError:function(x,m){if(this.yy.parser)this.yy.parser.parseError(x,m);else throw new Error(x)},setInput:function(_,x){return this.yy=x||this.yy||{},this._input=_,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 _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var x=_.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},unput:function(_){var x=_.length,m=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var g=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),m.length-1&&(this.yylineno-=m.length-1);var O=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:m?(m.length===g.length?this.yylloc.first_column:0)+g[g.length-m.length].length-m[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(_){this.unput(this.match.slice(_))},pastInput:function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var _=this.pastInput(),x=new Array(_.length+1).join("-");return _+this.upcomingInput()+` diff --git a/backend/web/assets/classDiagram-a8cc8886-0f4296f8.js b/backend/web/assets/classDiagram-a8cc8886-0f4296f8.js new file mode 100644 index 00000000..1cba98af --- /dev/null +++ b/backend/web/assets/classDiagram-a8cc8886-0f4296f8.js @@ -0,0 +1 @@ +import{p as N,d as M,s as W}from"./styles-622362e4-fd075d51.js";import{j as S,p as d,o as u,q as H}from"./TextOutput-39ff842e.js";import{G as X,l as Y}from"./layout-218ba7ee.js";import{s as l}from"./svgDraw-70101091-6aa9b265.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./line-971ba693.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let h={};const g=20,p=function(e){const s=Object.entries(h).find(k=>k[1].label===e);if(s)return s[0]},Z=function(e){e.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"),e.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"),e.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"),e.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"),e.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"),e.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"),e.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"),e.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")},D=function(e,s,k,a){const c=S().class;h={},d.info("Rendering diagram "+e);const L=S().securityLevel;let y;L==="sandbox"&&(y=u("#i"+s));const x=L==="sandbox"?u(y.nodes()[0].contentDocument.body):u("body"),n=x.select(`[id='${s}']`);Z(n);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=a.db.getClasses(),$=Object.keys(m);for(const t of $){const o=m[t],i=l.drawClass(n,o,c,a);h[i.id]=i,r.setNode(i.id,i),d.info("Org height: "+i.height)}a.db.getRelations().forEach(function(t){d.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),r.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")}),a.db.getNotes().forEach(function(t){d.debug(`Adding note: ${JSON.stringify(t)}`);const o=l.drawNote(n,t,c,a);h[o.id]=o,r.setNode(o.id,o),t.class&&t.class in m&&r.setEdge(t.id,p(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Y(r),r.nodes().forEach(function(t){t!==void 0&&r.node(t)!==void 0&&(d.debug("Node "+t+": "+JSON.stringify(r.node(t))),x.select("#"+(a.db.lookUpDomId(t)||t)).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))}),r.edges().forEach(function(t){t!==void 0&&r.edge(t)!==void 0&&(d.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),l.drawEdge(n,r.edge(t),r.edge(t).relation,c,a))});const f=n.node().getBBox(),E=f.width+g*2,b=f.height+g*2;H(n,b,E,c.useMaxWidth);const w=`${f.x-g} ${f.y-g} ${E} ${b}`;d.debug(`viewBox ${w}`),n.attr("viewBox",w)},B={draw:D},q={parser:N,db:M,renderer:B,styles:W,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()}};export{q as diagram}; diff --git a/backend/web/assets/classDiagram-a8cc8886-5888c769.js b/backend/web/assets/classDiagram-a8cc8886-5888c769.js deleted file mode 100644 index 99612a04..00000000 --- a/backend/web/assets/classDiagram-a8cc8886-5888c769.js +++ /dev/null @@ -1 +0,0 @@ -import{p as N,d as M,s as W}from"./styles-622362e4-1f0c29e6.js";import{i as S,o as d,n as u,p as H}from"./EchartsRenderer-3d08027d.js";import{G as X,l as Y}from"./layout-e00002c0.js";import{s as l}from"./svgDraw-70101091-699797c4.js";import"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./line-7fbcfe17.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";let h={};const g=20,p=function(e){const s=Object.entries(h).find(k=>k[1].label===e);if(s)return s[0]},Z=function(e){e.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"),e.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"),e.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"),e.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"),e.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"),e.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"),e.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"),e.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")},D=function(e,s,k,a){const c=S().class;h={},d.info("Rendering diagram "+e);const L=S().securityLevel;let y;L==="sandbox"&&(y=u("#i"+s));const x=L==="sandbox"?u(y.nodes()[0].contentDocument.body):u("body"),n=x.select(`[id='${s}']`);Z(n);const r=new X({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const m=a.db.getClasses(),$=Object.keys(m);for(const t of $){const o=m[t],i=l.drawClass(n,o,c,a);h[i.id]=i,r.setNode(i.id,i),d.info("Org height: "+i.height)}a.db.getRelations().forEach(function(t){d.info("tjoho"+p(t.id1)+p(t.id2)+JSON.stringify(t)),r.setEdge(p(t.id1),p(t.id2),{relation:t},t.title||"DEFAULT")}),a.db.getNotes().forEach(function(t){d.debug(`Adding note: ${JSON.stringify(t)}`);const o=l.drawNote(n,t,c,a);h[o.id]=o,r.setNode(o.id,o),t.class&&t.class in m&&r.setEdge(t.id,p(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Y(r),r.nodes().forEach(function(t){t!==void 0&&r.node(t)!==void 0&&(d.debug("Node "+t+": "+JSON.stringify(r.node(t))),x.select("#"+(a.db.lookUpDomId(t)||t)).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))}),r.edges().forEach(function(t){t!==void 0&&r.edge(t)!==void 0&&(d.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),l.drawEdge(n,r.edge(t),r.edge(t).relation,c,a))});const f=n.node().getBBox(),E=f.width+g*2,b=f.height+g*2;H(n,b,E,c.useMaxWidth);const w=`${f.x-g} ${f.y-g} ${E} ${b}`;d.debug(`viewBox ${w}`),n.attr("viewBox",w)},B={draw:D},z={parser:N,db:M,renderer:B,styles:W,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,M.clear()}};export{z as diagram}; diff --git a/backend/web/assets/classDiagram-v2-802a48d3-8a1fcf07.js b/backend/web/assets/classDiagram-v2-802a48d3-8a1fcf07.js deleted file mode 100644 index 2bd25f95..00000000 --- a/backend/web/assets/classDiagram-v2-802a48d3-8a1fcf07.js +++ /dev/null @@ -1,2 +0,0 @@ -import{p as I,d as N,s as M}from"./styles-622362e4-1f0c29e6.js";import{o as d,i as c,n as w,F as R,z as B,y as E,u as _,v as G,q as C}from"./EchartsRenderer-3d08027d.js";import{G as z}from"./layout-e00002c0.js";import{r as q}from"./index-f58d48f9-594fab58.js";import"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./edges-0005682e-04b6df38.js";import"./createText-3b1f58a4-cf050b71.js";import"./svgDraw-70101091-699797c4.js";import"./line-7fbcfe17.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>C.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const F=function(s,t,y,n){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),A(l.classes,t,y,n,l.id),d.info("setNode",p)})},A=function(s,t,y,n,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const a=s[o],p=a.cssClasses.join(" "),f={labelStyle:"",style:""},h=a.label??a.id,b=0,m="class_box",u={labelStyle:f.labelStyle,shape:m,labelText:S(h),classData:a,rx:b,ry:b,class:p,style:f.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(a.id,u),e&&t.setParent(a.id,e),d.info("setNode",u)})},P=function(s,t,y,n){d.info(s),s.forEach(function(e,i){var o,r;const l=e,a="",p={labelStyle:"",style:""},f=l.text,h=0,b="note",m={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:h,ry:h,class:a,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,m),d.info("setNode",m),!l.class||!(l.class in n))return;const u=y+i,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,g,u)})},H=function(s,t){const y=c().flowchart;let n=0;s.forEach(function(e){var i;n++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+n,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=G(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label=''+e.text+""):(o.labelType="text",o.label=e.text.replace(C.lineBreakRegex,` -`),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,n)})},V=function(s){k={...k,...s}},W=async function(s,t,y,n){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=n.db.getNamespaces(),p=n.db.getClasses(),f=n.db.getRelations(),h=n.db.getNotes();d.info(f),F(a,l,t,n),A(p,l,t,n),H(f,l),P(h,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const m=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=m.select(`[id="${t}"]`),g=m.select("#"+t+" g");if(await q(g,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),R.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,n.db.getDiagramTitle()),B(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,$=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const x of $){const L=x.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),x.insertBefore(v,x.firstChild)}}};function D(s){let t;switch(s){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 J={setConf:V,draw:W},se={parser:I,db:N,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{se as diagram}; diff --git a/backend/web/assets/classDiagram-v2-802a48d3-d939e561.js b/backend/web/assets/classDiagram-v2-802a48d3-d939e561.js new file mode 100644 index 00000000..bfe6ef30 --- /dev/null +++ b/backend/web/assets/classDiagram-v2-802a48d3-d939e561.js @@ -0,0 +1,2 @@ +import{p as I,d as N,s as M}from"./styles-622362e4-fd075d51.js";import{p as d,j as c,o as w,G,A as R,z as E,v as _,x as B,r as A}from"./TextOutput-39ff842e.js";import{G as z}from"./layout-218ba7ee.js";import{r as P}from"./index-f58d48f9-4ae439b4.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./edges-0005682e-ae86cacb.js";import"./createText-3b1f58a4-cb14bcdc.js";import"./svgDraw-70101091-6aa9b265.js";import"./line-971ba693.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const S=s=>A.sanitizeText(s,c());let k={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,t,y,n){const e=Object.keys(s);d.info("keys:",e),d.info(s),e.forEach(function(i){var o,r;const l=s[i],p={shape:"rect",id:l.id,domId:l.domId,labelText:S(l.id),labelStyle:"",style:"fill: none; stroke: black",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};t.setNode(l.id,p),C(l.classes,t,y,n,l.id),d.info("setNode",p)})},C=function(s,t,y,n,e){const i=Object.keys(s);d.info("keys:",i),d.info(s),i.filter(o=>s[o].parent==e).forEach(function(o){var r,l;const a=s[o],p=a.cssClasses.join(" "),f={labelStyle:"",style:""},h=a.label??a.id,b=0,m="class_box",u={labelStyle:f.labelStyle,shape:m,labelText:S(h),classData:a,rx:b,ry:b,class:p,style:f.style,id:a.id,domId:a.domId,tooltip:n.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((r=c().flowchart)==null?void 0:r.padding)??((l=c().class)==null?void 0:l.padding)};t.setNode(a.id,u),e&&t.setParent(a.id,e),d.info("setNode",u)})},F=function(s,t,y,n){d.info(s),s.forEach(function(e,i){var o,r;const l=e,a="",p={labelStyle:"",style:""},f=l.text,h=0,b="note",m={labelStyle:p.labelStyle,shape:b,labelText:S(f),noteData:l,rx:h,ry:h,class:a,style:p.style,id:l.id,domId:l.id,tooltip:"",type:"note",padding:((o=c().flowchart)==null?void 0:o.padding)??((r=c().class)==null?void 0:r.padding)};if(t.setNode(l.id,m),d.info("setNode",m),!l.class||!(l.class in n))return;const u=y+i,x={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:E(k.curve,_)};t.setEdge(l.id,l.class,x,u)})},H=function(s,t){const y=c().flowchart;let n=0;s.forEach(function(e){var i;n++;const o={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:"id"+n,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:D(e.relation.type1),arrowTypeEnd:D(e.relation.type2),style:"fill:none",labelStyle:"",curve:E(y==null?void 0:y.curve,_)};if(d.info(o,e),e.style!==void 0){const r=B(e.style);o.style=r.style,o.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(o.arrowheadStyle="fill: #333"):(o.arrowheadStyle="fill: #333",o.labelpos="c",((i=c().flowchart)==null?void 0:i.htmlLabels)??c().htmlLabels?(o.labelType="html",o.label=''+e.text+""):(o.labelType="text",o.label=e.text.replace(A.lineBreakRegex,` +`),e.style===void 0&&(o.style=o.style||"stroke: #333; stroke-width: 1.5px;fill:none"),o.labelStyle=o.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,o,n)})},V=function(s){k={...k,...s}},W=async function(s,t,y,n){d.info("Drawing class - ",t);const e=c().flowchart??c().class,i=c().securityLevel;d.info("config:",e);const o=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,l=new z({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=n.db.getNamespaces(),p=n.db.getClasses(),f=n.db.getRelations(),h=n.db.getNotes();d.info(f),q(a,l,t,n),C(p,l,t,n),H(f,l),F(h,l,f.length+1,p);let b;i==="sandbox"&&(b=w("#i"+t));const m=i==="sandbox"?w(b.nodes()[0].contentDocument.body):w("body"),u=m.select(`[id="${t}"]`),x=m.select("#"+t+" g");if(await P(x,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),G.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,n.db.getDiagramTitle()),R(l,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const T=i==="sandbox"?b.nodes()[0].contentDocument:document,$=T.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const g of $){const L=g.getBBox(),v=T.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),g.insertBefore(v,g.firstChild)}}};function D(s){let t;switch(s){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 J={setConf:V,draw:W},se={parser:I,db:N,renderer:J,styles:M,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,N.clear()}};export{se as diagram}; diff --git a/backend/web/assets/createText-3b1f58a4-cb14bcdc.js b/backend/web/assets/createText-3b1f58a4-cb14bcdc.js new file mode 100644 index 00000000..2b0b557b --- /dev/null +++ b/backend/web/assets/createText-3b1f58a4-cb14bcdc.js @@ -0,0 +1,7 @@ +import{p as At,ah as zt,ay as It}from"./TextOutput-39ff842e.js";const Tt={};function Bt(n,r){const t=r||Tt,e=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return nt(n,e,u)}function nt(n,r,t){if(Lt(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Hn(n.children,r,t)}return Array.isArray(n)?Hn(n,r,t):""}function Hn(n,r,t){const e=[];let u=-1;for(;++uu?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i0?(tn(n,n.length,0,r),n):r}const Nn={}.hasOwnProperty;function Ot(n){const r={};let t=-1;for(;++tl))return;const T=r.events.length;let H=T,N,V;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(N){V=r.events[H][1].end;break}N=!0}for(b(e),k=T;kF;){const _=t[D];r.containerState=_[1],_[0].exit.call(r,n)}t.length=F}function j(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Ut(n,r,t){return O(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wn(n){if(n===null||Z(n)||Ht(n))return 1;if(qt(n))return 2}function Ln(n,r,t){const e=[];let u=-1;for(;++u1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[e][1].end),x=Object.assign({},n[t][1].start);Qn(f,-m),Qn(x,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[e][1].end)},a={type:m>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:x},i={type:m>1?"strongText":"emphasisText",start:Object.assign({},n[e][1].end),end:Object.assign({},n[t][1].start)},u={type:m>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},n[e][1].end=Object.assign({},l.start),n[t][1].start=Object.assign({},a.end),c=[],n[e][1].end.offset-n[e][1].start.offset&&(c=Y(c,[["enter",n[e][1],r],["exit",n[e][1],r]])),c=Y(c,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),c=Y(c,Ln(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),c=Y(c,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,c=Y(c,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,tn(n,e-1,t-e+3,c),t=e+c.length-p-2;break}}for(t=-1;++t0&&z(k)?O(n,j,"linePrefix",i+1)(k):j(k)}function j(k){return k===null||C(k)?n.check($n,I,D)(k):(n.enter("codeFlowValue"),F(k))}function F(k){return k===null||C(k)?(n.exit("codeFlowValue"),j(k)):(n.consume(k),F)}function D(k){return n.exit("codeFenced"),r(k)}function _(k,T,H){let N=0;return V;function V(w){return k.enter("lineEnding"),k.consume(w),k.exit("lineEnding"),y}function y(w){return k.enter("codeFencedFence"),z(w)?O(k,S,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):S(w)}function S(w){return w===a?(k.enter("codeFencedFenceSequence"),P(w)):H(w)}function P(w){return w===a?(N++,k.consume(w),P):N>=l?(k.exit("codeFencedFenceSequence"),z(w)?O(k,R,"whitespace")(w):R(w)):H(w)}function R(w){return w===null||C(w)?(k.exit("codeFencedFence"),T(w)):H(w)}}}function re(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const Cn={name:"codeIndented",tokenize:ue},ie={tokenize:le,partial:!0};function ue(n,r,t){const e=this;return u;function u(c){return n.enter("codeIndented"),O(n,i,"linePrefix",4+1)(c)}function i(c){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(c):t(c)}function l(c){return c===null?m(c):C(c)?n.attempt(ie,l,m)(c):(n.enter("codeFlowValue"),a(c))}function a(c){return c===null||C(c)?(n.exit("codeFlowValue"),l(c)):(n.consume(c),a)}function m(c){return n.exit("codeIndented"),r(c)}}function le(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):O(n,i,"linePrefix",4+1)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):C(l)?u(l):t(l)}}const ae={name:"codeText",tokenize:ce,resolve:oe,previous:se};function oe(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function ut(n,r,t,e,u,i,l,a,m){const c=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(b){return b===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(b),n.exit(i),x):b===null||b===32||b===41||An(b)?t(b):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),I(b))}function x(b){return b===62?(n.enter(i),n.consume(b),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(n.exit("chunkString"),n.exit(a),x(b)):b===null||b===60||C(b)?t(b):(n.consume(b),b===92?A:h)}function A(b){return b===60||b===62||b===92?(n.consume(b),h):h(b)}function I(b){return!p&&(b===null||b===41||Z(b))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(b)):p999||h===null||h===91||h===93&&!m||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(n.exit(i),n.enter(u),n.consume(h),n.exit(u),n.exit(e),r):C(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||C(h)||a++>999?(n.exit("chunkString"),p(h)):(n.consume(h),m||(m=!z(h)),h===92?x:f)}function x(h){return h===91||h===92||h===93?(n.consume(h),a++,f):f(h)}}function at(n,r,t,e,u,i){let l;return a;function a(x){return x===34||x===39||x===40?(n.enter(e),n.enter(u),n.consume(x),n.exit(u),l=x===40?41:x,m):t(x)}function m(x){return x===l?(n.enter(u),n.consume(x),n.exit(u),n.exit(e),r):(n.enter(i),c(x))}function c(x){return x===l?(n.exit(i),m(l)):x===null?t(x):C(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),O(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||C(x)?(n.exit("chunkString"),c(x)):(n.consume(x),x===92?f:p)}function f(x){return x===l||x===92?(n.consume(x),p):p(x)}}function dn(n,r){let t;return e;function e(u){return C(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):z(u)?O(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}function xn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ke={name:"definition",tokenize:be},de={tokenize:ye,partial:!0};function be(n,r,t){const e=this;let u;return i;function i(h){return n.enter("definition"),l(h)}function l(h){return lt.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return u=xn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),h===58?(n.enter("definitionMarker"),n.consume(h),n.exit("definitionMarker"),m):t(h)}function m(h){return Z(h)?dn(n,c)(h):c(h)}function c(h){return ut(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function p(h){return n.attempt(de,f,f)(h)}function f(h){return z(h)?O(n,x,"whitespace")(h):x(h)}function x(h){return h===null||C(h)?(n.exit("definition"),e.parser.defined.push(u),r(h)):t(h)}}function ye(n,r,t){return e;function e(a){return Z(a)?dn(n,u)(a):t(a)}function u(a){return at(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return z(a)?O(n,l,"whitespace")(a):l(a)}function l(a){return a===null||C(a)?r(a):t(a)}}const Se={name:"hardBreakEscape",tokenize:Fe};function Fe(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return C(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const Ee={name:"headingAtx",tokenize:we,resolve:Ce};function Ce(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},tn(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function we(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||Z(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||C(p)?(n.exit("atxHeading"),r(p)):z(p)?O(n,a,"whitespace")(p):(n.enter("atxHeadingText"),c(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function c(p){return p===null||p===35||Z(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),c)}}const Ae=["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"],Yn=["pre","script","style","textarea"],ze={name:"htmlFlow",tokenize:Le,resolveTo:Be,concrete:!0},Ie={tokenize:De,partial:!0},Te={tokenize:Oe,partial:!0};function Be(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Le(n,r,t){const e=this;let u,i,l,a,m;return c;function c(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),x):s===47?(n.consume(s),i=!0,I):s===63?(n.consume(s),u=3,e.interrupt?r:o):nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function x(s){return s===45?(n.consume(s),u=2,h):s===91?(n.consume(s),u=5,a=0,A):nn(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function h(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function A(s){const K="CDATA[";return s===K.charCodeAt(a++)?(n.consume(s),a===K.length?e.interrupt?r:S:A):t(s)}function I(s){return nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function M(s){if(s===null||s===47||s===62||Z(s)){const K=s===47,hn=l.toLowerCase();return!K&&!i&&Yn.includes(hn)?(u=1,e.interrupt?r(s):S(s)):Ae.includes(l.toLowerCase())?(u=6,K?(n.consume(s),b):e.interrupt?r(s):S(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?j(s):F(s))}return s===45||v(s)?(n.consume(s),l+=String.fromCharCode(s),M):t(s)}function b(s){return s===62?(n.consume(s),e.interrupt?r:S):t(s)}function j(s){return z(s)?(n.consume(s),j):V(s)}function F(s){return s===47?(n.consume(s),V):s===58||s===95||nn(s)?(n.consume(s),D):z(s)?(n.consume(s),F):V(s)}function D(s){return s===45||s===46||s===58||s===95||v(s)?(n.consume(s),D):_(s)}function _(s){return s===61?(n.consume(s),k):z(s)?(n.consume(s),_):F(s)}function k(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,T):z(s)?(n.consume(s),k):H(s)}function T(s){return s===m?(n.consume(s),m=null,N):s===null||C(s)?t(s):(n.consume(s),T)}function H(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||Z(s)?_(s):(n.consume(s),H)}function N(s){return s===47||s===62||z(s)?F(s):t(s)}function V(s){return s===62?(n.consume(s),y):t(s)}function y(s){return s===null||C(s)?S(s):z(s)?(n.consume(s),y):t(s)}function S(s){return s===45&&u===2?(n.consume(s),U):s===60&&u===1?(n.consume(s),W):s===62&&u===4?(n.consume(s),J):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),en):C(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Ie,rn,P)(s)):s===null||C(s)?(n.exit("htmlFlowData"),P(s)):(n.consume(s),S)}function P(s){return n.check(Te,R,rn)(s)}function R(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),w}function w(s){return s===null||C(s)?P(s):(n.enter("htmlFlowData"),S(s))}function U(s){return s===45?(n.consume(s),o):S(s)}function W(s){return s===47?(n.consume(s),l="",G):S(s)}function G(s){if(s===62){const K=l.toLowerCase();return Yn.includes(K)?(n.consume(s),J):S(s)}return nn(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),G):S(s)}function en(s){return s===93?(n.consume(s),o):S(s)}function o(s){return s===62?(n.consume(s),J):s===45&&u===2?(n.consume(s),o):S(s)}function J(s){return s===null||C(s)?(n.exit("htmlFlowData"),rn(s)):(n.consume(s),J)}function rn(s){return n.exit("htmlFlow"),r(s)}}function Oe(n,r,t){const e=this;return u;function u(l){return C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function De(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Sn,r,t)}}const Pe={name:"htmlText",tokenize:_e};function _e(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),c):o===47?(n.consume(o),_):o===63?(n.consume(o),F):nn(o)?(n.consume(o),H):t(o)}function c(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,A):nn(o)?(n.consume(o),j):t(o)}function p(o){return o===45?(n.consume(o),h):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),x):C(o)?(l=f,W(o)):(n.consume(o),f)}function x(o){return o===45?(n.consume(o),h):f(o)}function h(o){return o===62?U(o):o===45?x(o):f(o)}function A(o){const J="CDATA[";return o===J.charCodeAt(i++)?(n.consume(o),i===J.length?I:A):t(o)}function I(o){return o===null?t(o):o===93?(n.consume(o),M):C(o)?(l=I,W(o)):(n.consume(o),I)}function M(o){return o===93?(n.consume(o),b):I(o)}function b(o){return o===62?U(o):o===93?(n.consume(o),b):I(o)}function j(o){return o===null||o===62?U(o):C(o)?(l=j,W(o)):(n.consume(o),j)}function F(o){return o===null?t(o):o===63?(n.consume(o),D):C(o)?(l=F,W(o)):(n.consume(o),F)}function D(o){return o===62?U(o):F(o)}function _(o){return nn(o)?(n.consume(o),k):t(o)}function k(o){return o===45||v(o)?(n.consume(o),k):T(o)}function T(o){return C(o)?(l=T,W(o)):z(o)?(n.consume(o),T):U(o)}function H(o){return o===45||v(o)?(n.consume(o),H):o===47||o===62||Z(o)?N(o):t(o)}function N(o){return o===47?(n.consume(o),U):o===58||o===95||nn(o)?(n.consume(o),V):C(o)?(l=N,W(o)):z(o)?(n.consume(o),N):U(o)}function V(o){return o===45||o===46||o===58||o===95||v(o)?(n.consume(o),V):y(o)}function y(o){return o===61?(n.consume(o),S):C(o)?(l=y,W(o)):z(o)?(n.consume(o),y):N(o)}function S(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,P):C(o)?(l=S,W(o)):z(o)?(n.consume(o),S):(n.consume(o),R)}function P(o){return o===u?(n.consume(o),u=void 0,w):o===null?t(o):C(o)?(l=P,W(o)):(n.consume(o),P)}function R(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||Z(o)?N(o):(n.consume(o),R)}function w(o){return o===47||o===62||Z(o)?N(o):t(o)}function U(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function W(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),G}function G(o){return z(o)?O(n,en,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):en(o)}function en(o){return n.enter("htmlTextData"),l(o)}}const Dn={name:"labelEnd",tokenize:Ne,resolveTo:He,resolveAll:qe},Me={tokenize:Ve},je={tokenize:We},Re={tokenize:Qe};function qe(n){let r=-1;for(;++r=3&&(c===null||C(c))?(n.exit("thematicBreak"),r(c)):t(c)}function m(c){return c===u?(n.consume(c),e++,m):(n.exit("thematicBreakSequence"),z(c)?O(n,a,"whitespace")(c):a(c))}}const $={name:"list",tokenize:ve,continuation:{tokenize:nr},exit:er},Ke={tokenize:rr,partial:!0},Xe={tokenize:tr,partial:!0};function ve(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(h){const A=e.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!e.containerState.marker||h===e.containerState.marker:zn(h)){if(e.containerState.type||(e.containerState.type=A,n.enter(A,{_container:!0})),A==="listUnordered")return n.enter("listItemPrefix"),h===42||h===45?n.check(bn,t,c)(h):c(h);if(!e.interrupt||h===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(h)}return t(h)}function m(h){return zn(h)&&++l<10?(n.consume(h),m):(!e.interrupt||l<2)&&(e.containerState.marker?h===e.containerState.marker:h===41||h===46)?(n.exit("listItemValue"),c(h)):t(h)}function c(h){return n.enter("listItemMarker"),n.consume(h),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||h,n.check(Sn,e.interrupt?t:p,n.attempt(Ke,x,f))}function p(h){return e.containerState.initialBlankLine=!0,i++,x(h)}function f(h){return z(h)?(n.enter("listItemPrefixWhitespace"),n.consume(h),n.exit("listItemPrefixWhitespace"),x):t(h)}function x(h){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(h)}}function nr(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(Sn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,O(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!z(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(Xe,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,O(n,n.attempt($,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tr(n,r,t){const e=this;return O(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function er(n){n.exit(this.containerState.type)}function rr(n,r,t){const e=this;return O(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function u(i){const l=e.events[e.events.length-1];return!z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const Gn={name:"setextUnderline",tokenize:ur,resolveTo:ir};function ir(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:Object.assign({},n[u][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end=Object.assign({},n[i][1].end)):n[e][1]=l,n.push(["exit",l,r]),n}function ur(n,r,t){const e=this;let u;return i;function i(c){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=c,l(c)):t(c)}function l(c){return n.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===u?(n.consume(c),a):(n.exit("setextHeadingLineSequence"),z(c)?O(n,m,"lineSuffix")(c):m(c))}function m(c){return c===null||C(c)?(n.exit("setextHeadingLine"),r(c)):t(c)}}const lr={tokenize:ar};function ar(n){const r=this,t=n.attempt(Sn,e,n.attempt(this.parser.constructs.flowInitial,u,O(n,n.attempt(this.parser.constructs.flow,u,n.attempt(pe,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const or={resolveAll:st()},sr=ot("string"),cr=ot("text");function ot(n){return{tokenize:r,resolveAll:st(n==="text"?hr:void 0)};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return c(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return c(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function c(p){if(p===null)return!0;const f=u[p];let x=-1;if(f)for(;++x-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function mr(n,r){let t=-1;const e=[];let u;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const Ir=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tr(n){return n.replace(Ir,Br)}function Br(n,r,t){if(r)return r;if(t.charCodeAt(0)===35){const u=t.charCodeAt(1),i=u===120||u===88;return ct(t.slice(i?2:1),i?16:10)}return On(t)||n}function yn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Kn(n.position):"start"in n||"end"in n?Kn(n):"line"in n||"column"in n?Tn(n):""}function Tn(n){return Xn(n&&n.line)+":"+Xn(n&&n.column)}function Kn(n){return Tn(n&&n.start)+"-"+Tn(n&&n.end)}function Xn(n){return n&&typeof n=="number"?n:1}const ht={}.hasOwnProperty,pt=function(n,r,t){return typeof r!="string"&&(t=r,r=void 0),Lr(t)(zr(wr(t).document().write(Ar()(n,r,!0))))};function Lr(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Rn),autolinkProtocol:y,autolinkEmail:y,atxHeading:a(_n),blockQuote:a(Fn),characterEscape:y,characterReference:y,codeFenced:a(Pn),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:a(Pn,m),codeText:a(kt,m),codeTextData:y,data:y,codeFlowValue:y,definition:a(dt),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:a(bt),hardBreakEscape:a(Mn),hardBreakTrailing:a(Mn),htmlFlow:a(jn,m),htmlFlowData:y,htmlText:a(jn,m),htmlTextData:y,image:a(yt),label:m,link:a(Rn),listItem:a(St),listItemValue:A,listOrdered:a(qn,h),listUnordered:a(qn),paragraph:a(Ft),reference:hn,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:a(_n),strong:a(Et),thematicBreak:a(wt)},exit:{atxHeading:p(),atxHeadingSequence:T,autolink:p(),autolinkEmail:mn,autolinkProtocol:fn,blockQuote:p(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:pn,characterReferenceMarkerNumeric:pn,characterReferenceValue:an,codeFenced:p(j),codeFencedFence:b,codeFencedFenceInfo:I,codeFencedFenceMeta:M,codeFlowValue:S,codeIndented:p(F),codeText:p(W),codeTextData:S,data:S,definition:p(),definitionDestinationString:k,definitionLabelString:D,definitionTitleString:_,emphasis:p(),hardBreakEscape:p(R),hardBreakTrailing:p(R),htmlFlow:p(w),htmlFlowData:S,htmlText:p(U),htmlTextData:S,image:p(en),label:J,labelText:o,lineEnding:P,link:p(G),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:Q,resourceDestinationString:rn,resourceTitleString:s,resource:K,setextHeading:p(V),setextHeadingLineSequence:N,setextHeadingText:H,strong:p(),thematicBreak:p()}};ft(r,(n||{}).mdastExtensions||[]);const t={};return e;function e(g){let d={type:"root",children:[]};const E={stack:[d],tokenStack:[],config:r,enter:c,exit:f,buffer:m,resume:x,setData:i,getData:l},B=[];let L=-1;for(;++L0){const X=E.tokenStack[E.tokenStack.length-1];(X[1]||vn).call(E,void 0,X[0])}for(d.position={start:sn(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:sn(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},L=-1;++L{p!==0&&(u++,e.push([])),c.split(" ").forEach(f=>{f&&e[u].push({content:f,type:a})})}):(l.type==="strong"||l.type==="emphasis")&&l.children.forEach(m=>{i(m,l.type)})}return t.forEach(l=>{l.type==="paragraph"&&l.children.forEach(a=>{i(a)})}),e}function _r(n){const{children:r}=pt(n);function t(e){return e.type==="text"?e.value.replace(/\n/g,"
"):e.type==="strong"?`${e.children.map(t).join("")}`:e.type==="emphasis"?`${e.children.map(t).join("")}`:e.type==="paragraph"?`

${e.children.map(t).join("")}

`:`Unsupported markdown: ${e.type}`}return r.map(t).join("")}function Mr(n){return Intl.Segmenter?[...new Intl.Segmenter().segment(n)].map(r=>r.segment):[...n]}function jr(n,r){const t=Mr(r.content);return mt(n,[],t,r.type)}function mt(n,r,t,e){if(t.length===0)return[{content:r.join(""),type:e},{content:"",type:e}];const[u,...i]=t,l=[...r,u];return n([{content:l.join(""),type:e}])?mt(n,l,i,e):(r.length===0&&u&&(r.push(u),t.shift()),[{content:r.join(""),type:e},{content:t.join(""),type:e}])}function Rr(n,r){if(n.some(({content:t})=>t.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Bn(n,r)}function Bn(n,r,t=[],e=[]){if(n.length===0)return e.length>0&&t.push(e),t.length>0?t:[];let u="";n[0].content===" "&&(u=" ",n.shift());const i=n.shift()??{content:" ",type:"normal"},l=[...e];if(u!==""&&l.push({content:u,type:"normal"}),l.push(i),r(l))return Bn(n,r,t,l);if(e.length>0)t.push(e),n.unshift(i);else if(i.content){const[a,m]=jr(r,i);t.push([a]),m.content&&n.unshift(m)}return Bn(n,r,t)}function qr(n,r){r&&n.attr("style",r)}function Hr(n,r,t,e,u=!1){const i=n.append("foreignObject"),l=i.append("xhtml:div"),a=r.label,m=r.isNode?"nodeLabel":"edgeLabel";l.html(` + "+a+""),qr(l,r.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("max-width",t+"px"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),u&&l.attr("class","labelBkg");let c=l.node().getBoundingClientRect();return c.width===t&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",t+"px"),c=l.node().getBoundingClientRect()),i.style("width",c.width),i.style("height",c.height),i.node()}function xt(n,r,t){return n.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",r*t-.1+"em").attr("dy",t+"em")}function Nr(n,r,t){const e=n.append("text"),u=xt(e,1,r);gt(u,t);const i=u.node().getComputedTextLength();return e.remove(),i}function Vr(n,r,t,e=!1){const i=r.append("g"),l=i.insert("rect").attr("class","background"),a=i.append("text").attr("y","-10.1");let m=0;for(const c of t){const p=x=>Nr(i,1.1,x)<=n,f=p(c)?[c]:Rr(c,p);for(const x of f){const h=xt(a,m,1.1);gt(h,x),m++}}if(e){const c=a.node().getBBox(),p=2;return l.attr("x",-p).attr("y",-p).attr("width",c.width+2*p).attr("height",c.height+2*p),i.node()}else return a.node()}function gt(n,r){n.text(""),r.forEach((t,e)=>{const u=n.append("tspan").attr("font-style",t.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",t.type==="strong"?"bold":"normal");e===0?u.text(t.content):u.text(" "+t.content)})}const Qr=(n,r="",{style:t="",isTitle:e=!1,classes:u="",useHtmlLabels:i=!0,isNode:l=!0,width:a=200,addSvgBackground:m=!1}={})=>{if(At.info("createText",r,t,e,u,i,l,m),i){const c=_r(r),p={isNode:l,label:zt(c).replace(/fa[blrs]?:fa-[\w-]+/g,x=>``),labelStyle:t.replace("fill:","color:")};return Hr(n,p,a,u,m)}else{const c=Pr(r);return Vr(a,n,c,m)}};export{Qr as c}; diff --git a/backend/web/assets/createText-3b1f58a4-cf050b71.js b/backend/web/assets/createText-3b1f58a4-cf050b71.js deleted file mode 100644 index 878d899e..00000000 --- a/backend/web/assets/createText-3b1f58a4-cf050b71.js +++ /dev/null @@ -1,7 +0,0 @@ -import{o as At,ag as zt,ax as It}from"./EchartsRenderer-3d08027d.js";const Tt={};function Bt(n,r){const t=r||Tt,e=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return nt(n,e,u)}function nt(n,r,t){if(Lt(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Hn(n.children,r,t)}return Array.isArray(n)?Hn(n,r,t):""}function Hn(n,r,t){const e=[];let u=-1;for(;++uu?0:u+r:r=r>u?u:r,t=t>0?t:0,e.length<1e4)l=Array.from(e),l.unshift(r,t),n.splice(...l);else for(t&&n.splice(r,t);i0?(tn(n,n.length,0,r),n):r}const Nn={}.hasOwnProperty;function Ot(n){const r={};let t=-1;for(;++tl))return;const T=r.events.length;let H=T,N,V;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(N){V=r.events[H][1].end;break}N=!0}for(b(e),k=T;kF;){const _=t[D];r.containerState=_[1],_[0].exit.call(r,n)}t.length=F}function j(){u.write([null]),i=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Ut(n,r,t){return O(n,n.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wn(n){if(n===null||Z(n)||Ht(n))return 1;if(qt(n))return 2}function Ln(n,r,t){const e=[];let u=-1;for(;++u1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[e][1].end),x=Object.assign({},n[t][1].start);Qn(f,-m),Qn(x,m),l={type:m>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[e][1].end)},a={type:m>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:x},i={type:m>1?"strongText":"emphasisText",start:Object.assign({},n[e][1].end),end:Object.assign({},n[t][1].start)},u={type:m>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},n[e][1].end=Object.assign({},l.start),n[t][1].start=Object.assign({},a.end),c=[],n[e][1].end.offset-n[e][1].start.offset&&(c=Y(c,[["enter",n[e][1],r],["exit",n[e][1],r]])),c=Y(c,[["enter",u,r],["enter",l,r],["exit",l,r],["enter",i,r]]),c=Y(c,Ln(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),c=Y(c,[["exit",i,r],["enter",a,r],["exit",a,r],["exit",u,r]]),n[t][1].end.offset-n[t][1].start.offset?(p=2,c=Y(c,[["enter",n[t][1],r],["exit",n[t][1],r]])):p=0,tn(n,e-1,t-e+3,c),t=e+c.length-p-2;break}}for(t=-1;++t0&&z(k)?O(n,j,"linePrefix",i+1)(k):j(k)}function j(k){return k===null||C(k)?n.check($n,I,D)(k):(n.enter("codeFlowValue"),F(k))}function F(k){return k===null||C(k)?(n.exit("codeFlowValue"),j(k)):(n.consume(k),F)}function D(k){return n.exit("codeFenced"),r(k)}function _(k,T,H){let N=0;return V;function V(w){return k.enter("lineEnding"),k.consume(w),k.exit("lineEnding"),y}function y(w){return k.enter("codeFencedFence"),z(w)?O(k,S,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):S(w)}function S(w){return w===a?(k.enter("codeFencedFenceSequence"),P(w)):H(w)}function P(w){return w===a?(N++,k.consume(w),P):N>=l?(k.exit("codeFencedFenceSequence"),z(w)?O(k,R,"whitespace")(w):R(w)):H(w)}function R(w){return w===null||C(w)?(k.exit("codeFencedFence"),T(w)):H(w)}}}function re(n,r,t){const e=this;return u;function u(l){return l===null?t(l):(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}const Cn={name:"codeIndented",tokenize:ue},ie={tokenize:le,partial:!0};function ue(n,r,t){const e=this;return u;function u(c){return n.enter("codeIndented"),O(n,i,"linePrefix",4+1)(c)}function i(c){const p=e.events[e.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(c):t(c)}function l(c){return c===null?m(c):C(c)?n.attempt(ie,l,m)(c):(n.enter("codeFlowValue"),a(c))}function a(c){return c===null||C(c)?(n.exit("codeFlowValue"),l(c)):(n.consume(c),a)}function m(c){return n.exit("codeIndented"),r(c)}}function le(n,r,t){const e=this;return u;function u(l){return e.parser.lazy[e.now().line]?t(l):C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),u):O(n,i,"linePrefix",4+1)(l)}function i(l){const a=e.events[e.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(l):C(l)?u(l):t(l)}}const ae={name:"codeText",tokenize:ce,resolve:oe,previous:se};function oe(n){let r=n.length-4,t=3,e,u;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(e=t;++e=4?r(l):n.interrupt(e.parser.constructs.flow,t,r)(l)}}function ut(n,r,t,e,u,i,l,a,m){const c=m||Number.POSITIVE_INFINITY;let p=0;return f;function f(b){return b===60?(n.enter(e),n.enter(u),n.enter(i),n.consume(b),n.exit(i),x):b===null||b===32||b===41||An(b)?t(b):(n.enter(e),n.enter(l),n.enter(a),n.enter("chunkString",{contentType:"string"}),I(b))}function x(b){return b===62?(n.enter(i),n.consume(b),n.exit(i),n.exit(u),n.exit(e),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===62?(n.exit("chunkString"),n.exit(a),x(b)):b===null||b===60||C(b)?t(b):(n.consume(b),b===92?A:h)}function A(b){return b===60||b===62||b===92?(n.consume(b),h):h(b)}function I(b){return!p&&(b===null||b===41||Z(b))?(n.exit("chunkString"),n.exit(a),n.exit(l),n.exit(e),r(b)):p999||h===null||h===91||h===93&&!m||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(n.exit(i),n.enter(u),n.consume(h),n.exit(u),n.exit(e),r):C(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||C(h)||a++>999?(n.exit("chunkString"),p(h)):(n.consume(h),m||(m=!z(h)),h===92?x:f)}function x(h){return h===91||h===92||h===93?(n.consume(h),a++,f):f(h)}}function at(n,r,t,e,u,i){let l;return a;function a(x){return x===34||x===39||x===40?(n.enter(e),n.enter(u),n.consume(x),n.exit(u),l=x===40?41:x,m):t(x)}function m(x){return x===l?(n.enter(u),n.consume(x),n.exit(u),n.exit(e),r):(n.enter(i),c(x))}function c(x){return x===l?(n.exit(i),m(l)):x===null?t(x):C(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),O(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||C(x)?(n.exit("chunkString"),c(x)):(n.consume(x),x===92?f:p)}function f(x){return x===l||x===92?(n.consume(x),p):p(x)}}function dn(n,r){let t;return e;function e(u){return C(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),t=!0,e):z(u)?O(n,e,t?"linePrefix":"lineSuffix")(u):r(u)}}function xn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ke={name:"definition",tokenize:be},de={tokenize:ye,partial:!0};function be(n,r,t){const e=this;let u;return i;function i(h){return n.enter("definition"),l(h)}function l(h){return lt.call(e,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return u=xn(e.sliceSerialize(e.events[e.events.length-1][1]).slice(1,-1)),h===58?(n.enter("definitionMarker"),n.consume(h),n.exit("definitionMarker"),m):t(h)}function m(h){return Z(h)?dn(n,c)(h):c(h)}function c(h){return ut(n,p,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function p(h){return n.attempt(de,f,f)(h)}function f(h){return z(h)?O(n,x,"whitespace")(h):x(h)}function x(h){return h===null||C(h)?(n.exit("definition"),e.parser.defined.push(u),r(h)):t(h)}}function ye(n,r,t){return e;function e(a){return Z(a)?dn(n,u)(a):t(a)}function u(a){return at(n,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return z(a)?O(n,l,"whitespace")(a):l(a)}function l(a){return a===null||C(a)?r(a):t(a)}}const Se={name:"hardBreakEscape",tokenize:Fe};function Fe(n,r,t){return e;function e(i){return n.enter("hardBreakEscape"),n.consume(i),u}function u(i){return C(i)?(n.exit("hardBreakEscape"),r(i)):t(i)}}const Ee={name:"headingAtx",tokenize:we,resolve:Ce};function Ce(n,r){let t=n.length-2,e=3,u,i;return n[e][1].type==="whitespace"&&(e+=2),t-2>e&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(e===t-1||t-4>e&&n[t-2][1].type==="whitespace")&&(t-=e+1===t?2:4),t>e&&(u={type:"atxHeadingText",start:n[e][1].start,end:n[t][1].end},i={type:"chunkText",start:n[e][1].start,end:n[t][1].end,contentType:"text"},tn(n,e,t-e+1,[["enter",u,r],["enter",i,r],["exit",i,r],["exit",u,r]])),n}function we(n,r,t){let e=0;return u;function u(p){return n.enter("atxHeading"),i(p)}function i(p){return n.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&e++<6?(n.consume(p),l):p===null||Z(p)?(n.exit("atxHeadingSequence"),a(p)):t(p)}function a(p){return p===35?(n.enter("atxHeadingSequence"),m(p)):p===null||C(p)?(n.exit("atxHeading"),r(p)):z(p)?O(n,a,"whitespace")(p):(n.enter("atxHeadingText"),c(p))}function m(p){return p===35?(n.consume(p),m):(n.exit("atxHeadingSequence"),a(p))}function c(p){return p===null||p===35||Z(p)?(n.exit("atxHeadingText"),a(p)):(n.consume(p),c)}}const Ae=["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"],Yn=["pre","script","style","textarea"],ze={name:"htmlFlow",tokenize:Le,resolveTo:Be,concrete:!0},Ie={tokenize:De,partial:!0},Te={tokenize:Oe,partial:!0};function Be(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function Le(n,r,t){const e=this;let u,i,l,a,m;return c;function c(s){return p(s)}function p(s){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(s),f}function f(s){return s===33?(n.consume(s),x):s===47?(n.consume(s),i=!0,I):s===63?(n.consume(s),u=3,e.interrupt?r:o):nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function x(s){return s===45?(n.consume(s),u=2,h):s===91?(n.consume(s),u=5,a=0,A):nn(s)?(n.consume(s),u=4,e.interrupt?r:o):t(s)}function h(s){return s===45?(n.consume(s),e.interrupt?r:o):t(s)}function A(s){const K="CDATA[";return s===K.charCodeAt(a++)?(n.consume(s),a===K.length?e.interrupt?r:S:A):t(s)}function I(s){return nn(s)?(n.consume(s),l=String.fromCharCode(s),M):t(s)}function M(s){if(s===null||s===47||s===62||Z(s)){const K=s===47,hn=l.toLowerCase();return!K&&!i&&Yn.includes(hn)?(u=1,e.interrupt?r(s):S(s)):Ae.includes(l.toLowerCase())?(u=6,K?(n.consume(s),b):e.interrupt?r(s):S(s)):(u=7,e.interrupt&&!e.parser.lazy[e.now().line]?t(s):i?j(s):F(s))}return s===45||v(s)?(n.consume(s),l+=String.fromCharCode(s),M):t(s)}function b(s){return s===62?(n.consume(s),e.interrupt?r:S):t(s)}function j(s){return z(s)?(n.consume(s),j):V(s)}function F(s){return s===47?(n.consume(s),V):s===58||s===95||nn(s)?(n.consume(s),D):z(s)?(n.consume(s),F):V(s)}function D(s){return s===45||s===46||s===58||s===95||v(s)?(n.consume(s),D):_(s)}function _(s){return s===61?(n.consume(s),k):z(s)?(n.consume(s),_):F(s)}function k(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(n.consume(s),m=s,T):z(s)?(n.consume(s),k):H(s)}function T(s){return s===m?(n.consume(s),m=null,N):s===null||C(s)?t(s):(n.consume(s),T)}function H(s){return s===null||s===34||s===39||s===47||s===60||s===61||s===62||s===96||Z(s)?_(s):(n.consume(s),H)}function N(s){return s===47||s===62||z(s)?F(s):t(s)}function V(s){return s===62?(n.consume(s),y):t(s)}function y(s){return s===null||C(s)?S(s):z(s)?(n.consume(s),y):t(s)}function S(s){return s===45&&u===2?(n.consume(s),U):s===60&&u===1?(n.consume(s),W):s===62&&u===4?(n.consume(s),J):s===63&&u===3?(n.consume(s),o):s===93&&u===5?(n.consume(s),en):C(s)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(Ie,rn,P)(s)):s===null||C(s)?(n.exit("htmlFlowData"),P(s)):(n.consume(s),S)}function P(s){return n.check(Te,R,rn)(s)}function R(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),w}function w(s){return s===null||C(s)?P(s):(n.enter("htmlFlowData"),S(s))}function U(s){return s===45?(n.consume(s),o):S(s)}function W(s){return s===47?(n.consume(s),l="",G):S(s)}function G(s){if(s===62){const K=l.toLowerCase();return Yn.includes(K)?(n.consume(s),J):S(s)}return nn(s)&&l.length<8?(n.consume(s),l+=String.fromCharCode(s),G):S(s)}function en(s){return s===93?(n.consume(s),o):S(s)}function o(s){return s===62?(n.consume(s),J):s===45&&u===2?(n.consume(s),o):S(s)}function J(s){return s===null||C(s)?(n.exit("htmlFlowData"),rn(s)):(n.consume(s),J)}function rn(s){return n.exit("htmlFlow"),r(s)}}function Oe(n,r,t){const e=this;return u;function u(l){return C(l)?(n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),i):t(l)}function i(l){return e.parser.lazy[e.now().line]?t(l):r(l)}}function De(n,r,t){return e;function e(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Sn,r,t)}}const Pe={name:"htmlText",tokenize:_e};function _e(n,r,t){const e=this;let u,i,l;return a;function a(o){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(o),m}function m(o){return o===33?(n.consume(o),c):o===47?(n.consume(o),_):o===63?(n.consume(o),F):nn(o)?(n.consume(o),H):t(o)}function c(o){return o===45?(n.consume(o),p):o===91?(n.consume(o),i=0,A):nn(o)?(n.consume(o),j):t(o)}function p(o){return o===45?(n.consume(o),h):t(o)}function f(o){return o===null?t(o):o===45?(n.consume(o),x):C(o)?(l=f,W(o)):(n.consume(o),f)}function x(o){return o===45?(n.consume(o),h):f(o)}function h(o){return o===62?U(o):o===45?x(o):f(o)}function A(o){const J="CDATA[";return o===J.charCodeAt(i++)?(n.consume(o),i===J.length?I:A):t(o)}function I(o){return o===null?t(o):o===93?(n.consume(o),M):C(o)?(l=I,W(o)):(n.consume(o),I)}function M(o){return o===93?(n.consume(o),b):I(o)}function b(o){return o===62?U(o):o===93?(n.consume(o),b):I(o)}function j(o){return o===null||o===62?U(o):C(o)?(l=j,W(o)):(n.consume(o),j)}function F(o){return o===null?t(o):o===63?(n.consume(o),D):C(o)?(l=F,W(o)):(n.consume(o),F)}function D(o){return o===62?U(o):F(o)}function _(o){return nn(o)?(n.consume(o),k):t(o)}function k(o){return o===45||v(o)?(n.consume(o),k):T(o)}function T(o){return C(o)?(l=T,W(o)):z(o)?(n.consume(o),T):U(o)}function H(o){return o===45||v(o)?(n.consume(o),H):o===47||o===62||Z(o)?N(o):t(o)}function N(o){return o===47?(n.consume(o),U):o===58||o===95||nn(o)?(n.consume(o),V):C(o)?(l=N,W(o)):z(o)?(n.consume(o),N):U(o)}function V(o){return o===45||o===46||o===58||o===95||v(o)?(n.consume(o),V):y(o)}function y(o){return o===61?(n.consume(o),S):C(o)?(l=y,W(o)):z(o)?(n.consume(o),y):N(o)}function S(o){return o===null||o===60||o===61||o===62||o===96?t(o):o===34||o===39?(n.consume(o),u=o,P):C(o)?(l=S,W(o)):z(o)?(n.consume(o),S):(n.consume(o),R)}function P(o){return o===u?(n.consume(o),u=void 0,w):o===null?t(o):C(o)?(l=P,W(o)):(n.consume(o),P)}function R(o){return o===null||o===34||o===39||o===60||o===61||o===96?t(o):o===47||o===62||Z(o)?N(o):(n.consume(o),R)}function w(o){return o===47||o===62||Z(o)?N(o):t(o)}function U(o){return o===62?(n.consume(o),n.exit("htmlTextData"),n.exit("htmlText"),r):t(o)}function W(o){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),G}function G(o){return z(o)?O(n,en,"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):en(o)}function en(o){return n.enter("htmlTextData"),l(o)}}const Dn={name:"labelEnd",tokenize:Ne,resolveTo:He,resolveAll:qe},Me={tokenize:Ve},je={tokenize:We},Re={tokenize:Qe};function qe(n){let r=-1;for(;++r=3&&(c===null||C(c))?(n.exit("thematicBreak"),r(c)):t(c)}function m(c){return c===u?(n.consume(c),e++,m):(n.exit("thematicBreakSequence"),z(c)?O(n,a,"whitespace")(c):a(c))}}const $={name:"list",tokenize:ve,continuation:{tokenize:nr},exit:er},Ke={tokenize:rr,partial:!0},Xe={tokenize:tr,partial:!0};function ve(n,r,t){const e=this,u=e.events[e.events.length-1];let i=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,l=0;return a;function a(h){const A=e.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(A==="listUnordered"?!e.containerState.marker||h===e.containerState.marker:zn(h)){if(e.containerState.type||(e.containerState.type=A,n.enter(A,{_container:!0})),A==="listUnordered")return n.enter("listItemPrefix"),h===42||h===45?n.check(bn,t,c)(h):c(h);if(!e.interrupt||h===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(h)}return t(h)}function m(h){return zn(h)&&++l<10?(n.consume(h),m):(!e.interrupt||l<2)&&(e.containerState.marker?h===e.containerState.marker:h===41||h===46)?(n.exit("listItemValue"),c(h)):t(h)}function c(h){return n.enter("listItemMarker"),n.consume(h),n.exit("listItemMarker"),e.containerState.marker=e.containerState.marker||h,n.check(Sn,e.interrupt?t:p,n.attempt(Ke,x,f))}function p(h){return e.containerState.initialBlankLine=!0,i++,x(h)}function f(h){return z(h)?(n.enter("listItemPrefixWhitespace"),n.consume(h),n.exit("listItemPrefixWhitespace"),x):t(h)}function x(h){return e.containerState.size=i+e.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(h)}}function nr(n,r,t){const e=this;return e.containerState._closeFlow=void 0,n.check(Sn,u,i);function u(a){return e.containerState.furtherBlankLines=e.containerState.furtherBlankLines||e.containerState.initialBlankLine,O(n,r,"listItemIndent",e.containerState.size+1)(a)}function i(a){return e.containerState.furtherBlankLines||!z(a)?(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,l(a)):(e.containerState.furtherBlankLines=void 0,e.containerState.initialBlankLine=void 0,n.attempt(Xe,r,l)(a))}function l(a){return e.containerState._closeFlow=!0,e.interrupt=void 0,O(n,n.attempt($,r,t),"linePrefix",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function tr(n,r,t){const e=this;return O(n,u,"listItemIndent",e.containerState.size+1);function u(i){const l=e.events[e.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===e.containerState.size?r(i):t(i)}}function er(n){n.exit(this.containerState.type)}function rr(n,r,t){const e=this;return O(n,u,"listItemPrefixWhitespace",e.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function u(i){const l=e.events[e.events.length-1];return!z(i)&&l&&l[1].type==="listItemPrefixWhitespace"?r(i):t(i)}}const Gn={name:"setextUnderline",tokenize:ur,resolveTo:ir};function ir(n,r){let t=n.length,e,u,i;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){e=t;break}n[t][1].type==="paragraph"&&(u=t)}else n[t][1].type==="content"&&n.splice(t,1),!i&&n[t][1].type==="definition"&&(i=t);const l={type:"setextHeading",start:Object.assign({},n[u][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[u][1].type="setextHeadingText",i?(n.splice(u,0,["enter",l,r]),n.splice(i+1,0,["exit",n[e][1],r]),n[e][1].end=Object.assign({},n[i][1].end)):n[e][1]=l,n.push(["exit",l,r]),n}function ur(n,r,t){const e=this;let u;return i;function i(c){let p=e.events.length,f;for(;p--;)if(e.events[p][1].type!=="lineEnding"&&e.events[p][1].type!=="linePrefix"&&e.events[p][1].type!=="content"){f=e.events[p][1].type==="paragraph";break}return!e.parser.lazy[e.now().line]&&(e.interrupt||f)?(n.enter("setextHeadingLine"),u=c,l(c)):t(c)}function l(c){return n.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===u?(n.consume(c),a):(n.exit("setextHeadingLineSequence"),z(c)?O(n,m,"lineSuffix")(c):m(c))}function m(c){return c===null||C(c)?(n.exit("setextHeadingLine"),r(c)):t(c)}}const lr={tokenize:ar};function ar(n){const r=this,t=n.attempt(Sn,e,n.attempt(this.parser.constructs.flowInitial,u,O(n,n.attempt(this.parser.constructs.flow,u,n.attempt(pe,u)),"linePrefix")));return t;function e(i){if(i===null){n.consume(i);return}return n.enter("lineEndingBlank"),n.consume(i),n.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(i){if(i===null){n.consume(i);return}return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),r.currentConstruct=void 0,t}}const or={resolveAll:st()},sr=ot("string"),cr=ot("text");function ot(n){return{tokenize:r,resolveAll:st(n==="text"?hr:void 0)};function r(t){const e=this,u=this.parser.constructs[n],i=t.attempt(u,l,a);return l;function l(p){return c(p)?i(p):a(p)}function a(p){if(p===null){t.consume(p);return}return t.enter("data"),t.consume(p),m}function m(p){return c(p)?(t.exit("data"),i(p)):(t.consume(p),m)}function c(p){if(p===null)return!0;const f=u[p];let x=-1;if(f)for(;++x-1){const a=l[0];typeof a=="string"?l[0]=a.slice(e):l.shift()}i>0&&l.push(n[u].slice(0,i))}return l}function mr(n,r){let t=-1;const e=[];let u;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const Ir=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Tr(n){return n.replace(Ir,Br)}function Br(n,r,t){if(r)return r;if(t.charCodeAt(0)===35){const u=t.charCodeAt(1),i=u===120||u===88;return ct(t.slice(i?2:1),i?16:10)}return On(t)||n}function yn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Kn(n.position):"start"in n||"end"in n?Kn(n):"line"in n||"column"in n?Tn(n):""}function Tn(n){return Xn(n&&n.line)+":"+Xn(n&&n.column)}function Kn(n){return Tn(n&&n.start)+"-"+Tn(n&&n.end)}function Xn(n){return n&&typeof n=="number"?n:1}const ht={}.hasOwnProperty,pt=function(n,r,t){return typeof r!="string"&&(t=r,r=void 0),Lr(t)(zr(wr(t).document().write(Ar()(n,r,!0))))};function Lr(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Rn),autolinkProtocol:y,autolinkEmail:y,atxHeading:a(_n),blockQuote:a(Fn),characterEscape:y,characterReference:y,codeFenced:a(Pn),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:a(Pn,m),codeText:a(kt,m),codeTextData:y,data:y,codeFlowValue:y,definition:a(dt),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:a(bt),hardBreakEscape:a(Mn),hardBreakTrailing:a(Mn),htmlFlow:a(jn,m),htmlFlowData:y,htmlText:a(jn,m),htmlTextData:y,image:a(yt),label:m,link:a(Rn),listItem:a(St),listItemValue:A,listOrdered:a(qn,h),listUnordered:a(qn),paragraph:a(Ft),reference:hn,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:a(_n),strong:a(Et),thematicBreak:a(wt)},exit:{atxHeading:p(),atxHeadingSequence:T,autolink:p(),autolinkEmail:mn,autolinkProtocol:fn,blockQuote:p(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:pn,characterReferenceMarkerNumeric:pn,characterReferenceValue:an,codeFenced:p(j),codeFencedFence:b,codeFencedFenceInfo:I,codeFencedFenceMeta:M,codeFlowValue:S,codeIndented:p(F),codeText:p(W),codeTextData:S,data:S,definition:p(),definitionDestinationString:k,definitionLabelString:D,definitionTitleString:_,emphasis:p(),hardBreakEscape:p(R),hardBreakTrailing:p(R),htmlFlow:p(w),htmlFlowData:S,htmlText:p(U),htmlTextData:S,image:p(en),label:J,labelText:o,lineEnding:P,link:p(G),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:Q,resourceDestinationString:rn,resourceTitleString:s,resource:K,setextHeading:p(V),setextHeadingLineSequence:N,setextHeadingText:H,strong:p(),thematicBreak:p()}};ft(r,(n||{}).mdastExtensions||[]);const t={};return e;function e(g){let d={type:"root",children:[]};const E={stack:[d],tokenStack:[],config:r,enter:c,exit:f,buffer:m,resume:x,setData:i,getData:l},B=[];let L=-1;for(;++L0){const X=E.tokenStack[E.tokenStack.length-1];(X[1]||vn).call(E,void 0,X[0])}for(d.position={start:sn(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:sn(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},L=-1;++L{p!==0&&(u++,e.push([])),c.split(" ").forEach(f=>{f&&e[u].push({content:f,type:a})})}):(l.type==="strong"||l.type==="emphasis")&&l.children.forEach(m=>{i(m,l.type)})}return t.forEach(l=>{l.type==="paragraph"&&l.children.forEach(a=>{i(a)})}),e}function _r(n){const{children:r}=pt(n);function t(e){return e.type==="text"?e.value.replace(/\n/g,"
"):e.type==="strong"?`${e.children.map(t).join("")}`:e.type==="emphasis"?`${e.children.map(t).join("")}`:e.type==="paragraph"?`

${e.children.map(t).join("")}

`:`Unsupported markdown: ${e.type}`}return r.map(t).join("")}function Mr(n){return Intl.Segmenter?[...new Intl.Segmenter().segment(n)].map(r=>r.segment):[...n]}function jr(n,r){const t=Mr(r.content);return mt(n,[],t,r.type)}function mt(n,r,t,e){if(t.length===0)return[{content:r.join(""),type:e},{content:"",type:e}];const[u,...i]=t,l=[...r,u];return n([{content:l.join(""),type:e}])?mt(n,l,i,e):(r.length===0&&u&&(r.push(u),t.shift()),[{content:r.join(""),type:e},{content:t.join(""),type:e}])}function Rr(n,r){if(n.some(({content:t})=>t.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Bn(n,r)}function Bn(n,r,t=[],e=[]){if(n.length===0)return e.length>0&&t.push(e),t.length>0?t:[];let u="";n[0].content===" "&&(u=" ",n.shift());const i=n.shift()??{content:" ",type:"normal"},l=[...e];if(u!==""&&l.push({content:u,type:"normal"}),l.push(i),r(l))return Bn(n,r,t,l);if(e.length>0)t.push(e),n.unshift(i);else if(i.content){const[a,m]=jr(r,i);t.push([a]),m.content&&n.unshift(m)}return Bn(n,r,t)}function qr(n,r){r&&n.attr("style",r)}function Hr(n,r,t,e,u=!1){const i=n.append("foreignObject"),l=i.append("xhtml:div"),a=r.label,m=r.isNode?"nodeLabel":"edgeLabel";l.html(` - "+a+""),qr(l,r.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("max-width",t+"px"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),u&&l.attr("class","labelBkg");let c=l.node().getBoundingClientRect();return c.width===t&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",t+"px"),c=l.node().getBoundingClientRect()),i.style("width",c.width),i.style("height",c.height),i.node()}function xt(n,r,t){return n.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",r*t-.1+"em").attr("dy",t+"em")}function Nr(n,r,t){const e=n.append("text"),u=xt(e,1,r);gt(u,t);const i=u.node().getComputedTextLength();return e.remove(),i}function Vr(n,r,t,e=!1){const i=r.append("g"),l=i.insert("rect").attr("class","background"),a=i.append("text").attr("y","-10.1");let m=0;for(const c of t){const p=x=>Nr(i,1.1,x)<=n,f=p(c)?[c]:Rr(c,p);for(const x of f){const h=xt(a,m,1.1);gt(h,x),m++}}if(e){const c=a.node().getBBox(),p=2;return l.attr("x",-p).attr("y",-p).attr("width",c.width+2*p).attr("height",c.height+2*p),i.node()}else return a.node()}function gt(n,r){n.text(""),r.forEach((t,e)=>{const u=n.append("tspan").attr("font-style",t.type==="emphasis"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",t.type==="strong"?"bold":"normal");e===0?u.text(t.content):u.text(" "+t.content)})}const Qr=(n,r="",{style:t="",isTitle:e=!1,classes:u="",useHtmlLabels:i=!0,isNode:l=!0,width:a=200,addSvgBackground:m=!1}={})=>{if(At.info("createText",r,t,e,u,i,l,m),i){const c=_r(r),p={isNode:l,label:zt(c).replace(/fa[blrs]?:fa-[\w-]+/g,x=>``),labelStyle:t.replace("fill:","color:")};return Hr(n,p,a,u,m)}else{const c=Pr(r);return Vr(a,n,c,m)}};export{Qr as c}; diff --git a/backend/web/assets/database-adffb067.js b/backend/web/assets/database-2818470e.js similarity index 65% rename from backend/web/assets/database-adffb067.js rename to backend/web/assets/database-2818470e.js index a8c022b9..ee2209b9 100644 --- a/backend/web/assets/database-adffb067.js +++ b/backend/web/assets/database-2818470e.js @@ -1 +1 @@ -import{b1 as e}from"./index-51905ea3.js";async function b(a,t){return await e(`database__${a}`,t)}async function n(a,t){return await e(`database_object__${a}`,t)}export{n as a,b as d}; +import{b1 as e}from"./index-ef7aa48c.js";async function b(a,t){return await e(`database__${a}`,t)}async function n(a,t){return await e(`database_object__${a}`,t)}export{n as a,b as d}; diff --git a/backend/web/assets/edges-0005682e-04b6df38.js b/backend/web/assets/edges-0005682e-04b6df38.js deleted file mode 100644 index 729e4cff..00000000 --- a/backend/web/assets/edges-0005682e-04b6df38.js +++ /dev/null @@ -1,4 +0,0 @@ -import{x as H,i as w,j as F,ag as z,n as B,o as x,F as j,K as Q}from"./EchartsRenderer-3d08027d.js";import{c as rt}from"./createText-3b1f58a4-cf050b71.js";import{p as V}from"./svgDraw-70101091-699797c4.js";import{l as it}from"./line-7fbcfe17.js";const nt=(r,t,e,n)=>{t.forEach(a=>{xt[a](r,e,n)})},lt=(r,t,e)=>{x.trace("Making markers for ",e),r.append("defs").append("marker").attr("id",t+"-extensionStart").attr("class","marker extension "+t).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"),r.append("defs").append("marker").attr("id",t+"-extensionEnd").attr("class","marker extension "+t).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")},ct=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-compositionStart").attr("class","marker composition "+t).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"),r.append("defs").append("marker").attr("id",t+"-compositionEnd").attr("class","marker composition "+t).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")},ht=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-aggregationStart").attr("class","marker aggregation "+t).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"),r.append("defs").append("marker").attr("id",t+"-aggregationEnd").attr("class","marker aggregation "+t).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")},ot=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-dependencyStart").attr("class","marker dependency "+t).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"),r.append("defs").append("marker").attr("id",t+"-dependencyEnd").attr("class","marker dependency "+t).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")},ft=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},pt=(r,t)=>{r.append("marker").attr("id",t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",10).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"),r.append("marker").attr("id",t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",0).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")},dt=(r,t)=>{r.append("marker").attr("id",t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},yt=(r,t)=>{r.append("marker").attr("id",t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},bt=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},xt={extension:lt,composition:ct,aggregation:ht,dependency:ot,lollipop:ft,point:pt,circle:dt,cross:yt,barb:bt},Pt=nt;function gt(r,t){t&&r.attr("style",t)}function ut(r){const t=B(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),e=t.append("xhtml:div"),n=r.label,a=r.isNode?"nodeLabel":"edgeLabel";return e.html('"+n+""),gt(e,r.labelStyle),e.style("display","inline-block"),e.style("white-space","nowrap"),e.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const wt=(r,t,e,n)=>{let a=r||"";if(typeof a=="object"&&(a=a[0]),H(w().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"
"),x.info("vertexText"+a);const s={isNode:n,label:z(a).replace(/fa[blrs]?:fa-[\w-]+/g,l=>``),labelStyle:t.replace("fill:","color:")};return ut(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let i=[];typeof a=="string"?i=a.split(/\\n|\n|/gi):Array.isArray(a)?i=a:i=[];for(const l of i){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),e?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=l.trim(),s.appendChild(c)}return s}},$=wt,E=async(r,t,e,n)=>{let a;const s=t.useHtmlLabels||H(w().flowchart.htmlLabels);e?a=e:a="node default";const i=r.insert("g").attr("class",a).attr("id",t.domId||t.id),l=i.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=l.node();let h;t.labelType==="markdown"?h=rt(l,F(z(c),w()),{useHtmlLabels:s,width:t.width||w().flowchart.wrappingWidth,classes:"markdown-node-label"}):h=o.appendChild($(F(z(c),w()),t.labelStyle,!1,n));let f=h.getBBox();const b=t.padding/2;if(H(w().flowchart.htmlLabels)){const p=h.children[0],d=B(h),y=p.getElementsByTagName("img");if(y){const g=c.replace(/]*>/g,"").trim()==="";await Promise.all([...y].map(u=>new Promise(I=>{function R(){if(u.style.display="flex",u.style.flexDirection="column",g){const M=w().fontSize?w().fontSize:window.getComputedStyle(document.body).fontSize,W=5;u.style.width=parseInt(M,10)*W+"px"}else u.style.width="100%";I(u)}setTimeout(()=>{u.complete&&R()}),u.addEventListener("error",R),u.addEventListener("load",R)})))}f=p.getBoundingClientRect(),d.attr("width",f.width),d.attr("height",f.height)}return s?l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):l.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:i,bbox:f,halfPadding:b,label:l}},k=(r,t)=>{const e=t.node().getBBox();r.width=e.width,r.height=e.height};function _(r,t,e,n){return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+e/2+")")}function mt(r,t){return r.intersect(t)}function at(r,t,e,n){var a=r.x,s=r.y,i=a-n.x,l=s-n.y,c=Math.sqrt(t*t*l*l+e*e*i*i),o=Math.abs(t*e*i/c);n.x0}function Lt(r,t,e){var n=r.x,a=r.y,s=[],i=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){i=Math.min(i,d.x),l=Math.min(l,d.y)}):(i=Math.min(i,t.x),l=Math.min(l,t.y));for(var c=n-r.width/2-i,o=a-r.height/2-l,h=0;h1&&s.sort(function(d,y){var g=d.x-e.x,u=d.y-e.y,I=Math.sqrt(g*g+u*u),R=y.x-e.x,M=y.y-e.y,W=Math.sqrt(R*R+M*M);return I{var e=r.x,n=r.y,a=t.x-e,s=t.y-n,i=r.width/2,l=r.height/2,c,o;return Math.abs(s)*i>Math.abs(a)*l?(s<0&&(l=-l),c=s===0?0:l*a/s,o=l):(a<0&&(i=-i),c=i,o=a===0?0:i*s/a),{x:e+c,y:n+o}},Bt=St,m={node:mt,circle:kt,ellipse:at,polygon:Lt,rect:Bt},Et=async(r,t)=>{t.useHtmlLabels||w().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:a,halfPadding:s}=await E(r,t,"node "+t.classes,!0);x.info("Classes = ",t.classes);const i=n.insert("rect",":first-child");return i.attr("rx",t.rx).attr("ry",t.ry).attr("x",-a.width/2-s).attr("y",-a.height/2-s).attr("width",a.width+t.padding).attr("height",a.height+t.padding),k(t,i),t.intersect=function(l){return m.rect(t,l)},n},Mt=Et,K=r=>r?" "+r:"",T=(r,t)=>`${t||"node default"}${K(r.classes)} ${K(r.class)}`,q=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=a+s,l=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];x.info("Question main (Circle)");const c=_(e,i,i,l);return c.attr("style",t.style),k(t,c),t.intersect=function(o){return x.warn("Intersect called"),m.polygon(t,l,o)},e},Ct=(r,t)=>{const e=r.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,a=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return e.insert("polygon",":first-child").attr("points",a.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(i){return m.circle(t,14,i)},e},Tt=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=4,s=n.height+t.padding,i=s/a,l=n.width+2*i+t.padding,c=[{x:i,y:0},{x:l-i,y:0},{x:l,y:-s/2},{x:l-i,y:-s},{x:i,y:-s},{x:0,y:-s/2}],o=_(e,l,s,c);return o.attr("style",t.style),k(t,o),t.intersect=function(h){return m.polygon(t,c,h)},e},Rt=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:-s/2,y:0},{x:a,y:0},{x:a,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return _(e,a,s,i).attr("style",t.style),t.width=a+s,t.height=s,t.intersect=function(c){return m.polygon(t,i,c)},e},$t=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:-2*s/6,y:0},{x:a-s/6,y:0},{x:a+2*s/6,y:-s},{x:s/6,y:-s}],l=_(e,a,s,i);return l.attr("style",t.style),k(t,l),t.intersect=function(c){return m.polygon(t,i,c)},e},It=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:2*s/6,y:0},{x:a+s/6,y:0},{x:a-2*s/6,y:-s},{x:-s/6,y:-s}],l=_(e,a,s,i);return l.attr("style",t.style),k(t,l),t.intersect=function(c){return m.polygon(t,i,c)},e},Ht=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:-2*s/6,y:0},{x:a+2*s/6,y:0},{x:a-s/6,y:-s},{x:s/6,y:-s}],l=_(e,a,s,i);return l.attr("style",t.style),k(t,l),t.intersect=function(c){return m.polygon(t,i,c)},e},Nt=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:s/6,y:0},{x:a-s/6,y:0},{x:a+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=_(e,a,s,i);return l.attr("style",t.style),k(t,l),t.intersect=function(c){return m.polygon(t,i,c)},e},_t=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:0,y:0},{x:a+s/2,y:0},{x:a,y:-s/2},{x:a+s/2,y:-s},{x:0,y:-s}],l=_(e,a,s,i);return l.attr("style",t.style),k(t,l),t.intersect=function(c){return m.polygon(t,i,c)},e},Wt=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=a/2,i=s/(2.5+a/50),l=n.height+i+t.padding,c="M 0,"+i+" a "+s+","+i+" 0,0,0 "+a+" 0 a "+s+","+i+" 0,0,0 "+-a+" 0 l 0,"+l+" a "+s+","+i+" 0,0,0 "+a+" 0 l 0,"+-l,o=e.attr("label-offset-y",i).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-a/2+","+-(l/2+i)+")");return k(t,o),t.intersect=function(h){const f=m.rect(t,h),b=f.x-t.x;if(s!=0&&(Math.abs(b)t.height/2-i)){let p=i*i*(1-b*b/(s*s));p!=0&&(p=Math.sqrt(p)),p=i-p,h.y-t.y>0&&(p=-p),f.y+=p}return f},e},Xt=async(r,t)=>{const{shapeSvg:e,bbox:n,halfPadding:a}=await E(r,t,"node "+t.classes+" "+t.class,!0),s=e.insert("rect",":first-child"),i=n.width+t.padding,l=n.height+t.padding;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",-n.width/2-a).attr("y",-n.height/2-a).attr("width",i).attr("height",l),t.props){const c=new Set(Object.keys(t.props));t.props.borders&&(et(s,t.props.borders,i,l),c.delete("borders")),c.forEach(o=>{x.warn(`Unknown node property ${o}`)})}return k(t,s),t.intersect=function(c){return m.rect(t,c)},e},Yt=async(r,t)=>{const{shapeSvg:e}=await E(r,t,"label",!0);x.trace("Classes = ",t.class);const n=e.insert("rect",":first-child"),a=0,s=0;if(n.attr("width",a).attr("height",s),e.attr("class","label edgeLabel"),t.props){const i=new Set(Object.keys(t.props));t.props.borders&&(et(n,t.props.borders,a,s),i.delete("borders")),i.forEach(l=>{x.warn(`Unknown node property ${l}`)})}return k(t,n),t.intersect=function(i){return m.rect(t,i)},e};function et(r,t,e,n){const a=[],s=l=>{a.push(l,0)},i=l=>{a.push(0,l)};t.includes("t")?(x.debug("add top border"),s(e)):i(e),t.includes("r")?(x.debug("add right border"),s(n)):i(n),t.includes("b")?(x.debug("add bottom border"),s(e)):i(e),t.includes("l")?(x.debug("add left border"),s(n)):i(n),r.attr("stroke-dasharray",a.join(" "))}const Ut=(r,t)=>{let e;t.classes?e="node "+t.classes:e="node default";const n=r.insert("g").attr("class",e).attr("id",t.domId||t.id),a=n.insert("rect",":first-child"),s=n.insert("line"),i=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof l=="object"?c=l[0]:c=l,x.info("Label text abc79",c,l,typeof l=="object");const o=i.node().appendChild($(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(w().flowchart.htmlLabels)){const y=o.children[0],g=B(o);h=y.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}x.info("Text 2",l);const f=l.slice(1,l.length);let b=o.getBBox();const p=i.node().appendChild($(f.join?f.join("
"):f,t.labelStyle,!0,!0));if(H(w().flowchart.htmlLabels)){const y=p.children[0],g=B(p);h=y.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}const d=t.padding/2;return B(p).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+d+5)+")"),B(o).attr("transform","translate( "+(h.width{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.height+t.padding,s=n.width+a/4+t.padding,i=e.insert("rect",":first-child").attr("style",t.style).attr("rx",a/2).attr("ry",a/2).attr("x",-s/2).attr("y",-a/2).attr("width",s).attr("height",a);return k(t,i),t.intersect=function(l){return m.rect(t,l)},e},At=async(r,t)=>{const{shapeSvg:e,bbox:n,halfPadding:a}=await E(r,t,T(t,void 0),!0),s=e.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+a).attr("width",n.width+t.padding).attr("height",n.height+t.padding),x.info("Circle main"),k(t,s),t.intersect=function(i){return x.info("Circle intersect",t,n.width/2+a,i),m.circle(t,n.width/2+a,i)},e},Dt=async(r,t)=>{const{shapeSvg:e,bbox:n,halfPadding:a}=await E(r,t,T(t,void 0),!0),s=5,i=e.insert("g",":first-child"),l=i.insert("circle"),c=i.insert("circle");return i.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+a+s).attr("width",n.width+t.padding+s*2).attr("height",n.height+t.padding+s*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+a).attr("width",n.width+t.padding).attr("height",n.height+t.padding),x.info("DoubleCircle main"),k(t,l),t.intersect=function(o){return x.info("DoubleCircle intersect",t,n.width/2+a+s,o),m.circle(t,n.width/2+a+s,o)},e},Ot=async(r,t)=>{const{shapeSvg:e,bbox:n}=await E(r,t,T(t,void 0),!0),a=n.width+t.padding,s=n.height+t.padding,i=[{x:0,y:0},{x:a,y:0},{x:a,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=_(e,a,s,i);return l.attr("style",t.style),k(t,l),t.intersect=function(c){return m.polygon(t,i,c)},e},zt=(r,t)=>{const e=r.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=e.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),k(t,n),t.intersect=function(a){return m.circle(t,7,a)},e},G=(r,t,e)=>{const n=r.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a=70,s=10;e==="LR"&&(a=10,s=70);const i=n.append("rect").attr("x",-1*a/2).attr("y",-1*s/2).attr("width",a).attr("height",s).attr("class","fork-join");return k(t,i),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return m.rect(t,l)},n},Zt=(r,t)=>{const e=r.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=e.insert("circle",":first-child"),a=e.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),k(t,a),t.intersect=function(s){return m.circle(t,7,s)},e},Ft=(r,t)=>{const e=t.padding/2,n=4,a=8;let s;t.classes?s="node "+t.classes:s="node default";const i=r.insert("g").attr("class",s).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),c=i.insert("line"),o=i.insert("line");let h=0,f=n;const b=i.insert("g").attr("class","label");let p=0;const d=t.classData.annotations&&t.classData.annotations[0],y=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",g=b.node().appendChild($(y,t.labelStyle,!0,!0));let u=g.getBBox();if(H(w().flowchart.htmlLabels)){const v=g.children[0],L=B(g);u=v.getBoundingClientRect(),L.attr("width",u.width),L.attr("height",u.height)}t.classData.annotations[0]&&(f+=u.height+n,h+=u.width);let I=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(w().flowchart.htmlLabels?I+="<"+t.classData.type+">":I+="<"+t.classData.type+">");const R=b.node().appendChild($(I,t.labelStyle,!0,!0));B(R).attr("class","classTitle");let M=R.getBBox();if(H(w().flowchart.htmlLabels)){const v=R.children[0],L=B(R);M=v.getBoundingClientRect(),L.attr("width",M.width),L.attr("height",M.height)}f+=M.height+n,M.width>h&&(h=M.width);const W=[];t.classData.members.forEach(v=>{const L=V(v);let X=L.displayText;w().flowchart.htmlLabels&&(X=X.replace(//g,">"));const N=b.node().appendChild($(X,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let C=N.getBBox();if(H(w().flowchart.htmlLabels)){const O=N.children[0],U=B(N);C=O.getBoundingClientRect(),U.attr("width",C.width),U.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+n,W.push(N)}),f+=a;const Z=[];if(t.classData.methods.forEach(v=>{const L=V(v);let X=L.displayText;w().flowchart.htmlLabels&&(X=X.replace(//g,">"));const N=b.node().appendChild($(X,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let C=N.getBBox();if(H(w().flowchart.htmlLabels)){const O=N.children[0],U=B(N);C=O.getBoundingClientRect(),U.attr("width",C.width),U.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+n,Z.push(N)}),f+=a,d){let v=(h-u.width)/2;B(g).attr("transform","translate( "+(-1*h/2+v)+", "+-1*f/2+")"),p=u.height+n}let st=(h-M.width)/2;return B(R).attr("transform","translate( "+(-1*h/2+st)+", "+(-1*f/2+p)+")"),p+=M.height+n,c.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-f/2-e+a+p).attr("y2",-f/2-e+a+p),p+=a,W.forEach(v=>{B(v).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+a/2)+")");const L=v==null?void 0:v.getBBox();p+=((L==null?void 0:L.height)??0)+n}),p+=a,o.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-f/2-e+a+p).attr("y2",-f/2-e+a+p),p+=a,Z.forEach(v=>{B(v).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");const L=v==null?void 0:v.getBBox();p+=((L==null?void 0:L.height)??0)+n}),l.attr("class","outer title-state").attr("x",-h/2-e).attr("y",-(f/2)-e).attr("width",h+t.padding).attr("height",f+t.padding),k(t,l),t.intersect=function(v){return m.rect(t,v)},i},P={rhombus:q,question:q,rect:Xt,labelRect:Yt,rectWithTitle:Ut,choice:Ct,circle:At,doublecircle:Dt,stadium:jt,hexagon:Tt,rect_left_inv_arrow:Rt,lean_right:$t,lean_left:It,trapezoid:Ht,inv_trapezoid:Nt,rect_right_inv_arrow:_t,cylinder:Wt,start:zt,end:Zt,note:Mt,subroutine:Ot,fork:G,join:G,class_box:Ft};let Y={};const tr=async(r,t,e)=>{let n,a;if(t.link){let s;w().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),n=r.insert("svg:a").attr("xlink:href",t.link).attr("target",s),a=await P[t.shape](n,t,e)}else a=await P[t.shape](r,t,e),n=a;return t.tooltip&&a.attr("title",t.tooltip),t.class&&a.attr("class","node default "+t.class),Y[t.id]=n,t.haveCallback&&Y[t.id].attr("class",Y[t.id].attr("class")+" clickable"),n},rr=(r,t)=>{Y[t.id]=r},ar=()=>{Y={}},er=r=>{const t=Y[r.id];x.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");const e=8,n=r.diff||0;return r.clusterNode?t.attr("transform","translate("+(r.x+n-r.width/2)+", "+(r.y-r.height/2-e)+")"):t.attr("transform","translate("+r.x+", "+r.y+")"),n};let D={},S={};const sr=()=>{D={},S={}},ir=(r,t)=>{const e=H(w().flowchart.htmlLabels),n=t.labelType==="markdown"?rt(r,t.label,{style:t.labelStyle,useHtmlLabels:e,addSvgBackground:!0}):$(t.label,t.labelStyle);x.info("abc82",t,t.labelType);const a=r.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let i=n.getBBox();if(e){const c=n.children[0],o=B(n);i=c.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),D[t.id]=a,t.width=i.width,t.height=i.height;let l;if(t.startLabelLeft){const c=$(t.startLabelLeft,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),S[t.id]||(S[t.id]={}),S[t.id].startLeft=o,A(l,t.startLabelLeft)}if(t.startLabelRight){const c=$(t.startLabelRight,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=o.node().appendChild(c),h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),S[t.id]||(S[t.id]={}),S[t.id].startRight=o,A(l,t.startLabelRight)}if(t.endLabelLeft){const c=$(t.endLabelLeft,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),S[t.id]||(S[t.id]={}),S[t.id].endLeft=o,A(l,t.endLabelLeft)}if(t.endLabelRight){const c=$(t.endLabelRight,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");l=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),S[t.id]||(S[t.id]={}),S[t.id].endRight=o,A(l,t.endLabelRight)}return n};function A(r,t){w().flowchart.htmlLabels&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}const nr=(r,t)=>{x.info("Moving label abc78 ",r.id,r.label,D[r.id]);let e=t.updatedPath?t.updatedPath:t.originalPath;if(r.label){const n=D[r.id];let a=r.x,s=r.y;if(e){const i=j.calcLabelPosition(e);x.info("Moving label "+r.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc78"),t.updatedPath&&(a=i.x,s=i.y)}n.attr("transform","translate("+a+", "+s+")")}if(r.startLabelLeft){const n=S[r.id].startLeft;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",e);a=i.x,s=i.y}n.attr("transform","translate("+a+", "+s+")")}if(r.startLabelRight){const n=S[r.id].startRight;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",e);a=i.x,s=i.y}n.attr("transform","translate("+a+", "+s+")")}if(r.endLabelLeft){const n=S[r.id].endLeft;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",e);a=i.x,s=i.y}n.attr("transform","translate("+a+", "+s+")")}if(r.endLabelRight){const n=S[r.id].endRight;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",e);a=i.x,s=i.y}n.attr("transform","translate("+a+", "+s+")")}},Qt=(r,t)=>{const e=r.x,n=r.y,a=Math.abs(t.x-e),s=Math.abs(t.y-n),i=r.width/2,l=r.height/2;return a>=i||s>=l},Vt=(r,t,e)=>{x.warn(`intersection calc abc89: - outsidePoint: ${JSON.stringify(t)} - insidePoint : ${JSON.stringify(e)} - node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);const n=r.x,a=r.y,s=Math.abs(n-e.x),i=r.width/2;let l=e.xMath.abs(n-t.x)*c){let f=e.y{x.warn("abc88 cutPathAtIntersect",r,t);let e=[],n=r[0],a=!1;return r.forEach(s=>{if(x.info("abc88 checking point",s,t),!Qt(t,s)&&!a){const i=Vt(t,n,s);x.warn("abc88 inside",s,n,i),x.warn("abc88 intersection",i);let l=!1;e.forEach(c=>{l=l||c.x===i.x&&c.y===i.y}),e.some(c=>c.x===i.x&&c.y===i.y)?x.warn("abc88 no intersect",i,e):e.push(i),a=!0}else x.warn("abc88 outside",s,n),n=s,a||e.push(s)}),x.warn("abc88 returning points",e),e},lr=function(r,t,e,n,a,s){let i=e.points,l=!1;const c=s.node(t.v);var o=s.node(t.w);x.info("abc88 InsertEdge: ",e),o.intersect&&c.intersect&&(i=i.slice(1,e.points.length-1),i.unshift(c.intersect(i[0])),x.info("Last point",i[i.length-1],o,o.intersect(i[i.length-1])),i.push(o.intersect(i[i.length-1]))),e.toCluster&&(x.info("to cluster abc88",n[e.toCluster]),i=tt(e.points,n[e.toCluster].node),l=!0),e.fromCluster&&(x.info("from cluster abc88",n[e.fromCluster]),i=tt(i.reverse(),n[e.fromCluster].node).reverse(),l=!0);const h=i.filter(u=>!Number.isNaN(u.y));let f;a==="graph"||a==="flowchart"?f=e.curve||Q:f=Q;const b=it().x(function(u){return u.x}).y(function(u){return u.y}).curve(f);let p;switch(e.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;case"invisible":p="edge-thickness-thick";break;default:p=""}switch(e.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const d=r.append("path").attr("d",b(h)).attr("id",e.id).attr("class"," "+p+(e.classes?" "+e.classes:"")).attr("style",e.style);let y="";switch((w().flowchart.arrowMarkerAbsolute||w().state.arrowMarkerAbsolute)&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),x.info("arrowTypeStart",e.arrowTypeStart),x.info("arrowTypeEnd",e.arrowTypeEnd),e.arrowTypeStart){case"arrow_cross":d.attr("marker-start","url("+y+"#"+a+"-crossStart)");break;case"arrow_point":d.attr("marker-start","url("+y+"#"+a+"-pointStart)");break;case"arrow_barb":d.attr("marker-start","url("+y+"#"+a+"-barbStart)");break;case"arrow_circle":d.attr("marker-start","url("+y+"#"+a+"-circleStart)");break;case"aggregation":d.attr("marker-start","url("+y+"#"+a+"-aggregationStart)");break;case"extension":d.attr("marker-start","url("+y+"#"+a+"-extensionStart)");break;case"composition":d.attr("marker-start","url("+y+"#"+a+"-compositionStart)");break;case"dependency":d.attr("marker-start","url("+y+"#"+a+"-dependencyStart)");break;case"lollipop":d.attr("marker-start","url("+y+"#"+a+"-lollipopStart)");break}switch(e.arrowTypeEnd){case"arrow_cross":d.attr("marker-end","url("+y+"#"+a+"-crossEnd)");break;case"arrow_point":d.attr("marker-end","url("+y+"#"+a+"-pointEnd)");break;case"arrow_barb":d.attr("marker-end","url("+y+"#"+a+"-barbEnd)");break;case"arrow_circle":d.attr("marker-end","url("+y+"#"+a+"-circleEnd)");break;case"aggregation":d.attr("marker-end","url("+y+"#"+a+"-aggregationEnd)");break;case"extension":d.attr("marker-end","url("+y+"#"+a+"-extensionEnd)");break;case"composition":d.attr("marker-end","url("+y+"#"+a+"-compositionEnd)");break;case"dependency":d.attr("marker-end","url("+y+"#"+a+"-dependencyEnd)");break;case"lollipop":d.attr("marker-end","url("+y+"#"+a+"-lollipopEnd)");break}let g={};return l&&(g.updatedPath=i),g.originalPath=e.points,g};export{tr as a,ir as b,lr as c,nr as d,ar as e,sr as f,$ as g,Bt as h,Pt as i,E as l,er as p,rr as s,k as u}; diff --git a/backend/web/assets/edges-0005682e-ae86cacb.js b/backend/web/assets/edges-0005682e-ae86cacb.js new file mode 100644 index 00000000..fc87d20a --- /dev/null +++ b/backend/web/assets/edges-0005682e-ae86cacb.js @@ -0,0 +1,4 @@ +import{y as H,j as w,k as F,ah as z,o as B,p as x,G as j,L as Q}from"./TextOutput-39ff842e.js";import{c as rt}from"./createText-3b1f58a4-cb14bcdc.js";import{p as V}from"./svgDraw-70101091-6aa9b265.js";import{l as it}from"./line-971ba693.js";const lt=(r,t,e,l)=>{t.forEach(a=>{xt[a](r,e,l)})},nt=(r,t,e)=>{x.trace("Making markers for ",e),r.append("defs").append("marker").attr("id",t+"-extensionStart").attr("class","marker extension "+t).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"),r.append("defs").append("marker").attr("id",t+"-extensionEnd").attr("class","marker extension "+t).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")},ct=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-compositionStart").attr("class","marker composition "+t).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"),r.append("defs").append("marker").attr("id",t+"-compositionEnd").attr("class","marker composition "+t).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")},ht=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-aggregationStart").attr("class","marker aggregation "+t).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"),r.append("defs").append("marker").attr("id",t+"-aggregationEnd").attr("class","marker aggregation "+t).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")},ot=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-dependencyStart").attr("class","marker dependency "+t).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"),r.append("defs").append("marker").attr("id",t+"-dependencyEnd").attr("class","marker dependency "+t).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")},ft=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},pt=(r,t)=>{r.append("marker").attr("id",t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",10).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"),r.append("marker").attr("id",t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",0).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")},dt=(r,t)=>{r.append("marker").attr("id",t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),r.append("marker").attr("id",t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},yt=(r,t)=>{r.append("marker").attr("id",t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),r.append("marker").attr("id",t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},bt=(r,t)=>{r.append("defs").append("marker").attr("id",t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},xt={extension:nt,composition:ct,aggregation:ht,dependency:ot,lollipop:ft,point:pt,circle:dt,cross:yt,barb:bt},Pt=lt;function gt(r,t){t&&r.attr("style",t)}function ut(r){const t=B(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),e=t.append("xhtml:div"),l=r.label,a=r.isNode?"nodeLabel":"edgeLabel";return e.html('"+l+""),gt(e,r.labelStyle),e.style("display","inline-block"),e.style("white-space","nowrap"),e.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}const wt=(r,t,e,l)=>{let a=r||"";if(typeof a=="object"&&(a=a[0]),H(w().flowchart.htmlLabels)){a=a.replace(/\\n|\n/g,"
"),x.info("vertexText"+a);const s={isNode:l,label:z(a).replace(/fa[blrs]?:fa-[\w-]+/g,n=>``),labelStyle:t.replace("fill:","color:")};return ut(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));let i=[];typeof a=="string"?i=a.split(/\\n|\n|/gi):Array.isArray(a)?i=a:i=[];for(const n of i){const c=document.createElementNS("http://www.w3.org/2000/svg","tspan");c.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),c.setAttribute("dy","1em"),c.setAttribute("x","0"),e?c.setAttribute("class","title-row"):c.setAttribute("class","row"),c.textContent=n.trim(),s.appendChild(c)}return s}},$=wt,E=async(r,t,e,l)=>{let a;const s=t.useHtmlLabels||H(w().flowchart.htmlLabels);e?a=e:a="node default";const i=r.insert("g").attr("class",a).attr("id",t.domId||t.id),n=i.insert("g").attr("class","label").attr("style",t.labelStyle);let c;t.labelText===void 0?c="":c=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=n.node();let h;t.labelType==="markdown"?h=rt(n,F(z(c),w()),{useHtmlLabels:s,width:t.width||w().flowchart.wrappingWidth,classes:"markdown-node-label"}):h=o.appendChild($(F(z(c),w()),t.labelStyle,!1,l));let f=h.getBBox();const b=t.padding/2;if(H(w().flowchart.htmlLabels)){const p=h.children[0],d=B(h),y=p.getElementsByTagName("img");if(y){const g=c.replace(/]*>/g,"").trim()==="";await Promise.all([...y].map(u=>new Promise(I=>{function R(){if(u.style.display="flex",u.style.flexDirection="column",g){const M=w().fontSize?w().fontSize:window.getComputedStyle(document.body).fontSize,W=5;u.style.width=parseInt(M,10)*W+"px"}else u.style.width="100%";I(u)}setTimeout(()=>{u.complete&&R()}),u.addEventListener("error",R),u.addEventListener("load",R)})))}f=p.getBoundingClientRect(),d.attr("width",f.width),d.attr("height",f.height)}return s?n.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):n.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&n.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:i,bbox:f,halfPadding:b,label:n}},k=(r,t)=>{const e=t.node().getBBox();r.width=e.width,r.height=e.height};function _(r,t,e,l){return r.insert("polygon",":first-child").attr("points",l.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+e/2+")")}function mt(r,t){return r.intersect(t)}function at(r,t,e,l){var a=r.x,s=r.y,i=a-l.x,n=s-l.y,c=Math.sqrt(t*t*n*n+e*e*i*i),o=Math.abs(t*e*i/c);l.x0}function Lt(r,t,e){var l=r.x,a=r.y,s=[],i=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){i=Math.min(i,d.x),n=Math.min(n,d.y)}):(i=Math.min(i,t.x),n=Math.min(n,t.y));for(var c=l-r.width/2-i,o=a-r.height/2-n,h=0;h1&&s.sort(function(d,y){var g=d.x-e.x,u=d.y-e.y,I=Math.sqrt(g*g+u*u),R=y.x-e.x,M=y.y-e.y,W=Math.sqrt(R*R+M*M);return I{var e=r.x,l=r.y,a=t.x-e,s=t.y-l,i=r.width/2,n=r.height/2,c,o;return Math.abs(s)*i>Math.abs(a)*n?(s<0&&(n=-n),c=s===0?0:n*a/s,o=n):(a<0&&(i=-i),c=i,o=a===0?0:i*s/a),{x:e+c,y:l+o}},Bt=St,m={node:mt,circle:kt,ellipse:at,polygon:Lt,rect:Bt},Et=async(r,t)=>{t.useHtmlLabels||w().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:l,bbox:a,halfPadding:s}=await E(r,t,"node "+t.classes,!0);x.info("Classes = ",t.classes);const i=l.insert("rect",":first-child");return i.attr("rx",t.rx).attr("ry",t.ry).attr("x",-a.width/2-s).attr("y",-a.height/2-s).attr("width",a.width+t.padding).attr("height",a.height+t.padding),k(t,i),t.intersect=function(n){return m.rect(t,n)},l},Mt=Et,q=r=>r?" "+r:"",T=(r,t)=>`${t||"node default"}${q(r.classes)} ${q(r.class)}`,G=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=a+s,n=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];x.info("Question main (Circle)");const c=_(e,i,i,n);return c.attr("style",t.style),k(t,c),t.intersect=function(o){return x.warn("Intersect called"),m.polygon(t,n,o)},e},Ct=(r,t)=>{const e=r.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=28,a=[{x:0,y:l/2},{x:l/2,y:0},{x:0,y:-l/2},{x:-l/2,y:0}];return e.insert("polygon",":first-child").attr("points",a.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(i){return m.circle(t,14,i)},e},Tt=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=4,s=l.height+t.padding,i=s/a,n=l.width+2*i+t.padding,c=[{x:i,y:0},{x:n-i,y:0},{x:n,y:-s/2},{x:n-i,y:-s},{x:i,y:-s},{x:0,y:-s/2}],o=_(e,n,s,c);return o.attr("style",t.style),k(t,o),t.intersect=function(h){return m.polygon(t,c,h)},e},Rt=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:-s/2,y:0},{x:a,y:0},{x:a,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return _(e,a,s,i).attr("style",t.style),t.width=a+s,t.height=s,t.intersect=function(c){return m.polygon(t,i,c)},e},$t=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:-2*s/6,y:0},{x:a-s/6,y:0},{x:a+2*s/6,y:-s},{x:s/6,y:-s}],n=_(e,a,s,i);return n.attr("style",t.style),k(t,n),t.intersect=function(c){return m.polygon(t,i,c)},e},It=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:2*s/6,y:0},{x:a+s/6,y:0},{x:a-2*s/6,y:-s},{x:-s/6,y:-s}],n=_(e,a,s,i);return n.attr("style",t.style),k(t,n),t.intersect=function(c){return m.polygon(t,i,c)},e},Ht=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:-2*s/6,y:0},{x:a+2*s/6,y:0},{x:a-s/6,y:-s},{x:s/6,y:-s}],n=_(e,a,s,i);return n.attr("style",t.style),k(t,n),t.intersect=function(c){return m.polygon(t,i,c)},e},Nt=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:s/6,y:0},{x:a-s/6,y:0},{x:a+2*s/6,y:-s},{x:-2*s/6,y:-s}],n=_(e,a,s,i);return n.attr("style",t.style),k(t,n),t.intersect=function(c){return m.polygon(t,i,c)},e},_t=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:0,y:0},{x:a+s/2,y:0},{x:a,y:-s/2},{x:a+s/2,y:-s},{x:0,y:-s}],n=_(e,a,s,i);return n.attr("style",t.style),k(t,n),t.intersect=function(c){return m.polygon(t,i,c)},e},Wt=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=a/2,i=s/(2.5+a/50),n=l.height+i+t.padding,c="M 0,"+i+" a "+s+","+i+" 0,0,0 "+a+" 0 a "+s+","+i+" 0,0,0 "+-a+" 0 l 0,"+n+" a "+s+","+i+" 0,0,0 "+a+" 0 l 0,"+-n,o=e.attr("label-offset-y",i).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-a/2+","+-(n/2+i)+")");return k(t,o),t.intersect=function(h){const f=m.rect(t,h),b=f.x-t.x;if(s!=0&&(Math.abs(b)t.height/2-i)){let p=i*i*(1-b*b/(s*s));p!=0&&(p=Math.sqrt(p)),p=i-p,h.y-t.y>0&&(p=-p),f.y+=p}return f},e},Xt=async(r,t)=>{const{shapeSvg:e,bbox:l,halfPadding:a}=await E(r,t,"node "+t.classes+" "+t.class,!0),s=e.insert("rect",":first-child"),i=l.width+t.padding,n=l.height+t.padding;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-a).attr("y",-l.height/2-a).attr("width",i).attr("height",n),t.props){const c=new Set(Object.keys(t.props));t.props.borders&&(et(s,t.props.borders,i,n),c.delete("borders")),c.forEach(o=>{x.warn(`Unknown node property ${o}`)})}return k(t,s),t.intersect=function(c){return m.rect(t,c)},e},Yt=async(r,t)=>{const{shapeSvg:e}=await E(r,t,"label",!0);x.trace("Classes = ",t.class);const l=e.insert("rect",":first-child"),a=0,s=0;if(l.attr("width",a).attr("height",s),e.attr("class","label edgeLabel"),t.props){const i=new Set(Object.keys(t.props));t.props.borders&&(et(l,t.props.borders,a,s),i.delete("borders")),i.forEach(n=>{x.warn(`Unknown node property ${n}`)})}return k(t,l),t.intersect=function(i){return m.rect(t,i)},e};function et(r,t,e,l){const a=[],s=n=>{a.push(n,0)},i=n=>{a.push(0,n)};t.includes("t")?(x.debug("add top border"),s(e)):i(e),t.includes("r")?(x.debug("add right border"),s(l)):i(l),t.includes("b")?(x.debug("add bottom border"),s(e)):i(e),t.includes("l")?(x.debug("add left border"),s(l)):i(l),r.attr("stroke-dasharray",a.join(" "))}const Ut=(r,t)=>{let e;t.classes?e="node "+t.classes:e="node default";const l=r.insert("g").attr("class",e).attr("id",t.domId||t.id),a=l.insert("rect",":first-child"),s=l.insert("line"),i=l.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof n=="object"?c=n[0]:c=n,x.info("Label text abc79",c,n,typeof n=="object");const o=i.node().appendChild($(c,t.labelStyle,!0,!0));let h={width:0,height:0};if(H(w().flowchart.htmlLabels)){const y=o.children[0],g=B(o);h=y.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}x.info("Text 2",n);const f=n.slice(1,n.length);let b=o.getBBox();const p=i.node().appendChild($(f.join?f.join("
"):f,t.labelStyle,!0,!0));if(H(w().flowchart.htmlLabels)){const y=p.children[0],g=B(p);h=y.getBoundingClientRect(),g.attr("width",h.width),g.attr("height",h.height)}const d=t.padding/2;return B(p).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+d+5)+")"),B(o).attr("transform","translate( "+(h.width{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.height+t.padding,s=l.width+a/4+t.padding,i=e.insert("rect",":first-child").attr("style",t.style).attr("rx",a/2).attr("ry",a/2).attr("x",-s/2).attr("y",-a/2).attr("width",s).attr("height",a);return k(t,i),t.intersect=function(n){return m.rect(t,n)},e},At=async(r,t)=>{const{shapeSvg:e,bbox:l,halfPadding:a}=await E(r,t,T(t,void 0),!0),s=e.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",l.width/2+a).attr("width",l.width+t.padding).attr("height",l.height+t.padding),x.info("Circle main"),k(t,s),t.intersect=function(i){return x.info("Circle intersect",t,l.width/2+a,i),m.circle(t,l.width/2+a,i)},e},Dt=async(r,t)=>{const{shapeSvg:e,bbox:l,halfPadding:a}=await E(r,t,T(t,void 0),!0),s=5,i=e.insert("g",":first-child"),n=i.insert("circle"),c=i.insert("circle");return i.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",l.width/2+a+s).attr("width",l.width+t.padding+s*2).attr("height",l.height+t.padding+s*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",l.width/2+a).attr("width",l.width+t.padding).attr("height",l.height+t.padding),x.info("DoubleCircle main"),k(t,n),t.intersect=function(o){return x.info("DoubleCircle intersect",t,l.width/2+a+s,o),m.circle(t,l.width/2+a+s,o)},e},Ot=async(r,t)=>{const{shapeSvg:e,bbox:l}=await E(r,t,T(t,void 0),!0),a=l.width+t.padding,s=l.height+t.padding,i=[{x:0,y:0},{x:a,y:0},{x:a,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],n=_(e,a,s,i);return n.attr("style",t.style),k(t,n),t.intersect=function(c){return m.polygon(t,i,c)},e},zt=(r,t)=>{const e=r.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=e.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),k(t,l),t.intersect=function(a){return m.circle(t,7,a)},e},K=(r,t,e)=>{const l=r.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a=70,s=10;e==="LR"&&(a=10,s=70);const i=l.append("rect").attr("x",-1*a/2).attr("y",-1*s/2).attr("width",a).attr("height",s).attr("class","fork-join");return k(t,i),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return m.rect(t,n)},l},Zt=(r,t)=>{const e=r.insert("g").attr("class","node default").attr("id",t.domId||t.id),l=e.insert("circle",":first-child"),a=e.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),l.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),k(t,a),t.intersect=function(s){return m.circle(t,7,s)},e},Ft=(r,t)=>{const e=t.padding/2,l=4,a=8;let s;t.classes?s="node "+t.classes:s="node default";const i=r.insert("g").attr("class",s).attr("id",t.domId||t.id),n=i.insert("rect",":first-child"),c=i.insert("line"),o=i.insert("line");let h=0,f=l;const b=i.insert("g").attr("class","label");let p=0;const d=t.classData.annotations&&t.classData.annotations[0],y=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",g=b.node().appendChild($(y,t.labelStyle,!0,!0));let u=g.getBBox();if(H(w().flowchart.htmlLabels)){const v=g.children[0],L=B(g);u=v.getBoundingClientRect(),L.attr("width",u.width),L.attr("height",u.height)}t.classData.annotations[0]&&(f+=u.height+l,h+=u.width);let I=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(w().flowchart.htmlLabels?I+="<"+t.classData.type+">":I+="<"+t.classData.type+">");const R=b.node().appendChild($(I,t.labelStyle,!0,!0));B(R).attr("class","classTitle");let M=R.getBBox();if(H(w().flowchart.htmlLabels)){const v=R.children[0],L=B(R);M=v.getBoundingClientRect(),L.attr("width",M.width),L.attr("height",M.height)}f+=M.height+l,M.width>h&&(h=M.width);const W=[];t.classData.members.forEach(v=>{const L=V(v);let X=L.displayText;w().flowchart.htmlLabels&&(X=X.replace(//g,">"));const N=b.node().appendChild($(X,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let C=N.getBBox();if(H(w().flowchart.htmlLabels)){const O=N.children[0],U=B(N);C=O.getBoundingClientRect(),U.attr("width",C.width),U.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+l,W.push(N)}),f+=a;const Z=[];if(t.classData.methods.forEach(v=>{const L=V(v);let X=L.displayText;w().flowchart.htmlLabels&&(X=X.replace(//g,">"));const N=b.node().appendChild($(X,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0));let C=N.getBBox();if(H(w().flowchart.htmlLabels)){const O=N.children[0],U=B(N);C=O.getBoundingClientRect(),U.attr("width",C.width),U.attr("height",C.height)}C.width>h&&(h=C.width),f+=C.height+l,Z.push(N)}),f+=a,d){let v=(h-u.width)/2;B(g).attr("transform","translate( "+(-1*h/2+v)+", "+-1*f/2+")"),p=u.height+l}let st=(h-M.width)/2;return B(R).attr("transform","translate( "+(-1*h/2+st)+", "+(-1*f/2+p)+")"),p+=M.height+l,c.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-f/2-e+a+p).attr("y2",-f/2-e+a+p),p+=a,W.forEach(v=>{B(v).attr("transform","translate( "+-h/2+", "+(-1*f/2+p+a/2)+")");const L=v==null?void 0:v.getBBox();p+=((L==null?void 0:L.height)??0)+l}),p+=a,o.attr("class","divider").attr("x1",-h/2-e).attr("x2",h/2+e).attr("y1",-f/2-e+a+p).attr("y2",-f/2-e+a+p),p+=a,Z.forEach(v=>{B(v).attr("transform","translate( "+-h/2+", "+(-1*f/2+p)+")");const L=v==null?void 0:v.getBBox();p+=((L==null?void 0:L.height)??0)+l}),n.attr("class","outer title-state").attr("x",-h/2-e).attr("y",-(f/2)-e).attr("width",h+t.padding).attr("height",f+t.padding),k(t,n),t.intersect=function(v){return m.rect(t,v)},i},P={rhombus:G,question:G,rect:Xt,labelRect:Yt,rectWithTitle:Ut,choice:Ct,circle:At,doublecircle:Dt,stadium:jt,hexagon:Tt,rect_left_inv_arrow:Rt,lean_right:$t,lean_left:It,trapezoid:Ht,inv_trapezoid:Nt,rect_right_inv_arrow:_t,cylinder:Wt,start:zt,end:Zt,note:Mt,subroutine:Ot,fork:K,join:K,class_box:Ft};let Y={};const tr=async(r,t,e)=>{let l,a;if(t.link){let s;w().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),l=r.insert("svg:a").attr("xlink:href",t.link).attr("target",s),a=await P[t.shape](l,t,e)}else a=await P[t.shape](r,t,e),l=a;return t.tooltip&&a.attr("title",t.tooltip),t.class&&a.attr("class","node default "+t.class),Y[t.id]=l,t.haveCallback&&Y[t.id].attr("class",Y[t.id].attr("class")+" clickable"),l},rr=(r,t)=>{Y[t.id]=r},ar=()=>{Y={}},er=r=>{const t=Y[r.id];x.trace("Transforming node",r.diff,r,"translate("+(r.x-r.width/2-5)+", "+r.width/2+")");const e=8,l=r.diff||0;return r.clusterNode?t.attr("transform","translate("+(r.x+l-r.width/2)+", "+(r.y-r.height/2-e)+")"):t.attr("transform","translate("+r.x+", "+r.y+")"),l};let D={},S={};const sr=()=>{D={},S={}},ir=(r,t)=>{const e=H(w().flowchart.htmlLabels),l=t.labelType==="markdown"?rt(r,t.label,{style:t.labelStyle,useHtmlLabels:e,addSvgBackground:!0}):$(t.label,t.labelStyle);x.info("abc82",t,t.labelType);const a=r.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(l);let i=l.getBBox();if(e){const c=l.children[0],o=B(l);i=c.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),D[t.id]=a,t.width=i.width,t.height=i.height;let n;if(t.startLabelLeft){const c=$(t.startLabelLeft,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),S[t.id]||(S[t.id]={}),S[t.id].startLeft=o,A(n,t.startLabelLeft)}if(t.startLabelRight){const c=$(t.startLabelRight,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=o.node().appendChild(c),h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),S[t.id]||(S[t.id]={}),S[t.id].startRight=o,A(n,t.startLabelRight)}if(t.endLabelLeft){const c=$(t.endLabelLeft,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),S[t.id]||(S[t.id]={}),S[t.id].endLeft=o,A(n,t.endLabelLeft)}if(t.endLabelRight){const c=$(t.endLabelRight,t.labelStyle),o=r.insert("g").attr("class","edgeTerminals"),h=o.insert("g").attr("class","inner");n=h.node().appendChild(c);const f=c.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),o.node().appendChild(c),S[t.id]||(S[t.id]={}),S[t.id].endRight=o,A(n,t.endLabelRight)}return l};function A(r,t){w().flowchart.htmlLabels&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}const lr=(r,t)=>{x.info("Moving label abc78 ",r.id,r.label,D[r.id]);let e=t.updatedPath?t.updatedPath:t.originalPath;if(r.label){const l=D[r.id];let a=r.x,s=r.y;if(e){const i=j.calcLabelPosition(e);x.info("Moving label "+r.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc78"),t.updatedPath&&(a=i.x,s=i.y)}l.attr("transform","translate("+a+", "+s+")")}if(r.startLabelLeft){const l=S[r.id].startLeft;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",e);a=i.x,s=i.y}l.attr("transform","translate("+a+", "+s+")")}if(r.startLabelRight){const l=S[r.id].startRight;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",e);a=i.x,s=i.y}l.attr("transform","translate("+a+", "+s+")")}if(r.endLabelLeft){const l=S[r.id].endLeft;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",e);a=i.x,s=i.y}l.attr("transform","translate("+a+", "+s+")")}if(r.endLabelRight){const l=S[r.id].endRight;let a=r.x,s=r.y;if(e){const i=j.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",e);a=i.x,s=i.y}l.attr("transform","translate("+a+", "+s+")")}},Qt=(r,t)=>{const e=r.x,l=r.y,a=Math.abs(t.x-e),s=Math.abs(t.y-l),i=r.width/2,n=r.height/2;return a>=i||s>=n},Vt=(r,t,e)=>{x.warn(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(e)} + node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);const l=r.x,a=r.y,s=Math.abs(l-e.x),i=r.width/2;let n=e.xMath.abs(l-t.x)*c){let f=e.y{x.warn("abc88 cutPathAtIntersect",r,t);let e=[],l=r[0],a=!1;return r.forEach(s=>{if(x.info("abc88 checking point",s,t),!Qt(t,s)&&!a){const i=Vt(t,l,s);x.warn("abc88 inside",s,l,i),x.warn("abc88 intersection",i);let n=!1;e.forEach(c=>{n=n||c.x===i.x&&c.y===i.y}),e.some(c=>c.x===i.x&&c.y===i.y)?x.warn("abc88 no intersect",i,e):e.push(i),a=!0}else x.warn("abc88 outside",s,l),l=s,a||e.push(s)}),x.warn("abc88 returning points",e),e},nr=function(r,t,e,l,a,s){let i=e.points,n=!1;const c=s.node(t.v);var o=s.node(t.w);x.info("abc88 InsertEdge: ",e),o.intersect&&c.intersect&&(i=i.slice(1,e.points.length-1),i.unshift(c.intersect(i[0])),x.info("Last point",i[i.length-1],o,o.intersect(i[i.length-1])),i.push(o.intersect(i[i.length-1]))),e.toCluster&&(x.info("to cluster abc88",l[e.toCluster]),i=tt(e.points,l[e.toCluster].node),n=!0),e.fromCluster&&(x.info("from cluster abc88",l[e.fromCluster]),i=tt(i.reverse(),l[e.fromCluster].node).reverse(),n=!0);const h=i.filter(u=>!Number.isNaN(u.y));let f;a==="graph"||a==="flowchart"?f=e.curve||Q:f=Q;const b=it().x(function(u){return u.x}).y(function(u){return u.y}).curve(f);let p;switch(e.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;case"invisible":p="edge-thickness-thick";break;default:p=""}switch(e.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const d=r.append("path").attr("d",b(h)).attr("id",e.id).attr("class"," "+p+(e.classes?" "+e.classes:"")).attr("style",e.style);let y="";switch((w().flowchart.arrowMarkerAbsolute||w().state.arrowMarkerAbsolute)&&(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,y=y.replace(/\(/g,"\\("),y=y.replace(/\)/g,"\\)")),x.info("arrowTypeStart",e.arrowTypeStart),x.info("arrowTypeEnd",e.arrowTypeEnd),e.arrowTypeStart){case"arrow_cross":d.attr("marker-start","url("+y+"#"+a+"-crossStart)");break;case"arrow_point":d.attr("marker-start","url("+y+"#"+a+"-pointStart)");break;case"arrow_barb":d.attr("marker-start","url("+y+"#"+a+"-barbStart)");break;case"arrow_circle":d.attr("marker-start","url("+y+"#"+a+"-circleStart)");break;case"aggregation":d.attr("marker-start","url("+y+"#"+a+"-aggregationStart)");break;case"extension":d.attr("marker-start","url("+y+"#"+a+"-extensionStart)");break;case"composition":d.attr("marker-start","url("+y+"#"+a+"-compositionStart)");break;case"dependency":d.attr("marker-start","url("+y+"#"+a+"-dependencyStart)");break;case"lollipop":d.attr("marker-start","url("+y+"#"+a+"-lollipopStart)");break}switch(e.arrowTypeEnd){case"arrow_cross":d.attr("marker-end","url("+y+"#"+a+"-crossEnd)");break;case"arrow_point":d.attr("marker-end","url("+y+"#"+a+"-pointEnd)");break;case"arrow_barb":d.attr("marker-end","url("+y+"#"+a+"-barbEnd)");break;case"arrow_circle":d.attr("marker-end","url("+y+"#"+a+"-circleEnd)");break;case"aggregation":d.attr("marker-end","url("+y+"#"+a+"-aggregationEnd)");break;case"extension":d.attr("marker-end","url("+y+"#"+a+"-extensionEnd)");break;case"composition":d.attr("marker-end","url("+y+"#"+a+"-compositionEnd)");break;case"dependency":d.attr("marker-end","url("+y+"#"+a+"-dependencyEnd)");break;case"lollipop":d.attr("marker-end","url("+y+"#"+a+"-lollipopEnd)");break}let g={};return n&&(g.updatedPath=i),g.originalPath=e.points,g};export{tr as a,ir as b,nr as c,lr as d,ar as e,sr as f,$ as g,Bt as h,Pt as i,E as l,er as p,rr as s,k as u}; diff --git a/backend/web/assets/erDiagram-dedf2781-389146a3.js b/backend/web/assets/erDiagram-dedf2781-1cba01d0.js similarity index 66% rename from backend/web/assets/erDiagram-dedf2781-389146a3.js rename to backend/web/assets/erDiagram-dedf2781-1cba01d0.js index 5136facb..fe90403f 100644 --- a/backend/web/assets/erDiagram-dedf2781-389146a3.js +++ b/backend/web/assets/erDiagram-dedf2781-1cba01d0.js @@ -1,9 +1,9 @@ -import{i as W,s as kt,g as xt,h as Rt,f as Ot,H as bt,I as Nt,m as Tt,o as tt,J as At,n as nt,F as Mt,p as vt,K as Dt,L as It}from"./EchartsRenderer-3d08027d.js";import{G as wt,l as St}from"./layout-e00002c0.js";import"./index-51905ea3.js";import{u as Lt}from"./stringify-ec884b6d.js";import{l as Bt}from"./line-7fbcfe17.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const Ct=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Pt(t){return typeof t=="string"&&Ct.test(t)}function Yt(t){if(!Pt(t))throw TypeError("Invalid UUID");let r;const e=new Uint8Array(16);return e[0]=(r=parseInt(t.slice(0,8),16))>>>24,e[1]=r>>>16&255,e[2]=r>>>8&255,e[3]=r&255,e[4]=(r=parseInt(t.slice(9,13),16))>>>8,e[5]=r&255,e[6]=(r=parseInt(t.slice(14,18),16))>>>8,e[7]=r&255,e[8]=(r=parseInt(t.slice(19,23),16))>>>8,e[9]=r&255,e[10]=(r=parseInt(t.slice(24,36),16))/1099511627776&255,e[11]=r/4294967296&255,e[12]=r>>>24&255,e[13]=r>>>16&255,e[14]=r>>>8&255,e[15]=r&255,e}function Zt(t){t=unescape(encodeURIComponent(t));const r=[];for(let e=0;e>>32-r}function Ht(t){const r=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const u=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;O=g,g=m,m=st(_,30)>>>0,_=c,c=P}e[0]=e[0]+c>>>0,e[1]=e[1]+_>>>0,e[2]=e[2]+m>>>0,e[3]=e[3]+g>>>0,e[4]=e[4]+O>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,e[0]&255,e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,e[1]&255,e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,e[2]&255,e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,e[3]&255,e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,e[4]&255]}const Kt=Vt("v5",80,Ht),zt=Kt;var ot=function(){var t=function(A,a,l,d){for(l=l||{},d=A.length;d--;l[A[d]]=a);return l},r=[1,2],e=[1,5],n=[6,9,11,23,25,27,29,30,31,52],s=[1,17],p=[1,18],u=[1,19],o=[1,20],c=[1,21],_=[1,22],m=[1,25],g=[1,30],O=[1,31],y=[1,32],T=[1,33],P=[1,34],V=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,48,52],G=[1,46],I=[30,31,49,50],N=[4,6,9,11,23,25,27,29,30,31,52],M=[44,45,46,47,48],k=[22,37],x=[1,66],C=[1,65],Y=[22,37,39,41],D={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,MD_PARENT:48,NON_IDENTIFYING:49,IDENTIFYING:50,WORD:51,open_directive:52,type_directive:53,arg_directive:54,close_directive:55,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"MD_PARENT",49:"NON_IDENTIFYING",50:"IDENTIFYING",51:"WORD",52:"open_directive",53:"type_directive",54:"arg_directive",55:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(a,l,d,f,E,i,X){var h=i.length-1;switch(E){case 1:break;case 3:this.$=[];break;case 4:i[h-1].push(i[h]),this.$=i[h-1];break;case 5:case 6:this.$=i[h];break;case 7:case 8:this.$=[];break;case 12:f.addEntity(i[h-4]),f.addEntity(i[h-2]),f.addRelationship(i[h-4],i[h],i[h-2],i[h-3]);break;case 13:f.addEntity(i[h-3]),f.addAttributes(i[h-3],i[h-1]);break;case 14:f.addEntity(i[h-2]);break;case 15:f.addEntity(i[h]);break;case 16:case 17:this.$=i[h].trim(),f.setAccTitle(this.$);break;case 18:case 19:this.$=i[h].trim(),f.setAccDescription(this.$);break;case 20:case 44:this.$=i[h];break;case 21:case 42:case 43:this.$=i[h].replace(/"/g,"");break;case 22:case 30:this.$=[i[h]];break;case 23:i[h].push(i[h-1]),this.$=i[h];break;case 24:this.$={attributeType:i[h-1],attributeName:i[h]};break;case 25:this.$={attributeType:i[h-2],attributeName:i[h-1],attributeKeyTypeList:i[h]};break;case 26:this.$={attributeType:i[h-2],attributeName:i[h-1],attributeComment:i[h]};break;case 27:this.$={attributeType:i[h-3],attributeName:i[h-2],attributeKeyTypeList:i[h-1],attributeComment:i[h]};break;case 28:case 29:case 32:this.$=i[h];break;case 31:i[h-2].push(i[h]),this.$=i[h-2];break;case 33:this.$=i[h].replace(/"/g,"");break;case 34:this.$={cardA:i[h],relType:i[h-1],cardB:i[h-2]};break;case 35:this.$=f.Cardinality.ZERO_OR_ONE;break;case 36:this.$=f.Cardinality.ZERO_OR_MORE;break;case 37:this.$=f.Cardinality.ONE_OR_MORE;break;case 38:this.$=f.Cardinality.ONLY_ONE;break;case 39:this.$=f.Cardinality.MD_PARENT;break;case 40:this.$=f.Identification.NON_IDENTIFYING;break;case 41:this.$=f.Identification.IDENTIFYING;break;case 45:f.parseDirective("%%{","open_directive");break;case 46:f.parseDirective(i[h],"type_directive");break;case 47:i[h]=i[h].trim().replace(/'/g,'"'),f.parseDirective(i[h],"arg_directive");break;case 48:f.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:r,7:3,12:4,52:e},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:r,7:3,12:4,52:e},{13:8,53:[1,9]},{53:[2,45]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:s,25:p,27:u,29:o,30:c,31:_,52:e},{1:[2,2]},{14:23,15:[1,24],55:m},t([15,55],[2,46]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:15,10:26,12:4,17:16,23:s,25:p,27:u,29:o,30:c,31:_,52:e},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),t(n,[2,15],{18:27,42:29,20:[1,28],44:g,45:O,46:y,47:T,48:P}),{24:[1,35]},{26:[1,36]},{28:[1,37]},t(n,[2,19]),t(V,[2,20]),t(V,[2,21]),{11:[1,38]},{16:39,54:[1,40]},{11:[2,48]},t(n,[2,5]),{17:41,30:c,31:_},{21:42,22:[1,43],32:44,33:45,37:G},{43:47,49:[1,48],50:[1,49]},t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),t(I,[2,39]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(N,[2,9]),{14:50,55:m},{55:[2,47]},{15:[1,51]},{22:[1,52]},t(n,[2,14]),{21:53,22:[2,22],32:44,33:45,37:G},{34:54,37:[1,55]},{37:[2,28]},{42:56,44:g,45:O,46:y,47:T,48:P},t(M,[2,40]),t(M,[2,41]),{11:[1,57]},{19:58,30:[1,61],31:[1,60],51:[1,59]},t(n,[2,13]),{22:[2,23]},t(k,[2,24],{35:62,36:63,38:64,40:x,41:C}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(N,[2,10]),t(n,[2,12]),t(n,[2,42]),t(n,[2,43]),t(n,[2,44]),t(k,[2,25],{36:67,39:[1,68],41:C}),t(k,[2,26]),t(Y,[2,30]),t(k,[2,33]),t(Y,[2,32]),t(k,[2,27]),{38:69,40:x},t(Y,[2,31])],defaultActions:{5:[2,45],7:[2,2],25:[2,48],40:[2,47],46:[2,28],53:[2,23]},parseError:function(a,l){if(l.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=l,d}},parse:function(a){var l=this,d=[0],f=[],E=[null],i=[],X=this.table,h="",J=0,lt=0,_t=2,ht=1,mt=i.slice.call(arguments,1),b=Object.create(this.lexer),H={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(H.yy[et]=this.yy[et]);b.setInput(a,H.yy),H.yy.lexer=b,H.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var rt=b.yylloc;i.push(rt);var Et=b.options&&b.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(){var F;return F=f.pop()||b.lex()||ht,typeof F!="number"&&(F instanceof Array&&(f=F,F=f.pop()),F=l.symbols_[F]||F),F}for(var v,K,S,it,z={},j,Z,dt,q;;){if(K=d[d.length-1],this.defaultActions[K]?S=this.defaultActions[K]:((v===null||typeof v>"u")&&(v=gt()),S=X[K]&&X[K][v]),typeof S>"u"||!S.length||!S[0]){var at="";q=[];for(j in X[K])this.terminals_[j]&&j>_t&&q.push("'"+this.terminals_[j]+"'");b.showPosition?at="Parse error on line "+(J+1)+`: +import{j as W,s as kt,g as xt,i as Rt,h as Ot,I as bt,J as Nt,m as Tt,p as tt,K as At,o as nt,G as Mt,q as vt,L as Dt,N as It}from"./TextOutput-39ff842e.js";import{G as wt,l as St}from"./layout-218ba7ee.js";import"./index-ef7aa48c.js";import{u as Lt}from"./stringify-ec884b6d.js";import{l as Bt}from"./line-971ba693.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const Ct=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Pt(t){return typeof t=="string"&&Ct.test(t)}function Yt(t){if(!Pt(t))throw TypeError("Invalid UUID");let r;const e=new Uint8Array(16);return e[0]=(r=parseInt(t.slice(0,8),16))>>>24,e[1]=r>>>16&255,e[2]=r>>>8&255,e[3]=r&255,e[4]=(r=parseInt(t.slice(9,13),16))>>>8,e[5]=r&255,e[6]=(r=parseInt(t.slice(14,18),16))>>>8,e[7]=r&255,e[8]=(r=parseInt(t.slice(19,23),16))>>>8,e[9]=r&255,e[10]=(r=parseInt(t.slice(24,36),16))/1099511627776&255,e[11]=r/4294967296&255,e[12]=r>>>24&255,e[13]=r>>>16&255,e[14]=r>>>8&255,e[15]=r&255,e}function Zt(t){t=unescape(encodeURIComponent(t));const r=[];for(let e=0;e>>32-r}function Gt(t){const r=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const u=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;O=g,g=m,m=st(_,30)>>>0,_=c,c=P}e[0]=e[0]+c>>>0,e[1]=e[1]+_>>>0,e[2]=e[2]+m>>>0,e[3]=e[3]+g>>>0,e[4]=e[4]+O>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,e[0]&255,e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,e[1]&255,e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,e[2]&255,e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,e[3]&255,e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,e[4]&255]}const Kt=Vt("v5",80,Gt),zt=Kt;var ot=function(){var t=function(A,a,l,d){for(l=l||{},d=A.length;d--;l[A[d]]=a);return l},r=[1,2],e=[1,5],n=[6,9,11,23,25,27,29,30,31,52],s=[1,17],p=[1,18],u=[1,19],o=[1,20],c=[1,21],_=[1,22],m=[1,25],g=[1,30],O=[1,31],y=[1,32],T=[1,33],P=[1,34],V=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,48,52],H=[1,46],I=[30,31,49,50],N=[4,6,9,11,23,25,27,29,30,31,52],M=[44,45,46,47,48],k=[22,37],x=[1,66],C=[1,65],Y=[22,37,39,41],D={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,MD_PARENT:48,NON_IDENTIFYING:49,IDENTIFYING:50,WORD:51,open_directive:52,type_directive:53,arg_directive:54,close_directive:55,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"MD_PARENT",49:"NON_IDENTIFYING",50:"IDENTIFYING",51:"WORD",52:"open_directive",53:"type_directive",54:"arg_directive",55:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(a,l,d,f,E,i,X){var h=i.length-1;switch(E){case 1:break;case 3:this.$=[];break;case 4:i[h-1].push(i[h]),this.$=i[h-1];break;case 5:case 6:this.$=i[h];break;case 7:case 8:this.$=[];break;case 12:f.addEntity(i[h-4]),f.addEntity(i[h-2]),f.addRelationship(i[h-4],i[h],i[h-2],i[h-3]);break;case 13:f.addEntity(i[h-3]),f.addAttributes(i[h-3],i[h-1]);break;case 14:f.addEntity(i[h-2]);break;case 15:f.addEntity(i[h]);break;case 16:case 17:this.$=i[h].trim(),f.setAccTitle(this.$);break;case 18:case 19:this.$=i[h].trim(),f.setAccDescription(this.$);break;case 20:case 44:this.$=i[h];break;case 21:case 42:case 43:this.$=i[h].replace(/"/g,"");break;case 22:case 30:this.$=[i[h]];break;case 23:i[h].push(i[h-1]),this.$=i[h];break;case 24:this.$={attributeType:i[h-1],attributeName:i[h]};break;case 25:this.$={attributeType:i[h-2],attributeName:i[h-1],attributeKeyTypeList:i[h]};break;case 26:this.$={attributeType:i[h-2],attributeName:i[h-1],attributeComment:i[h]};break;case 27:this.$={attributeType:i[h-3],attributeName:i[h-2],attributeKeyTypeList:i[h-1],attributeComment:i[h]};break;case 28:case 29:case 32:this.$=i[h];break;case 31:i[h-2].push(i[h]),this.$=i[h-2];break;case 33:this.$=i[h].replace(/"/g,"");break;case 34:this.$={cardA:i[h],relType:i[h-1],cardB:i[h-2]};break;case 35:this.$=f.Cardinality.ZERO_OR_ONE;break;case 36:this.$=f.Cardinality.ZERO_OR_MORE;break;case 37:this.$=f.Cardinality.ONE_OR_MORE;break;case 38:this.$=f.Cardinality.ONLY_ONE;break;case 39:this.$=f.Cardinality.MD_PARENT;break;case 40:this.$=f.Identification.NON_IDENTIFYING;break;case 41:this.$=f.Identification.IDENTIFYING;break;case 45:f.parseDirective("%%{","open_directive");break;case 46:f.parseDirective(i[h],"type_directive");break;case 47:i[h]=i[h].trim().replace(/'/g,'"'),f.parseDirective(i[h],"arg_directive");break;case 48:f.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:r,7:3,12:4,52:e},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:r,7:3,12:4,52:e},{13:8,53:[1,9]},{53:[2,45]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:s,25:p,27:u,29:o,30:c,31:_,52:e},{1:[2,2]},{14:23,15:[1,24],55:m},t([15,55],[2,46]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:15,10:26,12:4,17:16,23:s,25:p,27:u,29:o,30:c,31:_,52:e},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),t(n,[2,15],{18:27,42:29,20:[1,28],44:g,45:O,46:y,47:T,48:P}),{24:[1,35]},{26:[1,36]},{28:[1,37]},t(n,[2,19]),t(V,[2,20]),t(V,[2,21]),{11:[1,38]},{16:39,54:[1,40]},{11:[2,48]},t(n,[2,5]),{17:41,30:c,31:_},{21:42,22:[1,43],32:44,33:45,37:H},{43:47,49:[1,48],50:[1,49]},t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),t(I,[2,39]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(N,[2,9]),{14:50,55:m},{55:[2,47]},{15:[1,51]},{22:[1,52]},t(n,[2,14]),{21:53,22:[2,22],32:44,33:45,37:H},{34:54,37:[1,55]},{37:[2,28]},{42:56,44:g,45:O,46:y,47:T,48:P},t(M,[2,40]),t(M,[2,41]),{11:[1,57]},{19:58,30:[1,61],31:[1,60],51:[1,59]},t(n,[2,13]),{22:[2,23]},t(k,[2,24],{35:62,36:63,38:64,40:x,41:C}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(N,[2,10]),t(n,[2,12]),t(n,[2,42]),t(n,[2,43]),t(n,[2,44]),t(k,[2,25],{36:67,39:[1,68],41:C}),t(k,[2,26]),t(Y,[2,30]),t(k,[2,33]),t(Y,[2,32]),t(k,[2,27]),{38:69,40:x},t(Y,[2,31])],defaultActions:{5:[2,45],7:[2,2],25:[2,48],40:[2,47],46:[2,28],53:[2,23]},parseError:function(a,l){if(l.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=l,d}},parse:function(a){var l=this,d=[0],f=[],E=[null],i=[],X=this.table,h="",j=0,lt=0,_t=2,ht=1,mt=i.slice.call(arguments,1),b=Object.create(this.lexer),G={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(G.yy[et]=this.yy[et]);b.setInput(a,G.yy),G.yy.lexer=b,G.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var rt=b.yylloc;i.push(rt);var Et=b.options&&b.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(){var F;return F=f.pop()||b.lex()||ht,typeof F!="number"&&(F instanceof Array&&(f=F,F=f.pop()),F=l.symbols_[F]||F),F}for(var v,K,S,it,z={},q,Z,dt,J;;){if(K=d[d.length-1],this.defaultActions[K]?S=this.defaultActions[K]:((v===null||typeof v>"u")&&(v=gt()),S=X[K]&&X[K][v]),typeof S>"u"||!S.length||!S[0]){var at="";J=[];for(q in X[K])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");b.showPosition?at="Parse error on line "+(j+1)+`: `+b.showPosition()+` -Expecting `+q.join(", ")+", got '"+(this.terminals_[v]||v)+"'":at="Parse error on line "+(J+1)+": Unexpected "+(v==ht?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(at,{text:b.match,token:this.terminals_[v]||v,line:b.yylineno,loc:rt,expected:q})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+v);switch(S[0]){case 1:d.push(v),E.push(b.yytext),i.push(b.yylloc),d.push(S[1]),v=null,lt=b.yyleng,h=b.yytext,J=b.yylineno,rt=b.yylloc;break;case 2:if(Z=this.productions_[S[1]][1],z.$=E[E.length-Z],z._$={first_line:i[i.length-(Z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Z||1)].first_column,last_column:i[i.length-1].last_column},Et&&(z._$.range=[i[i.length-(Z||1)].range[0],i[i.length-1].range[1]]),it=this.performAction.apply(z,[h,lt,J,H.yy,S[1],E,i].concat(mt)),typeof it<"u")return it;Z&&(d=d.slice(0,-1*Z*2),E=E.slice(0,-1*Z),i=i.slice(0,-1*Z)),d.push(this.productions_[S[1]][0]),E.push(z.$),i.push(z._$),dt=X[d[d.length-2]][d[d.length-1]],d.push(dt);break;case 3:return!0}}return!0}},U=function(){var A={EOF:1,parseError:function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},setInput:function(a,l){return this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var l=a.length,d=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=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),d.length-1&&(this.yylineno-=d.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:d?(d.length===f.length?this.yylloc.first_column:0)+f[f.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+J.join(", ")+", got '"+(this.terminals_[v]||v)+"'":at="Parse error on line "+(j+1)+": Unexpected "+(v==ht?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(at,{text:b.match,token:this.terminals_[v]||v,line:b.yylineno,loc:rt,expected:J})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+v);switch(S[0]){case 1:d.push(v),E.push(b.yytext),i.push(b.yylloc),d.push(S[1]),v=null,lt=b.yyleng,h=b.yytext,j=b.yylineno,rt=b.yylloc;break;case 2:if(Z=this.productions_[S[1]][1],z.$=E[E.length-Z],z._$={first_line:i[i.length-(Z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Z||1)].first_column,last_column:i[i.length-1].last_column},Et&&(z._$.range=[i[i.length-(Z||1)].range[0],i[i.length-1].range[1]]),it=this.performAction.apply(z,[h,lt,j,G.yy,S[1],E,i].concat(mt)),typeof it<"u")return it;Z&&(d=d.slice(0,-1*Z*2),E=E.slice(0,-1*Z),i=i.slice(0,-1*Z)),d.push(this.productions_[S[1]][0]),E.push(z.$),i.push(z._$),dt=X[d[d.length-2]][d[d.length-1]],d.push(dt);break;case 3:return!0}}return!0}},U=function(){var A={EOF:1,parseError:function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},setInput:function(a,l){return this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var l=a.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var l=a.length,d=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=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),d.length-1&&(this.yylineno-=d.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:d?(d.length===f.length?this.yylloc.first_column:0)+f[f.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),l=new Array(a.length+1).join("-");return a+this.upcomingInput()+` `+l+"^"},test_match:function(a,l){var d,f,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))),f=a[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],d=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var i in E)this[i]=E[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,l,d,f;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),i=0;il[0].length)){if(l=d,f=i,this.options.backtrack_lexer){if(a=this.test_match(d,E[i]),a!==!1)return a;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(a=this.test_match(l,E[f]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var l=this.next();return l||this.lex()},begin:function(l){this.conditionStack.push(l)},popState:function(){var l=this.conditionStack.length-1;return l>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(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},pushState:function(l){this.begin(l)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(l,d,f,E){switch(f){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;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 this.begin("open_directive"),52;case 8:return this.begin("type_directive"),53;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),55;case 11:return 54;case 12:return 11;case 13:break;case 14:return 9;case 15:return 31;case 16:return 51;case 17:return 4;case 18:return this.begin("block"),20;case 19:return 39;case 20:break;case 21:return 40;case 22:return 37;case 23:return 37;case 24:return 41;case 25:break;case 26:return this.popState(),22;case 27:return d.yytext[0];case 28:return 44;case 29:return 46;case 30:return 46;case 31:return 46;case 32:return 44;case 33:return 44;case 34:return 45;case 35:return 45;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 46;case 40:return 45;case 41:return 46;case 42:return 47;case 43:return 47;case 44:return 47;case 45:return 47;case 46:return 44;case 47:return 45;case 48:return 46;case 49:return 48;case 50:return 49;case 51:return 50;case 52:return 50;case 53:return 49;case 54:return 49;case 55:return 49;case 56:return 30;case 57:return d.yytext[0];case 58:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?: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},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[19,20,21,22,23,24,25,26,27],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,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],inclusive:!0}}};return A}();D.lexer=U;function w(){this.yy={}}return w.prototype=D,D.Parser=w,new w}();ot.parser=ot;const Gt=ot;let Q={},ct=[];const Xt={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"},Qt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},$t=function(t,r,e){Tt.parseDirective(this,t,r,e)},yt=function(t){return Q[t]===void 0&&(Q[t]={attributes:[]},tt.info("Added new entity :",t)),Q[t]},Jt=()=>Q,jt=function(t,r){let e=yt(t),n;for(n=r.length-1;n>=0;n--)e.attributes.push(r[n]),tt.debug("Added attribute ",r[n].attributeName)},qt=function(t,r,e,n){let s={entityA:t,roleA:r,entityB:e,relSpec:n};ct.push(s),tt.debug("Added new relationship :",s)},te=()=>ct,ee=function(){Q={},ct=[],At()},re={Cardinality:Xt,Identification:Qt,parseDirective:$t,getConfig:()=>W().er,addEntity:yt,addAttributes:jt,getEntities:Jt,addRelationship:qt,getRelationships:te,clear:ee,setAccTitle:kt,getAccTitle:xt,setAccDescription:Rt,getAccDescription:Ot,setDiagramTitle:bt,getDiagramTitle:Nt},L={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},ie=function(t,r){let e;t.append("defs").append("marker").attr("id",L.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",L.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",L.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",L.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M9,0 L9,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",L.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",L.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},B={ERMarkers:L,insertMarkers:ie},ae=/[^\dA-Za-z](\W)*/g;let R={},$=new Map;const ne=function(t){const r=Object.keys(t);for(const e of r)R[e]=t[e]},se=(t,r,e)=>{const n=R.entityPadding/3,s=R.entityPadding/3,p=R.fontSize*.85,u=r.node().getBBox(),o=[];let c=!1,_=!1,m=0,g=0,O=0,y=0,T=u.height+n*2,P=1;e.forEach(N=>{N.attributeKeyTypeList!==void 0&&N.attributeKeyTypeList.length>0&&(c=!0),N.attributeComment!==void 0&&(_=!0)}),e.forEach(N=>{const M=`${r.node().id}-attr-${P}`;let k=0;const x=It(N.attributeType),C=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(x),Y=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(N.attributeName),D={};D.tn=C,D.nn=Y;const U=C.node().getBBox(),w=Y.node().getBBox();if(m=Math.max(m,U.width),g=Math.max(g,w.width),k=Math.max(U.height,w.height),c){const A=N.attributeKeyTypeList!==void 0?N.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(A);D.kn=a;const l=a.node().getBBox();O=Math.max(O,l.width),k=Math.max(k,l.height)}if(_){const A=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(N.attributeComment||"");D.cn=A;const a=A.node().getBBox();y=Math.max(y,a.width),k=Math.max(k,a.height)}D.height=k,o.push(D),T+=k+n*2,P+=1});let V=4;c&&(V+=2),_&&(V+=2);const G=m+g+O+y,I={width:Math.max(R.minEntityWidth,Math.max(u.width+R.entityPadding*2,G+s*V)),height:e.length>0?T:Math.max(R.minEntityHeight,u.height+R.entityPadding*2)};if(e.length>0){const N=Math.max(0,(I.width-G-s*V)/(V/2));r.attr("transform","translate("+I.width/2+","+(n+u.height/2)+")");let M=u.height+n*2,k="attributeBoxOdd";o.forEach(x=>{const C=M+n+x.height/2;x.tn.attr("transform","translate("+s+","+C+")");const Y=t.insert("rect","#"+x.tn.node().id).classed(`er ${k}`,!0).attr("x",0).attr("y",M).attr("width",m+s*2+N).attr("height",x.height+n*2),D=parseFloat(Y.attr("x"))+parseFloat(Y.attr("width"));x.nn.attr("transform","translate("+(D+s)+","+C+")");const U=t.insert("rect","#"+x.nn.node().id).classed(`er ${k}`,!0).attr("x",D).attr("y",M).attr("width",g+s*2+N).attr("height",x.height+n*2);let w=parseFloat(U.attr("x"))+parseFloat(U.attr("width"));if(c){x.kn.attr("transform","translate("+(w+s)+","+C+")");const A=t.insert("rect","#"+x.kn.node().id).classed(`er ${k}`,!0).attr("x",w).attr("y",M).attr("width",O+s*2+N).attr("height",x.height+n*2);w=parseFloat(A.attr("x"))+parseFloat(A.attr("width"))}_&&(x.cn.attr("transform","translate("+(w+s)+","+C+")"),t.insert("rect","#"+x.cn.node().id).classed(`er ${k}`,"true").attr("x",w).attr("y",M).attr("width",y+s*2+N).attr("height",x.height+n*2)),M+=x.height+n*2,k=k==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else I.height=Math.max(R.minEntityHeight,T),r.attr("transform","translate("+I.width/2+","+I.height/2+")");return I},oe=function(t,r,e){const n=Object.keys(r);let s;return n.forEach(function(p){const u=ue(p,"entity");$.set(p,u);const o=t.append("g").attr("id",u);s=s===void 0?u:s;const c="text-"+u,_=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",W().fontFamily).style("font-size",R.fontSize+"px").text(p),{width:m,height:g}=se(o,_,r[p].attributes),y=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",m).attr("height",g).node().getBBox();e.setNode(u,{width:y.width,height:y.height,shape:"rect",id:u})}),s},ce=function(t,r){r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&t.select("#"+e).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )")})},pt=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},le=function(t,r){return t.forEach(function(e){r.setEdge($.get(e.entityA),$.get(e.entityB),{relationship:e},pt(e))}),t};let ft=0;const he=function(t,r,e,n,s){ft++;const p=e.edge($.get(r.entityA),$.get(r.entityB),pt(r)),u=Bt().x(function(T){return T.x}).y(function(T){return T.y}).curve(Dt),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",u(p.points)).style("stroke",R.stroke).style("fill","none");r.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let c="";switch(R.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),r.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ONLY_ONE_END+")");break;case s.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+c+"#"+B.ERMarkers.MD_PARENT_END+")");break}switch(r.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ONLY_ONE_START+")");break;case s.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+c+"#"+B.ERMarkers.MD_PARENT_START+")");break}const _=o.node().getTotalLength(),m=o.node().getPointAtLength(_*.5),g="rel"+ft,y=t.append("text").classed("er relationshipLabel",!0).attr("id",g).attr("x",m.x).attr("y",m.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",W().fontFamily).style("font-size",R.fontSize+"px").text(r.roleA).node().getBBox();t.insert("rect","#"+g).classed("er relationshipLabelBox",!0).attr("x",m.x-y.width/2).attr("y",m.y-y.height/2).attr("width",y.width).attr("height",y.height)},de=function(t,r,e,n){R=W().er,tt.info("Drawing ER diagram");const s=W().securityLevel;let p;s==="sandbox"&&(p=nt("#i"+r));const o=(s==="sandbox"?nt(p.nodes()[0].contentDocument.body):nt("body")).select(`[id='${r}']`);B.insertMarkers(o,R);let c;c=new wt({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const _=oe(o,n.db.getEntities(),c),m=le(n.db.getRelationships(),c);St(c),ce(o,c),m.forEach(function(P){he(o,P,c,_,n)});const g=R.diagramPadding;Mt.insertTitle(o,"entityTitleText",R.titleTopMargin,n.db.getDiagramTitle());const O=o.node().getBBox(),y=O.width+g*2,T=O.height+g*2;vt(o,T,y,R.useMaxWidth),o.attr("viewBox",`${O.x-g} ${O.y-g} ${y} ${T}`)},fe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function ue(t="",r=""){const e=t.replace(ae,"");return`${ut(r)}${ut(e)}${zt(t,fe)}`}function ut(t=""){return t.length>0?`${t}-`:""}const ye={setConf:ne,draw:de},pe=t=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var l=this.next();return l||this.lex()},begin:function(l){this.conditionStack.push(l)},popState:function(){var l=this.conditionStack.length-1;return l>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(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},pushState:function(l){this.begin(l)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(l,d,f,E){switch(f){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;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 this.begin("open_directive"),52;case 8:return this.begin("type_directive"),53;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),55;case 11:return 54;case 12:return 11;case 13:break;case 14:return 9;case 15:return 31;case 16:return 51;case 17:return 4;case 18:return this.begin("block"),20;case 19:return 39;case 20:break;case 21:return 40;case 22:return 37;case 23:return 37;case 24:return 41;case 25:break;case 26:return this.popState(),22;case 27:return d.yytext[0];case 28:return 44;case 29:return 46;case 30:return 46;case 31:return 46;case 32:return 44;case 33:return 44;case 34:return 45;case 35:return 45;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 46;case 40:return 45;case 41:return 46;case 42:return 47;case 43:return 47;case 44:return 47;case 45:return 47;case 46:return 44;case 47:return 45;case 48:return 46;case 49:return 48;case 50:return 49;case 51:return 50;case 52:return 50;case 53:return 49;case 54:return 49;case 55:return 49;case 56:return 30;case 57:return d.yytext[0];case 58:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?: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},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[19,20,21,22,23,24,25,26,27],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,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],inclusive:!0}}};return A}();D.lexer=U;function w(){this.yy={}}return w.prototype=D,D.Parser=w,new w}();ot.parser=ot;const Ht=ot;let Q={},ct=[];const Xt={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"},Qt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},$t=function(t,r,e){Tt.parseDirective(this,t,r,e)},yt=function(t){return Q[t]===void 0&&(Q[t]={attributes:[]},tt.info("Added new entity :",t)),Q[t]},jt=()=>Q,qt=function(t,r){let e=yt(t),n;for(n=r.length-1;n>=0;n--)e.attributes.push(r[n]),tt.debug("Added attribute ",r[n].attributeName)},Jt=function(t,r,e,n){let s={entityA:t,roleA:r,entityB:e,relSpec:n};ct.push(s),tt.debug("Added new relationship :",s)},te=()=>ct,ee=function(){Q={},ct=[],At()},re={Cardinality:Xt,Identification:Qt,parseDirective:$t,getConfig:()=>W().er,addEntity:yt,addAttributes:qt,getEntities:jt,addRelationship:Jt,getRelationships:te,clear:ee,setAccTitle:kt,getAccTitle:xt,setAccDescription:Rt,getAccDescription:Ot,setDiagramTitle:bt,getDiagramTitle:Nt},L={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},ie=function(t,r){let e;t.append("defs").append("marker").attr("id",L.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",L.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",L.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",L.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M9,0 L9,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",L.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",L.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),e=t.append("defs").append("marker").attr("id",L.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),e.append("circle").attr("stroke",r.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),e.append("path").attr("stroke",r.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},B={ERMarkers:L,insertMarkers:ie},ae=/[^\dA-Za-z](\W)*/g;let R={},$=new Map;const ne=function(t){const r=Object.keys(t);for(const e of r)R[e]=t[e]},se=(t,r,e)=>{const n=R.entityPadding/3,s=R.entityPadding/3,p=R.fontSize*.85,u=r.node().getBBox(),o=[];let c=!1,_=!1,m=0,g=0,O=0,y=0,T=u.height+n*2,P=1;e.forEach(N=>{N.attributeKeyTypeList!==void 0&&N.attributeKeyTypeList.length>0&&(c=!0),N.attributeComment!==void 0&&(_=!0)}),e.forEach(N=>{const M=`${r.node().id}-attr-${P}`;let k=0;const x=It(N.attributeType),C=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(x),Y=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(N.attributeName),D={};D.tn=C,D.nn=Y;const U=C.node().getBBox(),w=Y.node().getBBox();if(m=Math.max(m,U.width),g=Math.max(g,w.width),k=Math.max(U.height,w.height),c){const A=N.attributeKeyTypeList!==void 0?N.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(A);D.kn=a;const l=a.node().getBBox();O=Math.max(O,l.width),k=Math.max(k,l.height)}if(_){const A=t.append("text").classed("er entityLabel",!0).attr("id",`${M}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",W().fontFamily).style("font-size",p+"px").text(N.attributeComment||"");D.cn=A;const a=A.node().getBBox();y=Math.max(y,a.width),k=Math.max(k,a.height)}D.height=k,o.push(D),T+=k+n*2,P+=1});let V=4;c&&(V+=2),_&&(V+=2);const H=m+g+O+y,I={width:Math.max(R.minEntityWidth,Math.max(u.width+R.entityPadding*2,H+s*V)),height:e.length>0?T:Math.max(R.minEntityHeight,u.height+R.entityPadding*2)};if(e.length>0){const N=Math.max(0,(I.width-H-s*V)/(V/2));r.attr("transform","translate("+I.width/2+","+(n+u.height/2)+")");let M=u.height+n*2,k="attributeBoxOdd";o.forEach(x=>{const C=M+n+x.height/2;x.tn.attr("transform","translate("+s+","+C+")");const Y=t.insert("rect","#"+x.tn.node().id).classed(`er ${k}`,!0).attr("x",0).attr("y",M).attr("width",m+s*2+N).attr("height",x.height+n*2),D=parseFloat(Y.attr("x"))+parseFloat(Y.attr("width"));x.nn.attr("transform","translate("+(D+s)+","+C+")");const U=t.insert("rect","#"+x.nn.node().id).classed(`er ${k}`,!0).attr("x",D).attr("y",M).attr("width",g+s*2+N).attr("height",x.height+n*2);let w=parseFloat(U.attr("x"))+parseFloat(U.attr("width"));if(c){x.kn.attr("transform","translate("+(w+s)+","+C+")");const A=t.insert("rect","#"+x.kn.node().id).classed(`er ${k}`,!0).attr("x",w).attr("y",M).attr("width",O+s*2+N).attr("height",x.height+n*2);w=parseFloat(A.attr("x"))+parseFloat(A.attr("width"))}_&&(x.cn.attr("transform","translate("+(w+s)+","+C+")"),t.insert("rect","#"+x.cn.node().id).classed(`er ${k}`,"true").attr("x",w).attr("y",M).attr("width",y+s*2+N).attr("height",x.height+n*2)),M+=x.height+n*2,k=k==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else I.height=Math.max(R.minEntityHeight,T),r.attr("transform","translate("+I.width/2+","+I.height/2+")");return I},oe=function(t,r,e){const n=Object.keys(r);let s;return n.forEach(function(p){const u=ue(p,"entity");$.set(p,u);const o=t.append("g").attr("id",u);s=s===void 0?u:s;const c="text-"+u,_=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",W().fontFamily).style("font-size",R.fontSize+"px").text(p),{width:m,height:g}=se(o,_,r[p].attributes),y=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",m).attr("height",g).node().getBBox();e.setNode(u,{width:y.width,height:y.height,shape:"rect",id:u})}),s},ce=function(t,r){r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&t.select("#"+e).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )")})},pt=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},le=function(t,r){return t.forEach(function(e){r.setEdge($.get(e.entityA),$.get(e.entityB),{relationship:e},pt(e))}),t};let ft=0;const he=function(t,r,e,n,s){ft++;const p=e.edge($.get(r.entityA),$.get(r.entityB),pt(r)),u=Bt().x(function(T){return T.x}).y(function(T){return T.y}).curve(Dt),o=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",u(p.points)).style("stroke",R.stroke).style("fill","none");r.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let c="";switch(R.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),r.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+c+"#"+B.ERMarkers.ONLY_ONE_END+")");break;case s.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+c+"#"+B.ERMarkers.MD_PARENT_END+")");break}switch(r.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+c+"#"+B.ERMarkers.ONLY_ONE_START+")");break;case s.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+c+"#"+B.ERMarkers.MD_PARENT_START+")");break}const _=o.node().getTotalLength(),m=o.node().getPointAtLength(_*.5),g="rel"+ft,y=t.append("text").classed("er relationshipLabel",!0).attr("id",g).attr("x",m.x).attr("y",m.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",W().fontFamily).style("font-size",R.fontSize+"px").text(r.roleA).node().getBBox();t.insert("rect","#"+g).classed("er relationshipLabelBox",!0).attr("x",m.x-y.width/2).attr("y",m.y-y.height/2).attr("width",y.width).attr("height",y.height)},de=function(t,r,e,n){R=W().er,tt.info("Drawing ER diagram");const s=W().securityLevel;let p;s==="sandbox"&&(p=nt("#i"+r));const o=(s==="sandbox"?nt(p.nodes()[0].contentDocument.body):nt("body")).select(`[id='${r}']`);B.insertMarkers(o,R);let c;c=new wt({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const _=oe(o,n.db.getEntities(),c),m=le(n.db.getRelationships(),c);St(c),ce(o,c),m.forEach(function(P){he(o,P,c,_,n)});const g=R.diagramPadding;Mt.insertTitle(o,"entityTitleText",R.titleTopMargin,n.db.getDiagramTitle());const O=o.node().getBBox(),y=O.width+g*2,T=O.height+g*2;vt(o,T,y,R.useMaxWidth),o.attr("viewBox",`${O.x-g} ${O.y-g} ${y} ${T}`)},fe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function ue(t="",r=""){const e=t.replace(ae,"");return`${ut(r)}${ut(e)}${zt(t,fe)}`}function ut(t=""){return t.length>0?`${t}-`:""}const ye={setConf:ne,draw:de},pe=t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; @@ -48,4 +48,4 @@ Expecting `+q.join(", ")+", got '"+(this.terminals_[v]||v)+"'":at="Parse error o stroke-width: 1; } -`,_e=pe,Ne={parser:Gt,db:re,renderer:ye,styles:_e};export{Ne as diagram}; +`,_e=pe,Ne={parser:Ht,db:re,renderer:ye,styles:_e};export{Ne as diagram}; diff --git a/backend/web/assets/flowDb-ff651a22-6b86a346.js b/backend/web/assets/flowDb-ff651a22-eeadc954.js similarity index 53% rename from backend/web/assets/flowDb-ff651a22-6b86a346.js rename to backend/web/assets/flowDb-ff651a22-eeadc954.js index 5d84f39c..2f71269b 100644 --- a/backend/web/assets/flowDb-ff651a22-6b86a346.js +++ b/backend/web/assets/flowDb-ff651a22-eeadc954.js @@ -1,6 +1,6 @@ -import{i as At,af as Ie,s as Re,g as Ne,f as Oe,h as Pe,H as we,I as Ge,m as Ue,o as dt,F as Et,J as Me,q as Ke,n as N1}from"./EchartsRenderer-3d08027d.js";var pt=function(){var e=function(l1,a,o,p){for(o=o||{},p=l1.length;p--;o[l1[p]]=a);return o},u=[1,9],i=[1,7],n=[1,6],c=[1,8],l=[1,20,21,22,23,38,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],h=[2,10],G=[1,20],D=[1,21],O=[1,22],z=[1,23],c1=[1,30],h1=[1,32],p1=[1,33],V1=[1,34],k=[1,56],S=[1,55],w1=[1,36],G1=[1,37],U1=[1,38],M1=[1,39],K1=[1,40],B=[1,51],v=[1,53],x=[1,49],y=[1,54],m=[1,50],V=[1,57],L=[1,52],I=[1,58],R=[1,59],j1=[1,41],Y1=[1,42],X1=[1,43],z1=[1,44],bt=[1,62],L1=[1,67],_=[1,20,21,22,23,38,43,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],H=[1,71],q=[1,70],W=[1,72],H1=[20,21,23,84,86],E1=[1,98],k1=[1,103],b1=[1,102],g1=[1,99],D1=[1,95],F1=[1,101],_1=[1,97],T1=[1,104],S1=[1,100],C1=[1,105],B1=[1,96],q1=[20,21,22,23,84,86],N=[20,21,22,23,55,84,86],M=[20,21,22,23,40,53,55,57,59,61,63,65,67,69,72,74,76,77,79,84,86,97,110,113,114,117,119,122,123,124],F=[20,21,23],gt=[20,21,23,53,69,84,86,97,110,113,114,117,119,122,123,124],it=[1,12,20,21,22,23,24,38,43,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],I1=[53,69,97,110,113,114,117,119,122,123,124],Dt=[1,134],Ft=[1,133],_t=[1,141],Tt=[1,155],St=[1,156],Ct=[1,157],Bt=[1,158],vt=[1,143],xt=[1,145],yt=[1,149],mt=[1,150],Vt=[1,151],Lt=[1,152],It=[1,153],Rt=[1,154],Nt=[1,159],Ot=[1,160],Pt=[1,139],wt=[1,140],Gt=[1,147],Ut=[1,142],Mt=[1,146],Kt=[1,144],rt=[20,21,22,23,38,43,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],jt=[1,162],K=[20,21,22,23,26,53,69,97,113,114,117,119,122,123,124],f=[1,182],P=[1,178],w=[1,179],A=[1,183],d=[1,180],E=[1,181],Yt=[12,21,22,24],v1=[86,124,127],b=[20,21,22,23,24,26,38,40,43,53,69,84,92,93,94,95,96,97,98,113,117,119,122,123,124],Xt=[22,114],o1=[42,58,60,62,64,66,71,73,75,76,78,80,124,125,126],J=[1,250],Z=[1,248],$=[1,252],t1=[1,246],e1=[1,247],s1=[1,249],u1=[1,251],i1=[1,253],x1=[1,270],zt=[20,21,23,114],Q=[20,21,22,23,69,92,113,114,117,118,119,120],nt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,textNoTags:39,SQS:40,text:41,SQE:42,end:43,direction:44,acc_title:45,acc_title_value:46,acc_descr:47,acc_descr_value:48,acc_descr_multiline_value:49,link:50,node:51,styledVertex:52,AMP:53,vertex:54,STYLE_SEPARATOR:55,idString:56,DOUBLECIRCLESTART:57,DOUBLECIRCLEEND:58,PS:59,PE:60,"(-":61,"-)":62,STADIUMSTART:63,STADIUMEND:64,SUBROUTINESTART:65,SUBROUTINEEND:66,VERTEX_WITH_PROPS_START:67,"NODE_STRING[field]":68,COLON:69,"NODE_STRING[value]":70,PIPE:71,CYLINDERSTART:72,CYLINDEREND:73,DIAMOND_START:74,DIAMOND_STOP:75,TAGEND:76,TRAPSTART:77,TRAPEND:78,INVTRAPSTART:79,INVTRAPEND:80,linkStatement:81,arrowText:82,TESTSTR:83,START_LINK:84,edgeText:85,LINK:86,edgeTextToken:87,STR:88,MD_STR:89,textToken:90,keywords:91,STYLE:92,LINKSTYLE:93,CLASSDEF:94,CLASS:95,CLICK:96,DOWN:97,UP:98,textNoTagsToken:99,stylesOpt:100,"idString[vertex]":101,"idString[class]":102,CALLBACKNAME:103,CALLBACKARGS:104,HREF:105,LINK_TARGET:106,"STR[link]":107,"STR[tooltip]":108,alphaNum:109,DEFAULT:110,numList:111,INTERPOLATE:112,NUM:113,COMMA:114,style:115,styleComponent:116,NODE_STRING:117,UNIT:118,BRKT:119,PCT:120,idStringToken:121,MINUS:122,MULT:123,UNICODE_TEXT:124,TEXT:125,TAGSTART:126,EDGE_TEXT:127,alphaNumToken:128,direction_tb:129,direction_bt:130,direction_rl:131,direction_lr:132,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",42:"SQE",43:"end",45:"acc_title",46:"acc_title_value",47:"acc_descr",48:"acc_descr_value",49:"acc_descr_multiline_value",53:"AMP",55:"STYLE_SEPARATOR",57:"DOUBLECIRCLESTART",58:"DOUBLECIRCLEEND",59:"PS",60:"PE",61:"(-",62:"-)",63:"STADIUMSTART",64:"STADIUMEND",65:"SUBROUTINESTART",66:"SUBROUTINEEND",67:"VERTEX_WITH_PROPS_START",68:"NODE_STRING[field]",69:"COLON",70:"NODE_STRING[value]",71:"PIPE",72:"CYLINDERSTART",73:"CYLINDEREND",74:"DIAMOND_START",75:"DIAMOND_STOP",76:"TAGEND",77:"TRAPSTART",78:"TRAPEND",79:"INVTRAPSTART",80:"INVTRAPEND",83:"TESTSTR",84:"START_LINK",86:"LINK",88:"STR",89:"MD_STR",92:"STYLE",93:"LINKSTYLE",94:"CLASSDEF",95:"CLASS",96:"CLICK",97:"DOWN",98:"UP",101:"idString[vertex]",102:"idString[class]",103:"CALLBACKNAME",104:"CALLBACKARGS",105:"HREF",106:"LINK_TARGET",107:"STR[link]",108:"STR[tooltip]",110:"DEFAULT",112:"INTERPOLATE",113:"NUM",114:"COMMA",117:"NODE_STRING",118:"UNIT",119:"BRKT",120:"PCT",122:"MINUS",123:"MULT",124:"UNICODE_TEXT",125:"TEXT",126:"TAGSTART",127:"EDGE_TEXT",129:"direction_tb",130:"direction_bt",131:"direction_rl",132:"direction_lr"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[51,1],[51,5],[52,1],[52,3],[54,4],[54,4],[54,6],[54,4],[54,4],[54,4],[54,8],[54,4],[54,4],[54,4],[54,6],[54,4],[54,4],[54,4],[54,4],[54,4],[54,1],[50,2],[50,3],[50,3],[50,1],[50,3],[85,1],[85,2],[85,1],[85,1],[81,1],[82,3],[41,1],[41,2],[41,1],[41,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[39,1],[39,2],[39,1],[39,1],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,3],[37,5],[37,5],[37,7],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[111,1],[111,3],[100,1],[100,3],[115,1],[115,2],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[90,1],[90,1],[90,1],[90,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[87,1],[87,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[56,1],[56,2],[109,1],[109,2],[44,1],[44,1],[44,1],[44,1]],performAction:function(a,o,p,r,T,t,R1){var s=t.length-1;switch(T){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(t[s],"type_directive");break;case 7:t[s]=t[s].trim().replace(/'/g,'"'),r.parseDirective(t[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 12:case 184:this.$=t[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(t[s-1]),this.$=t[s-1];break;case 35:this.$=t[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 42:this.$=r.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 43:this.$=r.addSubGraph(void 0,t[s-1],void 0);break;case 45:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 46:case 47:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 52:r.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 53:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 54:this.$={stmt:t[s],nodes:t[s]};break;case 55:this.$=[t[s]];break;case 56:this.$=t[s-4].concat(t[s]);break;case 57:this.$=t[s];break;case 58:this.$=t[s-2],r.setClass(t[s-2],t[s]);break;case 59:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"square");break;case 60:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"doublecircle");break;case 61:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"circle");break;case 62:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"ellipse");break;case 63:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"stadium");break;case 64:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"subroutine");break;case 65:this.$=t[s-7],r.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 66:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"cylinder");break;case 67:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"round");break;case 68:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"diamond");break;case 69:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"hexagon");break;case 70:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"odd");break;case 71:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"trapezoid");break;case 72:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 73:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_right");break;case 74:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_left");break;case 75:this.$=t[s],r.addVertex(t[s]);break;case 76:t[s-1].text=t[s],this.$=t[s-1];break;case 77:case 78:t[s-2].text=t[s-1],this.$=t[s-2];break;case 79:this.$=t[s];break;case 80:var j=r.destructLink(t[s],t[s-2]);this.$={type:j.type,stroke:j.stroke,length:j.length,text:t[s-1]};break;case 81:this.$={text:t[s],type:"text"};break;case 82:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 83:this.$={text:t[s],type:"string"};break;case 84:this.$={text:t[s],type:"markdown"};break;case 85:var j=r.destructLink(t[s]);this.$={type:j.type,stroke:j.stroke,length:j.length};break;case 86:this.$=t[s-1];break;case 87:this.$={text:t[s],type:"text"};break;case 88:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 89:this.$={text:t[s],type:"string"};break;case 90:case 105:this.$={text:t[s],type:"markdown"};break;case 102:this.$={text:t[s],type:"text"};break;case 103:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 104:this.$={text:t[s],type:"text"};break;case 106:this.$=t[s-4],r.addClass(t[s-2],t[s]);break;case 107:this.$=t[s-4],r.setClass(t[s-2],t[s]);break;case 108:case 116:this.$=t[s-1],r.setClickEvent(t[s-1],t[s]);break;case 109:case 117:this.$=t[s-3],r.setClickEvent(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 110:this.$=t[s-2],r.setClickEvent(t[s-2],t[s-1],t[s]);break;case 111:this.$=t[s-4],r.setClickEvent(t[s-4],t[s-3],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 112:this.$=t[s-2],r.setLink(t[s-2],t[s]);break;case 113:this.$=t[s-4],r.setLink(t[s-4],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 114:this.$=t[s-4],r.setLink(t[s-4],t[s-2],t[s]);break;case 115:this.$=t[s-6],r.setLink(t[s-6],t[s-4],t[s]),r.setTooltip(t[s-6],t[s-2]);break;case 118:this.$=t[s-1],r.setLink(t[s-1],t[s]);break;case 119:this.$=t[s-3],r.setLink(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 120:this.$=t[s-3],r.setLink(t[s-3],t[s-2],t[s]);break;case 121:this.$=t[s-5],r.setLink(t[s-5],t[s-4],t[s]),r.setTooltip(t[s-5],t[s-2]);break;case 122:this.$=t[s-4],r.addVertex(t[s-2],void 0,void 0,t[s]);break;case 123:this.$=t[s-4],r.updateLink([t[s-2]],t[s]);break;case 124:this.$=t[s-4],r.updateLink(t[s-2],t[s]);break;case 125:this.$=t[s-8],r.updateLinkInterpolate([t[s-6]],t[s-2]),r.updateLink([t[s-6]],t[s]);break;case 126:this.$=t[s-8],r.updateLinkInterpolate(t[s-6],t[s-2]),r.updateLink(t[s-6],t[s]);break;case 127:this.$=t[s-6],r.updateLinkInterpolate([t[s-4]],t[s]);break;case 128:this.$=t[s-6],r.updateLinkInterpolate(t[s-4],t[s]);break;case 129:case 131:this.$=[t[s]];break;case 130:case 132:t[s-2].push(t[s]),this.$=t[s-2];break;case 134:this.$=t[s-1]+t[s];break;case 182:this.$=t[s];break;case 183:this.$=t[s-1]+""+t[s];break;case 185:this.$=t[s-1]+""+t[s];break;case 186:this.$={stmt:"dir",value:"TB"};break;case 187:this.$={stmt:"dir",value:"BT"};break;case 188:this.$={stmt:"dir",value:"RL"};break;case 189:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:u,16:4,21:i,22:n,24:c},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:u,16:4,21:i,22:n,24:c},e(l,h,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:n,24:c},{16:15,21:i,22:n,24:c},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},{8:60,10:[1,61],15:bt},e([10,15],[2,6]),e(l,[2,17]),e(l,[2,18]),e(l,[2,19]),{20:[1,64],21:[1,65],22:L1,27:63,30:66},e(_,[2,11]),e(_,[2,12]),e(_,[2,13]),e(_,[2,14]),e(_,[2,15]),e(_,[2,16]),{9:68,20:H,21:q,23:W,50:69,81:73,84:[1,74],86:[1,75]},{9:76,20:H,21:q,23:W},{9:77,20:H,21:q,23:W},{9:78,20:H,21:q,23:W},{9:79,20:H,21:q,23:W},{9:80,20:H,21:q,23:W},{9:82,20:H,21:q,22:[1,81],23:W},e(_,[2,44]),{46:[1,83]},{48:[1,84]},e(_,[2,47]),e(H1,[2,54],{30:85,22:L1}),{22:[1,86]},{22:[1,87]},{22:[1,88]},{22:[1,89]},{26:E1,53:k1,69:b1,88:[1,93],97:g1,103:[1,90],105:[1,91],109:92,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1,128:94},e(_,[2,186]),e(_,[2,187]),e(_,[2,188]),e(_,[2,189]),e(q1,[2,55]),e(q1,[2,57],{55:[1,106]}),e(N,[2,75],{121:119,40:[1,107],53:k,57:[1,108],59:[1,109],61:[1,110],63:[1,111],65:[1,112],67:[1,113],69:S,72:[1,114],74:[1,115],76:[1,116],77:[1,117],79:[1,118],97:B,110:v,113:x,114:y,117:m,119:V,122:L,123:I,124:R}),e(M,[2,182]),e(M,[2,143]),e(M,[2,144]),e(M,[2,145]),e(M,[2,146]),e(M,[2,147]),e(M,[2,148]),e(M,[2,149]),e(M,[2,150]),e(M,[2,151]),e(M,[2,152]),e(M,[2,153]),{9:120,20:H,21:q,23:W},{11:121,14:[1,122]},e(F,[2,8]),e(l,[2,20]),e(l,[2,26]),e(l,[2,27]),{21:[1,123]},e(gt,[2,34],{30:124,22:L1}),e(_,[2,35]),{51:125,52:45,53:k,54:46,56:47,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},e(it,[2,48]),e(it,[2,49]),e(it,[2,50]),e(I1,[2,79],{82:126,71:[1,128],83:[1,127]}),{85:129,87:130,88:[1,131],89:[1,132],124:Dt,127:Ft},e([53,69,71,83,97,110,113,114,117,119,122,123,124],[2,85]),e(_,[2,36]),e(_,[2,37]),e(_,[2,38]),e(_,[2,39]),e(_,[2,40]),{22:_t,24:Tt,26:St,38:Ct,39:135,43:Bt,53:vt,69:xt,84:yt,88:[1,137],89:[1,138],91:148,92:mt,93:Vt,94:Lt,95:It,96:Rt,97:Nt,98:Ot,99:136,113:Pt,117:wt,119:Gt,122:Ut,123:Mt,124:Kt},e(rt,h,{17:161}),e(_,[2,45]),e(_,[2,46]),e(H1,[2,53],{53:jt}),{53:k,56:163,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{110:[1,164],111:165,113:[1,166]},{53:k,56:167,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{53:k,56:168,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},e(F,[2,108],{22:[1,169],104:[1,170]}),{88:[1,171]},e(F,[2,116],{128:173,22:[1,172],26:E1,53:k1,69:b1,97:g1,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1}),e(F,[2,118],{22:[1,174]}),e(K,[2,184]),e(K,[2,171]),e(K,[2,172]),e(K,[2,173]),e(K,[2,174]),e(K,[2,175]),e(K,[2,176]),e(K,[2,177]),e(K,[2,178]),e(K,[2,179]),e(K,[2,180]),e(K,[2,181]),{53:k,56:175,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{41:176,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:184,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:186,59:[1,185],76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:187,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:188,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:189,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{117:[1,190]},{41:191,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:192,74:[1,193],76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:194,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:195,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:196,76:f,88:P,89:w,90:177,124:A,125:d,126:E},e(M,[2,183]),e(Yt,[2,3]),{8:197,15:bt},{15:[2,7]},e(l,[2,28]),e(gt,[2,33]),e(H1,[2,51],{30:198,22:L1}),e(I1,[2,76],{22:[1,199]}),{22:[1,200]},{41:201,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{86:[1,202],87:203,124:Dt,127:Ft},e(v1,[2,81]),e(v1,[2,83]),e(v1,[2,84]),e(v1,[2,169]),e(v1,[2,170]),{9:205,20:H,21:q,22:_t,23:W,24:Tt,26:St,38:Ct,40:[1,204],43:Bt,53:vt,69:xt,84:yt,91:148,92:mt,93:Vt,94:Lt,95:It,96:Rt,97:Nt,98:Ot,99:206,113:Pt,117:wt,119:Gt,122:Ut,123:Mt,124:Kt},e(b,[2,102]),e(b,[2,104]),e(b,[2,105]),e(b,[2,158]),e(b,[2,159]),e(b,[2,160]),e(b,[2,161]),e(b,[2,162]),e(b,[2,163]),e(b,[2,164]),e(b,[2,165]),e(b,[2,166]),e(b,[2,167]),e(b,[2,168]),e(b,[2,91]),e(b,[2,92]),e(b,[2,93]),e(b,[2,94]),e(b,[2,95]),e(b,[2,96]),e(b,[2,97]),e(b,[2,98]),e(b,[2,99]),e(b,[2,100]),e(b,[2,101]),{18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,43:[1,207],44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},{22:L1,30:208},{22:[1,209],53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:119,122:L,123:I,124:R},{22:[1,210]},{22:[1,211],114:[1,212]},e(Xt,[2,129]),{22:[1,213],53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:119,122:L,123:I,124:R},{22:[1,214],53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:119,122:L,123:I,124:R},{88:[1,215]},e(F,[2,110],{22:[1,216]}),e(F,[2,112],{22:[1,217]}),{88:[1,218]},e(K,[2,185]),{88:[1,219],106:[1,220]},e(q1,[2,58],{121:119,53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,122:L,123:I,124:R}),{42:[1,221],76:f,90:222,124:A,125:d,126:E},e(o1,[2,87]),e(o1,[2,89]),e(o1,[2,90]),e(o1,[2,154]),e(o1,[2,155]),e(o1,[2,156]),e(o1,[2,157]),{58:[1,223],76:f,90:222,124:A,125:d,126:E},{41:224,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{60:[1,225],76:f,90:222,124:A,125:d,126:E},{62:[1,226],76:f,90:222,124:A,125:d,126:E},{64:[1,227],76:f,90:222,124:A,125:d,126:E},{66:[1,228],76:f,90:222,124:A,125:d,126:E},{69:[1,229]},{73:[1,230],76:f,90:222,124:A,125:d,126:E},{75:[1,231],76:f,90:222,124:A,125:d,126:E},{41:232,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{42:[1,233],76:f,90:222,124:A,125:d,126:E},{76:f,78:[1,234],80:[1,235],90:222,124:A,125:d,126:E},{76:f,78:[1,237],80:[1,236],90:222,124:A,125:d,126:E},{9:238,20:H,21:q,23:W},e(H1,[2,52],{53:jt}),e(I1,[2,78]),e(I1,[2,77]),{71:[1,239],76:f,90:222,124:A,125:d,126:E},e(I1,[2,80]),e(v1,[2,82]),{41:240,76:f,88:P,89:w,90:177,124:A,125:d,126:E},e(rt,h,{17:241}),e(b,[2,103]),e(_,[2,43]),{52:242,53:k,54:46,56:47,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{22:J,69:Z,92:$,100:243,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{22:J,69:Z,92:$,100:254,112:[1,255],113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{22:J,69:Z,92:$,100:256,112:[1,257],113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{113:[1,258]},{22:J,69:Z,92:$,100:259,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{53:k,56:260,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},e(F,[2,109]),{88:[1,261]},{88:[1,262],106:[1,263]},e(F,[2,117]),e(F,[2,119],{22:[1,264]}),e(F,[2,120]),e(N,[2,59]),e(o1,[2,88]),e(N,[2,60]),{60:[1,265],76:f,90:222,124:A,125:d,126:E},e(N,[2,67]),e(N,[2,62]),e(N,[2,63]),e(N,[2,64]),{117:[1,266]},e(N,[2,66]),e(N,[2,68]),{75:[1,267],76:f,90:222,124:A,125:d,126:E},e(N,[2,70]),e(N,[2,71]),e(N,[2,73]),e(N,[2,72]),e(N,[2,74]),e(Yt,[2,4]),e([22,53,69,97,110,113,114,117,119,122,123,124],[2,86]),{42:[1,268],76:f,90:222,124:A,125:d,126:E},{18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,43:[1,269],44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},e(q1,[2,56]),e(F,[2,122],{114:x1}),e(zt,[2,131],{116:271,22:J,69:Z,92:$,113:t1,117:e1,118:s1,119:u1,120:i1}),e(Q,[2,133]),e(Q,[2,135]),e(Q,[2,136]),e(Q,[2,137]),e(Q,[2,138]),e(Q,[2,139]),e(Q,[2,140]),e(Q,[2,141]),e(Q,[2,142]),e(F,[2,123],{114:x1}),{22:[1,272]},e(F,[2,124],{114:x1}),{22:[1,273]},e(Xt,[2,130]),e(F,[2,106],{114:x1}),e(F,[2,107],{121:119,53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,122:L,123:I,124:R}),e(F,[2,111]),e(F,[2,113],{22:[1,274]}),e(F,[2,114]),{106:[1,275]},{60:[1,276]},{71:[1,277]},{75:[1,278]},{9:279,20:H,21:q,23:W},e(_,[2,42]),{22:J,69:Z,92:$,113:t1,115:280,116:245,117:e1,118:s1,119:u1,120:i1},e(Q,[2,134]),{26:E1,53:k1,69:b1,97:g1,109:281,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1,128:94},{26:E1,53:k1,69:b1,97:g1,109:282,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1,128:94},{106:[1,283]},e(F,[2,121]),e(N,[2,61]),{41:284,76:f,88:P,89:w,90:177,124:A,125:d,126:E},e(N,[2,69]),e(rt,h,{17:285}),e(zt,[2,132],{116:271,22:J,69:Z,92:$,113:t1,117:e1,118:s1,119:u1,120:i1}),e(F,[2,127],{128:173,22:[1,286],26:E1,53:k1,69:b1,97:g1,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1}),e(F,[2,128],{128:173,22:[1,287],26:E1,53:k1,69:b1,97:g1,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1}),e(F,[2,115]),{42:[1,288],76:f,90:222,124:A,125:d,126:E},{18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,43:[1,289],44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},{22:J,69:Z,92:$,100:290,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{22:J,69:Z,92:$,100:291,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},e(N,[2,65]),e(_,[2,41]),e(F,[2,125],{114:x1}),e(F,[2,126],{114:x1})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],122:[2,7]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var p=new Error(a);throw p.hash=o,p}},parse:function(a){var o=this,p=[0],r=[],T=[null],t=[],R1=this.table,s="",j=0,Ht=0,ye=2,qt=1,me=t.slice.call(arguments,1),C=Object.create(this.lexer),f1={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(f1.yy[ct]=this.yy[ct]);C.setInput(a,f1.yy),f1.yy.lexer=C,f1.yy.parser=this,typeof C.yylloc>"u"&&(C.yylloc={});var ot=C.yylloc;t.push(ot);var Ve=C.options&&C.options.ranges;typeof f1.yy.parseError=="function"?this.parseError=f1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(){var n1;return n1=r.pop()||C.lex()||qt,typeof n1!="number"&&(n1 instanceof Array&&(r=n1,n1=r.pop()),n1=o.symbols_[n1]||n1),n1}for(var U,A1,Y,lt,y1={},W1,r1,Wt,Q1;;){if(A1=p[p.length-1],this.defaultActions[A1]?Y=this.defaultActions[A1]:((U===null||typeof U>"u")&&(U=Le()),Y=R1[A1]&&R1[A1][U]),typeof Y>"u"||!Y.length||!Y[0]){var ht="";Q1=[];for(W1 in R1[A1])this.terminals_[W1]&&W1>ye&&Q1.push("'"+this.terminals_[W1]+"'");C.showPosition?ht="Parse error on line "+(j+1)+`: +import{j as At,ag as Ie,s as Re,g as Ne,h as Oe,i as Pe,I as we,J as Ge,m as Ue,p as dt,G as Et,K as Me,r as Ke,o as N1}from"./TextOutput-39ff842e.js";var pt=function(){var e=function(l1,a,o,p){for(o=o||{},p=l1.length;p--;o[l1[p]]=a);return o},u=[1,9],i=[1,7],n=[1,6],c=[1,8],l=[1,20,21,22,23,38,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],h=[2,10],G=[1,20],D=[1,21],O=[1,22],z=[1,23],c1=[1,30],h1=[1,32],p1=[1,33],V1=[1,34],k=[1,56],S=[1,55],w1=[1,36],G1=[1,37],U1=[1,38],M1=[1,39],K1=[1,40],B=[1,51],v=[1,53],x=[1,49],y=[1,54],m=[1,50],V=[1,57],L=[1,52],I=[1,58],R=[1,59],j1=[1,41],Y1=[1,42],X1=[1,43],z1=[1,44],bt=[1,62],L1=[1,67],_=[1,20,21,22,23,38,43,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],H=[1,71],W=[1,70],q=[1,72],H1=[20,21,23,84,86],E1=[1,98],k1=[1,103],b1=[1,102],g1=[1,99],D1=[1,95],F1=[1,101],_1=[1,97],T1=[1,104],S1=[1,100],C1=[1,105],B1=[1,96],W1=[20,21,22,23,84,86],N=[20,21,22,23,55,84,86],M=[20,21,22,23,40,53,55,57,59,61,63,65,67,69,72,74,76,77,79,84,86,97,110,113,114,117,119,122,123,124],F=[20,21,23],gt=[20,21,23,53,69,84,86,97,110,113,114,117,119,122,123,124],it=[1,12,20,21,22,23,24,38,43,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],I1=[53,69,97,110,113,114,117,119,122,123,124],Dt=[1,134],Ft=[1,133],_t=[1,141],Tt=[1,155],St=[1,156],Ct=[1,157],Bt=[1,158],vt=[1,143],xt=[1,145],yt=[1,149],mt=[1,150],Vt=[1,151],Lt=[1,152],It=[1,153],Rt=[1,154],Nt=[1,159],Ot=[1,160],Pt=[1,139],wt=[1,140],Gt=[1,147],Ut=[1,142],Mt=[1,146],Kt=[1,144],rt=[20,21,22,23,38,43,45,47,49,53,69,92,93,94,95,96,97,110,113,114,117,119,122,123,124,129,130,131,132],jt=[1,162],K=[20,21,22,23,26,53,69,97,113,114,117,119,122,123,124],f=[1,182],P=[1,178],w=[1,179],A=[1,183],d=[1,180],E=[1,181],Yt=[12,21,22,24],v1=[86,124,127],b=[20,21,22,23,24,26,38,40,43,53,69,84,92,93,94,95,96,97,98,113,117,119,122,123,124],Xt=[22,114],o1=[42,58,60,62,64,66,71,73,75,76,78,80,124,125,126],J=[1,250],Z=[1,248],$=[1,252],t1=[1,246],e1=[1,247],s1=[1,249],u1=[1,251],i1=[1,253],x1=[1,270],zt=[20,21,23,114],Q=[20,21,22,23,69,92,113,114,117,118,119,120],nt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,textNoTags:39,SQS:40,text:41,SQE:42,end:43,direction:44,acc_title:45,acc_title_value:46,acc_descr:47,acc_descr_value:48,acc_descr_multiline_value:49,link:50,node:51,styledVertex:52,AMP:53,vertex:54,STYLE_SEPARATOR:55,idString:56,DOUBLECIRCLESTART:57,DOUBLECIRCLEEND:58,PS:59,PE:60,"(-":61,"-)":62,STADIUMSTART:63,STADIUMEND:64,SUBROUTINESTART:65,SUBROUTINEEND:66,VERTEX_WITH_PROPS_START:67,"NODE_STRING[field]":68,COLON:69,"NODE_STRING[value]":70,PIPE:71,CYLINDERSTART:72,CYLINDEREND:73,DIAMOND_START:74,DIAMOND_STOP:75,TAGEND:76,TRAPSTART:77,TRAPEND:78,INVTRAPSTART:79,INVTRAPEND:80,linkStatement:81,arrowText:82,TESTSTR:83,START_LINK:84,edgeText:85,LINK:86,edgeTextToken:87,STR:88,MD_STR:89,textToken:90,keywords:91,STYLE:92,LINKSTYLE:93,CLASSDEF:94,CLASS:95,CLICK:96,DOWN:97,UP:98,textNoTagsToken:99,stylesOpt:100,"idString[vertex]":101,"idString[class]":102,CALLBACKNAME:103,CALLBACKARGS:104,HREF:105,LINK_TARGET:106,"STR[link]":107,"STR[tooltip]":108,alphaNum:109,DEFAULT:110,numList:111,INTERPOLATE:112,NUM:113,COMMA:114,style:115,styleComponent:116,NODE_STRING:117,UNIT:118,BRKT:119,PCT:120,idStringToken:121,MINUS:122,MULT:123,UNICODE_TEXT:124,TEXT:125,TAGSTART:126,EDGE_TEXT:127,alphaNumToken:128,direction_tb:129,direction_bt:130,direction_rl:131,direction_lr:132,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",42:"SQE",43:"end",45:"acc_title",46:"acc_title_value",47:"acc_descr",48:"acc_descr_value",49:"acc_descr_multiline_value",53:"AMP",55:"STYLE_SEPARATOR",57:"DOUBLECIRCLESTART",58:"DOUBLECIRCLEEND",59:"PS",60:"PE",61:"(-",62:"-)",63:"STADIUMSTART",64:"STADIUMEND",65:"SUBROUTINESTART",66:"SUBROUTINEEND",67:"VERTEX_WITH_PROPS_START",68:"NODE_STRING[field]",69:"COLON",70:"NODE_STRING[value]",71:"PIPE",72:"CYLINDERSTART",73:"CYLINDEREND",74:"DIAMOND_START",75:"DIAMOND_STOP",76:"TAGEND",77:"TRAPSTART",78:"TRAPEND",79:"INVTRAPSTART",80:"INVTRAPEND",83:"TESTSTR",84:"START_LINK",86:"LINK",88:"STR",89:"MD_STR",92:"STYLE",93:"LINKSTYLE",94:"CLASSDEF",95:"CLASS",96:"CLICK",97:"DOWN",98:"UP",101:"idString[vertex]",102:"idString[class]",103:"CALLBACKNAME",104:"CALLBACKARGS",105:"HREF",106:"LINK_TARGET",107:"STR[link]",108:"STR[tooltip]",110:"DEFAULT",112:"INTERPOLATE",113:"NUM",114:"COMMA",117:"NODE_STRING",118:"UNIT",119:"BRKT",120:"PCT",122:"MINUS",123:"MULT",124:"UNICODE_TEXT",125:"TEXT",126:"TAGSTART",127:"EDGE_TEXT",129:"direction_tb",130:"direction_bt",131:"direction_rl",132:"direction_lr"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[51,1],[51,5],[52,1],[52,3],[54,4],[54,4],[54,6],[54,4],[54,4],[54,4],[54,8],[54,4],[54,4],[54,4],[54,6],[54,4],[54,4],[54,4],[54,4],[54,4],[54,1],[50,2],[50,3],[50,3],[50,1],[50,3],[85,1],[85,2],[85,1],[85,1],[81,1],[82,3],[41,1],[41,2],[41,1],[41,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[39,1],[39,2],[39,1],[39,1],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,3],[37,5],[37,5],[37,7],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[111,1],[111,3],[100,1],[100,3],[115,1],[115,2],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[121,1],[90,1],[90,1],[90,1],[90,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[87,1],[87,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[56,1],[56,2],[109,1],[109,2],[44,1],[44,1],[44,1],[44,1]],performAction:function(a,o,p,r,T,t,R1){var s=t.length-1;switch(T){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(t[s],"type_directive");break;case 7:t[s]=t[s].trim().replace(/'/g,'"'),r.parseDirective(t[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 12:case 184:this.$=t[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(t[s-1]),this.$=t[s-1];break;case 35:this.$=t[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 42:this.$=r.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 43:this.$=r.addSubGraph(void 0,t[s-1],void 0);break;case 45:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 46:case 47:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 52:r.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 53:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 54:this.$={stmt:t[s],nodes:t[s]};break;case 55:this.$=[t[s]];break;case 56:this.$=t[s-4].concat(t[s]);break;case 57:this.$=t[s];break;case 58:this.$=t[s-2],r.setClass(t[s-2],t[s]);break;case 59:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"square");break;case 60:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"doublecircle");break;case 61:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"circle");break;case 62:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"ellipse");break;case 63:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"stadium");break;case 64:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"subroutine");break;case 65:this.$=t[s-7],r.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 66:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"cylinder");break;case 67:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"round");break;case 68:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"diamond");break;case 69:this.$=t[s-5],r.addVertex(t[s-5],t[s-2],"hexagon");break;case 70:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"odd");break;case 71:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"trapezoid");break;case 72:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 73:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_right");break;case 74:this.$=t[s-3],r.addVertex(t[s-3],t[s-1],"lean_left");break;case 75:this.$=t[s],r.addVertex(t[s]);break;case 76:t[s-1].text=t[s],this.$=t[s-1];break;case 77:case 78:t[s-2].text=t[s-1],this.$=t[s-2];break;case 79:this.$=t[s];break;case 80:var j=r.destructLink(t[s],t[s-2]);this.$={type:j.type,stroke:j.stroke,length:j.length,text:t[s-1]};break;case 81:this.$={text:t[s],type:"text"};break;case 82:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 83:this.$={text:t[s],type:"string"};break;case 84:this.$={text:t[s],type:"markdown"};break;case 85:var j=r.destructLink(t[s]);this.$={type:j.type,stroke:j.stroke,length:j.length};break;case 86:this.$=t[s-1];break;case 87:this.$={text:t[s],type:"text"};break;case 88:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 89:this.$={text:t[s],type:"string"};break;case 90:case 105:this.$={text:t[s],type:"markdown"};break;case 102:this.$={text:t[s],type:"text"};break;case 103:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 104:this.$={text:t[s],type:"text"};break;case 106:this.$=t[s-4],r.addClass(t[s-2],t[s]);break;case 107:this.$=t[s-4],r.setClass(t[s-2],t[s]);break;case 108:case 116:this.$=t[s-1],r.setClickEvent(t[s-1],t[s]);break;case 109:case 117:this.$=t[s-3],r.setClickEvent(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 110:this.$=t[s-2],r.setClickEvent(t[s-2],t[s-1],t[s]);break;case 111:this.$=t[s-4],r.setClickEvent(t[s-4],t[s-3],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 112:this.$=t[s-2],r.setLink(t[s-2],t[s]);break;case 113:this.$=t[s-4],r.setLink(t[s-4],t[s-2]),r.setTooltip(t[s-4],t[s]);break;case 114:this.$=t[s-4],r.setLink(t[s-4],t[s-2],t[s]);break;case 115:this.$=t[s-6],r.setLink(t[s-6],t[s-4],t[s]),r.setTooltip(t[s-6],t[s-2]);break;case 118:this.$=t[s-1],r.setLink(t[s-1],t[s]);break;case 119:this.$=t[s-3],r.setLink(t[s-3],t[s-2]),r.setTooltip(t[s-3],t[s]);break;case 120:this.$=t[s-3],r.setLink(t[s-3],t[s-2],t[s]);break;case 121:this.$=t[s-5],r.setLink(t[s-5],t[s-4],t[s]),r.setTooltip(t[s-5],t[s-2]);break;case 122:this.$=t[s-4],r.addVertex(t[s-2],void 0,void 0,t[s]);break;case 123:this.$=t[s-4],r.updateLink([t[s-2]],t[s]);break;case 124:this.$=t[s-4],r.updateLink(t[s-2],t[s]);break;case 125:this.$=t[s-8],r.updateLinkInterpolate([t[s-6]],t[s-2]),r.updateLink([t[s-6]],t[s]);break;case 126:this.$=t[s-8],r.updateLinkInterpolate(t[s-6],t[s-2]),r.updateLink(t[s-6],t[s]);break;case 127:this.$=t[s-6],r.updateLinkInterpolate([t[s-4]],t[s]);break;case 128:this.$=t[s-6],r.updateLinkInterpolate(t[s-4],t[s]);break;case 129:case 131:this.$=[t[s]];break;case 130:case 132:t[s-2].push(t[s]),this.$=t[s-2];break;case 134:this.$=t[s-1]+t[s];break;case 182:this.$=t[s];break;case 183:this.$=t[s-1]+""+t[s];break;case 185:this.$=t[s-1]+""+t[s];break;case 186:this.$={stmt:"dir",value:"TB"};break;case 187:this.$={stmt:"dir",value:"BT"};break;case 188:this.$={stmt:"dir",value:"RL"};break;case 189:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:u,16:4,21:i,22:n,24:c},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:u,16:4,21:i,22:n,24:c},e(l,h,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:n,24:c},{16:15,21:i,22:n,24:c},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},{8:60,10:[1,61],15:bt},e([10,15],[2,6]),e(l,[2,17]),e(l,[2,18]),e(l,[2,19]),{20:[1,64],21:[1,65],22:L1,27:63,30:66},e(_,[2,11]),e(_,[2,12]),e(_,[2,13]),e(_,[2,14]),e(_,[2,15]),e(_,[2,16]),{9:68,20:H,21:W,23:q,50:69,81:73,84:[1,74],86:[1,75]},{9:76,20:H,21:W,23:q},{9:77,20:H,21:W,23:q},{9:78,20:H,21:W,23:q},{9:79,20:H,21:W,23:q},{9:80,20:H,21:W,23:q},{9:82,20:H,21:W,22:[1,81],23:q},e(_,[2,44]),{46:[1,83]},{48:[1,84]},e(_,[2,47]),e(H1,[2,54],{30:85,22:L1}),{22:[1,86]},{22:[1,87]},{22:[1,88]},{22:[1,89]},{26:E1,53:k1,69:b1,88:[1,93],97:g1,103:[1,90],105:[1,91],109:92,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1,128:94},e(_,[2,186]),e(_,[2,187]),e(_,[2,188]),e(_,[2,189]),e(W1,[2,55]),e(W1,[2,57],{55:[1,106]}),e(N,[2,75],{121:119,40:[1,107],53:k,57:[1,108],59:[1,109],61:[1,110],63:[1,111],65:[1,112],67:[1,113],69:S,72:[1,114],74:[1,115],76:[1,116],77:[1,117],79:[1,118],97:B,110:v,113:x,114:y,117:m,119:V,122:L,123:I,124:R}),e(M,[2,182]),e(M,[2,143]),e(M,[2,144]),e(M,[2,145]),e(M,[2,146]),e(M,[2,147]),e(M,[2,148]),e(M,[2,149]),e(M,[2,150]),e(M,[2,151]),e(M,[2,152]),e(M,[2,153]),{9:120,20:H,21:W,23:q},{11:121,14:[1,122]},e(F,[2,8]),e(l,[2,20]),e(l,[2,26]),e(l,[2,27]),{21:[1,123]},e(gt,[2,34],{30:124,22:L1}),e(_,[2,35]),{51:125,52:45,53:k,54:46,56:47,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},e(it,[2,48]),e(it,[2,49]),e(it,[2,50]),e(I1,[2,79],{82:126,71:[1,128],83:[1,127]}),{85:129,87:130,88:[1,131],89:[1,132],124:Dt,127:Ft},e([53,69,71,83,97,110,113,114,117,119,122,123,124],[2,85]),e(_,[2,36]),e(_,[2,37]),e(_,[2,38]),e(_,[2,39]),e(_,[2,40]),{22:_t,24:Tt,26:St,38:Ct,39:135,43:Bt,53:vt,69:xt,84:yt,88:[1,137],89:[1,138],91:148,92:mt,93:Vt,94:Lt,95:It,96:Rt,97:Nt,98:Ot,99:136,113:Pt,117:wt,119:Gt,122:Ut,123:Mt,124:Kt},e(rt,h,{17:161}),e(_,[2,45]),e(_,[2,46]),e(H1,[2,53],{53:jt}),{53:k,56:163,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{110:[1,164],111:165,113:[1,166]},{53:k,56:167,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{53:k,56:168,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},e(F,[2,108],{22:[1,169],104:[1,170]}),{88:[1,171]},e(F,[2,116],{128:173,22:[1,172],26:E1,53:k1,69:b1,97:g1,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1}),e(F,[2,118],{22:[1,174]}),e(K,[2,184]),e(K,[2,171]),e(K,[2,172]),e(K,[2,173]),e(K,[2,174]),e(K,[2,175]),e(K,[2,176]),e(K,[2,177]),e(K,[2,178]),e(K,[2,179]),e(K,[2,180]),e(K,[2,181]),{53:k,56:175,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{41:176,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:184,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:186,59:[1,185],76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:187,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:188,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:189,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{117:[1,190]},{41:191,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:192,74:[1,193],76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:194,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:195,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{41:196,76:f,88:P,89:w,90:177,124:A,125:d,126:E},e(M,[2,183]),e(Yt,[2,3]),{8:197,15:bt},{15:[2,7]},e(l,[2,28]),e(gt,[2,33]),e(H1,[2,51],{30:198,22:L1}),e(I1,[2,76],{22:[1,199]}),{22:[1,200]},{41:201,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{86:[1,202],87:203,124:Dt,127:Ft},e(v1,[2,81]),e(v1,[2,83]),e(v1,[2,84]),e(v1,[2,169]),e(v1,[2,170]),{9:205,20:H,21:W,22:_t,23:q,24:Tt,26:St,38:Ct,40:[1,204],43:Bt,53:vt,69:xt,84:yt,91:148,92:mt,93:Vt,94:Lt,95:It,96:Rt,97:Nt,98:Ot,99:206,113:Pt,117:wt,119:Gt,122:Ut,123:Mt,124:Kt},e(b,[2,102]),e(b,[2,104]),e(b,[2,105]),e(b,[2,158]),e(b,[2,159]),e(b,[2,160]),e(b,[2,161]),e(b,[2,162]),e(b,[2,163]),e(b,[2,164]),e(b,[2,165]),e(b,[2,166]),e(b,[2,167]),e(b,[2,168]),e(b,[2,91]),e(b,[2,92]),e(b,[2,93]),e(b,[2,94]),e(b,[2,95]),e(b,[2,96]),e(b,[2,97]),e(b,[2,98]),e(b,[2,99]),e(b,[2,100]),e(b,[2,101]),{18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,43:[1,207],44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},{22:L1,30:208},{22:[1,209],53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:119,122:L,123:I,124:R},{22:[1,210]},{22:[1,211],114:[1,212]},e(Xt,[2,129]),{22:[1,213],53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:119,122:L,123:I,124:R},{22:[1,214],53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:119,122:L,123:I,124:R},{88:[1,215]},e(F,[2,110],{22:[1,216]}),e(F,[2,112],{22:[1,217]}),{88:[1,218]},e(K,[2,185]),{88:[1,219],106:[1,220]},e(W1,[2,58],{121:119,53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,122:L,123:I,124:R}),{42:[1,221],76:f,90:222,124:A,125:d,126:E},e(o1,[2,87]),e(o1,[2,89]),e(o1,[2,90]),e(o1,[2,154]),e(o1,[2,155]),e(o1,[2,156]),e(o1,[2,157]),{58:[1,223],76:f,90:222,124:A,125:d,126:E},{41:224,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{60:[1,225],76:f,90:222,124:A,125:d,126:E},{62:[1,226],76:f,90:222,124:A,125:d,126:E},{64:[1,227],76:f,90:222,124:A,125:d,126:E},{66:[1,228],76:f,90:222,124:A,125:d,126:E},{69:[1,229]},{73:[1,230],76:f,90:222,124:A,125:d,126:E},{75:[1,231],76:f,90:222,124:A,125:d,126:E},{41:232,76:f,88:P,89:w,90:177,124:A,125:d,126:E},{42:[1,233],76:f,90:222,124:A,125:d,126:E},{76:f,78:[1,234],80:[1,235],90:222,124:A,125:d,126:E},{76:f,78:[1,237],80:[1,236],90:222,124:A,125:d,126:E},{9:238,20:H,21:W,23:q},e(H1,[2,52],{53:jt}),e(I1,[2,78]),e(I1,[2,77]),{71:[1,239],76:f,90:222,124:A,125:d,126:E},e(I1,[2,80]),e(v1,[2,82]),{41:240,76:f,88:P,89:w,90:177,124:A,125:d,126:E},e(rt,h,{17:241}),e(b,[2,103]),e(_,[2,43]),{52:242,53:k,54:46,56:47,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},{22:J,69:Z,92:$,100:243,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{22:J,69:Z,92:$,100:254,112:[1,255],113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{22:J,69:Z,92:$,100:256,112:[1,257],113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{113:[1,258]},{22:J,69:Z,92:$,100:259,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{53:k,56:260,69:S,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R},e(F,[2,109]),{88:[1,261]},{88:[1,262],106:[1,263]},e(F,[2,117]),e(F,[2,119],{22:[1,264]}),e(F,[2,120]),e(N,[2,59]),e(o1,[2,88]),e(N,[2,60]),{60:[1,265],76:f,90:222,124:A,125:d,126:E},e(N,[2,67]),e(N,[2,62]),e(N,[2,63]),e(N,[2,64]),{117:[1,266]},e(N,[2,66]),e(N,[2,68]),{75:[1,267],76:f,90:222,124:A,125:d,126:E},e(N,[2,70]),e(N,[2,71]),e(N,[2,73]),e(N,[2,72]),e(N,[2,74]),e(Yt,[2,4]),e([22,53,69,97,110,113,114,117,119,122,123,124],[2,86]),{42:[1,268],76:f,90:222,124:A,125:d,126:E},{18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,43:[1,269],44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},e(W1,[2,56]),e(F,[2,122],{114:x1}),e(zt,[2,131],{116:271,22:J,69:Z,92:$,113:t1,117:e1,118:s1,119:u1,120:i1}),e(Q,[2,133]),e(Q,[2,135]),e(Q,[2,136]),e(Q,[2,137]),e(Q,[2,138]),e(Q,[2,139]),e(Q,[2,140]),e(Q,[2,141]),e(Q,[2,142]),e(F,[2,123],{114:x1}),{22:[1,272]},e(F,[2,124],{114:x1}),{22:[1,273]},e(Xt,[2,130]),e(F,[2,106],{114:x1}),e(F,[2,107],{121:119,53:k,69:S,97:B,110:v,113:x,114:y,117:m,119:V,122:L,123:I,124:R}),e(F,[2,111]),e(F,[2,113],{22:[1,274]}),e(F,[2,114]),{106:[1,275]},{60:[1,276]},{71:[1,277]},{75:[1,278]},{9:279,20:H,21:W,23:q},e(_,[2,42]),{22:J,69:Z,92:$,113:t1,115:280,116:245,117:e1,118:s1,119:u1,120:i1},e(Q,[2,134]),{26:E1,53:k1,69:b1,97:g1,109:281,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1,128:94},{26:E1,53:k1,69:b1,97:g1,109:282,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1,128:94},{106:[1,283]},e(F,[2,121]),e(N,[2,61]),{41:284,76:f,88:P,89:w,90:177,124:A,125:d,126:E},e(N,[2,69]),e(rt,h,{17:285}),e(zt,[2,132],{116:271,22:J,69:Z,92:$,113:t1,117:e1,118:s1,119:u1,120:i1}),e(F,[2,127],{128:173,22:[1,286],26:E1,53:k1,69:b1,97:g1,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1}),e(F,[2,128],{128:173,22:[1,287],26:E1,53:k1,69:b1,97:g1,113:D1,114:F1,117:_1,119:T1,122:S1,123:C1,124:B1}),e(F,[2,115]),{42:[1,288],76:f,90:222,124:A,125:d,126:E},{18:18,19:19,20:G,21:D,22:O,23:z,32:24,33:25,34:26,35:27,36:28,37:29,38:c1,43:[1,289],44:31,45:h1,47:p1,49:V1,51:35,52:45,53:k,54:46,56:47,69:S,92:w1,93:G1,94:U1,95:M1,96:K1,97:B,110:v,113:x,114:y,117:m,119:V,121:48,122:L,123:I,124:R,129:j1,130:Y1,131:X1,132:z1},{22:J,69:Z,92:$,100:290,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},{22:J,69:Z,92:$,100:291,113:t1,115:244,116:245,117:e1,118:s1,119:u1,120:i1},e(N,[2,65]),e(_,[2,41]),e(F,[2,125],{114:x1}),e(F,[2,126],{114:x1})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],122:[2,7]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var p=new Error(a);throw p.hash=o,p}},parse:function(a){var o=this,p=[0],r=[],T=[null],t=[],R1=this.table,s="",j=0,Ht=0,ye=2,Wt=1,me=t.slice.call(arguments,1),C=Object.create(this.lexer),f1={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(f1.yy[ct]=this.yy[ct]);C.setInput(a,f1.yy),f1.yy.lexer=C,f1.yy.parser=this,typeof C.yylloc>"u"&&(C.yylloc={});var ot=C.yylloc;t.push(ot);var Ve=C.options&&C.options.ranges;typeof f1.yy.parseError=="function"?this.parseError=f1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(){var n1;return n1=r.pop()||C.lex()||Wt,typeof n1!="number"&&(n1 instanceof Array&&(r=n1,n1=r.pop()),n1=o.symbols_[n1]||n1),n1}for(var U,A1,Y,lt,y1={},q1,r1,qt,Q1;;){if(A1=p[p.length-1],this.defaultActions[A1]?Y=this.defaultActions[A1]:((U===null||typeof U>"u")&&(U=Le()),Y=R1[A1]&&R1[A1][U]),typeof Y>"u"||!Y.length||!Y[0]){var ht="";Q1=[];for(q1 in R1[A1])this.terminals_[q1]&&q1>ye&&Q1.push("'"+this.terminals_[q1]+"'");C.showPosition?ht="Parse error on line "+(j+1)+`: `+C.showPosition()+` -Expecting `+Q1.join(", ")+", got '"+(this.terminals_[U]||U)+"'":ht="Parse error on line "+(j+1)+": Unexpected "+(U==qt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(ht,{text:C.match,token:this.terminals_[U]||U,line:C.yylineno,loc:ot,expected:Q1})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A1+", token: "+U);switch(Y[0]){case 1:p.push(U),T.push(C.yytext),t.push(C.yylloc),p.push(Y[1]),U=null,Ht=C.yyleng,s=C.yytext,j=C.yylineno,ot=C.yylloc;break;case 2:if(r1=this.productions_[Y[1]][1],y1.$=T[T.length-r1],y1._$={first_line:t[t.length-(r1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(r1||1)].first_column,last_column:t[t.length-1].last_column},Ve&&(y1._$.range=[t[t.length-(r1||1)].range[0],t[t.length-1].range[1]]),lt=this.performAction.apply(y1,[s,Ht,j,f1.yy,Y[1],T,t].concat(me)),typeof lt<"u")return lt;r1&&(p=p.slice(0,-1*r1*2),T=T.slice(0,-1*r1),t=t.slice(0,-1*r1)),p.push(this.productions_[Y[1]][0]),T.push(y1.$),t.push(y1._$),Wt=R1[p[p.length-2]][p[p.length-1]],p.push(Wt);break;case 3:return!0}}return!0}},xe=function(){var l1={EOF:1,parseError:function(o,p){if(this.yy.parser)this.yy.parser.parseError(o,p);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,p=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;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),p.length-1&&(this.yylineno-=p.length-1);var T=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:p?(p.length===r.length?this.yylloc.first_column:0)+r[r.length-p.length].length-p[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+Q1.join(", ")+", got '"+(this.terminals_[U]||U)+"'":ht="Parse error on line "+(j+1)+": Unexpected "+(U==Wt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(ht,{text:C.match,token:this.terminals_[U]||U,line:C.yylineno,loc:ot,expected:Q1})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A1+", token: "+U);switch(Y[0]){case 1:p.push(U),T.push(C.yytext),t.push(C.yylloc),p.push(Y[1]),U=null,Ht=C.yyleng,s=C.yytext,j=C.yylineno,ot=C.yylloc;break;case 2:if(r1=this.productions_[Y[1]][1],y1.$=T[T.length-r1],y1._$={first_line:t[t.length-(r1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(r1||1)].first_column,last_column:t[t.length-1].last_column},Ve&&(y1._$.range=[t[t.length-(r1||1)].range[0],t[t.length-1].range[1]]),lt=this.performAction.apply(y1,[s,Ht,j,f1.yy,Y[1],T,t].concat(me)),typeof lt<"u")return lt;r1&&(p=p.slice(0,-1*r1*2),T=T.slice(0,-1*r1),t=t.slice(0,-1*r1)),p.push(this.productions_[Y[1]][0]),T.push(y1.$),t.push(y1._$),qt=R1[p[p.length-2]][p[p.length-1]],p.push(qt);break;case 3:return!0}}return!0}},xe=function(){var l1={EOF:1,parseError:function(o,p){if(this.yy.parser)this.yy.parser.parseError(o,p);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,p=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;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),p.length-1&&(this.yylineno-=p.length-1);var T=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:p?(p.length===r.length?this.yylloc.first_column:0)+r[r.length-p.length].length-p[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+` `+o+"^"},test_match:function(a,o){var p,r,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),r=a[0].match(/(?:\r\n?|\n).*/g),r&&(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+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],p=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var t in T)this[t]=T[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,p,r;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),t=0;to[0].length)){if(o=p,r=t,this.options.backtrack_lexer){if(a=this.test_match(p,T[t]),a!==!1)return a;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(a=this.test_match(o,T[r]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>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(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(o,p,r,T){switch(r){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:return this.begin("acc_title"),45;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),47;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:this.begin("callbackname");break;case 13:this.popState();break;case 14:this.popState(),this.begin("callbackargs");break;case 15:return 103;case 16:this.popState();break;case 17:return 104;case 18:return"MD_STR";case 19:this.popState();break;case 20:this.begin("md_string");break;case 21:return"STR";case 22:this.popState();break;case 23:this.pushState("string");break;case 24:return 92;case 25:return 110;case 26:return 93;case 27:return 112;case 28:return 94;case 29:return 95;case 30:return 105;case 31:this.begin("click");break;case 32:this.popState();break;case 33:return 96;case 34:return o.lex.firstGraph()&&this.begin("dir"),24;case 35:return o.lex.firstGraph()&&this.begin("dir"),24;case 36:return o.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 43;case 39:return 106;case 40:return 106;case 41:return 106;case 42:return 106;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 129;case 55:return 130;case 56:return 131;case 57:return 132;case 58:return 113;case 59:return 119;case 60:return 55;case 61:return 69;case 62:return 53;case 63:return 20;case 64:return 114;case 65:return 123;case 66:return this.popState(),86;case 67:return this.pushState("edgeText"),84;case 68:return 127;case 69:return this.popState(),86;case 70:return this.pushState("thickEdgeText"),84;case 71:return 127;case 72:return this.popState(),86;case 73:return this.pushState("dottedEdgeText"),84;case 74:return 127;case 75:return 86;case 76:return this.popState(),62;case 77:return"TEXT";case 78:return this.pushState("ellipseText"),61;case 79:return this.popState(),64;case 80:return this.pushState("text"),63;case 81:return this.popState(),66;case 82:return this.pushState("text"),65;case 83:return 67;case 84:return this.pushState("text"),76;case 85:return this.popState(),73;case 86:return this.pushState("text"),72;case 87:return this.popState(),58;case 88:return this.pushState("text"),57;case 89:return this.popState(),78;case 90:return this.popState(),80;case 91:return 125;case 92:return this.pushState("trapText"),77;case 93:return this.pushState("trapText"),79;case 94:return 126;case 95:return 76;case 96:return 98;case 97:return"SEP";case 98:return 97;case 99:return 123;case 100:return 119;case 101:return 53;case 102:return 117;case 103:return 122;case 104:return 124;case 105:return this.popState(),71;case 106:return this.pushState("text"),71;case 107:return this.popState(),60;case 108:return this.pushState("text"),59;case 109:return this.popState(),42;case 110:return this.pushState("text"),40;case 111:return this.popState(),75;case 112:return this.pushState("text"),74;case 113:return"TEXT";case 114:return"QUOTE";case 115:return 21;case 116:return 22;case 117:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?: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:{close_directive:{rules:[20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},arg_directive:{rules:[3,4,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},type_directive:{rules:[2,3,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},open_directive:{rules:[1,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},callbackargs:{rules:[16,17,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},callbackname:{rules:[13,14,15,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},href:{rules:[20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},click:{rules:[20,23,32,33,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},dottedEdgeText:{rules:[20,23,72,74,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},thickEdgeText:{rules:[20,23,69,71,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},edgeText:{rules:[20,23,66,68,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},trapText:{rules:[20,23,75,78,80,82,86,88,89,90,91,92,93,106,108,110,112],inclusive:!1},ellipseText:{rules:[20,23,75,76,77,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},text:{rules:[20,23,75,78,79,80,81,82,85,86,87,88,92,93,105,106,107,108,109,110,111,112,113],inclusive:!1},vertex:{rules:[20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},dir:{rules:[20,23,43,44,45,46,47,48,49,50,51,52,53,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[10,11,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},acc_descr:{rules:[8,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},acc_title:{rules:[6,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},md_string:{rules:[18,19,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},string:{rules:[20,21,22,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,20,23,24,25,26,27,28,29,30,31,34,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,69,70,72,73,75,78,80,82,83,84,86,88,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,114,115,116,117],inclusive:!0}}};return l1}();nt.lexer=xe;function at(){this.yy={}}return at.prototype=nt,nt.Parser=at,new at}();pt.parser=pt;const Ze=pt,je="flowchart-";let Qt=0,kt=At(),g={},d1=[],m1={},a1=[],Z1={},$1={},J1=0,ft=!0,X,tt,et=[];const st=e=>Ke.sanitizeText(e,kt),Jt=function(e,u,i){Ue.parseDirective(this,e,u,i)},P1=function(e){const u=Object.keys(g);for(const i of u)if(g[i].id===e)return g[i].domId;return e},Zt=function(e,u,i,n,c,l,h={}){let G,D=e;D!==void 0&&D.trim().length!==0&&(g[D]===void 0&&(g[D]={id:D,labelType:"text",domId:je+D+"-"+Qt,styles:[],classes:[]}),Qt++,u!==void 0?(kt=At(),G=st(u.text.trim()),g[D].labelType=u.type,G[0]==='"'&&G[G.length-1]==='"'&&(G=G.substring(1,G.length-1)),g[D].text=G):g[D].text===void 0&&(g[D].text=e),i!==void 0&&(g[D].type=i),n!=null&&n.forEach(function(O){g[D].styles.push(O)}),c!=null&&c.forEach(function(O){g[D].classes.push(O)}),l!==void 0&&(g[D].dir=l),g[D].props===void 0?g[D].props=h:h!==void 0&&Object.assign(g[D].props,h))},$t=function(e,u,i){const l={start:e,end:u,type:void 0,text:"",labelType:"text"};dt.info("abc78 Got edge...",l);const h=i.text;h!==void 0&&(l.text=st(h.text.trim()),l.text[0]==='"'&&l.text[l.text.length-1]==='"'&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=h.type),i!==void 0&&(l.type=i.type,l.stroke=i.stroke,l.length=i.length),d1.push(l)},te=function(e,u,i){dt.info("addLink (abc78)",e,u,i);let n,c;for(n=0;n/)&&(X="LR"),X.match(/.*v/)&&(X="TB"),X==="TD"&&(X="TB")},ut=function(e,u){e.split(",").forEach(function(i){let n=i;g[n]!==void 0&&g[n].classes.push(u),Z1[n]!==void 0&&Z1[n].classes.push(u)})},Ye=function(e,u){e.split(",").forEach(function(i){u!==void 0&&($1[tt==="gen-1"?P1(i):i]=st(u))})},Xe=function(e,u,i){let n=P1(e);if(At().securityLevel!=="loose"||u===void 0)return;let c=[];if(typeof i=="string"){c=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l")),c.classed("hover",!0)}).on("mouseout",function(){u.transition().duration(500).style("opacity",0),N1(this).classed("hover",!1)})};et.push(fe);const Ae=function(e="gen-1"){g={},m1={},d1=[],et=[fe],a1=[],Z1={},J1=0,$1={},ft=!0,tt=e,Me()},de=e=>{tt=e||"gen-2"},Ee=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},ke=function(e,u,i){let n=e.text.trim(),c=i.text;e===i&&i.text.match(/\s/)&&(n=void 0);function l(z){const c1={boolean:{},number:{},string:{}},h1=[];let p1;return{nodeList:z.filter(function(k){const S=typeof k;return k.stmt&&k.stmt==="dir"?(p1=k.value,!1):k.trim()===""?!1:S in c1?c1[S].hasOwnProperty(k)?!1:c1[S][k]=!0:h1.includes(k)?!1:h1.push(k)}),dir:p1}}let h=[];const{nodeList:G,dir:D}=l(h.concat.apply(h,u));if(h=G,tt==="gen-1")for(let z=0;z2e3)return;if(be[O1]=u,a1[u].id===e)return{result:!0,count:0};let n=0,c=1;for(;n=0){const h=ge(e,l);if(h.result)return{result:!0,count:c+h.count};c=c+h.count}n=n+1}return{result:!1,count:c}},De=function(e){return be[e]},Fe=function(){O1=-1,a1.length>0&&ge("none",a1.length-1)},_e=function(){return a1},Te=()=>ft?(ft=!1,!0):!1,He=e=>{let u=e.trim(),i="arrow_open";switch(u[0]){case"<":i="arrow_point",u=u.slice(1);break;case"x":i="arrow_cross",u=u.slice(1);break;case"o":i="arrow_circle",u=u.slice(1);break}let n="normal";return u.includes("=")&&(n="thick"),u.includes(".")&&(n="dotted"),{type:i,stroke:n}},qe=(e,u)=>{const i=u.length;let n=0;for(let c=0;c{const u=e.trim();let i=u.slice(0,-1),n="arrow_open";switch(u.slice(-1)){case"x":n="arrow_cross",u[0]==="x"&&(n="double_"+n,i=i.slice(1));break;case">":n="arrow_point",u[0]==="<"&&(n="double_"+n,i=i.slice(1));break;case"o":n="arrow_circle",u[0]==="o"&&(n="double_"+n,i=i.slice(1));break}let c="normal",l=i.length-1;i[0]==="="&&(c="thick"),i[0]==="~"&&(c="invisible");let h=qe(".",i);return h&&(c="dotted",l=h),{type:n,stroke:c,length:l}},Se=(e,u)=>{const i=We(e);let n;if(u){if(n=He(u),n.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=i.type;else{if(n.type!==i.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=i.length,n}return i},Ce=(e,u)=>{let i=!1;return e.forEach(n=>{n.nodes.indexOf(u)>=0&&(i=!0)}),i},Be=(e,u)=>{const i=[];return e.nodes.forEach((n,c)=>{Ce(u,n)||i.push(e.nodes[c])}),{nodes:i}},ve={firstGraph:Te},Qe={parseDirective:Jt,defaultConfig:()=>Ie.flowchart,setAccTitle:Re,getAccTitle:Ne,getAccDescription:Oe,setAccDescription:Pe,addVertex:Zt,lookUpDomId:P1,addLink:te,updateLinkInterpolate:ee,updateLink:se,addClass:ue,setDirection:ie,setClass:ut,setTooltip:Ye,getTooltip:ne,setClickEvent:ae,setLink:re,bindFunctions:ce,getDirection:oe,getVertices:le,getEdges:he,getClasses:pe,clear:Ae,setGen:de,defaultStyle:Ee,addSubGraph:ke,getDepthFirstPos:De,indexNodes:Fe,getSubGraphs:_e,destructLink:Se,lex:ve,exists:Ce,makeUniq:Be,setDiagramTitle:we,getDiagramTitle:Ge},$e=Object.freeze(Object.defineProperty({__proto__:null,addClass:ue,addLink:te,addSingleLink:$t,addSubGraph:ke,addVertex:Zt,bindFunctions:ce,clear:Ae,default:Qe,defaultStyle:Ee,destructLink:Se,firstGraph:Te,getClasses:pe,getDepthFirstPos:De,getDirection:oe,getEdges:he,getSubGraphs:_e,getTooltip:ne,getVertices:le,indexNodes:Fe,lex:ve,lookUpDomId:P1,parseDirective:Jt,setClass:ut,setClickEvent:ae,setDirection:ie,setGen:de,setLink:re,updateLink:se,updateLinkInterpolate:ee},Symbol.toStringTag,{value:"Module"}));export{$e as d,Qe as f,Ze as p}; +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>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(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(o,p,r,T){switch(r){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:return this.begin("acc_title"),45;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),47;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:this.begin("callbackname");break;case 13:this.popState();break;case 14:this.popState(),this.begin("callbackargs");break;case 15:return 103;case 16:this.popState();break;case 17:return 104;case 18:return"MD_STR";case 19:this.popState();break;case 20:this.begin("md_string");break;case 21:return"STR";case 22:this.popState();break;case 23:this.pushState("string");break;case 24:return 92;case 25:return 110;case 26:return 93;case 27:return 112;case 28:return 94;case 29:return 95;case 30:return 105;case 31:this.begin("click");break;case 32:this.popState();break;case 33:return 96;case 34:return o.lex.firstGraph()&&this.begin("dir"),24;case 35:return o.lex.firstGraph()&&this.begin("dir"),24;case 36:return o.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 43;case 39:return 106;case 40:return 106;case 41:return 106;case 42:return 106;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 129;case 55:return 130;case 56:return 131;case 57:return 132;case 58:return 113;case 59:return 119;case 60:return 55;case 61:return 69;case 62:return 53;case 63:return 20;case 64:return 114;case 65:return 123;case 66:return this.popState(),86;case 67:return this.pushState("edgeText"),84;case 68:return 127;case 69:return this.popState(),86;case 70:return this.pushState("thickEdgeText"),84;case 71:return 127;case 72:return this.popState(),86;case 73:return this.pushState("dottedEdgeText"),84;case 74:return 127;case 75:return 86;case 76:return this.popState(),62;case 77:return"TEXT";case 78:return this.pushState("ellipseText"),61;case 79:return this.popState(),64;case 80:return this.pushState("text"),63;case 81:return this.popState(),66;case 82:return this.pushState("text"),65;case 83:return 67;case 84:return this.pushState("text"),76;case 85:return this.popState(),73;case 86:return this.pushState("text"),72;case 87:return this.popState(),58;case 88:return this.pushState("text"),57;case 89:return this.popState(),78;case 90:return this.popState(),80;case 91:return 125;case 92:return this.pushState("trapText"),77;case 93:return this.pushState("trapText"),79;case 94:return 126;case 95:return 76;case 96:return 98;case 97:return"SEP";case 98:return 97;case 99:return 123;case 100:return 119;case 101:return 53;case 102:return 117;case 103:return 122;case 104:return 124;case 105:return this.popState(),71;case 106:return this.pushState("text"),71;case 107:return this.popState(),60;case 108:return this.pushState("text"),59;case 109:return this.popState(),42;case 110:return this.pushState("text"),40;case 111:return this.popState(),75;case 112:return this.pushState("text"),74;case 113:return"TEXT";case 114:return"QUOTE";case 115:return 21;case 116:return 22;case 117:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?: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:{close_directive:{rules:[20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},arg_directive:{rules:[3,4,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},type_directive:{rules:[2,3,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},open_directive:{rules:[1,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},callbackargs:{rules:[16,17,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},callbackname:{rules:[13,14,15,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},href:{rules:[20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},click:{rules:[20,23,32,33,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},dottedEdgeText:{rules:[20,23,72,74,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},thickEdgeText:{rules:[20,23,69,71,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},edgeText:{rules:[20,23,66,68,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},trapText:{rules:[20,23,75,78,80,82,86,88,89,90,91,92,93,106,108,110,112],inclusive:!1},ellipseText:{rules:[20,23,75,76,77,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},text:{rules:[20,23,75,78,79,80,81,82,85,86,87,88,92,93,105,106,107,108,109,110,111,112,113],inclusive:!1},vertex:{rules:[20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},dir:{rules:[20,23,43,44,45,46,47,48,49,50,51,52,53,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[10,11,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},acc_descr:{rules:[8,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},acc_title:{rules:[6,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},md_string:{rules:[18,19,20,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},string:{rules:[20,21,22,23,75,78,80,82,86,88,92,93,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,20,23,24,25,26,27,28,29,30,31,34,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,69,70,72,73,75,78,80,82,83,84,86,88,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,114,115,116,117],inclusive:!0}}};return l1}();nt.lexer=xe;function at(){this.yy={}}return at.prototype=nt,nt.Parser=at,new at}();pt.parser=pt;const Ze=pt,je="flowchart-";let Qt=0,kt=At(),g={},d1=[],m1={},a1=[],Z1={},$1={},J1=0,ft=!0,X,tt,et=[];const st=e=>Ke.sanitizeText(e,kt),Jt=function(e,u,i){Ue.parseDirective(this,e,u,i)},P1=function(e){const u=Object.keys(g);for(const i of u)if(g[i].id===e)return g[i].domId;return e},Zt=function(e,u,i,n,c,l,h={}){let G,D=e;D!==void 0&&D.trim().length!==0&&(g[D]===void 0&&(g[D]={id:D,labelType:"text",domId:je+D+"-"+Qt,styles:[],classes:[]}),Qt++,u!==void 0?(kt=At(),G=st(u.text.trim()),g[D].labelType=u.type,G[0]==='"'&&G[G.length-1]==='"'&&(G=G.substring(1,G.length-1)),g[D].text=G):g[D].text===void 0&&(g[D].text=e),i!==void 0&&(g[D].type=i),n!=null&&n.forEach(function(O){g[D].styles.push(O)}),c!=null&&c.forEach(function(O){g[D].classes.push(O)}),l!==void 0&&(g[D].dir=l),g[D].props===void 0?g[D].props=h:h!==void 0&&Object.assign(g[D].props,h))},$t=function(e,u,i){const l={start:e,end:u,type:void 0,text:"",labelType:"text"};dt.info("abc78 Got edge...",l);const h=i.text;h!==void 0&&(l.text=st(h.text.trim()),l.text[0]==='"'&&l.text[l.text.length-1]==='"'&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=h.type),i!==void 0&&(l.type=i.type,l.stroke=i.stroke,l.length=i.length),d1.push(l)},te=function(e,u,i){dt.info("addLink (abc78)",e,u,i);let n,c;for(n=0;n/)&&(X="LR"),X.match(/.*v/)&&(X="TB"),X==="TD"&&(X="TB")},ut=function(e,u){e.split(",").forEach(function(i){let n=i;g[n]!==void 0&&g[n].classes.push(u),Z1[n]!==void 0&&Z1[n].classes.push(u)})},Ye=function(e,u){e.split(",").forEach(function(i){u!==void 0&&($1[tt==="gen-1"?P1(i):i]=st(u))})},Xe=function(e,u,i){let n=P1(e);if(At().securityLevel!=="loose"||u===void 0)return;let c=[];if(typeof i=="string"){c=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l")),c.classed("hover",!0)}).on("mouseout",function(){u.transition().duration(500).style("opacity",0),N1(this).classed("hover",!1)})};et.push(fe);const Ae=function(e="gen-1"){g={},m1={},d1=[],et=[fe],a1=[],Z1={},J1=0,$1={},ft=!0,tt=e,Me()},de=e=>{tt=e||"gen-2"},Ee=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},ke=function(e,u,i){let n=e.text.trim(),c=i.text;e===i&&i.text.match(/\s/)&&(n=void 0);function l(z){const c1={boolean:{},number:{},string:{}},h1=[];let p1;return{nodeList:z.filter(function(k){const S=typeof k;return k.stmt&&k.stmt==="dir"?(p1=k.value,!1):k.trim()===""?!1:S in c1?c1[S].hasOwnProperty(k)?!1:c1[S][k]=!0:h1.includes(k)?!1:h1.push(k)}),dir:p1}}let h=[];const{nodeList:G,dir:D}=l(h.concat.apply(h,u));if(h=G,tt==="gen-1")for(let z=0;z2e3)return;if(be[O1]=u,a1[u].id===e)return{result:!0,count:0};let n=0,c=1;for(;n=0){const h=ge(e,l);if(h.result)return{result:!0,count:c+h.count};c=c+h.count}n=n+1}return{result:!1,count:c}},De=function(e){return be[e]},Fe=function(){O1=-1,a1.length>0&&ge("none",a1.length-1)},_e=function(){return a1},Te=()=>ft?(ft=!1,!0):!1,He=e=>{let u=e.trim(),i="arrow_open";switch(u[0]){case"<":i="arrow_point",u=u.slice(1);break;case"x":i="arrow_cross",u=u.slice(1);break;case"o":i="arrow_circle",u=u.slice(1);break}let n="normal";return u.includes("=")&&(n="thick"),u.includes(".")&&(n="dotted"),{type:i,stroke:n}},We=(e,u)=>{const i=u.length;let n=0;for(let c=0;c{const u=e.trim();let i=u.slice(0,-1),n="arrow_open";switch(u.slice(-1)){case"x":n="arrow_cross",u[0]==="x"&&(n="double_"+n,i=i.slice(1));break;case">":n="arrow_point",u[0]==="<"&&(n="double_"+n,i=i.slice(1));break;case"o":n="arrow_circle",u[0]==="o"&&(n="double_"+n,i=i.slice(1));break}let c="normal",l=i.length-1;i[0]==="="&&(c="thick"),i[0]==="~"&&(c="invisible");let h=We(".",i);return h&&(c="dotted",l=h),{type:n,stroke:c,length:l}},Se=(e,u)=>{const i=qe(e);let n;if(u){if(n=He(u),n.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=i.type;else{if(n.type!==i.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=i.length,n}return i},Ce=(e,u)=>{let i=!1;return e.forEach(n=>{n.nodes.indexOf(u)>=0&&(i=!0)}),i},Be=(e,u)=>{const i=[];return e.nodes.forEach((n,c)=>{Ce(u,n)||i.push(e.nodes[c])}),{nodes:i}},ve={firstGraph:Te},Qe={parseDirective:Jt,defaultConfig:()=>Ie.flowchart,setAccTitle:Re,getAccTitle:Ne,getAccDescription:Oe,setAccDescription:Pe,addVertex:Zt,lookUpDomId:P1,addLink:te,updateLinkInterpolate:ee,updateLink:se,addClass:ue,setDirection:ie,setClass:ut,setTooltip:Ye,getTooltip:ne,setClickEvent:ae,setLink:re,bindFunctions:ce,getDirection:oe,getVertices:le,getEdges:he,getClasses:pe,clear:Ae,setGen:de,defaultStyle:Ee,addSubGraph:ke,getDepthFirstPos:De,indexNodes:Fe,getSubGraphs:_e,destructLink:Se,lex:ve,exists:Ce,makeUniq:Be,setDiagramTitle:we,getDiagramTitle:Ge},$e=Object.freeze(Object.defineProperty({__proto__:null,addClass:ue,addLink:te,addSingleLink:$t,addSubGraph:ke,addVertex:Zt,bindFunctions:ce,clear:Ae,default:Qe,defaultStyle:Ee,destructLink:Se,firstGraph:Te,getClasses:pe,getDepthFirstPos:De,getDirection:oe,getEdges:he,getSubGraphs:_e,getTooltip:ne,getVertices:le,indexNodes:Fe,lex:ve,lookUpDomId:P1,parseDirective:Jt,setClass:ut,setClickEvent:ae,setDirection:ie,setGen:de,setLink:re,updateLink:se,updateLinkInterpolate:ee},Symbol.toStringTag,{value:"Module"}));export{$e as d,Qe as f,Ze as p}; diff --git a/backend/web/assets/flowDiagram-d6f8fe3a-4570a98c.js b/backend/web/assets/flowDiagram-d6f8fe3a-2517ad0a.js similarity index 85% rename from backend/web/assets/flowDiagram-d6f8fe3a-4570a98c.js rename to backend/web/assets/flowDiagram-d6f8fe3a-2517ad0a.js index bd3dbe89..5e711a63 100644 --- a/backend/web/assets/flowDiagram-d6f8fe3a-4570a98c.js +++ b/backend/web/assets/flowDiagram-d6f8fe3a-2517ad0a.js @@ -1,4 +1,4 @@ -import{p as St,f as W}from"./flowDb-ff651a22-6b86a346.js";import{h as S,u as Lt,r as Et,l as _t,d as M,f as tt,G as Tt}from"./layout-e00002c0.js";import{n as x,u as P,v as V,x as et,i as J,q as rt,o as R,y as z,z as Nt}from"./EchartsRenderer-3d08027d.js";import{a as N,b as at,i as nt,c as _,e as st,d as it,f as At,g as Ct,s as It}from"./styles-1b0c237a-9ea92680.js";import{l as Bt}from"./line-7fbcfe17.js";import{b2 as Mt}from"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-f58d48f9-594fab58.js";import"./edges-0005682e-04b6df38.js";import"./createText-3b1f58a4-cf050b71.js";import"./svgDraw-70101091-699797c4.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Dt(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.text()}function Rt(r,e){return fetch(r,e).then(Dt)}function Gt(r){return(e,t)=>Rt(e,t).then(n=>new DOMParser().parseFromString(n,r))}var Pt=Gt("image/svg+xml"),Y={normal:$t,vee:Wt,undirected:zt};function Ut(r){Y=r}function $t(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Wt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.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");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function zt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");N(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Vt(r,e){var t=r;return t.node().appendChild(e.label),N(t,e.labelStyle),t}function Yt(r,e){for(var t=r.append("text"),n=Ht(e.label).split(` -`),a=0;a0}function T(r,e,t){var n=r.x,a=r.y,s=[],i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(p){i=Math.min(i,p.x),o=Math.min(o,p.y)});for(var c=n-r.width/2-i,d=a-r.height/2-o,l=0;l1&&s.sort(function(p,g){var f=p.x-t.x,y=p.y-t.y,k=Math.sqrt(f*f+y*y),I=g.x-t.x,E=g.y-t.y,U=Math.sqrt(I*I+E*E);return kMath.abs(a)*o?(s<0&&(o=-o),c=s===0?0:o*a/s,d=o):(a<0&&(i=-i),c=i,d=a===0?0:i*s/a),{x:t+c,y:n+d}}var Q={rect:ie,ellipse:oe,circle:le,diamond:ce};function se(r){Q=r}function ie(r,e,t){var n=r.insert("rect",":first-child").attr("rx",t.rx).attr("ry",t.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return t.intersect=function(a){return Z(t,a)},n}function oe(r,e,t){var n=e.width/2,a=e.height/2,s=r.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",a);return t.intersect=function(i){return lt(t,n,a,i)},s}function le(r,e,t){var n=Math.max(e.width,e.height)/2,a=r.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return t.intersect=function(s){return ae(t,n,s)},a}function ce(r,e,t){var n=e.width*Math.SQRT2/2,a=e.height*Math.SQRT2/2,s=[{x:0,y:-a},{x:-n,y:0},{x:0,y:a},{x:n,y:0}],i=r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return t.intersect=function(o){return T(t,s,o)},i}function de(){var r=function(e,t){fe(t);var n=D(e,"output"),a=D(n,"clusters"),s=D(n,"edgePaths"),i=X(D(n,"edgeLabels"),t),o=q(D(n,"nodes"),t,Q);_t(t),re(o,t),ee(i,t),F(s,t,Y);var c=H(a,t);te(c,t),pe(t)};return r.createNodes=function(e){return arguments.length?(jt(e),r):q},r.createClusters=function(e){return arguments.length?(Xt(e),r):H},r.createEdgeLabels=function(e){return arguments.length?(Ft(e),r):X},r.createEdgePaths=function(e){return arguments.length?(qt(e),r):F},r.shapes=function(e){return arguments.length?(se(e),r):Q},r.arrows=function(e){return arguments.length?(Ut(e),r):Y},r}var he={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},ue={arrowhead:"normal",curve:P};function fe(r){r.nodes().forEach(function(e){var t=r.node(e);!S(t,"label")&&!r.children(e).length&&(t.label=e),S(t,"paddingX")&&M(t,{paddingLeft:t.paddingX,paddingRight:t.paddingX}),S(t,"paddingY")&&M(t,{paddingTop:t.paddingY,paddingBottom:t.paddingY}),S(t,"padding")&&M(t,{paddingLeft:t.padding,paddingRight:t.padding,paddingTop:t.padding,paddingBottom:t.padding}),M(t,he),tt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(n){t[n]=Number(t[n])}),S(t,"width")&&(t._prevWidth=t.width),S(t,"height")&&(t._prevHeight=t.height)}),r.edges().forEach(function(e){var t=r.edge(e);S(t,"label")||(t.label=""),M(t,ue)})}function pe(r){tt(r.nodes(),function(e){var t=r.node(e);S(t,"_prevWidth")?t.width=t._prevWidth:delete t.width,S(t,"_prevHeight")?t.height=t._prevHeight:delete t.height,delete t._prevWidth,delete t._prevHeight})}function D(r,e){var t=r.select("g."+e);return t.empty()&&(t=r.append("g").attr("class",e)),t}function ct(r,e,t){const n=e.width,a=e.height,s=(n+a)*.9,i=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=A(r,s,s,i);return t.intersect=function(c){return T(t,i,c)},o}function dt(r,e,t){const a=e.height,s=a/4,i=e.width+2*s,o=[{x:s,y:0},{x:i-s,y:0},{x:i,y:-a/2},{x:i-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],c=A(r,i,a,o);return t.intersect=function(d){return T(t,o,d)},c}function ht(r,e,t){const n=e.width,a=e.height,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function ut(r,e,t){const n=e.width,a=e.height,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function ft(r,e,t){const n=e.width,a=e.height,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function pt(r,e,t){const n=e.width,a=e.height,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function vt(r,e,t){const n=e.width,a=e.height,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function yt(r,e,t){const n=e.width,a=e.height,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function gt(r,e,t){const n=e.height,a=e.width+n/4,s=r.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return t.intersect=function(i){return Z(t,i)},s}function mt(r,e,t){const n=e.width,a=e.height,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],i=A(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function wt(r,e,t){const n=e.width,a=n/2,s=a/(2.5+n/50),i=e.height+s,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+i+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-i,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-n/2+","+-(i/2+s)+")");return t.intersect=function(d){const l=Z(t,d),v=l.x-t.x;if(a!=0&&(Math.abs(v)t.height/2-s)){let h=s*s*(1-v*v/(a*a));h!=0&&(h=Math.sqrt(h)),h=s-h,d.y-t.y>0&&(h=-h),l.y+=h}return l},c}function ve(r){r.shapes().question=ct,r.shapes().hexagon=dt,r.shapes().stadium=gt,r.shapes().subroutine=mt,r.shapes().cylinder=wt,r.shapes().rect_left_inv_arrow=ht,r.shapes().lean_right=ut,r.shapes().lean_left=ft,r.shapes().trapezoid=pt,r.shapes().inv_trapezoid=vt,r.shapes().rect_right_inv_arrow=yt}function ye(r){r({question:ct}),r({hexagon:dt}),r({stadium:gt}),r({subroutine:mt}),r({cylinder:wt}),r({rect_left_inv_arrow:ht}),r({lean_right:ut}),r({lean_left:ft}),r({trapezoid:pt}),r({inv_trapezoid:vt}),r({rect_right_inv_arrow:yt})}function A(r,e,t,n){return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+-e/2+","+t/2+")")}const ge={addToRender:ve,addToRenderV2:ye},xt={},me=function(r){const e=Object.keys(r);for(const t of e)xt[t]=r[t]},bt=function(r,e,t,n,a,s){const i=n?n.select(`[id="${t}"]`):x(`[id="${t}"]`),o=a||document;Object.keys(r).forEach(function(d){const l=r[d];let v="default";l.classes.length>0&&(v=l.classes.join(" "));const h=V(l.styles);let u=l.text!==void 0?l.text:l.id,p;if(et(J().flowchart.htmlLabels)){const y={label:u.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};p=at(i,y).node(),p.parentNode.removeChild(p)}else{const y=o.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("style",h.labelStyle.replace("color:","fill:"));const k=u.split(rt.lineBreakRegex);for(const I of k){const E=o.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),E.setAttribute("dy","1em"),E.setAttribute("x","1"),E.textContent=I,y.appendChild(E)}p=y}let g=0,f="";switch(l.type){case"round":g=5,f="rect";break;case"square":f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":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"odd_right":f="rect_left_inv_arrow";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"group":f="rect";break;default:f="rect"}R.warn("Adding node",l.id,l.domId),e.setNode(s.db.lookUpDomId(l.id),{labelType:"svg",labelStyle:h.labelStyle,shape:f,label:p,rx:g,ry:g,class:v,style:h.style,id:s.db.lookUpDomId(l.id)})})},kt=function(r,e,t){let n=0,a,s;if(r.defaultStyle!==void 0){const i=V(r.defaultStyle);a=i.style,s=i.labelStyle}r.forEach(function(i){n++;const o="L-"+i.start+"-"+i.end,c="LS-"+i.start,d="LE-"+i.end,l={};i.type==="arrow_open"?l.arrowhead="none":l.arrowhead="normal";let v="",h="";if(i.style!==void 0){const u=V(i.style);v=u.style,h=u.labelStyle}else switch(i.stroke){case"normal":v="fill:none",a!==void 0&&(v=a),s!==void 0&&(h=s);break;case"dotted":v="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":v=" stroke-width: 3.5px;fill:none";break}l.style=v,l.labelStyle=h,i.interpolate!==void 0?l.curve=z(i.interpolate,P):r.defaultInterpolate!==void 0?l.curve=z(r.defaultInterpolate,P):l.curve=z(xt.curve,P),i.text===void 0?i.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",et(J().flowchart.htmlLabels)?(l.labelType="html",l.label=`${i.text.replace(/fa[blrs]?:fa-[\w-]+/g,u=>``)}`):(l.labelType="text",l.label=i.text.replace(rt.lineBreakRegex,` -`),i.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),l.id=o,l.class=c+" "+d,l.minlen=i.length||1,e.setEdge(t.db.lookUpDomId(i.start),t.db.lookUpDomId(i.end),l,n)})},we=function(r,e){return R.info("Extracting classes"),e.db.getClasses()},xe=function(r,e,t,n){R.info("Drawing flowchart");const{securityLevel:a,flowchart:s}=J();let i;a==="sandbox"&&(i=x("#i"+e));const o=a==="sandbox"?x(i.nodes()[0].contentDocument.body):x("body"),c=a==="sandbox"?i.nodes()[0].contentDocument:document;let d=n.db.getDirection();d===void 0&&(d="TD");const l=s.nodeSpacing||50,v=s.rankSpacing||50,h=new Tt({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:l,ranksep:v,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let u;const p=n.db.getSubGraphs();for(let m=p.length-1;m>=0;m--)u=p[m],n.db.addVertex(u.id,u.title,"group",void 0,u.classes);const g=n.db.getVertices();R.warn("Get vertices",g);const f=n.db.getEdges();let y=0;for(y=p.length-1;y>=0;y--){u=p[y],It("cluster").append("text");for(let m=0;m{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,be.setConf(r.flowchart),W.clear(),W.setGen("gen-1")}};export{Re as diagram}; +import{p as St,f as W}from"./flowDb-ff651a22-eeadc954.js";import{h as S,u as Lt,r as Et,l as _t,d as M,f as tt,G as Tt}from"./layout-218ba7ee.js";import{o as x,v as P,x as V,y as et,j as J,r as rt,p as R,z,A as At}from"./TextOutput-39ff842e.js";import{a as A,b as at,i as nt,c as _,e as st,d as it,f as Nt,g as Ct,s as It}from"./styles-1b0c237a-f93a9f01.js";import{l as Bt}from"./line-971ba693.js";import{b2 as Mt}from"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-f58d48f9-4ae439b4.js";import"./edges-0005682e-ae86cacb.js";import"./createText-3b1f58a4-cb14bcdc.js";import"./svgDraw-70101091-6aa9b265.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function Dt(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.text()}function Rt(r,e){return fetch(r,e).then(Dt)}function Gt(r){return(e,t)=>Rt(e,t).then(n=>new DOMParser().parseFromString(n,r))}var Pt=Gt("image/svg+xml"),Y={normal:$t,vee:Wt,undirected:zt};function Ut(r){Y=r}function $t(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");A(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Wt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.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");A(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function zt(r,e,t,n){var a=r.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=a.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");A(s,t[n+"Style"]),t[n+"Class"]&&s.attr("class",t[n+"Class"])}function Vt(r,e){var t=r;return t.node().appendChild(e.label),A(t,e.labelStyle),t}function Yt(r,e){for(var t=r.append("text"),n=Ht(e.label).split(` +`),a=0;a0}function T(r,e,t){var n=r.x,a=r.y,s=[],i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(p){i=Math.min(i,p.x),o=Math.min(o,p.y)});for(var c=n-r.width/2-i,d=a-r.height/2-o,l=0;l1&&s.sort(function(p,g){var f=p.x-t.x,y=p.y-t.y,k=Math.sqrt(f*f+y*y),I=g.x-t.x,E=g.y-t.y,U=Math.sqrt(I*I+E*E);return kMath.abs(a)*o?(s<0&&(o=-o),c=s===0?0:o*a/s,d=o):(a<0&&(i=-i),c=i,d=a===0?0:i*s/a),{x:t+c,y:n+d}}var Q={rect:ie,ellipse:oe,circle:le,diamond:ce};function se(r){Q=r}function ie(r,e,t){var n=r.insert("rect",":first-child").attr("rx",t.rx).attr("ry",t.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return t.intersect=function(a){return Z(t,a)},n}function oe(r,e,t){var n=e.width/2,a=e.height/2,s=r.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",a);return t.intersect=function(i){return lt(t,n,a,i)},s}function le(r,e,t){var n=Math.max(e.width,e.height)/2,a=r.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return t.intersect=function(s){return ae(t,n,s)},a}function ce(r,e,t){var n=e.width*Math.SQRT2/2,a=e.height*Math.SQRT2/2,s=[{x:0,y:-a},{x:-n,y:0},{x:0,y:a},{x:n,y:0}],i=r.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return t.intersect=function(o){return T(t,s,o)},i}function de(){var r=function(e,t){fe(t);var n=D(e,"output"),a=D(n,"clusters"),s=D(n,"edgePaths"),i=X(D(n,"edgeLabels"),t),o=q(D(n,"nodes"),t,Q);_t(t),re(o,t),ee(i,t),F(s,t,Y);var c=H(a,t);te(c,t),pe(t)};return r.createNodes=function(e){return arguments.length?(jt(e),r):q},r.createClusters=function(e){return arguments.length?(Xt(e),r):H},r.createEdgeLabels=function(e){return arguments.length?(Ft(e),r):X},r.createEdgePaths=function(e){return arguments.length?(qt(e),r):F},r.shapes=function(e){return arguments.length?(se(e),r):Q},r.arrows=function(e){return arguments.length?(Ut(e),r):Y},r}var he={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},ue={arrowhead:"normal",curve:P};function fe(r){r.nodes().forEach(function(e){var t=r.node(e);!S(t,"label")&&!r.children(e).length&&(t.label=e),S(t,"paddingX")&&M(t,{paddingLeft:t.paddingX,paddingRight:t.paddingX}),S(t,"paddingY")&&M(t,{paddingTop:t.paddingY,paddingBottom:t.paddingY}),S(t,"padding")&&M(t,{paddingLeft:t.padding,paddingRight:t.padding,paddingTop:t.padding,paddingBottom:t.padding}),M(t,he),tt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(n){t[n]=Number(t[n])}),S(t,"width")&&(t._prevWidth=t.width),S(t,"height")&&(t._prevHeight=t.height)}),r.edges().forEach(function(e){var t=r.edge(e);S(t,"label")||(t.label=""),M(t,ue)})}function pe(r){tt(r.nodes(),function(e){var t=r.node(e);S(t,"_prevWidth")?t.width=t._prevWidth:delete t.width,S(t,"_prevHeight")?t.height=t._prevHeight:delete t.height,delete t._prevWidth,delete t._prevHeight})}function D(r,e){var t=r.select("g."+e);return t.empty()&&(t=r.append("g").attr("class",e)),t}function ct(r,e,t){const n=e.width,a=e.height,s=(n+a)*.9,i=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=N(r,s,s,i);return t.intersect=function(c){return T(t,i,c)},o}function dt(r,e,t){const a=e.height,s=a/4,i=e.width+2*s,o=[{x:s,y:0},{x:i-s,y:0},{x:i,y:-a/2},{x:i-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],c=N(r,i,a,o);return t.intersect=function(d){return T(t,o,d)},c}function ht(r,e,t){const n=e.width,a=e.height,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function ut(r,e,t){const n=e.width,a=e.height,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function ft(r,e,t){const n=e.width,a=e.height,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function pt(r,e,t){const n=e.width,a=e.height,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function vt(r,e,t){const n=e.width,a=e.height,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function yt(r,e,t){const n=e.width,a=e.height,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function gt(r,e,t){const n=e.height,a=e.width+n/4,s=r.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return t.intersect=function(i){return Z(t,i)},s}function mt(r,e,t){const n=e.width,a=e.height,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],i=N(r,n,a,s);return t.intersect=function(o){return T(t,s,o)},i}function wt(r,e,t){const n=e.width,a=n/2,s=a/(2.5+n/50),i=e.height+s,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+i+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-i,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-n/2+","+-(i/2+s)+")");return t.intersect=function(d){const l=Z(t,d),v=l.x-t.x;if(a!=0&&(Math.abs(v)t.height/2-s)){let h=s*s*(1-v*v/(a*a));h!=0&&(h=Math.sqrt(h)),h=s-h,d.y-t.y>0&&(h=-h),l.y+=h}return l},c}function ve(r){r.shapes().question=ct,r.shapes().hexagon=dt,r.shapes().stadium=gt,r.shapes().subroutine=mt,r.shapes().cylinder=wt,r.shapes().rect_left_inv_arrow=ht,r.shapes().lean_right=ut,r.shapes().lean_left=ft,r.shapes().trapezoid=pt,r.shapes().inv_trapezoid=vt,r.shapes().rect_right_inv_arrow=yt}function ye(r){r({question:ct}),r({hexagon:dt}),r({stadium:gt}),r({subroutine:mt}),r({cylinder:wt}),r({rect_left_inv_arrow:ht}),r({lean_right:ut}),r({lean_left:ft}),r({trapezoid:pt}),r({inv_trapezoid:vt}),r({rect_right_inv_arrow:yt})}function N(r,e,t,n){return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("transform","translate("+-e/2+","+t/2+")")}const ge={addToRender:ve,addToRenderV2:ye},xt={},me=function(r){const e=Object.keys(r);for(const t of e)xt[t]=r[t]},bt=function(r,e,t,n,a,s){const i=n?n.select(`[id="${t}"]`):x(`[id="${t}"]`),o=a||document;Object.keys(r).forEach(function(d){const l=r[d];let v="default";l.classes.length>0&&(v=l.classes.join(" "));const h=V(l.styles);let u=l.text!==void 0?l.text:l.id,p;if(et(J().flowchart.htmlLabels)){const y={label:u.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};p=at(i,y).node(),p.parentNode.removeChild(p)}else{const y=o.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("style",h.labelStyle.replace("color:","fill:"));const k=u.split(rt.lineBreakRegex);for(const I of k){const E=o.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),E.setAttribute("dy","1em"),E.setAttribute("x","1"),E.textContent=I,y.appendChild(E)}p=y}let g=0,f="";switch(l.type){case"round":g=5,f="rect";break;case"square":f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":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"odd_right":f="rect_left_inv_arrow";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"group":f="rect";break;default:f="rect"}R.warn("Adding node",l.id,l.domId),e.setNode(s.db.lookUpDomId(l.id),{labelType:"svg",labelStyle:h.labelStyle,shape:f,label:p,rx:g,ry:g,class:v,style:h.style,id:s.db.lookUpDomId(l.id)})})},kt=function(r,e,t){let n=0,a,s;if(r.defaultStyle!==void 0){const i=V(r.defaultStyle);a=i.style,s=i.labelStyle}r.forEach(function(i){n++;const o="L-"+i.start+"-"+i.end,c="LS-"+i.start,d="LE-"+i.end,l={};i.type==="arrow_open"?l.arrowhead="none":l.arrowhead="normal";let v="",h="";if(i.style!==void 0){const u=V(i.style);v=u.style,h=u.labelStyle}else switch(i.stroke){case"normal":v="fill:none",a!==void 0&&(v=a),s!==void 0&&(h=s);break;case"dotted":v="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":v=" stroke-width: 3.5px;fill:none";break}l.style=v,l.labelStyle=h,i.interpolate!==void 0?l.curve=z(i.interpolate,P):r.defaultInterpolate!==void 0?l.curve=z(r.defaultInterpolate,P):l.curve=z(xt.curve,P),i.text===void 0?i.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",et(J().flowchart.htmlLabels)?(l.labelType="html",l.label=`${i.text.replace(/fa[blrs]?:fa-[\w-]+/g,u=>``)}`):(l.labelType="text",l.label=i.text.replace(rt.lineBreakRegex,` +`),i.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),l.id=o,l.class=c+" "+d,l.minlen=i.length||1,e.setEdge(t.db.lookUpDomId(i.start),t.db.lookUpDomId(i.end),l,n)})},we=function(r,e){return R.info("Extracting classes"),e.db.getClasses()},xe=function(r,e,t,n){R.info("Drawing flowchart");const{securityLevel:a,flowchart:s}=J();let i;a==="sandbox"&&(i=x("#i"+e));const o=a==="sandbox"?x(i.nodes()[0].contentDocument.body):x("body"),c=a==="sandbox"?i.nodes()[0].contentDocument:document;let d=n.db.getDirection();d===void 0&&(d="TD");const l=s.nodeSpacing||50,v=s.rankSpacing||50,h=new Tt({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:l,ranksep:v,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let u;const p=n.db.getSubGraphs();for(let m=p.length-1;m>=0;m--)u=p[m],n.db.addVertex(u.id,u.title,"group",void 0,u.classes);const g=n.db.getVertices();R.warn("Get vertices",g);const f=n.db.getEdges();let y=0;for(y=p.length-1;y>=0;y--){u=p[y],It("cluster").append("text");for(let m=0;m{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,be.setConf(r.flowchart),W.clear(),W.setGen("gen-1")}};export{Re as diagram}; diff --git a/backend/web/assets/flowDiagram-v2-58f49b84-4d4dd746.js b/backend/web/assets/flowDiagram-v2-58f49b84-4d4dd746.js new file mode 100644 index 00000000..cf4fcc08 --- /dev/null +++ b/backend/web/assets/flowDiagram-v2-58f49b84-4d4dd746.js @@ -0,0 +1 @@ +import{p as e,f as o}from"./flowDb-ff651a22-eeadc954.js";import{f as t,g as a}from"./styles-1b0c237a-f93a9f01.js";import{B as i}from"./TextOutput-39ff842e.js";import"./layout-218ba7ee.js";import"./index-ef7aa48c.js";import"./index-f58d48f9-4ae439b4.js";import"./edges-0005682e-ae86cacb.js";import"./createText-3b1f58a4-cb14bcdc.js";import"./svgDraw-70101091-6aa9b265.js";import"./line-971ba693.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";import"./_plugin-vue_export-helper-c27b6911.js";const M={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{M as diagram}; diff --git a/backend/web/assets/flowDiagram-v2-58f49b84-7c402221.js b/backend/web/assets/flowDiagram-v2-58f49b84-7c402221.js deleted file mode 100644 index 1d5a816d..00000000 --- a/backend/web/assets/flowDiagram-v2-58f49b84-7c402221.js +++ /dev/null @@ -1 +0,0 @@ -import{p as e,f as o}from"./flowDb-ff651a22-6b86a346.js";import{f as t,g as a}from"./styles-1b0c237a-9ea92680.js";import{A as i}from"./EchartsRenderer-3d08027d.js";import"./layout-e00002c0.js";import"./index-51905ea3.js";import"./index-f58d48f9-594fab58.js";import"./edges-0005682e-04b6df38.js";import"./createText-3b1f58a4-cf050b71.js";import"./svgDraw-70101091-699797c4.js";import"./line-7fbcfe17.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";import"./_plugin-vue_export-helper-c27b6911.js";const M={parser:e,db:o,renderer:t,styles:a,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),t.setConf(r.flowchart),o.clear(),o.setGen("gen-2")}};export{M as diagram}; diff --git a/backend/web/assets/flowchart-elk-definition-56584a6c-f7e4e75c.js b/backend/web/assets/flowchart-elk-definition-56584a6c-7691460b.js similarity index 89% rename from backend/web/assets/flowchart-elk-definition-56584a6c-f7e4e75c.js rename to backend/web/assets/flowchart-elk-definition-56584a6c-7691460b.js index fea55410..4461ae81 100644 --- a/backend/web/assets/flowchart-elk-definition-56584a6c-f7e4e75c.js +++ b/backend/web/assets/flowchart-elk-definition-56584a6c-7691460b.js @@ -1,4 +1,4 @@ -import{d as bMe,p as wMe}from"./flowDb-ff651a22-6b86a346.js";import{o as K1,n as lI,i as OH,z as gMe,v as V1n,y as X1n,u as IH,q as pMe}from"./EchartsRenderer-3d08027d.js";import{i as vMe,a as mMe,l as kMe,b as yMe}from"./edges-0005682e-04b6df38.js";import{aP as Hee,b3 as jMe}from"./index-51905ea3.js";import{l as EMe}from"./line-7fbcfe17.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./createText-3b1f58a4-cf050b71.js";import"./svgDraw-70101091-699797c4.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";function PH(Ae){throw new Error('Could not dynamically require "'+Ae+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Uee={exports:{}};(function(Ae,_t){(function(ft){Ae.exports=ft()})(function(){return function(){function ft(dt,Nt,Ai){function j(It,qt){if(!Nt[It]){if(!dt[It]){var Ge=typeof PH=="function"&&PH;if(!qt&&Ge)return Ge(It,!0);if(Ht)return Ht(It,!0);var Ki=new Error("Cannot find module '"+It+"'");throw Ki.code="MODULE_NOT_FOUND",Ki}var Si=Nt[It]={exports:{}};dt[It][0].call(Si.exports,function(Mn){var Lc=dt[It][1][Mn];return j(Lc||Mn)},Si,Si.exports,ft,dt,Nt,Ai)}return Nt[It].exports}for(var Ht=typeof PH=="function"&&PH,ou=0;ou0&&arguments[0]!==void 0?arguments[0]:{},Ki=Ge.defaultLayoutOptions,Si=Ki===void 0?{}:Ki,Mn=Ge.algorithms,Lc=Mn===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:Mn,Nc=Ge.workerFactory,ps=Ge.workerUrl;if(j(this,It),this.defaultLayoutOptions=Si,this.initialized=!1,typeof ps>"u"&&typeof Nc>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var Rr=Nc;typeof ps<"u"&&typeof Nc>"u"&&(Rr=function(q1){return new Worker(q1)});var Ch=Rr(ps);if(typeof Ch.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new ou(Ch),this.worker.postMessage({cmd:"register",algorithms:Lc}).then(function(H1){return qt.initialized=!0}).catch(console.err)}return Ai(It,[{key:"layout",value:function(Ge){var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Si=Ki.layoutOptions,Mn=Si===void 0?this.defaultLayoutOptions:Si,Lc=Ki.logging,Nc=Lc===void 0?!1:Lc,ps=Ki.measureExecutionTime,Rr=ps===void 0?!1:ps;return Ge?this.worker.postMessage({cmd:"layout",graph:Ge,layoutOptions:Mn,options:{logging:Nc,measureExecutionTime:Rr}}):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()}}]),It}();Nt.default=Ht;var ou=function(){function It(qt){var Ge=this;if(j(this,It),qt===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=qt,this.worker.onmessage=function(Ki){setTimeout(function(){Ge.receive(Ge,Ki)},0)}}return Ai(It,[{key:"postMessage",value:function(Ge){var Ki=this.id||0;this.id=Ki+1,Ge.id=Ki;var Si=this;return new Promise(function(Mn,Lc){Si.resolvers[Ki]=function(Nc,ps){Nc?(Si.convertGwtStyleError(Nc),Lc(Nc)):Mn(ps)},Si.worker.postMessage(Ge)})}},{key:"receive",value:function(Ge,Ki){var Si=Ki.data,Mn=Ge.resolvers[Si.id];Mn&&(delete Ge.resolvers[Si.id],Si.error?Mn(Si.error):Mn(null,Si.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(Ge){if(Ge){var Ki=Ge.__java$exception;Ki&&(Ki.cause&&Ki.cause.backingJsObject&&(Ge.cause=Ki.cause.backingJsObject,this.convertGwtStyleError(Ge.cause)),delete Ge.__java$exception)}}}]),It}()},{}],2:[function(ft,dt,Nt){(function(Ai){(function(){var j;typeof window<"u"?j=window:typeof Ai<"u"?j=Ai:typeof self<"u"&&(j=self);var Ht;function ou(){}function It(){}function qt(){}function Ge(){}function Ki(){}function Si(){}function Mn(){}function Lc(){}function Nc(){}function ps(){}function Rr(){}function Ch(){}function H1(){}function q1(){}function ww(){}function Np(){}function G1(){}function Th(){}function Q1n(){}function J1n(){}function zy(){}function Y1n(){}function Z1n(){}function nln(){}function eln(){}function Xg(){}function N(){}function tln(){}function aI(){}function iln(){}function rln(){}function cln(){}function uln(){}function DH(){}function sln(){}function oln(){}function fln(){}function z1(){}function U1(){}function dI(){}function hln(){}function lln(){}function aln(){}function $H(){}function dln(){}function bln(){}function Vg(){}function Qg(){}function wln(){}function gln(){}function pln(){}function vln(){}function FH(){}function W1(){}function Jg(){}function Yg(){}function mln(){}function Vee(){}function bI(){}function kln(){}function yln(){}function jln(){}function Eln(){}function Cln(){}function Tln(){}function Mln(){}function Aln(){}function Sln(){}function Pln(){}function Iln(){}function Oln(){}function Dln(){}function $ln(){}function Fln(){}function xln(){}function Lln(){}function Nln(){}function Bln(){}function Rln(){}function _ln(){}function Kln(){}function Hln(){}function qln(){}function Gln(){}function zln(){}function Uln(){}function Wln(){}function Xln(){}function Vln(){}function Qln(){}function Jln(){}function Yln(){}function xH(){}function Zln(){}function nan(){}function ean(){}function tan(){}function wI(){}function gI(){}function Uy(){}function ian(){}function ran(){}function pI(){}function can(){}function uan(){}function san(){}function Wy(){}function oan(){}function fan(){}function han(){}function lan(){}function aan(){}function dan(){}function ban(){}function wan(){}function gan(){}function LH(){}function pan(){}function van(){}function man(){}function kan(){}function yan(){}function NH(){}function jan(){}function Ean(){}function Can(){}function Tan(){}function Man(){}function Aan(){}function San(){}function Pan(){}function Ian(){}function Oan(){}function Dan(){}function $an(){}function Fan(){}function xan(){}function vI(){}function Lan(){}function Nan(){}function Ban(){}function Ran(){}function _an(){}function BH(){}function Kan(){}function Han(){}function qan(){}function Gan(){}function zan(){}function Uan(){}function Wan(){}function Xan(){}function Van(){}function Qan(){}function Jan(){}function Yan(){}function Zan(){}function ndn(){}function edn(){}function tdn(){}function idn(){}function rdn(){}function cdn(){}function udn(){}function sdn(){}function odn(){}function fdn(){}function hdn(){}function ldn(){}function adn(){}function ddn(){}function bdn(){}function wdn(){}function gdn(){}function pdn(){}function vdn(){}function mdn(){}function kdn(){}function ydn(){}function jdn(){}function Edn(){}function Cdn(){}function Tdn(){}function Mdn(){}function Adn(){}function Sdn(){}function Pdn(){}function Idn(){}function Odn(){}function Ddn(){}function $dn(){}function Fdn(){}function xdn(){}function Ldn(){}function Ndn(){}function Bdn(){}function Rdn(){}function _dn(){}function Kdn(){}function Hdn(){}function qdn(){}function Gdn(){}function zdn(){}function Udn(){}function Wdn(){}function Xdn(){}function Vdn(){}function Qdn(){}function Jdn(){}function Ydn(){}function Zdn(){}function n0n(){}function e0n(){}function t0n(){}function i0n(){}function r0n(){}function c0n(){}function u0n(){}function s0n(){}function o0n(){}function f0n(){}function h0n(){}function l0n(){}function a0n(){}function d0n(){}function b0n(){}function w0n(){}function g0n(){}function p0n(){}function v0n(){}function m0n(){}function k0n(){}function y0n(){}function j0n(){}function E0n(){}function C0n(){}function T0n(){}function M0n(){}function A0n(){}function S0n(){}function P0n(){}function I0n(){}function O0n(){}function D0n(){}function RH(){}function $0n(){}function F0n(){}function x0n(){}function L0n(){}function N0n(){}function B0n(){}function R0n(){}function _0n(){}function K0n(){}function H0n(){}function q0n(){}function G0n(){}function z0n(){}function U0n(){}function W0n(){}function X0n(){}function V0n(){}function Q0n(){}function J0n(){}function Y0n(){}function Z0n(){}function nbn(){}function ebn(){}function tbn(){}function ibn(){}function rbn(){}function cbn(){}function ubn(){}function sbn(){}function obn(){}function fbn(){}function hbn(){}function lbn(){}function abn(){}function dbn(){}function bbn(){}function wbn(){}function gbn(){}function pbn(){}function vbn(){}function mbn(){}function kbn(){}function ybn(){}function jbn(){}function Ebn(){}function Cbn(){}function Tbn(){}function Mbn(){}function Abn(){}function Sbn(){}function Pbn(){}function Ibn(){}function Obn(){}function Dbn(){}function $bn(){}function Fbn(){}function xbn(){}function Lbn(){}function Nbn(){}function Bbn(){}function Rbn(){}function _bn(){}function Kbn(){}function Hbn(){}function qbn(){}function Gbn(){}function zbn(){}function _H(){}function Ubn(){}function Wbn(){}function Xbn(){}function Vbn(){}function Qbn(){}function Jbn(){}function Ybn(){}function Zbn(){}function nwn(){}function ewn(){}function twn(){}function iwn(){}function rwn(){}function cwn(){}function uwn(){}function swn(){}function own(){}function fwn(){}function hwn(){}function lwn(){}function KH(){}function awn(){}function dwn(){}function bwn(){}function wwn(){}function gwn(){}function pwn(){}function HH(){}function qH(){}function vwn(){}function GH(){}function zH(){}function mwn(){}function kwn(){}function ywn(){}function jwn(){}function Ewn(){}function Cwn(){}function Twn(){}function Mwn(){}function Awn(){}function UH(){}function Swn(){}function Pwn(){}function Iwn(){}function Own(){}function Dwn(){}function $wn(){}function Fwn(){}function xwn(){}function Lwn(){}function Nwn(){}function Bwn(){}function Rwn(){}function _wn(){}function Kwn(){}function Hwn(){}function qwn(){}function Gwn(){}function zwn(){}function Uwn(){}function Wwn(){}function Xwn(){}function Vwn(){}function Qwn(){}function Jwn(){}function Ywn(){}function Zwn(){}function ngn(){}function egn(){}function tgn(){}function ign(){}function rgn(){}function cgn(){}function ugn(){}function sgn(){}function ogn(){}function fgn(){}function hgn(){}function lgn(){}function agn(){}function dgn(){}function bgn(){}function wgn(){}function ggn(){}function pgn(){}function vgn(){}function mgn(){}function kgn(){}function ygn(){}function jgn(){}function Egn(){}function Cgn(){}function Tgn(){}function Mgn(){}function Agn(){}function Sgn(){}function Pgn(){}function Ign(){}function Ogn(){}function Dgn(){}function $gn(){}function Fgn(){}function xgn(){}function Lgn(){}function Ngn(){}function Bgn(){}function Rgn(){}function _gn(){}function Kgn(){}function mI(){}function kI(){}function yI(){}function Hgn(){}function qgn(){}function Ggn(){}function zgn(){}function Ugn(){}function WH(){}function Wgn(){}function Xgn(){}function Qee(){}function Vgn(){}function Qgn(){}function Jgn(){}function Ygn(){}function Zgn(){}function n2n(){}function e2n(){}function Zl(){}function t2n(){}function Zg(){}function XH(){}function i2n(){}function r2n(){}function c2n(){}function u2n(){}function s2n(){}function o2n(){}function f2n(){}function h2n(){}function l2n(){}function a2n(){}function d2n(){}function b2n(){}function w2n(){}function g2n(){}function p2n(){}function v2n(){}function m2n(){}function k2n(){}function y2n(){}function j2n(){}function E2n(){}function dn(){}function C2n(){}function T2n(){}function M2n(){}function A2n(){}function S2n(){}function P2n(){}function I2n(){}function O2n(){}function D2n(){}function $2n(){}function jI(){}function F2n(){}function x2n(){}function L2n(){}function N2n(){}function B2n(){}function VH(){}function Xy(){}function Vy(){}function R2n(){}function QH(){}function Qy(){}function _2n(){}function K2n(){}function H2n(){}function q2n(){}function G2n(){}function z2n(){}function Jy(){}function U2n(){}function W2n(){}function X2n(){}function Yy(){}function V2n(){}function JH(){}function Q2n(){}function EI(){}function YH(){}function J2n(){}function Y2n(){}function Z2n(){}function npn(){}function Jee(){}function epn(){}function tpn(){}function ipn(){}function rpn(){}function cpn(){}function upn(){}function spn(){}function opn(){}function fpn(){}function hpn(){}function Bp(){}function CI(){}function lpn(){}function apn(){}function dpn(){}function bpn(){}function wpn(){}function gpn(){}function ppn(){}function vpn(){}function mpn(){}function kpn(){}function ypn(){}function jpn(){}function Epn(){}function Cpn(){}function Tpn(){}function Mpn(){}function Apn(){}function Spn(){}function Ppn(){}function Ipn(){}function Opn(){}function Dpn(){}function $pn(){}function Fpn(){}function xpn(){}function Lpn(){}function Npn(){}function Bpn(){}function Rpn(){}function _pn(){}function Kpn(){}function Hpn(){}function qpn(){}function Gpn(){}function zpn(){}function Upn(){}function Wpn(){}function Xpn(){}function Vpn(){}function Qpn(){}function Jpn(){}function Ypn(){}function Zpn(){}function n3n(){}function e3n(){}function t3n(){}function i3n(){}function r3n(){}function c3n(){}function u3n(){}function s3n(){}function o3n(){}function f3n(){}function h3n(){}function l3n(){}function a3n(){}function d3n(){}function b3n(){}function w3n(){}function g3n(){}function p3n(){}function v3n(){}function m3n(){}function k3n(){}function y3n(){}function j3n(){}function E3n(){}function C3n(){}function T3n(){}function M3n(){}function A3n(){}function S3n(){}function P3n(){}function I3n(){}function O3n(){}function D3n(){}function $3n(){}function F3n(){}function x3n(){}function L3n(){}function N3n(){}function B3n(){}function R3n(){}function _3n(){}function K3n(){}function H3n(){}function q3n(){}function G3n(){}function z3n(){}function U3n(){}function W3n(){}function X3n(){}function V3n(){}function Q3n(){}function J3n(){}function Y3n(){}function Z3n(){}function n4n(){}function e4n(){}function t4n(){}function i4n(){}function ZH(){}function r4n(){}function c4n(){}function TI(){Rv()}function u4n(){pF()}function s4n(){a6()}function o4n(){WT()}function f4n(){YJ()}function h4n(){Go()}function l4n(){fJ()}function a4n(){C7()}function d4n(){q9()}function b4n(){H9()}function w4n(){w8()}function g4n(){v7n()}function p4n(){x2()}function v4n(){Sj()}function m4n(){PSn()}function k4n(){HIn()}function y4n(){sPn()}function j4n(){CMn()}function E4n(){V3()}function C4n(){yl()}function T4n(){qIn()}function M4n(){pAn()}function A4n(){zZ()}function S4n(){IFn()}function P4n(){TMn()}function I4n(){nn()}function O4n(){EMn()}function D4n(){GIn()}function $4n(){WOn()}function F4n(){AMn()}function x4n(){aPn()}function L4n(){m7n()}function N4n(){$Y()}function B4n(){gb()}function R4n(){pOn()}function _4n(){S7()}function K4n(){Ux()}function H4n(){ZF()}function q4n(){Zd()}function G4n(){PV()}function z4n(){MMn()}function U4n(){BBn()}function W4n(){IY()}function X4n(){Bx()}function V4n(){DC()}function Q4n(){nM()}function nq(){Xe()}function J4n(){wT()}function Y4n(){NQ()}function eq(){mM()}function Fo(){dEn()}function tq(){eF()}function Z4n(){pZ()}function iq(n){_n(n)}function nvn(n){this.a=n}function Zy(n){this.a=n}function evn(n){this.a=n}function tvn(n){this.a=n}function ivn(n){this.a=n}function rvn(n){this.a=n}function cvn(n){this.a=n}function uvn(n){this.a=n}function rq(n){this.a=n}function cq(n){this.a=n}function svn(n){this.a=n}function MI(n){this.a=n}function ovn(n){this.a=n}function AI(n){this.a=n}function fvn(n){this.a=n}function SI(n){this.a=n}function hvn(n){this.a=n}function PI(n){this.a=n}function lvn(n){this.a=n}function avn(n){this.a=n}function dvn(n){this.a=n}function uq(n){this.b=n}function bvn(n){this.c=n}function wvn(n){this.a=n}function gvn(n){this.a=n}function pvn(n){this.a=n}function vvn(n){this.a=n}function mvn(n){this.a=n}function kvn(n){this.a=n}function yvn(n){this.a=n}function jvn(n){this.a=n}function Evn(n){this.a=n}function Cvn(n){this.a=n}function Tvn(n){this.a=n}function Mvn(n){this.a=n}function Avn(n){this.a=n}function sq(n){this.a=n}function oq(n){this.a=n}function nj(n){this.a=n}function M9(n){this.a=n}function na(){this.a=[]}function Svn(n,e){n.a=e}function Yee(n,e){n.a=e}function Zee(n,e){n.b=e}function nte(n,e){n.b=e}function ete(n,e){n.b=e}function fq(n,e){n.j=e}function tte(n,e){n.g=e}function ite(n,e){n.i=e}function rte(n,e){n.c=e}function cte(n,e){n.d=e}function ute(n,e){n.d=e}function ste(n,e){n.c=e}function ea(n,e){n.k=e}function ote(n,e){n.c=e}function hq(n,e){n.c=e}function lq(n,e){n.a=e}function fte(n,e){n.a=e}function hte(n,e){n.f=e}function lte(n,e){n.a=e}function ate(n,e){n.b=e}function II(n,e){n.d=e}function ej(n,e){n.i=e}function aq(n,e){n.o=e}function dte(n,e){n.r=e}function bte(n,e){n.a=e}function wte(n,e){n.b=e}function Pvn(n,e){n.e=e}function gte(n,e){n.f=e}function dq(n,e){n.g=e}function pte(n,e){n.e=e}function vte(n,e){n.f=e}function mte(n,e){n.f=e}function kte(n,e){n.n=e}function yte(n,e){n.a=e}function jte(n,e){n.a=e}function Ete(n,e){n.c=e}function Cte(n,e){n.c=e}function Tte(n,e){n.d=e}function Mte(n,e){n.e=e}function Ate(n,e){n.g=e}function Ste(n,e){n.a=e}function Pte(n,e){n.c=e}function Ite(n,e){n.d=e}function Ote(n,e){n.e=e}function Dte(n,e){n.f=e}function $te(n,e){n.j=e}function Fte(n,e){n.a=e}function xte(n,e){n.b=e}function Lte(n,e){n.a=e}function Ivn(n){n.b=n.a}function Ovn(n){n.c=n.d.d}function $v(n){this.d=n}function ta(n){this.a=n}function Rp(n){this.a=n}function bq(n){this.a=n}function Mh(n){this.a=n}function A9(n){this.a=n}function Dvn(n){this.a=n}function wq(n){this.a=n}function S9(n){this.a=n}function gq(n){this.a=n}function pq(n){this.a=n}function vq(n){this.a=n}function L0(n){this.a=n}function P9(n){this.a=n}function I9(n){this.a=n}function mq(n){this.b=n}function _p(n){this.b=n}function Kp(n){this.b=n}function OI(n){this.a=n}function $vn(n){this.a=n}function kq(n){this.a=n}function DI(n){this.c=n}function E(n){this.c=n}function Fvn(n){this.c=n}function yq(n){this.a=n}function jq(n){this.a=n}function Eq(n){this.a=n}function Cq(n){this.a=n}function ut(n){this.a=n}function xvn(n){this.a=n}function Tq(n){this.a=n}function Mq(n){this.a=n}function Lvn(n){this.a=n}function Nvn(n){this.a=n}function Fv(n){this.a=n}function Bvn(n){this.a=n}function Rvn(n){this.a=n}function _vn(n){this.a=n}function Kvn(n){this.a=n}function Hvn(n){this.a=n}function qvn(n){this.a=n}function Gvn(n){this.a=n}function zvn(n){this.a=n}function Uvn(n){this.a=n}function Wvn(n){this.a=n}function Xvn(n){this.a=n}function Vvn(n){this.a=n}function Qvn(n){this.a=n}function Jvn(n){this.a=n}function Yvn(n){this.a=n}function Zvn(n){this.a=n}function n5n(n){this.a=n}function O9(n){this.a=n}function e5n(n){this.a=n}function t5n(n){this.a=n}function tj(n){this.a=n}function i5n(n){this.a=n}function r5n(n){this.a=n}function Hp(n){this.a=n}function Aq(n){this.a=n}function c5n(n){this.a=n}function u5n(n){this.a=n}function s5n(n){this.a=n}function o5n(n){this.a=n}function f5n(n){this.a=n}function Sq(n){this.a=n}function Pq(n){this.a=n}function Iq(n){this.a=n}function ij(n){this.a=n}function rj(n){this.e=n}function qp(n){this.a=n}function h5n(n){this.a=n}function n2(n){this.a=n}function Oq(n){this.a=n}function l5n(n){this.a=n}function a5n(n){this.a=n}function d5n(n){this.a=n}function b5n(n){this.a=n}function w5n(n){this.a=n}function g5n(n){this.a=n}function p5n(n){this.a=n}function v5n(n){this.a=n}function m5n(n){this.a=n}function k5n(n){this.a=n}function y5n(n){this.a=n}function Dq(n){this.a=n}function j5n(n){this.a=n}function E5n(n){this.a=n}function C5n(n){this.a=n}function T5n(n){this.a=n}function M5n(n){this.a=n}function A5n(n){this.a=n}function S5n(n){this.a=n}function P5n(n){this.a=n}function I5n(n){this.a=n}function O5n(n){this.a=n}function D5n(n){this.a=n}function $5n(n){this.a=n}function F5n(n){this.a=n}function x5n(n){this.a=n}function L5n(n){this.a=n}function N5n(n){this.a=n}function B5n(n){this.a=n}function R5n(n){this.a=n}function _5n(n){this.a=n}function K5n(n){this.a=n}function H5n(n){this.a=n}function q5n(n){this.a=n}function G5n(n){this.a=n}function z5n(n){this.a=n}function U5n(n){this.a=n}function W5n(n){this.a=n}function X5n(n){this.a=n}function V5n(n){this.a=n}function Q5n(n){this.a=n}function J5n(n){this.a=n}function Y5n(n){this.a=n}function Z5n(n){this.a=n}function n6n(n){this.a=n}function e6n(n){this.a=n}function t6n(n){this.a=n}function i6n(n){this.a=n}function r6n(n){this.a=n}function c6n(n){this.c=n}function u6n(n){this.b=n}function s6n(n){this.a=n}function o6n(n){this.a=n}function f6n(n){this.a=n}function h6n(n){this.a=n}function l6n(n){this.a=n}function a6n(n){this.a=n}function d6n(n){this.a=n}function b6n(n){this.a=n}function w6n(n){this.a=n}function g6n(n){this.a=n}function p6n(n){this.a=n}function v6n(n){this.a=n}function m6n(n){this.a=n}function k6n(n){this.a=n}function y6n(n){this.a=n}function j6n(n){this.a=n}function E6n(n){this.a=n}function C6n(n){this.a=n}function T6n(n){this.a=n}function M6n(n){this.a=n}function A6n(n){this.a=n}function S6n(n){this.a=n}function P6n(n){this.a=n}function I6n(n){this.a=n}function X1(n){this.a=n}function e2(n){this.a=n}function O6n(n){this.a=n}function D6n(n){this.a=n}function $6n(n){this.a=n}function F6n(n){this.a=n}function x6n(n){this.a=n}function L6n(n){this.a=n}function N6n(n){this.a=n}function B6n(n){this.a=n}function R6n(n){this.a=n}function _6n(n){this.a=n}function K6n(n){this.a=n}function H6n(n){this.a=n}function q6n(n){this.a=n}function G6n(n){this.a=n}function z6n(n){this.a=n}function U6n(n){this.a=n}function cj(n){this.a=n}function W6n(n){this.a=n}function X6n(n){this.a=n}function V6n(n){this.a=n}function Q6n(n){this.a=n}function J6n(n){this.a=n}function Y6n(n){this.a=n}function Z6n(n){this.a=n}function nmn(n){this.a=n}function emn(n){this.a=n}function tmn(n){this.a=n}function imn(n){this.a=n}function rmn(n){this.a=n}function cmn(n){this.a=n}function umn(n){this.a=n}function smn(n){this.a=n}function omn(n){this.a=n}function fmn(n){this.a=n}function hmn(n){this.a=n}function lmn(n){this.a=n}function amn(n){this.a=n}function dmn(n){this.a=n}function bmn(n){this.a=n}function wmn(n){this.a=n}function gmn(n){this.a=n}function pmn(n){this.a=n}function vmn(n){this.a=n}function mmn(n){this.a=n}function kmn(n){this.a=n}function $q(n){this.a=n}function kt(n){this.b=n}function ymn(n){this.f=n}function Fq(n){this.a=n}function jmn(n){this.a=n}function Emn(n){this.a=n}function Cmn(n){this.a=n}function Tmn(n){this.a=n}function Mmn(n){this.a=n}function Amn(n){this.a=n}function Smn(n){this.a=n}function Pmn(n){this.a=n}function D9(n){this.a=n}function Imn(n){this.a=n}function Omn(n){this.b=n}function xq(n){this.c=n}function uj(n){this.e=n}function Dmn(n){this.a=n}function sj(n){this.a=n}function oj(n){this.a=n}function $I(n){this.a=n}function $mn(n){this.a=n}function Fmn(n){this.d=n}function Lq(n){this.a=n}function Nq(n){this.a=n}function cd(n){this.e=n}function Nte(){this.a=0}function gw(){dyn(this)}function X(){RO(this)}function we(){Eu(this)}function FI(){pTn(this)}function xmn(){}function ud(){this.c=p1n}function Bte(n,e){e.Wb(n)}function Lmn(n,e){n.b+=e}function Nmn(n){n.b=new JI}function T(n){return n.e}function Rte(n){return n.a}function _te(n){return n.a}function Kte(n){return n.a}function Hte(n){return n.a}function qte(n){return n.a}function Gte(){return null}function zte(){return null}function Ute(){EG(),iTe()}function Wte(n){n.b.tf(n.e)}function xv(n,e){n.b=e-n.b}function Lv(n,e){n.a=e-n.a}function Bmn(n,e){e.ad(n.a)}function Xte(n,e){ui(e,n)}function Vte(n,e,t){n.Od(t,e)}function $9(n,e){n.e=e,e.b=n}function Bq(n){Df(),this.a=n}function Rmn(n){Df(),this.a=n}function _mn(n){Df(),this.a=n}function Rq(n){nb(),this.a=n}function Kmn(n){k3(),aR.be(n)}function ia(){Qyn.call(this)}function _q(){Qyn.call(this)}function Kq(){ia.call(this)}function xI(){ia.call(this)}function Hmn(){ia.call(this)}function F9(){ia.call(this)}function fu(){ia.call(this)}function Nv(){ia.call(this)}function ye(){ia.call(this)}function vs(){ia.call(this)}function qmn(){ia.call(this)}function ic(){ia.call(this)}function Gmn(){ia.call(this)}function zmn(){this.a=this}function fj(){this.Bb|=256}function Umn(){this.b=new Xkn}function Hq(){Hq=N,new we}function qq(){Kq.call(this)}function Wmn(n,e){n.length=e}function hj(n,e){W(n.a,e)}function Qte(n,e){nY(n.c,e)}function Jte(n,e){ri(n.b,e)}function Yte(n,e){KT(n.a,e)}function Zte(n,e){MF(n.a,e)}function Gp(n,e){et(n.e,e)}function t2(n){iM(n.c,n.b)}function nie(n,e){n.kc().Nb(e)}function Gq(n){this.a=Yge(n)}function fi(){this.a=new we}function Xmn(){this.a=new we}function lj(){this.a=new X}function LI(){this.a=new X}function zq(){this.a=new X}function Ns(){this.a=new Oln}function ra(){this.a=new TSn}function Uq(){this.a=new LH}function Wq(){this.a=new h7n}function Vmn(){this.a=new YMn}function Xq(){this.a=new bMn}function Vq(){this.a=new Bjn}function Qmn(){this.a=new X}function Qq(){this.a=new X}function Jmn(){this.a=new X}function Ymn(){this.a=new X}function Zmn(){this.d=new X}function n9n(){this.a=new fi}function e9n(){this.a=new we}function t9n(){this.b=new we}function i9n(){this.b=new X}function Jq(){this.e=new X}function r9n(){this.d=new X}function c9n(){this.a=new C4n}function u9n(){X.call(this)}function Yq(){lj.call(this)}function s9n(){kE.call(this)}function o9n(){Qq.call(this)}function NI(){Bv.call(this)}function Bv(){xmn.call(this)}function i2(){xmn.call(this)}function Zq(){i2.call(this)}function f9n(){zTn.call(this)}function h9n(){zTn.call(this)}function l9n(){uG.call(this)}function a9n(){uG.call(this)}function d9n(){uG.call(this)}function b9n(){sG.call(this)}function hu(){Ct.call(this)}function nG(){B2n.call(this)}function eG(){B2n.call(this)}function w9n(){O9n.call(this)}function g9n(){O9n.call(this)}function p9n(){we.call(this)}function v9n(){we.call(this)}function m9n(){we.call(this)}function k9n(){fi.call(this)}function BI(){RIn.call(this)}function y9n(){fj.call(this)}function RI(){Oz.call(this)}function _I(){Oz.call(this)}function tG(){we.call(this)}function KI(){we.call(this)}function j9n(){we.call(this)}function iG(){Yy.call(this)}function E9n(){Yy.call(this)}function C9n(){iG.call(this)}function T9n(){ZH.call(this)}function M9n(n){hIn.call(this,n)}function A9n(n){hIn.call(this,n)}function rG(n){rq.call(this,n)}function cG(n){n7n.call(this,n)}function eie(n){cG.call(this,n)}function tie(n){n7n.call(this,n)}function zp(){this.a=new Ct}function uG(){this.a=new fi}function sG(){this.a=new we}function S9n(){this.a=new X}function P9n(){this.j=new X}function oG(){this.a=new Rgn}function I9n(){this.a=new T8n}function O9n(){this.a=new X2n}function HI(){HI=N,uR=new V9n}function qI(){qI=N,cR=new X9n}function Rv(){Rv=N,rR=new It}function aj(){aj=N,fR=new Xyn}function iie(n){cG.call(this,n)}function rie(n){cG.call(this,n)}function D9n(n){m$.call(this,n)}function $9n(n){m$.call(this,n)}function F9n(n){uEn.call(this,n)}function GI(n){C5e.call(this,n)}function sd(n){_0.call(this,n)}function _v(n){Cj.call(this,n)}function fG(n){Cj.call(this,n)}function x9n(n){Cj.call(this,n)}function _r(n){kCn.call(this,n)}function L9n(n){_r.call(this,n)}function r2(){M9.call(this,{})}function dj(n){c3(),this.a=n}function Kv(n){n.b=null,n.c=0}function cie(n,e){n.e=e,NNn(n,e)}function uie(n,e){n.a=e,h6e(n)}function zI(n,e,t){n.a[e.g]=t}function sie(n,e,t){M4e(t,n,e)}function oie(n,e){$ue(e.i,n.n)}function N9n(n,e){Fwe(n).td(e)}function fie(n,e){return n*n/e}function B9n(n,e){return n.g-e.g}function hie(n){return new nj(n)}function lie(n){return new Z0(n)}function bj(n){_r.call(this,n)}function vr(n){_r.call(this,n)}function R9n(n){_r.call(this,n)}function UI(n){kCn.call(this,n)}function WI(n){AV(),this.a=n}function _9n(n){aEn(),this.a=n}function N0(n){ED(),this.f=n}function XI(n){ED(),this.f=n}function Up(n){_r.call(this,n)}function Hn(n){_r.call(this,n)}function Dr(n){_r.call(this,n)}function K9n(n){_r.call(this,n)}function c2(n){_r.call(this,n)}function on(n){return _n(n),n}function K(n){return _n(n),n}function x9(n){return _n(n),n}function hG(n){return _n(n),n}function aie(n){return _n(n),n}function Hv(n){return n.b==n.c}function B0(n){return!!n&&n.b}function die(n){return!!n&&n.k}function bie(n){return!!n&&n.j}function Ku(n){_n(n),this.a=n}function lG(n){return ja(n),n}function qv(n){EW(n,n.length)}function t1(n){_r.call(this,n)}function Af(n){_r.call(this,n)}function VI(n){_r.call(this,n)}function pw(n){_r.call(this,n)}function Gv(n){_r.call(this,n)}function Ee(n){_r.call(this,n)}function QI(n){Vz.call(this,n,0)}function JI(){iX.call(this,12,3)}function aG(){aG=N,din=new Q1n}function H9n(){H9n=N,ain=new ou}function wj(){wj=N,dm=new H1}function q9n(){q9n=N,vzn=new ww}function G9n(){throw T(new ye)}function dG(){throw T(new ye)}function z9n(){throw T(new ye)}function wie(){throw T(new ye)}function gie(){throw T(new ye)}function pie(){throw T(new ye)}function YI(){this.a=Ce(pe(Ji))}function u2(n){Df(),this.a=pe(n)}function U9n(n,e){n.Td(e),e.Sd(n)}function vie(n,e){n.a.ec().Mc(e)}function mie(n,e,t){n.c.lf(e,t)}function bG(n){vr.call(this,n)}function Sf(n){Hn.call(this,n)}function i1(){A9.call(this,"")}function zv(){A9.call(this,"")}function V1(){A9.call(this,"")}function R0(){A9.call(this,"")}function wG(n){vr.call(this,n)}function Wp(n){_p.call(this,n)}function ZI(n){lE.call(this,n)}function W9n(n){Wp.call(this,n)}function X9n(){AI.call(this,null)}function V9n(){AI.call(this,null)}function gj(){gj=N,k3()}function Q9n(){Q9n=N,Szn=Z4e()}function J9n(n){return n.a?n.b:0}function kie(n){return n.a?n.b:0}function yie(n,e){return n.a-e.a}function jie(n,e){return n.a-e.a}function Eie(n,e){return n.a-e.a}function pj(n,e){return WX(n,e)}function M(n,e){return pMn(n,e)}function Cie(n,e){return e in n.a}function Y9n(n,e){return n.f=e,n}function Tie(n,e){return n.b=e,n}function Z9n(n,e){return n.c=e,n}function Mie(n,e){return n.g=e,n}function gG(n,e){return n.a=e,n}function pG(n,e){return n.f=e,n}function Aie(n,e){return n.k=e,n}function vG(n,e){return n.a=e,n}function Sie(n,e){return n.e=e,n}function mG(n,e){return n.e=e,n}function Pie(n,e){return n.f=e,n}function Iie(n,e){n.b=!0,n.d=e}function Oie(n,e){n.b=new mr(e)}function Die(n,e,t){e.td(n.a[t])}function $ie(n,e,t){e.we(n.a[t])}function Fie(n,e){return n.b-e.b}function xie(n,e){return n.g-e.g}function Lie(n,e){return n.s-e.s}function Nie(n,e){return n?0:e-1}function n8n(n,e){return n?0:e-1}function Bie(n,e){return n?e-1:0}function Rie(n,e){return e.Yf(n)}function od(n,e){return n.b=e,n}function vj(n,e){return n.a=e,n}function fd(n,e){return n.c=e,n}function hd(n,e){return n.d=e,n}function ld(n,e){return n.e=e,n}function kG(n,e){return n.f=e,n}function Uv(n,e){return n.a=e,n}function Xp(n,e){return n.b=e,n}function Vp(n,e){return n.c=e,n}function gn(n,e){return n.c=e,n}function Dn(n,e){return n.b=e,n}function pn(n,e){return n.d=e,n}function vn(n,e){return n.e=e,n}function _ie(n,e){return n.f=e,n}function mn(n,e){return n.g=e,n}function kn(n,e){return n.a=e,n}function yn(n,e){return n.i=e,n}function jn(n,e){return n.j=e,n}function e8n(n,e){return n.k=e,n}function Kie(n,e){return n.j=e,n}function Hie(n,e){yl(),Hr(e,n)}function qie(n,e,t){Nfe(n.a,e,t)}function t8n(n){mTn.call(this,n)}function yG(n){mTn.call(this,n)}function mj(n){uD.call(this,n)}function i8n(n){u2e.call(this,n)}function Q1(n){Ld.call(this,n)}function r8n(n){XD.call(this,n)}function c8n(n){XD.call(this,n)}function u8n(){Mz.call(this,"")}function Li(){this.a=0,this.b=0}function s8n(){this.b=0,this.a=0}function o8n(n,e){n.b=0,hb(n,e)}function Gie(n,e){n.c=e,n.b=!0}function f8n(n,e){return n.c._b(e)}function xo(n){return n.e&&n.e()}function nO(n){return n?n.d:null}function h8n(n,e){return LDn(n.b,e)}function zie(n){return n?n.g:null}function Uie(n){return n?n.i:null}function J1(n){return Ph(n),n.o}function ad(){ad=N,Mne=h4e()}function l8n(){l8n=N,vi=jve()}function Qp(){Qp=N,g1n=a4e()}function a8n(){a8n=N,hee=l4e()}function jG(){jG=N,oc=s6e()}function EG(){EG=N,Wl=N3()}function d8n(){throw T(new ye)}function b8n(){throw T(new ye)}function w8n(){throw T(new ye)}function g8n(){throw T(new ye)}function p8n(){throw T(new ye)}function v8n(){throw T(new ye)}function kj(n){this.a=new s2(n)}function CG(n){d_n(),gTe(this,n)}function Y1(n){this.a=new AD(n)}function vw(n,e){for(;n.ye(e););}function TG(n,e){for(;n.sd(e););}function mw(n,e){return n.a+=e,n}function eO(n,e){return n.a+=e,n}function r1(n,e){return n.a+=e,n}function dd(n,e){return n.a+=e,n}function Wv(n){return fl(n),n.a}function yj(n){return n.b!=n.d.c}function m8n(n){return n.l|n.m<<22}function MG(n,e){return n.d[e.p]}function k8n(n,e){return Q8e(n,e)}function AG(n,e,t){n.splice(e,t)}function y8n(n){n.c?rBn(n):cBn(n)}function jj(n){this.a=0,this.b=n}function j8n(){this.a=new B7(Pon)}function E8n(){this.b=new B7(won)}function C8n(){this.b=new B7(OK)}function T8n(){this.b=new B7(OK)}function M8n(){throw T(new ye)}function A8n(){throw T(new ye)}function S8n(){throw T(new ye)}function P8n(){throw T(new ye)}function I8n(){throw T(new ye)}function O8n(){throw T(new ye)}function D8n(){throw T(new ye)}function $8n(){throw T(new ye)}function F8n(){throw T(new ye)}function x8n(){throw T(new ye)}function Wie(){throw T(new ic)}function Xie(){throw T(new ic)}function L9(n){this.a=new L8n(n)}function L8n(n){cbe(this,n,cve())}function N9(n){return!n||iTn(n)}function B9(n){return Tf[n]!=-1}function Vie(){_A!=0&&(_A=0),KA=-1}function N8n(){iR==null&&(iR=[])}function Qie(n,e){$x(R(n.a),e)}function Jie(n,e){$x(R(n.a),e)}function R9(n,e){Sw.call(this,n,e)}function Jp(n,e){R9.call(this,n,e)}function SG(n,e){this.b=n,this.c=e}function B8n(n,e){this.b=n,this.a=e}function R8n(n,e){this.a=n,this.b=e}function _8n(n,e){this.a=n,this.b=e}function K8n(n,e){this.a=n,this.b=e}function H8n(n,e){this.a=n,this.b=e}function q8n(n,e){this.a=n,this.b=e}function G8n(n,e){this.a=n,this.b=e}function z8n(n,e){this.a=n,this.b=e}function U8n(n,e){this.a=n,this.b=e}function W8n(n,e){this.b=n,this.a=e}function X8n(n,e){this.b=n,this.a=e}function V8n(n,e){this.b=n,this.a=e}function Q8n(n,e){this.b=n,this.a=e}function Oe(n,e){this.f=n,this.g=e}function Yp(n,e){this.e=n,this.d=e}function bd(n,e){this.g=n,this.i=e}function tO(n,e){this.a=n,this.b=e}function J8n(n,e){this.a=n,this.f=e}function Y8n(n,e){this.b=n,this.c=e}function Yie(n,e){this.a=n,this.b=e}function Z8n(n,e){this.a=n,this.b=e}function iO(n,e){this.a=n,this.b=e}function n7n(n){Bz(n.dc()),this.c=n}function Ej(n){this.b=u(pe(n),83)}function e7n(n){this.a=u(pe(n),83)}function _0(n){this.a=u(pe(n),15)}function t7n(n){this.a=u(pe(n),15)}function Cj(n){this.b=u(pe(n),47)}function Tj(){this.q=new j.Date}function Zf(){Zf=N,Sin=new tln}function Zp(){Zp=N,X4=new nln}function Xv(n){return n.f.c+n.g.c}function _9(n,e){return n.b.Hc(e)}function i7n(n,e){return n.b.Ic(e)}function r7n(n,e){return n.b.Qc(e)}function c7n(n,e){return n.b.Hc(e)}function u7n(n,e){return n.c.uc(e)}function Ah(n,e){return n.a._b(e)}function s7n(n,e){return tt(n.c,e)}function o7n(n,e){return zu(n.b,e)}function f7n(n,e){return n>e&&e0}function cO(n,e){return fc(n,e)<0}function n5(n,e){return n.a.get(e)}function lre(n,e){return e.split(n)}function S7n(n,e){return zu(n.e,e)}function LG(n){return _n(n),!1}function xj(n){xn.call(this,n,21)}function are(n,e){cMn.call(this,n,e)}function Lj(n,e){Oe.call(this,n,e)}function uO(n,e){Oe.call(this,n,e)}function NG(n){_D(),uEn.call(this,n)}function BG(n,e){fCn(n,n.length,e)}function z9(n,e){BCn(n,n.length,e)}function dre(n,e,t){e.ud(n.a.Ge(t))}function bre(n,e,t){e.we(n.a.Fe(t))}function wre(n,e,t){e.td(n.a.Kb(t))}function gre(n,e,t){n.Mb(t)&&e.td(t)}function e5(n,e,t){n.splice(e,0,t)}function pre(n,e){return au(n.e,e)}function Nj(n,e){this.d=n,this.e=e}function P7n(n,e){this.b=n,this.a=e}function I7n(n,e){this.b=n,this.a=e}function RG(n,e){this.b=n,this.a=e}function O7n(n,e){this.a=n,this.b=e}function D7n(n,e){this.a=n,this.b=e}function $7n(n,e){this.a=n,this.b=e}function F7n(n,e){this.a=n,this.b=e}function f2(n,e){this.a=n,this.b=e}function _G(n,e){this.b=n,this.a=e}function KG(n,e){this.b=n,this.a=e}function Bj(n,e){Oe.call(this,n,e)}function Rj(n,e){Oe.call(this,n,e)}function HG(n,e){Oe.call(this,n,e)}function qG(n,e){Oe.call(this,n,e)}function kw(n,e){Oe.call(this,n,e)}function sO(n,e){Oe.call(this,n,e)}function oO(n,e){Oe.call(this,n,e)}function fO(n,e){Oe.call(this,n,e)}function _j(n,e){Oe.call(this,n,e)}function GG(n,e){Oe.call(this,n,e)}function hO(n,e){Oe.call(this,n,e)}function U9(n,e){Oe.call(this,n,e)}function Kj(n,e){Oe.call(this,n,e)}function lO(n,e){Oe.call(this,n,e)}function t5(n,e){Oe.call(this,n,e)}function zG(n,e){Oe.call(this,n,e)}function zt(n,e){Oe.call(this,n,e)}function Hj(n,e){Oe.call(this,n,e)}function x7n(n,e){this.a=n,this.b=e}function L7n(n,e){this.a=n,this.b=e}function N7n(n,e){this.a=n,this.b=e}function B7n(n,e){this.a=n,this.b=e}function R7n(n,e){this.a=n,this.b=e}function _7n(n,e){this.a=n,this.b=e}function K7n(n,e){this.a=n,this.b=e}function H7n(n,e){this.a=n,this.b=e}function q7n(n,e){this.a=n,this.b=e}function UG(n,e){this.b=n,this.a=e}function G7n(n,e){this.b=n,this.a=e}function z7n(n,e){this.b=n,this.a=e}function U7n(n,e){this.b=n,this.a=e}function t3(n,e){this.c=n,this.d=e}function W7n(n,e){this.e=n,this.d=e}function X7n(n,e){this.a=n,this.b=e}function V7n(n,e){this.b=e,this.c=n}function qj(n,e){Oe.call(this,n,e)}function W9(n,e){Oe.call(this,n,e)}function aO(n,e){Oe.call(this,n,e)}function i5(n,e){Oe.call(this,n,e)}function WG(n,e){Oe.call(this,n,e)}function dO(n,e){Oe.call(this,n,e)}function bO(n,e){Oe.call(this,n,e)}function X9(n,e){Oe.call(this,n,e)}function XG(n,e){Oe.call(this,n,e)}function wO(n,e){Oe.call(this,n,e)}function r5(n,e){Oe.call(this,n,e)}function VG(n,e){Oe.call(this,n,e)}function c5(n,e){Oe.call(this,n,e)}function u5(n,e){Oe.call(this,n,e)}function H0(n,e){Oe.call(this,n,e)}function gO(n,e){Oe.call(this,n,e)}function pO(n,e){Oe.call(this,n,e)}function QG(n,e){Oe.call(this,n,e)}function s5(n,e){Oe.call(this,n,e)}function vO(n,e){Oe.call(this,n,e)}function Gj(n,e){Oe.call(this,n,e)}function V9(n,e){Oe.call(this,n,e)}function Q9(n,e){Oe.call(this,n,e)}function h2(n,e){Oe.call(this,n,e)}function mO(n,e){Oe.call(this,n,e)}function JG(n,e){Oe.call(this,n,e)}function kO(n,e){Oe.call(this,n,e)}function yO(n,e){Oe.call(this,n,e)}function YG(n,e){Oe.call(this,n,e)}function jO(n,e){Oe.call(this,n,e)}function EO(n,e){Oe.call(this,n,e)}function CO(n,e){Oe.call(this,n,e)}function TO(n,e){Oe.call(this,n,e)}function ZG(n,e){Oe.call(this,n,e)}function Q7n(n,e){this.b=n,this.a=e}function J7n(n,e){this.a=n,this.b=e}function Y7n(n,e){this.a=n,this.b=e}function Z7n(n,e){this.a=n,this.b=e}function nkn(n,e){this.a=n,this.b=e}function nz(n,e){Oe.call(this,n,e)}function ez(n,e){Oe.call(this,n,e)}function ekn(n,e){this.b=n,this.d=e}function tz(n,e){Oe.call(this,n,e)}function iz(n,e){Oe.call(this,n,e)}function tkn(n,e){this.a=n,this.b=e}function ikn(n,e){this.a=n,this.b=e}function zj(n,e){Oe.call(this,n,e)}function o5(n,e){Oe.call(this,n,e)}function rz(n,e){Oe.call(this,n,e)}function cz(n,e){Oe.call(this,n,e)}function uz(n,e){Oe.call(this,n,e)}function MO(n,e){Oe.call(this,n,e)}function sz(n,e){Oe.call(this,n,e)}function AO(n,e){Oe.call(this,n,e)}function Uj(n,e){Oe.call(this,n,e)}function SO(n,e){Oe.call(this,n,e)}function PO(n,e){Oe.call(this,n,e)}function J9(n,e){Oe.call(this,n,e)}function IO(n,e){Oe.call(this,n,e)}function oz(n,e){Oe.call(this,n,e)}function Y9(n,e){Oe.call(this,n,e)}function fz(n,e){Oe.call(this,n,e)}function vre(n,e){return au(n.c,e)}function mre(n,e){return au(e.b,n)}function kre(n,e){return-n.b.Je(e)}function hz(n,e){return au(n.g,e)}function Z9(n,e){Oe.call(this,n,e)}function l2(n,e){Oe.call(this,n,e)}function rkn(n,e){this.a=n,this.b=e}function ckn(n,e){this.a=n,this.b=e}function fn(n,e){this.a=n,this.b=e}function f5(n,e){Oe.call(this,n,e)}function h5(n,e){Oe.call(this,n,e)}function n8(n,e){Oe.call(this,n,e)}function OO(n,e){Oe.call(this,n,e)}function Wj(n,e){Oe.call(this,n,e)}function l5(n,e){Oe.call(this,n,e)}function DO(n,e){Oe.call(this,n,e)}function Xj(n,e){Oe.call(this,n,e)}function yw(n,e){Oe.call(this,n,e)}function e8(n,e){Oe.call(this,n,e)}function a5(n,e){Oe.call(this,n,e)}function d5(n,e){Oe.call(this,n,e)}function t8(n,e){Oe.call(this,n,e)}function Vj(n,e){Oe.call(this,n,e)}function jw(n,e){Oe.call(this,n,e)}function Qj(n,e){Oe.call(this,n,e)}function ukn(n,e){this.a=n,this.b=e}function skn(n,e){this.a=n,this.b=e}function okn(n,e){this.a=n,this.b=e}function fkn(n,e){this.a=n,this.b=e}function hkn(n,e){this.a=n,this.b=e}function lkn(n,e){this.a=n,this.b=e}function Pi(n,e){this.a=n,this.b=e}function Jj(n,e){Oe.call(this,n,e)}function akn(n,e){this.a=n,this.b=e}function dkn(n,e){this.a=n,this.b=e}function bkn(n,e){this.a=n,this.b=e}function wkn(n,e){this.a=n,this.b=e}function gkn(n,e){this.a=n,this.b=e}function pkn(n,e){this.a=n,this.b=e}function vkn(n,e){this.b=n,this.a=e}function mkn(n,e){this.b=n,this.a=e}function kkn(n,e){this.b=n,this.a=e}function ykn(n,e){this.b=n,this.a=e}function jkn(n,e){this.a=n,this.b=e}function Ekn(n,e){this.a=n,this.b=e}function yre(n,e){J9e(n.a,u(e,56))}function Ckn(n,e){f0e(n.a,u(e,11))}function jre(n,e){return h3(),e!=n}function Tkn(){return Q9n(),new Szn}function Mkn(){c$(),this.b=new fi}function Akn(){hM(),this.a=new fi}function Skn(){tX(),lW.call(this)}function a2(n,e){Oe.call(this,n,e)}function Pkn(n,e){this.a=n,this.b=e}function Ikn(n,e){this.a=n,this.b=e}function Yj(n,e){this.a=n,this.b=e}function Okn(n,e){this.a=n,this.b=e}function Dkn(n,e){this.a=n,this.b=e}function $kn(n,e){this.a=n,this.b=e}function Fkn(n,e){this.d=n,this.b=e}function lz(n,e){this.d=n,this.e=e}function xkn(n,e){this.f=n,this.c=e}function i8(n,e){this.b=n,this.c=e}function az(n,e){this.i=n,this.g=e}function Lkn(n,e){this.e=n,this.a=e}function Nkn(n,e){this.a=n,this.b=e}function dz(n,e){n.i=null,nT(n,e)}function Ere(n,e){n&&it($y,n,e)}function Bkn(n,e){return NF(n.a,e)}function Zj(n){return g7(n.c,n.b)}function Vr(n){return n?n.dd():null}function B(n){return n??null}function q0(n){return typeof n===X2}function G0(n){return typeof n===UZ}function mi(n){return typeof n===EL}function el(n,e){return n.Hd().Xb(e)}function nE(n,e){return Rbe(n.Kc(),e)}function gd(n,e){return fc(n,e)==0}function Cre(n,e){return fc(n,e)>=0}function b5(n,e){return fc(n,e)!=0}function Tre(n){return""+(_n(n),n)}function r8(n,e){return n.substr(e)}function Rkn(n){return $u(n),n.d.gc()}function $O(n){return yme(n,n.c),n}function eE(n){return A5(n==null),n}function w5(n,e){return n.a+=""+e,n}function dr(n,e){return n.a+=""+e,n}function g5(n,e){return n.a+=""+e,n}function rc(n,e){return n.a+=""+e,n}function De(n,e){return n.a+=""+e,n}function bz(n,e){return n.a+=""+e,n}function _kn(n,e){Kt(n,e,n.a,n.a.a)}function ua(n,e){Kt(n,e,n.c.b,n.c)}function Mre(n,e,t){VFn(e,Mx(n,t))}function Are(n,e,t){VFn(e,Mx(n,t))}function Sre(n,e){k0e(new ie(n),e)}function Kkn(n,e){n.q.setTime($d(e))}function Hkn(n,e){kW.call(this,n,e)}function qkn(n,e){kW.call(this,n,e)}function FO(n,e){kW.call(this,n,e)}function Gkn(n){Eu(this),Z5(this,n)}function wz(n){return Ln(n,0),null}function Lo(n){return n.a=0,n.b=0,n}function zkn(n,e){return n.a=e.g+1,n}function Pre(n,e){return n.j[e.p]==2}function gz(n){return lhe(u(n,79))}function Ukn(){Ukn=N,jUn=Fe(qF())}function Wkn(){Wkn=N,RWn=Fe(PNn())}function Xkn(){this.b=new s2(sb(12))}function Vkn(){this.b=0,this.a=!1}function Qkn(){this.b=0,this.a=!1}function p5(n){this.a=n,TI.call(this)}function Jkn(n){this.a=n,TI.call(this)}function In(n,e){ii.call(this,n,e)}function xO(n,e){V0.call(this,n,e)}function Ew(n,e){az.call(this,n,e)}function LO(n,e){H3.call(this,n,e)}function Ykn(n,e){c8.call(this,n,e)}function He(n,e){$j(),it(eI,n,e)}function NO(n,e){return Yu(n.a,0,e)}function Zkn(n,e){return n.a.a.a.cc(e)}function nyn(n,e){return B(n)===B(e)}function Ire(n,e){return Zt(n.a,e.a)}function Ore(n,e){return Uc(n.a,e.a)}function Dre(n,e){return xCn(n.a,e.a)}function Pf(n,e){return n.indexOf(e)}function pd(n,e){return n==e?0:n?1:-1}function tE(n){return n<10?"0"+n:""+n}function $re(n){return pe(n),new p5(n)}function eyn(n){return Bc(n.l,n.m,n.h)}function i3(n){return Gt((_n(n),n))}function Fre(n){return Gt((_n(n),n))}function tyn(n,e){return Uc(n.g,e.g)}function $r(n){return typeof n===UZ}function xre(n){return n==b0||n==Hb}function Lre(n){return n==b0||n==Kb}function pz(n){return Fr(n.b.b,n,0)}function iyn(n){this.a=Tkn(),this.b=n}function ryn(n){this.a=Tkn(),this.b=n}function Nre(n,e){return W(n.a,e),e}function Bre(n,e){return W(n.c,e),n}function cyn(n,e){return rs(n.a,e),n}function Rre(n,e){return wo(),e.a+=n}function _re(n,e){return wo(),e.a+=n}function Kre(n,e){return wo(),e.c+=n}function vz(n,e){S3(n,0,n.length,e)}function Sh(){Tq.call(this,new ba)}function uyn(){xE.call(this,0,0,0,0)}function d2(){ys.call(this,0,0,0,0)}function mr(n){this.a=n.a,this.b=n.b}function tl(n){return n==Zs||n==Ao}function r3(n){return n==Yh||n==Jh}function syn(n){return n==xg||n==Fg}function Cw(n){return n!=jf&&n!=ql}function Hu(n){return n.Lg()&&n.Mg()}function oyn(n){return JE(u(n,118))}function iE(n){return rs(new hi,n)}function fyn(n,e){return new H3(e,n)}function Hre(n,e){return new H3(e,n)}function mz(n,e,t){UC(n,e),WC(n,t)}function rE(n,e,t){Rd(n,e),Bd(n,t)}function Jo(n,e,t){Zc(n,e),nu(n,t)}function cE(n,e,t){D3(n,e),F3(n,t)}function uE(n,e,t){$3(n,e),x3(n,t)}function BO(n,e){X3(n,e),L3(n,n.D)}function kz(n){xkn.call(this,n,!0)}function hyn(n,e,t){fU.call(this,n,e,t)}function il(n){jl(),qbe.call(this,n)}function lyn(){Lj.call(this,"Head",1)}function ayn(){Lj.call(this,"Tail",3)}function RO(n){n.c=F(Zn,rn,1,0,5,1)}function dyn(n){n.a=F(Zn,rn,1,8,5,1)}function byn(n){Yc(n.xf(),new t5n(n))}function Tw(n){return n!=null?mt(n):0}function qre(n,e){return ob(e,nf(n))}function Gre(n,e){return ob(e,nf(n))}function zre(n,e){return n[n.length]=e}function Ure(n,e){return n[n.length]=e}function yz(n){return zoe(n.b.Kc(),n.a)}function Wre(n,e){return ZC(BD(n.d),e)}function Xre(n,e){return ZC(BD(n.g),e)}function Vre(n,e){return ZC(BD(n.j),e)}function tr(n,e){ii.call(this,n.b,e)}function vd(n){xE.call(this,n,n,n,n)}function jz(n){return n.b&&uL(n),n.a}function Ez(n){return n.b&&uL(n),n.c}function Qre(n,e){pf||(n.b=e)}function _O(n,e,t){return Mt(n,e,t),t}function wyn(n,e,t){Mt(n.c[e.g],e.g,t)}function Jre(n,e,t){u(n.c,69).Xh(e,t)}function Yre(n,e,t){Jo(t,t.i+n,t.j+e)}function Zre(n,e){me(bc(n.a),PMn(e))}function nce(n,e){me(Ou(n.a),IMn(e))}function v5(n){Je(),cd.call(this,n)}function ece(n){return n==null?0:mt(n)}function gyn(){gyn=N,hK=new f6(cH)}function je(){je=N,new pyn,new X}function pyn(){new we,new we,new we}function Cz(){Cz=N,Hq(),bin=new we}function Yo(){Yo=N,j.Math.log(2)}function ms(){ms=N,Eh=(E7n(),Dne)}function tce(){throw T(new t1(izn))}function ice(){throw T(new t1(izn))}function rce(){throw T(new t1(rzn))}function cce(){throw T(new t1(rzn))}function vyn(n){this.a=n,HU.call(this,n)}function KO(n){this.a=n,Ej.call(this,n)}function HO(n){this.a=n,Ej.call(this,n)}function bi(n,e){mD(n.c,n.c.length,e)}function Kr(n){return n.ae?1:0}function kyn(n,e){return fc(n,e)>0?n:e}function Bc(n,e,t){return{l:n,m:e,h:t}}function uce(n,e){n.a!=null&&Ckn(e,n.a)}function yyn(n){n.a=new aI,n.c=new aI}function sE(n){this.b=n,this.a=new X}function jyn(n){this.b=new san,this.a=n}function Mz(n){vU.call(this),this.a=n}function Eyn(){Lj.call(this,"Range",2)}function Cyn(){kJ(),this.a=new B7(Hrn)}function sce(n,e){pe(e),Iw(n).Jc(new ps)}function oce(n,e){return Zu(),e.n.b+=n}function fce(n,e,t){return it(n.g,t,e)}function hce(n,e,t){return it(n.k,t,e)}function lce(n,e){return it(n.a,e.a,e)}function Mw(n,e,t){return _Q(e,t,n.c)}function Az(n){return new fn(n.c,n.d)}function ace(n){return new fn(n.c,n.d)}function Qr(n){return new fn(n.a,n.b)}function Tyn(n,e){return xEe(n.a,e,null)}function dce(n){Hi(n,null),Ei(n,null)}function Myn(n){s$(n,null),o$(n,null)}function Ayn(){c8.call(this,null,null)}function Syn(){wE.call(this,null,null)}function Sz(n){this.a=n,we.call(this)}function bce(n){this.b=(Pn(),new DI(n))}function oE(n){n.j=F(Ain,q,310,0,0,1)}function wce(n,e,t){n.c.Vc(e,u(t,133))}function gce(n,e,t){n.c.ji(e,u(t,133))}function Pyn(n,e){de(n),n.Gc(u(e,15))}function m5(n,e){return Jje(n.c,n.b,e)}function pce(n,e){return new Jyn(n.Kc(),e)}function qO(n,e){return gwe(n.Kc(),e)!=-1}function Pz(n,e){return n.a.Bc(e)!=null}function fE(n){return n.Ob()?n.Pb():null}function Iyn(n){return Hs(n,0,n.length)}function I(n,e){return n!=null&&WF(n,e)}function vce(n,e){n.q.setHours(e),S6(n,e)}function Oyn(n,e){n.c&&(ZU(e),iMn(e))}function mce(n,e,t){u(n.Kb(t),164).Nb(e)}function kce(n,e,t){return SEe(n,e,t),t}function Dyn(n,e,t){n.a=e^1502,n.b=t^tN}function GO(n,e,t){return n.a[e.g][t.g]}function Zo(n,e){return n.a[e.c.p][e.p]}function yce(n,e){return n.e[e.c.p][e.p]}function jce(n,e){return n.c[e.c.p][e.p]}function Ece(n,e){return n.j[e.p]=D9e(e)}function Cce(n,e){return DX(n.f,e.tg())}function Tce(n,e){return DX(n.b,e.tg())}function Mce(n,e){return n.a0?e*e/n:e*e*100}function Jce(n,e){return n>0?e/(n*n):e*100}function Yce(n,e,t){return W(e,e$n(n,t))}function Zce(n,e,t){DC(),n.Xe(e)&&t.td(n)}function s3(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function U0(n,e,t){return n.a+=e,n.b+=t,n}function nue(n,e,t){return n.a*=e,n.b*=t,n}function o8(n,e,t){return n.a-=e,n.b-=t,n}function Zz(n,e){return n.a=e.a,n.b=e.b,n}function vE(n){return n.a=-n.a,n.b=-n.b,n}function fjn(n){this.c=n,this.a=1,this.b=1}function hjn(n){this.c=n,Zc(n,0),nu(n,0)}function ljn(n){Ct.call(this),V5(this,n)}function ajn(n){yL(),Nmn(this),this.mf(n)}function djn(n,e){Zv(),c8.call(this,n,e)}function nU(n,e){c1(),wE.call(this,n,e)}function bjn(n,e){c1(),wE.call(this,n,e)}function wjn(n,e){c1(),nU.call(this,n,e)}function qu(n,e,t){Wu.call(this,n,e,t,2)}function JO(n,e){ms(),FE.call(this,n,e)}function gjn(n,e){ms(),JO.call(this,n,e)}function eU(n,e){ms(),JO.call(this,n,e)}function pjn(n,e){ms(),eU.call(this,n,e)}function tU(n,e){ms(),FE.call(this,n,e)}function vjn(n,e){ms(),tU.call(this,n,e)}function mjn(n,e){ms(),FE.call(this,n,e)}function eue(n,e){return n.c.Fc(u(e,133))}function iU(n,e,t){return jM(G8(n,e),t)}function tue(n,e,t){return e.Qk(n.e,n.c,t)}function iue(n,e,t){return e.Rk(n.e,n.c,t)}function YO(n,e){return pl(n.e,u(e,49))}function rue(n,e,t){s6(Ou(n.a),e,IMn(t))}function cue(n,e,t){s6(bc(n.a),e,PMn(t))}function rU(n,e){e.$modCount=n.$modCount}function C5(){C5=N,Xm=new kt("root")}function o3(){o3=N,xy=new w9n,new g9n}function kjn(){this.a=new Od,this.b=new Od}function cU(){RIn.call(this),this.Bb|=Yi}function yjn(){Oe.call(this,"GROW_TREE",0)}function uue(n){return n==null?null:CCe(n)}function sue(n){return n==null?null:D5e(n)}function oue(n){return n==null?null:Lr(n)}function fue(n){return n==null?null:Lr(n)}function Ph(n){n.o==null&&u9e(n)}function sn(n){return A5(n==null||q0(n)),n}function Y(n){return A5(n==null||G0(n)),n}function Ce(n){return A5(n==null||mi(n)),n}function uU(n){this.q=new j.Date($d(n))}function f8(n,e){this.c=n,Yp.call(this,n,e)}function mE(n,e){this.a=n,f8.call(this,n,e)}function hue(n,e){this.d=n,Ovn(this),this.b=e}function sU(n,e){P$.call(this,n),this.a=e}function oU(n,e){P$.call(this,n),this.a=e}function lue(n){xQ.call(this,0,0),this.f=n}function fU(n,e,t){IC.call(this,n,e,t,null)}function jjn(n,e,t){IC.call(this,n,e,t,null)}function aue(n,e,t){return n.ue(e,t)<=0?t:e}function due(n,e,t){return n.ue(e,t)<=0?e:t}function bue(n,e){return u(xd(n.b,e),149)}function wue(n,e){return u(xd(n.c,e),229)}function ZO(n){return u(un(n.a,n.b),287)}function Ejn(n){return new fn(n.c,n.d+n.a)}function Cjn(n){return Zu(),syn(u(n,197))}function W0(){W0=N,prn=Cn((Vu(),id))}function gue(n,e){e.a?e7e(n,e):zO(n.a,e.b)}function Tjn(n,e){pf||W(n.a,e)}function pue(n,e){return H9(),K3(e.d.i,n)}function vue(n,e){return x2(),new ABn(e,n)}function Of(n,e){return T8(e,ann),n.f=e,n}function hU(n,e,t){return t=ss(n,e,3,t),t}function lU(n,e,t){return t=ss(n,e,6,t),t}function aU(n,e,t){return t=ss(n,e,9,t),t}function h8(n,e,t){++n.j,n.Ki(),A$(n,e,t)}function Mjn(n,e,t){++n.j,n.Hi(e,n.oi(e,t))}function Ajn(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function Sjn(n,e,t){return MZ(n.c,n.b,e,t)}function dU(n,e){return(e&nt)%n.d.length}function ii(n,e){kt.call(this,n),this.a=e}function bU(n,e){xq.call(this,n),this.a=e}function nD(n,e){xq.call(this,n),this.a=e}function Pjn(n,e){this.c=n,Ld.call(this,e)}function Ijn(n,e){this.a=n,Omn.call(this,e)}function l8(n,e){this.a=n,Omn.call(this,e)}function Ojn(n){this.a=(is(n,Pb),new Pc(n))}function Djn(n){this.a=(is(n,Pb),new Pc(n))}function a8(n){return!n.a&&(n.a=new Rr),n.a}function $jn(n){return n>8?0:n+1}function mue(n,e){return qn(),n==e?0:n?1:-1}function wU(n,e,t){return m2(n,u(e,22),t)}function kue(n,e,t){return n.apply(e,t)}function Fjn(n,e,t){return n.a+=Hs(e,0,t),n}function gU(n,e){var t;return t=n.e,n.e=e,t}function yue(n,e){var t;t=n[eN],t.call(n,e)}function jue(n,e){var t;t=n[eN],t.call(n,e)}function X0(n,e){n.a.Vc(n.b,e),++n.b,n.c=-1}function xjn(n){Eu(n.e),n.d.b=n.d,n.d.a=n.d}function d8(n){n.b?d8(n.b):n.f.c.zc(n.e,n.d)}function Eue(n,e,t){ca(),Svn(n,e.Ce(n.a,t))}function Cue(n,e){return nO(p$n(n.a,e,!0))}function Tue(n,e){return nO(v$n(n.a,e,!0))}function bo(n,e){return pj(new Array(e),n)}function eD(n){return String.fromCharCode(n)}function Mue(n){return n==null?null:n.message}function Ljn(){this.a=new X,this.b=new X}function Njn(){this.a=new LH,this.b=new Umn}function Bjn(){this.b=new Li,this.c=new X}function pU(){this.d=new Li,this.e=new Li}function vU(){this.n=new Li,this.o=new Li}function kE(){this.n=new i2,this.i=new d2}function Rjn(){this.a=new v4n,this.b=new cwn}function _jn(){this.a=new X,this.d=new X}function Kjn(){this.b=new fi,this.a=new fi}function Hjn(){this.b=new we,this.a=new we}function qjn(){this.b=new E8n,this.a=new sgn}function Gjn(){kE.call(this),this.a=new Li}function T5(n){Jbe.call(this,n,(FC(),vR))}function mU(n,e,t,i){xE.call(this,n,e,t,i)}function Aue(n,e,t){t!=null&&JC(e,rx(n,t))}function Sue(n,e,t){t!=null&&YC(e,rx(n,t))}function kU(n,e,t){return t=ss(n,e,11,t),t}function st(n,e){return n.a+=e.a,n.b+=e.b,n}function ki(n,e){return n.a-=e.a,n.b-=e.b,n}function Pue(n,e){return n.n.a=(_n(e),e+10)}function Iue(n,e){return n.n.a=(_n(e),e+10)}function Oue(n,e){return e==n||o4(sM(e),n)}function zjn(n,e){return it(n.a,e,"")==null}function Due(n,e){return H9(),!K3(e.d.i,n)}function $ue(n,e){tl(n.f)?Qme(n,e):Fve(n,e)}function Fue(n,e){var t;return t=e.Hh(n.a),t}function V0(n,e){vr.call(this,rm+n+Ra+e)}function g2(n,e,t,i){V.call(this,n,e,t,i)}function yU(n,e,t,i){V.call(this,n,e,t,i)}function Ujn(n,e,t,i){yU.call(this,n,e,t,i)}function Wjn(n,e,t,i){zE.call(this,n,e,t,i)}function tD(n,e,t,i){zE.call(this,n,e,t,i)}function jU(n,e,t,i){zE.call(this,n,e,t,i)}function Xjn(n,e,t,i){tD.call(this,n,e,t,i)}function EU(n,e,t,i){tD.call(this,n,e,t,i)}function Fn(n,e,t,i){jU.call(this,n,e,t,i)}function Vjn(n,e,t,i){EU.call(this,n,e,t,i)}function Qjn(n,e,t,i){yW.call(this,n,e,t,i)}function Jjn(n,e,t){this.a=n,Vz.call(this,e,t)}function Yjn(n,e,t){this.c=e,this.b=t,this.a=n}function xue(n,e,t){return n.d=u(e.Kb(t),164)}function CU(n,e){return n.Aj().Nh().Kh(n,e)}function TU(n,e){return n.Aj().Nh().Ih(n,e)}function Zjn(n,e){return _n(n),B(n)===B(e)}function An(n,e){return _n(n),B(n)===B(e)}function iD(n,e){return nO(p$n(n.a,e,!1))}function rD(n,e){return nO(v$n(n.a,e,!1))}function Lue(n,e){return n.b.sd(new D7n(n,e))}function Nue(n,e){return n.b.sd(new $7n(n,e))}function nEn(n,e){return n.b.sd(new F7n(n,e))}function MU(n,e,t){return n.lastIndexOf(e,t)}function Bue(n,e,t){return Zt(n[e.b],n[t.b])}function Rue(n,e){return H(e,(nn(),Jk),n)}function _ue(n,e){return Uc(e.a.d.p,n.a.d.p)}function Kue(n,e){return Uc(n.a.d.p,e.a.d.p)}function Hue(n,e){return Zt(n.c-n.s,e.c-e.s)}function eEn(n){return n.c?Fr(n.c.a,n,0):-1}function que(n){return n<100?null:new Q1(n)}function p2(n){return n==td||n==jh||n==Ac}function tEn(n,e){return I(e,15)&&oBn(n.c,e)}function Gue(n,e){pf||e&&(n.d=e)}function cD(n,e){var t;return t=e,!!VV(n,t)}function AU(n,e){this.c=n,DD.call(this,n,e)}function iEn(n){this.c=n,FO.call(this,IM,0)}function rEn(n,e){Voe.call(this,n,n.length,e)}function zue(n,e,t){return u(n.c,69).lk(e,t)}function yE(n,e,t){return u(n.c,69).mk(e,t)}function Uue(n,e,t){return tue(n,u(e,332),t)}function SU(n,e,t){return iue(n,u(e,332),t)}function Wue(n,e,t){return txn(n,u(e,332),t)}function cEn(n,e,t){return zve(n,u(e,332),t)}function M5(n,e){return e==null?null:ab(n.b,e)}function PU(n){return G0(n)?(_n(n),n):n.ke()}function jE(n){return!isNaN(n)&&!isFinite(n)}function uEn(n){Df(),this.a=(Pn(),new Wp(n))}function b8(n){h3(),this.d=n,this.a=new gw}function ks(n,e,t){this.a=n,this.b=e,this.c=t}function sEn(n,e,t){this.a=n,this.b=e,this.c=t}function oEn(n,e,t){this.d=n,this.b=t,this.a=e}function uD(n){yyn(this),_s(this),Vi(this,n)}function du(n){RO(this),GU(this.c,0,n.Pc())}function fEn(n){Uu(n.a),uPn(n.c,n.b),n.b=null}function hEn(n){this.a=n,Zf(),eu(Date.now())}function lEn(){lEn=N,Xin=new ou,XA=new ou}function sD(){sD=N,Rin=new iln,Pzn=new rln}function aEn(){aEn=N,Nne=F(Zn,rn,1,0,5,1)}function dEn(){dEn=N,eee=F(Zn,rn,1,0,5,1)}function IU(){IU=N,tee=F(Zn,rn,1,0,5,1)}function Df(){Df=N,new Bq((Pn(),Pn(),cr))}function Xue(n){return FC(),$e((pPn(),Dzn),n)}function Vue(n){return hf(),$e((LSn(),Bzn),n)}function Que(n){return $T(),$e((qAn(),Gzn),n)}function Jue(n){return RC(),$e((GAn(),zzn),n)}function Yue(n){return dM(),$e((IOn(),Uzn),n)}function Zue(n){return _o(),$e(($Sn(),Vzn),n)}function nse(n){return Cu(),$e((FSn(),Jzn),n)}function ese(n){return Jc(),$e((xSn(),Zzn),n)}function tse(n){return SM(),$e((Ukn(),jUn),n)}function ise(n){return Hd(),$e((mPn(),CUn),n)}function rse(n){return K2(),$e((kPn(),MUn),n)}function cse(n){return d6(),$e((yPn(),PUn),n)}function use(n){return Aj(),$e((yAn(),IUn),n)}function sse(n){return _C(),$e((zAn(),WUn),n)}function ose(n){return W5(),$e((NSn(),bWn),n)}function fse(n){return Qi(),$e((JPn(),vWn),n)}function hse(n){return G3(),$e((vPn(),EWn),n)}function lse(n){return qd(),$e((BSn(),PWn),n)}function OU(n,e){if(!n)throw T(new Hn(e))}function ase(n){return Qn(),$e((vIn(),$Wn),n)}function DU(n){xE.call(this,n.d,n.c,n.a,n.b)}function oD(n){xE.call(this,n.d,n.c,n.a,n.b)}function $U(n,e,t){this.b=n,this.c=e,this.a=t}function EE(n,e,t){this.b=n,this.a=e,this.c=t}function bEn(n,e,t){this.a=n,this.b=e,this.c=t}function FU(n,e,t){this.a=n,this.b=e,this.c=t}function wEn(n,e,t){this.a=n,this.b=e,this.c=t}function xU(n,e,t){this.a=n,this.b=e,this.c=t}function gEn(n,e,t){this.b=n,this.a=e,this.c=t}function CE(n,e,t){this.e=e,this.b=n,this.d=t}function dse(n,e,t){return ca(),n.a.Od(e,t),e}function fD(n){var e;return e=new Dln,e.e=n,e}function LU(n){var e;return e=new Zmn,e.b=n,e}function w8(){w8=N,sS=new Fdn,oS=new xdn}function wo(){wo=N,WWn=new pbn,XWn=new vbn}function bse(n){return aT(),$e((EPn(),HWn),n)}function wse(n){return ff(),$e((TPn(),JWn),n)}function gse(n){return lM(),$e((mOn(),cXn),n)}function pse(n){return q2(),$e((yIn(),uXn),n)}function vse(n){return OC(),$e((JAn(),sXn),n)}function mse(n){return F2(),$e((RSn(),oXn),n)}function kse(n){return Vw(),$e((UPn(),ZWn),n)}function yse(n){return Kd(),$e((HSn(),rXn),n)}function jse(n){return VC(),$e((_Sn(),fXn),n)}function Ese(n){return Pa(),$e((GPn(),hXn),n)}function Cse(n){return V8(),$e((WAn(),lXn),n)}function Tse(n){return ya(),$e((KSn(),dXn),n)}function Mse(n){return eM(),$e((TIn(),bXn),n)}function Ase(n){return K8(),$e((XAn(),wXn),n)}function Sse(n){return A7(),$e((EIn(),gXn),n)}function Pse(n){return h4(),$e((jIn(),pXn),n)}function Ise(n){return or(),$e((zOn(),vXn),n)}function Ose(n){return q3(),$e((GSn(),mXn),n)}function Dse(n){return Nh(),$e((qSn(),yXn),n)}function $se(n){return kC(),$e((YAn(),jXn),n)}function Fse(n){return Ss(),$e((WPn(),EXn),n)}function xse(n){return JT(),$e((CIn(),BQn),n)}function Lse(n){return i6(),$e((zSn(),RQn),n)}function Nse(n){return wb(),$e((MPn(),_Qn),n)}function Bse(n){return ur(),$e((XSn(),UQn),n)}function Rse(n){return Zw(),$e((vOn(),HQn),n)}function _se(n){return Rh(),$e((WSn(),qQn),n)}function Kse(n){return z8(),$e((QAn(),GQn),n)}function Hse(n){return oT(),$e((USn(),WQn),n)}function qse(n){return b6(),$e((zPn(),KQn),n)}function Gse(n){return x8(),$e((VAn(),XQn),n)}function zse(n){return Q3(),$e((QSn(),VQn),n)}function Use(n){return uT(),$e((JSn(),QQn),n)}function Wse(n){return dT(),$e((VSn(),JQn),n)}function Xse(n){return _d(),$e((YSn(),hJn),n)}function Vse(n){return z5(),$e((nSn(),wJn),n)}function Qse(n){return Ff(),$e((eSn(),jJn),n)}function Jse(n){return ef(),$e((tSn(),CJn),n)}function Yse(n){return No(),$e((ZAn(),RJn),n)}function Zse(n){return Id(),$e((iSn(),UJn),n)}function noe(n){return c4(),$e((jPn(),WJn),n)}function eoe(n){return k6(),$e((MIn(),VJn),n)}function toe(n){return aC(),$e((uSn(),fYn),n)}function ioe(n){return iT(),$e((cSn(),wYn),n)}function roe(n){return gC(),$e((rSn(),hYn),n)}function coe(n){return CT(),$e((ZSn(),pYn),n)}function uoe(n){return $C(),$e((sSn(),vYn),n)}function soe(n){return f7(),$e((nPn(),mYn),n)}function ooe(n){return qT(),$e((CPn(),FYn),n)}function foe(n){return sT(),$e((tPn(),xYn),n)}function hoe(n){return ET(),$e((ePn(),LYn),n)}function loe(n){return g4(),$e((QPn(),tZn),n)}function aoe(n){return w7(),$e((iPn(),iZn),n)}function doe(n){return Pj(),$e((mAn(),rZn),n)}function boe(n){return Ij(),$e((vAn(),uZn),n)}function woe(n){return L8(),$e((fSn(),sZn),n)}function goe(n){return P7(),$e((XPn(),oZn),n)}function poe(n){return Jv(),$e((kAn(),CZn),n)}function voe(n){return c7(),$e((oSn(),TZn),n)}function moe(n){return Ho(),$e((VPn(),OZn),n)}function koe(n){return y1(),$e((kOn(),$Zn),n)}function yoe(n){return oh(),$e((kIn(),FZn),n)}function joe(n){return vb(),$e((mIn(),_Zn),n)}function Eoe(n){return rr(),$e((Wkn(),RWn),n)}function Coe(n){return B3(),$e((UAn(),BWn),n)}function Toe(n){return sr(),$e((YPn(),ene),n)}function Moe(n){return sf(),$e((cPn(),tne),n)}function Aoe(n){return Hh(),$e((PPn(),ine),n)}function Soe(n){return ZT(),$e((SIn(),rne),n)}function Poe(n){return _h(),$e((rPn(),une),n)}function Ioe(n){return cs(),$e((SPn(),one),n)}function Ooe(n){return jb(),$e((POn(),fne),n)}function Doe(n){return qw(),$e((ZPn(),hne),n)}function $oe(n){return Ti(),$e((bIn(),lne),n)}function Foe(n){return Tu(),$e((AIn(),ane),n)}function xoe(n){return Vu(),$e((OPn(),vne),n)}function Loe(n){return xu(),$e((UOn(),mne),n)}function Noe(n){return J(),$e((nIn(),dne),n)}function Boe(n){return AT(),$e((IPn(),kne),n)}function Roe(n){return Xu(),$e((APn(),Ene),n)}function _oe(n){return d4(),$e((yOn(),Lne),n)}function Koe(n,e){return _n(n),n+(_n(e),e)}function Hoe(n,e){return Zf(),me(R(n.a),e)}function qoe(n,e){return Zf(),me(R(n.a),e)}function hD(n,e){this.c=n,this.a=e,this.b=e-n}function pEn(n,e,t){this.a=n,this.b=e,this.c=t}function NU(n,e,t){this.a=n,this.b=e,this.c=t}function BU(n,e,t){this.a=n,this.b=e,this.c=t}function vEn(n,e,t){this.a=n,this.b=e,this.c=t}function mEn(n,e,t){this.a=n,this.b=e,this.c=t}function s1(n,e,t){this.e=n,this.a=e,this.c=t}function kEn(n,e,t){ms(),QW.call(this,n,e,t)}function lD(n,e,t){ms(),FW.call(this,n,e,t)}function RU(n,e,t){ms(),FW.call(this,n,e,t)}function _U(n,e,t){ms(),FW.call(this,n,e,t)}function yEn(n,e,t){ms(),lD.call(this,n,e,t)}function KU(n,e,t){ms(),lD.call(this,n,e,t)}function jEn(n,e,t){ms(),KU.call(this,n,e,t)}function EEn(n,e,t){ms(),RU.call(this,n,e,t)}function CEn(n,e,t){ms(),_U.call(this,n,e,t)}function g8(n,e){return pe(n),pe(e),new z8n(n,e)}function v2(n,e){return pe(n),pe(e),new NEn(n,e)}function Goe(n,e){return pe(n),pe(e),new BEn(n,e)}function zoe(n,e){return pe(n),pe(e),new W8n(n,e)}function u(n,e){return A5(n==null||WF(n,e)),n}function f3(n){var e;return e=new X,_$(e,n),e}function Uoe(n){var e;return e=new fi,_$(e,n),e}function TEn(n){var e;return e=new Wq,nF(e,n),e}function p8(n){var e;return e=new Ct,nF(e,n),e}function Woe(n){return!n.e&&(n.e=new X),n.e}function Xoe(n){return!n.c&&(n.c=new Bp),n.c}function W(n,e){return n.c[n.c.length]=e,!0}function MEn(n,e){this.c=n,this.b=e,this.a=!1}function HU(n){this.d=n,Ovn(this),this.b=_fe(n.d)}function AEn(){this.a=";,;",this.b="",this.c=""}function Voe(n,e,t){SCn.call(this,e,t),this.a=n}function SEn(n,e,t){this.b=n,Hkn.call(this,e,t)}function qU(n,e,t){this.c=n,Nj.call(this,e,t)}function GU(n,e,t){aY(t,0,n,e,t.length,!1)}function eh(n,e,t,i,r){n.b=e,n.c=t,n.d=i,n.a=r}function Qoe(n,e){e&&(n.b=e,n.a=(fl(e),e.a))}function zU(n,e,t,i,r){n.d=e,n.c=t,n.a=i,n.b=r}function UU(n){var e,t;e=n.b,t=n.c,n.b=t,n.c=e}function WU(n){var e,t;t=n.d,e=n.a,n.d=e,n.a=t}function XU(n){return bl(the($r(n)?Ks(n):n))}function Joe(n,e){return Uc(GEn(n.d),GEn(e.d))}function Yoe(n,e){return e==(J(),Gn)?n.c:n.d}function h3(){h3=N,don=(J(),Gn),dP=Vn}function PEn(){this.b=K(Y(cn((Go(),xR))))}function IEn(n){return ca(),F(Zn,rn,1,n,5,1)}function Zoe(n){return new fn(n.c+n.b,n.d+n.a)}function nfe(n,e){return Sj(),Uc(n.d.p,e.d.p)}function aD(n){return ne(n.b!=0),Ts(n,n.a.a)}function efe(n){return ne(n.b!=0),Ts(n,n.c.b)}function VU(n,e){if(!n)throw T(new R9n(e))}function TE(n,e){if(!n)throw T(new Hn(e))}function QU(n,e,t){t3.call(this,n,e),this.b=t}function v8(n,e,t){lz.call(this,n,e),this.c=t}function OEn(n,e,t){oIn.call(this,e,t),this.d=n}function JU(n){IU(),Yy.call(this),this.th(n)}function DEn(n,e,t){this.a=n,Ew.call(this,e,t)}function $En(n,e,t){this.a=n,Ew.call(this,e,t)}function ME(n,e,t){lz.call(this,n,e),this.c=t}function FEn(){T3(),khe.call(this,(Z1(),uo))}function xEn(n){return n!=null&&!$F(n,a9,d9)}function tfe(n,e){return(GDn(n)<<4|GDn(e))&Ut}function ife(n,e){return QE(),ex(n,e),new oTn(n,e)}function sa(n,e){var t;n.n&&(t=e,W(n.f,t))}function l3(n,e,t){var i;i=new Z0(t),Ro(n,e,i)}function rfe(n,e){var t;return t=n.c,wV(n,e),t}function YU(n,e){return e<0?n.g=-1:n.g=e,n}function AE(n,e){return H0e(n),n.a*=e,n.b*=e,n}function LEn(n,e,t,i,r){n.c=e,n.d=t,n.b=i,n.a=r}function Ke(n,e){return Kt(n,e,n.c.b,n.c),!0}function ZU(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function dD(n){this.b=n,this.a=Ed(this.b.a).Ed()}function NEn(n,e){this.b=n,this.a=e,TI.call(this)}function BEn(n,e){this.a=n,this.b=e,TI.call(this)}function REn(n,e){SCn.call(this,e,1040),this.a=n}function m8(n){return n==0||isNaN(n)?n:n<0?-1:1}function cfe(n){return C2(),fh(n)==At(ml(n))}function ufe(n){return C2(),ml(n)==At(fh(n))}function jd(n,e){return v6(n,new t3(e.a,e.b))}function sfe(n){return!Xi(n)&&n.c.i.c==n.d.i.c}function SE(n){var e;return e=n.n,n.a.b+e.d+e.a}function _En(n){var e;return e=n.n,n.e.b+e.d+e.a}function nW(n){var e;return e=n.n,n.e.a+e.b+e.c}function KEn(n){return Je(),new th(0,n)}function ofe(n){return n.a?n.a:WD(n)}function A5(n){if(!n)throw T(new Up(null))}function HEn(){HEn=N,mH=(Pn(),new OI(XB))}function PE(){PE=N,new JQ((HI(),uR),(qI(),cR))}function qEn(){qEn=N,jin=F(Wi,q,19,256,0,1)}function bD(n,e,t,i){MQ.call(this,n,e,t,i,0,0)}function ffe(n,e,t){return it(n.b,u(t.b,17),e)}function hfe(n,e,t){return it(n.b,u(t.b,17),e)}function lfe(n,e){return W(n,new fn(e.a,e.b))}function afe(n,e){return n.c=e)throw T(new qq)}function Xfe(n,e,t){return Mt(e,0,rW(e[0],t[0])),e}function Vfe(n,e,t){e.Ye(t,K(Y(te(n.b,t)))*n.a)}function ACn(n,e,t){return eg(),R3(n,e)&&R3(n,t)}function D5(n){return Tu(),!n.Hc(n1)&&!n.Hc(Gl)}function qE(n){return new fn(n.c+n.b/2,n.d+n.a/2)}function MD(n,e){return e.kh()?pl(n.b,u(e,49)):e}function kW(n,e){this.e=n,this.d=e&64?e|Nf:e}function SCn(n,e){this.c=0,this.d=n,this.b=e|64|Nf}function GE(n){this.b=new Pc(11),this.a=(Ow(),n)}function AD(n){this.b=null,this.a=(Ow(),n||Lin)}function PCn(n){this.a=Y$n(n.a),this.b=new du(n.b)}function ICn(n){this.b=n,b2.call(this,n),$yn(this)}function OCn(n){this.b=n,u8.call(this,n),Fyn(this)}function Y0(n,e,t){this.a=n,g2.call(this,e,t,5,6)}function yW(n,e,t,i){this.b=n,Jt.call(this,e,t,i)}function wi(n,e,t,i,r){D$.call(this,n,e,t,i,r,-1)}function $5(n,e,t,i,r){R8.call(this,n,e,t,i,r,-1)}function V(n,e,t,i){Jt.call(this,n,e,t),this.b=i}function zE(n,e,t,i){v8.call(this,n,e,t),this.b=i}function DCn(n){xkn.call(this,n,!1),this.a=!1}function $Cn(n,e){this.b=n,bvn.call(this,n.b),this.a=e}function FCn(n,e){nb(),Yie.call(this,n,mT(new Ku(e)))}function UE(n,e){return Je(),new xW(n,e,0)}function SD(n,e){return Je(),new xW(6,n,e)}function Qfe(n,e){return An(n.substr(0,e.length),e)}function zu(n,e){return mi(e)?QD(n,e):!!Ar(n.f,e)}function Oi(n,e){for(_n(e);n.Ob();)e.td(n.Pb())}function Pw(n,e,t){jl(),this.e=n,this.d=e,this.a=t}function o1(n,e,t,i){var r;r=n.i,r.i=e,r.a=t,r.b=i}function jW(n){var e;for(e=n;e.f;)e=e.f;return e}function y2(n){var e;return e=t6(n),ne(e!=null),e}function Jfe(n){var e;return e=Lge(n),ne(e!=null),e}function d3(n,e){var t;return t=n.a.gc(),$X(e,t),t-e}function EW(n,e){var t;for(t=0;t0?j.Math.log(n/e):-100}function xCn(n,e){return fc(n,e)<0?-1:fc(n,e)>0?1:0}function SW(n,e,t){return MRn(n,u(e,46),u(t,167))}function LCn(n,e){return u(vW(Ed(n.a)).Xb(e),42).cd()}function uhe(n,e){return P0e(e,n.length),new REn(n,e)}function DD(n,e){this.d=n,ie.call(this,n),this.e=e}function Cd(n){this.d=(_n(n),n),this.a=0,this.c=IM}function PW(n,e){cd.call(this,1),this.a=n,this.b=e}function NCn(n,e){return n.c?NCn(n.c,e):W(n.b,e),n}function she(n,e,t){var i;return i=ub(n,e),g$(n,e,t),i}function IW(n,e){var t;return t=n.slice(0,e),WX(t,n)}function BCn(n,e,t){var i;for(i=0;i=n.g}function KD(n,e,t){var i;return i=Y$(n,e,t),rZ(n,i)}function j2(n,e){var t;t=n.a.length,ub(n,t),g$(n,t,e)}function ZCn(n,e){var t;t=console[n],t.call(console,e)}function nTn(n,e){var t;++n.j,t=n.Vi(),n.Ii(n.oi(t,e))}function mhe(n,e,t){u(e.b,65),Yc(e.a,new NU(n,t,e))}function FW(n,e,t){uj.call(this,e),this.a=n,this.b=t}function xW(n,e,t){cd.call(this,n),this.a=e,this.b=t}function LW(n,e,t){this.a=n,xq.call(this,e),this.b=t}function eTn(n,e,t){this.a=n,aX.call(this,8,e,null,t)}function khe(n){this.a=(_n(xe),xe),this.b=n,new tG}function tTn(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function NW(n){this.c=n,this.b=n.a.d.a,rU(n.a.e,this)}function Uu(n){z0(n.c!=-1),n.d.$c(n.c),n.b=n.c,n.c=-1}function L5(n){return j.Math.sqrt(n.a*n.a+n.b*n.b)}function Md(n,e){return a3(e,n.a.c.length),un(n.a,e)}function $f(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function yhe(n){return 0>=n?new PG:sbe(n-1)}function jhe(n){return aw?QD(aw,n):!1}function iTn(n){return n?n.dc():!n.Kc().Ob()}function Gi(n){return!n.a&&n.c?n.c.b:n.a}function Ehe(n){return!n.a&&(n.a=new Jt(zl,n,4)),n.a}function Ad(n){return!n.d&&(n.d=new Jt(ar,n,1)),n.d}function _n(n){if(n==null)throw T(new Nv);return n}function N5(n){n.c?n.c.He():(n.d=!0,S8e(n))}function fl(n){n.c?fl(n.c):(Ta(n),n.d=!0)}function rTn(n){KW(n.a),n.b=F(Zn,rn,1,n.b.length,5,1)}function Che(n,e){return Uc(e.j.c.length,n.j.c.length)}function The(n,e){n.c<0||n.b.b=0?n.Bh(t):bY(n,e)}function cTn(n){var e,t;return e=n.c.i.c,t=n.d.i.c,e==t}function Ahe(n){if(n.p!=4)throw T(new fu);return n.e}function She(n){if(n.p!=3)throw T(new fu);return n.e}function Phe(n){if(n.p!=6)throw T(new fu);return n.f}function Ihe(n){if(n.p!=6)throw T(new fu);return n.k}function Ohe(n){if(n.p!=3)throw T(new fu);return n.j}function Dhe(n){if(n.p!=4)throw T(new fu);return n.j}function BW(n){return!n.b&&(n.b=new sj(new KI)),n.b}function Sd(n){return n.c==-2&&Pte(n,Qve(n.g,n.b)),n.c}function g3(n,e){var t;return t=LD("",n),t.n=e,t.i=1,t}function $he(n,e){yD(u(e.b,65),n),Yc(e.a,new Aq(n))}function Fhe(n,e){me((!n.a&&(n.a=new l8(n,n)),n.a),e)}function uTn(n,e){this.b=n,DD.call(this,n,e),$yn(this)}function sTn(n,e){this.b=n,AU.call(this,n,e),Fyn(this)}function RW(n,e,t,i){bd.call(this,n,e),this.d=t,this.a=i}function VE(n,e,t,i){bd.call(this,n,t),this.a=e,this.f=i}function oTn(n,e){bce.call(this,obe(pe(n),pe(e))),this.a=e}function fTn(){UJ.call(this,Ka,(a8n(),hee)),tEe(this)}function hTn(){UJ.call(this,Vs,(Qp(),g1n)),lje(this)}function lTn(){Oe.call(this,"DELAUNAY_TRIANGULATION",0)}function xhe(n){return String.fromCharCode.apply(null,n)}function it(n,e,t){return mi(e)?kr(n,e,t):_c(n.f,e,t)}function _W(n){return Pn(),n?n.ve():(Ow(),Ow(),Bin)}function Lhe(n,e,t){return L2(),t.pg(n,u(e.cd(),146))}function aTn(n,e){return PE(),new JQ(new Wyn(n),new Uyn(e))}function Nhe(n){return is(n,AL),KC(qi(qi(5,n),n/10|0))}function QE(){QE=N,fzn=new GI(A(M(Ha,1),OM,42,0,[]))}function dTn(n){return!n.d&&(n.d=new _p(n.c.Cc())),n.d}function p3(n){return!n.a&&(n.a=new W9n(n.c.vc())),n.a}function bTn(n){return!n.b&&(n.b=new Wp(n.c.ec())),n.b}function rh(n,e){for(;e-- >0;)n=n<<1|(n<0?1:0);return n}function pc(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function Bhe(n,e){return qn(),u(e.b,19).ai&&++i,i}function Oh(n){var e,t;return t=(e=new ud,e),O3(t,n),t}function UD(n){var e,t;return t=(e=new ud,e),VJ(t,n),t}function Zhe(n,e){var t;return t=te(n.f,e),MV(e,t),null}function WD(n){var e;return e=hbe(n),e||null}function CTn(n){return!n.b&&(n.b=new V(di,n,12,3)),n.b}function n1e(n){return n!=null&&_9(tI,n.toLowerCase())}function e1e(n,e){return Zt(bu(n)*Gu(n),bu(e)*Gu(e))}function t1e(n,e){return Zt(bu(n)*Gu(n),bu(e)*Gu(e))}function i1e(n,e){return Zt(n.d.c+n.d.b/2,e.d.c+e.d.b/2)}function r1e(n,e){return Zt(n.g.c+n.g.b/2,e.g.c+e.g.b/2)}function TTn(n,e,t){t.a?nu(n,e.b-n.f/2):Zc(n,e.a-n.g/2)}function MTn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ATn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ha(n,e,t,i){this.e=n,this.a=e,this.c=t,this.d=i}function STn(n,e,t,i){this.a=n,this.c=e,this.d=t,this.b=i}function PTn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function ITn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function OTn(n,e){this.a=n,hue.call(this,n,u(n.d,15).Zc(e))}function XD(n){this.f=n,this.c=this.f.e,n.f>0&&qFn(this)}function DTn(n,e,t,i){this.b=n,this.c=i,FO.call(this,e,t)}function $Tn(n){return ne(n.b=0&&An(n.substr(t,e.length),e)}function hl(n,e,t,i,r,c,o){return new v$(n.e,e,t,i,r,c,o)}function QTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function JTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function YTn(n,e){this.g=n,this.d=A(M(vh,1),E1,10,0,[e])}function f1(n,e){this.e=n,this.a=Zn,this.b=yBn(e),this.c=e}function ZTn(n,e){kE.call(this),eV(this),this.a=n,this.c=e}function M8(n,e,t,i){Mt(n.c[e.g],t.g,i),Mt(n.c[t.g],e.g,i)}function ZD(n,e,t,i){Mt(n.c[e.g],e.g,t),Mt(n.b[e.g],e.g,i)}function M1e(){return x8(),A(M(ron,1),z,376,0,[uK,iy])}function A1e(){return K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])}function S1e(){return V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])}function P1e(){return OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])}function I1e(){return kC(),A(M(fun,1),z,420,0,[j_,oun])}function O1e(){return z8(),A(M(non,1),z,421,0,[iK,rK])}function D1e(){return z5(),A(M(bJn,1),z,523,0,[Hm,Km])}function $1e(){return No(),A(M(BJn,1),z,520,0,[tw,Bl])}function F1e(){return Ff(),A(M(yJn,1),z,516,0,[M0,I1])}function x1e(){return ef(),A(M(EJn,1),z,515,0,[Ja,kf])}function L1e(){return Id(),A(M(zJn,1),z,455,0,[Rl,Lg])}function N1e(){return gC(),A(M(Son,1),z,425,0,[yK,Aon])}function B1e(){return aC(),A(M(Mon,1),z,480,0,[kK,Ton])}function R1e(){return iT(),A(M(Pon,1),z,495,0,[EP,mv])}function _1e(){return $C(),A(M(Oon,1),z,426,0,[Ion,TK])}function K1e(){return c7(),A(M(Ffn,1),z,429,0,[DP,$fn])}function H1e(){return L8(),A(M(afn,1),z,430,0,[FK,IP])}function q1e(){return $T(),A(M(Jin,1),z,428,0,[yR,Qin])}function G1e(){return RC(),A(M(Zin,1),z,427,0,[Yin,jR])}function z1e(){return _C(),A(M(Arn,1),z,424,0,[$R,tS])}function U1e(){return B3(),A(M(NWn,1),z,511,0,[_k,UR])}function sC(n,e,t,i){return t>=0?n.jh(e,t,i):n.Sg(null,t,i)}function n$(n){return n.b.b==0?n.a.$e():aD(n.b)}function W1e(n){if(n.p!=5)throw T(new fu);return ge(n.f)}function X1e(n){if(n.p!=5)throw T(new fu);return ge(n.k)}function VW(n){return B(n.a)===B((eF(),gH))&&Vje(n),n.a}function nMn(n){this.a=u(pe(n),271),this.b=(Pn(),new Hz(n))}function eMn(n,e){bte(this,new fn(n.a,n.b)),wte(this,p8(e))}function Id(){Id=N,Rl=new iz(Y2,0),Lg=new iz(Z2,1)}function Ff(){Ff=N,M0=new ez(Z2,0),I1=new ez(Y2,1)}function Od(){rie.call(this,new s2(sb(12))),Bz(!0),this.a=2}function e$(n,e,t){Je(),cd.call(this,n),this.b=e,this.a=t}function QW(n,e,t){ms(),uj.call(this,e),this.a=n,this.b=t}function tMn(n){kE.call(this),eV(this),this.a=n,this.c=!0}function iMn(n){var e;e=n.c.d.b,n.b=e,n.a=n.c.d,e.a=n.c.d.b=n}function oC(n){var e;ebe(n.a),byn(n.a),e=new tj(n.a),TQ(e)}function V1e(n,e){aBn(n,!0),Yc(n.e.wf(),new $U(n,!0,e))}function fC(n,e){return LAn(e),Y0e(n,F(be,Le,25,e,15,1),e)}function Q1e(n,e){return C2(),n==At(fh(e))||n==At(ml(e))}function vc(n,e){return e==null?Vr(Ar(n.f,null)):n5(n.g,e)}function J1e(n){return n.b==0?null:(ne(n.b!=0),Ts(n,n.a.a))}function Gt(n){return Math.max(Math.min(n,nt),-2147483648)|0}function Y1e(n,e){var t=lR[n.charCodeAt(0)];return t??n}function hC(n,e){return tC(n,"set1"),tC(e,"set2"),new Z8n(n,e)}function Z1e(n,e){var t;return t=W0e(n.f,e),st(vE(t),n.f.d)}function R5(n,e){var t,i;return t=e,i=new dI,n_n(n,t,i),i.d}function t$(n,e,t,i){var r;r=new Gjn,e.a[t.g]=r,m2(n.b,i,r)}function JW(n,e,t){var i;i=n.Yg(e),i>=0?n.sh(i,t):_Y(n,e,t)}function Dw(n,e,t){dC(),n&&it(dH,n,e),n&&it($y,n,t)}function rMn(n,e,t){this.i=new X,this.b=n,this.g=e,this.a=t}function lC(n,e,t){this.c=new X,this.e=n,this.f=e,this.b=t}function YW(n,e,t){this.a=new X,this.e=n,this.f=e,this.c=t}function cMn(n,e){oE(this),this.f=e,this.g=n,eC(this),this._d()}function A8(n,e){var t;t=n.q.getHours(),n.q.setDate(e),S6(n,t)}function uMn(n,e){var t;for(pe(e),t=n.a;t;t=t.c)e.Od(t.g,t.i)}function sMn(n){var e;return e=new kj(sb(n.length)),qV(e,n),e}function nle(n){function e(){}return e.prototype=n||{},new e}function ele(n,e){return LOn(n,e)?(FIn(n),!0):!1}function Dh(n,e){if(e==null)throw T(new Nv);return Y2e(n,e)}function tle(n){if(n.qe())return null;var e=n.n;return RA[e]}function S8(n){return n.Db>>16!=3?null:u(n.Cb,33)}function nf(n){return n.Db>>16!=9?null:u(n.Cb,33)}function oMn(n){return n.Db>>16!=6?null:u(n.Cb,79)}function fMn(n){return n.Db>>16!=7?null:u(n.Cb,235)}function hMn(n){return n.Db>>16!=7?null:u(n.Cb,160)}function At(n){return n.Db>>16!=11?null:u(n.Cb,33)}function lMn(n,e){var t;return t=n.Yg(e),t>=0?n.lh(t):Ox(n,e)}function aMn(n,e){var t;return t=new iW(e),dxn(t,n),new du(t)}function ZW(n){var e;return e=n.d,e=n.si(n.f),me(n,e),e.Ob()}function dMn(n,e){return n.b+=e.b,n.c+=e.c,n.d+=e.d,n.a+=e.a,n}function i$(n,e){return j.Math.abs(n)0}function bMn(){this.a=new Sh,this.e=new fi,this.g=0,this.i=0}function wMn(n){this.a=n,this.b=F(lJn,q,1944,n.e.length,0,2)}function r$(n,e,t){var i;i=tDn(n,e,t),n.b=new tT(i.c.length)}function ef(){ef=N,Ja=new nz(hN,0),kf=new nz("UP",1)}function aC(){aC=N,kK=new rz(PHn,0),Ton=new rz("FAN",1)}function dC(){dC=N,dH=new we,$y=new we,Ere(Azn,new z2n)}function rle(n){if(n.p!=0)throw T(new fu);return b5(n.f,0)}function cle(n){if(n.p!=0)throw T(new fu);return b5(n.k,0)}function gMn(n){return n.Db>>16!=3?null:u(n.Cb,147)}function y3(n){return n.Db>>16!=6?null:u(n.Cb,235)}function eb(n){return n.Db>>16!=17?null:u(n.Cb,26)}function pMn(n,e){var t=n.a=n.a||[];return t[e]||(t[e]=n.le(e))}function ule(n,e){var t;return t=n.a.get(e),t??new Array}function sle(n,e){var t;t=n.q.getHours(),n.q.setMonth(e),S6(n,t)}function kr(n,e,t){return e==null?_c(n.f,null,t):Gd(n.g,e,t)}function _5(n,e,t,i,r,c){return new Lh(n.e,e,n.aj(),t,i,r,c)}function P8(n,e,t){return n.a=Yu(n.a,0,e)+(""+t)+r8(n.a,e),n}function ole(n,e,t){return W(n.a,(QE(),ex(e,t),new bd(e,t))),n}function nX(n){return _z(n.c),n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function vMn(n){return _z(n.e),n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ei(n,e){n.d&&Qc(n.d.e,n),n.d=e,n.d&&W(n.d.e,n)}function Hi(n,e){n.c&&Qc(n.c.g,n),n.c=e,n.c&&W(n.c.g,n)}function yr(n,e){n.c&&Qc(n.c.a,n),n.c=e,n.c&&W(n.c.a,n)}function Hr(n,e){n.i&&Qc(n.i.j,n),n.i=e,n.i&&W(n.i.j,n)}function mMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function kMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function yMn(n,e){this.a=n,this.c=Qr(this.a),this.b=new uC(e)}function fle(n){var e;return Ta(n),e=new fi,gt(n,new Vvn(e))}function tb(n,e){if(n<0||n>e)throw T(new vr(cnn+n+unn+e))}function eX(n,e){return lCn(n.a,e)?TW(n,u(e,22).g,null):null}function hle(n){return yF(),qn(),u(n.a,81).d.e!=0}function jMn(){jMn=N,azn=Fe((aj(),A(M(lzn,1),z,538,0,[fR])))}function EMn(){EMn=N,YQn=ju(new hi,(Qi(),Ir),(rr(),Kk))}function tX(){tX=N,ZQn=ju(new hi,(Qi(),Ir),(rr(),Kk))}function CMn(){CMn=N,eJn=ju(new hi,(Qi(),Ir),(rr(),Kk))}function TMn(){TMn=N,gJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function Zu(){Zu=N,mJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function MMn(){MMn=N,kJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function c$(){c$=N,TJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function AMn(){AMn=N,lYn=ju(new hi,(c4(),Gm),(k6(),lK))}function aa(n,e,t,i){this.c=n,this.d=i,s$(this,e),o$(this,t)}function M2(n){this.c=new Ct,this.b=n.b,this.d=n.c,this.a=n.a}function u$(n){this.a=j.Math.cos(n),this.b=j.Math.sin(n)}function s$(n,e){n.a&&Qc(n.a.k,n),n.a=e,n.a&&W(n.a.k,n)}function o$(n,e){n.b&&Qc(n.b.f,n),n.b=e,n.b&&W(n.b.f,n)}function SMn(n,e){mhe(n,n.b,n.c),u(n.b.b,65),e&&u(e.b,65).b}function lle(n,e){vQ(n,e),I(n.Cb,88)&&yb(Iu(u(n.Cb,88)),2)}function f$(n,e){I(n.Cb,88)&&yb(Iu(u(n.Cb,88)),4),Ic(n,e)}function bC(n,e){I(n.Cb,179)&&(u(n.Cb,179).tb=null),Ic(n,e)}function mc(n,e){return er(),R$(e)?new IE(e,n):new i8(e,n)}function ale(n,e){var t,i;t=e.c,i=t!=null,i&&j2(n,new Z0(e.c))}function PMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function IMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function OMn(n,e){var t;return t=new Rs(n),e.c[e.c.length]=t,t}function DMn(n,e){var t;return t=u(ab(T2(n.a),e),14),t?t.gc():0}function $Mn(n){var e;return Ta(n),e=(Ow(),Ow(),Nin),qC(n,e)}function FMn(n){for(var e;;)if(e=n.Pb(),!n.Ob())return e}function iX(n,e){tie.call(this,new s2(sb(n))),is(e,W_n),this.a=e}function ch(n,e,t){KDn(e,t,n.gc()),this.c=n,this.a=e,this.b=t-e}function xMn(n,e,t){var i;KDn(e,t,n.c.length),i=t-e,AG(n.c,e,i)}function dle(n,e){Dyn(n,ge(ci(cl(e,24),FM)),ge(ci(e,FM)))}function Ln(n,e){if(n<0||n>=e)throw T(new vr(cnn+n+unn+e))}function Te(n,e){if(n<0||n>=e)throw T(new wG(cnn+n+unn+e))}function xn(n,e){this.b=(_n(n),n),this.a=e&Ib?e:e|64|Nf}function LMn(n){dyn(this),Wmn(this.a,KV(j.Math.max(8,n))<<1)}function tf(n){return Gr(A(M(ai,1),q,8,0,[n.i.n,n.n,n.a]))}function ble(){return hf(),A(M(Nu,1),z,132,0,[Win,hs,Rb])}function wle(){return _o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])}function gle(){return Cu(),A(M(Qzn,1),z,461,0,[Xf,Ol,Co])}function ple(){return Jc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])}function vle(){return qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])}function mle(){return W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])}function kle(){return i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])}function yle(){return F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])}function jle(){return VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])}function Ele(){return ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])}function Cle(){return Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])}function Tle(){return Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])}function Mle(){return q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])}function Ale(){return ur(),A(M(zQn,1),z,452,0,[Bm,Au,xc])}function Sle(){return Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])}function Ple(){return oT(),A(M(ion,1),z,375,0,[eon,cK,ton])}function Ile(){return dT(),A(M(hon,1),z,377,0,[fK,pv,ew])}function Ole(){return Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])}function Dle(){return uT(),A(M(fon,1),z,338,0,[oon,oK,son])}function $le(){return _d(),A(M(fJn,1),z,454,0,[ry,_m,aP])}function Fle(){return CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])}function xle(){return f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])}function Lle(){return ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])}function Nle(){return sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])}function Ble(){return w7(),A(M(OK,1),z,437,0,[AP,SP,PP])}function Rle(){return _h(),A(M(Khn,1),z,334,0,[HP,F1,i9])}function _le(){return sf(),A(M(Phn,1),z,272,0,[jv,cw,Ev])}function Kle(n,e){return o9e(n,e,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Hle(n,e,t){var i;return i=O6(n,e,!1),i.b<=e&&i.a<=t}function NMn(n,e,t){var i;i=new Jwn,i.b=e,i.a=t,++e.b,W(n.d,i)}function qle(n,e){var t;return t=(_n(n),n).g,Yz(!!t),_n(e),t(e)}function rX(n,e){var t,i;return i=d3(n,e),t=n.a.Zc(i),new Y8n(n,t)}function Gle(n){return n.Db>>16!=6?null:u(Fx(n),235)}function zle(n){if(n.p!=2)throw T(new fu);return ge(n.f)&Ut}function Ule(n){if(n.p!=2)throw T(new fu);return ge(n.k)&Ut}function Wle(n){return n.a==(T3(),uI)&&Ste(n,C9e(n.g,n.b)),n.a}function A2(n){return n.d==(T3(),uI)&&Ite(n,pke(n.g,n.b)),n.d}function y(n){return ne(n.ai?1:0}function BMn(n,e){var t,i;return t=F$(e),i=t,u(te(n.c,i),19).a}function RMn(n,e){var t;for(t=n+"";t.length0&&n.a[--n.d]==0;);n.a[n.d++]==0&&(n.e=0)}function rAn(n){return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function rae(n){return!!n.a&&Ou(n.a.a).i!=0&&!(n.b&&YF(n.b))}function cae(n){return!!n.u&&bc(n.u.a).i!=0&&!(n.n&&JF(n.n))}function cAn(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),16,new tvn(n))}function uae(n,e){return xCn(eu(n.q.getTime()),eu(e.q.getTime()))}function xf(n){return u(lf(n,F(GR,MN,17,n.c.length,0,1)),474)}function I8(n){return u(lf(n,F(vh,E1,10,n.c.length,0,1)),193)}function sae(n){return Zu(),!Xi(n)&&!(!Xi(n)&&n.c.i.c==n.d.i.c)}function uAn(n,e,t){var i;i=(pe(n),new du(n)),N3e(new mMn(i,e,t))}function O8(n,e,t){var i;i=(pe(n),new du(n)),B3e(new kMn(i,e,t))}function sAn(n,e){var t;return t=1-e,n.a[t]=eT(n.a[t],t),eT(n,e)}function oAn(n,e){var t;n.e=new oG,t=Cb(e),bi(t,n.c),eBn(n,t,0)}function Ci(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.a,r)}function Z(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.b,r)}function po(n){var e,t,i;return e=new HCn,t=Zx(e,n),UEe(e),i=t,i}function hX(){var n,e,t;return e=(t=(n=new ud,n),t),W(M1n,e),e}function pC(n){return n.j.c=F(Zn,rn,1,0,5,1),KW(n.c),Khe(n.a),n}function $w(n){return Qv(),I(n.g,10)?u(n.g,10):null}function oae(n){return Iw(n).dc()?!1:(sce(n,new Np),!0)}function fae(n){if(!("stack"in n))try{throw n}catch{}return n}function D8(n,e){if(n<0||n>=e)throw T(new vr(j6e(n,e)));return n}function fAn(n,e,t){if(n<0||et)throw T(new vr(W5e(n,e,t)))}function d$(n,e){if(ri(n.a,e),e.d)throw T(new _r(wKn));e.d=n}function b$(n,e){if(e.$modCount!=n.$modCount)throw T(new vs)}function hAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function lAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function aAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function hae(n,e){return n.a<=n.b?(e.ud(n.a++),!0):!1}function $d(n){var e;return $r(n)?(e=n,e==-0?0:e):m0e(n)}function vC(n){var e;return fl(n),e=new fln,vw(n.a,new Wvn(e)),e}function dAn(n){var e;return fl(n),e=new oln,vw(n.a,new Uvn(e)),e}function Ii(n,e){this.a=n,$v.call(this,n),tb(e,n.gc()),this.b=e}function lX(n){this.e=n,this.b=this.e.a.entries(),this.a=new Array}function lae(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),273,new evn(n))}function mC(n){return new Pc((is(n,AL),KC(qi(qi(5,n),n/10|0))))}function bAn(n){return u(lf(n,F(FWn,UKn,11,n.c.length,0,1)),1943)}function aae(n,e,t){return t.f.c.length>0?SW(n.a,e,t):SW(n.b,e,t)}function dae(n,e,t){n.d&&Qc(n.d.e,n),n.d=e,n.d&&Q0(n.d.e,t,n)}function w$(n,e){uTe(e,n),WU(n.d),WU(u(k(n,(nn(),eP)),207))}function H5(n,e){cTe(e,n),UU(n.d),UU(u(k(n,(nn(),eP)),207))}function Fd(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.fe()),i}function j3(n,e){var t,i;return t=ub(n,e),i=null,t&&(i=t.ie()),i}function q5(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.ie()),i}function $h(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=tY(t)),i}function bae(n,e,t){var i;return i=i4(t),gM(n.g,i,e),gM(n.i,e,t),e}function wae(n,e,t){var i;i=q2e();try{return kue(n,e,t)}finally{Mae(i)}}function wAn(n){var e;e=n.Wg(),this.a=I(e,69)?u(e,69).Zh():e.Kc()}function hi(){P9n.call(this),this.j.c=F(Zn,rn,1,0,5,1),this.a=-1}function aX(n,e,t,i){this.d=n,this.n=e,this.g=t,this.o=i,this.p=-1}function gAn(n,e,t,i){this.e=i,this.d=null,this.c=n,this.a=e,this.b=t}function dX(n,e,t){this.d=new r6n(this),this.e=n,this.i=e,this.f=t}function kC(){kC=N,j_=new QG(I4,0),oun=new QG("TOP_LEFT",1)}function pAn(){pAn=N,aon=aTn(Q(1),Q(4)),lon=aTn(Q(1),Q(2))}function vAn(){vAn=N,uZn=Fe((Ij(),A(M(cZn,1),z,551,0,[$K])))}function mAn(){mAn=N,rZn=Fe((Pj(),A(M(lfn,1),z,482,0,[DK])))}function kAn(){kAn=N,CZn=Fe((Jv(),A(M(Dfn,1),z,530,0,[hy])))}function yAn(){yAn=N,IUn=Fe((Aj(),A(M(krn,1),z,481,0,[SR])))}function gae(){return Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])}function pae(){return FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])}function vae(){return d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])}function mae(){return K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])}function kae(){return G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])}function yae(){return aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])}function jAn(n,e,t,i){return I(t,54)?new ojn(n,e,t,i):new pW(n,e,t,i)}function jae(){return ff(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])}function Eae(n){var e;return n.j==(J(),ae)&&(e=GLn(n),au(e,Vn))}function Cae(n,e){var t;t=e.a,Hi(t,e.c.d),Ei(t,e.d.d),fb(t.a,n.n)}function EAn(n,e){return u(yd(KE(u(ct(n.k,e),15).Oc(),jg)),113)}function CAn(n,e){return u(yd(HE(u(ct(n.k,e),15).Oc(),jg)),113)}function Tae(n){return new xn(jbe(u(n.a.dd(),14).gc(),n.a.cd()),16)}function E3(n){return I(n,14)?u(n,14).dc():!n.Kc().Ob()}function S2(n){return Qv(),I(n.g,145)?u(n.g,145):null}function TAn(n){if(n.e.g!=n.b)throw T(new vs);return!!n.c&&n.d>0}function Re(n){return ne(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function bX(n,e){_n(e),Mt(n.a,n.c,e),n.c=n.c+1&n.a.length-1,MFn(n)}function ll(n,e){_n(e),n.b=n.b-1&n.a.length-1,Mt(n.a,n.b,e),MFn(n)}function MAn(n,e){var t;for(t=n.j.c.length;t0&&gc(n.g,0,e,0,n.i),e}function IAn(n,e){$j();var t;return t=u(te(eI,n),55),!t||t.wj(e)}function Bae(n){if(n.p!=1)throw T(new fu);return ge(n.f)<<24>>24}function Rae(n){if(n.p!=1)throw T(new fu);return ge(n.k)<<24>>24}function _ae(n){if(n.p!=7)throw T(new fu);return ge(n.k)<<16>>16}function Kae(n){if(n.p!=7)throw T(new fu);return ge(n.f)<<16>>16}function Fh(n){var e;for(e=0;n.Ob();)n.Pb(),e=qi(e,1);return KC(e)}function OAn(n,e){var t;return t=new R0,n.xd(t),t.a+="..",e.yd(t),t.a}function Hae(n,e,t){var i;i=u(te(n.g,t),57),W(n.a.c,new Pi(e,i))}function qae(n,e,t){return TD(Y(Vr(Ar(n.f,e))),Y(Vr(Ar(n.f,t))))}function yC(n,e,t){return vM(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Gae(n,e,t){return m4(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function zae(n,e,t){return b9e(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function pX(n,e){return n==(Qn(),ti)&&e==ti?4:n==ti||e==ti?8:32}function DAn(n,e){return B(e)===B(n)?"(this Map)":e==null?iu:Lr(e)}function Uae(n,e){return u(e==null?Vr(Ar(n.f,null)):n5(n.g,e),281)}function $An(n,e,t){var i;return i=i4(t),it(n.b,i,e),it(n.c,e,t),e}function FAn(n,e){var t;for(t=e;t;)U0(n,t.i,t.j),t=At(t);return n}function vX(n,e){var t;return t=C8(f3(new x$(n,e))),DE(new x$(n,e)),t}function uh(n,e){er();var t;return t=u(n,66).Mj(),M5e(t,e),t.Ok(e)}function Wae(n,e,t,i,r){var c;c=m9e(r,t,i),W(e,p6e(r,c)),o5e(n,r,e)}function xAn(n,e,t){n.i=0,n.e=0,e!=t&&(uDn(n,e,t),cDn(n,e,t))}function mX(n,e){var t;t=n.q.getHours(),n.q.setFullYear(e+Tl),S6(n,t)}function Xae(n,e,t){if(t){var i=t.ee();n.a[e]=i(t)}else delete n.a[e]}function g$(n,e,t){if(t){var i=t.ee();t=i(t)}else t=void 0;n.a[e]=t}function LAn(n){if(n<0)throw T(new K9n("Negative array size: "+n))}function bc(n){return n.n||(Iu(n),n.n=new wCn(n,ar,n),Mr(n)),n.n}function G5(n){return ne(n.a=0&&n.a[t]===e[t];t--);return t<0}function KAn(n,e){V3();var t;return t=n.j.g-e.j.g,t!=0?t:0}function HAn(n,e){return _n(e),n.a!=null?$fe(e.Kb(n.a)):UA}function jC(n){var e;return n?new iW(n):(e=new Sh,nF(e,n),e)}function es(n,e){var t;return e.b.Kb(FPn(n,e.c.Ee(),(t=new Jvn(e),t)))}function EC(n){_J(),Dyn(this,ge(ci(cl(n,24),FM)),ge(ci(n,FM)))}function qAn(){qAn=N,Gzn=Fe(($T(),A(M(Jin,1),z,428,0,[yR,Qin])))}function GAn(){GAn=N,zzn=Fe((RC(),A(M(Zin,1),z,427,0,[Yin,jR])))}function zAn(){zAn=N,WUn=Fe((_C(),A(M(Arn,1),z,424,0,[$R,tS])))}function UAn(){UAn=N,BWn=Fe((B3(),A(M(NWn,1),z,511,0,[_k,UR])))}function WAn(){WAn=N,lXn=Fe((V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])))}function XAn(){XAn=N,wXn=Fe((K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])))}function VAn(){VAn=N,XQn=Fe((x8(),A(M(ron,1),z,376,0,[uK,iy])))}function QAn(){QAn=N,GQn=Fe((z8(),A(M(non,1),z,421,0,[iK,rK])))}function JAn(){JAn=N,sXn=Fe((OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])))}function YAn(){YAn=N,jXn=Fe((kC(),A(M(fun,1),z,420,0,[j_,oun])))}function ZAn(){ZAn=N,RJn=Fe((No(),A(M(BJn,1),z,520,0,[tw,Bl])))}function nSn(){nSn=N,wJn=Fe((z5(),A(M(bJn,1),z,523,0,[Hm,Km])))}function eSn(){eSn=N,jJn=Fe((Ff(),A(M(yJn,1),z,516,0,[M0,I1])))}function tSn(){tSn=N,CJn=Fe((ef(),A(M(EJn,1),z,515,0,[Ja,kf])))}function iSn(){iSn=N,UJn=Fe((Id(),A(M(zJn,1),z,455,0,[Rl,Lg])))}function rSn(){rSn=N,hYn=Fe((gC(),A(M(Son,1),z,425,0,[yK,Aon])))}function cSn(){cSn=N,wYn=Fe((iT(),A(M(Pon,1),z,495,0,[EP,mv])))}function uSn(){uSn=N,fYn=Fe((aC(),A(M(Mon,1),z,480,0,[kK,Ton])))}function sSn(){sSn=N,vYn=Fe(($C(),A(M(Oon,1),z,426,0,[Ion,TK])))}function oSn(){oSn=N,TZn=Fe((c7(),A(M(Ffn,1),z,429,0,[DP,$fn])))}function fSn(){fSn=N,sZn=Fe((L8(),A(M(afn,1),z,430,0,[FK,IP])))}function z5(){z5=N,Hm=new ZG("UPPER",0),Km=new ZG("LOWER",1)}function Yae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function Zae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function nde(n,e){var t,i;i=!1;do t=JOn(n,e),i=i|t;while(t);return i}function jX(n,e){var t,i;for(t=e,i=0;t>0;)i+=n.a[t],t-=t&-t;return i}function hSn(n,e){var t;for(t=e;t;)U0(n,-t.i,-t.j),t=At(t);return n}function $i(n,e){var t,i;for(_n(e),i=n.Kc();i.Ob();)t=i.Pb(),e.td(t)}function lSn(n,e){var t;return t=e.cd(),new bd(t,n.e.pc(t,u(e.dd(),14)))}function Kt(n,e,t,i){var r;r=new aI,r.c=e,r.b=t,r.a=i,i.b=t.a=r,++n.b}function Es(n,e,t){var i;return i=(Ln(e,n.c.length),n.c[e]),n.c[e]=t,i}function ede(n,e,t){return u(e==null?_c(n.f,null,t):Gd(n.g,e,t),281)}function k$(n){return n.c&&n.d?cX(n.c)+"->"+cX(n.d):"e_"+md(n)}function C3(n,e){return(Ta(n),Wv(new $n(n,new UX(e,n.a)))).sd(V4)}function tde(){return Qi(),A(M(Hrn,1),z,356,0,[Vf,$l,Hc,Cc,Ir])}function ide(){return J(),A(M(Zi,1),hc,61,0,[Xr,Kn,Vn,ae,Gn])}function rde(n){return gj(),function(){return wae(n,this,arguments)}}function cde(){return Date.now?Date.now():new Date().getTime()}function Xi(n){return!n.c||!n.d?!1:!!n.c.i&&n.c.i==n.d.i}function aSn(n){if(!n.c.Sb())throw T(new ic);return n.a=!0,n.c.Ub()}function $8(n){n.i=0,z9(n.b,null),z9(n.c,null),n.a=null,n.e=null,++n.g}function EX(n){are.call(this,n==null?iu:Lr(n),I(n,78)?u(n,78):null)}function dSn(n){B_n(),Nmn(this),this.a=new Ct,QV(this,n),Ke(this.a,n)}function bSn(){RO(this),this.b=new fn($t,$t),this.a=new fn(Vt,Vt)}function wSn(n,e){this.c=0,this.b=e,qkn.call(this,n,17493),this.a=this.c}function y$(n){CC(),!pf&&(this.c=n,this.e=!0,this.a=new X)}function CC(){CC=N,pf=!0,Fzn=!1,xzn=!1,Nzn=!1,Lzn=!1}function CX(n,e){return I(e,149)?An(n.c,u(e,149).c):!1}function TX(n,e){var t;return t=0,n&&(t+=n.f.a/2),e&&(t+=e.f.a/2),t}function j$(n,e){var t;return t=u(xd(n.d,e),23),t||u(xd(n.e,e),23)}function gSn(n){this.b=n,ie.call(this,n),this.a=u(Rn(this.b.a,4),126)}function pSn(n){this.b=n,w2.call(this,n),this.a=u(Rn(this.b.a,4),126)}function Iu(n){return n.t||(n.t=new Amn(n),s6(new _9n(n),0,n.t)),n.t}function ude(){return sr(),A(M(e9,1),z,103,0,[mh,Ao,Zs,Jh,Yh])}function sde(){return qw(),A(M(c9,1),z,249,0,[Hl,Cy,Hhn,r9,qhn])}function ode(){return Ho(),A(M($1,1),z,175,0,[Xn,pi,Yf,Ya,D1])}function fde(){return P7(),A(M(gfn,1),z,316,0,[dfn,xK,wfn,LK,bfn])}function hde(){return b6(),A(M(Usn,1),z,315,0,[zsn,nK,eK,Lm,Nm])}function lde(){return Pa(),A(M(zcn,1),z,335,0,[f_,Gcn,h_,Em,jm])}function ade(){return g4(),A(M(eZn,1),z,355,0,[Ng,Ep,Qm,Vm,Jm])}function dde(){return Vw(),A(M(YWn,1),z,363,0,[SS,IS,OS,PS,AS])}function bde(){return Ss(),A(M(jun,1),z,163,0,[Qk,Sm,xl,Pm,Ub])}function T3(){T3=N;var n,e;cI=(Qp(),e=new fj,e),uI=(n=new BI,n)}function vSn(n){var e;return n.c||(e=n.r,I(e,88)&&(n.c=u(e,26))),n.c}function wde(n){return n.e=3,n.d=n.Yb(),n.e!=2?(n.e=0,!0):!1}function E$(n){var e,t,i;return e=n&Lu,t=n>>22&Lu,i=n<0?Wh:0,Bc(e,t,i)}function gde(n){var e,t,i,r;for(t=n,i=0,r=t.length;i0?g$n(n,e):BNn(n,-e)}function MX(n,e){return e==0||n.e==0?n:e>0?BNn(n,e):g$n(n,-e)}function ve(n){if(Se(n))return n.c=n.a,n.a.Pb();throw T(new ic)}function kSn(n){var e,t;return e=n.c.i,t=n.d.i,e.k==(Qn(),Xt)&&t.k==Xt}function C$(n){var e;return e=new Pd,Sr(e,n),H(e,(nn(),Tr),null),e}function T$(n,e,t){var i;return i=n.Yg(e),i>=0?n._g(i,t,!0):Yd(n,e,t)}function AX(n,e,t,i){var r;for(r=0;re)throw T(new vr(fY(n,e,"index")));return n}function M$(n,e,t,i){var r;return r=F(be,Le,25,e,15,1),Pve(r,n,e,t,i),r}function vde(n,e){var t;t=n.q.getHours()+(e/60|0),n.q.setMinutes(e),S6(n,t)}function mde(n,e){return j.Math.min(al(e.a,n.d.d.c),al(e.b,n.d.d.c))}function O2(n,e){return mi(e)?e==null?MY(n.f,null):$On(n.g,e):MY(n.f,e)}function uf(n){this.c=n,this.a=new E(this.c.a),this.b=new E(this.c.b)}function TC(){this.e=new X,this.c=new X,this.d=new X,this.b=new X}function TSn(){this.g=new zq,this.b=new zq,this.a=new X,this.k=new X}function MSn(n,e,t){this.a=n,this.c=e,this.d=t,W(e.e,this),W(t.b,this)}function ASn(n,e){Hkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function SSn(n,e){qkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function FX(n,e){FO.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function MC(n,e,t){this.a=n,this.b=e,this.c=t,W(n.t,this),W(e.i,this)}function AC(){this.b=new Ct,this.a=new Ct,this.b=new Ct,this.a=new Ct}function SC(){SC=N,Ym=new kt("org.eclipse.elk.labels.labelManager")}function PSn(){PSn=N,$cn=new ii("separateLayerConnections",(aT(),QR))}function No(){No=N,tw=new tz("REGULAR",0),Bl=new tz("CRITICAL",1)}function x8(){x8=N,uK=new YG("STACKED",0),iy=new YG("SEQUENCED",1)}function L8(){L8=N,FK=new oz("FIXED",0),IP=new oz("CENTER_NODE",1)}function kde(n,e){var t;return t=CEe(n,e),n.b=new tT(t.c.length),Lje(n,t)}function yde(n,e,t){var i;return++n.e,--n.f,i=u(n.d[e].$c(t),133),i.dd()}function ISn(n){var e;return n.a||(e=n.r,I(e,148)&&(n.a=u(e,148))),n.a}function xX(n){if(n.a){if(n.e)return xX(n.e)}else return n;return null}function jde(n,e){return n.pe.p?-1:0}function PC(n,e){return _n(e),n.c=0,"Initial capacity must not be negative")}function $Sn(){$Sn=N,Vzn=Fe((_o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])))}function FSn(){FSn=N,Jzn=Fe((Cu(),A(M(Qzn,1),z,461,0,[Xf,Ol,Co])))}function xSn(){xSn=N,Zzn=Fe((Jc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])))}function LSn(){LSn=N,Bzn=Fe((hf(),A(M(Nu,1),z,132,0,[Win,hs,Rb])))}function NSn(){NSn=N,bWn=Fe((W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])))}function BSn(){BSn=N,PWn=Fe((qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])))}function RSn(){RSn=N,oXn=Fe((F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])))}function _Sn(){_Sn=N,fXn=Fe((VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])))}function KSn(){KSn=N,dXn=Fe((ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])))}function HSn(){HSn=N,rXn=Fe((Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])))}function qSn(){qSn=N,yXn=Fe((Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])))}function GSn(){GSn=N,mXn=Fe((q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])))}function zSn(){zSn=N,RQn=Fe((i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])))}function USn(){USn=N,WQn=Fe((oT(),A(M(ion,1),z,375,0,[eon,cK,ton])))}function WSn(){WSn=N,qQn=Fe((Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])))}function XSn(){XSn=N,UQn=Fe((ur(),A(M(zQn,1),z,452,0,[Bm,Au,xc])))}function VSn(){VSn=N,JQn=Fe((dT(),A(M(hon,1),z,377,0,[fK,pv,ew])))}function QSn(){QSn=N,VQn=Fe((Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])))}function JSn(){JSn=N,QQn=Fe((uT(),A(M(fon,1),z,338,0,[oon,oK,son])))}function YSn(){YSn=N,hJn=Fe((_d(),A(M(fJn,1),z,454,0,[ry,_m,aP])))}function ZSn(){ZSn=N,pYn=Fe((CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])))}function nPn(){nPn=N,mYn=Fe((f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])))}function ePn(){ePn=N,LYn=Fe((ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])))}function tPn(){tPn=N,xYn=Fe((sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])))}function iPn(){iPn=N,iZn=Fe((w7(),A(M(OK,1),z,437,0,[AP,SP,PP])))}function rPn(){rPn=N,une=Fe((_h(),A(M(Khn,1),z,334,0,[HP,F1,i9])))}function cPn(){cPn=N,tne=Fe((sf(),A(M(Phn,1),z,272,0,[jv,cw,Ev])))}function Pde(){return Ti(),A(M(Ghn,1),z,98,0,[ql,jf,Tv,td,jh,Ac])}function wa(n,e){return!n.o&&(n.o=new Wu((Dc(),Ul),S0,n,0)),NF(n.o,e)}function Ide(n){return!n.g&&(n.g=new Qy),!n.g.d&&(n.g.d=new Cmn(n)),n.g.d}function Ode(n){return!n.g&&(n.g=new Qy),!n.g.a&&(n.g.a=new Tmn(n)),n.g.a}function Dde(n){return!n.g&&(n.g=new Qy),!n.g.b&&(n.g.b=new Emn(n)),n.g.b}function N8(n){return!n.g&&(n.g=new Qy),!n.g.c&&(n.g.c=new Mmn(n)),n.g.c}function $de(n,e,t){var i,r;for(r=new H3(e,n),i=0;it||e=0?n._g(t,!0,!0):Yd(n,e,!0)}function Qde(n,e){return Zt(K(Y(k(n,(G(),k0)))),K(Y(k(e,k0))))}function aPn(){aPn=N,aYn=Xd(Xd(Dj(new hi,(c4(),qm)),(k6(),pP)),aK)}function Jde(n,e,t){var i;return i=tDn(n,e,t),n.b=new tT(i.c.length),JY(n,i)}function Yde(n){if(n.b<=0)throw T(new ic);return--n.b,n.a-=n.c.c,Q(n.a)}function Zde(n){var e;if(!n.a)throw T(new gTn);return e=n.a,n.a=At(n.a),e}function n0e(n){for(;!n.a;)if(!nEn(n.c,new Xvn(n)))return!1;return!0}function $2(n){var e;return pe(n),I(n,198)?(e=u(n,198),e):new dvn(n)}function e0e(n){DC(),u(n.We((Xe(),rw)),174).Fc((Tu(),Ty)),n.Ye(eH,null)}function DC(){DC=N,SZn=new n2n,IZn=new e2n,PZn=Rwe((Xe(),eH),SZn,_l,IZn)}function $C(){$C=N,Ion=new sz("LEAF_NUMBER",0),TK=new sz("NODE_SIZE",1)}function t0e(n,e,t){n.a=e,n.c=t,n.b.a.$b(),_s(n.d),n.e.a.c=F(Zn,rn,1,0,5,1)}function $$(n){n.a=F(be,Le,25,n.b+1,15,1),n.c=F(be,Le,25,n.b,15,1),n.d=0}function i0e(n,e){n.a.ue(e.d,n.b)>0&&(W(n.c,new QU(e.c,e.d,n.d)),n.b=e.d)}function zX(n,e){if(n.g==null||e>=n.i)throw T(new xO(e,n.i));return n.g[e]}function dPn(n,e,t){if(W3(n,t),t!=null&&!n.wj(t))throw T(new xI);return t}function bPn(n){var e;if(n.Ek())for(e=n.i-1;e>=0;--e)D(n,e);return gX(n)}function r0e(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[0];)t=e;return t}function c0e(n,e){var t,i;return LAn(e),t=(i=n.slice(0,e),WX(i,n)),t.length=e,t}function S3(n,e,t,i){var r;i=(Ow(),i||Lin),r=n.slice(e,t),hY(r,n,e,t,-e,i)}function Cs(n,e,t,i,r){return e<0?Yd(n,t,i):u(t,66).Nj().Pj(n,n.yh(),e,i,r)}function u0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Lr(n)}function s0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Lr(n)}function wPn(n,e){if(e.a)throw T(new _r(wKn));ri(n.a,e),e.a=n,!n.j&&(n.j=e)}function UX(n,e){FO.call(this,e.rd(),e.qd()&-16449),_n(n),this.a=n,this.c=e}function gPn(n,e){var t,i;return i=e/n.c.Hd().gc()|0,t=e%n.c.Hd().gc(),D2(n,i,t)}function Cu(){Cu=N,Xf=new oO(Y2,0),Ol=new oO(I4,1),Co=new oO(Z2,2)}function FC(){FC=N,vR=new Lj("All",0),qin=new lyn,Gin=new Eyn,zin=new ayn}function pPn(){pPn=N,Dzn=Fe((FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])))}function vPn(){vPn=N,EWn=Fe((G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])))}function mPn(){mPn=N,CUn=Fe((Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])))}function kPn(){kPn=N,MUn=Fe((K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])))}function yPn(){yPn=N,PUn=Fe((d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])))}function jPn(){jPn=N,WJn=Fe((c4(),A(M(won,1),z,393,0,[gP,qm,uy,Gm])))}function EPn(){EPn=N,HWn=Fe((aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])))}function CPn(){CPn=N,FYn=Fe((qT(),A(M(zon,1),z,340,0,[SK,qon,Gon,Hon])))}function TPn(){TPn=N,JWn=Fe((ff(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])))}function MPn(){MPn=N,_Qn=Fe((wb(),A(M(Z_,1),z,197,0,[fP,Y_,xg,Fg])))}function APn(){APn=N,Ene=Fe((Xu(),A(M(jne,1),z,396,0,[ws,Yhn,Jhn,Zhn])))}function SPn(){SPn=N,one=Fe((cs(),A(M(sne,1),z,285,0,[Ey,kh,Kl,jy])))}function PPn(){PPn=N,ine=Fe((Hh(),A(M(cH,1),z,218,0,[rH,yy,Cv,Sp])))}function IPn(){IPn=N,kne=Fe((AT(),A(M(Qhn,1),z,311,0,[oH,Whn,Vhn,Xhn])))}function OPn(){OPn=N,vne=Fe((Vu(),A(M(o9,1),z,374,0,[Ay,id,My,uw])))}function DPn(){DPn=N,mM(),F1n=$t,Tee=Vt,x1n=new S9($t),Mee=new S9(Vt)}function K8(){K8=N,Vcn=new VG(Xh,0),xS=new VG("IMPROVE_STRAIGHTNESS",1)}function o0e(n,e){return h3(),W(n,new Pi(e,Q(e.e.c.length+e.g.c.length)))}function f0e(n,e){return h3(),W(n,new Pi(e,Q(e.e.c.length+e.g.c.length)))}function WX(n,e){return U8(e)!=10&&A(Du(e),e.hm,e.__elementTypeId$,U8(e),n),n}function Qc(n,e){var t;return t=Fr(n,e,0),t==-1?!1:(h1(n,t),!0)}function $Pn(n,e){var t;return t=u(O2(n.e,e),387),t?(ZU(t),t.e):null}function P3(n){var e;return $r(n)&&(e=0-n,!isNaN(e))?e:bl(z3(n))}function Fr(n,e,t){for(;t=0?BT(n,t,!0,!0):Yd(n,e,!0)}function YX(n,e){Qv();var t,i;return t=S2(n),i=S2(e),!!t&&!!i&&!V$n(t.k,i.k)}function a0e(n,e){Zc(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function d0e(n,e){nu(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function b0e(n,e){Rd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function w0e(n,e){Bd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function BPn(n){(this.q?this.q:(Pn(),Pn(),ph)).Ac(n.q?n.q:(Pn(),Pn(),ph))}function g0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function p0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function RPn(n,e){vrn=new Wy,AUn=e,gm=n,u(gm.b,65),BX(gm,vrn,null),DRn(gm)}function B$(n,e,t){var i;return i=n.g[e],k5(n,e,n.oi(e,t)),n.gi(e,t,i),n.ci(),i}function BC(n,e){var t;return t=n.Xc(e),t>=0?(n.$c(t),!0):!1}function R$(n){var e;return n.d!=n.r&&(e=qs(n),n.e=!!e&&e.Cj()==kGn,n.d=e),n.e}function _$(n,e){var t;for(pe(n),pe(e),t=!1;e.Ob();)t=t|n.Fc(e.Pb());return t}function xd(n,e){var t;return t=u(te(n.e,e),387),t?(Oyn(n,t),t.e):null}function _Pn(n){var e,t;return e=n/60|0,t=n%60,t==0?""+e:""+e+":"+(""+t)}function qr(n,e){var t,i;return Ta(n),i=new FX(e,n.a),t=new iEn(i),new $n(n,t)}function ub(n,e){var t=n.a[e],i=(cF(),dR)[typeof t];return i?i(t):tQ(typeof t)}function v0e(n){switch(n.g){case 0:return nt;case 1:return-1;default:return 0}}function m0e(n){return mJ(n,(I3(),pin))<0?-xce(z3(n)):n.l+n.m*J2+n.h*$a}function U8(n){return n.__elementTypeCategory$==null?10:n.__elementTypeCategory$}function K$(n){var e;return e=n.b.c.length==0?null:un(n.b,0),e!=null&&J$(n,0),e}function KPn(n,e){for(;e[0]0&&arguments[0]!==void 0?arguments[0]:{},Ki=Ge.defaultLayoutOptions,Si=Ki===void 0?{}:Ki,Mn=Ge.algorithms,Lc=Mn===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:Mn,Nc=Ge.workerFactory,ps=Ge.workerUrl;if(j(this,It),this.defaultLayoutOptions=Si,this.initialized=!1,typeof ps>"u"&&typeof Nc>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var Rr=Nc;typeof ps<"u"&&typeof Nc>"u"&&(Rr=function(q1){return new Worker(q1)});var Ch=Rr(ps);if(typeof Ch.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new ou(Ch),this.worker.postMessage({cmd:"register",algorithms:Lc}).then(function(H1){return qt.initialized=!0}).catch(console.err)}return Ai(It,[{key:"layout",value:function(Ge){var Ki=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Si=Ki.layoutOptions,Mn=Si===void 0?this.defaultLayoutOptions:Si,Lc=Ki.logging,Nc=Lc===void 0?!1:Lc,ps=Ki.measureExecutionTime,Rr=ps===void 0?!1:ps;return Ge?this.worker.postMessage({cmd:"layout",graph:Ge,layoutOptions:Mn,options:{logging:Nc,measureExecutionTime:Rr}}):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()}}]),It}();Nt.default=Ht;var ou=function(){function It(qt){var Ge=this;if(j(this,It),qt===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=qt,this.worker.onmessage=function(Ki){setTimeout(function(){Ge.receive(Ge,Ki)},0)}}return Ai(It,[{key:"postMessage",value:function(Ge){var Ki=this.id||0;this.id=Ki+1,Ge.id=Ki;var Si=this;return new Promise(function(Mn,Lc){Si.resolvers[Ki]=function(Nc,ps){Nc?(Si.convertGwtStyleError(Nc),Lc(Nc)):Mn(ps)},Si.worker.postMessage(Ge)})}},{key:"receive",value:function(Ge,Ki){var Si=Ki.data,Mn=Ge.resolvers[Si.id];Mn&&(delete Ge.resolvers[Si.id],Si.error?Mn(Si.error):Mn(null,Si.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(Ge){if(Ge){var Ki=Ge.__java$exception;Ki&&(Ki.cause&&Ki.cause.backingJsObject&&(Ge.cause=Ki.cause.backingJsObject,this.convertGwtStyleError(Ge.cause)),delete Ge.__java$exception)}}}]),It}()},{}],2:[function(ft,dt,Nt){(function(Ai){(function(){var j;typeof window<"u"?j=window:typeof Ai<"u"?j=Ai:typeof self<"u"&&(j=self);var Ht;function ou(){}function It(){}function qt(){}function Ge(){}function Ki(){}function Si(){}function Mn(){}function Lc(){}function Nc(){}function ps(){}function Rr(){}function Ch(){}function H1(){}function q1(){}function ww(){}function Np(){}function G1(){}function Th(){}function Q1n(){}function J1n(){}function zy(){}function Y1n(){}function Z1n(){}function nln(){}function eln(){}function Xg(){}function N(){}function tln(){}function aI(){}function iln(){}function rln(){}function cln(){}function uln(){}function DH(){}function sln(){}function oln(){}function fln(){}function z1(){}function U1(){}function dI(){}function hln(){}function lln(){}function aln(){}function $H(){}function dln(){}function bln(){}function Vg(){}function Qg(){}function wln(){}function gln(){}function pln(){}function vln(){}function FH(){}function W1(){}function Jg(){}function Yg(){}function mln(){}function Vee(){}function bI(){}function kln(){}function yln(){}function jln(){}function Eln(){}function Cln(){}function Tln(){}function Mln(){}function Aln(){}function Sln(){}function Pln(){}function Iln(){}function Oln(){}function Dln(){}function $ln(){}function Fln(){}function xln(){}function Lln(){}function Nln(){}function Bln(){}function Rln(){}function _ln(){}function Kln(){}function Hln(){}function qln(){}function Gln(){}function zln(){}function Uln(){}function Wln(){}function Xln(){}function Vln(){}function Qln(){}function Jln(){}function Yln(){}function xH(){}function Zln(){}function nan(){}function ean(){}function tan(){}function wI(){}function gI(){}function Uy(){}function ian(){}function ran(){}function pI(){}function can(){}function uan(){}function san(){}function Wy(){}function oan(){}function fan(){}function han(){}function lan(){}function aan(){}function dan(){}function ban(){}function wan(){}function gan(){}function LH(){}function pan(){}function van(){}function man(){}function kan(){}function yan(){}function NH(){}function jan(){}function Ean(){}function Can(){}function Tan(){}function Man(){}function Aan(){}function San(){}function Pan(){}function Ian(){}function Oan(){}function Dan(){}function $an(){}function Fan(){}function xan(){}function vI(){}function Lan(){}function Nan(){}function Ban(){}function Ran(){}function _an(){}function BH(){}function Kan(){}function Han(){}function qan(){}function Gan(){}function zan(){}function Uan(){}function Wan(){}function Xan(){}function Van(){}function Qan(){}function Jan(){}function Yan(){}function Zan(){}function ndn(){}function edn(){}function tdn(){}function idn(){}function rdn(){}function cdn(){}function udn(){}function sdn(){}function odn(){}function fdn(){}function hdn(){}function ldn(){}function adn(){}function ddn(){}function bdn(){}function wdn(){}function gdn(){}function pdn(){}function vdn(){}function mdn(){}function kdn(){}function ydn(){}function jdn(){}function Edn(){}function Cdn(){}function Tdn(){}function Mdn(){}function Adn(){}function Sdn(){}function Pdn(){}function Idn(){}function Odn(){}function Ddn(){}function $dn(){}function Fdn(){}function xdn(){}function Ldn(){}function Ndn(){}function Bdn(){}function Rdn(){}function _dn(){}function Kdn(){}function Hdn(){}function qdn(){}function Gdn(){}function zdn(){}function Udn(){}function Wdn(){}function Xdn(){}function Vdn(){}function Qdn(){}function Jdn(){}function Ydn(){}function Zdn(){}function n0n(){}function e0n(){}function t0n(){}function i0n(){}function r0n(){}function c0n(){}function u0n(){}function s0n(){}function o0n(){}function f0n(){}function h0n(){}function l0n(){}function a0n(){}function d0n(){}function b0n(){}function w0n(){}function g0n(){}function p0n(){}function v0n(){}function m0n(){}function k0n(){}function y0n(){}function j0n(){}function E0n(){}function C0n(){}function T0n(){}function M0n(){}function A0n(){}function S0n(){}function P0n(){}function I0n(){}function O0n(){}function D0n(){}function RH(){}function $0n(){}function F0n(){}function x0n(){}function L0n(){}function N0n(){}function B0n(){}function R0n(){}function _0n(){}function K0n(){}function H0n(){}function q0n(){}function G0n(){}function z0n(){}function U0n(){}function W0n(){}function X0n(){}function V0n(){}function Q0n(){}function J0n(){}function Y0n(){}function Z0n(){}function nbn(){}function ebn(){}function tbn(){}function ibn(){}function rbn(){}function cbn(){}function ubn(){}function sbn(){}function obn(){}function fbn(){}function hbn(){}function lbn(){}function abn(){}function dbn(){}function bbn(){}function wbn(){}function gbn(){}function pbn(){}function vbn(){}function mbn(){}function kbn(){}function ybn(){}function jbn(){}function Ebn(){}function Cbn(){}function Tbn(){}function Mbn(){}function Abn(){}function Sbn(){}function Pbn(){}function Ibn(){}function Obn(){}function Dbn(){}function $bn(){}function Fbn(){}function xbn(){}function Lbn(){}function Nbn(){}function Bbn(){}function Rbn(){}function _bn(){}function Kbn(){}function Hbn(){}function qbn(){}function Gbn(){}function zbn(){}function _H(){}function Ubn(){}function Wbn(){}function Xbn(){}function Vbn(){}function Qbn(){}function Jbn(){}function Ybn(){}function Zbn(){}function nwn(){}function ewn(){}function twn(){}function iwn(){}function rwn(){}function cwn(){}function uwn(){}function swn(){}function own(){}function fwn(){}function hwn(){}function lwn(){}function KH(){}function awn(){}function dwn(){}function bwn(){}function wwn(){}function gwn(){}function pwn(){}function HH(){}function qH(){}function vwn(){}function GH(){}function zH(){}function mwn(){}function kwn(){}function ywn(){}function jwn(){}function Ewn(){}function Cwn(){}function Twn(){}function Mwn(){}function Awn(){}function UH(){}function Swn(){}function Pwn(){}function Iwn(){}function Own(){}function Dwn(){}function $wn(){}function Fwn(){}function xwn(){}function Lwn(){}function Nwn(){}function Bwn(){}function Rwn(){}function _wn(){}function Kwn(){}function Hwn(){}function qwn(){}function Gwn(){}function zwn(){}function Uwn(){}function Wwn(){}function Xwn(){}function Vwn(){}function Qwn(){}function Jwn(){}function Ywn(){}function Zwn(){}function ngn(){}function egn(){}function tgn(){}function ign(){}function rgn(){}function cgn(){}function ugn(){}function sgn(){}function ogn(){}function fgn(){}function hgn(){}function lgn(){}function agn(){}function dgn(){}function bgn(){}function wgn(){}function ggn(){}function pgn(){}function vgn(){}function mgn(){}function kgn(){}function ygn(){}function jgn(){}function Egn(){}function Cgn(){}function Tgn(){}function Mgn(){}function Agn(){}function Sgn(){}function Pgn(){}function Ign(){}function Ogn(){}function Dgn(){}function $gn(){}function Fgn(){}function xgn(){}function Lgn(){}function Ngn(){}function Bgn(){}function Rgn(){}function _gn(){}function Kgn(){}function mI(){}function kI(){}function yI(){}function Hgn(){}function qgn(){}function Ggn(){}function zgn(){}function Ugn(){}function WH(){}function Wgn(){}function Xgn(){}function Qee(){}function Vgn(){}function Qgn(){}function Jgn(){}function Ygn(){}function Zgn(){}function n2n(){}function e2n(){}function Zl(){}function t2n(){}function Zg(){}function XH(){}function i2n(){}function r2n(){}function c2n(){}function u2n(){}function s2n(){}function o2n(){}function f2n(){}function h2n(){}function l2n(){}function a2n(){}function d2n(){}function b2n(){}function w2n(){}function g2n(){}function p2n(){}function v2n(){}function m2n(){}function k2n(){}function y2n(){}function j2n(){}function E2n(){}function dn(){}function C2n(){}function T2n(){}function M2n(){}function A2n(){}function S2n(){}function P2n(){}function I2n(){}function O2n(){}function D2n(){}function $2n(){}function jI(){}function F2n(){}function x2n(){}function L2n(){}function N2n(){}function B2n(){}function VH(){}function Xy(){}function Vy(){}function R2n(){}function QH(){}function Qy(){}function _2n(){}function K2n(){}function H2n(){}function q2n(){}function G2n(){}function z2n(){}function Jy(){}function U2n(){}function W2n(){}function X2n(){}function Yy(){}function V2n(){}function JH(){}function Q2n(){}function EI(){}function YH(){}function J2n(){}function Y2n(){}function Z2n(){}function npn(){}function Jee(){}function epn(){}function tpn(){}function ipn(){}function rpn(){}function cpn(){}function upn(){}function spn(){}function opn(){}function fpn(){}function hpn(){}function Bp(){}function CI(){}function lpn(){}function apn(){}function dpn(){}function bpn(){}function wpn(){}function gpn(){}function ppn(){}function vpn(){}function mpn(){}function kpn(){}function ypn(){}function jpn(){}function Epn(){}function Cpn(){}function Tpn(){}function Mpn(){}function Apn(){}function Spn(){}function Ppn(){}function Ipn(){}function Opn(){}function Dpn(){}function $pn(){}function Fpn(){}function xpn(){}function Lpn(){}function Npn(){}function Bpn(){}function Rpn(){}function _pn(){}function Kpn(){}function Hpn(){}function qpn(){}function Gpn(){}function zpn(){}function Upn(){}function Wpn(){}function Xpn(){}function Vpn(){}function Qpn(){}function Jpn(){}function Ypn(){}function Zpn(){}function n3n(){}function e3n(){}function t3n(){}function i3n(){}function r3n(){}function c3n(){}function u3n(){}function s3n(){}function o3n(){}function f3n(){}function h3n(){}function l3n(){}function a3n(){}function d3n(){}function b3n(){}function w3n(){}function g3n(){}function p3n(){}function v3n(){}function m3n(){}function k3n(){}function y3n(){}function j3n(){}function E3n(){}function C3n(){}function T3n(){}function M3n(){}function A3n(){}function S3n(){}function P3n(){}function I3n(){}function O3n(){}function D3n(){}function $3n(){}function F3n(){}function x3n(){}function L3n(){}function N3n(){}function B3n(){}function R3n(){}function _3n(){}function K3n(){}function H3n(){}function q3n(){}function G3n(){}function z3n(){}function U3n(){}function W3n(){}function X3n(){}function V3n(){}function Q3n(){}function J3n(){}function Y3n(){}function Z3n(){}function n4n(){}function e4n(){}function t4n(){}function i4n(){}function ZH(){}function r4n(){}function c4n(){}function TI(){Rv()}function u4n(){pF()}function s4n(){a6()}function o4n(){WT()}function f4n(){YJ()}function h4n(){Go()}function l4n(){fJ()}function a4n(){C7()}function d4n(){q9()}function b4n(){H9()}function w4n(){w8()}function g4n(){v7n()}function p4n(){x2()}function v4n(){Sj()}function m4n(){PSn()}function k4n(){HIn()}function y4n(){sPn()}function j4n(){CMn()}function E4n(){V3()}function C4n(){yl()}function T4n(){qIn()}function M4n(){pAn()}function A4n(){zZ()}function S4n(){IFn()}function P4n(){TMn()}function I4n(){nn()}function O4n(){EMn()}function D4n(){GIn()}function $4n(){WOn()}function F4n(){AMn()}function x4n(){aPn()}function L4n(){m7n()}function N4n(){$Y()}function B4n(){gb()}function R4n(){pOn()}function _4n(){S7()}function K4n(){Ux()}function H4n(){ZF()}function q4n(){Zd()}function G4n(){PV()}function z4n(){MMn()}function U4n(){BBn()}function W4n(){IY()}function X4n(){Bx()}function V4n(){DC()}function Q4n(){nM()}function nq(){Xe()}function J4n(){wT()}function Y4n(){NQ()}function eq(){mM()}function Fo(){dEn()}function tq(){eF()}function Z4n(){pZ()}function iq(n){_n(n)}function nvn(n){this.a=n}function Zy(n){this.a=n}function evn(n){this.a=n}function tvn(n){this.a=n}function ivn(n){this.a=n}function rvn(n){this.a=n}function cvn(n){this.a=n}function uvn(n){this.a=n}function rq(n){this.a=n}function cq(n){this.a=n}function svn(n){this.a=n}function MI(n){this.a=n}function ovn(n){this.a=n}function AI(n){this.a=n}function fvn(n){this.a=n}function SI(n){this.a=n}function hvn(n){this.a=n}function PI(n){this.a=n}function lvn(n){this.a=n}function avn(n){this.a=n}function dvn(n){this.a=n}function uq(n){this.b=n}function bvn(n){this.c=n}function wvn(n){this.a=n}function gvn(n){this.a=n}function pvn(n){this.a=n}function vvn(n){this.a=n}function mvn(n){this.a=n}function kvn(n){this.a=n}function yvn(n){this.a=n}function jvn(n){this.a=n}function Evn(n){this.a=n}function Cvn(n){this.a=n}function Tvn(n){this.a=n}function Mvn(n){this.a=n}function Avn(n){this.a=n}function sq(n){this.a=n}function oq(n){this.a=n}function nj(n){this.a=n}function M9(n){this.a=n}function na(){this.a=[]}function Svn(n,e){n.a=e}function Yee(n,e){n.a=e}function Zee(n,e){n.b=e}function nte(n,e){n.b=e}function ete(n,e){n.b=e}function fq(n,e){n.j=e}function tte(n,e){n.g=e}function ite(n,e){n.i=e}function rte(n,e){n.c=e}function cte(n,e){n.d=e}function ute(n,e){n.d=e}function ste(n,e){n.c=e}function ea(n,e){n.k=e}function ote(n,e){n.c=e}function hq(n,e){n.c=e}function lq(n,e){n.a=e}function fte(n,e){n.a=e}function hte(n,e){n.f=e}function lte(n,e){n.a=e}function ate(n,e){n.b=e}function II(n,e){n.d=e}function ej(n,e){n.i=e}function aq(n,e){n.o=e}function dte(n,e){n.r=e}function bte(n,e){n.a=e}function wte(n,e){n.b=e}function Pvn(n,e){n.e=e}function gte(n,e){n.f=e}function dq(n,e){n.g=e}function pte(n,e){n.e=e}function vte(n,e){n.f=e}function mte(n,e){n.f=e}function kte(n,e){n.n=e}function yte(n,e){n.a=e}function jte(n,e){n.a=e}function Ete(n,e){n.c=e}function Cte(n,e){n.c=e}function Tte(n,e){n.d=e}function Mte(n,e){n.e=e}function Ate(n,e){n.g=e}function Ste(n,e){n.a=e}function Pte(n,e){n.c=e}function Ite(n,e){n.d=e}function Ote(n,e){n.e=e}function Dte(n,e){n.f=e}function $te(n,e){n.j=e}function Fte(n,e){n.a=e}function xte(n,e){n.b=e}function Lte(n,e){n.a=e}function Ivn(n){n.b=n.a}function Ovn(n){n.c=n.d.d}function $v(n){this.d=n}function ta(n){this.a=n}function Rp(n){this.a=n}function bq(n){this.a=n}function Mh(n){this.a=n}function A9(n){this.a=n}function Dvn(n){this.a=n}function wq(n){this.a=n}function S9(n){this.a=n}function gq(n){this.a=n}function pq(n){this.a=n}function vq(n){this.a=n}function L0(n){this.a=n}function P9(n){this.a=n}function I9(n){this.a=n}function mq(n){this.b=n}function _p(n){this.b=n}function Kp(n){this.b=n}function OI(n){this.a=n}function $vn(n){this.a=n}function kq(n){this.a=n}function DI(n){this.c=n}function E(n){this.c=n}function Fvn(n){this.c=n}function yq(n){this.a=n}function jq(n){this.a=n}function Eq(n){this.a=n}function Cq(n){this.a=n}function ut(n){this.a=n}function xvn(n){this.a=n}function Tq(n){this.a=n}function Mq(n){this.a=n}function Lvn(n){this.a=n}function Nvn(n){this.a=n}function Fv(n){this.a=n}function Bvn(n){this.a=n}function Rvn(n){this.a=n}function _vn(n){this.a=n}function Kvn(n){this.a=n}function Hvn(n){this.a=n}function qvn(n){this.a=n}function Gvn(n){this.a=n}function zvn(n){this.a=n}function Uvn(n){this.a=n}function Wvn(n){this.a=n}function Xvn(n){this.a=n}function Vvn(n){this.a=n}function Qvn(n){this.a=n}function Jvn(n){this.a=n}function Yvn(n){this.a=n}function Zvn(n){this.a=n}function n5n(n){this.a=n}function O9(n){this.a=n}function e5n(n){this.a=n}function t5n(n){this.a=n}function tj(n){this.a=n}function i5n(n){this.a=n}function r5n(n){this.a=n}function Hp(n){this.a=n}function Aq(n){this.a=n}function c5n(n){this.a=n}function u5n(n){this.a=n}function s5n(n){this.a=n}function o5n(n){this.a=n}function f5n(n){this.a=n}function Sq(n){this.a=n}function Pq(n){this.a=n}function Iq(n){this.a=n}function ij(n){this.a=n}function rj(n){this.e=n}function qp(n){this.a=n}function h5n(n){this.a=n}function n2(n){this.a=n}function Oq(n){this.a=n}function l5n(n){this.a=n}function a5n(n){this.a=n}function d5n(n){this.a=n}function b5n(n){this.a=n}function w5n(n){this.a=n}function g5n(n){this.a=n}function p5n(n){this.a=n}function v5n(n){this.a=n}function m5n(n){this.a=n}function k5n(n){this.a=n}function y5n(n){this.a=n}function Dq(n){this.a=n}function j5n(n){this.a=n}function E5n(n){this.a=n}function C5n(n){this.a=n}function T5n(n){this.a=n}function M5n(n){this.a=n}function A5n(n){this.a=n}function S5n(n){this.a=n}function P5n(n){this.a=n}function I5n(n){this.a=n}function O5n(n){this.a=n}function D5n(n){this.a=n}function $5n(n){this.a=n}function F5n(n){this.a=n}function x5n(n){this.a=n}function L5n(n){this.a=n}function N5n(n){this.a=n}function B5n(n){this.a=n}function R5n(n){this.a=n}function _5n(n){this.a=n}function K5n(n){this.a=n}function H5n(n){this.a=n}function q5n(n){this.a=n}function G5n(n){this.a=n}function z5n(n){this.a=n}function U5n(n){this.a=n}function W5n(n){this.a=n}function X5n(n){this.a=n}function V5n(n){this.a=n}function Q5n(n){this.a=n}function J5n(n){this.a=n}function Y5n(n){this.a=n}function Z5n(n){this.a=n}function n6n(n){this.a=n}function e6n(n){this.a=n}function t6n(n){this.a=n}function i6n(n){this.a=n}function r6n(n){this.a=n}function c6n(n){this.c=n}function u6n(n){this.b=n}function s6n(n){this.a=n}function o6n(n){this.a=n}function f6n(n){this.a=n}function h6n(n){this.a=n}function l6n(n){this.a=n}function a6n(n){this.a=n}function d6n(n){this.a=n}function b6n(n){this.a=n}function w6n(n){this.a=n}function g6n(n){this.a=n}function p6n(n){this.a=n}function v6n(n){this.a=n}function m6n(n){this.a=n}function k6n(n){this.a=n}function y6n(n){this.a=n}function j6n(n){this.a=n}function E6n(n){this.a=n}function C6n(n){this.a=n}function T6n(n){this.a=n}function M6n(n){this.a=n}function A6n(n){this.a=n}function S6n(n){this.a=n}function P6n(n){this.a=n}function I6n(n){this.a=n}function X1(n){this.a=n}function e2(n){this.a=n}function O6n(n){this.a=n}function D6n(n){this.a=n}function $6n(n){this.a=n}function F6n(n){this.a=n}function x6n(n){this.a=n}function L6n(n){this.a=n}function N6n(n){this.a=n}function B6n(n){this.a=n}function R6n(n){this.a=n}function _6n(n){this.a=n}function K6n(n){this.a=n}function H6n(n){this.a=n}function q6n(n){this.a=n}function G6n(n){this.a=n}function z6n(n){this.a=n}function U6n(n){this.a=n}function cj(n){this.a=n}function W6n(n){this.a=n}function X6n(n){this.a=n}function V6n(n){this.a=n}function Q6n(n){this.a=n}function J6n(n){this.a=n}function Y6n(n){this.a=n}function Z6n(n){this.a=n}function nmn(n){this.a=n}function emn(n){this.a=n}function tmn(n){this.a=n}function imn(n){this.a=n}function rmn(n){this.a=n}function cmn(n){this.a=n}function umn(n){this.a=n}function smn(n){this.a=n}function omn(n){this.a=n}function fmn(n){this.a=n}function hmn(n){this.a=n}function lmn(n){this.a=n}function amn(n){this.a=n}function dmn(n){this.a=n}function bmn(n){this.a=n}function wmn(n){this.a=n}function gmn(n){this.a=n}function pmn(n){this.a=n}function vmn(n){this.a=n}function mmn(n){this.a=n}function kmn(n){this.a=n}function $q(n){this.a=n}function kt(n){this.b=n}function ymn(n){this.f=n}function Fq(n){this.a=n}function jmn(n){this.a=n}function Emn(n){this.a=n}function Cmn(n){this.a=n}function Tmn(n){this.a=n}function Mmn(n){this.a=n}function Amn(n){this.a=n}function Smn(n){this.a=n}function Pmn(n){this.a=n}function D9(n){this.a=n}function Imn(n){this.a=n}function Omn(n){this.b=n}function xq(n){this.c=n}function uj(n){this.e=n}function Dmn(n){this.a=n}function sj(n){this.a=n}function oj(n){this.a=n}function $I(n){this.a=n}function $mn(n){this.a=n}function Fmn(n){this.d=n}function Lq(n){this.a=n}function Nq(n){this.a=n}function cd(n){this.e=n}function Nte(){this.a=0}function gw(){dyn(this)}function X(){RO(this)}function we(){Eu(this)}function FI(){pTn(this)}function xmn(){}function ud(){this.c=p1n}function Bte(n,e){e.Wb(n)}function Lmn(n,e){n.b+=e}function Nmn(n){n.b=new JI}function T(n){return n.e}function Rte(n){return n.a}function _te(n){return n.a}function Kte(n){return n.a}function Hte(n){return n.a}function qte(n){return n.a}function Gte(){return null}function zte(){return null}function Ute(){EG(),iTe()}function Wte(n){n.b.tf(n.e)}function xv(n,e){n.b=e-n.b}function Lv(n,e){n.a=e-n.a}function Bmn(n,e){e.ad(n.a)}function Xte(n,e){ui(e,n)}function Vte(n,e,t){n.Od(t,e)}function $9(n,e){n.e=e,e.b=n}function Bq(n){Df(),this.a=n}function Rmn(n){Df(),this.a=n}function _mn(n){Df(),this.a=n}function Rq(n){nb(),this.a=n}function Kmn(n){k3(),aR.be(n)}function ia(){Qyn.call(this)}function _q(){Qyn.call(this)}function Kq(){ia.call(this)}function xI(){ia.call(this)}function Hmn(){ia.call(this)}function F9(){ia.call(this)}function fu(){ia.call(this)}function Nv(){ia.call(this)}function ye(){ia.call(this)}function vs(){ia.call(this)}function qmn(){ia.call(this)}function ic(){ia.call(this)}function Gmn(){ia.call(this)}function zmn(){this.a=this}function fj(){this.Bb|=256}function Umn(){this.b=new Xkn}function Hq(){Hq=N,new we}function qq(){Kq.call(this)}function Wmn(n,e){n.length=e}function hj(n,e){W(n.a,e)}function Qte(n,e){nY(n.c,e)}function Jte(n,e){ri(n.b,e)}function Yte(n,e){KT(n.a,e)}function Zte(n,e){MF(n.a,e)}function Gp(n,e){et(n.e,e)}function t2(n){iM(n.c,n.b)}function nie(n,e){n.kc().Nb(e)}function Gq(n){this.a=Yge(n)}function fi(){this.a=new we}function Xmn(){this.a=new we}function lj(){this.a=new X}function LI(){this.a=new X}function zq(){this.a=new X}function Ns(){this.a=new Oln}function ra(){this.a=new TSn}function Uq(){this.a=new LH}function Wq(){this.a=new h7n}function Vmn(){this.a=new YMn}function Xq(){this.a=new bMn}function Vq(){this.a=new Bjn}function Qmn(){this.a=new X}function Qq(){this.a=new X}function Jmn(){this.a=new X}function Ymn(){this.a=new X}function Zmn(){this.d=new X}function n9n(){this.a=new fi}function e9n(){this.a=new we}function t9n(){this.b=new we}function i9n(){this.b=new X}function Jq(){this.e=new X}function r9n(){this.d=new X}function c9n(){this.a=new C4n}function u9n(){X.call(this)}function Yq(){lj.call(this)}function s9n(){kE.call(this)}function o9n(){Qq.call(this)}function NI(){Bv.call(this)}function Bv(){xmn.call(this)}function i2(){xmn.call(this)}function Zq(){i2.call(this)}function f9n(){zTn.call(this)}function h9n(){zTn.call(this)}function l9n(){uG.call(this)}function a9n(){uG.call(this)}function d9n(){uG.call(this)}function b9n(){sG.call(this)}function hu(){Ct.call(this)}function nG(){B2n.call(this)}function eG(){B2n.call(this)}function w9n(){O9n.call(this)}function g9n(){O9n.call(this)}function p9n(){we.call(this)}function v9n(){we.call(this)}function m9n(){we.call(this)}function k9n(){fi.call(this)}function BI(){RIn.call(this)}function y9n(){fj.call(this)}function RI(){Oz.call(this)}function _I(){Oz.call(this)}function tG(){we.call(this)}function KI(){we.call(this)}function j9n(){we.call(this)}function iG(){Yy.call(this)}function E9n(){Yy.call(this)}function C9n(){iG.call(this)}function T9n(){ZH.call(this)}function M9n(n){hIn.call(this,n)}function A9n(n){hIn.call(this,n)}function rG(n){rq.call(this,n)}function cG(n){n7n.call(this,n)}function eie(n){cG.call(this,n)}function tie(n){n7n.call(this,n)}function zp(){this.a=new Ct}function uG(){this.a=new fi}function sG(){this.a=new we}function S9n(){this.a=new X}function P9n(){this.j=new X}function oG(){this.a=new Rgn}function I9n(){this.a=new T8n}function O9n(){this.a=new X2n}function HI(){HI=N,uR=new V9n}function qI(){qI=N,cR=new X9n}function Rv(){Rv=N,rR=new It}function aj(){aj=N,fR=new Xyn}function iie(n){cG.call(this,n)}function rie(n){cG.call(this,n)}function D9n(n){m$.call(this,n)}function $9n(n){m$.call(this,n)}function F9n(n){uEn.call(this,n)}function GI(n){C5e.call(this,n)}function sd(n){_0.call(this,n)}function _v(n){Cj.call(this,n)}function fG(n){Cj.call(this,n)}function x9n(n){Cj.call(this,n)}function _r(n){kCn.call(this,n)}function L9n(n){_r.call(this,n)}function r2(){M9.call(this,{})}function dj(n){c3(),this.a=n}function Kv(n){n.b=null,n.c=0}function cie(n,e){n.e=e,NNn(n,e)}function uie(n,e){n.a=e,h6e(n)}function zI(n,e,t){n.a[e.g]=t}function sie(n,e,t){M4e(t,n,e)}function oie(n,e){$ue(e.i,n.n)}function N9n(n,e){Fwe(n).td(e)}function fie(n,e){return n*n/e}function B9n(n,e){return n.g-e.g}function hie(n){return new nj(n)}function lie(n){return new Z0(n)}function bj(n){_r.call(this,n)}function vr(n){_r.call(this,n)}function R9n(n){_r.call(this,n)}function UI(n){kCn.call(this,n)}function WI(n){AV(),this.a=n}function _9n(n){aEn(),this.a=n}function N0(n){ED(),this.f=n}function XI(n){ED(),this.f=n}function Up(n){_r.call(this,n)}function Hn(n){_r.call(this,n)}function Dr(n){_r.call(this,n)}function K9n(n){_r.call(this,n)}function c2(n){_r.call(this,n)}function on(n){return _n(n),n}function K(n){return _n(n),n}function x9(n){return _n(n),n}function hG(n){return _n(n),n}function aie(n){return _n(n),n}function Hv(n){return n.b==n.c}function B0(n){return!!n&&n.b}function die(n){return!!n&&n.k}function bie(n){return!!n&&n.j}function Ku(n){_n(n),this.a=n}function lG(n){return ja(n),n}function qv(n){EW(n,n.length)}function t1(n){_r.call(this,n)}function Af(n){_r.call(this,n)}function VI(n){_r.call(this,n)}function pw(n){_r.call(this,n)}function Gv(n){_r.call(this,n)}function Ee(n){_r.call(this,n)}function QI(n){Vz.call(this,n,0)}function JI(){iX.call(this,12,3)}function aG(){aG=N,din=new Q1n}function H9n(){H9n=N,ain=new ou}function wj(){wj=N,dm=new H1}function q9n(){q9n=N,vzn=new ww}function G9n(){throw T(new ye)}function dG(){throw T(new ye)}function z9n(){throw T(new ye)}function wie(){throw T(new ye)}function gie(){throw T(new ye)}function pie(){throw T(new ye)}function YI(){this.a=Ce(pe(Ji))}function u2(n){Df(),this.a=pe(n)}function U9n(n,e){n.Td(e),e.Sd(n)}function vie(n,e){n.a.ec().Mc(e)}function mie(n,e,t){n.c.lf(e,t)}function bG(n){vr.call(this,n)}function Sf(n){Hn.call(this,n)}function i1(){A9.call(this,"")}function zv(){A9.call(this,"")}function V1(){A9.call(this,"")}function R0(){A9.call(this,"")}function wG(n){vr.call(this,n)}function Wp(n){_p.call(this,n)}function ZI(n){lE.call(this,n)}function W9n(n){Wp.call(this,n)}function X9n(){AI.call(this,null)}function V9n(){AI.call(this,null)}function gj(){gj=N,k3()}function Q9n(){Q9n=N,Szn=Z4e()}function J9n(n){return n.a?n.b:0}function kie(n){return n.a?n.b:0}function yie(n,e){return n.a-e.a}function jie(n,e){return n.a-e.a}function Eie(n,e){return n.a-e.a}function pj(n,e){return WX(n,e)}function M(n,e){return pMn(n,e)}function Cie(n,e){return e in n.a}function Y9n(n,e){return n.f=e,n}function Tie(n,e){return n.b=e,n}function Z9n(n,e){return n.c=e,n}function Mie(n,e){return n.g=e,n}function gG(n,e){return n.a=e,n}function pG(n,e){return n.f=e,n}function Aie(n,e){return n.k=e,n}function vG(n,e){return n.a=e,n}function Sie(n,e){return n.e=e,n}function mG(n,e){return n.e=e,n}function Pie(n,e){return n.f=e,n}function Iie(n,e){n.b=!0,n.d=e}function Oie(n,e){n.b=new mr(e)}function Die(n,e,t){e.td(n.a[t])}function $ie(n,e,t){e.we(n.a[t])}function Fie(n,e){return n.b-e.b}function xie(n,e){return n.g-e.g}function Lie(n,e){return n.s-e.s}function Nie(n,e){return n?0:e-1}function n8n(n,e){return n?0:e-1}function Bie(n,e){return n?e-1:0}function Rie(n,e){return e.Yf(n)}function od(n,e){return n.b=e,n}function vj(n,e){return n.a=e,n}function fd(n,e){return n.c=e,n}function hd(n,e){return n.d=e,n}function ld(n,e){return n.e=e,n}function kG(n,e){return n.f=e,n}function Uv(n,e){return n.a=e,n}function Xp(n,e){return n.b=e,n}function Vp(n,e){return n.c=e,n}function gn(n,e){return n.c=e,n}function Dn(n,e){return n.b=e,n}function pn(n,e){return n.d=e,n}function vn(n,e){return n.e=e,n}function _ie(n,e){return n.f=e,n}function mn(n,e){return n.g=e,n}function kn(n,e){return n.a=e,n}function yn(n,e){return n.i=e,n}function jn(n,e){return n.j=e,n}function e8n(n,e){return n.k=e,n}function Kie(n,e){return n.j=e,n}function Hie(n,e){yl(),Hr(e,n)}function qie(n,e,t){Nfe(n.a,e,t)}function t8n(n){mTn.call(this,n)}function yG(n){mTn.call(this,n)}function mj(n){uD.call(this,n)}function i8n(n){u2e.call(this,n)}function Q1(n){Ld.call(this,n)}function r8n(n){XD.call(this,n)}function c8n(n){XD.call(this,n)}function u8n(){Mz.call(this,"")}function Li(){this.a=0,this.b=0}function s8n(){this.b=0,this.a=0}function o8n(n,e){n.b=0,hb(n,e)}function Gie(n,e){n.c=e,n.b=!0}function f8n(n,e){return n.c._b(e)}function xo(n){return n.e&&n.e()}function nO(n){return n?n.d:null}function h8n(n,e){return LDn(n.b,e)}function zie(n){return n?n.g:null}function Uie(n){return n?n.i:null}function J1(n){return Ph(n),n.o}function ad(){ad=N,Mne=h4e()}function l8n(){l8n=N,vi=jve()}function Qp(){Qp=N,g1n=a4e()}function a8n(){a8n=N,hee=l4e()}function jG(){jG=N,oc=s6e()}function EG(){EG=N,Wl=N3()}function d8n(){throw T(new ye)}function b8n(){throw T(new ye)}function w8n(){throw T(new ye)}function g8n(){throw T(new ye)}function p8n(){throw T(new ye)}function v8n(){throw T(new ye)}function kj(n){this.a=new s2(n)}function CG(n){d_n(),gTe(this,n)}function Y1(n){this.a=new AD(n)}function vw(n,e){for(;n.ye(e););}function TG(n,e){for(;n.sd(e););}function mw(n,e){return n.a+=e,n}function eO(n,e){return n.a+=e,n}function r1(n,e){return n.a+=e,n}function dd(n,e){return n.a+=e,n}function Wv(n){return fl(n),n.a}function yj(n){return n.b!=n.d.c}function m8n(n){return n.l|n.m<<22}function MG(n,e){return n.d[e.p]}function k8n(n,e){return Q8e(n,e)}function AG(n,e,t){n.splice(e,t)}function y8n(n){n.c?rBn(n):cBn(n)}function jj(n){this.a=0,this.b=n}function j8n(){this.a=new B7(Pon)}function E8n(){this.b=new B7(won)}function C8n(){this.b=new B7(OK)}function T8n(){this.b=new B7(OK)}function M8n(){throw T(new ye)}function A8n(){throw T(new ye)}function S8n(){throw T(new ye)}function P8n(){throw T(new ye)}function I8n(){throw T(new ye)}function O8n(){throw T(new ye)}function D8n(){throw T(new ye)}function $8n(){throw T(new ye)}function F8n(){throw T(new ye)}function x8n(){throw T(new ye)}function Wie(){throw T(new ic)}function Xie(){throw T(new ic)}function L9(n){this.a=new L8n(n)}function L8n(n){cbe(this,n,cve())}function N9(n){return!n||iTn(n)}function B9(n){return Tf[n]!=-1}function Vie(){_A!=0&&(_A=0),KA=-1}function N8n(){iR==null&&(iR=[])}function Qie(n,e){$x(R(n.a),e)}function Jie(n,e){$x(R(n.a),e)}function R9(n,e){Sw.call(this,n,e)}function Jp(n,e){R9.call(this,n,e)}function SG(n,e){this.b=n,this.c=e}function B8n(n,e){this.b=n,this.a=e}function R8n(n,e){this.a=n,this.b=e}function _8n(n,e){this.a=n,this.b=e}function K8n(n,e){this.a=n,this.b=e}function H8n(n,e){this.a=n,this.b=e}function q8n(n,e){this.a=n,this.b=e}function G8n(n,e){this.a=n,this.b=e}function z8n(n,e){this.a=n,this.b=e}function U8n(n,e){this.a=n,this.b=e}function W8n(n,e){this.b=n,this.a=e}function X8n(n,e){this.b=n,this.a=e}function V8n(n,e){this.b=n,this.a=e}function Q8n(n,e){this.b=n,this.a=e}function Oe(n,e){this.f=n,this.g=e}function Yp(n,e){this.e=n,this.d=e}function bd(n,e){this.g=n,this.i=e}function tO(n,e){this.a=n,this.b=e}function J8n(n,e){this.a=n,this.f=e}function Y8n(n,e){this.b=n,this.c=e}function Yie(n,e){this.a=n,this.b=e}function Z8n(n,e){this.a=n,this.b=e}function iO(n,e){this.a=n,this.b=e}function n7n(n){Bz(n.dc()),this.c=n}function Ej(n){this.b=u(pe(n),83)}function e7n(n){this.a=u(pe(n),83)}function _0(n){this.a=u(pe(n),15)}function t7n(n){this.a=u(pe(n),15)}function Cj(n){this.b=u(pe(n),47)}function Tj(){this.q=new j.Date}function Zf(){Zf=N,Sin=new tln}function Zp(){Zp=N,X4=new nln}function Xv(n){return n.f.c+n.g.c}function _9(n,e){return n.b.Hc(e)}function i7n(n,e){return n.b.Ic(e)}function r7n(n,e){return n.b.Qc(e)}function c7n(n,e){return n.b.Hc(e)}function u7n(n,e){return n.c.uc(e)}function Ah(n,e){return n.a._b(e)}function s7n(n,e){return tt(n.c,e)}function o7n(n,e){return zu(n.b,e)}function f7n(n,e){return n>e&&e0}function cO(n,e){return fc(n,e)<0}function n5(n,e){return n.a.get(e)}function lre(n,e){return e.split(n)}function S7n(n,e){return zu(n.e,e)}function LG(n){return _n(n),!1}function xj(n){xn.call(this,n,21)}function are(n,e){cMn.call(this,n,e)}function Lj(n,e){Oe.call(this,n,e)}function uO(n,e){Oe.call(this,n,e)}function NG(n){_D(),uEn.call(this,n)}function BG(n,e){fCn(n,n.length,e)}function z9(n,e){BCn(n,n.length,e)}function dre(n,e,t){e.ud(n.a.Ge(t))}function bre(n,e,t){e.we(n.a.Fe(t))}function wre(n,e,t){e.td(n.a.Kb(t))}function gre(n,e,t){n.Mb(t)&&e.td(t)}function e5(n,e,t){n.splice(e,0,t)}function pre(n,e){return au(n.e,e)}function Nj(n,e){this.d=n,this.e=e}function P7n(n,e){this.b=n,this.a=e}function I7n(n,e){this.b=n,this.a=e}function RG(n,e){this.b=n,this.a=e}function O7n(n,e){this.a=n,this.b=e}function D7n(n,e){this.a=n,this.b=e}function $7n(n,e){this.a=n,this.b=e}function F7n(n,e){this.a=n,this.b=e}function f2(n,e){this.a=n,this.b=e}function _G(n,e){this.b=n,this.a=e}function KG(n,e){this.b=n,this.a=e}function Bj(n,e){Oe.call(this,n,e)}function Rj(n,e){Oe.call(this,n,e)}function HG(n,e){Oe.call(this,n,e)}function qG(n,e){Oe.call(this,n,e)}function kw(n,e){Oe.call(this,n,e)}function sO(n,e){Oe.call(this,n,e)}function oO(n,e){Oe.call(this,n,e)}function fO(n,e){Oe.call(this,n,e)}function _j(n,e){Oe.call(this,n,e)}function GG(n,e){Oe.call(this,n,e)}function hO(n,e){Oe.call(this,n,e)}function U9(n,e){Oe.call(this,n,e)}function Kj(n,e){Oe.call(this,n,e)}function lO(n,e){Oe.call(this,n,e)}function t5(n,e){Oe.call(this,n,e)}function zG(n,e){Oe.call(this,n,e)}function zt(n,e){Oe.call(this,n,e)}function Hj(n,e){Oe.call(this,n,e)}function x7n(n,e){this.a=n,this.b=e}function L7n(n,e){this.a=n,this.b=e}function N7n(n,e){this.a=n,this.b=e}function B7n(n,e){this.a=n,this.b=e}function R7n(n,e){this.a=n,this.b=e}function _7n(n,e){this.a=n,this.b=e}function K7n(n,e){this.a=n,this.b=e}function H7n(n,e){this.a=n,this.b=e}function q7n(n,e){this.a=n,this.b=e}function UG(n,e){this.b=n,this.a=e}function G7n(n,e){this.b=n,this.a=e}function z7n(n,e){this.b=n,this.a=e}function U7n(n,e){this.b=n,this.a=e}function t3(n,e){this.c=n,this.d=e}function W7n(n,e){this.e=n,this.d=e}function X7n(n,e){this.a=n,this.b=e}function V7n(n,e){this.b=e,this.c=n}function qj(n,e){Oe.call(this,n,e)}function W9(n,e){Oe.call(this,n,e)}function aO(n,e){Oe.call(this,n,e)}function i5(n,e){Oe.call(this,n,e)}function WG(n,e){Oe.call(this,n,e)}function dO(n,e){Oe.call(this,n,e)}function bO(n,e){Oe.call(this,n,e)}function X9(n,e){Oe.call(this,n,e)}function XG(n,e){Oe.call(this,n,e)}function wO(n,e){Oe.call(this,n,e)}function r5(n,e){Oe.call(this,n,e)}function VG(n,e){Oe.call(this,n,e)}function c5(n,e){Oe.call(this,n,e)}function u5(n,e){Oe.call(this,n,e)}function H0(n,e){Oe.call(this,n,e)}function gO(n,e){Oe.call(this,n,e)}function pO(n,e){Oe.call(this,n,e)}function QG(n,e){Oe.call(this,n,e)}function s5(n,e){Oe.call(this,n,e)}function vO(n,e){Oe.call(this,n,e)}function Gj(n,e){Oe.call(this,n,e)}function V9(n,e){Oe.call(this,n,e)}function Q9(n,e){Oe.call(this,n,e)}function h2(n,e){Oe.call(this,n,e)}function mO(n,e){Oe.call(this,n,e)}function JG(n,e){Oe.call(this,n,e)}function kO(n,e){Oe.call(this,n,e)}function yO(n,e){Oe.call(this,n,e)}function YG(n,e){Oe.call(this,n,e)}function jO(n,e){Oe.call(this,n,e)}function EO(n,e){Oe.call(this,n,e)}function CO(n,e){Oe.call(this,n,e)}function TO(n,e){Oe.call(this,n,e)}function ZG(n,e){Oe.call(this,n,e)}function Q7n(n,e){this.b=n,this.a=e}function J7n(n,e){this.a=n,this.b=e}function Y7n(n,e){this.a=n,this.b=e}function Z7n(n,e){this.a=n,this.b=e}function nkn(n,e){this.a=n,this.b=e}function nz(n,e){Oe.call(this,n,e)}function ez(n,e){Oe.call(this,n,e)}function ekn(n,e){this.b=n,this.d=e}function tz(n,e){Oe.call(this,n,e)}function iz(n,e){Oe.call(this,n,e)}function tkn(n,e){this.a=n,this.b=e}function ikn(n,e){this.a=n,this.b=e}function zj(n,e){Oe.call(this,n,e)}function o5(n,e){Oe.call(this,n,e)}function rz(n,e){Oe.call(this,n,e)}function cz(n,e){Oe.call(this,n,e)}function uz(n,e){Oe.call(this,n,e)}function MO(n,e){Oe.call(this,n,e)}function sz(n,e){Oe.call(this,n,e)}function AO(n,e){Oe.call(this,n,e)}function Uj(n,e){Oe.call(this,n,e)}function SO(n,e){Oe.call(this,n,e)}function PO(n,e){Oe.call(this,n,e)}function J9(n,e){Oe.call(this,n,e)}function IO(n,e){Oe.call(this,n,e)}function oz(n,e){Oe.call(this,n,e)}function Y9(n,e){Oe.call(this,n,e)}function fz(n,e){Oe.call(this,n,e)}function vre(n,e){return au(n.c,e)}function mre(n,e){return au(e.b,n)}function kre(n,e){return-n.b.Je(e)}function hz(n,e){return au(n.g,e)}function Z9(n,e){Oe.call(this,n,e)}function l2(n,e){Oe.call(this,n,e)}function rkn(n,e){this.a=n,this.b=e}function ckn(n,e){this.a=n,this.b=e}function fn(n,e){this.a=n,this.b=e}function f5(n,e){Oe.call(this,n,e)}function h5(n,e){Oe.call(this,n,e)}function n8(n,e){Oe.call(this,n,e)}function OO(n,e){Oe.call(this,n,e)}function Wj(n,e){Oe.call(this,n,e)}function l5(n,e){Oe.call(this,n,e)}function DO(n,e){Oe.call(this,n,e)}function Xj(n,e){Oe.call(this,n,e)}function yw(n,e){Oe.call(this,n,e)}function e8(n,e){Oe.call(this,n,e)}function a5(n,e){Oe.call(this,n,e)}function d5(n,e){Oe.call(this,n,e)}function t8(n,e){Oe.call(this,n,e)}function Vj(n,e){Oe.call(this,n,e)}function jw(n,e){Oe.call(this,n,e)}function Qj(n,e){Oe.call(this,n,e)}function ukn(n,e){this.a=n,this.b=e}function skn(n,e){this.a=n,this.b=e}function okn(n,e){this.a=n,this.b=e}function fkn(n,e){this.a=n,this.b=e}function hkn(n,e){this.a=n,this.b=e}function lkn(n,e){this.a=n,this.b=e}function Pi(n,e){this.a=n,this.b=e}function Jj(n,e){Oe.call(this,n,e)}function akn(n,e){this.a=n,this.b=e}function dkn(n,e){this.a=n,this.b=e}function bkn(n,e){this.a=n,this.b=e}function wkn(n,e){this.a=n,this.b=e}function gkn(n,e){this.a=n,this.b=e}function pkn(n,e){this.a=n,this.b=e}function vkn(n,e){this.b=n,this.a=e}function mkn(n,e){this.b=n,this.a=e}function kkn(n,e){this.b=n,this.a=e}function ykn(n,e){this.b=n,this.a=e}function jkn(n,e){this.a=n,this.b=e}function Ekn(n,e){this.a=n,this.b=e}function yre(n,e){J9e(n.a,u(e,56))}function Ckn(n,e){f0e(n.a,u(e,11))}function jre(n,e){return h3(),e!=n}function Tkn(){return Q9n(),new Szn}function Mkn(){c$(),this.b=new fi}function Akn(){hM(),this.a=new fi}function Skn(){tX(),lW.call(this)}function a2(n,e){Oe.call(this,n,e)}function Pkn(n,e){this.a=n,this.b=e}function Ikn(n,e){this.a=n,this.b=e}function Yj(n,e){this.a=n,this.b=e}function Okn(n,e){this.a=n,this.b=e}function Dkn(n,e){this.a=n,this.b=e}function $kn(n,e){this.a=n,this.b=e}function Fkn(n,e){this.d=n,this.b=e}function lz(n,e){this.d=n,this.e=e}function xkn(n,e){this.f=n,this.c=e}function i8(n,e){this.b=n,this.c=e}function az(n,e){this.i=n,this.g=e}function Lkn(n,e){this.e=n,this.a=e}function Nkn(n,e){this.a=n,this.b=e}function dz(n,e){n.i=null,nT(n,e)}function Ere(n,e){n&&it($y,n,e)}function Bkn(n,e){return NF(n.a,e)}function Zj(n){return g7(n.c,n.b)}function Vr(n){return n?n.dd():null}function B(n){return n??null}function q0(n){return typeof n===X2}function G0(n){return typeof n===UZ}function mi(n){return typeof n===EL}function el(n,e){return n.Hd().Xb(e)}function nE(n,e){return Rbe(n.Kc(),e)}function gd(n,e){return fc(n,e)==0}function Cre(n,e){return fc(n,e)>=0}function b5(n,e){return fc(n,e)!=0}function Tre(n){return""+(_n(n),n)}function r8(n,e){return n.substr(e)}function Rkn(n){return $u(n),n.d.gc()}function $O(n){return yme(n,n.c),n}function eE(n){return A5(n==null),n}function w5(n,e){return n.a+=""+e,n}function dr(n,e){return n.a+=""+e,n}function g5(n,e){return n.a+=""+e,n}function rc(n,e){return n.a+=""+e,n}function De(n,e){return n.a+=""+e,n}function bz(n,e){return n.a+=""+e,n}function _kn(n,e){Kt(n,e,n.a,n.a.a)}function ua(n,e){Kt(n,e,n.c.b,n.c)}function Mre(n,e,t){VFn(e,Mx(n,t))}function Are(n,e,t){VFn(e,Mx(n,t))}function Sre(n,e){k0e(new ie(n),e)}function Kkn(n,e){n.q.setTime($d(e))}function Hkn(n,e){kW.call(this,n,e)}function qkn(n,e){kW.call(this,n,e)}function FO(n,e){kW.call(this,n,e)}function Gkn(n){Eu(this),Z5(this,n)}function wz(n){return Ln(n,0),null}function Lo(n){return n.a=0,n.b=0,n}function zkn(n,e){return n.a=e.g+1,n}function Pre(n,e){return n.j[e.p]==2}function gz(n){return lhe(u(n,79))}function Ukn(){Ukn=N,jUn=Fe(qF())}function Wkn(){Wkn=N,RWn=Fe(PNn())}function Xkn(){this.b=new s2(sb(12))}function Vkn(){this.b=0,this.a=!1}function Qkn(){this.b=0,this.a=!1}function p5(n){this.a=n,TI.call(this)}function Jkn(n){this.a=n,TI.call(this)}function In(n,e){ii.call(this,n,e)}function xO(n,e){V0.call(this,n,e)}function Ew(n,e){az.call(this,n,e)}function LO(n,e){H3.call(this,n,e)}function Ykn(n,e){c8.call(this,n,e)}function He(n,e){$j(),it(eI,n,e)}function NO(n,e){return Yu(n.a,0,e)}function Zkn(n,e){return n.a.a.a.cc(e)}function nyn(n,e){return B(n)===B(e)}function Ire(n,e){return Zt(n.a,e.a)}function Ore(n,e){return Uc(n.a,e.a)}function Dre(n,e){return xCn(n.a,e.a)}function Pf(n,e){return n.indexOf(e)}function pd(n,e){return n==e?0:n?1:-1}function tE(n){return n<10?"0"+n:""+n}function $re(n){return pe(n),new p5(n)}function eyn(n){return Bc(n.l,n.m,n.h)}function i3(n){return Gt((_n(n),n))}function Fre(n){return Gt((_n(n),n))}function tyn(n,e){return Uc(n.g,e.g)}function $r(n){return typeof n===UZ}function xre(n){return n==b0||n==Hb}function Lre(n){return n==b0||n==Kb}function pz(n){return Fr(n.b.b,n,0)}function iyn(n){this.a=Tkn(),this.b=n}function ryn(n){this.a=Tkn(),this.b=n}function Nre(n,e){return W(n.a,e),e}function Bre(n,e){return W(n.c,e),n}function cyn(n,e){return rs(n.a,e),n}function Rre(n,e){return wo(),e.a+=n}function _re(n,e){return wo(),e.a+=n}function Kre(n,e){return wo(),e.c+=n}function vz(n,e){S3(n,0,n.length,e)}function Sh(){Tq.call(this,new ba)}function uyn(){xE.call(this,0,0,0,0)}function d2(){ys.call(this,0,0,0,0)}function mr(n){this.a=n.a,this.b=n.b}function tl(n){return n==Zs||n==Ao}function r3(n){return n==Yh||n==Jh}function syn(n){return n==xg||n==Fg}function Cw(n){return n!=jf&&n!=ql}function Hu(n){return n.Lg()&&n.Mg()}function oyn(n){return JE(u(n,118))}function iE(n){return rs(new hi,n)}function fyn(n,e){return new H3(e,n)}function Hre(n,e){return new H3(e,n)}function mz(n,e,t){UC(n,e),WC(n,t)}function rE(n,e,t){Rd(n,e),Bd(n,t)}function Jo(n,e,t){Zc(n,e),nu(n,t)}function cE(n,e,t){D3(n,e),F3(n,t)}function uE(n,e,t){$3(n,e),x3(n,t)}function BO(n,e){X3(n,e),L3(n,n.D)}function kz(n){xkn.call(this,n,!0)}function hyn(n,e,t){fU.call(this,n,e,t)}function il(n){jl(),qbe.call(this,n)}function lyn(){Lj.call(this,"Head",1)}function ayn(){Lj.call(this,"Tail",3)}function RO(n){n.c=F(Zn,rn,1,0,5,1)}function dyn(n){n.a=F(Zn,rn,1,8,5,1)}function byn(n){Yc(n.xf(),new t5n(n))}function Tw(n){return n!=null?mt(n):0}function qre(n,e){return ob(e,nf(n))}function Gre(n,e){return ob(e,nf(n))}function zre(n,e){return n[n.length]=e}function Ure(n,e){return n[n.length]=e}function yz(n){return zoe(n.b.Kc(),n.a)}function Wre(n,e){return ZC(BD(n.d),e)}function Xre(n,e){return ZC(BD(n.g),e)}function Vre(n,e){return ZC(BD(n.j),e)}function tr(n,e){ii.call(this,n.b,e)}function vd(n){xE.call(this,n,n,n,n)}function jz(n){return n.b&&uL(n),n.a}function Ez(n){return n.b&&uL(n),n.c}function Qre(n,e){pf||(n.b=e)}function _O(n,e,t){return Mt(n,e,t),t}function wyn(n,e,t){Mt(n.c[e.g],e.g,t)}function Jre(n,e,t){u(n.c,69).Xh(e,t)}function Yre(n,e,t){Jo(t,t.i+n,t.j+e)}function Zre(n,e){me(bc(n.a),PMn(e))}function nce(n,e){me(Ou(n.a),IMn(e))}function v5(n){Je(),cd.call(this,n)}function ece(n){return n==null?0:mt(n)}function gyn(){gyn=N,hK=new f6(cH)}function je(){je=N,new pyn,new X}function pyn(){new we,new we,new we}function Cz(){Cz=N,Hq(),bin=new we}function Yo(){Yo=N,j.Math.log(2)}function ms(){ms=N,Eh=(E7n(),Dne)}function tce(){throw T(new t1(izn))}function ice(){throw T(new t1(izn))}function rce(){throw T(new t1(rzn))}function cce(){throw T(new t1(rzn))}function vyn(n){this.a=n,HU.call(this,n)}function KO(n){this.a=n,Ej.call(this,n)}function HO(n){this.a=n,Ej.call(this,n)}function bi(n,e){mD(n.c,n.c.length,e)}function Kr(n){return n.ae?1:0}function kyn(n,e){return fc(n,e)>0?n:e}function Bc(n,e,t){return{l:n,m:e,h:t}}function uce(n,e){n.a!=null&&Ckn(e,n.a)}function yyn(n){n.a=new aI,n.c=new aI}function sE(n){this.b=n,this.a=new X}function jyn(n){this.b=new san,this.a=n}function Mz(n){vU.call(this),this.a=n}function Eyn(){Lj.call(this,"Range",2)}function Cyn(){kJ(),this.a=new B7(Hrn)}function sce(n,e){pe(e),Iw(n).Jc(new ps)}function oce(n,e){return Zu(),e.n.b+=n}function fce(n,e,t){return it(n.g,t,e)}function hce(n,e,t){return it(n.k,t,e)}function lce(n,e){return it(n.a,e.a,e)}function Mw(n,e,t){return _Q(e,t,n.c)}function Az(n){return new fn(n.c,n.d)}function ace(n){return new fn(n.c,n.d)}function Qr(n){return new fn(n.a,n.b)}function Tyn(n,e){return xEe(n.a,e,null)}function dce(n){Hi(n,null),Ei(n,null)}function Myn(n){s$(n,null),o$(n,null)}function Ayn(){c8.call(this,null,null)}function Syn(){wE.call(this,null,null)}function Sz(n){this.a=n,we.call(this)}function bce(n){this.b=(Pn(),new DI(n))}function oE(n){n.j=F(Ain,q,310,0,0,1)}function wce(n,e,t){n.c.Vc(e,u(t,133))}function gce(n,e,t){n.c.ji(e,u(t,133))}function Pyn(n,e){de(n),n.Gc(u(e,15))}function m5(n,e){return Jje(n.c,n.b,e)}function pce(n,e){return new Jyn(n.Kc(),e)}function qO(n,e){return gwe(n.Kc(),e)!=-1}function Pz(n,e){return n.a.Bc(e)!=null}function fE(n){return n.Ob()?n.Pb():null}function Iyn(n){return Hs(n,0,n.length)}function I(n,e){return n!=null&&WF(n,e)}function vce(n,e){n.q.setHours(e),S6(n,e)}function Oyn(n,e){n.c&&(ZU(e),iMn(e))}function mce(n,e,t){u(n.Kb(t),164).Nb(e)}function kce(n,e,t){return SEe(n,e,t),t}function Dyn(n,e,t){n.a=e^1502,n.b=t^tN}function GO(n,e,t){return n.a[e.g][t.g]}function Zo(n,e){return n.a[e.c.p][e.p]}function yce(n,e){return n.e[e.c.p][e.p]}function jce(n,e){return n.c[e.c.p][e.p]}function Ece(n,e){return n.j[e.p]=D9e(e)}function Cce(n,e){return DX(n.f,e.tg())}function Tce(n,e){return DX(n.b,e.tg())}function Mce(n,e){return n.a0?e*e/n:e*e*100}function Jce(n,e){return n>0?e/(n*n):e*100}function Yce(n,e,t){return W(e,e$n(n,t))}function Zce(n,e,t){DC(),n.Xe(e)&&t.td(n)}function s3(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function U0(n,e,t){return n.a+=e,n.b+=t,n}function nue(n,e,t){return n.a*=e,n.b*=t,n}function o8(n,e,t){return n.a-=e,n.b-=t,n}function Zz(n,e){return n.a=e.a,n.b=e.b,n}function vE(n){return n.a=-n.a,n.b=-n.b,n}function fjn(n){this.c=n,this.a=1,this.b=1}function hjn(n){this.c=n,Zc(n,0),nu(n,0)}function ljn(n){Ct.call(this),V5(this,n)}function ajn(n){yL(),Nmn(this),this.mf(n)}function djn(n,e){Zv(),c8.call(this,n,e)}function nU(n,e){c1(),wE.call(this,n,e)}function bjn(n,e){c1(),wE.call(this,n,e)}function wjn(n,e){c1(),nU.call(this,n,e)}function qu(n,e,t){Wu.call(this,n,e,t,2)}function JO(n,e){ms(),FE.call(this,n,e)}function gjn(n,e){ms(),JO.call(this,n,e)}function eU(n,e){ms(),JO.call(this,n,e)}function pjn(n,e){ms(),eU.call(this,n,e)}function tU(n,e){ms(),FE.call(this,n,e)}function vjn(n,e){ms(),tU.call(this,n,e)}function mjn(n,e){ms(),FE.call(this,n,e)}function eue(n,e){return n.c.Fc(u(e,133))}function iU(n,e,t){return jM(G8(n,e),t)}function tue(n,e,t){return e.Qk(n.e,n.c,t)}function iue(n,e,t){return e.Rk(n.e,n.c,t)}function YO(n,e){return pl(n.e,u(e,49))}function rue(n,e,t){s6(Ou(n.a),e,IMn(t))}function cue(n,e,t){s6(bc(n.a),e,PMn(t))}function rU(n,e){e.$modCount=n.$modCount}function C5(){C5=N,Xm=new kt("root")}function o3(){o3=N,xy=new w9n,new g9n}function kjn(){this.a=new Od,this.b=new Od}function cU(){RIn.call(this),this.Bb|=Yi}function yjn(){Oe.call(this,"GROW_TREE",0)}function uue(n){return n==null?null:CCe(n)}function sue(n){return n==null?null:D5e(n)}function oue(n){return n==null?null:Lr(n)}function fue(n){return n==null?null:Lr(n)}function Ph(n){n.o==null&&u9e(n)}function sn(n){return A5(n==null||q0(n)),n}function Y(n){return A5(n==null||G0(n)),n}function Ce(n){return A5(n==null||mi(n)),n}function uU(n){this.q=new j.Date($d(n))}function f8(n,e){this.c=n,Yp.call(this,n,e)}function mE(n,e){this.a=n,f8.call(this,n,e)}function hue(n,e){this.d=n,Ovn(this),this.b=e}function sU(n,e){P$.call(this,n),this.a=e}function oU(n,e){P$.call(this,n),this.a=e}function lue(n){xQ.call(this,0,0),this.f=n}function fU(n,e,t){IC.call(this,n,e,t,null)}function jjn(n,e,t){IC.call(this,n,e,t,null)}function aue(n,e,t){return n.ue(e,t)<=0?t:e}function due(n,e,t){return n.ue(e,t)<=0?e:t}function bue(n,e){return u(xd(n.b,e),149)}function wue(n,e){return u(xd(n.c,e),229)}function ZO(n){return u(un(n.a,n.b),287)}function Ejn(n){return new fn(n.c,n.d+n.a)}function Cjn(n){return Zu(),syn(u(n,197))}function W0(){W0=N,prn=Cn((Vu(),id))}function gue(n,e){e.a?e7e(n,e):zO(n.a,e.b)}function Tjn(n,e){pf||W(n.a,e)}function pue(n,e){return H9(),K3(e.d.i,n)}function vue(n,e){return x2(),new ABn(e,n)}function Of(n,e){return T8(e,ann),n.f=e,n}function hU(n,e,t){return t=ss(n,e,3,t),t}function lU(n,e,t){return t=ss(n,e,6,t),t}function aU(n,e,t){return t=ss(n,e,9,t),t}function h8(n,e,t){++n.j,n.Ki(),A$(n,e,t)}function Mjn(n,e,t){++n.j,n.Hi(e,n.oi(e,t))}function Ajn(n,e,t){var i;i=n.Zc(e),i.Rb(t)}function Sjn(n,e,t){return MZ(n.c,n.b,e,t)}function dU(n,e){return(e&nt)%n.d.length}function ii(n,e){kt.call(this,n),this.a=e}function bU(n,e){xq.call(this,n),this.a=e}function nD(n,e){xq.call(this,n),this.a=e}function Pjn(n,e){this.c=n,Ld.call(this,e)}function Ijn(n,e){this.a=n,Omn.call(this,e)}function l8(n,e){this.a=n,Omn.call(this,e)}function Ojn(n){this.a=(is(n,Pb),new Pc(n))}function Djn(n){this.a=(is(n,Pb),new Pc(n))}function a8(n){return!n.a&&(n.a=new Rr),n.a}function $jn(n){return n>8?0:n+1}function mue(n,e){return qn(),n==e?0:n?1:-1}function wU(n,e,t){return m2(n,u(e,22),t)}function kue(n,e,t){return n.apply(e,t)}function Fjn(n,e,t){return n.a+=Hs(e,0,t),n}function gU(n,e){var t;return t=n.e,n.e=e,t}function yue(n,e){var t;t=n[eN],t.call(n,e)}function jue(n,e){var t;t=n[eN],t.call(n,e)}function X0(n,e){n.a.Vc(n.b,e),++n.b,n.c=-1}function xjn(n){Eu(n.e),n.d.b=n.d,n.d.a=n.d}function d8(n){n.b?d8(n.b):n.f.c.zc(n.e,n.d)}function Eue(n,e,t){ca(),Svn(n,e.Ce(n.a,t))}function Cue(n,e){return nO(p$n(n.a,e,!0))}function Tue(n,e){return nO(v$n(n.a,e,!0))}function bo(n,e){return pj(new Array(e),n)}function eD(n){return String.fromCharCode(n)}function Mue(n){return n==null?null:n.message}function Ljn(){this.a=new X,this.b=new X}function Njn(){this.a=new LH,this.b=new Umn}function Bjn(){this.b=new Li,this.c=new X}function pU(){this.d=new Li,this.e=new Li}function vU(){this.n=new Li,this.o=new Li}function kE(){this.n=new i2,this.i=new d2}function Rjn(){this.a=new v4n,this.b=new cwn}function _jn(){this.a=new X,this.d=new X}function Kjn(){this.b=new fi,this.a=new fi}function Hjn(){this.b=new we,this.a=new we}function qjn(){this.b=new E8n,this.a=new sgn}function Gjn(){kE.call(this),this.a=new Li}function T5(n){Jbe.call(this,n,(FC(),vR))}function mU(n,e,t,i){xE.call(this,n,e,t,i)}function Aue(n,e,t){t!=null&&JC(e,rx(n,t))}function Sue(n,e,t){t!=null&&YC(e,rx(n,t))}function kU(n,e,t){return t=ss(n,e,11,t),t}function st(n,e){return n.a+=e.a,n.b+=e.b,n}function ki(n,e){return n.a-=e.a,n.b-=e.b,n}function Pue(n,e){return n.n.a=(_n(e),e+10)}function Iue(n,e){return n.n.a=(_n(e),e+10)}function Oue(n,e){return e==n||o4(sM(e),n)}function zjn(n,e){return it(n.a,e,"")==null}function Due(n,e){return H9(),!K3(e.d.i,n)}function $ue(n,e){tl(n.f)?Qme(n,e):Fve(n,e)}function Fue(n,e){var t;return t=e.Hh(n.a),t}function V0(n,e){vr.call(this,rm+n+Ra+e)}function g2(n,e,t,i){V.call(this,n,e,t,i)}function yU(n,e,t,i){V.call(this,n,e,t,i)}function Ujn(n,e,t,i){yU.call(this,n,e,t,i)}function Wjn(n,e,t,i){zE.call(this,n,e,t,i)}function tD(n,e,t,i){zE.call(this,n,e,t,i)}function jU(n,e,t,i){zE.call(this,n,e,t,i)}function Xjn(n,e,t,i){tD.call(this,n,e,t,i)}function EU(n,e,t,i){tD.call(this,n,e,t,i)}function Fn(n,e,t,i){jU.call(this,n,e,t,i)}function Vjn(n,e,t,i){EU.call(this,n,e,t,i)}function Qjn(n,e,t,i){yW.call(this,n,e,t,i)}function Jjn(n,e,t){this.a=n,Vz.call(this,e,t)}function Yjn(n,e,t){this.c=e,this.b=t,this.a=n}function xue(n,e,t){return n.d=u(e.Kb(t),164)}function CU(n,e){return n.Aj().Nh().Kh(n,e)}function TU(n,e){return n.Aj().Nh().Ih(n,e)}function Zjn(n,e){return _n(n),B(n)===B(e)}function An(n,e){return _n(n),B(n)===B(e)}function iD(n,e){return nO(p$n(n.a,e,!1))}function rD(n,e){return nO(v$n(n.a,e,!1))}function Lue(n,e){return n.b.sd(new D7n(n,e))}function Nue(n,e){return n.b.sd(new $7n(n,e))}function nEn(n,e){return n.b.sd(new F7n(n,e))}function MU(n,e,t){return n.lastIndexOf(e,t)}function Bue(n,e,t){return Zt(n[e.b],n[t.b])}function Rue(n,e){return H(e,(nn(),Jk),n)}function _ue(n,e){return Uc(e.a.d.p,n.a.d.p)}function Kue(n,e){return Uc(n.a.d.p,e.a.d.p)}function Hue(n,e){return Zt(n.c-n.s,e.c-e.s)}function eEn(n){return n.c?Fr(n.c.a,n,0):-1}function que(n){return n<100?null:new Q1(n)}function p2(n){return n==td||n==jh||n==Ac}function tEn(n,e){return I(e,15)&&oBn(n.c,e)}function Gue(n,e){pf||e&&(n.d=e)}function cD(n,e){var t;return t=e,!!VV(n,t)}function AU(n,e){this.c=n,DD.call(this,n,e)}function iEn(n){this.c=n,FO.call(this,IM,0)}function rEn(n,e){Voe.call(this,n,n.length,e)}function zue(n,e,t){return u(n.c,69).lk(e,t)}function yE(n,e,t){return u(n.c,69).mk(e,t)}function Uue(n,e,t){return tue(n,u(e,332),t)}function SU(n,e,t){return iue(n,u(e,332),t)}function Wue(n,e,t){return txn(n,u(e,332),t)}function cEn(n,e,t){return zve(n,u(e,332),t)}function M5(n,e){return e==null?null:ab(n.b,e)}function PU(n){return G0(n)?(_n(n),n):n.ke()}function jE(n){return!isNaN(n)&&!isFinite(n)}function uEn(n){Df(),this.a=(Pn(),new Wp(n))}function b8(n){h3(),this.d=n,this.a=new gw}function ks(n,e,t){this.a=n,this.b=e,this.c=t}function sEn(n,e,t){this.a=n,this.b=e,this.c=t}function oEn(n,e,t){this.d=n,this.b=t,this.a=e}function uD(n){yyn(this),_s(this),Vi(this,n)}function du(n){RO(this),GU(this.c,0,n.Pc())}function fEn(n){Uu(n.a),uPn(n.c,n.b),n.b=null}function hEn(n){this.a=n,Zf(),eu(Date.now())}function lEn(){lEn=N,Xin=new ou,XA=new ou}function sD(){sD=N,Rin=new iln,Pzn=new rln}function aEn(){aEn=N,Nne=F(Zn,rn,1,0,5,1)}function dEn(){dEn=N,eee=F(Zn,rn,1,0,5,1)}function IU(){IU=N,tee=F(Zn,rn,1,0,5,1)}function Df(){Df=N,new Bq((Pn(),Pn(),cr))}function Xue(n){return FC(),$e((pPn(),Dzn),n)}function Vue(n){return hf(),$e((LSn(),Bzn),n)}function Que(n){return $T(),$e((qAn(),Gzn),n)}function Jue(n){return RC(),$e((GAn(),zzn),n)}function Yue(n){return dM(),$e((IOn(),Uzn),n)}function Zue(n){return _o(),$e(($Sn(),Vzn),n)}function nse(n){return Cu(),$e((FSn(),Jzn),n)}function ese(n){return Jc(),$e((xSn(),Zzn),n)}function tse(n){return SM(),$e((Ukn(),jUn),n)}function ise(n){return Hd(),$e((mPn(),CUn),n)}function rse(n){return K2(),$e((kPn(),MUn),n)}function cse(n){return d6(),$e((yPn(),PUn),n)}function use(n){return Aj(),$e((yAn(),IUn),n)}function sse(n){return _C(),$e((zAn(),WUn),n)}function ose(n){return W5(),$e((NSn(),bWn),n)}function fse(n){return Qi(),$e((JPn(),vWn),n)}function hse(n){return G3(),$e((vPn(),EWn),n)}function lse(n){return qd(),$e((BSn(),PWn),n)}function OU(n,e){if(!n)throw T(new Hn(e))}function ase(n){return Qn(),$e((vIn(),$Wn),n)}function DU(n){xE.call(this,n.d,n.c,n.a,n.b)}function oD(n){xE.call(this,n.d,n.c,n.a,n.b)}function $U(n,e,t){this.b=n,this.c=e,this.a=t}function EE(n,e,t){this.b=n,this.a=e,this.c=t}function bEn(n,e,t){this.a=n,this.b=e,this.c=t}function FU(n,e,t){this.a=n,this.b=e,this.c=t}function wEn(n,e,t){this.a=n,this.b=e,this.c=t}function xU(n,e,t){this.a=n,this.b=e,this.c=t}function gEn(n,e,t){this.b=n,this.a=e,this.c=t}function CE(n,e,t){this.e=e,this.b=n,this.d=t}function dse(n,e,t){return ca(),n.a.Od(e,t),e}function fD(n){var e;return e=new Dln,e.e=n,e}function LU(n){var e;return e=new Zmn,e.b=n,e}function w8(){w8=N,sS=new Fdn,oS=new xdn}function wo(){wo=N,WWn=new pbn,XWn=new vbn}function bse(n){return aT(),$e((EPn(),HWn),n)}function wse(n){return ff(),$e((TPn(),JWn),n)}function gse(n){return lM(),$e((mOn(),cXn),n)}function pse(n){return q2(),$e((yIn(),uXn),n)}function vse(n){return OC(),$e((JAn(),sXn),n)}function mse(n){return F2(),$e((RSn(),oXn),n)}function kse(n){return Vw(),$e((UPn(),ZWn),n)}function yse(n){return Kd(),$e((HSn(),rXn),n)}function jse(n){return VC(),$e((_Sn(),fXn),n)}function Ese(n){return Pa(),$e((GPn(),hXn),n)}function Cse(n){return V8(),$e((WAn(),lXn),n)}function Tse(n){return ya(),$e((KSn(),dXn),n)}function Mse(n){return eM(),$e((TIn(),bXn),n)}function Ase(n){return K8(),$e((XAn(),wXn),n)}function Sse(n){return A7(),$e((EIn(),gXn),n)}function Pse(n){return h4(),$e((jIn(),pXn),n)}function Ise(n){return or(),$e((zOn(),vXn),n)}function Ose(n){return q3(),$e((GSn(),mXn),n)}function Dse(n){return Nh(),$e((qSn(),yXn),n)}function $se(n){return kC(),$e((YAn(),jXn),n)}function Fse(n){return Ss(),$e((WPn(),EXn),n)}function xse(n){return JT(),$e((CIn(),BQn),n)}function Lse(n){return i6(),$e((zSn(),RQn),n)}function Nse(n){return wb(),$e((MPn(),_Qn),n)}function Bse(n){return ur(),$e((XSn(),UQn),n)}function Rse(n){return Zw(),$e((vOn(),HQn),n)}function _se(n){return Rh(),$e((WSn(),qQn),n)}function Kse(n){return z8(),$e((QAn(),GQn),n)}function Hse(n){return oT(),$e((USn(),WQn),n)}function qse(n){return b6(),$e((zPn(),KQn),n)}function Gse(n){return x8(),$e((VAn(),XQn),n)}function zse(n){return Q3(),$e((QSn(),VQn),n)}function Use(n){return uT(),$e((JSn(),QQn),n)}function Wse(n){return dT(),$e((VSn(),JQn),n)}function Xse(n){return _d(),$e((YSn(),hJn),n)}function Vse(n){return z5(),$e((nSn(),wJn),n)}function Qse(n){return Ff(),$e((eSn(),jJn),n)}function Jse(n){return ef(),$e((tSn(),CJn),n)}function Yse(n){return No(),$e((ZAn(),RJn),n)}function Zse(n){return Id(),$e((iSn(),UJn),n)}function noe(n){return c4(),$e((jPn(),WJn),n)}function eoe(n){return k6(),$e((MIn(),VJn),n)}function toe(n){return aC(),$e((uSn(),fYn),n)}function ioe(n){return iT(),$e((cSn(),wYn),n)}function roe(n){return gC(),$e((rSn(),hYn),n)}function coe(n){return CT(),$e((ZSn(),pYn),n)}function uoe(n){return $C(),$e((sSn(),vYn),n)}function soe(n){return f7(),$e((nPn(),mYn),n)}function ooe(n){return qT(),$e((CPn(),FYn),n)}function foe(n){return sT(),$e((tPn(),xYn),n)}function hoe(n){return ET(),$e((ePn(),LYn),n)}function loe(n){return g4(),$e((QPn(),tZn),n)}function aoe(n){return w7(),$e((iPn(),iZn),n)}function doe(n){return Pj(),$e((mAn(),rZn),n)}function boe(n){return Ij(),$e((vAn(),uZn),n)}function woe(n){return L8(),$e((fSn(),sZn),n)}function goe(n){return P7(),$e((XPn(),oZn),n)}function poe(n){return Jv(),$e((kAn(),CZn),n)}function voe(n){return c7(),$e((oSn(),TZn),n)}function moe(n){return Ho(),$e((VPn(),OZn),n)}function koe(n){return y1(),$e((kOn(),$Zn),n)}function yoe(n){return oh(),$e((kIn(),FZn),n)}function joe(n){return vb(),$e((mIn(),_Zn),n)}function Eoe(n){return rr(),$e((Wkn(),RWn),n)}function Coe(n){return B3(),$e((UAn(),BWn),n)}function Toe(n){return sr(),$e((YPn(),ene),n)}function Moe(n){return sf(),$e((cPn(),tne),n)}function Aoe(n){return Hh(),$e((PPn(),ine),n)}function Soe(n){return ZT(),$e((SIn(),rne),n)}function Poe(n){return _h(),$e((rPn(),une),n)}function Ioe(n){return cs(),$e((SPn(),one),n)}function Ooe(n){return jb(),$e((POn(),fne),n)}function Doe(n){return qw(),$e((ZPn(),hne),n)}function $oe(n){return Ti(),$e((bIn(),lne),n)}function Foe(n){return Tu(),$e((AIn(),ane),n)}function xoe(n){return Vu(),$e((OPn(),vne),n)}function Loe(n){return xu(),$e((UOn(),mne),n)}function Noe(n){return J(),$e((nIn(),dne),n)}function Boe(n){return AT(),$e((IPn(),kne),n)}function Roe(n){return Xu(),$e((APn(),Ene),n)}function _oe(n){return d4(),$e((yOn(),Lne),n)}function Koe(n,e){return _n(n),n+(_n(e),e)}function Hoe(n,e){return Zf(),me(R(n.a),e)}function qoe(n,e){return Zf(),me(R(n.a),e)}function hD(n,e){this.c=n,this.a=e,this.b=e-n}function pEn(n,e,t){this.a=n,this.b=e,this.c=t}function NU(n,e,t){this.a=n,this.b=e,this.c=t}function BU(n,e,t){this.a=n,this.b=e,this.c=t}function vEn(n,e,t){this.a=n,this.b=e,this.c=t}function mEn(n,e,t){this.a=n,this.b=e,this.c=t}function s1(n,e,t){this.e=n,this.a=e,this.c=t}function kEn(n,e,t){ms(),QW.call(this,n,e,t)}function lD(n,e,t){ms(),FW.call(this,n,e,t)}function RU(n,e,t){ms(),FW.call(this,n,e,t)}function _U(n,e,t){ms(),FW.call(this,n,e,t)}function yEn(n,e,t){ms(),lD.call(this,n,e,t)}function KU(n,e,t){ms(),lD.call(this,n,e,t)}function jEn(n,e,t){ms(),KU.call(this,n,e,t)}function EEn(n,e,t){ms(),RU.call(this,n,e,t)}function CEn(n,e,t){ms(),_U.call(this,n,e,t)}function g8(n,e){return pe(n),pe(e),new z8n(n,e)}function v2(n,e){return pe(n),pe(e),new NEn(n,e)}function Goe(n,e){return pe(n),pe(e),new BEn(n,e)}function zoe(n,e){return pe(n),pe(e),new W8n(n,e)}function u(n,e){return A5(n==null||WF(n,e)),n}function f3(n){var e;return e=new X,_$(e,n),e}function Uoe(n){var e;return e=new fi,_$(e,n),e}function TEn(n){var e;return e=new Wq,nF(e,n),e}function p8(n){var e;return e=new Ct,nF(e,n),e}function Woe(n){return!n.e&&(n.e=new X),n.e}function Xoe(n){return!n.c&&(n.c=new Bp),n.c}function W(n,e){return n.c[n.c.length]=e,!0}function MEn(n,e){this.c=n,this.b=e,this.a=!1}function HU(n){this.d=n,Ovn(this),this.b=_fe(n.d)}function AEn(){this.a=";,;",this.b="",this.c=""}function Voe(n,e,t){SCn.call(this,e,t),this.a=n}function SEn(n,e,t){this.b=n,Hkn.call(this,e,t)}function qU(n,e,t){this.c=n,Nj.call(this,e,t)}function GU(n,e,t){aY(t,0,n,e,t.length,!1)}function eh(n,e,t,i,r){n.b=e,n.c=t,n.d=i,n.a=r}function Qoe(n,e){e&&(n.b=e,n.a=(fl(e),e.a))}function zU(n,e,t,i,r){n.d=e,n.c=t,n.a=i,n.b=r}function UU(n){var e,t;e=n.b,t=n.c,n.b=t,n.c=e}function WU(n){var e,t;t=n.d,e=n.a,n.d=e,n.a=t}function XU(n){return bl(the($r(n)?Ks(n):n))}function Joe(n,e){return Uc(GEn(n.d),GEn(e.d))}function Yoe(n,e){return e==(J(),Gn)?n.c:n.d}function h3(){h3=N,don=(J(),Gn),dP=Vn}function PEn(){this.b=K(Y(cn((Go(),xR))))}function IEn(n){return ca(),F(Zn,rn,1,n,5,1)}function Zoe(n){return new fn(n.c+n.b,n.d+n.a)}function nfe(n,e){return Sj(),Uc(n.d.p,e.d.p)}function aD(n){return ne(n.b!=0),Ts(n,n.a.a)}function efe(n){return ne(n.b!=0),Ts(n,n.c.b)}function VU(n,e){if(!n)throw T(new R9n(e))}function TE(n,e){if(!n)throw T(new Hn(e))}function QU(n,e,t){t3.call(this,n,e),this.b=t}function v8(n,e,t){lz.call(this,n,e),this.c=t}function OEn(n,e,t){oIn.call(this,e,t),this.d=n}function JU(n){IU(),Yy.call(this),this.th(n)}function DEn(n,e,t){this.a=n,Ew.call(this,e,t)}function $En(n,e,t){this.a=n,Ew.call(this,e,t)}function ME(n,e,t){lz.call(this,n,e),this.c=t}function FEn(){T3(),khe.call(this,(Z1(),uo))}function xEn(n){return n!=null&&!$F(n,a9,d9)}function tfe(n,e){return(GDn(n)<<4|GDn(e))&Ut}function ife(n,e){return QE(),ex(n,e),new oTn(n,e)}function sa(n,e){var t;n.n&&(t=e,W(n.f,t))}function l3(n,e,t){var i;i=new Z0(t),Ro(n,e,i)}function rfe(n,e){var t;return t=n.c,wV(n,e),t}function YU(n,e){return e<0?n.g=-1:n.g=e,n}function AE(n,e){return H0e(n),n.a*=e,n.b*=e,n}function LEn(n,e,t,i,r){n.c=e,n.d=t,n.b=i,n.a=r}function Ke(n,e){return Kt(n,e,n.c.b,n.c),!0}function ZU(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function dD(n){this.b=n,this.a=Ed(this.b.a).Ed()}function NEn(n,e){this.b=n,this.a=e,TI.call(this)}function BEn(n,e){this.a=n,this.b=e,TI.call(this)}function REn(n,e){SCn.call(this,e,1040),this.a=n}function m8(n){return n==0||isNaN(n)?n:n<0?-1:1}function cfe(n){return C2(),fh(n)==At(ml(n))}function ufe(n){return C2(),ml(n)==At(fh(n))}function jd(n,e){return v6(n,new t3(e.a,e.b))}function sfe(n){return!Xi(n)&&n.c.i.c==n.d.i.c}function SE(n){var e;return e=n.n,n.a.b+e.d+e.a}function _En(n){var e;return e=n.n,n.e.b+e.d+e.a}function nW(n){var e;return e=n.n,n.e.a+e.b+e.c}function KEn(n){return Je(),new th(0,n)}function ofe(n){return n.a?n.a:WD(n)}function A5(n){if(!n)throw T(new Up(null))}function HEn(){HEn=N,mH=(Pn(),new OI(XB))}function PE(){PE=N,new JQ((HI(),uR),(qI(),cR))}function qEn(){qEn=N,jin=F(Wi,q,19,256,0,1)}function bD(n,e,t,i){MQ.call(this,n,e,t,i,0,0)}function ffe(n,e,t){return it(n.b,u(t.b,17),e)}function hfe(n,e,t){return it(n.b,u(t.b,17),e)}function lfe(n,e){return W(n,new fn(e.a,e.b))}function afe(n,e){return n.c=e)throw T(new qq)}function Xfe(n,e,t){return Mt(e,0,rW(e[0],t[0])),e}function Vfe(n,e,t){e.Ye(t,K(Y(te(n.b,t)))*n.a)}function ACn(n,e,t){return eg(),R3(n,e)&&R3(n,t)}function D5(n){return Tu(),!n.Hc(n1)&&!n.Hc(Gl)}function qE(n){return new fn(n.c+n.b/2,n.d+n.a/2)}function MD(n,e){return e.kh()?pl(n.b,u(e,49)):e}function kW(n,e){this.e=n,this.d=e&64?e|Nf:e}function SCn(n,e){this.c=0,this.d=n,this.b=e|64|Nf}function GE(n){this.b=new Pc(11),this.a=(Ow(),n)}function AD(n){this.b=null,this.a=(Ow(),n||Lin)}function PCn(n){this.a=Y$n(n.a),this.b=new du(n.b)}function ICn(n){this.b=n,b2.call(this,n),$yn(this)}function OCn(n){this.b=n,u8.call(this,n),Fyn(this)}function Y0(n,e,t){this.a=n,g2.call(this,e,t,5,6)}function yW(n,e,t,i){this.b=n,Jt.call(this,e,t,i)}function wi(n,e,t,i,r){D$.call(this,n,e,t,i,r,-1)}function $5(n,e,t,i,r){R8.call(this,n,e,t,i,r,-1)}function V(n,e,t,i){Jt.call(this,n,e,t),this.b=i}function zE(n,e,t,i){v8.call(this,n,e,t),this.b=i}function DCn(n){xkn.call(this,n,!1),this.a=!1}function $Cn(n,e){this.b=n,bvn.call(this,n.b),this.a=e}function FCn(n,e){nb(),Yie.call(this,n,mT(new Ku(e)))}function UE(n,e){return Je(),new xW(n,e,0)}function SD(n,e){return Je(),new xW(6,n,e)}function Qfe(n,e){return An(n.substr(0,e.length),e)}function zu(n,e){return mi(e)?QD(n,e):!!Ar(n.f,e)}function Oi(n,e){for(_n(e);n.Ob();)e.td(n.Pb())}function Pw(n,e,t){jl(),this.e=n,this.d=e,this.a=t}function o1(n,e,t,i){var r;r=n.i,r.i=e,r.a=t,r.b=i}function jW(n){var e;for(e=n;e.f;)e=e.f;return e}function y2(n){var e;return e=t6(n),ne(e!=null),e}function Jfe(n){var e;return e=Lge(n),ne(e!=null),e}function d3(n,e){var t;return t=n.a.gc(),$X(e,t),t-e}function EW(n,e){var t;for(t=0;t0?j.Math.log(n/e):-100}function xCn(n,e){return fc(n,e)<0?-1:fc(n,e)>0?1:0}function SW(n,e,t){return MRn(n,u(e,46),u(t,167))}function LCn(n,e){return u(vW(Ed(n.a)).Xb(e),42).cd()}function uhe(n,e){return P0e(e,n.length),new REn(n,e)}function DD(n,e){this.d=n,ie.call(this,n),this.e=e}function Cd(n){this.d=(_n(n),n),this.a=0,this.c=IM}function PW(n,e){cd.call(this,1),this.a=n,this.b=e}function NCn(n,e){return n.c?NCn(n.c,e):W(n.b,e),n}function she(n,e,t){var i;return i=ub(n,e),g$(n,e,t),i}function IW(n,e){var t;return t=n.slice(0,e),WX(t,n)}function BCn(n,e,t){var i;for(i=0;i=n.g}function KD(n,e,t){var i;return i=Y$(n,e,t),rZ(n,i)}function j2(n,e){var t;t=n.a.length,ub(n,t),g$(n,t,e)}function ZCn(n,e){var t;t=console[n],t.call(console,e)}function nTn(n,e){var t;++n.j,t=n.Vi(),n.Ii(n.oi(t,e))}function mhe(n,e,t){u(e.b,65),Yc(e.a,new NU(n,t,e))}function FW(n,e,t){uj.call(this,e),this.a=n,this.b=t}function xW(n,e,t){cd.call(this,n),this.a=e,this.b=t}function LW(n,e,t){this.a=n,xq.call(this,e),this.b=t}function eTn(n,e,t){this.a=n,aX.call(this,8,e,null,t)}function khe(n){this.a=(_n(xe),xe),this.b=n,new tG}function tTn(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function NW(n){this.c=n,this.b=n.a.d.a,rU(n.a.e,this)}function Uu(n){z0(n.c!=-1),n.d.$c(n.c),n.b=n.c,n.c=-1}function L5(n){return j.Math.sqrt(n.a*n.a+n.b*n.b)}function Md(n,e){return a3(e,n.a.c.length),un(n.a,e)}function $f(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function yhe(n){return 0>=n?new PG:sbe(n-1)}function jhe(n){return aw?QD(aw,n):!1}function iTn(n){return n?n.dc():!n.Kc().Ob()}function Gi(n){return!n.a&&n.c?n.c.b:n.a}function Ehe(n){return!n.a&&(n.a=new Jt(zl,n,4)),n.a}function Ad(n){return!n.d&&(n.d=new Jt(ar,n,1)),n.d}function _n(n){if(n==null)throw T(new Nv);return n}function N5(n){n.c?n.c.He():(n.d=!0,S8e(n))}function fl(n){n.c?fl(n.c):(Ta(n),n.d=!0)}function rTn(n){KW(n.a),n.b=F(Zn,rn,1,n.b.length,5,1)}function Che(n,e){return Uc(e.j.c.length,n.j.c.length)}function The(n,e){n.c<0||n.b.b=0?n.Bh(t):bY(n,e)}function cTn(n){var e,t;return e=n.c.i.c,t=n.d.i.c,e==t}function Ahe(n){if(n.p!=4)throw T(new fu);return n.e}function She(n){if(n.p!=3)throw T(new fu);return n.e}function Phe(n){if(n.p!=6)throw T(new fu);return n.f}function Ihe(n){if(n.p!=6)throw T(new fu);return n.k}function Ohe(n){if(n.p!=3)throw T(new fu);return n.j}function Dhe(n){if(n.p!=4)throw T(new fu);return n.j}function BW(n){return!n.b&&(n.b=new sj(new KI)),n.b}function Sd(n){return n.c==-2&&Pte(n,Qve(n.g,n.b)),n.c}function g3(n,e){var t;return t=LD("",n),t.n=e,t.i=1,t}function $he(n,e){yD(u(e.b,65),n),Yc(e.a,new Aq(n))}function Fhe(n,e){me((!n.a&&(n.a=new l8(n,n)),n.a),e)}function uTn(n,e){this.b=n,DD.call(this,n,e),$yn(this)}function sTn(n,e){this.b=n,AU.call(this,n,e),Fyn(this)}function RW(n,e,t,i){bd.call(this,n,e),this.d=t,this.a=i}function VE(n,e,t,i){bd.call(this,n,t),this.a=e,this.f=i}function oTn(n,e){bce.call(this,obe(pe(n),pe(e))),this.a=e}function fTn(){UJ.call(this,Ka,(a8n(),hee)),tEe(this)}function hTn(){UJ.call(this,Vs,(Qp(),g1n)),lje(this)}function lTn(){Oe.call(this,"DELAUNAY_TRIANGULATION",0)}function xhe(n){return String.fromCharCode.apply(null,n)}function it(n,e,t){return mi(e)?kr(n,e,t):_c(n.f,e,t)}function _W(n){return Pn(),n?n.ve():(Ow(),Ow(),Bin)}function Lhe(n,e,t){return L2(),t.pg(n,u(e.cd(),146))}function aTn(n,e){return PE(),new JQ(new Wyn(n),new Uyn(e))}function Nhe(n){return is(n,AL),KC(qi(qi(5,n),n/10|0))}function QE(){QE=N,fzn=new GI(A(M(Ha,1),OM,42,0,[]))}function dTn(n){return!n.d&&(n.d=new _p(n.c.Cc())),n.d}function p3(n){return!n.a&&(n.a=new W9n(n.c.vc())),n.a}function bTn(n){return!n.b&&(n.b=new Wp(n.c.ec())),n.b}function rh(n,e){for(;e-- >0;)n=n<<1|(n<0?1:0);return n}function pc(n,e){return B(n)===B(e)||n!=null&&tt(n,e)}function Bhe(n,e){return qn(),u(e.b,19).ai&&++i,i}function Oh(n){var e,t;return t=(e=new ud,e),O3(t,n),t}function UD(n){var e,t;return t=(e=new ud,e),VJ(t,n),t}function Zhe(n,e){var t;return t=te(n.f,e),MV(e,t),null}function WD(n){var e;return e=hbe(n),e||null}function CTn(n){return!n.b&&(n.b=new V(di,n,12,3)),n.b}function n1e(n){return n!=null&&_9(tI,n.toLowerCase())}function e1e(n,e){return Zt(bu(n)*Gu(n),bu(e)*Gu(e))}function t1e(n,e){return Zt(bu(n)*Gu(n),bu(e)*Gu(e))}function i1e(n,e){return Zt(n.d.c+n.d.b/2,e.d.c+e.d.b/2)}function r1e(n,e){return Zt(n.g.c+n.g.b/2,e.g.c+e.g.b/2)}function TTn(n,e,t){t.a?nu(n,e.b-n.f/2):Zc(n,e.a-n.g/2)}function MTn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ATn(n,e,t,i){this.a=n,this.b=e,this.c=t,this.d=i}function ha(n,e,t,i){this.e=n,this.a=e,this.c=t,this.d=i}function STn(n,e,t,i){this.a=n,this.c=e,this.d=t,this.b=i}function PTn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function ITn(n,e,t,i){ms(),ySn.call(this,e,t,i),this.a=n}function OTn(n,e){this.a=n,hue.call(this,n,u(n.d,15).Zc(e))}function XD(n){this.f=n,this.c=this.f.e,n.f>0&&qFn(this)}function DTn(n,e,t,i){this.b=n,this.c=i,FO.call(this,e,t)}function $Tn(n){return ne(n.b=0&&An(n.substr(t,e.length),e)}function hl(n,e,t,i,r,c,o){return new v$(n.e,e,t,i,r,c,o)}function QTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function JTn(n,e,t,i,r,c){this.a=n,z$.call(this,e,t,i,r,c)}function YTn(n,e){this.g=n,this.d=A(M(vh,1),E1,10,0,[e])}function f1(n,e){this.e=n,this.a=Zn,this.b=yBn(e),this.c=e}function ZTn(n,e){kE.call(this),eV(this),this.a=n,this.c=e}function M8(n,e,t,i){Mt(n.c[e.g],t.g,i),Mt(n.c[t.g],e.g,i)}function ZD(n,e,t,i){Mt(n.c[e.g],e.g,t),Mt(n.b[e.g],e.g,i)}function M1e(){return x8(),A(M(ron,1),z,376,0,[uK,iy])}function A1e(){return K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])}function S1e(){return V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])}function P1e(){return OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])}function I1e(){return kC(),A(M(fun,1),z,420,0,[j_,oun])}function O1e(){return z8(),A(M(non,1),z,421,0,[iK,rK])}function D1e(){return z5(),A(M(bJn,1),z,523,0,[Hm,Km])}function $1e(){return No(),A(M(BJn,1),z,520,0,[tw,Bl])}function F1e(){return Ff(),A(M(yJn,1),z,516,0,[M0,I1])}function x1e(){return ef(),A(M(EJn,1),z,515,0,[Ja,kf])}function L1e(){return Id(),A(M(zJn,1),z,455,0,[Rl,Lg])}function N1e(){return gC(),A(M(Son,1),z,425,0,[yK,Aon])}function B1e(){return aC(),A(M(Mon,1),z,480,0,[kK,Ton])}function R1e(){return iT(),A(M(Pon,1),z,495,0,[EP,mv])}function _1e(){return $C(),A(M(Oon,1),z,426,0,[Ion,TK])}function K1e(){return c7(),A(M(Ffn,1),z,429,0,[DP,$fn])}function H1e(){return L8(),A(M(afn,1),z,430,0,[FK,IP])}function q1e(){return $T(),A(M(Jin,1),z,428,0,[yR,Qin])}function G1e(){return RC(),A(M(Zin,1),z,427,0,[Yin,jR])}function z1e(){return _C(),A(M(Arn,1),z,424,0,[$R,tS])}function U1e(){return B3(),A(M(NWn,1),z,511,0,[_k,UR])}function sC(n,e,t,i){return t>=0?n.jh(e,t,i):n.Sg(null,t,i)}function n$(n){return n.b.b==0?n.a.$e():aD(n.b)}function W1e(n){if(n.p!=5)throw T(new fu);return ge(n.f)}function X1e(n){if(n.p!=5)throw T(new fu);return ge(n.k)}function VW(n){return B(n.a)===B((eF(),gH))&&Vje(n),n.a}function nMn(n){this.a=u(pe(n),271),this.b=(Pn(),new Hz(n))}function eMn(n,e){bte(this,new fn(n.a,n.b)),wte(this,p8(e))}function Id(){Id=N,Rl=new iz(Y2,0),Lg=new iz(Z2,1)}function Ff(){Ff=N,M0=new ez(Z2,0),I1=new ez(Y2,1)}function Od(){rie.call(this,new s2(sb(12))),Bz(!0),this.a=2}function e$(n,e,t){Je(),cd.call(this,n),this.b=e,this.a=t}function QW(n,e,t){ms(),uj.call(this,e),this.a=n,this.b=t}function tMn(n){kE.call(this),eV(this),this.a=n,this.c=!0}function iMn(n){var e;e=n.c.d.b,n.b=e,n.a=n.c.d,e.a=n.c.d.b=n}function oC(n){var e;ebe(n.a),byn(n.a),e=new tj(n.a),TQ(e)}function V1e(n,e){aBn(n,!0),Yc(n.e.wf(),new $U(n,!0,e))}function fC(n,e){return LAn(e),Y0e(n,F(be,Le,25,e,15,1),e)}function Q1e(n,e){return C2(),n==At(fh(e))||n==At(ml(e))}function vc(n,e){return e==null?Vr(Ar(n.f,null)):n5(n.g,e)}function J1e(n){return n.b==0?null:(ne(n.b!=0),Ts(n,n.a.a))}function Gt(n){return Math.max(Math.min(n,nt),-2147483648)|0}function Y1e(n,e){var t=lR[n.charCodeAt(0)];return t??n}function hC(n,e){return tC(n,"set1"),tC(e,"set2"),new Z8n(n,e)}function Z1e(n,e){var t;return t=W0e(n.f,e),st(vE(t),n.f.d)}function R5(n,e){var t,i;return t=e,i=new dI,n_n(n,t,i),i.d}function t$(n,e,t,i){var r;r=new Gjn,e.a[t.g]=r,m2(n.b,i,r)}function JW(n,e,t){var i;i=n.Yg(e),i>=0?n.sh(i,t):_Y(n,e,t)}function Dw(n,e,t){dC(),n&&it(dH,n,e),n&&it($y,n,t)}function rMn(n,e,t){this.i=new X,this.b=n,this.g=e,this.a=t}function lC(n,e,t){this.c=new X,this.e=n,this.f=e,this.b=t}function YW(n,e,t){this.a=new X,this.e=n,this.f=e,this.c=t}function cMn(n,e){oE(this),this.f=e,this.g=n,eC(this),this._d()}function A8(n,e){var t;t=n.q.getHours(),n.q.setDate(e),S6(n,t)}function uMn(n,e){var t;for(pe(e),t=n.a;t;t=t.c)e.Od(t.g,t.i)}function sMn(n){var e;return e=new kj(sb(n.length)),qV(e,n),e}function nle(n){function e(){}return e.prototype=n||{},new e}function ele(n,e){return LOn(n,e)?(FIn(n),!0):!1}function Dh(n,e){if(e==null)throw T(new Nv);return Y2e(n,e)}function tle(n){if(n.qe())return null;var e=n.n;return RA[e]}function S8(n){return n.Db>>16!=3?null:u(n.Cb,33)}function nf(n){return n.Db>>16!=9?null:u(n.Cb,33)}function oMn(n){return n.Db>>16!=6?null:u(n.Cb,79)}function fMn(n){return n.Db>>16!=7?null:u(n.Cb,235)}function hMn(n){return n.Db>>16!=7?null:u(n.Cb,160)}function At(n){return n.Db>>16!=11?null:u(n.Cb,33)}function lMn(n,e){var t;return t=n.Yg(e),t>=0?n.lh(t):Ox(n,e)}function aMn(n,e){var t;return t=new iW(e),dxn(t,n),new du(t)}function ZW(n){var e;return e=n.d,e=n.si(n.f),me(n,e),e.Ob()}function dMn(n,e){return n.b+=e.b,n.c+=e.c,n.d+=e.d,n.a+=e.a,n}function i$(n,e){return j.Math.abs(n)0}function bMn(){this.a=new Sh,this.e=new fi,this.g=0,this.i=0}function wMn(n){this.a=n,this.b=F(lJn,q,1944,n.e.length,0,2)}function r$(n,e,t){var i;i=tDn(n,e,t),n.b=new tT(i.c.length)}function ef(){ef=N,Ja=new nz(hN,0),kf=new nz("UP",1)}function aC(){aC=N,kK=new rz(PHn,0),Ton=new rz("FAN",1)}function dC(){dC=N,dH=new we,$y=new we,Ere(Azn,new z2n)}function rle(n){if(n.p!=0)throw T(new fu);return b5(n.f,0)}function cle(n){if(n.p!=0)throw T(new fu);return b5(n.k,0)}function gMn(n){return n.Db>>16!=3?null:u(n.Cb,147)}function y3(n){return n.Db>>16!=6?null:u(n.Cb,235)}function eb(n){return n.Db>>16!=17?null:u(n.Cb,26)}function pMn(n,e){var t=n.a=n.a||[];return t[e]||(t[e]=n.le(e))}function ule(n,e){var t;return t=n.a.get(e),t??new Array}function sle(n,e){var t;t=n.q.getHours(),n.q.setMonth(e),S6(n,t)}function kr(n,e,t){return e==null?_c(n.f,null,t):Gd(n.g,e,t)}function _5(n,e,t,i,r,c){return new Lh(n.e,e,n.aj(),t,i,r,c)}function P8(n,e,t){return n.a=Yu(n.a,0,e)+(""+t)+r8(n.a,e),n}function ole(n,e,t){return W(n.a,(QE(),ex(e,t),new bd(e,t))),n}function nX(n){return _z(n.c),n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function vMn(n){return _z(n.e),n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ei(n,e){n.d&&Qc(n.d.e,n),n.d=e,n.d&&W(n.d.e,n)}function Hi(n,e){n.c&&Qc(n.c.g,n),n.c=e,n.c&&W(n.c.g,n)}function yr(n,e){n.c&&Qc(n.c.a,n),n.c=e,n.c&&W(n.c.a,n)}function Hr(n,e){n.i&&Qc(n.i.j,n),n.i=e,n.i&&W(n.i.j,n)}function mMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function kMn(n,e,t){this.a=e,this.c=n,this.b=(pe(t),new du(t))}function yMn(n,e){this.a=n,this.c=Qr(this.a),this.b=new uC(e)}function fle(n){var e;return Ta(n),e=new fi,gt(n,new Vvn(e))}function tb(n,e){if(n<0||n>e)throw T(new vr(cnn+n+unn+e))}function eX(n,e){return lCn(n.a,e)?TW(n,u(e,22).g,null):null}function hle(n){return yF(),qn(),u(n.a,81).d.e!=0}function jMn(){jMn=N,azn=Fe((aj(),A(M(lzn,1),z,538,0,[fR])))}function EMn(){EMn=N,YQn=ju(new hi,(Qi(),Ir),(rr(),Kk))}function tX(){tX=N,ZQn=ju(new hi,(Qi(),Ir),(rr(),Kk))}function CMn(){CMn=N,eJn=ju(new hi,(Qi(),Ir),(rr(),Kk))}function TMn(){TMn=N,gJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function Zu(){Zu=N,mJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function MMn(){MMn=N,kJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function c$(){c$=N,TJn=Ze(new hi,(Qi(),Ir),(rr(),km))}function AMn(){AMn=N,lYn=ju(new hi,(c4(),Gm),(k6(),lK))}function aa(n,e,t,i){this.c=n,this.d=i,s$(this,e),o$(this,t)}function M2(n){this.c=new Ct,this.b=n.b,this.d=n.c,this.a=n.a}function u$(n){this.a=j.Math.cos(n),this.b=j.Math.sin(n)}function s$(n,e){n.a&&Qc(n.a.k,n),n.a=e,n.a&&W(n.a.k,n)}function o$(n,e){n.b&&Qc(n.b.f,n),n.b=e,n.b&&W(n.b.f,n)}function SMn(n,e){mhe(n,n.b,n.c),u(n.b.b,65),e&&u(e.b,65).b}function lle(n,e){vQ(n,e),I(n.Cb,88)&&yb(Iu(u(n.Cb,88)),2)}function f$(n,e){I(n.Cb,88)&&yb(Iu(u(n.Cb,88)),4),Ic(n,e)}function bC(n,e){I(n.Cb,179)&&(u(n.Cb,179).tb=null),Ic(n,e)}function mc(n,e){return er(),R$(e)?new IE(e,n):new i8(e,n)}function ale(n,e){var t,i;t=e.c,i=t!=null,i&&j2(n,new Z0(e.c))}function PMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function IMn(n){var e,t;return t=(Qp(),e=new ud,e),O3(t,n),t}function OMn(n,e){var t;return t=new Rs(n),e.c[e.c.length]=t,t}function DMn(n,e){var t;return t=u(ab(T2(n.a),e),14),t?t.gc():0}function $Mn(n){var e;return Ta(n),e=(Ow(),Ow(),Nin),qC(n,e)}function FMn(n){for(var e;;)if(e=n.Pb(),!n.Ob())return e}function iX(n,e){tie.call(this,new s2(sb(n))),is(e,W_n),this.a=e}function ch(n,e,t){KDn(e,t,n.gc()),this.c=n,this.a=e,this.b=t-e}function xMn(n,e,t){var i;KDn(e,t,n.c.length),i=t-e,AG(n.c,e,i)}function dle(n,e){Dyn(n,ge(ci(cl(e,24),FM)),ge(ci(e,FM)))}function Ln(n,e){if(n<0||n>=e)throw T(new vr(cnn+n+unn+e))}function Te(n,e){if(n<0||n>=e)throw T(new wG(cnn+n+unn+e))}function xn(n,e){this.b=(_n(n),n),this.a=e&Ib?e:e|64|Nf}function LMn(n){dyn(this),Wmn(this.a,KV(j.Math.max(8,n))<<1)}function tf(n){return Gr(A(M(ai,1),q,8,0,[n.i.n,n.n,n.a]))}function ble(){return hf(),A(M(Nu,1),z,132,0,[Win,hs,Rb])}function wle(){return _o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])}function gle(){return Cu(),A(M(Qzn,1),z,461,0,[Xf,Ol,Co])}function ple(){return Jc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])}function vle(){return qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])}function mle(){return W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])}function kle(){return i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])}function yle(){return F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])}function jle(){return VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])}function Ele(){return ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])}function Cle(){return Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])}function Tle(){return Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])}function Mle(){return q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])}function Ale(){return ur(),A(M(zQn,1),z,452,0,[Bm,Au,xc])}function Sle(){return Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])}function Ple(){return oT(),A(M(ion,1),z,375,0,[eon,cK,ton])}function Ile(){return dT(),A(M(hon,1),z,377,0,[fK,pv,ew])}function Ole(){return Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])}function Dle(){return uT(),A(M(fon,1),z,338,0,[oon,oK,son])}function $le(){return _d(),A(M(fJn,1),z,454,0,[ry,_m,aP])}function Fle(){return CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])}function xle(){return f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])}function Lle(){return ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])}function Nle(){return sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])}function Ble(){return w7(),A(M(OK,1),z,437,0,[AP,SP,PP])}function Rle(){return _h(),A(M(Khn,1),z,334,0,[HP,F1,i9])}function _le(){return sf(),A(M(Phn,1),z,272,0,[jv,cw,Ev])}function Kle(n,e){return o9e(n,e,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Hle(n,e,t){var i;return i=O6(n,e,!1),i.b<=e&&i.a<=t}function NMn(n,e,t){var i;i=new Jwn,i.b=e,i.a=t,++e.b,W(n.d,i)}function qle(n,e){var t;return t=(_n(n),n).g,Yz(!!t),_n(e),t(e)}function rX(n,e){var t,i;return i=d3(n,e),t=n.a.Zc(i),new Y8n(n,t)}function Gle(n){return n.Db>>16!=6?null:u(Fx(n),235)}function zle(n){if(n.p!=2)throw T(new fu);return ge(n.f)&Ut}function Ule(n){if(n.p!=2)throw T(new fu);return ge(n.k)&Ut}function Wle(n){return n.a==(T3(),uI)&&Ste(n,C9e(n.g,n.b)),n.a}function A2(n){return n.d==(T3(),uI)&&Ite(n,pke(n.g,n.b)),n.d}function y(n){return ne(n.ai?1:0}function BMn(n,e){var t,i;return t=F$(e),i=t,u(te(n.c,i),19).a}function RMn(n,e){var t;for(t=n+"";t.length0&&n.a[--n.d]==0;);n.a[n.d++]==0&&(n.e=0)}function rAn(n){return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function rae(n){return!!n.a&&Ou(n.a.a).i!=0&&!(n.b&&YF(n.b))}function cae(n){return!!n.u&&bc(n.u.a).i!=0&&!(n.n&&JF(n.n))}function cAn(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),16,new tvn(n))}function uae(n,e){return xCn(eu(n.q.getTime()),eu(e.q.getTime()))}function xf(n){return u(lf(n,F(GR,MN,17,n.c.length,0,1)),474)}function I8(n){return u(lf(n,F(vh,E1,10,n.c.length,0,1)),193)}function sae(n){return Zu(),!Xi(n)&&!(!Xi(n)&&n.c.i.c==n.d.i.c)}function uAn(n,e,t){var i;i=(pe(n),new du(n)),N3e(new mMn(i,e,t))}function O8(n,e,t){var i;i=(pe(n),new du(n)),B3e(new kMn(i,e,t))}function sAn(n,e){var t;return t=1-e,n.a[t]=eT(n.a[t],t),eT(n,e)}function oAn(n,e){var t;n.e=new oG,t=Cb(e),bi(t,n.c),eBn(n,t,0)}function Ci(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.a,r)}function Z(n,e,t,i){var r;r=new XH,r.a=e,r.b=t,r.c=i,Ke(n.b,r)}function po(n){var e,t,i;return e=new HCn,t=Zx(e,n),UEe(e),i=t,i}function hX(){var n,e,t;return e=(t=(n=new ud,n),t),W(M1n,e),e}function pC(n){return n.j.c=F(Zn,rn,1,0,5,1),KW(n.c),Khe(n.a),n}function $w(n){return Qv(),I(n.g,10)?u(n.g,10):null}function oae(n){return Iw(n).dc()?!1:(sce(n,new Np),!0)}function fae(n){if(!("stack"in n))try{throw n}catch{}return n}function D8(n,e){if(n<0||n>=e)throw T(new vr(j6e(n,e)));return n}function fAn(n,e,t){if(n<0||et)throw T(new vr(W5e(n,e,t)))}function d$(n,e){if(ri(n.a,e),e.d)throw T(new _r(wKn));e.d=n}function b$(n,e){if(e.$modCount!=n.$modCount)throw T(new vs)}function hAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function lAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function aAn(n,e){return I(e,42)?ix(n.a,u(e,42)):!1}function hae(n,e){return n.a<=n.b?(e.ud(n.a++),!0):!1}function $d(n){var e;return $r(n)?(e=n,e==-0?0:e):m0e(n)}function vC(n){var e;return fl(n),e=new fln,vw(n.a,new Wvn(e)),e}function dAn(n){var e;return fl(n),e=new oln,vw(n.a,new Uvn(e)),e}function Ii(n,e){this.a=n,$v.call(this,n),tb(e,n.gc()),this.b=e}function lX(n){this.e=n,this.b=this.e.a.entries(),this.a=new Array}function lae(n){return gD(n.e.Hd().gc()*n.c.Hd().gc(),273,new evn(n))}function mC(n){return new Pc((is(n,AL),KC(qi(qi(5,n),n/10|0))))}function bAn(n){return u(lf(n,F(FWn,UKn,11,n.c.length,0,1)),1943)}function aae(n,e,t){return t.f.c.length>0?SW(n.a,e,t):SW(n.b,e,t)}function dae(n,e,t){n.d&&Qc(n.d.e,n),n.d=e,n.d&&Q0(n.d.e,t,n)}function w$(n,e){uTe(e,n),WU(n.d),WU(u(k(n,(nn(),eP)),207))}function H5(n,e){cTe(e,n),UU(n.d),UU(u(k(n,(nn(),eP)),207))}function Fd(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.fe()),i}function j3(n,e){var t,i;return t=ub(n,e),i=null,t&&(i=t.ie()),i}function q5(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=t.ie()),i}function $h(n,e){var t,i;return t=Dh(n,e),i=null,t&&(i=tY(t)),i}function bae(n,e,t){var i;return i=i4(t),gM(n.g,i,e),gM(n.i,e,t),e}function wae(n,e,t){var i;i=q2e();try{return kue(n,e,t)}finally{Mae(i)}}function wAn(n){var e;e=n.Wg(),this.a=I(e,69)?u(e,69).Zh():e.Kc()}function hi(){P9n.call(this),this.j.c=F(Zn,rn,1,0,5,1),this.a=-1}function aX(n,e,t,i){this.d=n,this.n=e,this.g=t,this.o=i,this.p=-1}function gAn(n,e,t,i){this.e=i,this.d=null,this.c=n,this.a=e,this.b=t}function dX(n,e,t){this.d=new r6n(this),this.e=n,this.i=e,this.f=t}function kC(){kC=N,j_=new QG(I4,0),oun=new QG("TOP_LEFT",1)}function pAn(){pAn=N,aon=aTn(Q(1),Q(4)),lon=aTn(Q(1),Q(2))}function vAn(){vAn=N,uZn=Fe((Ij(),A(M(cZn,1),z,551,0,[$K])))}function mAn(){mAn=N,rZn=Fe((Pj(),A(M(lfn,1),z,482,0,[DK])))}function kAn(){kAn=N,CZn=Fe((Jv(),A(M(Dfn,1),z,530,0,[hy])))}function yAn(){yAn=N,IUn=Fe((Aj(),A(M(krn,1),z,481,0,[SR])))}function gae(){return Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])}function pae(){return FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])}function vae(){return d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])}function mae(){return K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])}function kae(){return G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])}function yae(){return aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])}function jAn(n,e,t,i){return I(t,54)?new ojn(n,e,t,i):new pW(n,e,t,i)}function jae(){return ff(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])}function Eae(n){var e;return n.j==(J(),ae)&&(e=GLn(n),au(e,Vn))}function Cae(n,e){var t;t=e.a,Hi(t,e.c.d),Ei(t,e.d.d),fb(t.a,n.n)}function EAn(n,e){return u(yd(KE(u(ct(n.k,e),15).Oc(),jg)),113)}function CAn(n,e){return u(yd(HE(u(ct(n.k,e),15).Oc(),jg)),113)}function Tae(n){return new xn(jbe(u(n.a.dd(),14).gc(),n.a.cd()),16)}function E3(n){return I(n,14)?u(n,14).dc():!n.Kc().Ob()}function S2(n){return Qv(),I(n.g,145)?u(n.g,145):null}function TAn(n){if(n.e.g!=n.b)throw T(new vs);return!!n.c&&n.d>0}function Re(n){return ne(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function bX(n,e){_n(e),Mt(n.a,n.c,e),n.c=n.c+1&n.a.length-1,MFn(n)}function ll(n,e){_n(e),n.b=n.b-1&n.a.length-1,Mt(n.a,n.b,e),MFn(n)}function MAn(n,e){var t;for(t=n.j.c.length;t0&&gc(n.g,0,e,0,n.i),e}function IAn(n,e){$j();var t;return t=u(te(eI,n),55),!t||t.wj(e)}function Bae(n){if(n.p!=1)throw T(new fu);return ge(n.f)<<24>>24}function Rae(n){if(n.p!=1)throw T(new fu);return ge(n.k)<<24>>24}function _ae(n){if(n.p!=7)throw T(new fu);return ge(n.k)<<16>>16}function Kae(n){if(n.p!=7)throw T(new fu);return ge(n.f)<<16>>16}function Fh(n){var e;for(e=0;n.Ob();)n.Pb(),e=qi(e,1);return KC(e)}function OAn(n,e){var t;return t=new R0,n.xd(t),t.a+="..",e.yd(t),t.a}function Hae(n,e,t){var i;i=u(te(n.g,t),57),W(n.a.c,new Pi(e,i))}function qae(n,e,t){return TD(Y(Vr(Ar(n.f,e))),Y(Vr(Ar(n.f,t))))}function yC(n,e,t){return vM(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function Gae(n,e,t){return m4(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function zae(n,e,t){return b9e(n,e,t,I(e,99)&&(u(e,18).Bb&Yi)!=0)}function pX(n,e){return n==(Qn(),ti)&&e==ti?4:n==ti||e==ti?8:32}function DAn(n,e){return B(e)===B(n)?"(this Map)":e==null?iu:Lr(e)}function Uae(n,e){return u(e==null?Vr(Ar(n.f,null)):n5(n.g,e),281)}function $An(n,e,t){var i;return i=i4(t),it(n.b,i,e),it(n.c,e,t),e}function FAn(n,e){var t;for(t=e;t;)U0(n,t.i,t.j),t=At(t);return n}function vX(n,e){var t;return t=C8(f3(new x$(n,e))),DE(new x$(n,e)),t}function uh(n,e){er();var t;return t=u(n,66).Mj(),M5e(t,e),t.Ok(e)}function Wae(n,e,t,i,r){var c;c=m9e(r,t,i),W(e,p6e(r,c)),o5e(n,r,e)}function xAn(n,e,t){n.i=0,n.e=0,e!=t&&(uDn(n,e,t),cDn(n,e,t))}function mX(n,e){var t;t=n.q.getHours(),n.q.setFullYear(e+Tl),S6(n,t)}function Xae(n,e,t){if(t){var i=t.ee();n.a[e]=i(t)}else delete n.a[e]}function g$(n,e,t){if(t){var i=t.ee();t=i(t)}else t=void 0;n.a[e]=t}function LAn(n){if(n<0)throw T(new K9n("Negative array size: "+n))}function bc(n){return n.n||(Iu(n),n.n=new wCn(n,ar,n),Mr(n)),n.n}function G5(n){return ne(n.a=0&&n.a[t]===e[t];t--);return t<0}function KAn(n,e){V3();var t;return t=n.j.g-e.j.g,t!=0?t:0}function HAn(n,e){return _n(e),n.a!=null?$fe(e.Kb(n.a)):UA}function jC(n){var e;return n?new iW(n):(e=new Sh,nF(e,n),e)}function es(n,e){var t;return e.b.Kb(FPn(n,e.c.Ee(),(t=new Jvn(e),t)))}function EC(n){_J(),Dyn(this,ge(ci(cl(n,24),FM)),ge(ci(n,FM)))}function qAn(){qAn=N,Gzn=Fe(($T(),A(M(Jin,1),z,428,0,[yR,Qin])))}function GAn(){GAn=N,zzn=Fe((RC(),A(M(Zin,1),z,427,0,[Yin,jR])))}function zAn(){zAn=N,WUn=Fe((_C(),A(M(Arn,1),z,424,0,[$R,tS])))}function UAn(){UAn=N,BWn=Fe((B3(),A(M(NWn,1),z,511,0,[_k,UR])))}function WAn(){WAn=N,lXn=Fe((V8(),A(M(Wcn,1),z,419,0,[$S,Ucn])))}function XAn(){XAn=N,wXn=Fe((K8(),A(M(Qcn,1),z,479,0,[Vcn,xS])))}function VAn(){VAn=N,XQn=Fe((x8(),A(M(ron,1),z,376,0,[uK,iy])))}function QAn(){QAn=N,GQn=Fe((z8(),A(M(non,1),z,421,0,[iK,rK])))}function JAn(){JAn=N,sXn=Fe((OC(),A(M(Rcn,1),z,422,0,[Bcn,s_])))}function YAn(){YAn=N,jXn=Fe((kC(),A(M(fun,1),z,420,0,[j_,oun])))}function ZAn(){ZAn=N,RJn=Fe((No(),A(M(BJn,1),z,520,0,[tw,Bl])))}function nSn(){nSn=N,wJn=Fe((z5(),A(M(bJn,1),z,523,0,[Hm,Km])))}function eSn(){eSn=N,jJn=Fe((Ff(),A(M(yJn,1),z,516,0,[M0,I1])))}function tSn(){tSn=N,CJn=Fe((ef(),A(M(EJn,1),z,515,0,[Ja,kf])))}function iSn(){iSn=N,UJn=Fe((Id(),A(M(zJn,1),z,455,0,[Rl,Lg])))}function rSn(){rSn=N,hYn=Fe((gC(),A(M(Son,1),z,425,0,[yK,Aon])))}function cSn(){cSn=N,wYn=Fe((iT(),A(M(Pon,1),z,495,0,[EP,mv])))}function uSn(){uSn=N,fYn=Fe((aC(),A(M(Mon,1),z,480,0,[kK,Ton])))}function sSn(){sSn=N,vYn=Fe(($C(),A(M(Oon,1),z,426,0,[Ion,TK])))}function oSn(){oSn=N,TZn=Fe((c7(),A(M(Ffn,1),z,429,0,[DP,$fn])))}function fSn(){fSn=N,sZn=Fe((L8(),A(M(afn,1),z,430,0,[FK,IP])))}function z5(){z5=N,Hm=new ZG("UPPER",0),Km=new ZG("LOWER",1)}function Yae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function Zae(n,e){var t;t=new r2,la(t,"x",e.a),la(t,"y",e.b),j2(n,t)}function nde(n,e){var t,i;i=!1;do t=JOn(n,e),i=i|t;while(t);return i}function jX(n,e){var t,i;for(t=e,i=0;t>0;)i+=n.a[t],t-=t&-t;return i}function hSn(n,e){var t;for(t=e;t;)U0(n,-t.i,-t.j),t=At(t);return n}function $i(n,e){var t,i;for(_n(e),i=n.Kc();i.Ob();)t=i.Pb(),e.td(t)}function lSn(n,e){var t;return t=e.cd(),new bd(t,n.e.pc(t,u(e.dd(),14)))}function Kt(n,e,t,i){var r;r=new aI,r.c=e,r.b=t,r.a=i,i.b=t.a=r,++n.b}function Es(n,e,t){var i;return i=(Ln(e,n.c.length),n.c[e]),n.c[e]=t,i}function ede(n,e,t){return u(e==null?_c(n.f,null,t):Gd(n.g,e,t),281)}function k$(n){return n.c&&n.d?cX(n.c)+"->"+cX(n.d):"e_"+md(n)}function C3(n,e){return(Ta(n),Wv(new $n(n,new UX(e,n.a)))).sd(V4)}function tde(){return Qi(),A(M(Hrn,1),z,356,0,[Vf,$l,Hc,Cc,Ir])}function ide(){return J(),A(M(Zi,1),hc,61,0,[Xr,Kn,Vn,ae,Gn])}function rde(n){return gj(),function(){return wae(n,this,arguments)}}function cde(){return Date.now?Date.now():new Date().getTime()}function Xi(n){return!n.c||!n.d?!1:!!n.c.i&&n.c.i==n.d.i}function aSn(n){if(!n.c.Sb())throw T(new ic);return n.a=!0,n.c.Ub()}function $8(n){n.i=0,z9(n.b,null),z9(n.c,null),n.a=null,n.e=null,++n.g}function EX(n){are.call(this,n==null?iu:Lr(n),I(n,78)?u(n,78):null)}function dSn(n){B_n(),Nmn(this),this.a=new Ct,QV(this,n),Ke(this.a,n)}function bSn(){RO(this),this.b=new fn($t,$t),this.a=new fn(Vt,Vt)}function wSn(n,e){this.c=0,this.b=e,qkn.call(this,n,17493),this.a=this.c}function y$(n){CC(),!pf&&(this.c=n,this.e=!0,this.a=new X)}function CC(){CC=N,pf=!0,Fzn=!1,xzn=!1,Nzn=!1,Lzn=!1}function CX(n,e){return I(e,149)?An(n.c,u(e,149).c):!1}function TX(n,e){var t;return t=0,n&&(t+=n.f.a/2),e&&(t+=e.f.a/2),t}function j$(n,e){var t;return t=u(xd(n.d,e),23),t||u(xd(n.e,e),23)}function gSn(n){this.b=n,ie.call(this,n),this.a=u(Rn(this.b.a,4),126)}function pSn(n){this.b=n,w2.call(this,n),this.a=u(Rn(this.b.a,4),126)}function Iu(n){return n.t||(n.t=new Amn(n),s6(new _9n(n),0,n.t)),n.t}function ude(){return sr(),A(M(e9,1),z,103,0,[mh,Ao,Zs,Jh,Yh])}function sde(){return qw(),A(M(c9,1),z,249,0,[Hl,Cy,Hhn,r9,qhn])}function ode(){return Ho(),A(M($1,1),z,175,0,[Xn,pi,Yf,Ya,D1])}function fde(){return P7(),A(M(gfn,1),z,316,0,[dfn,xK,wfn,LK,bfn])}function hde(){return b6(),A(M(Usn,1),z,315,0,[zsn,nK,eK,Lm,Nm])}function lde(){return Pa(),A(M(zcn,1),z,335,0,[f_,Gcn,h_,Em,jm])}function ade(){return g4(),A(M(eZn,1),z,355,0,[Ng,Ep,Qm,Vm,Jm])}function dde(){return Vw(),A(M(YWn,1),z,363,0,[SS,IS,OS,PS,AS])}function bde(){return Ss(),A(M(jun,1),z,163,0,[Qk,Sm,xl,Pm,Ub])}function T3(){T3=N;var n,e;cI=(Qp(),e=new fj,e),uI=(n=new BI,n)}function vSn(n){var e;return n.c||(e=n.r,I(e,88)&&(n.c=u(e,26))),n.c}function wde(n){return n.e=3,n.d=n.Yb(),n.e!=2?(n.e=0,!0):!1}function E$(n){var e,t,i;return e=n&Lu,t=n>>22&Lu,i=n<0?Wh:0,Bc(e,t,i)}function gde(n){var e,t,i,r;for(t=n,i=0,r=t.length;i0?g$n(n,e):BNn(n,-e)}function MX(n,e){return e==0||n.e==0?n:e>0?BNn(n,e):g$n(n,-e)}function ve(n){if(Se(n))return n.c=n.a,n.a.Pb();throw T(new ic)}function kSn(n){var e,t;return e=n.c.i,t=n.d.i,e.k==(Qn(),Xt)&&t.k==Xt}function C$(n){var e;return e=new Pd,Sr(e,n),H(e,(nn(),Tr),null),e}function T$(n,e,t){var i;return i=n.Yg(e),i>=0?n._g(i,t,!0):Yd(n,e,t)}function AX(n,e,t,i){var r;for(r=0;re)throw T(new vr(fY(n,e,"index")));return n}function M$(n,e,t,i){var r;return r=F(be,Le,25,e,15,1),Pve(r,n,e,t,i),r}function vde(n,e){var t;t=n.q.getHours()+(e/60|0),n.q.setMinutes(e),S6(n,t)}function mde(n,e){return j.Math.min(al(e.a,n.d.d.c),al(e.b,n.d.d.c))}function O2(n,e){return mi(e)?e==null?MY(n.f,null):$On(n.g,e):MY(n.f,e)}function uf(n){this.c=n,this.a=new E(this.c.a),this.b=new E(this.c.b)}function TC(){this.e=new X,this.c=new X,this.d=new X,this.b=new X}function TSn(){this.g=new zq,this.b=new zq,this.a=new X,this.k=new X}function MSn(n,e,t){this.a=n,this.c=e,this.d=t,W(e.e,this),W(t.b,this)}function ASn(n,e){Hkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function SSn(n,e){qkn.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function FX(n,e){FO.call(this,e.rd(),e.qd()&-6),_n(n),this.a=n,this.b=e}function MC(n,e,t){this.a=n,this.b=e,this.c=t,W(n.t,this),W(e.i,this)}function AC(){this.b=new Ct,this.a=new Ct,this.b=new Ct,this.a=new Ct}function SC(){SC=N,Ym=new kt("org.eclipse.elk.labels.labelManager")}function PSn(){PSn=N,$cn=new ii("separateLayerConnections",(aT(),QR))}function No(){No=N,tw=new tz("REGULAR",0),Bl=new tz("CRITICAL",1)}function x8(){x8=N,uK=new YG("STACKED",0),iy=new YG("SEQUENCED",1)}function L8(){L8=N,FK=new oz("FIXED",0),IP=new oz("CENTER_NODE",1)}function kde(n,e){var t;return t=CEe(n,e),n.b=new tT(t.c.length),Lje(n,t)}function yde(n,e,t){var i;return++n.e,--n.f,i=u(n.d[e].$c(t),133),i.dd()}function ISn(n){var e;return n.a||(e=n.r,I(e,148)&&(n.a=u(e,148))),n.a}function xX(n){if(n.a){if(n.e)return xX(n.e)}else return n;return null}function jde(n,e){return n.pe.p?-1:0}function PC(n,e){return _n(e),n.c=0,"Initial capacity must not be negative")}function $Sn(){$Sn=N,Vzn=Fe((_o(),A(M(_b,1),z,232,0,[Zr,Fc,nc])))}function FSn(){FSn=N,Jzn=Fe((Cu(),A(M(Qzn,1),z,461,0,[Xf,Ol,Co])))}function xSn(){xSn=N,Zzn=Fe((Jc(),A(M(Yzn,1),z,462,0,[Wo,Dl,To])))}function LSn(){LSn=N,Bzn=Fe((hf(),A(M(Nu,1),z,132,0,[Win,hs,Rb])))}function NSn(){NSn=N,bWn=Fe((W5(),A(M(Krn,1),z,379,0,[NR,LR,BR])))}function BSn(){BSn=N,PWn=Fe((qd(),A(M(zrn,1),z,423,0,[yg,Grn,qR])))}function RSn(){RSn=N,oXn=Fe((F2(),A(M(Kcn,1),z,314,0,[ap,qk,_cn])))}function _Sn(){_Sn=N,fXn=Fe((VC(),A(M(qcn,1),z,337,0,[Hcn,DS,o_])))}function KSn(){KSn=N,dXn=Fe((ya(),A(M(aXn,1),z,450,0,[l_,cv,Tg])))}function HSn(){HSn=N,rXn=Fe((Kd(),A(M(YR,1),z,361,0,[g0,Fl,w0])))}function qSn(){qSn=N,yXn=Fe((Nh(),A(M(kXn,1),z,303,0,[zk,Ag,dp])))}function GSn(){GSn=N,mXn=Fe((q3(),A(M(y_,1),z,292,0,[m_,k_,Gk])))}function zSn(){zSn=N,RQn=Fe((i6(),A(M(Gsn,1),z,378,0,[J_,qsn,oP])))}function USn(){USn=N,WQn=Fe((oT(),A(M(ion,1),z,375,0,[eon,cK,ton])))}function WSn(){WSn=N,qQn=Fe((Rh(),A(M(Zsn,1),z,339,0,[Nl,Ysn,tK])))}function XSn(){XSn=N,UQn=Fe((ur(),A(M(zQn,1),z,452,0,[Bm,Au,xc])))}function VSn(){VSn=N,JQn=Fe((dT(),A(M(hon,1),z,377,0,[fK,pv,ew])))}function QSn(){QSn=N,VQn=Fe((Q3(),A(M(uon,1),z,336,0,[sK,con,Rm])))}function JSn(){JSn=N,QQn=Fe((uT(),A(M(fon,1),z,338,0,[oon,oK,son])))}function YSn(){YSn=N,hJn=Fe((_d(),A(M(fJn,1),z,454,0,[ry,_m,aP])))}function ZSn(){ZSn=N,pYn=Fe((CT(),A(M(gYn,1),z,442,0,[CK,jK,EK])))}function nPn(){nPn=N,mYn=Fe((f7(),A(M(Fon,1),z,380,0,[CP,Don,$on])))}function ePn(){ePn=N,LYn=Fe((ET(),A(M(Yon,1),z,381,0,[Jon,IK,Qon])))}function tPn(){tPn=N,xYn=Fe((sT(),A(M(Xon,1),z,293,0,[PK,Won,Uon])))}function iPn(){iPn=N,iZn=Fe((w7(),A(M(OK,1),z,437,0,[AP,SP,PP])))}function rPn(){rPn=N,une=Fe((_h(),A(M(Khn,1),z,334,0,[HP,F1,i9])))}function cPn(){cPn=N,tne=Fe((sf(),A(M(Phn,1),z,272,0,[jv,cw,Ev])))}function Pde(){return Ti(),A(M(Ghn,1),z,98,0,[ql,jf,Tv,td,jh,Ac])}function wa(n,e){return!n.o&&(n.o=new Wu((Dc(),Ul),S0,n,0)),NF(n.o,e)}function Ide(n){return!n.g&&(n.g=new Qy),!n.g.d&&(n.g.d=new Cmn(n)),n.g.d}function Ode(n){return!n.g&&(n.g=new Qy),!n.g.a&&(n.g.a=new Tmn(n)),n.g.a}function Dde(n){return!n.g&&(n.g=new Qy),!n.g.b&&(n.g.b=new Emn(n)),n.g.b}function N8(n){return!n.g&&(n.g=new Qy),!n.g.c&&(n.g.c=new Mmn(n)),n.g.c}function $de(n,e,t){var i,r;for(r=new H3(e,n),i=0;it||e=0?n._g(t,!0,!0):Yd(n,e,!0)}function Qde(n,e){return Zt(K(Y(k(n,(G(),k0)))),K(Y(k(e,k0))))}function aPn(){aPn=N,aYn=Xd(Xd(Dj(new hi,(c4(),qm)),(k6(),pP)),aK)}function Jde(n,e,t){var i;return i=tDn(n,e,t),n.b=new tT(i.c.length),JY(n,i)}function Yde(n){if(n.b<=0)throw T(new ic);return--n.b,n.a-=n.c.c,Q(n.a)}function Zde(n){var e;if(!n.a)throw T(new gTn);return e=n.a,n.a=At(n.a),e}function n0e(n){for(;!n.a;)if(!nEn(n.c,new Xvn(n)))return!1;return!0}function $2(n){var e;return pe(n),I(n,198)?(e=u(n,198),e):new dvn(n)}function e0e(n){DC(),u(n.We((Xe(),rw)),174).Fc((Tu(),Ty)),n.Ye(eH,null)}function DC(){DC=N,SZn=new n2n,IZn=new e2n,PZn=Rwe((Xe(),eH),SZn,_l,IZn)}function $C(){$C=N,Ion=new sz("LEAF_NUMBER",0),TK=new sz("NODE_SIZE",1)}function t0e(n,e,t){n.a=e,n.c=t,n.b.a.$b(),_s(n.d),n.e.a.c=F(Zn,rn,1,0,5,1)}function $$(n){n.a=F(be,Le,25,n.b+1,15,1),n.c=F(be,Le,25,n.b,15,1),n.d=0}function i0e(n,e){n.a.ue(e.d,n.b)>0&&(W(n.c,new QU(e.c,e.d,n.d)),n.b=e.d)}function zX(n,e){if(n.g==null||e>=n.i)throw T(new xO(e,n.i));return n.g[e]}function dPn(n,e,t){if(W3(n,t),t!=null&&!n.wj(t))throw T(new xI);return t}function bPn(n){var e;if(n.Ek())for(e=n.i-1;e>=0;--e)D(n,e);return gX(n)}function r0e(n){var e,t;if(!n.b)return null;for(t=n.b;e=t.a[0];)t=e;return t}function c0e(n,e){var t,i;return LAn(e),t=(i=n.slice(0,e),WX(i,n)),t.length=e,t}function S3(n,e,t,i){var r;i=(Ow(),i||Lin),r=n.slice(e,t),hY(r,n,e,t,-e,i)}function Cs(n,e,t,i,r){return e<0?Yd(n,t,i):u(t,66).Nj().Pj(n,n.yh(),e,i,r)}function u0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Lr(n)}function s0e(n){return I(n,172)?""+u(n,172).a:n==null?null:Lr(n)}function wPn(n,e){if(e.a)throw T(new _r(wKn));ri(n.a,e),e.a=n,!n.j&&(n.j=e)}function UX(n,e){FO.call(this,e.rd(),e.qd()&-16449),_n(n),this.a=n,this.c=e}function gPn(n,e){var t,i;return i=e/n.c.Hd().gc()|0,t=e%n.c.Hd().gc(),D2(n,i,t)}function Cu(){Cu=N,Xf=new oO(Y2,0),Ol=new oO(I4,1),Co=new oO(Z2,2)}function FC(){FC=N,vR=new Lj("All",0),qin=new lyn,Gin=new Eyn,zin=new ayn}function pPn(){pPn=N,Dzn=Fe((FC(),A(M(WA,1),z,297,0,[vR,qin,Gin,zin])))}function vPn(){vPn=N,EWn=Fe((G3(),A(M(jWn,1),z,405,0,[b0,Hb,Kb,kg])))}function mPn(){mPn=N,CUn=Fe((Hd(),A(M(EUn,1),z,406,0,[Ok,Ik,MR,AR])))}function kPn(){kPn=N,MUn=Fe((K2(),A(M(TUn,1),z,323,0,[$k,Dk,Fk,xk])))}function yPn(){yPn=N,PUn=Fe((d6(),A(M(SUn,1),z,394,0,[Lk,YA,ZA,Nk])))}function jPn(){jPn=N,WJn=Fe((c4(),A(M(won,1),z,393,0,[gP,qm,uy,Gm])))}function EPn(){EPn=N,HWn=Fe((aT(),A(M(KWn,1),z,360,0,[QR,TS,MS,Hk])))}function CPn(){CPn=N,FYn=Fe((qT(),A(M(zon,1),z,340,0,[SK,qon,Gon,Hon])))}function TPn(){TPn=N,JWn=Fe((ff(),A(M(QWn,1),z,411,0,[lp,nv,ev,JR])))}function MPn(){MPn=N,_Qn=Fe((wb(),A(M(Z_,1),z,197,0,[fP,Y_,xg,Fg])))}function APn(){APn=N,Ene=Fe((Xu(),A(M(jne,1),z,396,0,[ws,Yhn,Jhn,Zhn])))}function SPn(){SPn=N,one=Fe((cs(),A(M(sne,1),z,285,0,[Ey,kh,Kl,jy])))}function PPn(){PPn=N,ine=Fe((Hh(),A(M(cH,1),z,218,0,[rH,yy,Cv,Sp])))}function IPn(){IPn=N,kne=Fe((AT(),A(M(Qhn,1),z,311,0,[oH,Whn,Vhn,Xhn])))}function OPn(){OPn=N,vne=Fe((Vu(),A(M(o9,1),z,374,0,[Ay,id,My,uw])))}function DPn(){DPn=N,mM(),F1n=$t,Tee=Vt,x1n=new S9($t),Mee=new S9(Vt)}function K8(){K8=N,Vcn=new VG(Xh,0),xS=new VG("IMPROVE_STRAIGHTNESS",1)}function o0e(n,e){return h3(),W(n,new Pi(e,Q(e.e.c.length+e.g.c.length)))}function f0e(n,e){return h3(),W(n,new Pi(e,Q(e.e.c.length+e.g.c.length)))}function WX(n,e){return U8(e)!=10&&A(Du(e),e.hm,e.__elementTypeId$,U8(e),n),n}function Qc(n,e){var t;return t=Fr(n,e,0),t==-1?!1:(h1(n,t),!0)}function $Pn(n,e){var t;return t=u(O2(n.e,e),387),t?(ZU(t),t.e):null}function P3(n){var e;return $r(n)&&(e=0-n,!isNaN(e))?e:bl(z3(n))}function Fr(n,e,t){for(;t=0?BT(n,t,!0,!0):Yd(n,e,!0)}function YX(n,e){Qv();var t,i;return t=S2(n),i=S2(e),!!t&&!!i&&!V$n(t.k,i.k)}function a0e(n,e){Zc(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function d0e(n,e){nu(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function b0e(n,e){Rd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function w0e(n,e){Bd(n,e==null||jE((_n(e),e))||isNaN((_n(e),e))?0:(_n(e),e))}function BPn(n){(this.q?this.q:(Pn(),Pn(),ph)).Ac(n.q?n.q:(Pn(),Pn(),ph))}function g0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function p0e(n,e){return I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n)}function RPn(n,e){vrn=new Wy,AUn=e,gm=n,u(gm.b,65),BX(gm,vrn,null),DRn(gm)}function B$(n,e,t){var i;return i=n.g[e],k5(n,e,n.oi(e,t)),n.gi(e,t,i),n.ci(),i}function BC(n,e){var t;return t=n.Xc(e),t>=0?(n.$c(t),!0):!1}function R$(n){var e;return n.d!=n.r&&(e=qs(n),n.e=!!e&&e.Cj()==kGn,n.d=e),n.e}function _$(n,e){var t;for(pe(n),pe(e),t=!1;e.Ob();)t=t|n.Fc(e.Pb());return t}function xd(n,e){var t;return t=u(te(n.e,e),387),t?(Oyn(n,t),t.e):null}function _Pn(n){var e,t;return e=n/60|0,t=n%60,t==0?""+e:""+e+":"+(""+t)}function qr(n,e){var t,i;return Ta(n),i=new FX(e,n.a),t=new iEn(i),new $n(n,t)}function ub(n,e){var t=n.a[e],i=(cF(),dR)[typeof t];return i?i(t):tQ(typeof t)}function v0e(n){switch(n.g){case 0:return nt;case 1:return-1;default:return 0}}function m0e(n){return mJ(n,(I3(),pin))<0?-xce(z3(n)):n.l+n.m*J2+n.h*$a}function U8(n){return n.__elementTypeCategory$==null?10:n.__elementTypeCategory$}function K$(n){var e;return e=n.b.c.length==0?null:un(n.b,0),e!=null&&J$(n,0),e}function KPn(n,e){for(;e[0]=0;)++e[0]}function W8(n,e){this.e=e,this.a=FOn(n),this.a<54?this.f=$d(n):this.c=m7(n)}function HPn(n,e,t,i){Je(),cd.call(this,26),this.c=n,this.a=e,this.d=t,this.b=i}function sh(n,e,t){var i,r;for(i=10,r=0;rn.a[i]&&(i=t);return i}function T0e(n,e){var t;return t=zd(n.e.c,e.e.c),t==0?Zt(n.e.d,e.e.d):t}function Fw(n,e){return e.e==0||n.e==0?W4:(a4(),Hx(n,e))}function M0e(n,e){if(!n)throw T(new Hn(P8e("Enum constant undefined: %s",e)))}function X5(){X5=N,MWn=new San,AWn=new Man,CWn=new $an,TWn=new Fan,SWn=new xan}function RC(){RC=N,Yin=new qG("BY_SIZE",0),jR=new qG("BY_SIZE_AND_SHAPE",1)}function _C(){_C=N,$R=new GG("EADES",0),tS=new GG("FRUCHTERMAN_REINGOLD",1)}function V8(){V8=N,$S=new XG("READING_DIRECTION",0),Ucn=new XG("ROTATION",1)}function GPn(){GPn=N,hXn=Fe((Pa(),A(M(zcn,1),z,335,0,[f_,Gcn,h_,Em,jm])))}function zPn(){zPn=N,KQn=Fe((b6(),A(M(Usn,1),z,315,0,[zsn,nK,eK,Lm,Nm])))}function UPn(){UPn=N,ZWn=Fe((Vw(),A(M(YWn,1),z,363,0,[SS,IS,OS,PS,AS])))}function WPn(){WPn=N,EXn=Fe((Ss(),A(M(jun,1),z,163,0,[Qk,Sm,xl,Pm,Ub])))}function XPn(){XPn=N,oZn=Fe((P7(),A(M(gfn,1),z,316,0,[dfn,xK,wfn,LK,bfn])))}function VPn(){VPn=N,OZn=Fe((Ho(),A(M($1,1),z,175,0,[Xn,pi,Yf,Ya,D1])))}function QPn(){QPn=N,tZn=Fe((g4(),A(M(eZn,1),z,355,0,[Ng,Ep,Qm,Vm,Jm])))}function JPn(){JPn=N,vWn=Fe((Qi(),A(M(Hrn,1),z,356,0,[Vf,$l,Hc,Cc,Ir])))}function YPn(){YPn=N,ene=Fe((sr(),A(M(e9,1),z,103,0,[mh,Ao,Zs,Jh,Yh])))}function ZPn(){ZPn=N,hne=Fe((qw(),A(M(c9,1),z,249,0,[Hl,Cy,Hhn,r9,qhn])))}function nIn(){nIn=N,dne=Fe((J(),A(M(Zi,1),hc,61,0,[Xr,Kn,Vn,ae,Gn])))}function H$(n,e){var t;return t=u(te(n.a,e),134),t||(t=new pI,it(n.a,e,t)),t}function eIn(n){var e;return e=u(k(n,(G(),p0)),305),e?e.a==n:!1}function tIn(n){var e;return e=u(k(n,(G(),p0)),305),e?e.i==n:!1}function iIn(n,e){return _n(e),mW(n),n.d.Ob()?(e.td(n.d.Pb()),!0):!1}function KC(n){return fc(n,nt)>0?nt:fc(n,Bi)<0?Bi:ge(n)}function sb(n){return n<3?(is(n,J_n),n+1):n=0&&e=-.01&&n.a<=bf&&(n.a=0),n.b>=-.01&&n.b<=bf&&(n.b=0),n}function cIn(n,e){return e==(sD(),sD(),Pzn)?n.toLocaleLowerCase():n.toLowerCase()}function nV(n){return(n.i&2?"interface ":n.i&1?"":"class ")+(Ph(n),n.o)}function Er(n){var e,t;t=(e=new RI,e),me((!n.q&&(n.q=new V(co,n,11,10)),n.q),t)}function A0e(n,e){var t;return t=e>0?e-1:e,e8n(Kie(IIn(YU(new zp,t),n.n),n.j),n.k)}function S0e(n,e,t,i){var r;n.j=-1,EY(n,iY(n,e,t),(er(),r=u(e,66).Mj(),r.Ok(i)))}function uIn(n){this.g=n,this.f=new X,this.a=j.Math.min(this.g.c.c,this.g.d.c)}function sIn(n){this.b=new X,this.a=new X,this.c=new X,this.d=new X,this.e=n}function oIn(n,e){this.a=new we,this.e=new we,this.b=(i6(),oP),this.c=n,this.b=e}function fIn(n,e,t){kE.call(this),eV(this),this.a=n,this.c=t,this.b=e.d,this.f=e.e}function hIn(n){this.d=n,this.c=n.c.vc().Kc(),this.b=null,this.a=null,this.e=(aj(),fR)}function Ld(n){if(n<0)throw T(new Hn("Illegal Capacity: "+n));this.g=this.ri(n)}function P0e(n,e){if(0>n||n>e)throw T(new bG("fromIndex: 0, toIndex: "+n+tnn+e))}function I0e(n){var e;if(n.a==n.b.a)throw T(new ic);return e=n.a,n.c=e,n.a=n.a.e,e}function HC(n){var e;z0(!!n.c),e=n.c.a,Ts(n.d,n.c),n.b==n.c?n.b=e:--n.a,n.c=null}function qC(n,e){var t;return Ta(n),t=new DTn(n,n.a.rd(),n.a.qd()|4,e),new $n(n,t)}function O0e(n,e){var t,i;return t=u(ab(n.d,e),14),t?(i=e,n.e.pc(i,t)):null}function GC(n,e){var t,i;for(i=n.Kc();i.Ob();)t=u(i.Pb(),70),H(t,(G(),pp),e)}function D0e(n){var e;return e=K(Y(k(n,(nn(),S1)))),e<0&&(e=0,H(n,S1,e)),e}function $0e(n,e,t){var i;i=j.Math.max(0,n.b/2-.5),g6(t,i,1),W(e,new L7n(t,i))}function F0e(n,e,t){var i;return i=n.a.e[u(e.a,10).p]-n.a.e[u(t.a,10).p],Gt(m8(i))}function lIn(n,e,t,i,r,c){var o;o=C$(i),Hi(o,r),Ei(o,c),Tn(n.a,i,new EE(o,e,t.f))}function aIn(n,e){var t;if(t=R7(n.Tg(),e),!t)throw T(new Hn(Pl+e+MB));return t}function ob(n,e){var t;for(t=n;At(t);)if(t=At(t),t==e)return!0;return!1}function x0e(n,e){var t,i,r;for(i=e.a.cd(),t=u(e.a.dd(),14).gc(),r=0;r0&&(n.a/=e,n.b/=e),n}function ts(n){var e;return n.w?n.w:(e=Gle(n),e&&!e.kh()&&(n.w=e),e)}function q0e(n){var e;return n==null?null:(e=u(n,190),Gve(e,e.length))}function D(n,e){if(n.g==null||e>=n.i)throw T(new xO(e,n.i));return n.li(e,n.g[e])}function G0e(n){var e,t;for(e=n.a.d.j,t=n.c.d.j;e!=t;)ko(n.b,e),e=yT(e);ko(n.b,e)}function z0e(n){var e;for(e=0;e=14&&e<=16))),n}function gIn(n,e,t){var i=function(){return n.apply(i,arguments)};return e.apply(i,t),i}function pIn(n,e,t){var i,r;i=e;do r=K(n.p[i.p])+t,n.p[i.p]=r,i=n.a[i.p];while(i!=e)}function O3(n,e){var t,i;i=n.a,t=Tge(n,e,null),i!=e&&!n.e&&(t=j4(n,e,t)),t&&t.Fi()}function tV(n,e){return Yo(),mo(Cl),j.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)}function iV(n,e){return Yo(),mo(Cl),j.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)}function X0e(n,e){return yl(),Uc(n.b.c.length-n.e.c.length,e.b.c.length-e.e.c.length)}function xw(n,e){return Uie(J5(n,e,ge(Ni(ah,rh(ge(Ni(e==null?0:mt(e),dh)),15)))))}function vIn(){vIn=N,$Wn=Fe((Qn(),A(M(zR,1),z,267,0,[ti,gi,Xt,Tc,Qu,vf])))}function mIn(){mIn=N,_Zn=Fe((vb(),A(M(UK,1),z,291,0,[zK,gy,wy,GK,dy,by])))}function kIn(){kIn=N,FZn=Fe((oh(),A(M(Rfn,1),z,248,0,[HK,ly,ay,xP,$P,FP])))}function yIn(){yIn=N,uXn=Fe((q2(),A(M(rv,1),z,227,0,[iv,ym,tv,qb,Cg,Eg])))}function jIn(){jIn=N,pXn=Fe((h4(),A(M(sun,1),z,275,0,[Cm,iun,uun,cun,run,tun])))}function EIn(){EIn=N,gXn=Fe((A7(),A(M(eun,1),z,274,0,[LS,Ycn,nun,Jcn,Zcn,p_])))}function CIn(){CIn=N,BQn=Fe((JT(),A(M(Hsn,1),z,313,0,[Q_,_sn,V_,Rsn,Ksn,sP])))}function TIn(){TIn=N,bXn=Fe((eM(),A(M(Xcn,1),z,276,0,[d_,a_,w_,b_,g_,FS])))}function MIn(){MIn=N,VJn=Fe((k6(),A(M(XJn,1),z,327,0,[pP,aK,bK,dK,wK,lK])))}function AIn(){AIn=N,ane=Fe((Tu(),A(M(qP,1),z,273,0,[Gl,n1,Ty,s9,u9,Pp])))}function SIn(){SIn=N,rne=Fe((ZT(),A(M(xhn,1),z,312,0,[uH,Dhn,Fhn,Ihn,$hn,Ohn])))}function V0e(){return jb(),A(M(lr,1),z,93,0,[So,Zh,Po,Oo,yh,eo,as,Io,no])}function UC(n,e){var t;t=n.a,n.a=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,0,t,n.a))}function WC(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,1,t,n.b))}function D3(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,3,t,n.b))}function Bd(n,e){var t;t=n.f,n.f=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,3,t,n.f))}function Rd(n,e){var t;t=n.g,n.g=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,4,t,n.g))}function Zc(n,e){var t;t=n.i,n.i=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,5,t,n.i))}function nu(n,e){var t;t=n.j,n.j=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,6,t,n.j))}function $3(n,e){var t;t=n.j,n.j=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,1,t,n.j))}function F3(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,4,t,n.c))}function x3(n,e){var t;t=n.k,n.k=e,n.Db&4&&!(n.Db&1)&&et(n,new rb(n,2,t,n.k))}function G$(n,e){var t;t=n.d,n.d=e,n.Db&4&&!(n.Db&1)&&et(n,new p$(n,2,t,n.d))}function d1(n,e){var t;t=n.s,n.s=e,n.Db&4&&!(n.Db&1)&&et(n,new p$(n,4,t,n.s))}function hb(n,e){var t;t=n.t,n.t=e,n.Db&4&&!(n.Db&1)&&et(n,new p$(n,5,t,n.t))}function L3(n,e){var t;t=n.F,n.F=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,5,t,e))}function Q8(n,e){var t;return t=u(te(($j(),eI),n),55),t?t.xj(e):F(Zn,rn,1,e,5,1)}function Bh(n,e){var t,i;return t=e in n.a,t&&(i=Dh(n,e).he(),i)?i.a:null}function Q0e(n,e){var t,i,r;return t=(i=(ad(),r=new QH,r),e&&zY(i,e),i),aV(t,n),t}function PIn(n,e,t){if(W3(n,t),!n.Bk()&&t!=null&&!n.wj(t))throw T(new xI);return t}function IIn(n,e){return n.n=e,n.n?(n.f=new X,n.e=new X):(n.f=null,n.e=null),n}function Me(n,e,t,i,r,c){var o;return o=LD(n,e),DIn(t,o),o.i=r?8:0,o.f=i,o.e=r,o.g=c,o}function rV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=t}function cV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=t}function uV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=t}function sV(n,e,t,i,r){this.d=e,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=t}function oV(n,e,t,i,r){this.d=e,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=t}function OIn(n,e){var t,i,r,c;for(i=e,r=0,c=i.length;r=0),Q2e(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function fV(n){return n.a<54?n.f<0?-1:n.f>0?1:0:(!n.c&&(n.c=h7(n.f)),n.c).e}function mo(n){if(!(n>=0))throw T(new Hn("tolerance ("+n+") must be >= 0"));return n}function N3(){return _K||(_K=new kBn,_w(_K,A(M(mg,1),rn,130,0,[new nq]))),_K}function ur(){ur=N,Bm=new kO(K6,0),Au=new kO("INPUT",1),xc=new kO("OUTPUT",2)}function VC(){VC=N,Hcn=new bO("ARD",0),DS=new bO("MSD",1),o_=new bO("MANUAL",2)}function _d(){_d=N,ry=new TO("BARYCENTER",0),_m=new TO(rHn,1),aP=new TO(cHn,2)}function J8(n,e){var t;if(t=n.gc(),e<0||e>t)throw T(new V0(e,t));return new AU(n,e)}function xIn(n,e){var t;return I(e,42)?n.c.Mc(e):(t=NF(n,e),IT(n,e),t)}function wr(n,e,t){return Ca(n,e),Ic(n,t),d1(n,0),hb(n,1),p1(n,!0),g1(n,!0),n}function is(n,e){if(n<0)throw T(new Hn(e+" cannot be negative but was: "+n));return n}function LIn(n,e){var t,i;for(t=0,i=n.gc();t0?u(un(t.a,i-1),10):null}function Q5(n,e){var t;t=n.k,n.k=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,2,t,n.k))}function JC(n,e){var t;t=n.f,n.f=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,8,t,n.f))}function YC(n,e){var t;t=n.i,n.i=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,7,t,n.i))}function aV(n,e){var t;t=n.a,n.a=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,8,t,n.a))}function dV(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,0,t,n.b))}function bV(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,0,t,n.b))}function wV(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,1,t,n.c))}function gV(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,1,t,n.c))}function U$(n,e){var t;t=n.c,n.c=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,4,t,n.c))}function pV(n,e){var t;t=n.d,n.d=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,1,t,n.d))}function W$(n,e){var t;t=n.D,n.D=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,2,t,n.D))}function X$(n,e){n.r>0&&n.c0&&n.g!=0&&X$(n.i,e/n.r*n.i.d))}function cbe(n,e,t){var i;n.b=e,n.a=t,i=(n.a&512)==512?new T9n:new ZH,n.c=y7e(i,n.b,n.a)}function zIn(n,e){return zh(n.e,e)?(er(),R$(e)?new IE(e,n):new i8(e,n)):new Nkn(e,n)}function ZC(n,e){return zie(Y5(n.a,e,ge(Ni(ah,rh(ge(Ni(e==null?0:mt(e),dh)),15)))))}function ube(n,e,t){return cb(n,new Hvn(e),new mln,new qvn(t),A(M(Nu,1),z,132,0,[]))}function sbe(n){var e,t;return 0>n?new PG:(e=n+1,t=new wSn(e,n),new oU(null,t))}function obe(n,e){Pn();var t;return t=new s2(1),mi(n)?kr(t,n,e):_c(t.f,n,e),new DI(t)}function fbe(n,e){var t,i;return t=n.o+n.p,i=e.o+e.p,te?(e<<=1,e>0?e:L6):e}function V$(n){switch(Rz(n.e!=3),n.e){case 2:return!1;case 0:return!0}return wde(n)}function WIn(n,e){var t;return I(e,8)?(t=u(e,8),n.a==t.a&&n.b==t.b):!1}function Q$(n,e,t){var i,r,c;return c=e>>5,r=e&31,i=ci(J0(n.n[t][c],ge(Ih(r,1))),3),i}function lbe(n,e){var t,i;for(i=e.vc().Kc();i.Ob();)t=u(i.Pb(),42),XT(n,t.cd(),t.dd())}function abe(n,e){var t;t=new Wy,u(e.b,65),u(e.b,65),u(e.b,65),Yc(e.a,new BU(n,t,e))}function vV(n,e){var t;t=n.b,n.b=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,21,t,n.b))}function mV(n,e){var t;t=n.d,n.d=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,11,t,n.d))}function nT(n,e){var t;t=n.j,n.j=e,n.Db&4&&!(n.Db&1)&&et(n,new wi(n,1,13,t,n.j))}function XIn(n,e,t){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i>>31;i!=0&&(n[t]=i)}function jbe(n,e){Pn();var t,i;for(i=new X,t=0;t0&&(this.g=this.ri(this.i+(this.i/8|0)+1),n.Qc(this.g))}function Dt(n,e){ME.call(this,ree,n,e),this.b=this,this.a=Kc(n.Tg(),On(this.e.Tg(),this.c))}function Z5(n,e){var t,i;for(_n(e),i=e.vc().Kc();i.Ob();)t=u(i.Pb(),42),n.zc(t.cd(),t.dd())}function Dbe(n,e,t){var i;for(i=t.Kc();i.Ob();)if(!yC(n,e,i.Pb()))return!1;return!0}function $be(n,e,t,i,r){var c;return t&&(c=yt(e.Tg(),n.c),r=t.gh(e,-1-(c==-1?i:c),null,r)),r}function Fbe(n,e,t,i,r){var c;return t&&(c=yt(e.Tg(),n.c),r=t.ih(e,-1-(c==-1?i:c),null,r)),r}function dOn(n){var e;if(n.b==-2){if(n.e==0)e=-1;else for(e=0;n.a[e]==0;e++);n.b=e}return n.b}function bOn(n){switch(n.g){case 2:return J(),Gn;case 4:return J(),Vn;default:return n}}function wOn(n){switch(n.g){case 1:return J(),ae;case 3:return J(),Kn;default:return n}}function xbe(n){var e,t,i;return n.j==(J(),Kn)&&(e=GLn(n),t=au(e,Vn),i=au(e,Gn),i||i&&t)}function Lbe(n){var e,t;return e=u(n.e&&n.e(),9),t=u(IW(e,e.length),9),new ks(e,t,e.length)}function Nbe(n,e){le(e,iHn,1),TQ(ire(new tj((Vv(),new GD(n,!1,!1,new BH))))),ce(e)}function Y8(n,e){return qn(),mi(n)?DX(n,Ce(e)):G0(n)?TD(n,Y(e)):q0(n)?Kfe(n,sn(e)):n.wd(e)}function TV(n,e){e.q=n,n.d=j.Math.max(n.d,e.r),n.b+=e.d+(n.a.c.length==0?0:n.c),W(n.a,e)}function R3(n,e){var t,i,r,c;return r=n.c,t=n.c+n.b,c=n.d,i=n.d+n.a,e.a>r&&e.ac&&e.b1||n.Ob())return++n.a,n.g=0,e=n.i,n.Ob(),e;throw T(new ic)}function Vbe(n){gyn();var e;return M7n(hK,n)||(e=new Zwn,e.a=n,wU(hK,n,e)),u(br(hK,n),635)}function Ks(n){var e,t,i,r;return r=n,i=0,r<0&&(r+=$a,i=Wh),t=Gt(r/J2),e=Gt(r-t*J2),Bc(e,t,i)}function Z8(n){var e,t,i;for(i=0,t=new o2(n.a);t.a>22),r=n.h+e.h+(i>>22),Bc(t&Lu,i&Lu,r&Wh)}function xOn(n,e){var t,i,r;return t=n.l-e.l,i=n.m-e.m+(t>>22),r=n.h-e.h+(i>>22),Bc(t&Lu,i&Lu,r&Wh)}function i7(n){var e;return n<128?(e=(QEn(),yin)[n],!e&&(e=yin[n]=new wq(n)),e):new wq(n)}function jt(n){var e;return I(n,78)?n:(e=n&&n.__java$exception,e||(e=new CDn(n),Kmn(e)),e)}function r7(n){if(I(n,186))return u(n,118);if(n)return null;throw T(new c2(Iqn))}function LOn(n,e){if(e==null)return!1;for(;n.a!=n.b;)if(tt(e,vT(n)))return!0;return!1}function OV(n){return n.a.Ob()?!0:n.a!=n.d?!1:(n.a=new lX(n.e.f),n.a.Ob())}function Yt(n,e){var t,i;return t=e.Pc(),i=t.length,i==0?!1:(GU(n.c,n.c.length,t),!0)}function hwe(n,e,t){var i,r;for(r=e.vc().Kc();r.Ob();)i=u(r.Pb(),42),n.yc(i.cd(),i.dd(),t);return n}function NOn(n,e){var t,i;for(i=new E(n.b);i.a=0,"Negative initial capacity"),TE(e>=0,"Non-positive load factor"),Eu(this)}function uF(n,e,t){return n>=128?!1:n<64?b5(ci(Ih(1,n),t),0):b5(ci(Ih(1,n-64),e),0)}function mwe(n,e){return!n||!e||n==e?!1:zd(n.b.c,e.b.c+e.b.b)<0&&zd(e.b.c,n.b.c+n.b.b)<0}function VOn(n){var e,t,i;return t=n.n,i=n.o,e=n.d,new ys(t.a-e.b,t.b-e.d,i.a+(e.b+e.c),i.b+(e.d+e.a))}function kwe(n){var e,t,i,r;for(t=n.a,i=0,r=t.length;ii)throw T(new V0(e,i));return n.hi()&&(t=aMn(n,t)),n.Vh(e,t)}function s7(n,e,t){return t==null?(!n.q&&(n.q=new we),O2(n.q,e)):(!n.q&&(n.q=new we),it(n.q,e,t)),n}function H(n,e,t){return t==null?(!n.q&&(n.q=new we),O2(n.q,e)):(!n.q&&(n.q=new we),it(n.q,e,t)),n}function QOn(n){var e,t;return t=new TC,Sr(t,n),H(t,(dl(),hp),n),e=new we,Cye(n,t,e),QEe(n,t,e),t}function Ewe(n){eg();var e,t,i;for(t=F(ai,q,8,2,0,1),i=0,e=0;e<2;e++)i+=.5,t[e]=r3e(i,n);return t}function JOn(n,e){var t,i,r,c;for(t=!1,i=n.a[e].length,c=0;c>=1);return e}function ZOn(n){var e,t;return t=x7(n.h),t==32?(e=x7(n.m),e==32?x7(n.l)+32:e+20-10):t-12}function t6(n){var e;return e=n.a[n.b],e==null?null:(Mt(n.a,n.b,null),n.b=n.b+1&n.a.length-1,e)}function nDn(n){var e,t;return e=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,t=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,e||t}function bT(n,e,t){var i,r;return i=new I$(e,t),r=new dI,n.b=zNn(n,n.b,i,r),r.b||++n.c,n.b.b=!1,r.d}function eDn(n,e,t){var i,r,c,o;for(o=c6(e,t),c=0,r=o.Kc();r.Ob();)i=u(r.Pb(),11),it(n.c,i,Q(c++))}function wl(n){var e,t;for(t=new E(n.a.b);t.at&&(t=n[e]);return t}function tDn(n,e,t){var i;return i=new X,XY(n,e,i,(J(),Vn),!0,!1),XY(n,t,i,Gn,!1,!1),i}function oF(n,e,t){var i,r,c,o;return c=null,o=e,r=Fd(o,"labels"),i=new jkn(n,t),c=(Hme(i.a,i.b,r),r),c}function Twe(n,e,t,i){var r;return r=xY(n,e,t,i),!r&&(r=Mge(n,t,i),r&&!rg(n,e,r))?null:r}function Mwe(n,e,t,i){var r;return r=LY(n,e,t,i),!r&&(r=TF(n,t,i),r&&!rg(n,e,r))?null:r}function iDn(n,e){var t;for(t=0;t1||e>=0&&n.b<3)}function o7(n){var e,t,i;for(e=new hu,i=_e(n,0);i.b!=i.d.c;)t=u(Re(i),8),s3(e,0,new mr(t));return e}function ja(n){var e,t;for(t=new E(n.a.b);t.ai?1:0}function QV(n,e){return ANn(n,e)?(Tn(n.b,u(k(e,(G(),Gb)),21),e),Ke(n.a,e),!0):!1}function Bwe(n){var e,t;e=u(k(n,(G(),Mu)),10),e&&(t=e.c,Qc(t.a,e),t.a.c.length==0&&Qc(Gi(e).b,t))}function fDn(n){return pf?F($zn,lKn,572,0,0,1):u(lf(n.a,F($zn,lKn,572,n.a.c.length,0,1)),842)}function Rwe(n,e,t,i){return QE(),new GI(A(M(Ha,1),OM,42,0,[(ex(n,e),new bd(n,e)),(ex(t,i),new bd(t,i))]))}function Rw(n,e,t){var i,r;return r=(i=new RI,i),wr(r,e,t),me((!n.q&&(n.q=new V(co,n,11,10)),n.q),r),r}function aF(n){var e,t,i,r;for(r=lre($ne,n),t=r.length,i=F(tn,q,2,t,6,1),e=0;e=n.b.c.length||(JV(n,2*e+1),t=2*e+2,t=0&&n[i]===e[i];i--);return i<0?0:cO(ci(n[i],fr),ci(e[i],fr))?-1:1}function _we(n,e){var t,i;for(i=_e(n,0);i.b!=i.d.c;)t=u(Re(i),214),t.e.length>0&&(e.td(t),t.i&&Fge(t))}function bF(n,e){var t,i;return i=u(Rn(n.a,4),126),t=F(bH,qB,415,e,0,1),i!=null&&gc(i,0,t,0,i.length),t}function lDn(n,e){var t;return t=new zx((n.f&256)!=0,n.i,n.a,n.d,(n.f&16)!=0,n.j,n.g,e),n.e!=null||(t.c=n),t}function Kwe(n,e){var t,i;for(i=n.Zb().Cc().Kc();i.Ob();)if(t=u(i.Pb(),14),t.Hc(e))return!0;return!1}function wF(n,e,t,i,r){var c,o;for(o=t;o<=r;o++)for(c=e;c<=i;c++)if(zw(n,c,o))return!0;return!1}function aDn(n,e,t){var i,r,c,o;for(_n(t),o=!1,c=n.Zc(e),r=t.Kc();r.Ob();)i=r.Pb(),c.Rb(i),o=!0;return o}function Hwe(n,e){var t;return n===e?!0:I(e,83)?(t=u(e,83),ZJ(Ed(n),t.vc())):!1}function dDn(n,e,t){var i,r;for(r=t.Kc();r.Ob();)if(i=u(r.Pb(),42),n.re(e,i.dd()))return!0;return!1}function bDn(n,e,t){return n.d[e.p][t.p]||(Bpe(n,e,t),n.d[e.p][t.p]=!0,n.d[t.p][e.p]=!0),n.a[e.p][t.p]}function W3(n,e){if(!n.ai()&&e==null)throw T(new Hn("The 'no null' constraint is violated"));return e}function X3(n,e){n.D==null&&n.B!=null&&(n.D=n.B,n.B=null),W$(n,e==null?null:(_n(e),e)),n.C&&n.yk(null)}function qwe(n,e){var t;return!n||n==e||!li(e,(G(),m0))?!1:(t=u(k(e,(G(),m0)),10),t!=n)}function gF(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.pl()}}function wDn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n.ql()}}function gDn(n){cMn.call(this,"The given string does not match the expected format for individual spacings.",n)}function Xu(){Xu=N,ws=new Jj("ELK",0),Yhn=new Jj("JSON",1),Jhn=new Jj("DOT",2),Zhn=new Jj("SVG",3)}function f7(){f7=N,CP=new AO(Xh,0),Don=new AO("RADIAL_COMPACTION",1),$on=new AO("WEDGE_COMPACTION",2)}function hf(){hf=N,Win=new uO("CONCURRENT",0),hs=new uO("IDENTITY_FINISH",1),Rb=new uO("UNORDERED",2)}function pF(){pF=N,jrn=(Aj(),SR),yrn=new In(pnn,jrn),OUn=new kt(vnn),DUn=new kt(mnn),$Un=new kt(knn)}function V3(){V3=N,xcn=new j0n,Lcn=new E0n,zWn=new C0n,GWn=new T0n,qWn=new M0n,Fcn=(_n(qWn),new uln)}function Q3(){Q3=N,sK=new jO("CONSERVATIVE",0),con=new jO("CONSERVATIVE_SOFT",1),Rm=new jO("SLOPPY",2)}function wT(){wT=N,_hn=new vd(15),cne=new tr((Xe(),nd),_hn),t9=Mp,Lhn=HZn,Nhn=Za,Rhn=Kg,Bhn=BP}function vF(n,e,t){var i,r,c;for(i=new Ct,c=_e(t,0);c.b!=c.d.c;)r=u(Re(c),8),Ke(i,new mr(r));aDn(n,e,i)}function Gwe(n){var e,t,i;for(e=0,i=F(ai,q,8,n.b,0,1),t=_e(n,0);t.b!=t.d.c;)i[e++]=u(Re(t),8);return i}function ZV(n){var e;return e=(!n.a&&(n.a=new V(e1,n,9,5)),n.a),e.i!=0?ore(u(D(e,0),678)):null}function zwe(n,e){var t;return t=qi(n,e),cO(h$(n,e),0)|Cre(h$(n,t),0)?t:qi(IM,h$(J0(t,63),1))}function Uwe(n,e){var t;t=cn((xF(),uP))!=null&&e.wg()!=null?K(Y(e.wg()))/K(Y(cn(uP))):1,it(n.b,e,t)}function Wwe(n,e){var t,i;return t=u(n.d.Bc(e),14),t?(i=n.e.hc(),i.Gc(t),n.e.d-=t.gc(),t.$b(),i):null}function nQ(n,e){var t,i;if(i=n.c[e],i!=0)for(n.c[e]=0,n.d-=i,t=e+1;t0)return a3(e-1,n.a.c.length),h1(n.a,e-1);throw T(new qmn)}function Xwe(n,e,t){if(e<0)throw T(new vr(_Hn+e));ee)throw T(new Hn(xM+n+aKn+e));if(n<0||e>t)throw T(new bG(xM+n+rnn+e+tnn+t))}function mDn(n){if(!n.a||!(n.a.i&8))throw T(new Dr("Enumeration class expected for layout option "+n.f))}function lb(n){var e;++n.j,n.i==0?n.g=null:n.ihA?n-t>hA:t-n>hA}function kF(n,e){return!n||e&&!n.j||I(n,124)&&u(n,124).a.b==0?0:n.Re()}function pT(n,e){return!n||e&&!n.k||I(n,124)&&u(n,124).a.a==0?0:n.Se()}function h7(n){return jl(),n<0?n!=-1?new VQ(-1,-n):gR:n<=10?xin[Gt(n)]:new VQ(1,n)}function tQ(n){throw cF(),T(new L9n("Unexpected typeof result '"+n+"'; please report this bug to the GWT team"))}function CDn(n){H9n(),oE(this),eC(this),this.e=n,NNn(this,n),this.g=n==null?iu:Lr(n),this.a="",this.b=n,this.a=""}function iQ(){this.a=new qgn,this.f=new O6n(this),this.b=new D6n(this),this.i=new $6n(this),this.e=new F6n(this)}function TDn(){iie.call(this,new _X(sb(16))),is(2,W_n),this.b=2,this.a=new RW(null,null,0,null),$9(this.a,this.a)}function i6(){i6=N,J_=new vO("DUMMY_NODE_OVER",0),qsn=new vO("DUMMY_NODE_UNDER",1),oP=new vO("EQUAL",2)}function yF(){yF=N,_R=sMn(A(M(e9,1),z,103,0,[(sr(),Zs),Ao])),KR=sMn(A(M(e9,1),z,103,0,[Yh,Jh]))}function jF(n){return(J(),cu).Hc(n.j)?K(Y(k(n,(G(),hv)))):Gr(A(M(ai,1),q,8,0,[n.i.n,n.n,n.a])).b}function Zwe(n){var e,t,i,r;for(i=n.b.a,t=i.a.ec().Kc();t.Ob();)e=u(t.Pb(),561),r=new pNn(e,n.e,n.f),W(n.g,r)}function Ca(n,e){var t,i,r;i=n.nk(e,null),r=null,e&&(r=(Qp(),t=new ud,t),O3(r,n.r)),i=af(n,r,i),i&&i.Fi()}function nge(n,e){var t,i;for(i=Fu(n.d,1)!=0,t=!0;t;)t=!1,t=e.c.Tf(e.e,i),t=t|_7(n,e,i,!1),i=!i;yV(n)}function rQ(n,e){var t,i,r;return i=!1,t=e.q.d,e.dr&&(JFn(e.q,r),i=t!=e.q.d)),i}function MDn(n,e){var t,i,r,c,o,f,h,l;return h=e.i,l=e.j,i=n.f,r=i.i,c=i.j,o=h-r,f=l-c,t=j.Math.sqrt(o*o+f*f),t}function cQ(n,e){var t,i;return i=OT(n),i||(t=(bL(),Yxn(e)),i=new Fmn(t),me(i.Vk(),n)),i}function l7(n,e){var t,i;return t=u(n.c.Bc(e),14),t?(i=n.hc(),i.Gc(t),n.d-=t.gc(),t.$b(),n.mc(i)):n.jc()}function ADn(n,e){var t;for(t=0;t=n.c.b:n.a<=n.c.b))throw T(new ic);return e=n.a,n.a+=n.c.c,++n.b,Q(e)}function ige(n){var e;return e=new uIn(n),O8(n.a,SWn,new Ku(A(M(Rk,1),rn,369,0,[e]))),e.d&&W(e.f,e.d),e.f}function EF(n){var e;return e=new Mz(n.a),Sr(e,n),H(e,(G(),rt),n),e.o.a=n.g,e.o.b=n.f,e.n.a=n.i,e.n.b=n.j,e}function rge(n,e,t,i){var r,c;for(c=n.Kc();c.Ob();)r=u(c.Pb(),70),r.n.a=e.a+(i.a-r.o.a)/2,r.n.b=e.b,e.b+=r.o.b+t}function cge(n,e,t){var i,r;for(r=e.a.a.ec().Kc();r.Ob();)if(i=u(r.Pb(),57),_Tn(n,i,t))return!0;return!1}function uge(n){var e,t;for(t=new E(n.r);t.a=0?e:-e;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return e<0?1/r:r}function hge(n,e){var t,i,r;for(r=1,t=n,i=e>=0?e:-e;i>0;)i%2==0?(t*=t,i=i/2|0):(r*=t,i-=1);return e<0?1/r:r}function FDn(n){var e,t;if(n!=null)for(t=0;t0&&(t=u(un(n.a,n.a.c.length-1),570),QV(t,e))||W(n.a,new dSn(e))}function wge(n){wo();var e,t;e=n.d.c-n.e.c,t=u(n.g,145),Yc(t.b,new _5n(e)),Yc(t.c,new K5n(e)),$i(t.i,new H5n(e))}function BDn(n){var e;return e=new V1,e.a+="VerticalSegment ",rc(e,n.e),e.a+=" ",De(e,Lz(new YI,new E(n.k))),e.a}function gge(n){var e;return e=u(xd(n.c.c,""),229),e||(e=new M2(Vp(Xp(new Zg,""),"Other")),Aa(n.c.c,"",e)),e}function r6(n){var e;return n.Db&64?yo(n):(e=new Bs(yo(n)),e.a+=" (name: ",dr(e,n.zb),e.a+=")",e.a)}function hQ(n,e,t){var i,r;return r=n.sb,n.sb=e,n.Db&4&&!(n.Db&1)&&(i=new wi(n,1,4,r,e),t?t.Ei(i):t=i),t}function CF(n,e){var t,i,r;for(t=0,r=zr(n,e).Kc();r.Ob();)i=u(r.Pb(),11),t+=k(i,(G(),Mu))!=null?1:0;return t}function Kw(n,e,t){var i,r,c;for(i=0,c=_e(n,0);c.b!=c.d.c&&(r=K(Y(Re(c))),!(r>t));)r>=e&&++i;return i}function pge(n,e,t){var i,r;return i=new Lh(n.e,3,13,null,(r=e.c,r||(Sn(),Cf)),v1(n,e),!1),t?t.Ei(i):t=i,t}function vge(n,e,t){var i,r;return i=new Lh(n.e,4,13,(r=e.c,r||(Sn(),Cf)),null,v1(n,e),!1),t?t.Ei(i):t=i,t}function lQ(n,e,t){var i,r;return r=n.r,n.r=e,n.Db&4&&!(n.Db&1)&&(i=new wi(n,1,8,r,n.r),t?t.Ei(i):t=i),t}function w1(n,e){var t,i;return t=u(e,676),i=t.vk(),!i&&t.wk(i=I(e,88)?new Fkn(n,u(e,26)):new eAn(n,u(e,148))),i}function a7(n,e,t){var i;n.qi(n.i+1),i=n.oi(e,t),e!=n.i&&gc(n.g,e,n.g,e+1,n.i-e),Mt(n.g,e,i),++n.i,n.bi(e,t),n.ci()}function mge(n,e){var t;return e.a&&(t=e.a.a.length,n.a?De(n.a,n.b):n.a=new Ju(n.d),iAn(n.a,e.a,e.d.length,t)),n}function kge(n,e){var t,i,r,c;if(e.vi(n.a),c=u(Rn(n.a,8),1936),c!=null)for(t=c,i=0,r=t.length;it)throw T(new vr(xM+n+rnn+e+", size: "+t));if(n>e)throw T(new Hn(xM+n+aKn+e))}function As(n,e,t){if(e<0)bY(n,t);else{if(!t.Ij())throw T(new Hn(Pl+t.ne()+em));u(t,66).Nj().Vj(n,n.yh(),e)}}function Ege(n,e,t,i,r,c,o,f){var h;for(h=t;c=i||e=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function zDn(n){var e;return n.Db&64?yo(n):(e=new Bs(yo(n)),e.a+=" (source: ",dr(e,n.d),e.a+=")",e.a)}function Tge(n,e,t){var i,r;return r=n.a,n.a=e,n.Db&4&&!(n.Db&1)&&(i=new wi(n,1,5,r,n.a),t?FJ(t,i):t=i),t}function g1(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,2,t,e))}function dQ(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,8,t,e))}function kT(n,e){var t;t=(n.Bb&256)!=0,e?n.Bb|=256:n.Bb&=-257,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,8,t,e))}function p1(n,e){var t;t=(n.Bb&512)!=0,e?n.Bb|=512:n.Bb&=-513,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,3,t,e))}function bQ(n,e){var t;t=(n.Bb&512)!=0,e?n.Bb|=512:n.Bb&=-513,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,9,t,e))}function u6(n,e){var t;return n.b==-1&&n.a&&(t=n.a.Gj(),n.b=t?n.c.Xg(n.a.aj(),t):yt(n.c.Tg(),n.a)),n.c.Og(n.b,e)}function Q(n){var e,t;return n>-129&&n<128?(e=n+128,t=(qEn(),jin)[e],!t&&(t=jin[e]=new gq(n)),t):new gq(n)}function J3(n){var e,t;return n>-129&&n<128?(e=n+128,t=(VEn(),Min)[e],!t&&(t=Min[e]=new vq(n)),t):new vq(n)}function wQ(n){var e,t;return e=n.k,e==(Qn(),Xt)?(t=u(k(n,(G(),ec)),61),t==(J(),Kn)||t==ae):!1}function Mge(n,e,t){var i,r,c;return c=(r=b4(n.b,e),r),c&&(i=u(jM(G8(n,c),""),26),i)?xY(n,i,e,t):null}function TF(n,e,t){var i,r,c;return c=(r=b4(n.b,e),r),c&&(i=u(jM(G8(n,c),""),26),i)?LY(n,i,e,t):null}function UDn(n,e){var t,i;for(i=new ie(n);i.e!=i.i.gc();)if(t=u(oe(i),138),B(e)===B(t))return!0;return!1}function s6(n,e,t){var i;if(i=n.gc(),e>i)throw T(new V0(e,i));if(n.hi()&&n.Hc(t))throw T(new Hn(yk));n.Xh(e,t)}function Age(n,e){var t;if(t=xw(n.i,e),t==null)throw T(new Af("Node did not exist in input."));return MV(e,t),null}function Sge(n,e){var t;if(t=R7(n,e),I(t,322))return u(t,34);throw T(new Hn(Pl+e+"' is not a valid attribute"))}function Pge(n,e,t){var i,r;for(r=I(e,99)&&u(e,18).Bb&Yi?new LO(e,n):new H3(e,n),i=0;ie?1:n==e?n==0?Zt(1/n,1/e):0:isNaN(n)?isNaN(e)?0:1:-1}function Bge(n,e){le(e,"Sort end labels",1),Bt(gt(qr(new $n(null,new xn(n.b,16)),new bdn),new wdn),new gdn),ce(e)}function o6(n,e,t){var i,r;return n.ej()?(r=n.fj(),i=Dx(n,e,t),n.$i(n.Zi(7,Q(t),i,e,r)),i):Dx(n,e,t)}function MF(n,e){var t,i,r;n.d==null?(++n.e,--n.f):(r=e.cd(),t=e.Sh(),i=(t&nt)%n.d.length,yde(n,i,hNn(n,i,t,r)))}function Y3(n,e){var t;t=(n.Bb&Eo)!=0,e?n.Bb|=Eo:n.Bb&=-1025,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,10,t,e))}function Z3(n,e){var t;t=(n.Bb&Ib)!=0,e?n.Bb|=Ib:n.Bb&=-4097,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,12,t,e))}function n4(n,e){var t;t=(n.Bb&mu)!=0,e?n.Bb|=mu:n.Bb&=-8193,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,15,t,e))}function e4(n,e){var t;t=(n.Bb&Bb)!=0,e?n.Bb|=Bb:n.Bb&=-2049,n.Db&4&&!(n.Db&1)&&et(n,new vo(n,1,11,t,e))}function Rge(n,e){var t;return t=Zt(n.b.c,e.b.c),t!=0||(t=Zt(n.a.a,e.a.a),t!=0)?t:Zt(n.a.b,e.a.b)}function _ge(n,e){var t;if(t=te(n.k,e),t==null)throw T(new Af("Port did not exist in input."));return MV(e,t),null}function Kge(n){var e,t;for(t=wNn(ts(n)).Kc();t.Ob();)if(e=Ce(t.Pb()),A6(n,e))return Vae((C7n(),zne),e);return null}function Hge(n,e){var t,i,r,c,o;for(o=Kc(n.e.Tg(),e),c=0,t=u(n.g,119),r=0;r>10)+rk&Ut,e[1]=(n&1023)+56320&Ut,Hs(e,0,e.length)}function jT(n){var e,t;return t=u(k(n,(nn(),ls)),103),t==(sr(),mh)?(e=K(Y(k(n,zS))),e>=1?Ao:Jh):t}function zge(n){switch(u(k(n,(nn(),Qh)),218).g){case 1:return new ewn;case 3:return new uwn;default:return new nwn}}function Ta(n){if(n.c)Ta(n.c);else if(n.d)throw T(new Dr("Stream already terminated, can't be modified or used"))}function PF(n){var e;return n.Db&64?yo(n):(e=new Bs(yo(n)),e.a+=" (identifier: ",dr(e,n.k),e.a+=")",e.a)}function QDn(n,e,t){var i,r;return i=(ad(),r=new Xy,r),UC(i,e),WC(i,t),n&&me((!n.a&&(n.a=new Jt(io,n,5)),n.a),i),i}function IF(n,e,t,i){var r,c;return _n(i),_n(t),r=n.xc(e),c=r==null?t:l7n(u(r,15),u(t,14)),c==null?n.Bc(e):n.zc(e,c),c}function Cn(n){var e,t,i,r;return t=(e=u(xo((i=n.gm,r=i.f,r==Ie?i:r)),9),new ks(e,u(bo(e,e.length),9),0)),ko(t,n),t}function Uge(n,e,t){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=u(r.Pb(),10),t7(t,u(un(e,i.p),14)))return i;return null}function Wge(n,e,t){var i;try{Awe(n,e,t)}catch(r){throw r=jt(r),I(r,597)?(i=r,T(new EX(i))):T(r)}return e}function vl(n,e){var t;return $r(n)&&$r(e)&&(t=n-e,ik>1,n.k=t-1>>1}function OF(){_J();var n,e,t;t=qTe+++Date.now(),n=Gt(j.Math.floor(t*uk))&FM,e=Gt(t-n*enn),this.a=n^1502,this.b=e^tN}function Kh(n){var e,t,i;for(e=new X,i=new E(n.j);i.a34028234663852886e22?$t:e<-34028234663852886e22?Vt:e}function JDn(n){return n-=n>>1&1431655765,n=(n>>2&858993459)+(n&858993459),n=(n>>4)+n&252645135,n+=n>>8,n+=n>>16,n&63}function YDn(n){var e,t,i,r;for(e=new Djn(n.Hd().gc()),r=0,i=$2(n.Hd().Kc());i.Ob();)t=i.Pb(),ole(e,t,Q(r++));return $5e(e.a)}function Zge(n,e){var t,i,r;for(r=new we,i=e.vc().Kc();i.Ob();)t=u(i.Pb(),42),it(r,t.cd(),Gbe(n,u(t.dd(),15)));return r}function yQ(n,e){n.n.c.length==0&&W(n.n,new lC(n.s,n.t,n.i)),W(n.b,e),iJ(u(un(n.n,n.n.c.length-1),211),e),oRn(n,e)}function Hw(n){return(n.c!=n.b.b||n.i!=n.g.b)&&(n.a.c=F(Zn,rn,1,0,5,1),Yt(n.a,n.b),Yt(n.a,n.g),n.c=n.b.b,n.i=n.g.b),n.a}function DF(n,e){var t,i,r;for(r=0,i=u(e.Kb(n),20).Kc();i.Ob();)t=u(i.Pb(),17),on(sn(k(t,(G(),mf))))||++r;return r}function n2e(n,e){var t,i,r;i=$w(e),r=K(Y(bb(i,(nn(),Mo)))),t=j.Math.max(0,r/2-.5),g6(e,t,1),W(n,new G7n(e,t))}function Ss(){Ss=N,Qk=new Q9(Xh,0),Sm=new Q9("FIRST",1),xl=new Q9(uHn,2),Pm=new Q9("LAST",3),Ub=new Q9(sHn,4)}function Hh(){Hh=N,rH=new Wj(K6,0),yy=new Wj("POLYLINE",1),Cv=new Wj("ORTHOGONAL",2),Sp=new Wj("SPLINES",3)}function ET(){ET=N,Jon=new PO("ASPECT_RATIO_DRIVEN",0),IK=new PO("MAX_SCALE_DRIVEN",1),Qon=new PO("AREA_DRIVEN",2)}function w7(){w7=N,AP=new IO("P1_STRUCTURE",0),SP=new IO("P2_PROCESSING_ORDER",1),PP=new IO("P3_EXECUTION",2)}function CT(){CT=N,CK=new MO("OVERLAP_REMOVAL",0),jK=new MO("COMPACTION",1),EK=new MO("GRAPH_SIZE_CALCULATION",2)}function zd(n,e){return Yo(),mo(Cl),j.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e))}function ZDn(n,e){var t,i;for(t=_e(n,0);t.b!=t.d.c;){if(i=x9(Y(Re(t))),i==e)return;if(i>e){a$(t);break}}y8(t,e)}function En(n,e){var t,i,r,c,o;if(t=e.f,Aa(n.c.d,t,e),e.g!=null)for(r=e.g,c=0,o=r.length;ce&&i.ue(n[c-1],n[c])>0;--c)o=n[c],Mt(n,c,n[c-1]),Mt(n,c-1,o)}function Ps(n,e,t,i){if(e<0)_Y(n,t,i);else{if(!t.Ij())throw T(new Hn(Pl+t.ne()+em));u(t,66).Nj().Tj(n,n.yh(),e,i)}}function TT(n,e){if(e==n.d)return n.e;if(e==n.e)return n.d;throw T(new Hn("Node "+e+" not part of edge "+n))}function t2e(n,e){switch(e.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 n$n(n,e){switch(e.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 jQ(n,e,t,i){switch(e){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return aQ(n,e,t,i)}function i2e(n){return n.k!=(Qn(),ti)?!1:C3(new $n(null,new Cd(new re(ue(ni(n).a.Kc(),new Mn)))),new Hbn)}function r2e(n){return n.e==null?n:(!n.c&&(n.c=new zx((n.f&256)!=0,n.i,n.a,n.d,(n.f&16)!=0,n.j,n.g,null)),n.c)}function c2e(n,e){return n.h==tk&&n.m==0&&n.l==0?(e&&(Il=Bc(0,0,0)),eyn((I3(),gin))):(e&&(Il=Bc(n.l,n.m,n.h)),Bc(0,0,0))}function Lr(n){var e;return Array.isArray(n)&&n.im===Xg?J1(Du(n))+"@"+(e=mt(n)>>>0,e.toString(16)):n.toString()}function f6(n){var e;this.a=(e=u(n.e&&n.e(),9),new ks(e,u(bo(e,e.length),9),0)),this.b=F(Zn,rn,1,this.a.a.length,5,1)}function u2e(n){var e,t,i;for(this.a=new Sh,i=new E(n);i.a0&&(Te(e-1,n.length),n.charCodeAt(e-1)==58)&&!$F(n,a9,d9))}function $F(n,e,t){var i,r;for(i=0,r=n.length;i=r)return e.c+t;return e.c+e.b.gc()}function l2e(n,e){o3();var t,i,r,c;for(i=bPn(n),r=e,S3(i,0,i.length,r),t=0;t0&&(i+=r,++t);return t>1&&(i+=n.d*(t-1)),i}function CQ(n){var e,t,i;for(i=new i1,i.a+="[",e=0,t=n.gc();e0&&this.b>0&&cW(this.c,this.b,this.a)}function AQ(n){xF(),this.c=cf(A(M(sMe,1),rn,831,0,[LQn])),this.b=new we,this.a=n,it(this.b,uP,1),Yc(NQn,new q6n(this))}function e$n(n,e){var t;return n.d?zu(n.b,e)?u(te(n.b,e),51):(t=e.Kf(),it(n.b,e,t),t):e.Kf()}function SQ(n,e){var t;return B(n)===B(e)?!0:I(e,91)?(t=u(e,91),n.e==t.e&&n.d==t.d&&Jae(n,t.a)):!1}function B2(n){switch(J(),n.g){case 4:return Kn;case 1:return Vn;case 3:return ae;case 2:return Gn;default:return Xr}}function PQ(n,e){switch(e){case 3:return n.f!=0;case 4:return n.g!=0;case 5:return n.i!=0;case 6:return n.j!=0}return SV(n,e)}function p2e(n){switch(n.g){case 0:return new Lgn;case 1:return new Ngn;default:throw T(new Hn(lB+(n.f!=null?n.f:""+n.g)))}}function t$n(n){switch(n.g){case 0:return new xgn;case 1:return new Bgn;default:throw T(new Hn(AN+(n.f!=null?n.f:""+n.g)))}}function i$n(n){switch(n.g){case 0:return new sG;case 1:return new b9n;default:throw T(new Hn(bA+(n.f!=null?n.f:""+n.g)))}}function v2e(n){switch(n.g){case 1:return new Pgn;case 2:return new kjn;default:throw T(new Hn(lB+(n.f!=null?n.f:""+n.g)))}}function m2e(n){var e,t;if(n.b)return n.b;for(t=pf?null:n.d;t;){if(e=pf?null:t.b,e)return e;t=pf?null:t.d}return e3(),Uin}function k2e(n){var e,t,i;return n.e==0?0:(e=n.d<<5,t=n.a[n.d-1],n.e<0&&(i=dOn(n),i==n.d-1&&(--t,t=t|0)),e-=x7(t),e)}function y2e(n){var e,t,i;return n>5,e=n&31,i=F(be,Le,25,t+1,15,1),i[t]=1<3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function E2e(n){return yF(),qn(),!!(n$n(u(n.a,81).j,u(n.b,103))||u(n.a,81).d.e!=0&&n$n(u(n.a,81).j,u(n.b,103)))}function C2e(n){DC(),u(n.We((Xe(),_l)),174).Hc((xu(),UP))&&(u(n.We(rw),174).Fc((Tu(),Pp)),u(n.We(_l),174).Mc(UP))}function c$n(n,e){var t,i;if(e){for(t=0;t=0;--i)for(e=t[i],r=0;r>1,this.k=e-1>>1}function I2e(n,e){le(e,"End label post-processing",1),Bt(gt(qr(new $n(null,new xn(n.b,16)),new udn),new sdn),new odn),ce(e)}function O2e(n,e,t){var i,r;return i=K(n.p[e.i.p])+K(n.d[e.i.p])+e.n.b+e.a.b,r=K(n.p[t.i.p])+K(n.d[t.i.p])+t.n.b+t.a.b,r-i}function D2e(n,e,t){var i,r;for(i=ci(t,fr),r=0;fc(i,0)!=0&&r0&&(Te(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e))}function F2e(n){var e;return n==null?null:new il((e=jc(n,!0),e.length>0&&(Te(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e))}function LQ(n,e){var t;return n.i>0&&(e.lengthn.i&&Mt(e,n.i,null),e}function Oc(n,e,t){var i,r,c;return n.ej()?(i=n.i,c=n.fj(),a7(n,i,e),r=n.Zi(3,null,e,i,c),t?t.Ei(r):t=r):a7(n,n.i,e),t}function x2e(n,e,t){var i,r;return i=new Lh(n.e,4,10,(r=e.c,I(r,88)?u(r,26):(Sn(),so)),null,v1(n,e),!1),t?t.Ei(i):t=i,t}function L2e(n,e,t){var i,r;return i=new Lh(n.e,3,10,null,(r=e.c,I(r,88)?u(r,26):(Sn(),so)),v1(n,e),!1),t?t.Ei(i):t=i,t}function o$n(n){W0();var e;return e=new mr(u(n.e.We((Xe(),Kg)),8)),n.B.Hc((xu(),Mv))&&(e.a<=0&&(e.a=20),e.b<=0&&(e.b=20)),e}function f$n(n){wb();var e;return(n.q?n.q:(Pn(),Pn(),ph))._b((nn(),j0))?e=u(k(n,j0),197):e=u(k(Gi(n),$m),197),e}function bb(n,e){var t,i;return i=null,li(n,(nn(),rP))&&(t=u(k(n,rP),94),t.Xe(e)&&(i=t.We(e))),i==null&&(i=k(Gi(n),e)),i}function h$n(n,e){var t,i,r;return I(e,42)?(t=u(e,42),i=t.cd(),r=ab(n.Rc(),i),$f(r,t.dd())&&(r!=null||n.Rc()._b(i))):!1}function NF(n,e){var t,i,r;return n.f>0?(n.qj(),i=e==null?0:mt(e),r=(i&nt)%n.d.length,t=hNn(n,r,i,e),t!=-1):!1}function Ko(n,e){var t,i,r;return n.f>0&&(n.qj(),i=e==null?0:mt(e),r=(i&nt)%n.d.length,t=kY(n,r,i,e),t)?t.dd():null}function g7(n,e){var t,i,r,c;for(c=Kc(n.e.Tg(),e),t=u(n.g,119),r=0;r1?rf(Ih(e.a[1],32),ci(e.a[0],fr)):ci(e.a[0],fr),$d(Ni(e.e,t))))}function p7(n,e){var t;return $r(n)&&$r(e)&&(t=n%e,ik>5,e&=31,r=n.d+t+(e==0?0:1),i=F(be,Le,25,r,15,1),Nve(i,n.a,t,e),c=new Pw(n.e,r,i),K5(c),c}function BQ(n,e,t){var i,r;i=u(vc(Pv,e),117),r=u(vc(m9,e),117),t?(kr(Pv,n,i),kr(m9,n,r)):(kr(m9,n,i),kr(Pv,n,r))}function p$n(n,e,t){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.ue(e,c.d),t&&i==0)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function v$n(n,e,t){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.ue(e,c.d),t&&i==0)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function K2e(n,e,t,i){var r,c,o;return r=!1,jEe(n.f,t,i)&&(ape(n.f,n.a[e][t],n.a[e][i]),c=n.a[e],o=c[i],c[i]=c[t],c[t]=o,r=!0),r}function RQ(n,e,t,i,r){var c,o,f;for(o=r;e.b!=e.c;)c=u(y2(e),10),f=u(zr(c,i).Xb(0),11),n.d[f.p]=o++,t.c[t.c.length]=f;return o}function _Q(n,e,t){var i,r,c,o,f;return o=n.k,f=e.k,i=t[o.g][f.g],r=Y(bb(n,i)),c=Y(bb(e,i)),j.Math.max((_n(r),r),(_n(c),c))}function H2e(n,e,t){var i,r,c,o;for(i=t/n.c.length,r=0,o=new E(n);o.a2e3&&(wzn=n,KA=j.setTimeout(Vie,10))),_A++==0?(E0e((aG(),din)),!0):!1}function G2e(n,e){var t,i,r;for(i=new re(ue(ni(n).a.Kc(),new Mn));Se(i);)if(t=u(ve(i),17),r=t.d.i,r.c==e)return!1;return!0}function KQ(n,e){var t,i;if(I(e,245)){i=u(e,245);try{return t=n.vd(i),t==0}catch(r){if(r=jt(r),!I(r,205))throw T(r)}}return!1}function z2e(){return Error.stackTraceLimit>0?(j.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function U2e(n,e){return Yo(),Yo(),mo(Cl),(j.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e)))>0}function HQ(n,e){return Yo(),Yo(),mo(Cl),(j.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e)))<0}function y$n(n,e){return Yo(),Yo(),mo(Cl),(j.Math.abs(n-e)<=Cl||n==e||isNaN(n)&&isNaN(e)?0:ne?1:pd(isNaN(n),isNaN(e)))<=0}function RF(n,e){for(var t=0;!e[t]||e[t]=="";)t++;for(var i=e[t++];tJL)return t.fh();if(i=t.Zg(),i||t==n)break}return i}function qQ(n){return dC(),I(n,156)?u(te($y,Azn),288).vg(n):zu($y,Du(n))?u(te($y,Du(n)),288).vg(n):null}function X2e(n){if(DT(B4,n))return qn(),z4;if(DT(EB,n))return qn(),qa;throw T(new Hn("Expecting true or false"))}function V2e(n,e){if(e.c==n)return e.d;if(e.d==n)return e.c;throw T(new Hn("Input edge is not connected to the input port."))}function A$n(n,e){return n.e>e.e?1:n.ee.d?n.e:n.d=48&&n<48+j.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function P$n(n,e){var t;return B(e)===B(n)?!0:!I(e,21)||(t=u(e,21),t.gc()!=n.gc())?!1:n.Ic(t)}function Q2e(n,e){var t,i,r,c;return i=n.a.length-1,t=e-n.b&i,c=n.c-e&i,r=n.c-n.b&i,cjn(t=c?(Vwe(n,e),-1):(Qwe(n,e),1)}function J2e(n,e){var t,i;for(t=(Te(e,n.length),n.charCodeAt(e)),i=e+1;ie.e?1:n.fe.f?1:mt(n)-mt(e)}function DT(n,e){return _n(n),e==null?!1:An(n,e)?!0:n.length==e.length&&An(n.toLowerCase(),e.toLowerCase())}function upe(n,e){var t,i,r,c;for(i=0,r=e.gc();i0&&fc(n,128)<0?(e=ge(n)+128,t=(XEn(),Ein)[e],!t&&(t=Ein[e]=new pq(n)),t):new pq(n)}function O$n(n,e){var t,i;return t=e.Hh(n.a),t&&(i=Ce(Ko((!t.b&&(t.b=new qu((Sn(),nr),tc,t)),t.b),We)),i!=null)?i:e.ne()}function spe(n,e){var t,i;return t=e.Hh(n.a),t&&(i=Ce(Ko((!t.b&&(t.b=new qu((Sn(),nr),tc,t)),t.b),We)),i!=null)?i:e.ne()}function ope(n,e){c$();var t,i;for(i=new re(ue(Kh(n).a.Kc(),new Mn));Se(i);)if(t=u(ve(i),17),t.d.i==e||t.c.i==e)return t;return null}function UQ(n,e,t){this.c=n,this.f=new X,this.e=new Li,this.j=new eW,this.n=new eW,this.b=e,this.g=new ys(e.c,e.d,e.b,e.a),this.a=t}function _F(n){var e,t,i,r;for(this.a=new Sh,this.d=new fi,this.e=0,t=n,i=0,r=t.length;i0):!1}function F$n(n){var e;B(hn(n,(Xe(),Bg)))===B((_h(),HP))&&(At(n)?(e=u(hn(At(n),Bg),334),gr(n,Bg,e)):gr(n,Bg,i9))}function ape(n,e,t){var i,r;yx(n.e,e,t,(J(),Gn)),yx(n.i,e,t,Vn),n.a&&(r=u(k(e,(G(),rt)),11),i=u(k(t,rt),11),l$(n.g,r,i))}function x$n(n,e,t){var i,r,c;i=e.c.p,c=e.p,n.b[i][c]=new YTn(n,e),t&&(n.a[i][c]=new c6n(e),r=u(k(e,(G(),m0)),10),r&&Tn(n.d,r,e))}function L$n(n,e){var t,i,r;if(W(eS,n),e.Fc(n),t=u(te(DR,n),21),t)for(r=t.Kc();r.Ob();)i=u(r.Pb(),33),Fr(eS,i,0)!=-1||L$n(i,e)}function dpe(n,e,t){var i;(Fzn?(m2e(n),!0):xzn||Nzn?(e3(),!0):Lzn&&(e3(),!1))&&(i=new hEn(e),i.b=t,g5e(n,i))}function KF(n,e){var t;t=!n.A.Hc((Vu(),id))||n.q==(Ti(),Ac),n.u.Hc((Tu(),n1))?t?xCe(n,e):a_n(n,e):n.u.Hc(Gl)&&(t?nCe(n,e):M_n(n,e))}function r4(n,e){var t,i;if(++n.j,e!=null&&(t=(i=n.a.Cb,I(i,97)?u(i,97).Jg():null),ome(e,t))){R2(n.a,4,t);return}R2(n.a,4,u(e,126))}function N$n(n,e,t){return new ys(j.Math.min(n.a,e.a)-t/2,j.Math.min(n.b,e.b)-t/2,j.Math.abs(n.a-e.a)+t,j.Math.abs(n.b-e.b)+t)}function bpe(n,e){var t,i;return t=Uc(n.a.c.p,e.a.c.p),t!=0?t:(i=Uc(n.a.d.i.p,e.a.d.i.p),i!=0?i:Uc(e.a.d.p,n.a.d.p))}function wpe(n,e,t){var i,r,c,o;return c=e.j,o=t.j,c!=o?c.g-o.g:(i=n.f[e.p],r=n.f[t.p],i==0&&r==0?0:i==0?-1:r==0?1:Zt(i,r))}function B$n(n,e,t){var i,r,c;if(!t[e.d])for(t[e.d]=!0,r=new E(Hw(e));r.a=r)return r;for(e=e>0?e:0;ei&&Mt(e,i,null),e}function _$n(n,e){var t,i;for(i=n.a.length,e.lengthi&&Mt(e,i,null),e}function Aa(n,e,t){var i,r,c;return r=u(te(n.e,e),387),r?(c=gU(r,t),Oyn(n,r),c):(i=new qU(n,e,t),it(n.e,e,i),iMn(i),null)}function vpe(n){var e;if(n==null)return null;if(e=a9e(jc(n,!0)),e==null)throw T(new VI("Invalid hexBinary value: '"+n+"'"));return e}function m7(n){return jl(),fc(n,0)<0?fc(n,-1)!=0?new OJ(-1,P3(n)):gR:fc(n,10)<=0?xin[ge(n)]:new OJ(1,n)}function qF(){return SM(),A(M(yUn,1),z,159,0,[mUn,vUn,kUn,hUn,fUn,lUn,bUn,dUn,aUn,pUn,gUn,wUn,sUn,uUn,oUn,rUn,iUn,cUn,eUn,nUn,tUn,TR])}function K$n(n){var e;this.d=new X,this.j=new Li,this.g=new Li,e=n.g.b,this.f=u(k(Gi(e),(nn(),ls)),103),this.e=K(Y(xT(e,nw)))}function H$n(n){this.b=new X,this.e=new X,this.d=n,this.a=!Wv(gt(new $n(null,new Cd(new uf(n.b))),new Fv(new qbn))).sd((ca(),V4))}function Ho(){Ho=N,Xn=new Z9("PARENTS",0),pi=new Z9("NODES",1),Yf=new Z9("EDGES",2),Ya=new Z9("PORTS",3),D1=new Z9("LABELS",4)}function qw(){qw=N,Hl=new e8("DISTRIBUTED",0),Cy=new e8("JUSTIFIED",1),Hhn=new e8("BEGIN",2),r9=new e8(I4,3),qhn=new e8("END",4)}function mpe(n){var e;switch(e=n.yi(null),e){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function GF(n){switch(n.g){case 1:return sr(),Yh;case 4:return sr(),Zs;case 2:return sr(),Ao;case 3:return sr(),Jh}return sr(),mh}function kpe(n,e,t){var i;switch(i=t.q.getFullYear()-Tl+Tl,i<0&&(i=-i),e){case 1:n.a+=i;break;case 2:sh(n,i%100,2);break;default:sh(n,i,e)}}function _e(n,e){var t,i;if(tb(e,n.b),e>=n.b>>1)for(i=n.c,t=n.b;t>e;--t)i=i.b;else for(i=n.a.a,t=0;t=64&&e<128&&(r=rf(r,Ih(1,e-64)));return r}function xT(n,e){var t,i;return i=null,li(n,(Xe(),Ap))&&(t=u(k(n,Ap),94),t.Xe(e)&&(i=t.We(e))),i==null&&Gi(n)&&(i=k(Gi(n),e)),i}function z$n(n,e){var t,i,r;r=e.d.i,i=r.k,!(i==(Qn(),ti)||i==vf)&&(t=new re(ue(ni(r).a.Kc(),new Mn)),Se(t)&&it(n.k,e,u(ve(t),17)))}function zF(n,e){var t,i,r;return i=On(n.Tg(),e),t=e-n.Ah(),t<0?(r=n.Yg(i),r>=0?n.lh(r):Ox(n,i)):t<0?Ox(n,i):u(i,66).Nj().Sj(n,n.yh(),t)}function cn(n){var e;if(I(n.a,4)){if(e=qQ(n.a),e==null)throw T(new Dr(HHn+n.b+"'. "+KHn+(Ph(Fy),Fy.k)+Etn));return e}else return n.a}function Epe(n){var e;if(n==null)return null;if(e=qCe(jc(n,!0)),e==null)throw T(new VI("Invalid base64Binary value: '"+n+"'"));return e}function oe(n){var e;try{return e=n.i.Xb(n.e),n.mj(),n.g=n.e++,e}catch(t){throw t=jt(t),I(t,73)?(n.mj(),T(new ic)):T(t)}}function UF(n){var e;try{return e=n.c.ki(n.e),n.mj(),n.g=n.e++,e}catch(t){throw t=jt(t),I(t,73)?(n.mj(),T(new ic)):T(t)}}function a6(){a6=N,Trn=(Xe(),yhn),IR=Zfn,FUn=Tp,Crn=nd,BUn=(WT(),irn),NUn=ern,RUn=crn,LUn=nrn,xUn=(pF(),yrn),PR=OUn,Ern=DUn,nS=$Un}function LT(n){switch(DG(),this.c=new X,this.d=n,n.g){case 0:case 2:this.a=_W(qrn),this.b=$t;break;case 3:case 1:this.a=qrn,this.b=Vt}}function U$n(n,e,t){var i,r;if(n.c)Zc(n.c,n.c.i+e),nu(n.c,n.c.j+t);else for(r=new E(n.b);r.a0&&(W(n.b,new MEn(e.a,t)),i=e.a.length,0i&&(e.a+=Iyn(F(Ls,Bf,25,-i,15,1))))}function W$n(n,e){var t,i,r;for(t=n.o,r=u(u(ct(n.r,e),21),84).Kc();r.Ob();)i=u(r.Pb(),111),i.e.a=M3e(i,t.a),i.e.b=t.b*K(Y(i.b.We(JA)))}function Tpe(n,e){var t,i,r,c;return r=n.k,t=K(Y(k(n,(G(),k0)))),c=e.k,i=K(Y(k(e,k0))),c!=(Qn(),Xt)?-1:r!=Xt?1:t==i?0:t=0?n.hh(e,t,i):(n.eh()&&(i=(r=n.Vg(),r>=0?n.Qg(i):n.eh().ih(n,-1-r,null,i))),n.Sg(e,t,i))}function XQ(n,e){switch(e){case 7:!n.e&&(n.e=new Fn(di,n,7,4)),de(n.e);return;case 8:!n.d&&(n.d=new Fn(di,n,8,5)),de(n.d);return}FQ(n,e)}function qo(n,e){var t;t=n.Zc(e);try{return t.Pb()}catch(i){throw i=jt(i),I(i,109)?T(new vr("Can't get element "+e)):T(i)}}function VQ(n,e){this.e=n,e=0&&(t.d=n.t);break;case 3:n.t>=0&&(t.a=n.t)}n.C&&(t.b=n.C.b,t.c=n.C.c)}function K2(){K2=N,$k=new Rj(NM,0),Dk=new Rj(lN,1),Fk=new Rj(aN,2),xk=new Rj(dN,3),$k.a=!1,Dk.a=!0,Fk.a=!1,xk.a=!0}function d6(){d6=N,Lk=new Bj(NM,0),YA=new Bj(lN,1),ZA=new Bj(aN,2),Nk=new Bj(dN,3),Lk.a=!1,YA.a=!0,ZA.a=!1,Nk.a=!0}function Ipe(n){var e;e=n.a;do e=u(ve(new re(ue(xr(e).a.Kc(),new Mn))),17).c.i,e.k==(Qn(),gi)&&n.b.Fc(e);while(e.k==(Qn(),gi));n.b=va(n.b)}function Ope(n){var e,t,i;for(i=n.c.a,n.p=(pe(i),new du(i)),t=new E(i);t.at.b)return!0}return!1}function WF(n,e){return mi(n)?!!ozn[e]:n.hm?!!n.hm[e]:G0(n)?!!szn[e]:q0(n)?!!uzn[e]:!1}function gr(n,e,t){return t==null?(!n.o&&(n.o=new Wu((Dc(),Ul),S0,n,0)),IT(n.o,e)):(!n.o&&(n.o=new Wu((Dc(),Ul),S0,n,0)),XT(n.o,e,t)),n}function xpe(n,e,t,i){var r,c;c=e.Xe((Xe(),_g))?u(e.We(_g),21):n.j,r=Cge(c),r!=(SM(),TR)&&(t&&!GQ(r)||nY(d9e(n,r,i),e))}function BT(n,e,t,i){var r,c,o;return c=On(n.Tg(),e),r=e-n.Ah(),r<0?(o=n.Yg(c),o>=0?n._g(o,t,!0):Yd(n,c,t)):u(c,66).Nj().Pj(n,n.yh(),r,t,i)}function Lpe(n,e,t,i){var r,c,o;t.mh(e)&&(er(),R$(e)?(r=u(t.ah(e),153),upe(n,r)):(c=(o=e,o?u(i,49).xh(o):null),c&&Bte(t.ah(e),c)))}function Npe(n){switch(n.g){case 1:return Hd(),Ok;case 3:return Hd(),Ik;case 2:return Hd(),AR;case 4:return Hd(),MR;default:return null}}function QQ(n){switch(typeof n){case EL:return m1(n);case UZ:return Gt(n);case X2:return qn(),n?1231:1237;default:return n==null?0:md(n)}}function Bpe(n,e,t){if(n.e)switch(n.b){case 1:d1e(n.c,e,t);break;case 0:b1e(n.c,e,t)}else xAn(n.c,e,t);n.a[e.p][t.p]=n.c.i,n.a[t.p][e.p]=n.c.e}function Y$n(n){var e,t;if(n==null)return null;for(t=F(vh,q,193,n.length,0,2),e=0;e=0)return r;if(n.Fk()){for(i=0;i=r)throw T(new V0(e,r));if(n.hi()&&(i=n.Xc(t),i>=0&&i!=e))throw T(new Hn(yk));return n.mi(e,t)}function JQ(n,e){if(this.a=u(pe(n),245),this.b=u(pe(e),245),n.vd(e)>0||n==(qI(),cR)||e==(HI(),uR))throw T(new Hn("Invalid range: "+OAn(n,e)))}function Z$n(n){var e,t;for(this.b=new X,this.c=n,this.a=!1,t=new E(n.a);t.a0),(e&-e)==e)return Gt(e*Fu(n,31)*4656612873077393e-25);do t=Fu(n,31),i=t%e;while(t-i+(e-1)<0);return Gt(i)}function m1(n){lEn();var e,t,i;return t=":"+n,i=XA[t],i!=null?Gt((_n(i),i)):(i=Xin[t],e=i==null?I8e(n):Gt((_n(i),i)),c1e(),XA[t]=e,e)}function eFn(n,e,t){le(t,"Compound graph preprocessor",1),n.a=new Od,s_n(n,e,null),pje(n,e),Z9e(n),H(e,(G(),dun),n.a),n.a=null,Eu(n.b),ce(t)}function Kpe(n,e,t){switch(t.g){case 1:n.a=e.a/2,n.b=0;break;case 2:n.a=e.a,n.b=e.b/2;break;case 3:n.a=e.a/2,n.b=e.b;break;case 4:n.a=0,n.b=e.b/2}}function Hpe(n){var e,t,i;for(i=u(ct(n.a,(Vw(),IS)),15).Kc();i.Ob();)t=u(i.Pb(),101),e=hJ(t),b3(n,t,e[0],(Kd(),w0),0),b3(n,t,e[1],g0,1)}function qpe(n){var e,t,i;for(i=u(ct(n.a,(Vw(),OS)),15).Kc();i.Ob();)t=u(i.Pb(),101),e=hJ(t),b3(n,t,e[0],(Kd(),w0),0),b3(n,t,e[1],g0,1)}function XF(n){switch(n.g){case 0:return null;case 1:return new eOn;case 2:return new oG;default:throw T(new Hn(lB+(n.f!=null?n.f:""+n.g)))}}function k7(n,e,t){var i,r;for(lwe(n,e-n.s,t-n.t),r=new E(n.n);r.a1&&(c=_pe(n,e)),c}function VF(n){var e;return n.f&&n.f.kh()&&(e=u(n.f,49),n.f=u(pl(n,e),82),n.f!=e&&n.Db&4&&!(n.Db&1)&&et(n,new wi(n,9,8,e,n.f))),n.f}function QF(n){var e;return n.i&&n.i.kh()&&(e=u(n.i,49),n.i=u(pl(n,e),82),n.i!=e&&n.Db&4&&!(n.Db&1)&&et(n,new wi(n,9,7,e,n.i))),n.i}function ir(n){var e;return n.b&&n.b.Db&64&&(e=n.b,n.b=u(pl(n,e),18),n.b!=e&&n.Db&4&&!(n.Db&1)&&et(n,new wi(n,9,21,e,n.b))),n.b}function KT(n,e){var t,i,r;n.d==null?(++n.e,++n.f):(i=e.Sh(),u8e(n,n.f+1),r=(i&nt)%n.d.length,t=n.d[r],!t&&(t=n.d[r]=n.uj()),t.Fc(e),++n.f)}function nJ(n,e,t){var i;return e.Kj()?!1:e.Zj()!=-2?(i=e.zj(),i==null?t==null:tt(i,t)):e.Hj()==n.e.Tg()&&t==null}function HT(){var n;is(16,J_n),n=UIn(16),this.b=F(oR,nk,317,n,0,1),this.c=F(oR,nk,317,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function qh(n){vU.call(this),this.k=(Qn(),ti),this.j=(is(6,Pb),new Pc(6)),this.b=(is(2,Pb),new Pc(2)),this.d=new NI,this.f=new Zq,this.a=n}function zpe(n){var e,t;n.c.length<=1||(e=ZNn(n,(J(),ae)),Kxn(n,u(e.a,19).a,u(e.b,19).a),t=ZNn(n,Gn),Kxn(n,u(t.a,19).a,u(t.b,19).a))}function b6(){b6=N,zsn=new V9("SIMPLE",0),nK=new V9(PN,1),eK=new V9("LINEAR_SEGMENTS",2),Lm=new V9("BRANDES_KOEPF",3),Nm=new V9(EHn,4)}function eJ(n,e,t){p2(u(k(e,(nn(),xt)),98))||(VX(n,e,k1(e,t)),VX(n,e,k1(e,(J(),ae))),VX(n,e,k1(e,Kn)),Pn(),bi(e.j,new i6n(n)))}function tFn(n,e,t,i){var r,c,o;for(r=u(ct(i?n.a:n.b,e),21),o=r.Kc();o.Ob();)if(c=u(o.Pb(),33),aM(n,t,c))return!0;return!1}function JF(n){var e,t;for(t=new ie(n);t.e!=t.i.gc();)if(e=u(oe(t),87),e.e||(!e.d&&(e.d=new Jt(ar,e,1)),e.d).i!=0)return!0;return!1}function YF(n){var e,t;for(t=new ie(n);t.e!=t.i.gc();)if(e=u(oe(t),87),e.e||(!e.d&&(e.d=new Jt(ar,e,1)),e.d).i!=0)return!0;return!1}function Upe(n){var e,t,i;for(e=0,i=new E(n.c.a);i.a102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function ex(n,e){if(n==null)throw T(new c2("null key in entry: null="+e));if(e==null)throw T(new c2("null value in entry: "+n+"=null"))}function Wpe(n,e){for(var t,i;n.Ob();)if(!e.Ob()||(t=n.Pb(),i=e.Pb(),!(B(t)===B(i)||t!=null&&tt(t,i))))return!1;return!e.Ob()}function rFn(n,e){var t;return t=A(M(ji,1),pr,25,15,[kF(n.a[0],e),kF(n.a[1],e),kF(n.a[2],e)]),n.d&&(t[0]=j.Math.max(t[0],t[2]),t[2]=t[0]),t}function cFn(n,e){var t;return t=A(M(ji,1),pr,25,15,[pT(n.a[0],e),pT(n.a[1],e),pT(n.a[2],e)]),n.d&&(t[0]=j.Math.max(t[0],t[2]),t[2]=t[0]),t}function Pa(){Pa=N,f_=new X9("GREEDY",0),Gcn=new X9(fHn,1),h_=new X9(PN,2),Em=new X9("MODEL_ORDER",3),jm=new X9("GREEDY_MODEL_ORDER",4)}function uFn(n,e){var t,i,r;for(n.b[e.g]=1,i=_e(e.d,0);i.b!=i.d.c;)t=u(Re(i),188),r=t.c,n.b[r.g]==1?Ke(n.a,t):n.b[r.g]==2?n.b[r.g]=1:uFn(n,r)}function Xpe(n,e){var t,i,r;for(r=new Pc(e.gc()),i=e.Kc();i.Ob();)t=u(i.Pb(),286),t.c==t.f?l4(n,t,t.c):U5e(n,t)||(r.c[r.c.length]=t);return r}function Vpe(n,e,t){var i,r,c,o,f;for(f=n.r+e,n.r+=e,n.d+=t,i=t/n.n.c.length,r=0,o=new E(n.n);o.ac&&Mt(e,c,null),e}function f3e(n,e){var t,i;if(i=n.gc(),e==null){for(t=0;t0&&(h+=r),l[a]=o,o+=f*(h+i)}function bFn(n){var e,t,i;for(i=n.f,n.n=F(ji,pr,25,i,15,1),n.d=F(ji,pr,25,i,15,1),e=0;e0?n.c:0),++r;n.b=i,n.d=c}function g3e(n,e){var t,i,r,c,o;for(i=0,r=0,t=0,o=new E(e);o.a0?n.g:0),++t;n.c=r,n.d=i}function mFn(n,e){var t;return t=A(M(ji,1),pr,25,15,[ZQ(n,(_o(),Zr),e),ZQ(n,Fc,e),ZQ(n,nc,e)]),n.f&&(t[0]=j.Math.max(t[0],t[2]),t[2]=t[0]),t}function p3e(n,e,t){var i;try{wM(n,e+n.j,t+n.k,!1,!0)}catch(r){throw r=jt(r),I(r,73)?(i=r,T(new vr(i.g+RM+e+Ji+t+")."))):T(r)}}function v3e(n,e,t){var i;try{wM(n,e+n.j,t+n.k,!0,!1)}catch(r){throw r=jt(r),I(r,73)?(i=r,T(new vr(i.g+RM+e+Ji+t+")."))):T(r)}}function kFn(n){var e;li(n,(nn(),y0))&&(e=u(k(n,y0),21),e.Hc((jb(),So))?(e.Mc(So),e.Fc(Po)):e.Hc(Po)&&(e.Mc(Po),e.Fc(So)))}function yFn(n){var e;li(n,(nn(),y0))&&(e=u(k(n,y0),21),e.Hc((jb(),Oo))?(e.Mc(Oo),e.Fc(eo)):e.Hc(eo)&&(e.Mc(eo),e.Fc(Oo)))}function m3e(n,e,t){le(t,"Self-Loop ordering",1),Bt(Xc(gt(gt(qr(new $n(null,new xn(e.b,16)),new P0n),new I0n),new O0n),new D0n),new O5n(n)),ce(t)}function j7(n,e,t,i){var r,c;for(r=e;r0&&(r.b+=e),r}function zT(n,e){var t,i,r;for(r=new Li,i=n.Kc();i.Ob();)t=u(i.Pb(),37),M6(t,0,r.b),r.b+=t.f.b+e,r.a=j.Math.max(r.a,t.f.a);return r.a>0&&(r.a+=e),r}function EFn(n){var e,t,i;for(i=nt,t=new E(n.a);t.a>16==6?n.Cb.ih(n,5,Vo,e):(i=ir(u(On((t=u(Rn(n,16),26),t||n.zh()),n.Db>>16),18)),n.Cb.ih(n,i.n,i.f,e))}function C3e(n){k3();var e=n.e;if(e&&e.stack){var t=e.stack,i=e+` `;return t.substring(0,i.length)==i&&(t=t.substring(i.length)),t.split(` diff --git a/backend/web/assets/ganttDiagram-088dbd90-86576d07.js b/backend/web/assets/ganttDiagram-088dbd90-259acb1a.js similarity index 50% rename from backend/web/assets/ganttDiagram-088dbd90-86576d07.js rename to backend/web/assets/ganttDiagram-088dbd90-259acb1a.js index 99682471..b63fc0f9 100644 --- a/backend/web/assets/ganttDiagram-088dbd90-86576d07.js +++ b/backend/web/assets/ganttDiagram-088dbd90-259acb1a.js @@ -1,9 +1,9 @@ -import{Q as Ze,R as Xe,T as je,U as Qe,V as Dn,W as ee,X as _n,i as Ct,s as Mn,g as Sn,H as Un,I as Fn,h as En,f as An,m as In,J as Yn,t as Ln,o as he,n as Bt,p as Wn,q as On,F as Nn}from"./EchartsRenderer-3d08027d.js";import{aP as Vn,b3 as Hn,aS as et,b4 as zn,b5 as Pn}from"./index-51905ea3.js";import{b as Rn,t as Ee,c as Bn,a as qn,l as Zn}from"./linear-e4d2c5e8.js";import{i as Xn}from"./init-77b53fdd.js";import"./_plugin-vue_export-helper-c27b6911.js";function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function Qn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Jn(t){return t}var Zt=1,ne=2,de=3,qt=4,Ae=1e-6;function Gn(t){return"translate("+t+",0)"}function Kn(t){return"translate(0,"+t+")"}function $n(t){return e=>+t(e)}function tr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function er(){return!this.__axis}function Je(t,e){var n=[],r=null,i=null,a=6,o=6,b=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=t===Zt||t===qt?-1:1,w=t===qt||t===ne?"x":"y",A=t===Zt||t===de?Gn:Kn;function x(y){var z=r??(e.ticks?e.ticks.apply(e,n):e.domain()),U=i??(e.tickFormat?e.tickFormat.apply(e,n):Jn),$=Math.max(a,0)+b,nt=e.range(),tt=+nt[0]+C,q=+nt[nt.length-1]+C,Z=(e.bandwidth?tr:$n)(e.copy(),C),K=y.selection?y.selection():y,T=K.selectAll(".domain").data([null]),O=K.selectAll(".tick").data(z,e).order(),v=O.exit(),S=O.enter().append("g").attr("class","tick"),M=O.select("line"),_=O.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(S),M=M.merge(S.append("line").attr("stroke","currentColor").attr(w+"2",p*a)),_=_.merge(S.append("text").attr("fill","currentColor").attr(w,p*$).attr("dy",t===Zt?"0em":t===de?"0.71em":"0.32em")),y!==K&&(T=T.transition(y),O=O.transition(y),M=M.transition(y),_=_.transition(y),v=v.transition(y).attr("opacity",Ae).attr("transform",function(g){return isFinite(g=Z(g))?A(g+C):this.getAttribute("transform")}),S.attr("opacity",Ae).attr("transform",function(g){var W=this.parentNode.__axis;return A((W&&isFinite(W=W(g))?W:Z(g))+C)})),v.remove(),T.attr("d",t===qt||t===ne?o?"M"+p*o+","+tt+"H"+C+"V"+q+"H"+p*o:"M"+C+","+tt+"V"+q:o?"M"+tt+","+p*o+"V"+C+"H"+q+"V"+p*o:"M"+tt+","+C+"H"+q),O.attr("opacity",1).attr("transform",function(g){return A(Z(g)+C)}),M.attr(w+"2",p*a),_.attr(w,p*$).text(U),K.filter(er).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ne?"start":t===qt?"end":"middle"),K.each(function(){this.__axis=Z})}return x.scale=function(y){return arguments.length?(e=y,x):e},x.ticks=function(){return n=Array.from(arguments),x},x.tickArguments=function(y){return arguments.length?(n=y==null?[]:Array.from(y),x):n.slice()},x.tickValues=function(y){return arguments.length?(r=y==null?null:Array.from(y),x):r&&r.slice()},x.tickFormat=function(y){return arguments.length?(i=y,x):i},x.tickSize=function(y){return arguments.length?(a=o=+y,x):a},x.tickSizeInner=function(y){return arguments.length?(a=+y,x):a},x.tickSizeOuter=function(y){return arguments.length?(o=+y,x):o},x.tickPadding=function(y){return arguments.length?(b=+y,x):b},x.offset=function(y){return arguments.length?(C=+y,x):C},x}function nr(t){return Je(Zt,t)}function rr(t){return Je(de,t)}const ir=Math.PI/180,sr=180/Math.PI,Qt=18,Ge=.96422,Ke=1,$e=.82521,tn=4/29,Dt=6/29,en=3*Dt*Dt,ar=Dt*Dt*Dt;function nn(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof lt)return rn(t);t instanceof je||(t=Dn(t));var e=ae(t.r),n=ae(t.g),r=ae(t.b),i=re((.2225045*e+.7168786*n+.0606169*r)/Ke),a,o;return e===n&&n===r?a=o=i:(a=re((.4360747*e+.3850649*n+.1430804*r)/Ge),o=re((.0139322*e+.0971045*n+.7141733*r)/$e)),new st(116*i-16,500*(a-i),200*(i-o),t.opacity)}function or(t,e,n,r){return arguments.length===1?nn(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ze(st,or,Xe(Qe,{brighter(t){return new st(this.l+Qt*(t??1),this.a,this.b,this.opacity)},darker(t){return new st(this.l-Qt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Ge*ie(e),t=Ke*ie(t),n=$e*ie(n),new je(se(3.1338561*e-1.6168667*t-.4906146*n),se(-.9787684*e+1.9161415*t+.033454*n),se(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function re(t){return t>ar?Math.pow(t,1/3):t/en+tn}function ie(t){return t>Dt?t*t*t:en*(t-tn)}function se(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cr(t){if(t instanceof lt)return new lt(t.h,t.c,t.l,t.opacity);if(t instanceof st||(t=nn(t)),t.a===0&&t.b===0)return new lt(NaN,0(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const o=i(a),b=i.ceil(a);return a-o(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,b)=>{const C=[];if(a=i.ceil(a),b=b==null?1:Math.floor(b),!(a0))return C;let p;do C.push(p=new Date(+a)),e(a,b),t(a);while(pj(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,b)=>{if(o>=o)if(b<0)for(;++b<=0;)for(;e(o,-1),!a(o););else for(;--b>=0;)for(;e(o,1),!a(o););}),n&&(i.count=(a,o)=>(oe.setTime(+a),ce.setTime(+o),t(oe),t(ce),Math.floor(n(oe,ce))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Jt=j(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Jt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?j(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Jt);Jt.range;const ut=1e3,rt=ut*60,ft=rt*60,ht=ft*24,Te=ht*7,Ie=ht*30,le=ht*365,wt=j(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ut)},(t,e)=>(e-t)/ut,t=>t.getUTCSeconds());wt.range;const Yt=j(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ut)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());Yt.range;const hr=j(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());hr.range;const Lt=j(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ut-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getHours());Lt.range;const dr=j(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getUTCHours());dr.range;const mt=j(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/ht,t=>t.getDate()-1);mt.range;const ve=j(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ht,t=>t.getUTCDate()-1);ve.range;const mr=j(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ht,t=>Math.floor(t/ht));mr.range;function kt(t){return j(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*rt)/Te)}const Nt=kt(0),Wt=kt(1),sn=kt(2),an=kt(3),gt=kt(4),on=kt(5),cn=kt(6);Nt.range;Wt.range;sn.range;an.range;gt.range;on.range;cn.range;function pt(t){return j(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Te)}const ln=pt(0),Gt=pt(1),gr=pt(2),yr=pt(3),Mt=pt(4),kr=pt(5),pr=pt(6);ln.range;Gt.range;gr.range;yr.range;Mt.range;kr.range;pr.range;const Ot=j(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ot.range;const Tr=j(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Tr.range;const dt=j(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());dt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:j(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});dt.range;const yt=j(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());yt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:j(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});yt.range;function vr(t,e,n,r,i,a){const o=[[wt,1,ut],[wt,5,5*ut],[wt,15,15*ut],[wt,30,30*ut],[a,1,rt],[a,5,5*rt],[a,15,15*rt],[a,30,30*rt],[i,1,ft],[i,3,3*ft],[i,6,6*ft],[i,12,12*ft],[r,1,ht],[r,2,2*ht],[n,1,Te],[e,1,Ie],[e,3,3*Ie],[t,1,le]];function b(p,w,A){const x=w$).right(o,x);if(y===o.length)return t.every(Ee(p/le,w/le,A));if(y===0)return Jt.every(Math.max(Ee(p,w,A),1));const[z,U]=o[x/o[y-1][2]53)return null;"w"in u||(u.w=1),"Z"in u?(V=fe(Et(u.y,0,1)),H=V.getUTCDay(),V=H>4||H===0?Gt.ceil(V):Gt(V),V=ve.offset(V,(u.V-1)*7),u.y=V.getUTCFullYear(),u.m=V.getUTCMonth(),u.d=V.getUTCDate()+(u.w+6)%7):(V=ue(Et(u.y,0,1)),H=V.getDay(),V=H>4||H===0?Wt.ceil(V):Wt(V),V=mt.offset(V,(u.V-1)*7),u.y=V.getFullYear(),u.m=V.getMonth(),u.d=V.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),H="Z"in u?fe(Et(u.y,0,1)).getUTCDay():ue(Et(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(H+5)%7:u.w+u.U*7-(H+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,fe(u)):ue(u)}}function v(f,D,E,u){for(var G=0,V=D.length,H=E.length,R,B;G=H)return-1;if(R=D.charCodeAt(G++),R===37){if(R=D.charAt(G++),B=K[R in Ye?D.charAt(G++):R],!B||(u=B(f,E,u))<0)return-1}else if(R!=E.charCodeAt(u++))return-1}return u}function S(f,D,E){var u=p.exec(D.slice(E));return u?(f.p=w.get(u[0].toLowerCase()),E+u[0].length):-1}function M(f,D,E){var u=y.exec(D.slice(E));return u?(f.w=z.get(u[0].toLowerCase()),E+u[0].length):-1}function _(f,D,E){var u=A.exec(D.slice(E));return u?(f.w=x.get(u[0].toLowerCase()),E+u[0].length):-1}function g(f,D,E){var u=nt.exec(D.slice(E));return u?(f.m=tt.get(u[0].toLowerCase()),E+u[0].length):-1}function W(f,D,E){var u=U.exec(D.slice(E));return u?(f.m=$.get(u[0].toLowerCase()),E+u[0].length):-1}function Y(f,D,E){return v(f,e,D,E)}function I(f,D,E){return v(f,n,D,E)}function h(f,D,E){return v(f,r,D,E)}function d(f){return o[f.getDay()]}function k(f){return a[f.getDay()]}function m(f){return C[f.getMonth()]}function l(f){return b[f.getMonth()]}function s(f){return i[+(f.getHours()>=12)]}function N(f){return 1+~~(f.getMonth()/3)}function c(f){return o[f.getUTCDay()]}function F(f){return a[f.getUTCDay()]}function Q(f){return C[f.getUTCMonth()]}function P(f){return b[f.getUTCMonth()]}function Tt(f){return i[+(f.getUTCHours()>=12)]}function Ft(f){return 1+~~(f.getUTCMonth()/3)}return{format:function(f){var D=T(f+="",q);return D.toString=function(){return f},D},parse:function(f){var D=O(f+="",!1);return D.toString=function(){return f},D},utcFormat:function(f){var D=T(f+="",Z);return D.toString=function(){return f},D},utcParse:function(f){var D=O(f+="",!0);return D.toString=function(){return f},D}}}var Ye={"-":"",_:" ",0:"0"},J=/^\s*\d+/,Cr=/^%/,Dr=/[\\^$*+?|[\]().{}]/g;function L(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function Mr(t,e,n){var r=J.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Sr(t,e,n){var r=J.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Le(t,e,n){var r=J.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function We(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ar(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ir(t,e,n){var r=J.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Yr(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Oe(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=J.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ne(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=J.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=J.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=J.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Hr(t,e,n){var r=Cr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function zr(t,e,n){var r=J.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=J.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ve(t,e){return L(t.getDate(),e,2)}function Rr(t,e){return L(t.getHours(),e,2)}function Br(t,e){return L(t.getHours()%12||12,e,2)}function qr(t,e){return L(1+mt.count(dt(t),t),e,3)}function un(t,e){return L(t.getMilliseconds(),e,3)}function Zr(t,e){return un(t,e)+"000"}function Xr(t,e){return L(t.getMonth()+1,e,2)}function jr(t,e){return L(t.getMinutes(),e,2)}function Qr(t,e){return L(t.getSeconds(),e,2)}function Jr(t){var e=t.getDay();return e===0?7:e}function Gr(t,e){return L(Nt.count(dt(t)-1,t),e,2)}function fn(t){var e=t.getDay();return e>=4||e===0?gt(t):gt.ceil(t)}function Kr(t,e){return t=fn(t),L(gt.count(dt(t),t)+(dt(t).getDay()===4),e,2)}function $r(t){return t.getDay()}function ti(t,e){return L(Wt.count(dt(t)-1,t),e,2)}function ei(t,e){return L(t.getFullYear()%100,e,2)}function ni(t,e){return t=fn(t),L(t.getFullYear()%100,e,2)}function ri(t,e){return L(t.getFullYear()%1e4,e,4)}function ii(t,e){var n=t.getDay();return t=n>=4||n===0?gt(t):gt.ceil(t),L(t.getFullYear()%1e4,e,4)}function si(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+L(e/60|0,"0",2)+L(e%60,"0",2)}function He(t,e){return L(t.getUTCDate(),e,2)}function ai(t,e){return L(t.getUTCHours(),e,2)}function oi(t,e){return L(t.getUTCHours()%12||12,e,2)}function ci(t,e){return L(1+ve.count(yt(t),t),e,3)}function hn(t,e){return L(t.getUTCMilliseconds(),e,3)}function li(t,e){return hn(t,e)+"000"}function ui(t,e){return L(t.getUTCMonth()+1,e,2)}function fi(t,e){return L(t.getUTCMinutes(),e,2)}function hi(t,e){return L(t.getUTCSeconds(),e,2)}function di(t){var e=t.getUTCDay();return e===0?7:e}function mi(t,e){return L(ln.count(yt(t)-1,t),e,2)}function dn(t){var e=t.getUTCDay();return e>=4||e===0?Mt(t):Mt.ceil(t)}function gi(t,e){return t=dn(t),L(Mt.count(yt(t),t)+(yt(t).getUTCDay()===4),e,2)}function yi(t){return t.getUTCDay()}function ki(t,e){return L(Gt.count(yt(t)-1,t),e,2)}function pi(t,e){return L(t.getUTCFullYear()%100,e,2)}function Ti(t,e){return t=dn(t),L(t.getUTCFullYear()%100,e,2)}function vi(t,e){return L(t.getUTCFullYear()%1e4,e,4)}function bi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Mt(t):Mt.ceil(t),L(t.getUTCFullYear()%1e4,e,4)}function xi(){return"+0000"}function ze(){return"%"}function Pe(t){return+t}function Re(t){return Math.floor(+t/1e3)}var xt,Kt;wi({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"]});function wi(t){return xt=wr(t),Kt=xt.format,xt.parse,xt.utcFormat,xt.utcParse,xt}function Ci(t){return new Date(t)}function Di(t){return t instanceof Date?+t:+new Date(+t)}function mn(t,e,n,r,i,a,o,b,C,p){var w=Bn(),A=w.invert,x=w.domain,y=p(".%L"),z=p(":%S"),U=p("%I:%M"),$=p("%I %p"),nt=p("%a %d"),tt=p("%b %d"),q=p("%B"),Z=p("%Y");function K(T){return(C(T)4&&(y+=7),x.add(y,n));return z.diff(U,"week")+1},b.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var C=b.startOf;b.startOf=function(p,w){var A=this.$utils(),x=!!A.u(w)||w;return A.p(p)==="isoweek"?x?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):C.bind(this)(p,w)}}})})(gn);var Mi=gn.exports;const Si=Hn(Mi);var ge=function(){var t=function(I,h,d,k){for(d=d||{},k=I.length;k--;d[I[k]]=h);return d},e=[1,3],n=[1,5],r=[7,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,33,34,36,43,48],i=[1,32],a=[1,33],o=[1,34],b=[1,35],C=[1,36],p=[1,37],w=[1,38],A=[1,15],x=[1,16],y=[1,17],z=[1,18],U=[1,19],$=[1,20],nt=[1,21],tt=[1,22],q=[1,24],Z=[1,25],K=[1,26],T=[1,27],O=[1,28],v=[1,30],S=[1,39],M=[1,42],_=[5,7,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,33,34,36,43,48],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,weekday: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:34,clickStatement:35,taskTxt:36,taskData:37,openDirective:38,typeDirective:39,closeDirective:40,":":41,argDirective:42,click:43,callbackname:44,callbackargs:45,href:46,clickStatementDebug:47,open_directive:48,type_directive:49,arg_directive:50,close_directive:51,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",13:"weekday_monday",14:"weekday_tuesday",15:"weekday_wednesday",16:"weekday_thursday",17:"weekday_friday",18:"weekday_saturday",19:"weekday_sunday",20:"dateFormat",21:"inclusiveEndDates",22:"topAxis",23:"axisFormat",24:"tickInterval",25:"excludes",26:"includes",27:"todayMarker",28:"title",29:"acc_title",30:"acc_title_value",31:"acc_descr",32:"acc_descr_value",33:"acc_descr_multiline_value",34:"section",36:"taskTxt",37:"taskData",41:":",43:"click",44:"callbackname",45:"callbackargs",46:"href",48:"open_directive",49:"type_directive",50:"arg_directive",51:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[12,1],[12,1],[12,1],[12,1],[12,1],[12,1],[12,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[35,2],[35,3],[35,3],[35,4],[35,3],[35,4],[35,2],[47,2],[47,3],[47,3],[47,4],[47,3],[47,4],[47,2],[38,1],[39,1],[42,1],[40,1]],performAction:function(h,d,k,m,l,s,N){var c=s.length-1;switch(l){case 2:return s[c-1];case 3:this.$=[];break;case 4:s[c-1].push(s[c]),this.$=s[c-1];break;case 5:case 6:this.$=s[c];break;case 7:case 8:this.$=[];break;case 9:m.setWeekday("monday");break;case 10:m.setWeekday("tuesday");break;case 11:m.setWeekday("wednesday");break;case 12:m.setWeekday("thursday");break;case 13:m.setWeekday("friday");break;case 14:m.setWeekday("saturday");break;case 15:m.setWeekday("sunday");break;case 16:m.setDateFormat(s[c].substr(11)),this.$=s[c].substr(11);break;case 17:m.enableInclusiveEndDates(),this.$=s[c].substr(18);break;case 18:m.TopAxis(),this.$=s[c].substr(8);break;case 19:m.setAxisFormat(s[c].substr(11)),this.$=s[c].substr(11);break;case 20:m.setTickInterval(s[c].substr(13)),this.$=s[c].substr(13);break;case 21:m.setExcludes(s[c].substr(9)),this.$=s[c].substr(9);break;case 22:m.setIncludes(s[c].substr(9)),this.$=s[c].substr(9);break;case 23:m.setTodayMarker(s[c].substr(12)),this.$=s[c].substr(12);break;case 25:m.setDiagramTitle(s[c].substr(6)),this.$=s[c].substr(6);break;case 26:this.$=s[c].trim(),m.setAccTitle(this.$);break;case 27:case 28:this.$=s[c].trim(),m.setAccDescription(this.$);break;case 29:m.addSection(s[c].substr(8)),this.$=s[c].substr(8);break;case 31:m.addTask(s[c-1],s[c]),this.$="task";break;case 35:this.$=s[c-1],m.setClickEvent(s[c-1],s[c],null);break;case 36:this.$=s[c-2],m.setClickEvent(s[c-2],s[c-1],s[c]);break;case 37:this.$=s[c-2],m.setClickEvent(s[c-2],s[c-1],null),m.setLink(s[c-2],s[c]);break;case 38:this.$=s[c-3],m.setClickEvent(s[c-3],s[c-2],s[c-1]),m.setLink(s[c-3],s[c]);break;case 39:this.$=s[c-2],m.setClickEvent(s[c-2],s[c],null),m.setLink(s[c-2],s[c-1]);break;case 40:this.$=s[c-3],m.setClickEvent(s[c-3],s[c-1],s[c]),m.setLink(s[c-3],s[c-2]);break;case 41:this.$=s[c-1],m.setLink(s[c-1],s[c]);break;case 42:case 48:this.$=s[c-1]+" "+s[c];break;case 43:case 44:case 46:this.$=s[c-2]+" "+s[c-1]+" "+s[c];break;case 45:case 47:this.$=s[c-3]+" "+s[c-2]+" "+s[c-1]+" "+s[c];break;case 49:m.parseDirective("%%{","open_directive");break;case 50:m.parseDirective(s[c],"type_directive");break;case 51:s[c]=s[c].trim().replace(/'/g,'"'),m.parseDirective(s[c],"arg_directive");break;case 52:m.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,38:4,48:n},{1:[3]},{3:6,4:2,5:e,38:4,48:n},t(r,[2,3],{6:7}),{39:8,49:[1,9]},{49:[2,49]},{1:[2,1]},{4:31,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:23,13:i,14:a,15:o,16:b,17:C,18:p,19:w,20:A,21:x,22:y,23:z,24:U,25:$,26:nt,27:tt,28:q,29:Z,31:K,33:T,34:O,35:29,36:v,38:4,43:S,48:n},{40:40,41:[1,41],51:M},t([41,51],[2,50]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:31,10:43,12:23,13:i,14:a,15:o,16:b,17:C,18:p,19:w,20:A,21:x,22:y,23:z,24:U,25:$,26:nt,27:tt,28:q,29:Z,31:K,33:T,34:O,35:29,36:v,38:4,43:S,48:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),{30:[1,44]},{32:[1,45]},t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),{37:[1,46]},t(r,[2,32]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),{44:[1,47],46:[1,48]},{11:[1,49]},{42:50,50:[1,51]},{11:[2,52]},t(r,[2,5]),t(r,[2,26]),t(r,[2,27]),t(r,[2,31]),t(r,[2,35],{45:[1,52],46:[1,53]}),t(r,[2,41],{44:[1,54]}),t(_,[2,33]),{40:55,51:M},{51:[2,51]},t(r,[2,36],{46:[1,56]}),t(r,[2,37]),t(r,[2,39],{45:[1,57]}),{11:[1,58]},t(r,[2,38]),t(r,[2,40]),t(_,[2,34])],defaultActions:{5:[2,49],6:[2,1],42:[2,52],51:[2,51]},parseError:function(h,d){if(d.recoverable)this.trace(h);else{var k=new Error(h);throw k.hash=d,k}},parse:function(h){var d=this,k=[0],m=[],l=[null],s=[],N=this.table,c="",F=0,Q=0,P=2,Tt=1,Ft=s.slice.call(arguments,1),f=Object.create(this.lexer),D={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(D.yy[E]=this.yy[E]);f.setInput(h,D.yy),D.yy.lexer=f,D.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var u=f.yylloc;s.push(u);var G=f.options&&f.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(){var ot;return ot=m.pop()||f.lex()||Tt,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=d.symbols_[ot]||ot),ot}for(var H,R,B,vt,bt={},Pt,at,Fe,Rt;;){if(R=k[k.length-1],this.defaultActions[R]?B=this.defaultActions[R]:((H===null||typeof H>"u")&&(H=V()),B=N[R]&&N[R][H]),typeof B>"u"||!B.length||!B[0]){var te="";Rt=[];for(Pt in N[R])this.terminals_[Pt]&&Pt>P&&Rt.push("'"+this.terminals_[Pt]+"'");f.showPosition?te="Parse error on line "+(F+1)+`: +import{R as Ze,T as Xe,U as je,V as Qe,W as Dn,X as ee,Y as _n,j as Ct,s as Mn,g as Sn,I as Un,J as Fn,i as En,h as An,m as In,K as Yn,u as Ln,p as he,o as Bt,q as Wn,r as On,G as Nn}from"./TextOutput-39ff842e.js";import{aP as Vn,b3 as Hn,aS as et,b4 as zn,b5 as Pn}from"./index-ef7aa48c.js";import{b as Rn,t as Ee,c as Bn,a as qn,l as Zn}from"./linear-7918616e.js";import{i as Xn}from"./init-77b53fdd.js";import"./_plugin-vue_export-helper-c27b6911.js";function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function Qn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Gn(t){return t}var Zt=1,ne=2,de=3,qt=4,Ae=1e-6;function Jn(t){return"translate("+t+",0)"}function Kn(t){return"translate(0,"+t+")"}function $n(t){return e=>+t(e)}function tr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function er(){return!this.__axis}function Ge(t,e){var n=[],r=null,i=null,a=6,o=6,b=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=t===Zt||t===qt?-1:1,w=t===qt||t===ne?"x":"y",A=t===Zt||t===de?Jn:Kn;function x(y){var z=r??(e.ticks?e.ticks.apply(e,n):e.domain()),U=i??(e.tickFormat?e.tickFormat.apply(e,n):Gn),$=Math.max(a,0)+b,nt=e.range(),tt=+nt[0]+C,q=+nt[nt.length-1]+C,Z=(e.bandwidth?tr:$n)(e.copy(),C),K=y.selection?y.selection():y,T=K.selectAll(".domain").data([null]),O=K.selectAll(".tick").data(z,e).order(),v=O.exit(),S=O.enter().append("g").attr("class","tick"),M=O.select("line"),_=O.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(S),M=M.merge(S.append("line").attr("stroke","currentColor").attr(w+"2",p*a)),_=_.merge(S.append("text").attr("fill","currentColor").attr(w,p*$).attr("dy",t===Zt?"0em":t===de?"0.71em":"0.32em")),y!==K&&(T=T.transition(y),O=O.transition(y),M=M.transition(y),_=_.transition(y),v=v.transition(y).attr("opacity",Ae).attr("transform",function(g){return isFinite(g=Z(g))?A(g+C):this.getAttribute("transform")}),S.attr("opacity",Ae).attr("transform",function(g){var W=this.parentNode.__axis;return A((W&&isFinite(W=W(g))?W:Z(g))+C)})),v.remove(),T.attr("d",t===qt||t===ne?o?"M"+p*o+","+tt+"H"+C+"V"+q+"H"+p*o:"M"+C+","+tt+"V"+q:o?"M"+tt+","+p*o+"V"+C+"H"+q+"V"+p*o:"M"+tt+","+C+"H"+q),O.attr("opacity",1).attr("transform",function(g){return A(Z(g)+C)}),M.attr(w+"2",p*a),_.attr(w,p*$).text(U),K.filter(er).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ne?"start":t===qt?"end":"middle"),K.each(function(){this.__axis=Z})}return x.scale=function(y){return arguments.length?(e=y,x):e},x.ticks=function(){return n=Array.from(arguments),x},x.tickArguments=function(y){return arguments.length?(n=y==null?[]:Array.from(y),x):n.slice()},x.tickValues=function(y){return arguments.length?(r=y==null?null:Array.from(y),x):r&&r.slice()},x.tickFormat=function(y){return arguments.length?(i=y,x):i},x.tickSize=function(y){return arguments.length?(a=o=+y,x):a},x.tickSizeInner=function(y){return arguments.length?(a=+y,x):a},x.tickSizeOuter=function(y){return arguments.length?(o=+y,x):o},x.tickPadding=function(y){return arguments.length?(b=+y,x):b},x.offset=function(y){return arguments.length?(C=+y,x):C},x}function nr(t){return Ge(Zt,t)}function rr(t){return Ge(de,t)}const ir=Math.PI/180,sr=180/Math.PI,Qt=18,Je=.96422,Ke=1,$e=.82521,tn=4/29,Dt=6/29,en=3*Dt*Dt,ar=Dt*Dt*Dt;function nn(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof lt)return rn(t);t instanceof je||(t=Dn(t));var e=ae(t.r),n=ae(t.g),r=ae(t.b),i=re((.2225045*e+.7168786*n+.0606169*r)/Ke),a,o;return e===n&&n===r?a=o=i:(a=re((.4360747*e+.3850649*n+.1430804*r)/Je),o=re((.0139322*e+.0971045*n+.7141733*r)/$e)),new st(116*i-16,500*(a-i),200*(i-o),t.opacity)}function or(t,e,n,r){return arguments.length===1?nn(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ze(st,or,Xe(Qe,{brighter(t){return new st(this.l+Qt*(t??1),this.a,this.b,this.opacity)},darker(t){return new st(this.l-Qt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Je*ie(e),t=Ke*ie(t),n=$e*ie(n),new je(se(3.1338561*e-1.6168667*t-.4906146*n),se(-.9787684*e+1.9161415*t+.033454*n),se(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function re(t){return t>ar?Math.pow(t,1/3):t/en+tn}function ie(t){return t>Dt?t*t*t:en*(t-tn)}function se(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cr(t){if(t instanceof lt)return new lt(t.h,t.c,t.l,t.opacity);if(t instanceof st||(t=nn(t)),t.a===0&&t.b===0)return new lt(NaN,0(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const o=i(a),b=i.ceil(a);return a-o(e(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,b)=>{const C=[];if(a=i.ceil(a),b=b==null?1:Math.floor(b),!(a0))return C;let p;do C.push(p=new Date(+a)),e(a,b),t(a);while(pj(o=>{if(o>=o)for(;t(o),!a(o);)o.setTime(o-1)},(o,b)=>{if(o>=o)if(b<0)for(;++b<=0;)for(;e(o,-1),!a(o););else for(;--b>=0;)for(;e(o,1),!a(o););}),n&&(i.count=(a,o)=>(oe.setTime(+a),ce.setTime(+o),t(oe),t(ce),Math.floor(n(oe,ce))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Gt=j(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Gt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?j(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Gt);Gt.range;const ut=1e3,rt=ut*60,ft=rt*60,ht=ft*24,Te=ht*7,Ie=ht*30,le=ht*365,wt=j(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ut)},(t,e)=>(e-t)/ut,t=>t.getUTCSeconds());wt.range;const Yt=j(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ut)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());Yt.range;const hr=j(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());hr.range;const Lt=j(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ut-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getHours());Lt.range;const dr=j(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getUTCHours());dr.range;const mt=j(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/ht,t=>t.getDate()-1);mt.range;const ve=j(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ht,t=>t.getUTCDate()-1);ve.range;const mr=j(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ht,t=>Math.floor(t/ht));mr.range;function kt(t){return j(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*rt)/Te)}const Nt=kt(0),Wt=kt(1),sn=kt(2),an=kt(3),gt=kt(4),on=kt(5),cn=kt(6);Nt.range;Wt.range;sn.range;an.range;gt.range;on.range;cn.range;function pt(t){return j(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Te)}const ln=pt(0),Jt=pt(1),gr=pt(2),yr=pt(3),Mt=pt(4),kr=pt(5),pr=pt(6);ln.range;Jt.range;gr.range;yr.range;Mt.range;kr.range;pr.range;const Ot=j(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ot.range;const Tr=j(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Tr.range;const dt=j(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());dt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:j(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});dt.range;const yt=j(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());yt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:j(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});yt.range;function vr(t,e,n,r,i,a){const o=[[wt,1,ut],[wt,5,5*ut],[wt,15,15*ut],[wt,30,30*ut],[a,1,rt],[a,5,5*rt],[a,15,15*rt],[a,30,30*rt],[i,1,ft],[i,3,3*ft],[i,6,6*ft],[i,12,12*ft],[r,1,ht],[r,2,2*ht],[n,1,Te],[e,1,Ie],[e,3,3*Ie],[t,1,le]];function b(p,w,A){const x=w$).right(o,x);if(y===o.length)return t.every(Ee(p/le,w/le,A));if(y===0)return Gt.every(Math.max(Ee(p,w,A),1));const[z,U]=o[x/o[y-1][2]53)return null;"w"in u||(u.w=1),"Z"in u?(V=fe(Et(u.y,0,1)),H=V.getUTCDay(),V=H>4||H===0?Jt.ceil(V):Jt(V),V=ve.offset(V,(u.V-1)*7),u.y=V.getUTCFullYear(),u.m=V.getUTCMonth(),u.d=V.getUTCDate()+(u.w+6)%7):(V=ue(Et(u.y,0,1)),H=V.getDay(),V=H>4||H===0?Wt.ceil(V):Wt(V),V=mt.offset(V,(u.V-1)*7),u.y=V.getFullYear(),u.m=V.getMonth(),u.d=V.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),H="Z"in u?fe(Et(u.y,0,1)).getUTCDay():ue(Et(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(H+5)%7:u.w+u.U*7-(H+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,fe(u)):ue(u)}}function v(f,D,E,u){for(var J=0,V=D.length,H=E.length,R,B;J=H)return-1;if(R=D.charCodeAt(J++),R===37){if(R=D.charAt(J++),B=K[R in Ye?D.charAt(J++):R],!B||(u=B(f,E,u))<0)return-1}else if(R!=E.charCodeAt(u++))return-1}return u}function S(f,D,E){var u=p.exec(D.slice(E));return u?(f.p=w.get(u[0].toLowerCase()),E+u[0].length):-1}function M(f,D,E){var u=y.exec(D.slice(E));return u?(f.w=z.get(u[0].toLowerCase()),E+u[0].length):-1}function _(f,D,E){var u=A.exec(D.slice(E));return u?(f.w=x.get(u[0].toLowerCase()),E+u[0].length):-1}function g(f,D,E){var u=nt.exec(D.slice(E));return u?(f.m=tt.get(u[0].toLowerCase()),E+u[0].length):-1}function W(f,D,E){var u=U.exec(D.slice(E));return u?(f.m=$.get(u[0].toLowerCase()),E+u[0].length):-1}function Y(f,D,E){return v(f,e,D,E)}function I(f,D,E){return v(f,n,D,E)}function h(f,D,E){return v(f,r,D,E)}function d(f){return o[f.getDay()]}function k(f){return a[f.getDay()]}function m(f){return C[f.getMonth()]}function l(f){return b[f.getMonth()]}function s(f){return i[+(f.getHours()>=12)]}function N(f){return 1+~~(f.getMonth()/3)}function c(f){return o[f.getUTCDay()]}function F(f){return a[f.getUTCDay()]}function Q(f){return C[f.getUTCMonth()]}function P(f){return b[f.getUTCMonth()]}function Tt(f){return i[+(f.getUTCHours()>=12)]}function Ft(f){return 1+~~(f.getUTCMonth()/3)}return{format:function(f){var D=T(f+="",q);return D.toString=function(){return f},D},parse:function(f){var D=O(f+="",!1);return D.toString=function(){return f},D},utcFormat:function(f){var D=T(f+="",Z);return D.toString=function(){return f},D},utcParse:function(f){var D=O(f+="",!0);return D.toString=function(){return f},D}}}var Ye={"-":"",_:" ",0:"0"},G=/^\s*\d+/,Cr=/^%/,Dr=/[\\^$*+?|[\]().{}]/g;function L(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function Mr(t,e,n){var r=G.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Sr(t,e,n){var r=G.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Le(t,e,n){var r=G.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function We(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ar(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ir(t,e,n){var r=G.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Yr(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Oe(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=G.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ne(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=G.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=G.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Hr(t,e,n){var r=Cr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function zr(t,e,n){var r=G.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=G.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ve(t,e){return L(t.getDate(),e,2)}function Rr(t,e){return L(t.getHours(),e,2)}function Br(t,e){return L(t.getHours()%12||12,e,2)}function qr(t,e){return L(1+mt.count(dt(t),t),e,3)}function un(t,e){return L(t.getMilliseconds(),e,3)}function Zr(t,e){return un(t,e)+"000"}function Xr(t,e){return L(t.getMonth()+1,e,2)}function jr(t,e){return L(t.getMinutes(),e,2)}function Qr(t,e){return L(t.getSeconds(),e,2)}function Gr(t){var e=t.getDay();return e===0?7:e}function Jr(t,e){return L(Nt.count(dt(t)-1,t),e,2)}function fn(t){var e=t.getDay();return e>=4||e===0?gt(t):gt.ceil(t)}function Kr(t,e){return t=fn(t),L(gt.count(dt(t),t)+(dt(t).getDay()===4),e,2)}function $r(t){return t.getDay()}function ti(t,e){return L(Wt.count(dt(t)-1,t),e,2)}function ei(t,e){return L(t.getFullYear()%100,e,2)}function ni(t,e){return t=fn(t),L(t.getFullYear()%100,e,2)}function ri(t,e){return L(t.getFullYear()%1e4,e,4)}function ii(t,e){var n=t.getDay();return t=n>=4||n===0?gt(t):gt.ceil(t),L(t.getFullYear()%1e4,e,4)}function si(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+L(e/60|0,"0",2)+L(e%60,"0",2)}function He(t,e){return L(t.getUTCDate(),e,2)}function ai(t,e){return L(t.getUTCHours(),e,2)}function oi(t,e){return L(t.getUTCHours()%12||12,e,2)}function ci(t,e){return L(1+ve.count(yt(t),t),e,3)}function hn(t,e){return L(t.getUTCMilliseconds(),e,3)}function li(t,e){return hn(t,e)+"000"}function ui(t,e){return L(t.getUTCMonth()+1,e,2)}function fi(t,e){return L(t.getUTCMinutes(),e,2)}function hi(t,e){return L(t.getUTCSeconds(),e,2)}function di(t){var e=t.getUTCDay();return e===0?7:e}function mi(t,e){return L(ln.count(yt(t)-1,t),e,2)}function dn(t){var e=t.getUTCDay();return e>=4||e===0?Mt(t):Mt.ceil(t)}function gi(t,e){return t=dn(t),L(Mt.count(yt(t),t)+(yt(t).getUTCDay()===4),e,2)}function yi(t){return t.getUTCDay()}function ki(t,e){return L(Jt.count(yt(t)-1,t),e,2)}function pi(t,e){return L(t.getUTCFullYear()%100,e,2)}function Ti(t,e){return t=dn(t),L(t.getUTCFullYear()%100,e,2)}function vi(t,e){return L(t.getUTCFullYear()%1e4,e,4)}function bi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Mt(t):Mt.ceil(t),L(t.getUTCFullYear()%1e4,e,4)}function xi(){return"+0000"}function ze(){return"%"}function Pe(t){return+t}function Re(t){return Math.floor(+t/1e3)}var xt,Kt;wi({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"]});function wi(t){return xt=wr(t),Kt=xt.format,xt.parse,xt.utcFormat,xt.utcParse,xt}function Ci(t){return new Date(t)}function Di(t){return t instanceof Date?+t:+new Date(+t)}function mn(t,e,n,r,i,a,o,b,C,p){var w=Bn(),A=w.invert,x=w.domain,y=p(".%L"),z=p(":%S"),U=p("%I:%M"),$=p("%I %p"),nt=p("%a %d"),tt=p("%b %d"),q=p("%B"),Z=p("%Y");function K(T){return(C(T)4&&(y+=7),x.add(y,n));return z.diff(U,"week")+1},b.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var C=b.startOf;b.startOf=function(p,w){var A=this.$utils(),x=!!A.u(w)||w;return A.p(p)==="isoweek"?x?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):C.bind(this)(p,w)}}})})(gn);var Mi=gn.exports;const Si=Hn(Mi);var ge=function(){var t=function(I,h,d,k){for(d=d||{},k=I.length;k--;d[I[k]]=h);return d},e=[1,3],n=[1,5],r=[7,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,33,34,36,43,48],i=[1,32],a=[1,33],o=[1,34],b=[1,35],C=[1,36],p=[1,37],w=[1,38],A=[1,15],x=[1,16],y=[1,17],z=[1,18],U=[1,19],$=[1,20],nt=[1,21],tt=[1,22],q=[1,24],Z=[1,25],K=[1,26],T=[1,27],O=[1,28],v=[1,30],S=[1,39],M=[1,42],_=[5,7,9,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,33,34,36,43,48],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,weekday: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:34,clickStatement:35,taskTxt:36,taskData:37,openDirective:38,typeDirective:39,closeDirective:40,":":41,argDirective:42,click:43,callbackname:44,callbackargs:45,href:46,clickStatementDebug:47,open_directive:48,type_directive:49,arg_directive:50,close_directive:51,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",13:"weekday_monday",14:"weekday_tuesday",15:"weekday_wednesday",16:"weekday_thursday",17:"weekday_friday",18:"weekday_saturday",19:"weekday_sunday",20:"dateFormat",21:"inclusiveEndDates",22:"topAxis",23:"axisFormat",24:"tickInterval",25:"excludes",26:"includes",27:"todayMarker",28:"title",29:"acc_title",30:"acc_title_value",31:"acc_descr",32:"acc_descr_value",33:"acc_descr_multiline_value",34:"section",36:"taskTxt",37:"taskData",41:":",43:"click",44:"callbackname",45:"callbackargs",46:"href",48:"open_directive",49:"type_directive",50:"arg_directive",51:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[12,1],[12,1],[12,1],[12,1],[12,1],[12,1],[12,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[35,2],[35,3],[35,3],[35,4],[35,3],[35,4],[35,2],[47,2],[47,3],[47,3],[47,4],[47,3],[47,4],[47,2],[38,1],[39,1],[42,1],[40,1]],performAction:function(h,d,k,m,l,s,N){var c=s.length-1;switch(l){case 2:return s[c-1];case 3:this.$=[];break;case 4:s[c-1].push(s[c]),this.$=s[c-1];break;case 5:case 6:this.$=s[c];break;case 7:case 8:this.$=[];break;case 9:m.setWeekday("monday");break;case 10:m.setWeekday("tuesday");break;case 11:m.setWeekday("wednesday");break;case 12:m.setWeekday("thursday");break;case 13:m.setWeekday("friday");break;case 14:m.setWeekday("saturday");break;case 15:m.setWeekday("sunday");break;case 16:m.setDateFormat(s[c].substr(11)),this.$=s[c].substr(11);break;case 17:m.enableInclusiveEndDates(),this.$=s[c].substr(18);break;case 18:m.TopAxis(),this.$=s[c].substr(8);break;case 19:m.setAxisFormat(s[c].substr(11)),this.$=s[c].substr(11);break;case 20:m.setTickInterval(s[c].substr(13)),this.$=s[c].substr(13);break;case 21:m.setExcludes(s[c].substr(9)),this.$=s[c].substr(9);break;case 22:m.setIncludes(s[c].substr(9)),this.$=s[c].substr(9);break;case 23:m.setTodayMarker(s[c].substr(12)),this.$=s[c].substr(12);break;case 25:m.setDiagramTitle(s[c].substr(6)),this.$=s[c].substr(6);break;case 26:this.$=s[c].trim(),m.setAccTitle(this.$);break;case 27:case 28:this.$=s[c].trim(),m.setAccDescription(this.$);break;case 29:m.addSection(s[c].substr(8)),this.$=s[c].substr(8);break;case 31:m.addTask(s[c-1],s[c]),this.$="task";break;case 35:this.$=s[c-1],m.setClickEvent(s[c-1],s[c],null);break;case 36:this.$=s[c-2],m.setClickEvent(s[c-2],s[c-1],s[c]);break;case 37:this.$=s[c-2],m.setClickEvent(s[c-2],s[c-1],null),m.setLink(s[c-2],s[c]);break;case 38:this.$=s[c-3],m.setClickEvent(s[c-3],s[c-2],s[c-1]),m.setLink(s[c-3],s[c]);break;case 39:this.$=s[c-2],m.setClickEvent(s[c-2],s[c],null),m.setLink(s[c-2],s[c-1]);break;case 40:this.$=s[c-3],m.setClickEvent(s[c-3],s[c-1],s[c]),m.setLink(s[c-3],s[c-2]);break;case 41:this.$=s[c-1],m.setLink(s[c-1],s[c]);break;case 42:case 48:this.$=s[c-1]+" "+s[c];break;case 43:case 44:case 46:this.$=s[c-2]+" "+s[c-1]+" "+s[c];break;case 45:case 47:this.$=s[c-3]+" "+s[c-2]+" "+s[c-1]+" "+s[c];break;case 49:m.parseDirective("%%{","open_directive");break;case 50:m.parseDirective(s[c],"type_directive");break;case 51:s[c]=s[c].trim().replace(/'/g,'"'),m.parseDirective(s[c],"arg_directive");break;case 52:m.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,38:4,48:n},{1:[3]},{3:6,4:2,5:e,38:4,48:n},t(r,[2,3],{6:7}),{39:8,49:[1,9]},{49:[2,49]},{1:[2,1]},{4:31,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:23,13:i,14:a,15:o,16:b,17:C,18:p,19:w,20:A,21:x,22:y,23:z,24:U,25:$,26:nt,27:tt,28:q,29:Z,31:K,33:T,34:O,35:29,36:v,38:4,43:S,48:n},{40:40,41:[1,41],51:M},t([41,51],[2,50]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:31,10:43,12:23,13:i,14:a,15:o,16:b,17:C,18:p,19:w,20:A,21:x,22:y,23:z,24:U,25:$,26:nt,27:tt,28:q,29:Z,31:K,33:T,34:O,35:29,36:v,38:4,43:S,48:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),{30:[1,44]},{32:[1,45]},t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),{37:[1,46]},t(r,[2,32]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),{44:[1,47],46:[1,48]},{11:[1,49]},{42:50,50:[1,51]},{11:[2,52]},t(r,[2,5]),t(r,[2,26]),t(r,[2,27]),t(r,[2,31]),t(r,[2,35],{45:[1,52],46:[1,53]}),t(r,[2,41],{44:[1,54]}),t(_,[2,33]),{40:55,51:M},{51:[2,51]},t(r,[2,36],{46:[1,56]}),t(r,[2,37]),t(r,[2,39],{45:[1,57]}),{11:[1,58]},t(r,[2,38]),t(r,[2,40]),t(_,[2,34])],defaultActions:{5:[2,49],6:[2,1],42:[2,52],51:[2,51]},parseError:function(h,d){if(d.recoverable)this.trace(h);else{var k=new Error(h);throw k.hash=d,k}},parse:function(h){var d=this,k=[0],m=[],l=[null],s=[],N=this.table,c="",F=0,Q=0,P=2,Tt=1,Ft=s.slice.call(arguments,1),f=Object.create(this.lexer),D={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(D.yy[E]=this.yy[E]);f.setInput(h,D.yy),D.yy.lexer=f,D.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var u=f.yylloc;s.push(u);var J=f.options&&f.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(){var ot;return ot=m.pop()||f.lex()||Tt,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=d.symbols_[ot]||ot),ot}for(var H,R,B,vt,bt={},Pt,at,Fe,Rt;;){if(R=k[k.length-1],this.defaultActions[R]?B=this.defaultActions[R]:((H===null||typeof H>"u")&&(H=V()),B=N[R]&&N[R][H]),typeof B>"u"||!B.length||!B[0]){var te="";Rt=[];for(Pt in N[R])this.terminals_[Pt]&&Pt>P&&Rt.push("'"+this.terminals_[Pt]+"'");f.showPosition?te="Parse error on line "+(F+1)+`: `+f.showPosition()+` -Expecting `+Rt.join(", ")+", got '"+(this.terminals_[H]||H)+"'":te="Parse error on line "+(F+1)+": Unexpected "+(H==Tt?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(te,{text:f.match,token:this.terminals_[H]||H,line:f.yylineno,loc:u,expected:Rt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+H);switch(B[0]){case 1:k.push(H),l.push(f.yytext),s.push(f.yylloc),k.push(B[1]),H=null,Q=f.yyleng,c=f.yytext,F=f.yylineno,u=f.yylloc;break;case 2:if(at=this.productions_[B[1]][1],bt.$=l[l.length-at],bt._$={first_line:s[s.length-(at||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(at||1)].first_column,last_column:s[s.length-1].last_column},G&&(bt._$.range=[s[s.length-(at||1)].range[0],s[s.length-1].range[1]]),vt=this.performAction.apply(bt,[c,Q,F,D.yy,B[1],l,s].concat(Ft)),typeof vt<"u")return vt;at&&(k=k.slice(0,-1*at*2),l=l.slice(0,-1*at),s=s.slice(0,-1*at)),k.push(this.productions_[B[1]][0]),l.push(bt.$),s.push(bt._$),Fe=N[k[k.length-2]][k[k.length-1]],k.push(Fe);break;case 3:return!0}}return!0}},W=function(){var I={EOF:1,parseError:function(d,k){if(this.yy.parser)this.yy.parser.parseError(d,k);else throw new Error(d)},setInput:function(h,d){return this.yy=d||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var d=h.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},unput:function(h){var d=h.length,k=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var m=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),k.length-1&&(this.yylineno-=k.length-1);var l=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:k?(k.length===m.length?this.yylloc.first_column:0)+m[m.length-k.length].length-k[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+Rt.join(", ")+", got '"+(this.terminals_[H]||H)+"'":te="Parse error on line "+(F+1)+": Unexpected "+(H==Tt?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(te,{text:f.match,token:this.terminals_[H]||H,line:f.yylineno,loc:u,expected:Rt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+H);switch(B[0]){case 1:k.push(H),l.push(f.yytext),s.push(f.yylloc),k.push(B[1]),H=null,Q=f.yyleng,c=f.yytext,F=f.yylineno,u=f.yylloc;break;case 2:if(at=this.productions_[B[1]][1],bt.$=l[l.length-at],bt._$={first_line:s[s.length-(at||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(at||1)].first_column,last_column:s[s.length-1].last_column},J&&(bt._$.range=[s[s.length-(at||1)].range[0],s[s.length-1].range[1]]),vt=this.performAction.apply(bt,[c,Q,F,D.yy,B[1],l,s].concat(Ft)),typeof vt<"u")return vt;at&&(k=k.slice(0,-1*at*2),l=l.slice(0,-1*at),s=s.slice(0,-1*at)),k.push(this.productions_[B[1]][0]),l.push(bt.$),s.push(bt._$),Fe=N[k[k.length-2]][k[k.length-1]],k.push(Fe);break;case 3:return!0}}return!0}},W=function(){var I={EOF:1,parseError:function(d,k){if(this.yy.parser)this.yy.parser.parseError(d,k);else throw new Error(d)},setInput:function(h,d){return this.yy=d||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var d=h.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},unput:function(h){var d=h.length,k=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var m=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),k.length-1&&(this.yylineno-=k.length-1);var l=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:k?(k.length===m.length?this.yylloc.first_column:0)+m[m.length-k.length].length-k[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(h){this.unput(this.match.slice(h))},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),d=new Array(h.length+1).join("-");return h+this.upcomingInput()+` `+d+"^"},test_match:function(h,d){var k,m,l;if(this.options.backtrack_lexer&&(l={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&&(l.yylloc.range=this.yylloc.range.slice(0))),m=h[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],k=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var s in l)this[s]=l[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,d,k,m;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),s=0;sd[0].length)){if(d=k,m=s,this.options.backtrack_lexer){if(h=this.test_match(k,l[s]),h!==!1)return h;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(h=this.test_match(d,l[m]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var d=this.next();return d||this.lex()},begin:function(d){this.conditionStack.push(d)},popState:function(){var d=this.conditionStack.length-1;return d>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(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},pushState:function(d){this.begin(d)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(d,k,m,l){switch(m){case 0:return this.begin("open_directive"),48;case 1:return this.begin("type_directive"),49;case 2:return this.popState(),this.begin("arg_directive"),41;case 3:return this.popState(),this.popState(),51;case 4:return 50;case 5:return this.begin("acc_title"),29;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),31;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 46;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 44;case 26:this.popState();break;case 27:return 45;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 43;case 31:return 5;case 32:return 20;case 33:return 21;case 34:return 22;case 35:return 23;case 36:return 24;case 37:return 26;case 38:return 25;case 39:return 27;case 40:return 13;case 41:return 14;case 42:return 15;case 43:return 16;case 44:return 17;case 45:return 18;case 46:return 19;case 47:return"date";case 48:return 28;case 49:return"accDescription";case 50:return 34;case 51:return 36;case 52:return 37;case 53:return 41;case 54:return 7;case 55:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?:%[^\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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return I}();g.lexer=W;function Y(){this.yy={}}return Y.prototype=g,g.Parser=Y,new Y}();ge.parser=ge;const Ui=ge;et.extend(Si);et.extend(zn);et.extend(Pn);let it="",be="",xe,we="",Vt=[],Ht=[],Ce={},De=[],$t=[],St="",_e="";const yn=["active","done","crit","milestone"];let Me=[],zt=!1,Se=!1,Ue="sunday",ye=0;const Fi=function(t,e,n){In.parseDirective(this,t,e,n)},Ei=function(){De=[],$t=[],St="",Me=[],Xt=0,pe=void 0,jt=void 0,X=[],it="",be="",_e="",xe=void 0,we="",Vt=[],Ht=[],zt=!1,Se=!1,ye=0,Ce={},Yn(),Ue="sunday"},Ai=function(t){be=t},Ii=function(){return be},Yi=function(t){xe=t},Li=function(){return xe},Wi=function(t){we=t},Oi=function(){return we},Ni=function(t){it=t},Vi=function(){zt=!0},Hi=function(){return zt},zi=function(){Se=!0},Pi=function(){return Se},Ri=function(t){_e=t},Bi=function(){return _e},qi=function(){return it},Zi=function(t){Vt=t.toLowerCase().split(/[\s,]+/)},Xi=function(){return Vt},ji=function(t){Ht=t.toLowerCase().split(/[\s,]+/)},Qi=function(){return Ht},Ji=function(){return Ce},Gi=function(t){St=t,De.push(t)},Ki=function(){return De},$i=function(){let t=Be();const e=10;let n=0;for(;!t&&n=6&&n.includes("weekends")||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(t.format(e.trim()))},ts=function(t){Ue=t},es=function(){return Ue},pn=function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=et(t.startTime):i=et(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=et(t.endTime):a=et(t.endTime,e,!0);const[o,b]=ns(i,a,e,n,r);t.endTime=o.toDate(),t.renderEndTime=b},ns=function(t,e,n,r,i){let a=!1,o=null;for(;t<=e;)a||(o=e.toDate()),a=kn(t,n,r,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,o]},ke=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(i!==null){let o=null;if(i[1].split(" ").forEach(function(b){let C=Ut(b);C!==void 0&&(o?C.endTime>o.endTime&&(o=C):o=C)}),o)return o.endTime;{const b=new Date;return b.setHours(0,0,0,0),b}}let a=et(n,e.trim(),!0);if(a.isValid())return a.toDate();{he.debug("Invalid date:"+n),he.debug("With date format:"+e.trim());const o=new Date(n);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+n);return o}},Tn=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},vn=function(t,e,n,r=!1){n=n.trim();let i=et(n,e.trim(),!0);if(i.isValid())return r&&(i=i.add(1,"d")),i.toDate();let a=et(t);const[o,b]=Tn(n);if(!Number.isNaN(o)){const C=a.add(o,b);C.isValid()&&(a=C)}return a.toDate()};let Xt=0;const _t=function(t){return t===void 0?(Xt=Xt+1,"task"+Xt):t},rs=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Cn(r,i,yn);for(let o=0;o{window.open(n,"_self")}),Ce[r]=n)}),xn(t,"clickable")},xn=function(t,e){t.split(",").forEach(function(n){let r=Ut(n);r!==void 0&&r.classes.push(e)})},cs=function(t,e,n){if(Ct().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{Nn.runFunc(e,...r)})},wn=function(t,e){Me.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},ls=function(t,e,n){t.split(",").forEach(function(r){cs(r,e,n)}),xn(t,"clickable")},us=function(t){Me.forEach(function(e){e(t)})},fs={parseDirective:Fi,getConfig:()=>Ct().gantt,clear:Ei,setDateFormat:Ni,getDateFormat:qi,enableInclusiveEndDates:Vi,endDatesAreInclusive:Hi,enableTopAxis:zi,topAxisEnabled:Pi,setAxisFormat:Ai,getAxisFormat:Ii,setTickInterval:Yi,getTickInterval:Li,setTodayMarker:Wi,getTodayMarker:Oi,setAccTitle:Mn,getAccTitle:Sn,setDiagramTitle:Un,getDiagramTitle:Fn,setDisplayMode:Ri,getDisplayMode:Bi,setAccDescription:En,getAccDescription:An,addSection:Gi,getSections:Ki,getTasks:$i,addTask:ss,findTaskById:Ut,addTaskOrg:as,setIncludes:Zi,getIncludes:Xi,setExcludes:ji,getExcludes:Qi,setClickEvent:ls,setLink:os,getLinks:Ji,bindFunctions:us,parseDuration:Tn,isInvalidDate:kn,setWeekday:ts,getWeekday:es};function Cn(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",o=new RegExp(a);t[0].match(o)&&(e[i]=!0,t.shift(1),r=!0)})}const hs=function(){he.debug("Something is calling, setConf, remove the call")},qe={monday:Wt,tuesday:sn,wednesday:an,thursday:gt,friday:on,saturday:cn,sunday:Nt},ds=(t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((a,o)=>a.startTime-o.startTime||a.order-o.order),i=0;for(const a of r)for(let o=0;o=n[o]){n[o]=a.endTime,a.order=o+e,o>i&&(i=o);break}return i};let ct;const ms=function(t,e,n,r){const i=Ct().gantt,a=Ct().securityLevel;let o;a==="sandbox"&&(o=Bt("#i"+e));const b=a==="sandbox"?Bt(o.nodes()[0].contentDocument.body):Bt("body"),C=a==="sandbox"?o.nodes()[0].contentDocument:document,p=C.getElementById(e);ct=p.parentElement.offsetWidth,ct===void 0&&(ct=1200),i.useWidth!==void 0&&(ct=i.useWidth);const w=r.db.getTasks();let A=[];for(const v of w)A.push(v.type);A=O(A);const x={};let y=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const v={};for(const M of w)v[M.section]===void 0?v[M.section]=[M]:v[M.section].push(M);let S=0;for(const M of Object.keys(v)){const _=ds(v[M],S)+1;S+=_,y+=_*(i.barHeight+i.barGap),x[M]=_}}else{y+=w.length*(i.barHeight+i.barGap);for(const v of A)x[v]=w.filter(S=>S.type===v).length}p.setAttribute("viewBox","0 0 "+ct+" "+y);const z=b.select(`[id="${e}"]`),U=_i().domain([Qn(w,function(v){return v.startTime}),jn(w,function(v){return v.endTime})]).rangeRound([0,ct-i.leftPadding-i.rightPadding]);function $(v,S){const M=v.startTime,_=S.startTime;let g=0;return M>_?g=1:M<_&&(g=-1),g}w.sort($),nt(w,ct,y),Wn(z,y,ct,i.useMaxWidth),z.append("text").text(r.db.getDiagramTitle()).attr("x",ct/2).attr("y",i.titleTopMargin).attr("class","titleText");function nt(v,S,M){const _=i.barHeight,g=_+i.barGap,W=i.topPadding,Y=i.leftPadding,I=Zn().domain([0,A.length]).range(["#00B9FA","#F95002"]).interpolate(ur);q(g,W,Y,S,M,v,r.db.getExcludes(),r.db.getIncludes()),Z(Y,W,S,M),tt(v,g,W,Y,_,I,S),K(g,W),T(Y,W,S,M)}function tt(v,S,M,_,g,W,Y){const h=[...new Set(v.map(l=>l.order))].map(l=>v.find(s=>s.order===l));z.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(l,s){return s=l.order,s*S+M-2}).attr("width",function(){return Y-i.rightPadding/2}).attr("height",S).attr("class",function(l){for(const[s,N]of A.entries())if(l.type===N)return"section section"+s%i.numberSectionStyles;return"section section0"});const d=z.append("g").selectAll("rect").data(v).enter(),k=r.db.getLinks();if(d.append("rect").attr("id",function(l){return l.id}).attr("rx",3).attr("ry",3).attr("x",function(l){return l.milestone?U(l.startTime)+_+.5*(U(l.endTime)-U(l.startTime))-.5*g:U(l.startTime)+_}).attr("y",function(l,s){return s=l.order,s*S+M}).attr("width",function(l){return l.milestone?g:U(l.renderEndTime||l.endTime)-U(l.startTime)}).attr("height",g).attr("transform-origin",function(l,s){return s=l.order,(U(l.startTime)+_+.5*(U(l.endTime)-U(l.startTime))).toString()+"px "+(s*S+M+.5*g).toString()+"px"}).attr("class",function(l){const s="task";let N="";l.classes.length>0&&(N=l.classes.join(" "));let c=0;for(const[Q,P]of A.entries())l.type===P&&(c=Q%i.numberSectionStyles);let F="";return l.active?l.crit?F+=" activeCrit":F=" active":l.done?l.crit?F=" doneCrit":F=" done":l.crit&&(F+=" crit"),F.length===0&&(F=" task"),l.milestone&&(F=" milestone "+F),F+=c,F+=" "+N,s+F}),d.append("text").attr("id",function(l){return l.id+"-text"}).text(function(l){return l.task}).attr("font-size",i.fontSize).attr("x",function(l){let s=U(l.startTime),N=U(l.renderEndTime||l.endTime);l.milestone&&(s+=.5*(U(l.endTime)-U(l.startTime))-.5*g),l.milestone&&(N=s+g);const c=this.getBBox().width;return c>N-s?N+c+1.5*i.leftPadding>Y?s+_-5:N+_+5:(N-s)/2+s+_}).attr("y",function(l,s){return s=l.order,s*S+i.barHeight/2+(i.fontSize/2-2)+M}).attr("text-height",g).attr("class",function(l){const s=U(l.startTime);let N=U(l.endTime);l.milestone&&(N=s+g);const c=this.getBBox().width;let F="";l.classes.length>0&&(F=l.classes.join(" "));let Q=0;for(const[Tt,Ft]of A.entries())l.type===Ft&&(Q=Tt%i.numberSectionStyles);let P="";return l.active&&(l.crit?P="activeCritText"+Q:P="activeText"+Q),l.done?l.crit?P=P+" doneCritText"+Q:P=P+" doneText"+Q:l.crit&&(P=P+" critText"+Q),l.milestone&&(P+=" milestoneText"),c>N-s?N+c+1.5*i.leftPadding>Y?F+" taskTextOutsideLeft taskTextOutside"+Q+" "+P:F+" taskTextOutsideRight taskTextOutside"+Q+" "+P+" width-"+c:F+" taskText taskText"+Q+" "+P+" width-"+c}),Ct().securityLevel==="sandbox"){let l;l=Bt("#i"+e);const s=l.nodes()[0].contentDocument;d.filter(function(N){return k[N.id]!==void 0}).each(function(N){var c=s.querySelector("#"+N.id),F=s.querySelector("#"+N.id+"-text");const Q=c.parentNode;var P=s.createElement("a");P.setAttribute("xlink:href",k[N.id]),P.setAttribute("target","_top"),Q.appendChild(P),P.appendChild(c),P.appendChild(F)})}}function q(v,S,M,_,g,W,Y,I){const h=W.reduce((c,{startTime:F})=>c?Math.min(c,F):F,0),d=W.reduce((c,{endTime:F})=>c?Math.max(c,F):F,0),k=r.db.getDateFormat();if(!h||!d)return;const m=[];let l=null,s=et(h);for(;s.valueOf()<=d;)r.db.isInvalidDate(s,k,Y,I)?l?l.end=s:l={start:s,end:s}:l&&(m.push(l),l=null),s=s.add(1,"d");z.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",function(c){return"exclude-"+c.start.format("YYYY-MM-DD")}).attr("x",function(c){return U(c.start)+M}).attr("y",i.gridLineStartPadding).attr("width",function(c){const F=c.end.add(1,"day");return U(F)-U(c.start)}).attr("height",g-S-i.gridLineStartPadding).attr("transform-origin",function(c,F){return(U(c.start)+M+.5*(U(c.end)-U(c.start))).toString()+"px "+(F*v+.5*g).toString()+"px"}).attr("class","exclude-range")}function Z(v,S,M,_){let g=rr(U).tickSize(-_+S+i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const Y=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(Y!==null){const I=Y[1],h=Y[2],d=r.db.getWeekday()||i.weekday;switch(h){case"minute":g.ticks(Yt.every(I));break;case"hour":g.ticks(Lt.every(I));break;case"day":g.ticks(mt.every(I));break;case"week":g.ticks(qe[d].every(I));break;case"month":g.ticks(Ot.every(I));break}}if(z.append("g").attr("class","grid").attr("transform","translate("+v+", "+(_-50)+")").call(g).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let I=nr(U).tickSize(-_+S+i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(Y!==null){const h=Y[1],d=Y[2],k=r.db.getWeekday()||i.weekday;switch(d){case"minute":I.ticks(Yt.every(h));break;case"hour":I.ticks(Lt.every(h));break;case"day":I.ticks(mt.every(h));break;case"week":I.ticks(qe[k].every(h));break;case"month":I.ticks(Ot.every(h));break}}z.append("g").attr("class","grid").attr("transform","translate("+v+", "+S+")").call(I).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function K(v,S){let M=0;const _=Object.keys(x).map(g=>[g,x[g]]);z.append("g").selectAll("text").data(_).enter().append(function(g){const W=g[0].split(On.lineBreakRegex),Y=-(W.length-1)/2,I=C.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("dy",Y+"em");for(const[h,d]of W.entries()){const k=C.createElementNS("http://www.w3.org/2000/svg","tspan");k.setAttribute("alignment-baseline","central"),k.setAttribute("x","10"),h>0&&k.setAttribute("dy","1em"),k.textContent=d,I.appendChild(k)}return I}).attr("x",10).attr("y",function(g,W){if(W>0)for(let Y=0;Y` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var d=this.next();return d||this.lex()},begin:function(d){this.conditionStack.push(d)},popState:function(){var d=this.conditionStack.length-1;return d>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(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},pushState:function(d){this.begin(d)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(d,k,m,l){switch(m){case 0:return this.begin("open_directive"),48;case 1:return this.begin("type_directive"),49;case 2:return this.popState(),this.begin("arg_directive"),41;case 3:return this.popState(),this.popState(),51;case 4:return 50;case 5:return this.begin("acc_title"),29;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),31;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 46;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 44;case 26:this.popState();break;case 27:return 45;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 43;case 31:return 5;case 32:return 20;case 33:return 21;case 34:return 22;case 35:return 23;case 36:return 24;case 37:return 26;case 38:return 25;case 39:return 27;case 40:return 13;case 41:return 14;case 42:return 15;case 43:return 16;case 44:return 17;case 45:return 18;case 46:return 19;case 47:return"date";case 48:return 28;case 49:return"accDescription";case 50:return 34;case 51:return 36;case 52:return 37;case 53:return 41;case 54:return 7;case 55:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?:%[^\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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return I}();g.lexer=W;function Y(){this.yy={}}return Y.prototype=g,g.Parser=Y,new Y}();ge.parser=ge;const Ui=ge;et.extend(Si);et.extend(zn);et.extend(Pn);let it="",be="",xe,we="",Vt=[],Ht=[],Ce={},De=[],$t=[],St="",_e="";const yn=["active","done","crit","milestone"];let Me=[],zt=!1,Se=!1,Ue="sunday",ye=0;const Fi=function(t,e,n){In.parseDirective(this,t,e,n)},Ei=function(){De=[],$t=[],St="",Me=[],Xt=0,pe=void 0,jt=void 0,X=[],it="",be="",_e="",xe=void 0,we="",Vt=[],Ht=[],zt=!1,Se=!1,ye=0,Ce={},Yn(),Ue="sunday"},Ai=function(t){be=t},Ii=function(){return be},Yi=function(t){xe=t},Li=function(){return xe},Wi=function(t){we=t},Oi=function(){return we},Ni=function(t){it=t},Vi=function(){zt=!0},Hi=function(){return zt},zi=function(){Se=!0},Pi=function(){return Se},Ri=function(t){_e=t},Bi=function(){return _e},qi=function(){return it},Zi=function(t){Vt=t.toLowerCase().split(/[\s,]+/)},Xi=function(){return Vt},ji=function(t){Ht=t.toLowerCase().split(/[\s,]+/)},Qi=function(){return Ht},Gi=function(){return Ce},Ji=function(t){St=t,De.push(t)},Ki=function(){return De},$i=function(){let t=Be();const e=10;let n=0;for(;!t&&n=6&&n.includes("weekends")||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(t.format(e.trim()))},ts=function(t){Ue=t},es=function(){return Ue},pn=function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=et(t.startTime):i=et(t.startTime,e,!0),i=i.add(1,"d");let a;t.endTime instanceof Date?a=et(t.endTime):a=et(t.endTime,e,!0);const[o,b]=ns(i,a,e,n,r);t.endTime=o.toDate(),t.renderEndTime=b},ns=function(t,e,n,r,i){let a=!1,o=null;for(;t<=e;)a||(o=e.toDate()),a=kn(t,n,r,i),a&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,o]},ke=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(i!==null){let o=null;if(i[1].split(" ").forEach(function(b){let C=Ut(b);C!==void 0&&(o?C.endTime>o.endTime&&(o=C):o=C)}),o)return o.endTime;{const b=new Date;return b.setHours(0,0,0,0),b}}let a=et(n,e.trim(),!0);if(a.isValid())return a.toDate();{he.debug("Invalid date:"+n),he.debug("With date format:"+e.trim());const o=new Date(n);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+n);return o}},Tn=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},vn=function(t,e,n,r=!1){n=n.trim();let i=et(n,e.trim(),!0);if(i.isValid())return r&&(i=i.add(1,"d")),i.toDate();let a=et(t);const[o,b]=Tn(n);if(!Number.isNaN(o)){const C=a.add(o,b);C.isValid()&&(a=C)}return a.toDate()};let Xt=0;const _t=function(t){return t===void 0?(Xt=Xt+1,"task"+Xt):t},rs=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Cn(r,i,yn);for(let o=0;o{window.open(n,"_self")}),Ce[r]=n)}),xn(t,"clickable")},xn=function(t,e){t.split(",").forEach(function(n){let r=Ut(n);r!==void 0&&r.classes.push(e)})},cs=function(t,e,n){if(Ct().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{Nn.runFunc(e,...r)})},wn=function(t,e){Me.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},ls=function(t,e,n){t.split(",").forEach(function(r){cs(r,e,n)}),xn(t,"clickable")},us=function(t){Me.forEach(function(e){e(t)})},fs={parseDirective:Fi,getConfig:()=>Ct().gantt,clear:Ei,setDateFormat:Ni,getDateFormat:qi,enableInclusiveEndDates:Vi,endDatesAreInclusive:Hi,enableTopAxis:zi,topAxisEnabled:Pi,setAxisFormat:Ai,getAxisFormat:Ii,setTickInterval:Yi,getTickInterval:Li,setTodayMarker:Wi,getTodayMarker:Oi,setAccTitle:Mn,getAccTitle:Sn,setDiagramTitle:Un,getDiagramTitle:Fn,setDisplayMode:Ri,getDisplayMode:Bi,setAccDescription:En,getAccDescription:An,addSection:Ji,getSections:Ki,getTasks:$i,addTask:ss,findTaskById:Ut,addTaskOrg:as,setIncludes:Zi,getIncludes:Xi,setExcludes:ji,getExcludes:Qi,setClickEvent:ls,setLink:os,getLinks:Gi,bindFunctions:us,parseDuration:Tn,isInvalidDate:kn,setWeekday:ts,getWeekday:es};function Cn(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",o=new RegExp(a);t[0].match(o)&&(e[i]=!0,t.shift(1),r=!0)})}const hs=function(){he.debug("Something is calling, setConf, remove the call")},qe={monday:Wt,tuesday:sn,wednesday:an,thursday:gt,friday:on,saturday:cn,sunday:Nt},ds=(t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((a,o)=>a.startTime-o.startTime||a.order-o.order),i=0;for(const a of r)for(let o=0;o=n[o]){n[o]=a.endTime,a.order=o+e,o>i&&(i=o);break}return i};let ct;const ms=function(t,e,n,r){const i=Ct().gantt,a=Ct().securityLevel;let o;a==="sandbox"&&(o=Bt("#i"+e));const b=a==="sandbox"?Bt(o.nodes()[0].contentDocument.body):Bt("body"),C=a==="sandbox"?o.nodes()[0].contentDocument:document,p=C.getElementById(e);ct=p.parentElement.offsetWidth,ct===void 0&&(ct=1200),i.useWidth!==void 0&&(ct=i.useWidth);const w=r.db.getTasks();let A=[];for(const v of w)A.push(v.type);A=O(A);const x={};let y=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const v={};for(const M of w)v[M.section]===void 0?v[M.section]=[M]:v[M.section].push(M);let S=0;for(const M of Object.keys(v)){const _=ds(v[M],S)+1;S+=_,y+=_*(i.barHeight+i.barGap),x[M]=_}}else{y+=w.length*(i.barHeight+i.barGap);for(const v of A)x[v]=w.filter(S=>S.type===v).length}p.setAttribute("viewBox","0 0 "+ct+" "+y);const z=b.select(`[id="${e}"]`),U=_i().domain([Qn(w,function(v){return v.startTime}),jn(w,function(v){return v.endTime})]).rangeRound([0,ct-i.leftPadding-i.rightPadding]);function $(v,S){const M=v.startTime,_=S.startTime;let g=0;return M>_?g=1:M<_&&(g=-1),g}w.sort($),nt(w,ct,y),Wn(z,y,ct,i.useMaxWidth),z.append("text").text(r.db.getDiagramTitle()).attr("x",ct/2).attr("y",i.titleTopMargin).attr("class","titleText");function nt(v,S,M){const _=i.barHeight,g=_+i.barGap,W=i.topPadding,Y=i.leftPadding,I=Zn().domain([0,A.length]).range(["#00B9FA","#F95002"]).interpolate(ur);q(g,W,Y,S,M,v,r.db.getExcludes(),r.db.getIncludes()),Z(Y,W,S,M),tt(v,g,W,Y,_,I,S),K(g,W),T(Y,W,S,M)}function tt(v,S,M,_,g,W,Y){const h=[...new Set(v.map(l=>l.order))].map(l=>v.find(s=>s.order===l));z.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(l,s){return s=l.order,s*S+M-2}).attr("width",function(){return Y-i.rightPadding/2}).attr("height",S).attr("class",function(l){for(const[s,N]of A.entries())if(l.type===N)return"section section"+s%i.numberSectionStyles;return"section section0"});const d=z.append("g").selectAll("rect").data(v).enter(),k=r.db.getLinks();if(d.append("rect").attr("id",function(l){return l.id}).attr("rx",3).attr("ry",3).attr("x",function(l){return l.milestone?U(l.startTime)+_+.5*(U(l.endTime)-U(l.startTime))-.5*g:U(l.startTime)+_}).attr("y",function(l,s){return s=l.order,s*S+M}).attr("width",function(l){return l.milestone?g:U(l.renderEndTime||l.endTime)-U(l.startTime)}).attr("height",g).attr("transform-origin",function(l,s){return s=l.order,(U(l.startTime)+_+.5*(U(l.endTime)-U(l.startTime))).toString()+"px "+(s*S+M+.5*g).toString()+"px"}).attr("class",function(l){const s="task";let N="";l.classes.length>0&&(N=l.classes.join(" "));let c=0;for(const[Q,P]of A.entries())l.type===P&&(c=Q%i.numberSectionStyles);let F="";return l.active?l.crit?F+=" activeCrit":F=" active":l.done?l.crit?F=" doneCrit":F=" done":l.crit&&(F+=" crit"),F.length===0&&(F=" task"),l.milestone&&(F=" milestone "+F),F+=c,F+=" "+N,s+F}),d.append("text").attr("id",function(l){return l.id+"-text"}).text(function(l){return l.task}).attr("font-size",i.fontSize).attr("x",function(l){let s=U(l.startTime),N=U(l.renderEndTime||l.endTime);l.milestone&&(s+=.5*(U(l.endTime)-U(l.startTime))-.5*g),l.milestone&&(N=s+g);const c=this.getBBox().width;return c>N-s?N+c+1.5*i.leftPadding>Y?s+_-5:N+_+5:(N-s)/2+s+_}).attr("y",function(l,s){return s=l.order,s*S+i.barHeight/2+(i.fontSize/2-2)+M}).attr("text-height",g).attr("class",function(l){const s=U(l.startTime);let N=U(l.endTime);l.milestone&&(N=s+g);const c=this.getBBox().width;let F="";l.classes.length>0&&(F=l.classes.join(" "));let Q=0;for(const[Tt,Ft]of A.entries())l.type===Ft&&(Q=Tt%i.numberSectionStyles);let P="";return l.active&&(l.crit?P="activeCritText"+Q:P="activeText"+Q),l.done?l.crit?P=P+" doneCritText"+Q:P=P+" doneText"+Q:l.crit&&(P=P+" critText"+Q),l.milestone&&(P+=" milestoneText"),c>N-s?N+c+1.5*i.leftPadding>Y?F+" taskTextOutsideLeft taskTextOutside"+Q+" "+P:F+" taskTextOutsideRight taskTextOutside"+Q+" "+P+" width-"+c:F+" taskText taskText"+Q+" "+P+" width-"+c}),Ct().securityLevel==="sandbox"){let l;l=Bt("#i"+e);const s=l.nodes()[0].contentDocument;d.filter(function(N){return k[N.id]!==void 0}).each(function(N){var c=s.querySelector("#"+N.id),F=s.querySelector("#"+N.id+"-text");const Q=c.parentNode;var P=s.createElement("a");P.setAttribute("xlink:href",k[N.id]),P.setAttribute("target","_top"),Q.appendChild(P),P.appendChild(c),P.appendChild(F)})}}function q(v,S,M,_,g,W,Y,I){const h=W.reduce((c,{startTime:F})=>c?Math.min(c,F):F,0),d=W.reduce((c,{endTime:F})=>c?Math.max(c,F):F,0),k=r.db.getDateFormat();if(!h||!d)return;const m=[];let l=null,s=et(h);for(;s.valueOf()<=d;)r.db.isInvalidDate(s,k,Y,I)?l?l.end=s:l={start:s,end:s}:l&&(m.push(l),l=null),s=s.add(1,"d");z.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",function(c){return"exclude-"+c.start.format("YYYY-MM-DD")}).attr("x",function(c){return U(c.start)+M}).attr("y",i.gridLineStartPadding).attr("width",function(c){const F=c.end.add(1,"day");return U(F)-U(c.start)}).attr("height",g-S-i.gridLineStartPadding).attr("transform-origin",function(c,F){return(U(c.start)+M+.5*(U(c.end)-U(c.start))).toString()+"px "+(F*v+.5*g).toString()+"px"}).attr("class","exclude-range")}function Z(v,S,M,_){let g=rr(U).tickSize(-_+S+i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const Y=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(Y!==null){const I=Y[1],h=Y[2],d=r.db.getWeekday()||i.weekday;switch(h){case"minute":g.ticks(Yt.every(I));break;case"hour":g.ticks(Lt.every(I));break;case"day":g.ticks(mt.every(I));break;case"week":g.ticks(qe[d].every(I));break;case"month":g.ticks(Ot.every(I));break}}if(z.append("g").attr("class","grid").attr("transform","translate("+v+", "+(_-50)+")").call(g).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let I=nr(U).tickSize(-_+S+i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(Y!==null){const h=Y[1],d=Y[2],k=r.db.getWeekday()||i.weekday;switch(d){case"minute":I.ticks(Yt.every(h));break;case"hour":I.ticks(Lt.every(h));break;case"day":I.ticks(mt.every(h));break;case"week":I.ticks(qe[k].every(h));break;case"month":I.ticks(Ot.every(h));break}}z.append("g").attr("class","grid").attr("transform","translate("+v+", "+S+")").call(I).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function K(v,S){let M=0;const _=Object.keys(x).map(g=>[g,x[g]]);z.append("g").selectAll("text").data(_).enter().append(function(g){const W=g[0].split(On.lineBreakRegex),Y=-(W.length-1)/2,I=C.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("dy",Y+"em");for(const[h,d]of W.entries()){const k=C.createElementNS("http://www.w3.org/2000/svg","tspan");k.setAttribute("alignment-baseline","central"),k.setAttribute("x","10"),h>0&&k.setAttribute("dy","1em"),k.textContent=d,I.appendChild(k)}return I}).attr("x",10).attr("y",function(g,W){if(W>0)for(let Y=0;Y` .mermaid-main-font { font-family: "trebuchet ms", verdana, arial, sans-serif; font-family: var(--mermaid-font-family); diff --git a/backend/web/assets/gitGraphDiagram-e0ffc2d1-031a8a32.js b/backend/web/assets/gitGraphDiagram-e0ffc2d1-ad508ff6.js similarity index 57% rename from backend/web/assets/gitGraphDiagram-e0ffc2d1-031a8a32.js rename to backend/web/assets/gitGraphDiagram-e0ffc2d1-ad508ff6.js index 083ef1bc..e5ad0af7 100644 --- a/backend/web/assets/gitGraphDiagram-e0ffc2d1-031a8a32.js +++ b/backend/web/assets/gitGraphDiagram-e0ffc2d1-ad508ff6.js @@ -1,9 +1,9 @@ -import{i as I,s as Se,g as Ie,f as Pe,h as Ge,H as Ne,I as He,m as Be,o as N,q as V,J as De,N as fe,n as Ve,F as ze,O as qe,P as je}from"./EchartsRenderer-3d08027d.js";import"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";var pe=function(){var r=function(j,m,b,k){for(b=b||{},k=j.length;k--;b[j[k]]=m);return b},a=[1,4],o=[1,7],p=[1,5],n=[1,9],c=[1,6],u=[2,6],h=[1,16],E=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],x=[8,14,20,22,24,25,27,29,32,37,40],l=[8,13,14,20,22,24,25,27,29,32,37,40],g=[1,26],f=[6,8,14,50,55],s=[8,14,55],_=[1,53],w=[1,52],S=[8,14,30,33,35,38,55],v=[1,67],d=[1,68],y=[1,69],H=[8,14,33,35,42,55],ce={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR: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,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(m,b,k,i,T,e,W){var t=e.length-1;switch(T){case 3:return e[t];case 4:return e[t-1];case 5:return i.setDirection(e[t-3]),e[t-1];case 7:i.setOptions(e[t-1]),this.$=e[t];break;case 8:e[t-1]+=e[t],this.$=e[t-1];break;case 10:this.$=[];break;case 11:e[t-1].push(e[t]),this.$=e[t-1];break;case 12:this.$=e[t-1];break;case 17:this.$=e[t].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=e[t].trim(),i.setAccDescription(this.$);break;case 20:i.addSection(e[t].substr(8)),this.$=e[t].substr(8);break;case 22:i.checkout(e[t]);break;case 23:i.branch(e[t]);break;case 24:i.branch(e[t-2],e[t]);break;case 25:i.cherryPick(e[t],"",void 0);break;case 26:i.cherryPick(e[t-2],"",e[t]);break;case 27:case 29:i.cherryPick(e[t-2],"","");break;case 28:i.cherryPick(e[t],"",e[t-2]);break;case 30:i.merge(e[t],"","","");break;case 31:i.merge(e[t-2],e[t],"","");break;case 32:i.merge(e[t-2],"",e[t],"");break;case 33:i.merge(e[t-2],"","",e[t]);break;case 34:i.merge(e[t-4],e[t],"",e[t-2]);break;case 35:i.merge(e[t-4],"",e[t],e[t-2]);break;case 36:i.merge(e[t-4],"",e[t-2],e[t]);break;case 37:i.merge(e[t-4],e[t-2],e[t],"");break;case 38:i.merge(e[t-4],e[t-2],"",e[t]);break;case 39:i.merge(e[t-4],e[t],e[t-2],"");break;case 40:i.merge(e[t-6],e[t-4],e[t-2],e[t]);break;case 41:i.merge(e[t-6],e[t],e[t-4],e[t-2]);break;case 42:i.merge(e[t-6],e[t-4],e[t],e[t-2]);break;case 43:i.merge(e[t-6],e[t-2],e[t-4],e[t]);break;case 44:i.merge(e[t-6],e[t],e[t-2],e[t-4]);break;case 45:i.merge(e[t-6],e[t-2],e[t],e[t-4]);break;case 46:i.commit(e[t]);break;case 47:i.commit("","",i.commitType.NORMAL,e[t]);break;case 48:i.commit("","",e[t],"");break;case 49:i.commit("","",e[t],e[t-2]);break;case 50:i.commit("","",e[t-2],e[t]);break;case 51:i.commit("",e[t],i.commitType.NORMAL,"");break;case 52:i.commit("",e[t-2],i.commitType.NORMAL,e[t]);break;case 53:i.commit("",e[t],i.commitType.NORMAL,e[t-2]);break;case 54:i.commit("",e[t-2],e[t],"");break;case 55:i.commit("",e[t],e[t-2],"");break;case 56:i.commit("",e[t-4],e[t-2],e[t]);break;case 57:i.commit("",e[t-4],e[t],e[t-2]);break;case 58:i.commit("",e[t-2],e[t-4],e[t]);break;case 59:i.commit("",e[t],e[t-4],e[t-2]);break;case 60:i.commit("",e[t],e[t-2],e[t-4]);break;case 61:i.commit("",e[t-2],e[t],e[t-4]);break;case 62:i.commit(e[t],"",i.commitType.NORMAL,"");break;case 63:i.commit(e[t],"",i.commitType.NORMAL,e[t-2]);break;case 64:i.commit(e[t-2],"",i.commitType.NORMAL,e[t]);break;case 65:i.commit(e[t-2],"",e[t],"");break;case 66:i.commit(e[t],"",e[t-2],"");break;case 67:i.commit(e[t],e[t-2],i.commitType.NORMAL,"");break;case 68:i.commit(e[t-2],e[t],i.commitType.NORMAL,"");break;case 69:i.commit(e[t-4],"",e[t-2],e[t]);break;case 70:i.commit(e[t-4],"",e[t],e[t-2]);break;case 71:i.commit(e[t-2],"",e[t-4],e[t]);break;case 72:i.commit(e[t],"",e[t-4],e[t-2]);break;case 73:i.commit(e[t],"",e[t-2],e[t-4]);break;case 74:i.commit(e[t-2],"",e[t],e[t-4]);break;case 75:i.commit(e[t-4],e[t],e[t-2],"");break;case 76:i.commit(e[t-4],e[t-2],e[t],"");break;case 77:i.commit(e[t-2],e[t],e[t-4],"");break;case 78:i.commit(e[t],e[t-2],e[t-4],"");break;case 79:i.commit(e[t],e[t-4],e[t-2],"");break;case 80:i.commit(e[t-2],e[t-4],e[t],"");break;case 81:i.commit(e[t-4],e[t],i.commitType.NORMAL,e[t-2]);break;case 82:i.commit(e[t-4],e[t-2],i.commitType.NORMAL,e[t]);break;case 83:i.commit(e[t-2],e[t],i.commitType.NORMAL,e[t-4]);break;case 84:i.commit(e[t],e[t-2],i.commitType.NORMAL,e[t-4]);break;case 85:i.commit(e[t],e[t-4],i.commitType.NORMAL,e[t-2]);break;case 86:i.commit(e[t-2],e[t-4],i.commitType.NORMAL,e[t]);break;case 87:i.commit(e[t-6],e[t-4],e[t-2],e[t]);break;case 88:i.commit(e[t-6],e[t-4],e[t],e[t-2]);break;case 89:i.commit(e[t-6],e[t-2],e[t-4],e[t]);break;case 90:i.commit(e[t-6],e[t],e[t-4],e[t-2]);break;case 91:i.commit(e[t-6],e[t-2],e[t],e[t-4]);break;case 92:i.commit(e[t-6],e[t],e[t-2],e[t-4]);break;case 93:i.commit(e[t-4],e[t-6],e[t-2],e[t]);break;case 94:i.commit(e[t-4],e[t-6],e[t],e[t-2]);break;case 95:i.commit(e[t-2],e[t-6],e[t-4],e[t]);break;case 96:i.commit(e[t],e[t-6],e[t-4],e[t-2]);break;case 97:i.commit(e[t-2],e[t-6],e[t],e[t-4]);break;case 98:i.commit(e[t],e[t-6],e[t-2],e[t-4]);break;case 99:i.commit(e[t],e[t-4],e[t-2],e[t-6]);break;case 100:i.commit(e[t-2],e[t-4],e[t],e[t-6]);break;case 101:i.commit(e[t],e[t-2],e[t-4],e[t-6]);break;case 102:i.commit(e[t-2],e[t],e[t-4],e[t-6]);break;case 103:i.commit(e[t-4],e[t-2],e[t],e[t-6]);break;case 104:i.commit(e[t-4],e[t],e[t-2],e[t-6]);break;case 105:i.commit(e[t-2],e[t-4],e[t-6],e[t]);break;case 106:i.commit(e[t],e[t-4],e[t-6],e[t-2]);break;case 107:i.commit(e[t-2],e[t],e[t-6],e[t-4]);break;case 108:i.commit(e[t],e[t-2],e[t-6],e[t-4]);break;case 109:i.commit(e[t-4],e[t-2],e[t-6],e[t]);break;case 110:i.commit(e[t-4],e[t],e[t-6],e[t-2]);break;case 111:this.$="";break;case 112:this.$=e[t];break;case 113:this.$=i.commitType.NORMAL;break;case 114:this.$=i.commitType.REVERSE;break;case 115:this.$=i.commitType.HIGHLIGHT;break;case 118:i.parseDirective("%%{","open_directive");break;case 119:i.parseDirective(e[t],"type_directive");break;case 120:e[t]=e[t].trim().replace(/'/g,'"'),i.parseDirective(e[t],"arg_directive");break;case 121:i.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:a,8:o,14:p,46:8,50:n,55:c},{1:[3]},{3:10,4:2,5:3,6:a,8:o,14:p,46:8,50:n,55:c},{3:11,4:2,5:3,6:a,8:o,14:p,46:8,50:n,55:c},{7:12,8:u,9:[1,13],10:[1,14],11:15,14:h},r(E,[2,124]),r(E,[2,125]),r(E,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:u,11:15,14:h},{9:[1,21]},r(x,[2,10],{12:22,13:[1,23]}),r(l,[2,9]),{9:[1,25],48:24,53:g},r([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:u,11:15,14:h},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},r(l,[2,8]),r(f,[2,116]),{49:45,52:[1,46]},r(f,[2,121]),{1:[2,4]},{8:[1,47]},r(x,[2,11]),{4:48,8:o,14:p,55:c},r(x,[2,13]),r(s,[2,14]),r(s,[2,15]),r(s,[2,16]),{21:[1,49]},{23:[1,50]},r(s,[2,19]),r(s,[2,20]),r(s,[2,21]),{28:51,34:_,54:w},r(s,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:_,54:w},{33:[1,61],35:[1,62]},{28:63,34:_,54:w},{48:64,53:g},{53:[2,120]},{1:[2,5]},r(x,[2,12]),r(s,[2,17]),r(s,[2,18]),r(s,[2,22]),r(S,[2,122]),r(S,[2,123]),r(s,[2,46]),{34:[1,65]},{39:66,43:v,44:d,45:y},{34:[1,70]},{34:[1,71]},r(s,[2,112]),r(s,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},r(s,[2,23],{30:[1,78]}),r(f,[2,117]),r(s,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),r(s,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),r(H,[2,113]),r(H,[2,114]),r(H,[2,115]),r(s,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),r(s,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:v,44:d,45:y},{34:[1,93]},r(s,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:v,44:d,45:y},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:v,44:d,45:y},{34:[1,106]},{34:[1,107]},{39:108,43:v,44:d,45:y},{34:[1,109]},r(s,[2,31],{35:[1,111],38:[1,110]}),r(s,[2,32],{33:[1,113],35:[1,112]}),r(s,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},r(s,[2,24]),r(s,[2,49],{33:[1,120],42:[1,121]}),r(s,[2,53],{38:[1,122],42:[1,123]}),r(s,[2,63],{33:[1,125],38:[1,124]}),r(s,[2,50],{33:[1,126],42:[1,127]}),r(s,[2,55],{35:[1,128],42:[1,129]}),r(s,[2,66],{33:[1,131],35:[1,130]}),r(s,[2,52],{38:[1,132],42:[1,133]}),r(s,[2,54],{35:[1,134],42:[1,135]}),r(s,[2,67],{35:[1,137],38:[1,136]}),r(s,[2,64],{33:[1,139],38:[1,138]}),r(s,[2,65],{33:[1,141],35:[1,140]}),r(s,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:v,44:d,45:y},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:v,44:d,45:y},r(s,[2,26]),r(s,[2,27]),r(s,[2,28]),r(s,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:v,44:d,45:y},{34:[1,153]},{39:154,43:v,44:d,45:y},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:v,44:d,45:y},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:v,44:d,45:y},{34:[1,167]},{39:168,43:v,44:d,45:y},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:v,44:d,45:y},{34:[1,173]},r(s,[2,37],{35:[1,174]}),r(s,[2,38],{38:[1,175]}),r(s,[2,36],{33:[1,176]}),r(s,[2,39],{35:[1,177]}),r(s,[2,34],{38:[1,178]}),r(s,[2,35],{33:[1,179]}),r(s,[2,60],{42:[1,180]}),r(s,[2,73],{33:[1,181]}),r(s,[2,61],{42:[1,182]}),r(s,[2,84],{38:[1,183]}),r(s,[2,74],{33:[1,184]}),r(s,[2,83],{38:[1,185]}),r(s,[2,59],{42:[1,186]}),r(s,[2,72],{33:[1,187]}),r(s,[2,58],{42:[1,188]}),r(s,[2,78],{35:[1,189]}),r(s,[2,71],{33:[1,190]}),r(s,[2,77],{35:[1,191]}),r(s,[2,57],{42:[1,192]}),r(s,[2,85],{38:[1,193]}),r(s,[2,56],{42:[1,194]}),r(s,[2,79],{35:[1,195]}),r(s,[2,80],{35:[1,196]}),r(s,[2,86],{38:[1,197]}),r(s,[2,70],{33:[1,198]}),r(s,[2,81],{38:[1,199]}),r(s,[2,69],{33:[1,200]}),r(s,[2,75],{35:[1,201]}),r(s,[2,76],{35:[1,202]}),r(s,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:v,44:d,45:y},{34:[1,206]},{34:[1,207]},{39:208,43:v,44:d,45:y},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:v,44:d,45:y},{34:[1,214]},{39:215,43:v,44:d,45:y},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:v,44:d,45:y},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:v,44:d,45:y},{34:[1,228]},{39:229,43:v,44:d,45:y},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:v,44:d,45:y},r(s,[2,40]),r(s,[2,42]),r(s,[2,41]),r(s,[2,43]),r(s,[2,45]),r(s,[2,44]),r(s,[2,101]),r(s,[2,102]),r(s,[2,99]),r(s,[2,100]),r(s,[2,104]),r(s,[2,103]),r(s,[2,108]),r(s,[2,107]),r(s,[2,106]),r(s,[2,105]),r(s,[2,110]),r(s,[2,109]),r(s,[2,98]),r(s,[2,97]),r(s,[2,96]),r(s,[2,95]),r(s,[2,93]),r(s,[2,94]),r(s,[2,92]),r(s,[2,91]),r(s,[2,90]),r(s,[2,89]),r(s,[2,87]),r(s,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(m,b){if(b.recoverable)this.trace(m);else{var k=new Error(m);throw k.hash=b,k}},parse:function(m){var b=this,k=[0],i=[],T=[null],e=[],W=this.table,t="",re=0,ge=0,Me=2,de=1,Ce=e.slice.call(arguments,1),M=Object.create(this.lexer),Y={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(Y.yy[le]=this.yy[le]);M.setInput(m,Y.yy),Y.yy.lexer=M,Y.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var he=M.yylloc;e.push(he);var Ae=M.options&&M.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Oe(){var q;return q=i.pop()||M.lex()||de,typeof q!="number"&&(q instanceof Array&&(i=q,q=i.pop()),q=b.symbols_[q]||q),q}for(var G,F,D,me,J={},ie,z,ke,se;;){if(F=k[k.length-1],this.defaultActions[F]?D=this.defaultActions[F]:((G===null||typeof G>"u")&&(G=Oe()),D=W[F]&&W[F][G]),typeof D>"u"||!D.length||!D[0]){var ue="";se=[];for(ie in W[F])this.terminals_[ie]&&ie>Me&&se.push("'"+this.terminals_[ie]+"'");M.showPosition?ue="Parse error on line "+(re+1)+`: +import{j as I,s as Se,g as Ie,h as Ge,i as Pe,I as Ne,J as He,m as Be,p as N,r as V,K as De,O as fe,o as Ve,G as ze,P as je,Q as qe}from"./TextOutput-39ff842e.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";var pe=function(){var r=function(q,m,b,k){for(b=b||{},k=q.length;k--;b[q[k]]=m);return b},a=[1,4],o=[1,7],p=[1,5],n=[1,9],c=[1,6],u=[2,6],h=[1,16],E=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],x=[8,14,20,22,24,25,27,29,32,37,40],l=[8,13,14,20,22,24,25,27,29,32,37,40],g=[1,26],f=[6,8,14,50,55],s=[8,14,55],_=[1,53],w=[1,52],S=[8,14,30,33,35,38,55],v=[1,67],d=[1,68],y=[1,69],H=[8,14,33,35,42,55],ce={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR: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,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(m,b,k,i,T,e,Q){var t=e.length-1;switch(T){case 3:return e[t];case 4:return e[t-1];case 5:return i.setDirection(e[t-3]),e[t-1];case 7:i.setOptions(e[t-1]),this.$=e[t];break;case 8:e[t-1]+=e[t],this.$=e[t-1];break;case 10:this.$=[];break;case 11:e[t-1].push(e[t]),this.$=e[t-1];break;case 12:this.$=e[t-1];break;case 17:this.$=e[t].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=e[t].trim(),i.setAccDescription(this.$);break;case 20:i.addSection(e[t].substr(8)),this.$=e[t].substr(8);break;case 22:i.checkout(e[t]);break;case 23:i.branch(e[t]);break;case 24:i.branch(e[t-2],e[t]);break;case 25:i.cherryPick(e[t],"",void 0);break;case 26:i.cherryPick(e[t-2],"",e[t]);break;case 27:case 29:i.cherryPick(e[t-2],"","");break;case 28:i.cherryPick(e[t],"",e[t-2]);break;case 30:i.merge(e[t],"","","");break;case 31:i.merge(e[t-2],e[t],"","");break;case 32:i.merge(e[t-2],"",e[t],"");break;case 33:i.merge(e[t-2],"","",e[t]);break;case 34:i.merge(e[t-4],e[t],"",e[t-2]);break;case 35:i.merge(e[t-4],"",e[t],e[t-2]);break;case 36:i.merge(e[t-4],"",e[t-2],e[t]);break;case 37:i.merge(e[t-4],e[t-2],e[t],"");break;case 38:i.merge(e[t-4],e[t-2],"",e[t]);break;case 39:i.merge(e[t-4],e[t],e[t-2],"");break;case 40:i.merge(e[t-6],e[t-4],e[t-2],e[t]);break;case 41:i.merge(e[t-6],e[t],e[t-4],e[t-2]);break;case 42:i.merge(e[t-6],e[t-4],e[t],e[t-2]);break;case 43:i.merge(e[t-6],e[t-2],e[t-4],e[t]);break;case 44:i.merge(e[t-6],e[t],e[t-2],e[t-4]);break;case 45:i.merge(e[t-6],e[t-2],e[t],e[t-4]);break;case 46:i.commit(e[t]);break;case 47:i.commit("","",i.commitType.NORMAL,e[t]);break;case 48:i.commit("","",e[t],"");break;case 49:i.commit("","",e[t],e[t-2]);break;case 50:i.commit("","",e[t-2],e[t]);break;case 51:i.commit("",e[t],i.commitType.NORMAL,"");break;case 52:i.commit("",e[t-2],i.commitType.NORMAL,e[t]);break;case 53:i.commit("",e[t],i.commitType.NORMAL,e[t-2]);break;case 54:i.commit("",e[t-2],e[t],"");break;case 55:i.commit("",e[t],e[t-2],"");break;case 56:i.commit("",e[t-4],e[t-2],e[t]);break;case 57:i.commit("",e[t-4],e[t],e[t-2]);break;case 58:i.commit("",e[t-2],e[t-4],e[t]);break;case 59:i.commit("",e[t],e[t-4],e[t-2]);break;case 60:i.commit("",e[t],e[t-2],e[t-4]);break;case 61:i.commit("",e[t-2],e[t],e[t-4]);break;case 62:i.commit(e[t],"",i.commitType.NORMAL,"");break;case 63:i.commit(e[t],"",i.commitType.NORMAL,e[t-2]);break;case 64:i.commit(e[t-2],"",i.commitType.NORMAL,e[t]);break;case 65:i.commit(e[t-2],"",e[t],"");break;case 66:i.commit(e[t],"",e[t-2],"");break;case 67:i.commit(e[t],e[t-2],i.commitType.NORMAL,"");break;case 68:i.commit(e[t-2],e[t],i.commitType.NORMAL,"");break;case 69:i.commit(e[t-4],"",e[t-2],e[t]);break;case 70:i.commit(e[t-4],"",e[t],e[t-2]);break;case 71:i.commit(e[t-2],"",e[t-4],e[t]);break;case 72:i.commit(e[t],"",e[t-4],e[t-2]);break;case 73:i.commit(e[t],"",e[t-2],e[t-4]);break;case 74:i.commit(e[t-2],"",e[t],e[t-4]);break;case 75:i.commit(e[t-4],e[t],e[t-2],"");break;case 76:i.commit(e[t-4],e[t-2],e[t],"");break;case 77:i.commit(e[t-2],e[t],e[t-4],"");break;case 78:i.commit(e[t],e[t-2],e[t-4],"");break;case 79:i.commit(e[t],e[t-4],e[t-2],"");break;case 80:i.commit(e[t-2],e[t-4],e[t],"");break;case 81:i.commit(e[t-4],e[t],i.commitType.NORMAL,e[t-2]);break;case 82:i.commit(e[t-4],e[t-2],i.commitType.NORMAL,e[t]);break;case 83:i.commit(e[t-2],e[t],i.commitType.NORMAL,e[t-4]);break;case 84:i.commit(e[t],e[t-2],i.commitType.NORMAL,e[t-4]);break;case 85:i.commit(e[t],e[t-4],i.commitType.NORMAL,e[t-2]);break;case 86:i.commit(e[t-2],e[t-4],i.commitType.NORMAL,e[t]);break;case 87:i.commit(e[t-6],e[t-4],e[t-2],e[t]);break;case 88:i.commit(e[t-6],e[t-4],e[t],e[t-2]);break;case 89:i.commit(e[t-6],e[t-2],e[t-4],e[t]);break;case 90:i.commit(e[t-6],e[t],e[t-4],e[t-2]);break;case 91:i.commit(e[t-6],e[t-2],e[t],e[t-4]);break;case 92:i.commit(e[t-6],e[t],e[t-2],e[t-4]);break;case 93:i.commit(e[t-4],e[t-6],e[t-2],e[t]);break;case 94:i.commit(e[t-4],e[t-6],e[t],e[t-2]);break;case 95:i.commit(e[t-2],e[t-6],e[t-4],e[t]);break;case 96:i.commit(e[t],e[t-6],e[t-4],e[t-2]);break;case 97:i.commit(e[t-2],e[t-6],e[t],e[t-4]);break;case 98:i.commit(e[t],e[t-6],e[t-2],e[t-4]);break;case 99:i.commit(e[t],e[t-4],e[t-2],e[t-6]);break;case 100:i.commit(e[t-2],e[t-4],e[t],e[t-6]);break;case 101:i.commit(e[t],e[t-2],e[t-4],e[t-6]);break;case 102:i.commit(e[t-2],e[t],e[t-4],e[t-6]);break;case 103:i.commit(e[t-4],e[t-2],e[t],e[t-6]);break;case 104:i.commit(e[t-4],e[t],e[t-2],e[t-6]);break;case 105:i.commit(e[t-2],e[t-4],e[t-6],e[t]);break;case 106:i.commit(e[t],e[t-4],e[t-6],e[t-2]);break;case 107:i.commit(e[t-2],e[t],e[t-6],e[t-4]);break;case 108:i.commit(e[t],e[t-2],e[t-6],e[t-4]);break;case 109:i.commit(e[t-4],e[t-2],e[t-6],e[t]);break;case 110:i.commit(e[t-4],e[t],e[t-6],e[t-2]);break;case 111:this.$="";break;case 112:this.$=e[t];break;case 113:this.$=i.commitType.NORMAL;break;case 114:this.$=i.commitType.REVERSE;break;case 115:this.$=i.commitType.HIGHLIGHT;break;case 118:i.parseDirective("%%{","open_directive");break;case 119:i.parseDirective(e[t],"type_directive");break;case 120:e[t]=e[t].trim().replace(/'/g,'"'),i.parseDirective(e[t],"arg_directive");break;case 121:i.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:a,8:o,14:p,46:8,50:n,55:c},{1:[3]},{3:10,4:2,5:3,6:a,8:o,14:p,46:8,50:n,55:c},{3:11,4:2,5:3,6:a,8:o,14:p,46:8,50:n,55:c},{7:12,8:u,9:[1,13],10:[1,14],11:15,14:h},r(E,[2,124]),r(E,[2,125]),r(E,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:u,11:15,14:h},{9:[1,21]},r(x,[2,10],{12:22,13:[1,23]}),r(l,[2,9]),{9:[1,25],48:24,53:g},r([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:u,11:15,14:h},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},r(l,[2,8]),r(f,[2,116]),{49:45,52:[1,46]},r(f,[2,121]),{1:[2,4]},{8:[1,47]},r(x,[2,11]),{4:48,8:o,14:p,55:c},r(x,[2,13]),r(s,[2,14]),r(s,[2,15]),r(s,[2,16]),{21:[1,49]},{23:[1,50]},r(s,[2,19]),r(s,[2,20]),r(s,[2,21]),{28:51,34:_,54:w},r(s,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:_,54:w},{33:[1,61],35:[1,62]},{28:63,34:_,54:w},{48:64,53:g},{53:[2,120]},{1:[2,5]},r(x,[2,12]),r(s,[2,17]),r(s,[2,18]),r(s,[2,22]),r(S,[2,122]),r(S,[2,123]),r(s,[2,46]),{34:[1,65]},{39:66,43:v,44:d,45:y},{34:[1,70]},{34:[1,71]},r(s,[2,112]),r(s,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},r(s,[2,23],{30:[1,78]}),r(f,[2,117]),r(s,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),r(s,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),r(H,[2,113]),r(H,[2,114]),r(H,[2,115]),r(s,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),r(s,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:v,44:d,45:y},{34:[1,93]},r(s,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:v,44:d,45:y},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:v,44:d,45:y},{34:[1,106]},{34:[1,107]},{39:108,43:v,44:d,45:y},{34:[1,109]},r(s,[2,31],{35:[1,111],38:[1,110]}),r(s,[2,32],{33:[1,113],35:[1,112]}),r(s,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},r(s,[2,24]),r(s,[2,49],{33:[1,120],42:[1,121]}),r(s,[2,53],{38:[1,122],42:[1,123]}),r(s,[2,63],{33:[1,125],38:[1,124]}),r(s,[2,50],{33:[1,126],42:[1,127]}),r(s,[2,55],{35:[1,128],42:[1,129]}),r(s,[2,66],{33:[1,131],35:[1,130]}),r(s,[2,52],{38:[1,132],42:[1,133]}),r(s,[2,54],{35:[1,134],42:[1,135]}),r(s,[2,67],{35:[1,137],38:[1,136]}),r(s,[2,64],{33:[1,139],38:[1,138]}),r(s,[2,65],{33:[1,141],35:[1,140]}),r(s,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:v,44:d,45:y},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:v,44:d,45:y},r(s,[2,26]),r(s,[2,27]),r(s,[2,28]),r(s,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:v,44:d,45:y},{34:[1,153]},{39:154,43:v,44:d,45:y},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:v,44:d,45:y},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:v,44:d,45:y},{34:[1,167]},{39:168,43:v,44:d,45:y},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:v,44:d,45:y},{34:[1,173]},r(s,[2,37],{35:[1,174]}),r(s,[2,38],{38:[1,175]}),r(s,[2,36],{33:[1,176]}),r(s,[2,39],{35:[1,177]}),r(s,[2,34],{38:[1,178]}),r(s,[2,35],{33:[1,179]}),r(s,[2,60],{42:[1,180]}),r(s,[2,73],{33:[1,181]}),r(s,[2,61],{42:[1,182]}),r(s,[2,84],{38:[1,183]}),r(s,[2,74],{33:[1,184]}),r(s,[2,83],{38:[1,185]}),r(s,[2,59],{42:[1,186]}),r(s,[2,72],{33:[1,187]}),r(s,[2,58],{42:[1,188]}),r(s,[2,78],{35:[1,189]}),r(s,[2,71],{33:[1,190]}),r(s,[2,77],{35:[1,191]}),r(s,[2,57],{42:[1,192]}),r(s,[2,85],{38:[1,193]}),r(s,[2,56],{42:[1,194]}),r(s,[2,79],{35:[1,195]}),r(s,[2,80],{35:[1,196]}),r(s,[2,86],{38:[1,197]}),r(s,[2,70],{33:[1,198]}),r(s,[2,81],{38:[1,199]}),r(s,[2,69],{33:[1,200]}),r(s,[2,75],{35:[1,201]}),r(s,[2,76],{35:[1,202]}),r(s,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:v,44:d,45:y},{34:[1,206]},{34:[1,207]},{39:208,43:v,44:d,45:y},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:v,44:d,45:y},{34:[1,214]},{39:215,43:v,44:d,45:y},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:v,44:d,45:y},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:v,44:d,45:y},{34:[1,228]},{39:229,43:v,44:d,45:y},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:v,44:d,45:y},r(s,[2,40]),r(s,[2,42]),r(s,[2,41]),r(s,[2,43]),r(s,[2,45]),r(s,[2,44]),r(s,[2,101]),r(s,[2,102]),r(s,[2,99]),r(s,[2,100]),r(s,[2,104]),r(s,[2,103]),r(s,[2,108]),r(s,[2,107]),r(s,[2,106]),r(s,[2,105]),r(s,[2,110]),r(s,[2,109]),r(s,[2,98]),r(s,[2,97]),r(s,[2,96]),r(s,[2,95]),r(s,[2,93]),r(s,[2,94]),r(s,[2,92]),r(s,[2,91]),r(s,[2,90]),r(s,[2,89]),r(s,[2,87]),r(s,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(m,b){if(b.recoverable)this.trace(m);else{var k=new Error(m);throw k.hash=b,k}},parse:function(m){var b=this,k=[0],i=[],T=[null],e=[],Q=this.table,t="",re=0,ge=0,Me=2,de=1,Ce=e.slice.call(arguments,1),M=Object.create(this.lexer),Y={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(Y.yy[le]=this.yy[le]);M.setInput(m,Y.yy),Y.yy.lexer=M,Y.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var he=M.yylloc;e.push(he);var Ae=M.options&&M.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Oe(){var j;return j=i.pop()||M.lex()||de,typeof j!="number"&&(j instanceof Array&&(i=j,j=i.pop()),j=b.symbols_[j]||j),j}for(var P,K,D,me,J={},ie,z,ke,se;;){if(K=k[k.length-1],this.defaultActions[K]?D=this.defaultActions[K]:((P===null||typeof P>"u")&&(P=Oe()),D=Q[K]&&Q[K][P]),typeof D>"u"||!D.length||!D[0]){var ue="";se=[];for(ie in Q[K])this.terminals_[ie]&&ie>Me&&se.push("'"+this.terminals_[ie]+"'");M.showPosition?ue="Parse error on line "+(re+1)+`: `+M.showPosition()+` -Expecting `+se.join(", ")+", got '"+(this.terminals_[G]||G)+"'":ue="Parse error on line "+(re+1)+": Unexpected "+(G==de?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(ue,{text:M.match,token:this.terminals_[G]||G,line:M.yylineno,loc:he,expected:se})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+G);switch(D[0]){case 1:k.push(G),T.push(M.yytext),e.push(M.yylloc),k.push(D[1]),G=null,ge=M.yyleng,t=M.yytext,re=M.yylineno,he=M.yylloc;break;case 2:if(z=this.productions_[D[1]][1],J.$=T[T.length-z],J._$={first_line:e[e.length-(z||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(z||1)].first_column,last_column:e[e.length-1].last_column},Ae&&(J._$.range=[e[e.length-(z||1)].range[0],e[e.length-1].range[1]]),me=this.performAction.apply(J,[t,ge,re,Y.yy,D[1],T,e].concat(Ce)),typeof me<"u")return me;z&&(k=k.slice(0,-1*z*2),T=T.slice(0,-1*z),e=e.slice(0,-1*z)),k.push(this.productions_[D[1]][0]),T.push(J.$),e.push(J._$),ke=W[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0}},Re=function(){var j={EOF:1,parseError:function(b,k){if(this.yy.parser)this.yy.parser.parseError(b,k);else throw new Error(b)},setInput:function(m,b){return this.yy=b||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var b=m.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var b=m.length,k=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;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),k.length-1&&(this.yylineno-=k.length-1);var T=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:k?(k.length===i.length?this.yylloc.first_column:0)+i[i.length-k.length].length-k[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+se.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ue="Parse error on line "+(re+1)+": Unexpected "+(P==de?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ue,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:he,expected:se})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+P);switch(D[0]){case 1:k.push(P),T.push(M.yytext),e.push(M.yylloc),k.push(D[1]),P=null,ge=M.yyleng,t=M.yytext,re=M.yylineno,he=M.yylloc;break;case 2:if(z=this.productions_[D[1]][1],J.$=T[T.length-z],J._$={first_line:e[e.length-(z||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(z||1)].first_column,last_column:e[e.length-1].last_column},Ae&&(J._$.range=[e[e.length-(z||1)].range[0],e[e.length-1].range[1]]),me=this.performAction.apply(J,[t,ge,re,Y.yy,D[1],T,e].concat(Ce)),typeof me<"u")return me;z&&(k=k.slice(0,-1*z*2),T=T.slice(0,-1*z),e=e.slice(0,-1*z)),k.push(this.productions_[D[1]][0]),T.push(J.$),e.push(J._$),ke=Q[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0}},Re=function(){var q={EOF:1,parseError:function(b,k){if(this.yy.parser)this.yy.parser.parseError(b,k);else throw new Error(b)},setInput:function(m,b){return this.yy=b||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var b=m.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var b=m.length,k=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;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),k.length-1&&(this.yylineno-=k.length-1);var T=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:k?(k.length===i.length?this.yylloc.first_column:0)+i[i.length-k.length].length-k[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),b=new Array(m.length+1).join("-");return m+this.upcomingInput()+` `+b+"^"},test_match:function(m,b){var k,i,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),i=m[0].match(/(?:\r\n?|\n).*/g),i&&(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+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],k=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var e in T)this[e]=T[e];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,b,k,i;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),e=0;eb[0].length)){if(b=k,i=e,this.options.backtrack_lexer){if(m=this.test_match(k,T[e]),m!==!1)return m;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(m=this.test_match(b,T[i]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return b||this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){var b=this.conditionStack.length-1;return b>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(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},pushState:function(b){this.begin(b)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(b,k,i,T){switch(i){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:#[^\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,/^(?: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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return j}();ce.lexer=Re;function oe(){this.yy={}}return oe.prototype=ce,ce.Parser=oe,new oe}();pe.parser=pe;const Ye=pe;let ae=I().gitGraph.mainBranchName,Fe=I().gitGraph.mainBranchOrder,R={},P=null,Z={};Z[ae]={name:ae,order:Fe};let L={};L[ae]=P;let A=ae,ye="LR",U=0;function be(){return je({length:7})}const Ke=function(r,a,o){Be.parseDirective(this,r,a,o)};function Ue(r,a){const o=Object.create(null);return r.reduce((p,n)=>{const c=a(n);return o[c]||(o[c]=!0,p.push(n)),p},[])}const Je=function(r){ye=r};let ve={};const We=function(r){N.debug("options str",r),r=r&&r.trim(),r=r||"{}";try{ve=JSON.parse(r)}catch(a){N.error("error while parsing gitGraph options",a.message)}},Xe=function(){return ve},Qe=function(r,a,o,p){N.debug("Entering commit:",r,a,o,p),a=V.sanitizeText(a,I()),r=V.sanitizeText(r,I()),p=V.sanitizeText(p,I());const n={id:a||U+"-"+be(),message:r,seq:U++,type:o||$.NORMAL,tag:p||"",parents:P==null?[]:[P.id],branch:A};P=n,R[n.id]=n,L[A]=n.id,N.debug("in pushCommit "+n.id)},Ze=function(r,a){if(r=V.sanitizeText(r,I()),L[r]===void 0)L[r]=P!=null?P.id:null,Z[r]={name:r,order:a?parseInt(a,10):null},Ee(r),N.debug("in createBranch");else{let o=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 '+r+'")');throw o.hash={text:"branch "+r,token:"branch "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+r+'"']},o}},$e=function(r,a,o,p){r=V.sanitizeText(r,I()),a=V.sanitizeText(a,I());const n=R[L[A]],c=R[L[r]];if(A===r){let h=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},h}else if(n===void 0||!n){let h=new Error('Incorrect usage of "merge". Current branch ('+A+")has no commits");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},h}else if(L[r]===void 0){let h=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+r]},h}else if(c===void 0||!c){let h=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},h}else if(n===c){let h=new Error('Incorrect usage of "merge". Both branches have same head');throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},h}else if(a&&R[a]!==void 0){let h=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw h.hash={text:"merge "+r+a+o+p,token:"merge "+r+a+o+p,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+r+" "+a+"_UNIQUE "+o+" "+p]},h}const u={id:a||U+"-"+be(),message:"merged branch "+r+" into "+A,seq:U++,parents:[P==null?null:P.id,L[r]],branch:A,type:$.MERGE,customType:o,customId:!!a,tag:p||""};P=u,R[u.id]=u,L[A]=u.id,N.debug(L),N.debug("in mergeBranch")},et=function(r,a,o){if(N.debug("Entering cherryPick:",r,a,o),r=V.sanitizeText(r,I()),a=V.sanitizeText(a,I()),o=V.sanitizeText(o,I()),!r||R[r]===void 0){let c=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw c.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},c}let p=R[r],n=p.branch;if(p.type===$.MERGE){let c=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw c.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},c}if(!a||R[a]===void 0){if(n===A){let h=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw h.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},h}const c=R[L[A]];if(c===void 0||!c){let h=new Error('Incorrect usage of "cherry-pick". Current branch ('+A+")has no commits");throw h.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},h}const u={id:U+"-"+be(),message:"cherry-picked "+p+" into "+A,seq:U++,parents:[P==null?null:P.id,p.id],branch:A,type:$.CHERRY_PICK,tag:o??"cherry-pick:"+p.id};P=u,R[u.id]=u,L[A]=u.id,N.debug(L),N.debug("in cherryPick")}},Ee=function(r){if(r=V.sanitizeText(r,I()),L[r]===void 0){let a=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+r+'")');throw a.hash={text:"checkout "+r,token:"checkout "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+r+'"']},a}else{A=r;const a=L[A];P=R[a]}};function xe(r,a,o){const p=r.indexOf(a);p===-1?r.push(o):r.splice(p,1,o)}function we(r){const a=r.reduce((n,c)=>n.seq>c.seq?n:c,r[0]);let o="";r.forEach(function(n){n===a?o+=" *":o+=" |"});const p=[o,a.id,a.seq];for(let n in L)L[n]===a.id&&p.push(n);if(N.debug(p.join(" ")),a.parents&&a.parents.length==2){const n=R[a.parents[0]];xe(r,a,n),r.push(R[a.parents[1]])}else{if(a.parents.length==0)return;{const n=R[a.parents];xe(r,a,n)}}r=Ue(r,n=>n.id),we(r)}const tt=function(){N.debug(R);const r=Te()[0];we([r])},rt=function(){R={},P=null;let r=I().gitGraph.mainBranchName,a=I().gitGraph.mainBranchOrder;L={},L[r]=null,Z={},Z[r]={name:r,order:a},A=r,U=0,De()},it=function(){return Object.values(Z).map((a,o)=>a.order!==null?a:{...a,order:parseFloat(`0.${o}`,10)}).sort((a,o)=>a.order-o.order).map(({name:a})=>({name:a}))},st=function(){return L},at=function(){return R},Te=function(){const r=Object.keys(R).map(function(a){return R[a]});return r.forEach(function(a){N.debug(a.id)}),r.sort((a,o)=>a.seq-o.seq),r},nt=function(){return A},ct=function(){return ye},ot=function(){return P},$={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},lt={parseDirective:Ke,getConfig:()=>I().gitGraph,setDirection:Je,setOptions:We,getOptions:Xe,commit:Qe,branch:Ze,merge:$e,cherryPick:et,checkout:Ee,prettyPrint:tt,clear:rt,getBranchesAsObjArray:it,getBranches:st,getCommits:at,getCommitsArray:Te,getCurrentBranch:nt,getDirection:ct,getHead:ot,setAccTitle:Se,getAccTitle:Ie,getAccDescription:Pe,setAccDescription:Ge,setDiagramTitle:Ne,getDiagramTitle:He,commitType:$};let X={};const B={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},K=8;let C={},ee={},ne=[],te=0,O="LR";const ht=()=>{C={},ee={},X={},te=0,ne=[],O="LR"},Le=r=>{const a=document.createElementNS("http://www.w3.org/2000/svg","text");let o=[];typeof r=="string"?o=r.split(/\\n|\n|/gi):Array.isArray(r)?o=r:o=[];for(const p of o){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=p.trim(),a.appendChild(n)}return a},_e=(r,a,o)=>{const p=fe().gitGraph,n=r.append("g").attr("class","commit-bullets"),c=r.append("g").attr("class","commit-labels");let u=0;O==="TB"&&(u=30),Object.keys(a).sort((x,l)=>a[x].seq-a[l].seq).forEach(x=>{const l=a[x],g=O==="TB"?u+10:C[l.branch].pos,f=O==="TB"?C[l.branch].pos:u+10;if(o){let s,_=l.customType!==void 0&&l.customType!==""?l.customType:l.type;switch(_){case B.NORMAL:s="commit-normal";break;case B.REVERSE:s="commit-reverse";break;case B.HIGHLIGHT:s="commit-highlight";break;case B.MERGE:s="commit-merge";break;case B.CHERRY_PICK:s="commit-cherry-pick";break;default:s="commit-normal"}if(_===B.HIGHLIGHT){const w=n.append("rect");w.attr("x",f-10),w.attr("y",g-10),w.attr("height",20),w.attr("width",20),w.attr("class",`commit ${l.id} commit-highlight${C[l.branch].index%K} ${s}-outer`),n.append("rect").attr("x",f-6).attr("y",g-6).attr("height",12).attr("width",12).attr("class",`commit ${l.id} commit${C[l.branch].index%K} ${s}-inner`)}else if(_===B.CHERRY_PICK)n.append("circle").attr("cx",f).attr("cy",g).attr("r",10).attr("class",`commit ${l.id} ${s}`),n.append("circle").attr("cx",f-3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${l.id} ${s}`),n.append("circle").attr("cx",f+3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${l.id} ${s}`),n.append("line").attr("x1",f+3).attr("y1",g+1).attr("x2",f).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${l.id} ${s}`),n.append("line").attr("x1",f-3).attr("y1",g+1).attr("x2",f).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${l.id} ${s}`);else{const w=n.append("circle");if(w.attr("cx",f),w.attr("cy",g),w.attr("r",l.type===B.MERGE?9:10),w.attr("class",`commit ${l.id} commit${C[l.branch].index%K}`),_===B.MERGE){const S=n.append("circle");S.attr("cx",f),S.attr("cy",g),S.attr("r",6),S.attr("class",`commit ${s} ${l.id} commit${C[l.branch].index%K}`)}_===B.REVERSE&&n.append("path").attr("d",`M ${f-5},${g-5}L${f+5},${g+5}M${f-5},${g+5}L${f+5},${g-5}`).attr("class",`commit ${s} ${l.id} commit${C[l.branch].index%K}`)}}if(O==="TB"?ee[l.id]={x:f,y:u+10}:ee[l.id]={x:u+10,y:g},o){if(l.type!==B.CHERRY_PICK&&(l.customId&&l.type===B.MERGE||l.type!==B.MERGE)&&p.showCommitLabel){const w=c.append("g"),S=w.insert("rect").attr("class","commit-label-bkg"),v=w.append("text").attr("x",u).attr("y",g+25).attr("class","commit-label").text(l.id);let d=v.node().getBBox();if(S.attr("x",u+10-d.width/2-2).attr("y",g+13.5).attr("width",d.width+2*2).attr("height",d.height+2*2),O==="TB"&&(S.attr("x",f-(d.width+4*4+5)).attr("y",g-12),v.attr("x",f-(d.width+4*4)).attr("y",g+d.height-12)),O!=="TB"&&v.attr("x",u+10-d.width/2),p.rotateCommitLabel)if(O==="TB")v.attr("transform","rotate(-45, "+f+", "+g+")"),S.attr("transform","rotate(-45, "+f+", "+g+")");else{let y=-7.5-(d.width+10)/25*9.5,H=10+d.width/25*8.5;w.attr("transform","translate("+y+", "+H+") rotate(-45, "+u+", "+g+")")}}if(l.tag){const w=c.insert("polygon"),S=c.append("circle"),v=c.append("text").attr("y",g-16).attr("class","tag-label").text(l.tag);let d=v.node().getBBox();v.attr("x",u+10-d.width/2);const y=d.height/2,H=g-19.2;w.attr("class","tag-label-bkg").attr("points",` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return b||this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){var b=this.conditionStack.length-1;return b>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(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},pushState:function(b){this.begin(b)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(b,k,i,T){switch(i){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:#[^\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,/^(?: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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return q}();ce.lexer=Re;function oe(){this.yy={}}return oe.prototype=ce,ce.Parser=oe,new oe}();pe.parser=pe;const Ye=pe;let ae=I().gitGraph.mainBranchName,Ke=I().gitGraph.mainBranchOrder,R={},G=null,Z={};Z[ae]={name:ae,order:Ke};let L={};L[ae]=G;let A=ae,ye="LR",U=0;function be(){return qe({length:7})}const Fe=function(r,a,o){Be.parseDirective(this,r,a,o)};function Ue(r,a){const o=Object.create(null);return r.reduce((p,n)=>{const c=a(n);return o[c]||(o[c]=!0,p.push(n)),p},[])}const Je=function(r){ye=r};let ve={};const Qe=function(r){N.debug("options str",r),r=r&&r.trim(),r=r||"{}";try{ve=JSON.parse(r)}catch(a){N.error("error while parsing gitGraph options",a.message)}},We=function(){return ve},Xe=function(r,a,o,p){N.debug("Entering commit:",r,a,o,p),a=V.sanitizeText(a,I()),r=V.sanitizeText(r,I()),p=V.sanitizeText(p,I());const n={id:a||U+"-"+be(),message:r,seq:U++,type:o||$.NORMAL,tag:p||"",parents:G==null?[]:[G.id],branch:A};G=n,R[n.id]=n,L[A]=n.id,N.debug("in pushCommit "+n.id)},Ze=function(r,a){if(r=V.sanitizeText(r,I()),L[r]===void 0)L[r]=G!=null?G.id:null,Z[r]={name:r,order:a?parseInt(a,10):null},Ee(r),N.debug("in createBranch");else{let o=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 '+r+'")');throw o.hash={text:"branch "+r,token:"branch "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+r+'"']},o}},$e=function(r,a,o,p){r=V.sanitizeText(r,I()),a=V.sanitizeText(a,I());const n=R[L[A]],c=R[L[r]];if(A===r){let h=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},h}else if(n===void 0||!n){let h=new Error('Incorrect usage of "merge". Current branch ('+A+")has no commits");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},h}else if(L[r]===void 0){let h=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+r]},h}else if(c===void 0||!c){let h=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},h}else if(n===c){let h=new Error('Incorrect usage of "merge". Both branches have same head');throw h.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},h}else if(a&&R[a]!==void 0){let h=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw h.hash={text:"merge "+r+a+o+p,token:"merge "+r+a+o+p,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+r+" "+a+"_UNIQUE "+o+" "+p]},h}const u={id:a||U+"-"+be(),message:"merged branch "+r+" into "+A,seq:U++,parents:[G==null?null:G.id,L[r]],branch:A,type:$.MERGE,customType:o,customId:!!a,tag:p||""};G=u,R[u.id]=u,L[A]=u.id,N.debug(L),N.debug("in mergeBranch")},et=function(r,a,o){if(N.debug("Entering cherryPick:",r,a,o),r=V.sanitizeText(r,I()),a=V.sanitizeText(a,I()),o=V.sanitizeText(o,I()),!r||R[r]===void 0){let c=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw c.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},c}let p=R[r],n=p.branch;if(p.type===$.MERGE){let c=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw c.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},c}if(!a||R[a]===void 0){if(n===A){let h=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw h.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},h}const c=R[L[A]];if(c===void 0||!c){let h=new Error('Incorrect usage of "cherry-pick". Current branch ('+A+")has no commits");throw h.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},h}const u={id:U+"-"+be(),message:"cherry-picked "+p+" into "+A,seq:U++,parents:[G==null?null:G.id,p.id],branch:A,type:$.CHERRY_PICK,tag:o??"cherry-pick:"+p.id};G=u,R[u.id]=u,L[A]=u.id,N.debug(L),N.debug("in cherryPick")}},Ee=function(r){if(r=V.sanitizeText(r,I()),L[r]===void 0){let a=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+r+'")');throw a.hash={text:"checkout "+r,token:"checkout "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+r+'"']},a}else{A=r;const a=L[A];G=R[a]}};function xe(r,a,o){const p=r.indexOf(a);p===-1?r.push(o):r.splice(p,1,o)}function we(r){const a=r.reduce((n,c)=>n.seq>c.seq?n:c,r[0]);let o="";r.forEach(function(n){n===a?o+=" *":o+=" |"});const p=[o,a.id,a.seq];for(let n in L)L[n]===a.id&&p.push(n);if(N.debug(p.join(" ")),a.parents&&a.parents.length==2){const n=R[a.parents[0]];xe(r,a,n),r.push(R[a.parents[1]])}else{if(a.parents.length==0)return;{const n=R[a.parents];xe(r,a,n)}}r=Ue(r,n=>n.id),we(r)}const tt=function(){N.debug(R);const r=Te()[0];we([r])},rt=function(){R={},G=null;let r=I().gitGraph.mainBranchName,a=I().gitGraph.mainBranchOrder;L={},L[r]=null,Z={},Z[r]={name:r,order:a},A=r,U=0,De()},it=function(){return Object.values(Z).map((a,o)=>a.order!==null?a:{...a,order:parseFloat(`0.${o}`,10)}).sort((a,o)=>a.order-o.order).map(({name:a})=>({name:a}))},st=function(){return L},at=function(){return R},Te=function(){const r=Object.keys(R).map(function(a){return R[a]});return r.forEach(function(a){N.debug(a.id)}),r.sort((a,o)=>a.seq-o.seq),r},nt=function(){return A},ct=function(){return ye},ot=function(){return G},$={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},lt={parseDirective:Fe,getConfig:()=>I().gitGraph,setDirection:Je,setOptions:Qe,getOptions:We,commit:Xe,branch:Ze,merge:$e,cherryPick:et,checkout:Ee,prettyPrint:tt,clear:rt,getBranchesAsObjArray:it,getBranches:st,getCommits:at,getCommitsArray:Te,getCurrentBranch:nt,getDirection:ct,getHead:ot,setAccTitle:Se,getAccTitle:Ie,getAccDescription:Ge,setAccDescription:Pe,setDiagramTitle:Ne,getDiagramTitle:He,commitType:$};let W={};const B={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},F=8;let C={},ee={},ne=[],te=0,O="LR";const ht=()=>{C={},ee={},W={},te=0,ne=[],O="LR"},Le=r=>{const a=document.createElementNS("http://www.w3.org/2000/svg","text");let o=[];typeof r=="string"?o=r.split(/\\n|\n|/gi):Array.isArray(r)?o=r:o=[];for(const p of o){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=p.trim(),a.appendChild(n)}return a},_e=(r,a,o)=>{const p=fe().gitGraph,n=r.append("g").attr("class","commit-bullets"),c=r.append("g").attr("class","commit-labels");let u=0;O==="TB"&&(u=30),Object.keys(a).sort((x,l)=>a[x].seq-a[l].seq).forEach(x=>{const l=a[x],g=O==="TB"?u+10:C[l.branch].pos,f=O==="TB"?C[l.branch].pos:u+10;if(o){let s,_=l.customType!==void 0&&l.customType!==""?l.customType:l.type;switch(_){case B.NORMAL:s="commit-normal";break;case B.REVERSE:s="commit-reverse";break;case B.HIGHLIGHT:s="commit-highlight";break;case B.MERGE:s="commit-merge";break;case B.CHERRY_PICK:s="commit-cherry-pick";break;default:s="commit-normal"}if(_===B.HIGHLIGHT){const w=n.append("rect");w.attr("x",f-10),w.attr("y",g-10),w.attr("height",20),w.attr("width",20),w.attr("class",`commit ${l.id} commit-highlight${C[l.branch].index%F} ${s}-outer`),n.append("rect").attr("x",f-6).attr("y",g-6).attr("height",12).attr("width",12).attr("class",`commit ${l.id} commit${C[l.branch].index%F} ${s}-inner`)}else if(_===B.CHERRY_PICK)n.append("circle").attr("cx",f).attr("cy",g).attr("r",10).attr("class",`commit ${l.id} ${s}`),n.append("circle").attr("cx",f-3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${l.id} ${s}`),n.append("circle").attr("cx",f+3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${l.id} ${s}`),n.append("line").attr("x1",f+3).attr("y1",g+1).attr("x2",f).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${l.id} ${s}`),n.append("line").attr("x1",f-3).attr("y1",g+1).attr("x2",f).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${l.id} ${s}`);else{const w=n.append("circle");if(w.attr("cx",f),w.attr("cy",g),w.attr("r",l.type===B.MERGE?9:10),w.attr("class",`commit ${l.id} commit${C[l.branch].index%F}`),_===B.MERGE){const S=n.append("circle");S.attr("cx",f),S.attr("cy",g),S.attr("r",6),S.attr("class",`commit ${s} ${l.id} commit${C[l.branch].index%F}`)}_===B.REVERSE&&n.append("path").attr("d",`M ${f-5},${g-5}L${f+5},${g+5}M${f-5},${g+5}L${f+5},${g-5}`).attr("class",`commit ${s} ${l.id} commit${C[l.branch].index%F}`)}}if(O==="TB"?ee[l.id]={x:f,y:u+10}:ee[l.id]={x:u+10,y:g},o){if(l.type!==B.CHERRY_PICK&&(l.customId&&l.type===B.MERGE||l.type!==B.MERGE)&&p.showCommitLabel){const w=c.append("g"),S=w.insert("rect").attr("class","commit-label-bkg"),v=w.append("text").attr("x",u).attr("y",g+25).attr("class","commit-label").text(l.id);let d=v.node().getBBox();if(S.attr("x",u+10-d.width/2-2).attr("y",g+13.5).attr("width",d.width+2*2).attr("height",d.height+2*2),O==="TB"&&(S.attr("x",f-(d.width+4*4+5)).attr("y",g-12),v.attr("x",f-(d.width+4*4)).attr("y",g+d.height-12)),O!=="TB"&&v.attr("x",u+10-d.width/2),p.rotateCommitLabel)if(O==="TB")v.attr("transform","rotate(-45, "+f+", "+g+")"),S.attr("transform","rotate(-45, "+f+", "+g+")");else{let y=-7.5-(d.width+10)/25*9.5,H=10+d.width/25*8.5;w.attr("transform","translate("+y+", "+H+") rotate(-45, "+u+", "+g+")")}}if(l.tag){const w=c.insert("polygon"),S=c.append("circle"),v=c.append("text").attr("y",g-16).attr("class","tag-label").text(l.tag);let d=v.node().getBBox();v.attr("x",u+10-d.width/2);const y=d.height/2,H=g-19.2;w.attr("class","tag-label-bkg").attr("points",` ${u-d.width/2-4/2},${H+2} ${u-d.width/2-4/2},${H-2} ${u+10-d.width/2-4},${H-y-2} @@ -15,8 +15,8 @@ Expecting `+se.join(", ")+", got '"+(this.terminals_[G]||G)+"'":ue="Parse error ${f+10},${u-y-2} ${f+10+d.width+4},${u-y-2} ${f+10+d.width+4},${u+y+2} - ${f+10},${u+y+2}`).attr("transform","translate(12,12) rotate(45, "+f+","+u+")"),S.attr("cx",f+4/2).attr("cy",u).attr("transform","translate(12,12) rotate(45, "+f+","+u+")"),v.attr("x",f+5).attr("y",u+3).attr("transform","translate(14,14) rotate(45, "+f+","+u+")"))}}u+=50,u>te&&(te=u)})},mt=(r,a,o)=>Object.keys(o).filter(c=>o[c].branch===a.branch&&o[c].seq>r.seq&&o[c].seq0,Q=(r,a,o=0)=>{const p=r+Math.abs(r-a)/2;if(o>5)return p;if(ne.every(u=>Math.abs(u-p)>=10))return ne.push(p),p;const c=Math.abs(r-a);return Q(r,a-c/5,o+1)},ut=(r,a,o,p)=>{const n=ee[a.id],c=ee[o.id],u=mt(a,o,p);let h="",E="",x=0,l=0,g=C[o.branch].index,f;if(u){h="A 10 10, 0, 0, 0,",E="A 10 10, 0, 0, 1,",x=10,l=10,g=C[o.branch].index;const s=n.yc.x&&(h="A 20 20, 0, 0, 0,",E="A 20 20, 0, 0, 1,",x=20,l=20,g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${E} ${n.x-l} ${c.y} L ${c.x} ${c.y}`),n.x===c.x&&(g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x+x} ${n.y} ${h} ${n.x+l} ${c.y+x} L ${c.x} ${c.y}`)):(n.yc.y&&(h="A 20 20, 0, 0, 0,",x=20,l=20,g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${c.x-x} ${n.y} ${h} ${c.x} ${n.y-l} L ${c.x} ${c.y}`),n.y===c.y&&(g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${h} ${n.x+l} ${c.y} L ${c.x} ${c.y}`));r.append("path").attr("d",f).attr("class","arrow arrow"+g%K)},pt=(r,a)=>{const o=r.append("g").attr("class","commit-arrows");Object.keys(a).forEach(p=>{const n=a[p];n.parents&&n.parents.length>0&&n.parents.forEach(c=>{ut(o,a[c],n,a)})})},ft=(r,a)=>{const o=fe().gitGraph,p=r.append("g");a.forEach((n,c)=>{const u=c%K,h=C[n.name].pos,E=p.append("line");E.attr("x1",0),E.attr("y1",h),E.attr("x2",te),E.attr("y2",h),E.attr("class","branch branch"+u),O==="TB"&&(E.attr("y1",30),E.attr("x1",h),E.attr("y2",te),E.attr("x2",h)),ne.push(h);let x=n.name;const l=Le(x),g=p.insert("rect"),s=p.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);s.node().appendChild(l);let _=l.getBBox();g.attr("class","branchLabelBkg label"+u).attr("rx",4).attr("ry",4).attr("x",-_.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+8).attr("width",_.width+18).attr("height",_.height+4),s.attr("transform","translate("+(-_.width-14-(o.rotateCommitLabel===!0?30:0))+", "+(h-_.height/2-1)+")"),O==="TB"&&(g.attr("x",h-_.width/2-10).attr("y",0),s.attr("transform","translate("+(h-_.width/2-5)+", 0)")),O!=="TB"&&g.attr("transform","translate(-19, "+(h-_.height/2)+")")})},bt=function(r,a,o,p){ht();const n=fe(),c=n.gitGraph;N.debug("in gitgraph renderer",r+` -`,"id:",a,o),X=p.db.getCommits();const u=p.db.getBranchesAsObjArray();O=p.db.getDirection();const h=Ve(`[id="${a}"]`);let E=0;u.forEach((x,l)=>{const g=Le(x.name),f=h.append("g"),s=f.insert("g").attr("class","branchLabel"),_=s.insert("g").attr("class","label branch-label");_.node().appendChild(g);let w=g.getBBox();C[x.name]={pos:E,index:l},E+=50+(c.rotateCommitLabel?40:0)+(O==="TB"?w.width/2:0),_.remove(),s.remove(),f.remove()}),_e(h,X,!1),c.showBranches&&ft(h,u),pt(h,X),_e(h,X,!0),ze.insertTitle(h,"gitTitleText",c.titleTopMargin,p.db.getDiagramTitle()),qe(void 0,h,c.diagramPadding,c.useMaxWidth??n.useMaxWidth)},gt={draw:bt},dt=r=>` + ${f+10},${u+y+2}`).attr("transform","translate(12,12) rotate(45, "+f+","+u+")"),S.attr("cx",f+4/2).attr("cy",u).attr("transform","translate(12,12) rotate(45, "+f+","+u+")"),v.attr("x",f+5).attr("y",u+3).attr("transform","translate(14,14) rotate(45, "+f+","+u+")"))}}u+=50,u>te&&(te=u)})},mt=(r,a,o)=>Object.keys(o).filter(c=>o[c].branch===a.branch&&o[c].seq>r.seq&&o[c].seq0,X=(r,a,o=0)=>{const p=r+Math.abs(r-a)/2;if(o>5)return p;if(ne.every(u=>Math.abs(u-p)>=10))return ne.push(p),p;const c=Math.abs(r-a);return X(r,a-c/5,o+1)},ut=(r,a,o,p)=>{const n=ee[a.id],c=ee[o.id],u=mt(a,o,p);let h="",E="",x=0,l=0,g=C[o.branch].index,f;if(u){h="A 10 10, 0, 0, 0,",E="A 10 10, 0, 0, 1,",x=10,l=10,g=C[o.branch].index;const s=n.yc.x&&(h="A 20 20, 0, 0, 0,",E="A 20 20, 0, 0, 1,",x=20,l=20,g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${E} ${n.x-l} ${c.y} L ${c.x} ${c.y}`),n.x===c.x&&(g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x+x} ${n.y} ${h} ${n.x+l} ${c.y+x} L ${c.x} ${c.y}`)):(n.yc.y&&(h="A 20 20, 0, 0, 0,",x=20,l=20,g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${c.x-x} ${n.y} ${h} ${c.x} ${n.y-l} L ${c.x} ${c.y}`),n.y===c.y&&(g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${h} ${n.x+l} ${c.y} L ${c.x} ${c.y}`));r.append("path").attr("d",f).attr("class","arrow arrow"+g%F)},pt=(r,a)=>{const o=r.append("g").attr("class","commit-arrows");Object.keys(a).forEach(p=>{const n=a[p];n.parents&&n.parents.length>0&&n.parents.forEach(c=>{ut(o,a[c],n,a)})})},ft=(r,a)=>{const o=fe().gitGraph,p=r.append("g");a.forEach((n,c)=>{const u=c%F,h=C[n.name].pos,E=p.append("line");E.attr("x1",0),E.attr("y1",h),E.attr("x2",te),E.attr("y2",h),E.attr("class","branch branch"+u),O==="TB"&&(E.attr("y1",30),E.attr("x1",h),E.attr("y2",te),E.attr("x2",h)),ne.push(h);let x=n.name;const l=Le(x),g=p.insert("rect"),s=p.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);s.node().appendChild(l);let _=l.getBBox();g.attr("class","branchLabelBkg label"+u).attr("rx",4).attr("ry",4).attr("x",-_.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+8).attr("width",_.width+18).attr("height",_.height+4),s.attr("transform","translate("+(-_.width-14-(o.rotateCommitLabel===!0?30:0))+", "+(h-_.height/2-1)+")"),O==="TB"&&(g.attr("x",h-_.width/2-10).attr("y",0),s.attr("transform","translate("+(h-_.width/2-5)+", 0)")),O!=="TB"&&g.attr("transform","translate(-19, "+(h-_.height/2)+")")})},bt=function(r,a,o,p){ht();const n=fe(),c=n.gitGraph;N.debug("in gitgraph renderer",r+` +`,"id:",a,o),W=p.db.getCommits();const u=p.db.getBranchesAsObjArray();O=p.db.getDirection();const h=Ve(`[id="${a}"]`);let E=0;u.forEach((x,l)=>{const g=Le(x.name),f=h.append("g"),s=f.insert("g").attr("class","branchLabel"),_=s.insert("g").attr("class","label branch-label");_.node().appendChild(g);let w=g.getBBox();C[x.name]={pos:E,index:l},E+=50+(c.rotateCommitLabel?40:0)+(O==="TB"?w.width/2:0),_.remove(),s.remove(),f.remove()}),_e(h,W,!1),c.showBranches&&ft(h,u),pt(h,W),_e(h,W,!0),ze.insertTitle(h,"gitTitleText",c.titleTopMargin,p.db.getDiagramTitle()),je(void 0,h,c.diagramPadding,c.useMaxWidth??n.useMaxWidth)},gt={draw:bt},dt=r=>` .commit-id, .commit-msg, .branch-label { diff --git a/backend/web/assets/index-fb7c1fe5.js b/backend/web/assets/index-ace83a9e.js similarity index 97% rename from backend/web/assets/index-fb7c1fe5.js rename to backend/web/assets/index-ace83a9e.js index 3bd6924b..70b67cf2 100644 --- a/backend/web/assets/index-fb7c1fe5.js +++ b/backend/web/assets/index-ace83a9e.js @@ -1 +1 @@ -import{i as d,c as m}from"./index-51905ea3.js";var L={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function y(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function v(s,t,r){var e=typeof t.fill=="string"?[t.fill]:t.fill||[],o=[],i=t.theme||r.theme;switch(i){case"outline":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push("none"),o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push("none");break;case"filled":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push("#FFF"),o.push("#FFF");break;case"two-tone":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[1]=="string"?e[1]:r.colors.twoTone.twoTone),o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[1]=="string"?e[1]:r.colors.twoTone.twoTone);break;case"multi-color":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[1]=="string"?e[1]:r.colors.multiColor.outFillColor),o.push(typeof e[2]=="string"?e[2]:r.colors.multiColor.innerStrokeColor),o.push(typeof e[3]=="string"?e[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:o,id:s}}var g=Symbol("icon-context");function x(s,t,r){var e={name:"icon-"+s,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","spin"],setup:function(i){var u=y(),n=d(g,L);return function(){var p=i.size,a=i.strokeWidth,h=i.strokeLinecap,c=i.strokeLinejoin,k=i.theme,f=i.fill,C=i.spin,F=v(u,{size:p,strokeWidth:a,strokeLinecap:h,strokeLinejoin:c,theme:k,fill:f},n),l=[n.prefix+"-icon"];return l.push(n.prefix+"-icon-"+s),t&&n.rtl&&l.push(n.prefix+"-icon-rtl"),C&&l.push(n.prefix+"-icon-spin"),m("span",{class:l.join(" ")},[r(F)])}}};return e}export{x as I}; +import{i as d,c as m}from"./index-ef7aa48c.js";var L={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function y(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function v(s,t,r){var e=typeof t.fill=="string"?[t.fill]:t.fill||[],o=[],i=t.theme||r.theme;switch(i){case"outline":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push("none"),o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push("none");break;case"filled":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push("#FFF"),o.push("#FFF");break;case"two-tone":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[1]=="string"?e[1]:r.colors.twoTone.twoTone),o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[1]=="string"?e[1]:r.colors.twoTone.twoTone);break;case"multi-color":o.push(typeof e[0]=="string"?e[0]:"currentColor"),o.push(typeof e[1]=="string"?e[1]:r.colors.multiColor.outFillColor),o.push(typeof e[2]=="string"?e[2]:r.colors.multiColor.innerStrokeColor),o.push(typeof e[3]=="string"?e[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:o,id:s}}var g=Symbol("icon-context");function x(s,t,r){var e={name:"icon-"+s,props:["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","spin"],setup:function(i){var u=y(),n=d(g,L);return function(){var p=i.size,a=i.strokeWidth,h=i.strokeLinecap,c=i.strokeLinejoin,k=i.theme,f=i.fill,C=i.spin,F=v(u,{size:p,strokeWidth:a,strokeLinecap:h,strokeLinejoin:c,theme:k,fill:f},n),l=[n.prefix+"-icon"];return l.push(n.prefix+"-icon-"+s),t&&n.rtl&&l.push(n.prefix+"-icon-rtl"),C&&l.push(n.prefix+"-icon-spin"),m("span",{class:l.join(" ")},[r(F)])}}};return e}export{x as I}; diff --git a/backend/web/assets/index-51905ea3.js b/backend/web/assets/index-ef7aa48c.js similarity index 98% rename from backend/web/assets/index-51905ea3.js rename to backend/web/assets/index-ef7aa48c.js index a9f17661..9b3a79cb 100644 --- a/backend/web/assets/index-51905ea3.js +++ b/backend/web/assets/index-ef7aa48c.js @@ -516,10 +516,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`),H=M,z=D),U===void 0&&( */const TMe="9.2.2";let iz=It.__EXTEND_POINT__;const ir=()=>++iz,Po={UNEXPECTED_RETURN_TYPE:iz,INVALID_ARGUMENT:ir(),MUST_BE_CALL_SETUP_TOP:ir(),NOT_INSLALLED:ir(),NOT_AVAILABLE_IN_LEGACY_MODE:ir(),REQUIRED_VALUE:ir(),INVALID_VALUE:ir(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:ir(),NOT_INSLALLED_WITH_PROVIDE:ir(),UNEXPECTED_ERROR:ir(),NOT_COMPATIBLE_LEGACY_VUE_I18N:ir(),BRIDGE_SUPPORT_VUE_2_ONLY:ir(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:ir(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:ir(),__EXTEND_POINT__:ir()};function da(e,...t){return Wg(e,null,void 0)}const LC=ei("__transrateVNode"),kC=ei("__datetimeParts"),FC=ei("__numberParts"),OMe=ei("__setPluralRules");ei("__intlifyMeta");const xMe=ei("__injectWithOption");function BC(e){if(!Yt(e))return e;for(const t in e)if(gw(e,t))if(!t.includes("."))Yt(e[t])&&BC(e[t]);else{const n=t.split("."),r=n.length-1;let o=e;for(let a=0;a{if("locale"in l&&"resource"in l){const{locale:s,resource:c}=l;s?(i[s]=i[s]||{},Wc(c,i[s])):Wc(c,i)}else tt(l)&&Wc(JSON.parse(l),i)}),o==null&&a)for(const l in i)gw(i,l)&&BC(i[l]);return i}const ap=e=>!Yt(e)||vn(e);function Wc(e,t){if(ap(e)||ap(t))throw da(Po.INVALID_VALUE);for(const n in e)gw(e,n)&&(ap(e[n])||ap(t[n])?t[n]=e[n]:Wc(e[n],t[n]))}function wMe(e){return e.type}function RMe(e,t,n){let r=Yt(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=lz(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(a=>{e.mergeLocaleMessage(a,r[a])});{if(Yt(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(Yt(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function Pk(e){return g(ma,null,e,0)}let Mk=0;function $k(e){return(t,n,r,o)=>e(n,r,ln()||void 0,o)}function sz(e={},t){const{__root:n}=e,r=n===void 0;let o=hn(e.inheritLocale)?e.inheritLocale:!0;const a=ue(n&&o?n.locale.value:tt(e.locale)?e.locale:vw),i=ue(n&&o?n.fallbackLocale.value:tt(e.fallbackLocale)||vn(e.fallbackLocale)||Nt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),l=ue(lz(a.value,e)),s=ue(Nt(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),c=ue(Nt(e.numberFormats)?e.numberFormats:{[a.value]:{}});let u=n?n.missingWarn:hn(e.missingWarn)||rm(e.missingWarn)?e.missingWarn:!0,d=n?n.fallbackWarn:hn(e.fallbackWarn)||rm(e.fallbackWarn)?e.fallbackWarn:!0,p=n?n.fallbackRoot:hn(e.fallbackRoot)?e.fallbackRoot:!0,f=!!e.fallbackFormat,_=Nn(e.missing)?e.missing:null,m=Nn(e.missing)?$k(e.missing):null,v=Nn(e.postTranslation)?e.postTranslation:null,h=n?n.warnHtmlMessage:hn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter;const E=n?n.modifiers:Nt(e.modifiers)?e.modifiers:{};let C=e.pluralRules||n&&n.pluralRules,y;y=(()=>{const re={version:TMe,locale:a.value,fallbackLocale:i.value,messages:l.value,modifiers:E,pluralRules:C,missing:m===null?void 0:m,missingWarn:u,fallbackWarn:d,fallbackFormat:f,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:h,escapeParameter:b,messageResolver:e.messageResolver,__meta:{framework:"vue"}};return re.datetimeFormats=s.value,re.numberFormats=c.value,re.__datetimeFormatters=Nt(y)?y.__datetimeFormatters:void 0,re.__numberFormatters=Nt(y)?y.__numberFormatters:void 0,hMe(re)})(),dc(y,a.value,i.value);function O(){return[a.value,i.value,l.value,s.value,c.value]}const x=I({get:()=>a.value,set:re=>{a.value=re,y.locale=a.value}}),w=I({get:()=>i.value,set:re=>{i.value=re,y.fallbackLocale=i.value,dc(y,a.value,re)}}),R=I(()=>l.value),N=I(()=>s.value),L=I(()=>c.value);function $(){return Nn(v)?v:null}function P(re){v=re,y.postTranslation=re}function A(){return _}function k(re){re!==null&&(m=$k(re)),_=re,y.missing=m}const M=(re,fe,Ee,ge,me,pe)=>{O();let ve;if(ve=re(y),Hn(ve)&&ve===qg){const[Oe,Ie]=fe();return n&&p?ge(n):me(Oe)}else{if(pe(ve))return ve;throw da(Po.UNEXPECTED_RETURN_TYPE)}};function D(...re){return M(fe=>Reflect.apply(Rk,null,[fe,...re]),()=>PC(...re),"translate",fe=>Reflect.apply(fe.t,fe,[...re]),fe=>fe,fe=>tt(fe))}function U(...re){const[fe,Ee,ge]=re;if(ge&&!Yt(ge))throw da(Po.INVALID_ARGUMENT);return D(fe,Ee,Gn({resolvedMessage:!0},ge||{}))}function z(...re){return M(fe=>Reflect.apply(Ik,null,[fe,...re]),()=>MC(...re),"datetime format",fe=>Reflect.apply(fe.d,fe,[...re]),()=>Ck,fe=>tt(fe))}function H(...re){return M(fe=>Reflect.apply(Ak,null,[fe,...re]),()=>$C(...re),"number format",fe=>Reflect.apply(fe.n,fe,[...re]),()=>Ck,fe=>tt(fe))}function V(re){return re.map(fe=>tt(fe)||Hn(fe)||hn(fe)?Pk(String(fe)):fe)}const ne={normalize:V,interpolate:re=>re,type:"vnode"};function j(...re){return M(fe=>{let Ee;const ge=fe;try{ge.processor=ne,Ee=Reflect.apply(Rk,null,[ge,...re])}finally{ge.processor=null}return Ee},()=>PC(...re),"translate",fe=>fe[LC](...re),fe=>[Pk(fe)],fe=>vn(fe))}function X(...re){return M(fe=>Reflect.apply(Ak,null,[fe,...re]),()=>$C(...re),"number format",fe=>fe[FC](...re),()=>[],fe=>tt(fe)||vn(fe))}function W(...re){return M(fe=>Reflect.apply(Ik,null,[fe,...re]),()=>MC(...re),"datetime format",fe=>fe[kC](...re),()=>[],fe=>tt(fe)||vn(fe))}function Z(re){C=re,y.pluralRules=C}function Q(re,fe){const Ee=tt(fe)?fe:a.value,ge=Y(Ee);return y.messageResolver(ge,re)!==null}function K(re){let fe=null;const Ee=QH(y,i.value,a.value);for(let ge=0;ge{o&&(a.value=re,y.locale=re,dc(y,a.value,i.value))}),ye(n.fallbackLocale,re=>{o&&(i.value=re,y.fallbackLocale=re,dc(y,a.value,i.value))}));const _e={id:Mk,locale:x,fallbackLocale:w,get inheritLocale(){return o},set inheritLocale(re){o=re,re&&n&&(a.value=n.locale.value,i.value=n.fallbackLocale.value,dc(y,a.value,i.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:R,get modifiers(){return E},get pluralRules(){return C||{}},get isGlobal(){return r},get missingWarn(){return u},set missingWarn(re){u=re,y.missingWarn=u},get fallbackWarn(){return d},set fallbackWarn(re){d=re,y.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(re){p=re},get fallbackFormat(){return f},set fallbackFormat(re){f=re,y.fallbackFormat=f},get warnHtmlMessage(){return h},set warnHtmlMessage(re){h=re,y.warnHtmlMessage=re},get escapeParameter(){return b},set escapeParameter(re){b=re,y.escapeParameter=re},t:D,getLocaleMessage:Y,setLocaleMessage:B,mergeLocaleMessage:G,getPostTranslationHandler:$,setPostTranslationHandler:P,getMissingHandler:A,setMissingHandler:k,[OMe]:Z};return _e.datetimeFormats=N,_e.numberFormats=L,_e.rt=U,_e.te=Q,_e.tm=ae,_e.d=z,_e.n=H,_e.getDateTimeFormat=J,_e.setDateTimeFormat=te,_e.mergeDateTimeFormat=oe,_e.getNumberFormat=se,_e.setNumberFormat=ie,_e.mergeNumberFormat=he,_e[xMe]=e.__injectWithOption,_e[LC]=j,_e[kC]=W,_e[FC]=X,_e}const Sw={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function IMe({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>r=[...r,...vn(o.children)?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function cz(e){return Ue}Gn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Hn(e)||!isNaN(e)}},Sw);function NMe(e){return vn(e)&&!tt(e[0])}function uz(e,t,n,r){const{slots:o,attrs:a}=t;return()=>{const i={part:!0};let l={};e.locale&&(i.locale=e.locale),tt(e.format)?i.key=e.format:Yt(e.format)&&(tt(e.format.key)&&(i.key=e.format.key),l=Object.keys(e.format).reduce((p,f)=>n.includes(f)?Gn({},p,{[f]:e.format[f]}):p,{}));const s=r(e.value,i,l);let c=[i.key];vn(s)?c=s.map((p,f)=>{const _=o[p.type],m=_?_({[p.type]:p.value,index:f,parts:s}):[p.value];return NMe(m)&&(m[0].key=`${p.type}-${f}`),m}):tt(s)&&(c=[s]);const u=Gn({},a),d=tt(e.tag)||Yt(e.tag)?e.tag:cz();return ia(d,u,c)}}Gn({value:{type:Number,required:!0},format:{type:[String,Object]}},Sw);Gn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Sw);const AMe=ei("global-vue-i18n");function DMe(e={},t){const n=hn(e.globalInjection)?e.globalInjection:!0,r=!0,o=new Map,[a,i]=PMe(e),l=ei("");function s(d){return o.get(d)||null}function c(d,p){o.set(d,p)}function u(d){o.delete(d)}{const d={get mode(){return"composition"},get allowComposition(){return r},async install(p,...f){p.__VUE_I18N_SYMBOL__=l,p.provide(p.__VUE_I18N_SYMBOL__,d),n&&HMe(p,d.global);const _=p.unmount;p.unmount=()=>{d.dispose(),_()}},get global(){return i},dispose(){a.stop()},__instances:o,__getInstance:s,__setInstance:c,__deleteInstance:u};return d}}function cl(e={}){const t=ln();if(t==null)throw da(Po.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw da(Po.NOT_INSLALLED);const n=MMe(t),r=LMe(n),o=wMe(t),a=$Me(e,o);if(a==="global")return RMe(r,e,o),r;if(a==="parent"){let s=kMe(n,t,e.__useComponent);return s==null&&(s=r),s}const i=n;let l=i.__getInstance(t);if(l==null){const s=Gn({},e);"__i18n"in o&&(s.__i18n=o.__i18n),r&&(s.__root=r),l=sz(s),FMe(i,t),i.__setInstance(t,l)}return l}function PMe(e,t,n){const r=qC();{const o=r.run(()=>sz(e));if(o==null)throw da(Po.UNEXPECTED_ERROR);return[r,o]}}function MMe(e){{const t=We(e.isCE?AMe:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw da(e.isCE?Po.NOT_INSLALLED_WITH_PROVIDE:Po.UNEXPECTED_ERROR);return t}}function $Me(e,t){return Yg(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function LMe(e){return e.mode==="composition"?e.global:e.global.__composer}function kMe(e,t,n=!1){let r=null;const o=t.root;let a=t.parent;for(;a!=null;){const i=e;if(e.mode==="composition"&&(r=i.__getInstance(a)),r!=null||o===a)break;a=a.parent}return r}function FMe(e,t,n){qe(()=>{},t),$n(()=>{e.__deleteInstance(t)},t)}const BMe=["locale","fallbackLocale","availableLocales"],UMe=["t","rt","d","n","tm"];function HMe(e,t){const n=Object.create(null);BMe.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o)throw da(Po.UNEXPECTED_ERROR);const a=Vt(o.value)?{get(){return o.value.value},set(i){o.value.value=i}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,r,a)}),e.config.globalProperties.$i18n=n,UMe.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o||!o.value)throw da(Po.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,o)})}mMe(bMe);gMe(eMe);_Me(QH);const zMe=kF("userWorkflows",{state:()=>({userWorkflows:JSON.parse(localStorage.getItem("userWorkflows")||"[]"),userWorkflowsTotal:localStorage.getItem("userWorkflowsTotal")||0,userFastAccessWorkflows:JSON.parse(localStorage.getItem("userFastAccessWorkflows")||"[]")}),actions:{setUserWorkflowsTotal(e){this.userWorkflowsTotal=e,localStorage.setItem("userWorkflowsTotal",this.userWorkflowsTotal)},setUserWorkflows(e,t=!1){t?(this.userFastAccessWorkflows=e,localStorage.setItem("userFastAccessWorkflows",JSON.stringify(this.userFastAccessWorkflows))):(this.userWorkflows=e,localStorage.setItem("userWorkflows",JSON.stringify(this.userWorkflows)))},updateUserWorkflow(e,t=!1){t?(this.userFastAccessWorkflows=this.userFastAccessWorkflows.map(n=>n.wid===e.wid?e:n),localStorage.setItem("userFastAccessWorkflows",JSON.stringify(this.userFastAccessWorkflows))):(this.userWorkflows=this.userWorkflows.map(n=>n.wid===e.wid?e:n),localStorage.setItem("userWorkflows",JSON.stringify(this.userWorkflows)))},addUserWorkflow(e,t=!1){t?(this.userFastAccessWorkflows.unshift(e),localStorage.setItem("userFastAccessWorkflows",JSON.stringify(this.userFastAccessWorkflows))):(this.userWorkflows.unshift(e),localStorage.setItem("userWorkflows",JSON.stringify(this.userWorkflows)))},deleteUserWorkflow(e,t=!1){t?(this.userFastAccessWorkflows=this.userFastAccessWorkflows.filter(n=>n.wid!==e),localStorage.setItem("userFastAccessWorkflows",JSON.stringify(this.userFastAccessWorkflows))):(this.userWorkflows=this.userWorkflows.filter(n=>n.wid!==e),localStorage.setItem("userWorkflows",JSON.stringify(this.userWorkflows)))}}}),GMe="/assets/img1-7b85200e.svg",VMe="/assets/img2-ed5da84a.svg",YMe="/assets/img3-7a34b24a.svg",WMe="/assets/img4-06eb3a41.svg",qMe="/assets/img5-0ba7a57e.svg";function xgt(e,t){let n=e;if(t){n+="?";for(let r in t)n+=`${r}=${t[r]}&`;n=n.slice(0,-1)}return n}function KMe(e,t){return Math.floor(Math.random()*(t-e+1))+e}function jMe(){const e=KMe(1,5);return new URL(Object.assign({"/src/assets/imgs/basic-layout-background/img1.svg":GMe,"/src/assets/imgs/basic-layout-background/img2.svg":VMe,"/src/assets/imgs/basic-layout-background/img3.svg":YMe,"/src/assets/imgs/basic-layout-background/img4.svg":WMe,"/src/assets/imgs/basic-layout-background/img5.svg":qMe})[`/src/assets/imgs/basic-layout-background/img${e}.svg`],self.location).href}function wgt(e){const t=JSON.stringify(e);let n=0;for(let r=0;rsetTimeout(n,100)),await window.pywebview.api[e](t)}async function XMe(e,t){return await ul(`workflow__${e}`,t)}async function Igt(e,t){return await ul(`workflow_schedule_trigger__${e}`,t)}async function Ngt(e,t){return await ul(`workflow_template__${e}`,t)}async function Agt(e,t){return await ul(`workflow_tag__${e}`,t)}async function Dgt(e,t){return await ul(`workflow_run_record__${e}`,t)}function QMe(e){let t=!1;return Object.keys(e.data.template).forEach(n=>{e.data.template[n].show&&(t=!0)}),t}class ZMe{constructor(){this.nodes=new Set,this.edges={}}add_node(t){this.nodes.add(t),t in this.edges||(this.edges[t]=new Set)}add_edge(t,n){this.nodes.has(t)||this.add_node(t),this.nodes.has(n)||this.add_node(n),this.edges[t].add(n)}get_parents(t){let n=[];for(const[r,o]of Object.entries(this.edges))o.has(t)&&n.push(r);return n}get_children(t){return Array.from(this.edges[t])}get_all_nodes(){return Array.from(this.nodes)}topological_sort(){let t={};for(const o of this.nodes)t[o]=0;for(const[o,a]of Object.entries(this.edges))for(const i of a)t[i]+=1;let n=Object.keys(t).filter(o=>t[o]==0),r=[];for(;n.length>0;){let o=n.shift();r.push(o);for(const a of this.edges[o])t[a]-=1,t[a]==0&&n.push(a)}if(r.length!=this.nodes.size)throw new Error("The graph contains cycles");return r}}const Pgt=e=>{const t={noCycle:!0,noIsolatedNodes:!0};let n=new ZMe;e.data.nodes.forEach(o=>{o.category!="triggers"&&n.add_node(o.id)}),e.data.edges.forEach(o=>{n.add_edge(o.source,o.target)});try{n.topological_sort(),t.noCycle=!0}catch{t.noCycle=!1}const r=e.data.nodes.filter(o=>o.category!="triggers").map(o=>o.id);return e.data.edges.forEach(o=>{const a=r.indexOf(o.target);a>=0&&r.splice(a,1);const i=r.indexOf(o.source);i>=0&&r.splice(i,1)}),r.length>0&&(t.noIsolatedNodes=!1),t},JMe=async(e,t=!1)=>{const n=await XMe("list",{need_fast_access:t});if(n.status==200){const r=n.data.workflows.map(a=>(a.create_time=new Date(a.create_time).toLocaleString(),a.update_time=new Date(a.update_time).toLocaleString(),a));e.setUserWorkflows(r);const o=n.data.fast_access_workflows.map(a=>(a.create_time=new Date(a.create_time).toLocaleString(),a.update_time=new Date(a.update_time).toLocaleString(),a));e.setUserWorkflows(o,!0),e.setUserWorkflowsTotal(n.data.total)}else ju.error(n.msg)},Lk=["typography-paragraph"],Mgt=e=>{var s,c,u,d,p,f;let t=((c=(s=e.data)==null?void 0:s.ui)==null?void 0:c.inputFields)||[],n=JSON.parse(JSON.stringify(t)),r=((d=(u=e.data)==null?void 0:u.ui)==null?void 0:d.outputNodes)||[],o=JSON.parse(JSON.stringify(r)),a=((f=(p=e.data)==null?void 0:p.ui)==null?void 0:f.triggerNodes)||[],i=JSON.parse(JSON.stringify(a)),l=[];return e.data.nodes.forEach(_=>{if(_.category=="triggers"){a.push(_);const m=i.findIndex(v=>v.id==_.id);i.splice(m,1)}else if(_.category=="outputs"){if(_.type=="Text"){if(!_.data.template.text.show)return}else if(_.type=="Audio"){if(!_.data.template.show_player.value)return}else if(_.type=="Mindmap"){if(!_.data.template.show_mind_map.value)return}else if(_.type=="Mermaid"){if(!_.data.template.show_mermaid.value)return}else if(_.type=="Echarts"){if(!_.data.template.show_echarts.value)return}else if(_.field_type!="typography-paragraph")if(_.type=="WorkflowInvokeOutput"){l.push(_);return}else return;const m=r.findIndex(v=>v.id==_.id);if(m>=0){r.splice(m,1,_);const v=o.findIndex(h=>h.id==_.id);o.splice(v,1)}else r.push(_)}else{if(!_.data.has_inputs&&QMe(_))return;Object.keys(_.data.template).forEach(m=>{if(_.data.template[m].show){const v=JSON.parse(JSON.stringify(_.data.template[m]));v.category=_.category,v.nodeId=_.id,v.fieldName=m,Object.defineProperty(v,"value",{get(){return _.data.template[m].value},set(b){_.data.template[m].value=b}});const h=t.findIndex(b=>b.nodeId==_.id&&b.fieldName==m);if(h>=0){t.splice(h,1,v);const b=n.findIndex(E=>E.nodeId==_.id&&E.fieldName==m);n.splice(b,1)}else t.push(v)}})}}),n.filter(_=>!Lk.includes(_.field_type)).forEach(_=>{const m=t.findIndex(v=>v.nodeId==_.nodeId&&v.fieldName==_.fieldName);t.splice(m,1)}),o.filter(_=>!Lk.includes(_.field_type)).forEach(_=>{const m=r.findIndex(v=>v.id==_.id);r.splice(m,1)}),i.forEach(_=>{const m=a.findIndex(v=>v.id==_.id);a.splice(m,1)}),{inputFields:t,outputNodes:r,triggerNodes:a,workflowInvokeOutputNodes:l}};async function om(e,t){return await ul(`setting__${e}`,t)}const kk="/assets/logo-4413dbc1.svg";function dz(e,t,n){const r=e(n),o=t("router.base");return r?`${t(n)} - ${o}`:`${o}`}const e$e={lang:"中文",meta:{title:"向量脉络",description:"基于 AI 的知识库 + 工作流管理系统"},router:{base:"向量脉络",basic:{children:{index:"首页"}},workspace:{children:{workflow_space:"我的工作流空间",data_space:"我的数据空间",workflow_main:"工作流主页",workflow_use:"工作流使用",workflow_template:"工作流模板",database_detail:"数据库详情",database_object_create:"创建对象",database_object_detail:"数据库对象详情"}},account:{children:{info:"我的账号信息",settings:"我的账号设置"}},user:{children:{login:"登录",register:"注册",register_result:"注册结果"}}},common:{vector_vein:"向量脉络",time_length:"{hours}小时{minutes}分钟",refresh:"刷新",index:"首页",update_log:"更新日志",my:"我的",all:"全部",add:"添加",create:"创建",delete:"删除",status:"状态",tags:"标签",action:"操作",output:"输出",support_inquiries:"问题咨询:",notice:"注意",ok:"好的",save:"保存",pay_channel:"支付方式",credits:"积分",total_price:"总价格",total_credits:"总积分",bonus_credits:"奖励积分",available_credits:"可用积分",pay:"付款",warning:"警告",copy_success:"复制成功",alipay:"支付宝",wechatpay:"微信支付",create_time:"创建时间",update_time:"更新时间",update_time_format:"更新时间: {time}",back:"返回",previous_step:"上一步",next_step:"下一步",preview:"预览"},email:{verify:{email_verify_success:"邮箱验证成功!",email_verify_success_subtitle:"您的邮箱验证成功,快来试用一下吧!",check_control_panel:"查看控制台",email_verify_failed:"邮箱验证失败!",email_verify_failed_subtitle:"验证链接有误,请重新检查并刷新",email_verify_expired_subtitle:"链接已超时,请重新发送",resend_email:"重新发送邮件",email_already_verified:"邮箱已验证!",email_already_verified_subtitle:"该链接已验证,请直接登陆",please_verify_your_email:"请验证您的邮箱",please_verify_your_email_subtitle:"为保证您的账号安全,我们需要确认您的邮箱地址:",sending_failed:"发送失败",too_frequently_resend:"您的邮件发送过于频繁,请稍后再试",sending_successfull:"发送成功",please_relogin_after_verify:"验证成功后请重新登录网站"}},userAuth:{common:{please_enter:"请输入",username:"用户名",email:"Email电子邮箱",mobile:"手机",verification_code:"验证码",send_verification_code:"发送验证码",password:"密码",login:"登录",logout:"登出",or:"或",register:"注册新账号",sign_up:"注册新账号",ref_code:"邀请码(可选)",error:"服务器错误"},login:{please_enter_username:"请输入手机号或用户名",please_enter_email:"请输入邮箱",please_enter_password:"请输入密码",remember_account:"记住账号",forget_password:"忘记密码",account_not_exists_title:"密码错误或账号不存在",account_not_exists_content:"请检查账号密码是否正确或注册新账号",mobileLogin:"手机号登录",wechatLogin:"微信登录",email_login:"邮箱登录"},register:{region_search_or_select:"请搜索或选择您的区域",please_select_your_region:"请选择您的区域",human_verification_error:"人机验证失败!",connection_error:"连接错误!",email_already_exists:"该邮箱已注册,请直接登录",username_already_exists:"该用户名已被使用",register_success:"注册成功,请验证邮件"},registerResult:{check_email:"查看邮箱",back_to_login:"返回登录",verification_email_sent:"激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。",your_email_account_register_success:"你的账户:{email} 注册成功"},forgetPassword:{verify_email:"验证邮箱",enter_new_password:"输入新密码",verify:"验证",verification_code_send_success:"验证码已发送",human_verification_error:"人机验证失败!",connection_error:"连接错误!",email_not_exists:"该邮箱未注册",reset_password:"重置密码",reset_success:"重置密码成功"}},userAccount:{accountInfo:{my_account:"我的账号",my_credits:"我的积分"},accountSettings:{account_email:"账号邮箱",account_settings:"账号设置"}},workspace:{workflowSpace:{workflow_index:"工作流首页",user_fast_access_workflows:"快速访问工作流",add_new_workflow:"新建工作流",new_workflow:"新工作流",share_workflow:"分享",clone_workflow:"克隆",clone_success:"克隆成功",clone_failed:"克隆失败",add_to_fast_access:"添加到快速访问",add_to_fast_access_confirm:"确认添加该工作流到快速访问?",delete_from_fast_access:"从快速访问删除",delete_from_fast_access_confirm:"确认从快速访问删除该工作流?",add_to_fast_access_success:"添加到快速访问成功",add_to_fast_access_failed:"添加到快速访问失败",delete_from_fast_access_success:"从快速访问删除成功",delete_from_fast_access_failed:"从快速访问删除失败",update_time:"更新时间: {time}",inputs:"输入",outputs:"输出",triggers:"触发器",run:"运行",edit:"编辑",delete:"删除",delete_confirm:"确认删除该工作流?",delete_success:"删除成功",delete_failed:"删除失败",save_success:"保存成功",save_failed:"保存失败",workflow_cant_invoke_itself:"工作流不能调用自身",get_workflow_failed:"获取工作流失败",get_workflow_record_failed:"获取工作流运行记录失败",submit_workflow_success:"已提交工作流运行请求",submit_workflow_failed:"提交工作流运行请求失败",run_workflow_success:"运行工作流成功",run_workflow_failed:"运行工作流失败",update_schedule_success:"更新定时设置成功",update_schedule_failed:"更新定时设置失败",delete_schedule_trigger_confirm:"确认删除该定时设置?",delete_schedule_success:"删除定时设置成功",delete_schedule_failed:"删除定时设置失败",brief:"简介",field_is_empty:"{field} 不能为空",record_status:"工作流运行记录状态: {status}",record_error_task:"出错任务: {task}",maximize_output:"最大化输出区域",normalize_output:"恢复输出区域尺寸"},workflowEditor:{exit_not_saved_confirm:"工作流尚未保存,确认退出?",save_and_exit:"保存并退出",exit_without_save:"不保存退出",workflow_info:"基本信息",workflow_canvas:"工作流画布",workflow_ui_design:"界面设计",tags:"标签",brief_info:"简介信息",brief_images:"简介图片",edit_code:"编辑代码",workflow_check_warning:"工作流检查警告",workflow_has_no_inputs:"工作流没有输入(请勾选需要显示在使用界面的字段)",workflow_has_no_outputs:"工作流没有输出(请从输出里面拖拽一个节点到画布上并连接)",workflow_has_no_triggers:"工作流没有触发器(请从触发器里面拖拽一个节点到画布上并连接)",workflow_has_cycles:"工作流连线存在环路,请确保各个节点的连接不会形成一个环",workflow_has_isolated_nodes:"工作流中存在孤立节点,请确保除了触发器节点以外各个节点都与其他节点连接"},workflowSpaceMain:{my_workflows:"我的工作流",workflow_title:"工作流",tags:"标签",tags_filter:"标签筛选",update_time:"更新时间",create_workflow:"创建工作流",official_workflow_template:"官方工作流模板",community_workflow_template:"社区分享工作流模板",input_search_text:"输入待搜索的标题、简介等信息",reset_search:"重置搜索",no_workflows_1:"你还没有添加或创建工作流",no_workflows_2:"到这里添加一个工作流看看吧"},workflowTemplate:{template:"模板",add_to_my_workflows:"添加到我的工作流",add_success:"添加成功",add_failed:"添加失败",author:"作者: {author}",used_count:"{count} 人已使用",workflow_template_tags:"工作流模板标签",edit_template:"编辑模板",update_success:"更新成功",update_failed:"更新失败"},dataSpace:{create:"新建",create_success:"创建成功",create_failed:"创建失败",database_name:"数据库名称",status_invalid:"无效",status_expired:"已过期",status_deleted:"已删除",status_valid:"有效",status_error:"错误",status_creating:"创建中",status_deleting:"删除中",delete:"删除",delete_confirm:"确认删除该数据库?删除后不可恢复!",delete_success:"删除成功",delete_failed:"删除失败"},databaseDetail:{add_object:"添加数据",object_title:"数据名称",object_source_url:"来源链接",object_type:"数据类型",add_method:"添加方式",add_method_url:"从链接抓取",add_method_files:"上传文件",add_method_text:"输入文本",crawl_data_from_url:"从链接爬取数据",use_oversea_crawler:"使用海外爬虫节点",object_content:"数据内容",content_empty:"内容为空!",create_success:"添加成功",create_failed:"添加失败",delete_success:"删除成功",delete_failed:"删除失败",check_detail_data:"查看详细数据",source_url:"来源链接",data_type:"数据类型",data_type_TEXT:"文本",data_type_IMAGE:"图片",data_type_AUDIO:"音频",data_type_VIDEO:"视频",data_type_OTHER:"其他",delete_confirm:"确认删除该数据?",delete:"删除"},databaseObjectCreate:{add_object:"添加数据",add_method:"添加方式",add_method_url:"从链接抓取",add_method_files:"上传文件",add_method_text:"输入文本",split_method:"分割方式",split_method_general:"通用分割",split_method_delimeter:"分隔符分割",split_method_markdown:"Markdown 分割",split_method_table:"表格分割",chunk_length:"分段长度",remove_url_and_email:"移除链接和邮箱",use_oversea_crawler:"使用海外爬虫节点",object_source_url:"来源链接",object_files:"文件",object_title:"数据名称",object_content:"数据内容",process_rules:"处理规则",delimiter:"分隔符",finish:"完成",content_empty:"内容为空!",create_success:"添加成功",create_failed:"添加失败",question:{chunk_length:{1:"分段长度表示将文本按照多长进行分段,比如 1000 表示每 1000 个字符分成一段。",2:"向量数据库在进行搜索时会找到最相关的段落返回回来。",3:"注意这里的分段长度不是严格遵守的,而是大致接近。"}}},databaseObjectDetail:{source_url:"来源链接",segments:"分段内容",full_document:"完整文档",params_info:"参数信息",segment_index:"分段索引",segment_text:"文本",segment_keywords:"关键词",segment_tokens:"Token 数",segment_word_counts:"字符数",paragraph_counts:"段落数",word_counts:"字符数"}},components:{layout:{basicHeader:{workflow_space:"工作流",data_space:"数据集"},settingDrawer:{open:"打开设置",close:"关闭设置",save:"保存设置",save_success:"保存成功",my_setting:"我的设置",openai_api_type:"OpenAI API 类型",openai:"OpenAI",azure:"Azure",openai_api_key:"OpenAI API Key",openai_api_base:"OpenAI API Base",openai_chat_engine:"OpenAI Chat Engine",openai_embedding_engine:"OpenAI Embedding Engine",chatglm6b_api_base:"ChatGLM-6B API Base",output_folder:"输出文件夹",select_folder:"选择文件夹",email_settings:"邮件设置",email_user:"邮箱账号",email_password:"邮箱密码",email_smtp_host:"发信服务器",email_smtp_port:"发信端口号",email_smtp_ssl:"SMTP SSL",pexels_api_key:"Pexels API Key",stable_diffusion_base_url:"Stable Diffusion URL",use_system_proxy:"使用系统代理"},helpDropdown:{help:"帮助",about:"关于",documentation:"文档",software_update:"软件更新",check_update:"检查更新",update_available:"有新版本可用",new_version:"新版本 {version} {releaseDatetime}",about_vectorvein:"关于向量脉络",about_vectorvein_description:`### 利用 AI 的力量构建您的自动化工作流程 #### 无需编程,只需拖拽即可创建强大的工作流,自动化所有任务。 -向量脉络(VectorVein)开源版由 Maker毕 开发,可用于个人使用,不可用于商业使用。`}},markdownEditor:{raw_text:"无格式文本",markdown_text:"Markdown 文本"},workspace:{workflowEditor:{add_node:"添加节点",add_tag:"添加标签",brief_editor:"描述编辑器",brief_images:"图片"},uiDesign:{"typography-paragraph":{title:"文字内容",placeholder:"支持 Markdown 语法,在使用界面中会被直接渲染",tip:"可用于在使用界面中放置提示性信息"}},uploaderFieldUse:{upload:"上传",upload_success:"{file} 上传成功",upload_failed:"{file} 上传失败",uploader_text:"点击或拖拽文件到此区域上传",uploader_hint:"目前支持的文件类型:{fileTypes}"},mindmapRenderer:{download_svg:"下载 SVG"},echartsRenderer:{download_image:"下载图片"},newWorkflowModal:{create_new_workflow:"创建新工作流",empty_workflow:"新建空工作流"},shareWorkflowModal:{share_workflow:"分享工作流",title:"标题",brief:"描述",brief_min_require:"描述至少{count}个字符",brief_hint1:"介绍该工作流的用途、输入输出等信息,以便其他用户更好地了解该工作流。",brief_hint2:"支持 Markdown 格式。",share_to_community:"分享到社区",share_to_community_brief:"分享到社区后,其他用户可以在社区中搜索到该工作流。否则仅可通过分享链接访问。",share_success:"分享成功"},tagInput:{select_tags:"选择标签"},workflowRunRecordsDrawer:{workflows_run_records:"工作流运行记录",my_workflows_run_records:"我的工作流运行记录",start_time:"开始时间",end_time:"结束时间",used_credits:"消耗积分",status:"状态",status_not_started:"未开始",status_queued:"排队中",status_running:"运行中",status_finished:"已完成",status_failed:"运行失败",check_record:"查看记录",check_record_and_error_task:"查看记录及错误任务",workflow_title:"工作流标题"},vueFlowStyleSettings:{title:"风格设置",edge_type:"连线类型",edge_type_bezier:"贝塞尔曲线",edge_type_step:"直角台阶",edge_type_smoothstep:"圆角台阶",edge_type_straight:"直线",edge_animated:"连线动画"}},codeEditorModal:{title:"代码编辑器",please_enter_code:"请输入代码,函数名固定为 main,输入参数与设定名称请一致。",copy_code:"复制代码",copy_success:"复制成功"},templateEditorModal:{title:"模板编辑器",variable_fields:"变量字段",template:"模板",drag_to_insert:"拖拽插入"},nodes:{common:{input:"输入",output:"输出"},baseNode:{document_link:"文档链接",clone_node:"克隆节点",delete_node:"删除节点"},baseField:{show_in_use_interface:"是否在使用界面显示",show:"显示",hide:"隐藏"},listField:{add_item:"添加项"},assistedNodes:{title:"辅助节点",CommentNode:{title:"注释节点",description:"用于添加注释,不会对工作流运行产生任何影响。",comment:"注释"}},fileProcessing:{title:"文件处理",FileLoader:{title:"读取文件",description:"读取文件内容。",files:"文件",output:"输出"}},textProcessing:{title:"文本处理",TemplateCompose:{title:"文本合成",description:"将多个变量合成为一段文字。",template:"模板",output:"输出",add_field:"添加变量",add_field_type:"输入类型",field_type_input:"单行输入框",field_type_textarea:"多行输入框",field_type_select:"列表选择输入",add_field_display_name:"显示名称",add_field_list_options:"列表选项",click_to_add_to_template:"点击可将变量添加到模板",open_template_editor:"打开模板编辑器"},MarkdownToHtml:{title:"MD 转 HTML",description:"将 Markdown 格式的文本转换为 HTML 格式。",markdown:"Markdown",html:"HTML"},TextSplitters:{title:"文本分割",description:"将文本按照指定的方法分割成多个文本。",text:"文本",split_method:"分割方法",split_method_general:"通用分割",split_method_delimiter:"分隔符分割",split_method_markdown:"Markdown 分割",delimiter:"分隔符",chunk_length:"分割长度",chunk_overlap:"分割重叠",output:"输出"},ListRender:{title:"列表渲染",description:"将列表渲染成文本。",list:"列表",add_item:"添加项",separator:"合并项分隔符",output_type:"输出类型",output_type_text:"文本",output_type_list:"列表",output:"输出"},TextInOut:{title:"文本输入输出",description:"将输入的文本原样输出。用于多个地方需要同样的文本时。",text:"文本",output:"输出"},TextTruncation:{title:"文本截断",description:"将文本截取为指定长度。",text:"文本",truncate_method:"截取方法",truncate_method_general:"通用截取",truncate_method_markdown:"Markdown 截取",truncate_length:"截取长度",floating_range:"浮动范围",output:"输出"}},llms:{title:"AI模型",OpenAI:{title:"OpenAI",description:"OpenAI 是一个非营利性的研究机构,致力于推动人工智能的安全发展。OpenAI 的研究团队由世界顶级的人工智能专家组成,他们致力于开发人工智能技术,以解决人类面临的最重要的挑战。",prompt:"输入内容(Prompt)",llm_model:"模型",temperature:"AI 偏好(温度)",creative:"创意",balanced:"平衡",precise:"精准",output:"输出"},ChatGLM:{title:"ChatGLM",description:"ChatGLM 系列模型,通过注入代码预训练,有监督微调等技术对齐人类意图,具备问答、多轮对话、代码生成等能力。",prompt:"输入内容(Prompt)",llm_model:"模型",temperature:"AI 偏好(温度)",creative:"创意",balanced:"平衡",precise:"精准",output:"输出"}},imageGeneration:{title:"图像生成",StableDiffusion:{title:"Stable Diffusion",description:"Stable Diffusion 是2022年发布的深度学习文本到图像生成模型。",prompt:"提示词",negative_prompt:"负面提示词",model:"模型",cfg_scale:"提示遵循强度",sampler:"采样器",width:"宽度",height:"高度",output_type:"输出类型",output_type_only_link:"仅路径",output_type_markdown:"Markdown",output_type_html:"HTML",output:"输出"}},outputs:{title:"输出",Text:{title:"文本呈现",description:"用于在用户使用界面呈现文本。",text:"文本内容",output_title:"文本标题(用于在使用界面区分模块)",render_markdown:"渲染 Markdown",output:"输出"},Email:{title:"邮件",description:"用于发送邮件。",to_email:"收件人",subject:"主题",content_html:"内容(HTML)"},Document:{title:"文档",description:"用于生成文档文件。",file_name:"文件名",content:"内容(文本类建议输入 Markdown 格式内容)",export_type:"文档类型",output_type:"输出类型",output_type_only_path:"仅生成文件路径",output_type_markdown:"Markdown",output_type_html:"HTML",show_local_file:"显示本地文件",output:"输出"},Audio:{title:"音频",description:"用于生成音频文件。",content:"文字内容",show_player:"显示播放器",output_type:"输出类型",output_type_only_link:"仅下载链接文字",output_type_markdown:"Markdown",output_type_html:"HTML",output:"输出"},Mindmap:{title:"思维导图",description:"用于生成思维导图。",content:"Markdown 内容",show_mind_map:"显示思维导图",output_type:"输出类型",output:"输出"},Mermaid:{title:"Mermaid",description:"用于生成 Mermaid 图表。",content:"Mermaid 内容",show_mermaid:"显示 Mermaid",output_type:"输出类型",output:"输出"},Echarts:{title:"图表",description:"用于生成 Echarts 图表。",option:"Echarts 配置项",show_echarts:"显示图表",output_type:"输出类型",output:"输出"},WorkflowInvokeOutput:{title:"工作流调用输出",description:"用于被工作流调用节点调用时显示的输出,不显示在使用界面。",value:"数据",display_name:"显示名称"}},webCrawlers:{title:"网络爬虫",TextCrawler:{title:"文本爬虫",description:"用于爬取网页中的文本。",url:"网址",output_type:"输出类型",text:"文本",json:"JSON",use_oversea_crawler:"使用海外爬虫(速度较慢)",output_text:"网页正文文本",output_title:"网页标题"},BilibiliCrawler:{title:"Bilibili爬虫",description:"用于爬取 Bilibili 视频信息。",url_or_bvid:"视频网址或 BVID",output_type:"输出类型",str:"文本",list:"列表",output_subtitle:"字幕",output_title:"标题"},YoutubeCrawler:{title:"Youtube爬虫",description:"用于爬取 Youtube 视频信息。",url_or_video_id:"视频网址或视频 ID",output_type:"输出类型",str:"文本",list:"列表",output_subtitle:"字幕",output_title:"标题"}},triggers:{title:"触发器",ButtonTrigger:{title:"按钮触发器",description:"用于触发工作流运行,作为特殊节点,可以不需要与其它节点连接。",button_text:"按钮文字",run:"运行",output:"输出"},ScheduleTrigger:{title:"定时触发器",description:"用于定时触发工作流运行。",schedule:"定时",schedule_settings:"定时设置",save_schedule_settings:"保存定时设置",output:"输出"}},vectorDb:{title:"向量数据库",AddData:{title:"添加数据",description:"用于向向量数据库中添加数据。",text:"文本",content_title:"标题",source_url:"来源网址",data_type:"数据类型",database:"数据库",split_method:"分割方法",split_method_general:"通用分割",chunk_length:"分割长度",output:"输出",object_id:"数据对象ID"},DeleteData:{title:"删除数据",description:"用于向向量数据库中删除数据。",object_id:"数据对象 ID",database:"数据库",delete_success:"删除成功"},Search:{title:"搜索数据",description:"用于搜索向量数据库中的数据。",search_text:"搜索文本",data_type:"数据类型",database:"数据库",count:"搜索结果数量",output_type:"输出类型",text:"文本",list:"列表",output:"输出"}},tools:{title:"工具",ProgrammingFunction:{title:"编程函数",description:"用于执行编程函数。",language:"编程语言",code:"代码",open_editor:"打开代码编辑器",add_parameter:"添加输入参数",add_parameter_type:"参数类型",parameter_type_str:"字符串",parameter_type_int:"整数",parameter_type_float:"浮点数",parameter_type_bool:"布尔值",parameter_type_list:"列表",add_parameter_name:"参数名称",list_input:"列表形式输入",output:"输出"},ImageSearch:{title:"图片搜索",description:"用于搜索图片。",search_text:"搜索词",search_engine:"搜索引擎",search_engine_bing:"Bing",search_engine_pexels:"Pexels",count:"搜索结果数量",output_type:"输出类型",output_type_text:"文本",output_type_markdown:"Markdown",output:"输出"},WorkflowInvoke:{title:"工作流调用",description:"用于调用工作流并获取结果。",select_workflow:"选择工作流",selected_workflow:"已选择工作流",workflow_id:"工作流 ID",fail_all:"该节点失败则工作流整体失败",list_input:"列表形式输入",workflow_fields:"工作流字段"}},controlFlows:{title:"控制流",Empty:{title:"空节点",description:"用于需要确保工作流顺序执行的情况。",input:"输入",output:"输出(不改变被连接节点的值)"},Conditional:{title:"条件判断",description:"用于根据条件判断执行不同的操作。",field_type:"数据类型",field_type_string:"字符串",field_type_number:"数字",left_field:"左侧数据",right_field:"右侧数据",operator:"条件判断运算符",operator_equal:"等于",operator_not_equal:"不等于",operator_greater_than:"大于",operator_less_than:"小于",operator_greater_than_or_equal:"大于等于",operator_less_than_or_equal:"小于等于",operator_include:"左边包含右边",operator_not_include:"左边不包含右边",operator_is_empty:"为空",operator_is_not_empty:"不为空",operator_starts_with:"左边以右边开头",operator_ends_with:"左边以右边结尾",true_output:"满足条件时的输出",false_output:"不满足条件时的输出",output:"输出"},RandomChoice:{title:"随机选择",description:"用于从列表中随机选择一个元素。",input:"输入",output:"输出"},JsonProcess:{title:"JSON 处理",description:"用于处理 JSON 或 Python 的字典数据。",input:"输入",process_mode:"处理模式",process_mode_get_value:"根据 Key 获取值",process_mode_list_values:"列表形式列出所有值",process_mode_list_keys:"列表形式列出所有 Key",key:"Key",default_value:"默认值(当 Key 不存在时)",output:"输出"}}}},layouts:{workspaceLayout:{tour:{workflow_button_title:"切换工作流界面",workflow_button_description:"点击此按钮可以切换到工作流界面。您的工作流以及官方模板等均可在此找到。",database_button_title:"切换知识库/数据库界面",database_button_description:"点击此按钮可以切换到数据界面。您可以在此创建您的个人知识库并上传您的数据以在工作流中使用。"}}}},t$e={lang:"English",meta:{title:"VectorVein",description:"A brand new knowledge base + workflow management system"},router:{base:"VectorVein",basic:{children:{index:"Index"}},workspace:{children:{workflow_space:"My workflow space",data_space:"My data space",workflow_main:"Workflow main",workflow_use:"Workflow use",workflow_template:"Workflow template",database_detail:"Database detail",database_object_create:"Database object create",database_object_detail:"Database object detail"}},account:{children:{info:"My Account Info",settings:"My Account Settings"}},user:{children:{login:"Login",register:"Register",register_result:"Register result"}}},common:{vector_vein:"VectorVein",time_length:"{hours} Hours {minutes} Minutes",refresh:"Refresh",index:"Index",update_log:"Update log",my:"My",all:"All",add:"Add",create:"Create",delete:"Delete",status:"Status",tags:"Tags",action:"Action",output:"Output",support_inquiries:"Support inquiries: ",notice:"Notice",ok:"OK",save:"Save",pay_channel:"Payment method",credits:"Credits",total_price:"Total price",total_credits:"Total credits",bonus_credits:"Bonus credits",available_credits:"Available credits",pay:"Pay",warning:"Warning",copy_success:"Copy success",alipay:"Alipay",wechatpay:"Wechatpay",create_time:"Create time",update_time:"Update time",update_time_format:"Update time: {time}",back:"Back",previous_step:"Previous step",next_step:"Next step",preview:"Preview"},email:{verify:{email_verify_success:"Email verify success!",email_verify_success_subtitle:"Your email has been verified successfully, check the courses now!",check_control_panel:"Check control panel",email_verify_failed:"Email verify failed!",email_verify_failed_subtitle:"There is an error in the verification link, please recheck and refresh.",email_verify_expired_subtitle:"This link has expired. Please resend the verification email.",resend_email:"Resend email",email_already_verified:"Email already verified!",email_already_verified_subtitle:"This link is verified, please login directly",please_verify_your_email:"Please verify your email",please_verify_your_email_subtitle:"To keep your account safe, we need to verify your email address: ",sending_failed:"Sending failed",too_frequently_resend:"Your emails are being sent too often, please try again later",sending_successfull:"Sending successfull",please_relogin_after_verify:"Please re-login after successful verification"}},userAuth:{common:{please_enter:"Please enter ",username:"Username",email:"Email",mobile:"Mobile",verification_code:"Verification code",send_verification_code:"Send verification code",password:"Password",login:"Login",logout:"Logout",or:"or",register:"Register",sign_up:"Sign up",ref_code:"Referral code(optional)",error:"Server error"},login:{please_enter_username:"Please enter username",please_enter_email:"Please enter email",please_enter_password:"Please enter password",remember_account:"Remember me",forget_password:"Forget password",account_not_exists_title:"Password incorrect or account not exists",account_not_exists_content:"Please check if your account password is correct or register a new account.",mobileLogin:"Mobile login",wechatLogin:"Wechat login",email_login:"Email login"},register:{region_search_or_select:"Region (search or select)",please_select_your_region:"Please select your region",human_verification_error:"Human verification error!",connection_error:"Connection error!",email_already_exists:"Email already registered! Please login directly.",username_already_exists:"Username already used!",register_success:"Register success! Please verify your email."},registerResult:{check_email:"Check email",back_to_login:"Back to login",verification_email_sent:"The activation email has been sent to your email address, and the email is valid for 24 hours. Please log in to your mailbox in time and click the link in the email to activate your account.",your_email_account_register_success:"Your account {email} registered successfully!"},forgetPassword:{verify_email:"Verify email",enter_new_password:"Enter new password",verify:"Verify",verification_code_send_success:"Verification code sent",human_verification_error:"Human verification error!",connection_error:"Connection error!",email_not_exists:"Email not exists!",reset_password:"Reset password",reset_success:"Reset success! Please login."}},userAccount:{accountInfo:{my_account:"My account",my_credits:"My credits"},accountSettings:{account_email:"Account email",account_settings:"Account settings"}},workspace:{workflowSpace:{workflow_index:"Workflow index",user_fast_access_workflows:"Fast access workflows",add_new_workflow:"Add new workflow",new_workflow:"New workflow",share_workflow:"Share",clone_workflow:"Clone",clone_success:"Clone success",clone_failed:"Clone failed",add_to_fast_access:"Add to fast access",add_to_fast_access_confirm:"Confirm to add the workflow to fast access?",delete_from_fast_access:"Delete from fast access",delete_from_fast_access_confirm:"Confirm to delete the workflow from fast access?",add_to_fast_access_success:"Add to fast access success",add_to_fast_access_failed:"Add to fast access failed",delete_from_fast_access_success:"Delete from fast access success",delete_from_fast_access_failed:"Delete from fast access failed",update_time:"Update time: {time}",inputs:"Inputs",outputs:"Outputs",triggers:"Triggers",run:"Run",edit:"Edit",delete:"Delete",delete_confirm:"Confirm to delete the workflow?",delete_success:"Delete success",delete_failed:"Delete failed",save_success:"Save success",save_failed:"Save failed",workflow_cant_invoke_itself:"Workflow can't invoke itself",get_workflow_failed:"Get workflow failed",get_workflow_record_failed:"Get workflow record failed",submit_workflow_success:"Submit workflow request success",submit_workflow_failed:"Submit workflow request failed",run_workflow_success:"Run workflow success",run_workflow_failed:"Run workflow failed",update_schedule_success:"Update schedule success",update_schedule_failed:"Update schedule failed",delete_schedule_trigger_confirm:"Confirm to delete the schedule trigger?",delete_schedule_success:"Delete schedule success",delete_schedule_failed:"Delete schedule failed",brief:"Brief",field_is_empty:"{field} is empty",record_status:"Workflow run record status: {status}",record_error_task:"Error task: {task}",maximize_output:"Maximize output area",normalize_output:"Restore output area size"},workflowEditor:{exit_not_saved_confirm:"Workflow not saved, confirm exit?",save_and_exit:"Save and exit",exit_without_save:"Exit without save",workflow_info:"Basic info",workflow_canvas:"Workflow canvas",workflow_ui_design:"UI design",tags:"Tags",brief_info:"Brief info",brief_images:"Brief images",edit_code:"Edit code",workflow_check_warning:"Workflow check warning",workflow_has_no_inputs:"Workflow has no inputs (please check the fields you want to display in the use interface)",workflow_has_no_outputs:"Workflow has no outputs (please drag a node from the output to the canvas and connect it)",workflow_has_no_triggers:"Workflow has no triggers (please drag a node from the triggers to the canvas and connect it)",workflow_has_cycles:"The workflow connection has a cycle, please make sure that the connection of each node will not form a cycle",workflow_has_isolated_nodes:"There are isolated nodes in the workflow, please make sure that all nodes except the trigger node are connected to other nodes"},workflowSpaceMain:{my_workflows:"My workflows",workflow_title:"Workflow",tags:"Tags",tags_filter:"Tags filter",update_time:"Update time",create_workflow:"Create workflow",official_workflow_template:"Official workflow template",community_workflow_template:"Community workflow template",input_search_text:"Enter the title, brief, etc. to be searched",reset_search:"Reset",no_workflows_1:"You have not added or created a workflow yet",no_workflows_2:"Add a workflow here"},workflowTemplate:{template:"Template",add_to_my_workflows:"Add to my workflows",add_success:"Add success",add_failed:"Add failed",author:"Author: {author}",used_count:"{count} people have used",workflow_template_tags:"Workflow template tags",edit_template:"Edit template",update_success:"Update success",update_failed:"Update failed"},dataSpace:{create:"Create",create_success:"Create success",create_failed:"Create failed",database_name:"Database name",status_invalid:"Invalid",status_expired:"Expired",status_deleted:"Deleted",status_valid:"Valid",status_error:"Error",status_creating:"Creating",status_deleting:"Deleting",delete:"Delete",delete_confirm:"Confirm to delete the database? It cannot be restored after deletion!",delete_success:"Delete success",delete_failed:"Delete failed"},databaseDetail:{add_object:"Add object",object_title:"Object title",object_source_url:"Object source url",object_type:"Object type",add_method:"Add method",add_method_url:"Add from url",add_method_files:"Upload files",add_method_text:"Input text",crawl_data_from_url:"Crawl data from url",use_oversea_crawler:"Use oversea crawler",object_content:"Object content",content_empty:"Content empty!",create_success:"Add success",create_failed:"Add failed",delete_success:"Delete success",delete_failed:"Delete failed",check_detail_data:"Check detail data",source_url:"Source link",data_type:"Data type",data_type_TEXT:"Text",data_type_IMAGE:"Image",data_type_AUDIO:"Audio",data_type_VIDEO:"Video",data_type_OTHER:"Other",delete_confirm:"Confirm to delete this data?",delete:"Delete"},databaseObjectCreate:{add_object:"Add object",add_method:"Add method",add_method_url:"Add from url",add_method_files:"Upload files",add_method_text:"Input text",split_method:"Split method",split_method_general:"General split",split_method_delimeter:"Delimeter split",split_method_markdown:"Markdown split",split_method_table:"Table split",chunk_length:"Chunk length",remove_url_and_email:"Remove url and email",use_oversea_crawler:"Use oversea crawler",object_source_url:"Object source url",object_files:"Object files",object_title:"Object title",object_content:"Object content",process_rules:"Process rules",delimiter:"Delimiter",finish:"Finish",content_empty:"Content empty!",create_success:"Add success",create_failed:"Add failed",question:{chunk_length:{1:"The chunk length means that the text is divided into segments according to how long it is, for example, 1000 means that every 1000 characters are divided into one segment.",2:"The vector database will find the most relevant paragraph and return it when searching.",3:"Note that the paragraph length here is not strictly followed, but is roughly close."}}},databaseObjectDetail:{source_url:"Source link",segments:"Segments",full_document:"Full document",params_info:"Params info",segment_index:"Index",segment_text:"Text",segment_keywords:"Keywords",segment_tokens:"Tokens",segment_word_counts:"Counts",paragraph_counts:"Paragraph counts",word_counts:"Word counts"}},components:{layout:{basicHeader:{workflow_space:"Workflow",data_space:"Data"},settingDrawer:{open:"Open setting",close:"Close setting",save:"Save setting",save_success:"Save success",my_setting:"My setting",openai_api_type:"OpenAI API type",openai:"OpenAI",azure:"Azure",openai_api_key:"OpenAI API Key",openai_api_base:"OpenAI API Base",openai_chat_engine:"OpenAI Chat Engine",openai_embedding_engine:"OpenAI Embedding Engine",chatglm6b_api_base:"ChatGLM-6B API Base",output_folder:"Output folder",select_folder:"Select folder",email_settings:"Email settings",email_user:"Email user",email_password:"Email password",email_smtp_host:"SMTP host",email_smtp_port:"SMTP port",email_smtp_ssl:"SMTP SSL",pexels_api_key:"Pexels API Key",stable_diffusion_base_url:"Stable Diffusion URL",use_system_proxy:"Use system proxy"},helpDropdown:{help:"Help",about:"About",documentation:"Documentation",software_update:"Software update",check_update:"Check update",update_available:"Update available",new_version:"New version {version} {releaseDatetime}",about_vectorvein:"About VectorVein",about_vectorvein_description:`### Build Your Automated Workflow with the Power of AI +向量脉络(VectorVein)开源版由 Maker毕 开发,可用于个人使用,不可用于商业使用。`}},markdownEditor:{raw_text:"无格式文本",markdown_text:"Markdown 文本"},workspace:{workflowEditor:{add_node:"添加节点",add_tag:"添加标签",brief_editor:"描述编辑器",brief_images:"图片"},uiDesign:{"typography-paragraph":{title:"文字内容",placeholder:"支持 Markdown 语法,在使用界面中会被直接渲染",tip:"可用于在使用界面中放置提示性信息"}},uploaderFieldUse:{upload:"上传",upload_success:"{file} 上传成功",upload_failed:"{file} 上传失败",uploader_text:"点击或拖拽文件到此区域上传",uploader_hint:"目前支持的文件类型:{fileTypes}"},mindmapRenderer:{download_svg:"下载 SVG"},echartsRenderer:{download_image:"下载图片"},newWorkflowModal:{create_new_workflow:"创建新工作流",empty_workflow:"新建空工作流"},shareWorkflowModal:{share_workflow:"分享工作流",title:"标题",brief:"描述",brief_min_require:"描述至少{count}个字符",brief_hint1:"介绍该工作流的用途、输入输出等信息,以便其他用户更好地了解该工作流。",brief_hint2:"支持 Markdown 格式。",share_to_community:"分享到社区",share_to_community_brief:"分享到社区后,其他用户可以在社区中搜索到该工作流。否则仅可通过分享链接访问。",share_success:"分享成功"},tagInput:{select_tags:"选择标签"},workflowRunRecordsDrawer:{workflows_run_records:"工作流运行记录",my_workflows_run_records:"我的工作流运行记录",start_time:"开始时间",end_time:"结束时间",used_credits:"消耗积分",status:"状态",status_not_started:"未开始",status_queued:"排队中",status_running:"运行中",status_finished:"已完成",status_failed:"运行失败",check_record:"查看记录",check_record_and_error_task:"查看记录及错误任务",workflow_title:"工作流标题"},vueFlowStyleSettings:{title:"风格设置",edge_type:"连线类型",edge_type_bezier:"贝塞尔曲线",edge_type_step:"直角台阶",edge_type_smoothstep:"圆角台阶",edge_type_straight:"直线",edge_animated:"连线动画"}},codeEditorModal:{title:"代码编辑器",please_enter_code:"请输入代码,函数名固定为 main,输入参数与设定名称请一致。",copy_code:"复制代码",copy_success:"复制成功"},templateEditorModal:{title:"模板编辑器",variable_fields:"变量字段",template:"模板",drag_to_insert:"拖拽插入"},nodes:{common:{input:"输入",output:"输出"},baseNode:{document_link:"文档链接",clone_node:"克隆节点",delete_node:"删除节点"},baseField:{show_in_use_interface:"是否在使用界面显示",show:"显示",hide:"隐藏"},listField:{add_item:"添加项"},assistedNodes:{title:"辅助节点",CommentNode:{title:"注释节点",description:"用于添加注释,不会对工作流运行产生任何影响。",comment:"注释"}},fileProcessing:{title:"文件处理",FileLoader:{title:"读取文件",description:"读取文件内容。",files:"文件",output:"输出"}},textProcessing:{title:"文本处理",TemplateCompose:{title:"文本合成",description:"将多个变量合成为一段文字。",template:"模板",output:"输出",add_field:"添加变量",add_field_type:"输入类型",field_type_input:"单行输入框",field_type_textarea:"多行输入框",field_type_select:"列表选择输入",add_field_display_name:"显示名称",add_field_list_options:"列表选项",click_to_add_to_template:"点击可将变量添加到模板",open_template_editor:"打开模板编辑器"},MarkdownToHtml:{title:"MD 转 HTML",description:"将 Markdown 格式的文本转换为 HTML 格式。",markdown:"Markdown",html:"HTML"},TextSplitters:{title:"文本分割",description:"将文本按照指定的方法分割成多个文本。",text:"文本",split_method:"分割方法",split_method_general:"通用分割",split_method_delimiter:"分隔符分割",split_method_markdown:"Markdown 分割",delimiter:"分隔符",chunk_length:"分割长度",chunk_overlap:"分割重叠",output:"输出"},ListRender:{title:"列表渲染",description:"将列表渲染成文本。",list:"列表",add_item:"添加项",separator:"合并项分隔符",output_type:"输出类型",output_type_text:"文本",output_type_list:"列表",output:"输出"},TextInOut:{title:"文本输入输出",description:"将输入的文本原样输出。用于多个地方需要同样的文本时。",text:"文本",output:"输出"},TextTruncation:{title:"文本截断",description:"将文本截取为指定长度。",text:"文本",truncate_method:"截取方法",truncate_method_general:"通用截取",truncate_method_markdown:"Markdown 截取",truncate_length:"截取长度",floating_range:"浮动范围",output:"输出"}},llms:{title:"AI模型",OpenAI:{title:"OpenAI",description:"OpenAI 是一个非营利性的研究机构,致力于推动人工智能的安全发展。OpenAI 的研究团队由世界顶级的人工智能专家组成,他们致力于开发人工智能技术,以解决人类面临的最重要的挑战。",use_function_call:"使用函数调用",functions:"函数",function_call_mode:"函数调用方式",add_function:"添加函数",function_name:"函数名称",function_description:"函数描述",function_parameters:"函数参数",function_required_parameters:"必填参数",add_parameter:"添加参数",parameter_name:"参数名称",parameter_description:"参数描述",parameter_type:"参数类型",prompt:"输入内容(Prompt)",llm_model:"模型",temperature:"AI 偏好(温度)",creative:"创意",balanced:"平衡",precise:"精准",output:"输出",function_call_output:"函数调用输出"},ChatGLM:{title:"ChatGLM",description:"ChatGLM 系列模型,通过注入代码预训练,有监督微调等技术对齐人类意图,具备问答、多轮对话、代码生成等能力。",prompt:"输入内容(Prompt)",llm_model:"模型",temperature:"AI 偏好(温度)",creative:"创意",balanced:"平衡",precise:"精准",output:"输出"}},imageGeneration:{title:"图像生成",StableDiffusion:{title:"Stable Diffusion",description:"Stable Diffusion 是2022年发布的深度学习文本到图像生成模型。",prompt:"提示词",negative_prompt:"负面提示词",model:"模型",cfg_scale:"提示遵循强度",sampler:"采样器",width:"宽度",height:"高度",output_type:"输出类型",output_type_only_link:"仅路径",output_type_markdown:"Markdown",output_type_html:"HTML",output:"输出"}},outputs:{title:"输出",Text:{title:"文本呈现",description:"用于在用户使用界面呈现文本。",text:"文本内容",output_title:"文本标题(用于在使用界面区分模块)",render_markdown:"渲染 Markdown",output:"输出"},Email:{title:"邮件",description:"用于发送邮件。",to_email:"收件人",subject:"主题",content_html:"内容(HTML)"},Document:{title:"文档",description:"用于生成文档文件。",file_name:"文件名",content:"内容(文本类建议输入 Markdown 格式内容)",export_type:"文档类型",output_type:"输出类型",output_type_only_path:"仅生成文件路径",output_type_markdown:"Markdown",output_type_html:"HTML",show_local_file:"显示本地文件",output:"输出"},Audio:{title:"音频",description:"用于生成音频文件。",content:"文字内容",show_player:"显示播放器",output_type:"输出类型",output_type_only_link:"仅下载链接文字",output_type_markdown:"Markdown",output_type_html:"HTML",output:"输出"},Mindmap:{title:"思维导图",description:"用于生成思维导图。",content:"Markdown 内容",show_mind_map:"显示思维导图",output_type:"输出类型",output:"输出"},Mermaid:{title:"Mermaid",description:"用于生成 Mermaid 图表。",content:"Mermaid 内容",show_mermaid:"显示 Mermaid",output_type:"输出类型",output:"输出"},Echarts:{title:"图表",description:"用于生成 Echarts 图表。",option:"Echarts 配置项",show_echarts:"显示图表",output_type:"输出类型",output:"输出"},WorkflowInvokeOutput:{title:"工作流调用输出",description:"用于被工作流调用节点调用时显示的输出,不显示在使用界面。",value:"数据",display_name:"显示名称"}},webCrawlers:{title:"网络爬虫",TextCrawler:{title:"文本爬虫",description:"用于爬取网页中的文本。",url:"网址",output_type:"输出类型",text:"文本",json:"JSON",use_oversea_crawler:"使用海外爬虫(速度较慢)",output_text:"网页正文文本",output_title:"网页标题"},BilibiliCrawler:{title:"Bilibili爬虫",description:"用于爬取 Bilibili 视频信息。",url_or_bvid:"视频网址或 BVID",output_type:"输出类型",str:"文本",list:"列表",output_subtitle:"字幕",output_title:"标题"},YoutubeCrawler:{title:"Youtube爬虫",description:"用于爬取 Youtube 视频信息。",url_or_video_id:"视频网址或视频 ID",output_type:"输出类型",str:"文本",list:"列表",output_subtitle:"字幕",output_title:"标题"}},triggers:{title:"触发器",ButtonTrigger:{title:"按钮触发器",description:"用于触发工作流运行,作为特殊节点,可以不需要与其它节点连接。",button_text:"按钮文字",run:"运行",output:"输出"},ScheduleTrigger:{title:"定时触发器",description:"用于定时触发工作流运行。",schedule:"定时",schedule_settings:"定时设置",save_schedule_settings:"保存定时设置",output:"输出"}},vectorDb:{title:"向量数据库",AddData:{title:"添加数据",description:"用于向向量数据库中添加数据。",text:"文本",content_title:"标题",source_url:"来源网址",data_type:"数据类型",database:"数据库",split_method:"分割方法",split_method_general:"通用分割",chunk_length:"分割长度",output:"输出",object_id:"数据对象ID"},DeleteData:{title:"删除数据",description:"用于向向量数据库中删除数据。",object_id:"数据对象 ID",database:"数据库",delete_success:"删除成功"},Search:{title:"搜索数据",description:"用于搜索向量数据库中的数据。",search_text:"搜索文本",data_type:"数据类型",database:"数据库",count:"搜索结果数量",output_type:"输出类型",text:"文本",list:"列表",output:"输出"}},tools:{title:"工具",ProgrammingFunction:{title:"编程函数",description:"用于执行编程函数。",language:"编程语言",code:"代码",open_editor:"打开代码编辑器",add_parameter:"添加输入参数",add_parameter_type:"参数类型",parameter_type_str:"字符串",parameter_type_int:"整数",parameter_type_float:"浮点数",parameter_type_bool:"布尔值",parameter_type_list:"列表",add_parameter_name:"参数名称",list_input:"列表形式输入",output:"输出"},ImageSearch:{title:"图片搜索",description:"用于搜索图片。",search_text:"搜索词",search_engine:"搜索引擎",search_engine_bing:"Bing",search_engine_pexels:"Pexels",count:"搜索结果数量",output_type:"输出类型",output_type_text:"文本",output_type_markdown:"Markdown",output:"输出"},WorkflowInvoke:{title:"工作流调用",description:"用于调用工作流并获取结果。",select_workflow:"选择工作流",selected_workflow:"已选择工作流",workflow_id:"工作流 ID",fail_all:"该节点失败则工作流整体失败",list_input:"列表形式输入",workflow_fields:"工作流字段"}},controlFlows:{title:"控制流",Empty:{title:"空节点",description:"用于需要确保工作流顺序执行的情况。",input:"输入",output:"输出(不改变被连接节点的值)"},Conditional:{title:"条件判断",description:"用于根据条件判断执行不同的操作。",field_type:"数据类型",field_type_string:"字符串",field_type_number:"数字",left_field:"左侧数据",right_field:"右侧数据",operator:"条件判断运算符",operator_equal:"等于",operator_not_equal:"不等于",operator_greater_than:"大于",operator_less_than:"小于",operator_greater_than_or_equal:"大于等于",operator_less_than_or_equal:"小于等于",operator_include:"左边包含右边",operator_not_include:"左边不包含右边",operator_is_empty:"为空",operator_is_not_empty:"不为空",operator_starts_with:"左边以右边开头",operator_ends_with:"左边以右边结尾",true_output:"满足条件时的输出",false_output:"不满足条件时的输出",output:"输出"},RandomChoice:{title:"随机选择",description:"用于从列表中随机选择一个元素。",input:"输入",output:"输出"},JsonProcess:{title:"JSON 处理",description:"用于处理 JSON 或 Python 的字典数据。",input:"输入",process_mode:"处理模式",process_mode_get_value:"根据 Key 获取值",process_mode_list_values:"列表形式列出所有值",process_mode_list_keys:"列表形式列出所有 Key",key:"Key",default_value:"默认值(当 Key 不存在时)",output:"输出"}}}},layouts:{workspaceLayout:{tour:{workflow_button_title:"切换工作流界面",workflow_button_description:"点击此按钮可以切换到工作流界面。您的工作流以及官方模板等均可在此找到。",database_button_title:"切换知识库/数据库界面",database_button_description:"点击此按钮可以切换到数据界面。您可以在此创建您的个人知识库并上传您的数据以在工作流中使用。"}}}},t$e={lang:"English",meta:{title:"VectorVein",description:"A brand new knowledge base + workflow management system"},router:{base:"VectorVein",basic:{children:{index:"Index"}},workspace:{children:{workflow_space:"My workflow space",data_space:"My data space",workflow_main:"Workflow main",workflow_use:"Workflow use",workflow_template:"Workflow template",database_detail:"Database detail",database_object_create:"Database object create",database_object_detail:"Database object detail"}},account:{children:{info:"My Account Info",settings:"My Account Settings"}},user:{children:{login:"Login",register:"Register",register_result:"Register result"}}},common:{vector_vein:"VectorVein",time_length:"{hours} Hours {minutes} Minutes",refresh:"Refresh",index:"Index",update_log:"Update log",my:"My",all:"All",add:"Add",create:"Create",delete:"Delete",status:"Status",tags:"Tags",action:"Action",output:"Output",support_inquiries:"Support inquiries: ",notice:"Notice",ok:"OK",save:"Save",pay_channel:"Payment method",credits:"Credits",total_price:"Total price",total_credits:"Total credits",bonus_credits:"Bonus credits",available_credits:"Available credits",pay:"Pay",warning:"Warning",copy_success:"Copy success",alipay:"Alipay",wechatpay:"Wechatpay",create_time:"Create time",update_time:"Update time",update_time_format:"Update time: {time}",back:"Back",previous_step:"Previous step",next_step:"Next step",preview:"Preview"},email:{verify:{email_verify_success:"Email verify success!",email_verify_success_subtitle:"Your email has been verified successfully, check the courses now!",check_control_panel:"Check control panel",email_verify_failed:"Email verify failed!",email_verify_failed_subtitle:"There is an error in the verification link, please recheck and refresh.",email_verify_expired_subtitle:"This link has expired. Please resend the verification email.",resend_email:"Resend email",email_already_verified:"Email already verified!",email_already_verified_subtitle:"This link is verified, please login directly",please_verify_your_email:"Please verify your email",please_verify_your_email_subtitle:"To keep your account safe, we need to verify your email address: ",sending_failed:"Sending failed",too_frequently_resend:"Your emails are being sent too often, please try again later",sending_successfull:"Sending successfull",please_relogin_after_verify:"Please re-login after successful verification"}},userAuth:{common:{please_enter:"Please enter ",username:"Username",email:"Email",mobile:"Mobile",verification_code:"Verification code",send_verification_code:"Send verification code",password:"Password",login:"Login",logout:"Logout",or:"or",register:"Register",sign_up:"Sign up",ref_code:"Referral code(optional)",error:"Server error"},login:{please_enter_username:"Please enter username",please_enter_email:"Please enter email",please_enter_password:"Please enter password",remember_account:"Remember me",forget_password:"Forget password",account_not_exists_title:"Password incorrect or account not exists",account_not_exists_content:"Please check if your account password is correct or register a new account.",mobileLogin:"Mobile login",wechatLogin:"Wechat login",email_login:"Email login"},register:{region_search_or_select:"Region (search or select)",please_select_your_region:"Please select your region",human_verification_error:"Human verification error!",connection_error:"Connection error!",email_already_exists:"Email already registered! Please login directly.",username_already_exists:"Username already used!",register_success:"Register success! Please verify your email."},registerResult:{check_email:"Check email",back_to_login:"Back to login",verification_email_sent:"The activation email has been sent to your email address, and the email is valid for 24 hours. Please log in to your mailbox in time and click the link in the email to activate your account.",your_email_account_register_success:"Your account {email} registered successfully!"},forgetPassword:{verify_email:"Verify email",enter_new_password:"Enter new password",verify:"Verify",verification_code_send_success:"Verification code sent",human_verification_error:"Human verification error!",connection_error:"Connection error!",email_not_exists:"Email not exists!",reset_password:"Reset password",reset_success:"Reset success! Please login."}},userAccount:{accountInfo:{my_account:"My account",my_credits:"My credits"},accountSettings:{account_email:"Account email",account_settings:"Account settings"}},workspace:{workflowSpace:{workflow_index:"Workflow index",user_fast_access_workflows:"Fast access workflows",add_new_workflow:"Add new workflow",new_workflow:"New workflow",share_workflow:"Share",clone_workflow:"Clone",clone_success:"Clone success",clone_failed:"Clone failed",add_to_fast_access:"Add to fast access",add_to_fast_access_confirm:"Confirm to add the workflow to fast access?",delete_from_fast_access:"Delete from fast access",delete_from_fast_access_confirm:"Confirm to delete the workflow from fast access?",add_to_fast_access_success:"Add to fast access success",add_to_fast_access_failed:"Add to fast access failed",delete_from_fast_access_success:"Delete from fast access success",delete_from_fast_access_failed:"Delete from fast access failed",update_time:"Update time: {time}",inputs:"Inputs",outputs:"Outputs",triggers:"Triggers",run:"Run",edit:"Edit",delete:"Delete",delete_confirm:"Confirm to delete the workflow?",delete_success:"Delete success",delete_failed:"Delete failed",save_success:"Save success",save_failed:"Save failed",workflow_cant_invoke_itself:"Workflow can't invoke itself",get_workflow_failed:"Get workflow failed",get_workflow_record_failed:"Get workflow record failed",submit_workflow_success:"Submit workflow request success",submit_workflow_failed:"Submit workflow request failed",run_workflow_success:"Run workflow success",run_workflow_failed:"Run workflow failed",update_schedule_success:"Update schedule success",update_schedule_failed:"Update schedule failed",delete_schedule_trigger_confirm:"Confirm to delete the schedule trigger?",delete_schedule_success:"Delete schedule success",delete_schedule_failed:"Delete schedule failed",brief:"Brief",field_is_empty:"{field} is empty",record_status:"Workflow run record status: {status}",record_error_task:"Error task: {task}",maximize_output:"Maximize output area",normalize_output:"Restore output area size"},workflowEditor:{exit_not_saved_confirm:"Workflow not saved, confirm exit?",save_and_exit:"Save and exit",exit_without_save:"Exit without save",workflow_info:"Basic info",workflow_canvas:"Workflow canvas",workflow_ui_design:"UI design",tags:"Tags",brief_info:"Brief info",brief_images:"Brief images",edit_code:"Edit code",workflow_check_warning:"Workflow check warning",workflow_has_no_inputs:"Workflow has no inputs (please check the fields you want to display in the use interface)",workflow_has_no_outputs:"Workflow has no outputs (please drag a node from the output to the canvas and connect it)",workflow_has_no_triggers:"Workflow has no triggers (please drag a node from the triggers to the canvas and connect it)",workflow_has_cycles:"The workflow connection has a cycle, please make sure that the connection of each node will not form a cycle",workflow_has_isolated_nodes:"There are isolated nodes in the workflow, please make sure that all nodes except the trigger node are connected to other nodes"},workflowSpaceMain:{my_workflows:"My workflows",workflow_title:"Workflow",tags:"Tags",tags_filter:"Tags filter",update_time:"Update time",create_workflow:"Create workflow",official_workflow_template:"Official workflow template",community_workflow_template:"Community workflow template",input_search_text:"Enter the title, brief, etc. to be searched",reset_search:"Reset",no_workflows_1:"You have not added or created a workflow yet",no_workflows_2:"Add a workflow here"},workflowTemplate:{template:"Template",add_to_my_workflows:"Add to my workflows",add_success:"Add success",add_failed:"Add failed",author:"Author: {author}",used_count:"{count} people have used",workflow_template_tags:"Workflow template tags",edit_template:"Edit template",update_success:"Update success",update_failed:"Update failed"},dataSpace:{create:"Create",create_success:"Create success",create_failed:"Create failed",database_name:"Database name",status_invalid:"Invalid",status_expired:"Expired",status_deleted:"Deleted",status_valid:"Valid",status_error:"Error",status_creating:"Creating",status_deleting:"Deleting",delete:"Delete",delete_confirm:"Confirm to delete the database? It cannot be restored after deletion!",delete_success:"Delete success",delete_failed:"Delete failed"},databaseDetail:{add_object:"Add object",object_title:"Object title",object_source_url:"Object source url",object_type:"Object type",add_method:"Add method",add_method_url:"Add from url",add_method_files:"Upload files",add_method_text:"Input text",crawl_data_from_url:"Crawl data from url",use_oversea_crawler:"Use oversea crawler",object_content:"Object content",content_empty:"Content empty!",create_success:"Add success",create_failed:"Add failed",delete_success:"Delete success",delete_failed:"Delete failed",check_detail_data:"Check detail data",source_url:"Source link",data_type:"Data type",data_type_TEXT:"Text",data_type_IMAGE:"Image",data_type_AUDIO:"Audio",data_type_VIDEO:"Video",data_type_OTHER:"Other",delete_confirm:"Confirm to delete this data?",delete:"Delete"},databaseObjectCreate:{add_object:"Add object",add_method:"Add method",add_method_url:"Add from url",add_method_files:"Upload files",add_method_text:"Input text",split_method:"Split method",split_method_general:"General split",split_method_delimeter:"Delimeter split",split_method_markdown:"Markdown split",split_method_table:"Table split",chunk_length:"Chunk length",remove_url_and_email:"Remove url and email",use_oversea_crawler:"Use oversea crawler",object_source_url:"Object source url",object_files:"Object files",object_title:"Object title",object_content:"Object content",process_rules:"Process rules",delimiter:"Delimiter",finish:"Finish",content_empty:"Content empty!",create_success:"Add success",create_failed:"Add failed",question:{chunk_length:{1:"The chunk length means that the text is divided into segments according to how long it is, for example, 1000 means that every 1000 characters are divided into one segment.",2:"The vector database will find the most relevant paragraph and return it when searching.",3:"Note that the paragraph length here is not strictly followed, but is roughly close."}}},databaseObjectDetail:{source_url:"Source link",segments:"Segments",full_document:"Full document",params_info:"Params info",segment_index:"Index",segment_text:"Text",segment_keywords:"Keywords",segment_tokens:"Tokens",segment_word_counts:"Counts",paragraph_counts:"Paragraph counts",word_counts:"Word counts"}},components:{layout:{basicHeader:{workflow_space:"Workflow",data_space:"Data"},settingDrawer:{open:"Open setting",close:"Close setting",save:"Save setting",save_success:"Save success",my_setting:"My setting",openai_api_type:"OpenAI API type",openai:"OpenAI",azure:"Azure",openai_api_key:"OpenAI API Key",openai_api_base:"OpenAI API Base",openai_chat_engine:"OpenAI Chat Engine",openai_embedding_engine:"OpenAI Embedding Engine",chatglm6b_api_base:"ChatGLM-6B API Base",output_folder:"Output folder",select_folder:"Select folder",email_settings:"Email settings",email_user:"Email user",email_password:"Email password",email_smtp_host:"SMTP host",email_smtp_port:"SMTP port",email_smtp_ssl:"SMTP SSL",pexels_api_key:"Pexels API Key",stable_diffusion_base_url:"Stable Diffusion URL",use_system_proxy:"Use system proxy"},helpDropdown:{help:"Help",about:"About",documentation:"Documentation",software_update:"Software update",check_update:"Check update",update_available:"Update available",new_version:"New version {version} {releaseDatetime}",about_vectorvein:"About VectorVein",about_vectorvein_description:`### Build Your Automated Workflow with the Power of AI #### Create powerful workflows with drag-and-drop functionality, no programming required. -The open-source version of VectorVein, developed by MakerBi, is available for personal use only and cannot be used for commercial purposes.`}},markdownEditor:{raw_text:"Raw text",markdown_text:"Markdown text"},workspace:{workflowEditor:{add_node:"Add node",add_tag:"Add tag",brief_editor:"Brief editor",brief_images:"Brief images"},uiDesign:{"typography-paragraph":{title:"Text Content",placeholder:"Supports Markdown syntax, which will be rendered directly in the interface",tip:"Can be used to place tips in the interface"}},uploaderFieldUse:{upload:"Upload",upload_success:"{file} upload success",upload_failed:"{file} upload failed",uploader_text:"Click or drag file to this area to upload",uploader_hint:"Currently supported file types: {fileTypes}"},mindmapRenderer:{download_svg:"Download svg"},echartsRenderer:{download_image:"Download image"},newWorkflowModal:{create_new_workflow:"Create new workflow",empty_workflow:"Create empty workflow"},shareWorkflowModal:{share_workflow:"Share workflow",title:"Title",description:"Description",description_min_require:"Description requires at least {count} characters",description_hint1:"Introduce the purpose, input and output of the workflow so that other users can better understand the workflow.",description_hint2:"Support Markdown format.",share_to_community:"Share to community",share_to_community_description:"After sharing to the community, other users can search for the workflow in the community. Otherwise, it can only be accessed through the shared link.",share_success:"Share success"},tagInput:{select_tags:"Select tags"},workflowRunRecordsDrawer:{workflows_run_records:"Workflows run records",my_workflows_run_records:"My workflows run records",start_time:"Start",end_time:"End",used_credits:"Used credits",status:"Status",status_not_started:"Not started",status_queued:"Queued",status_running:"Running",status_finished:"Finished",status_failed:"Failed",check_record:"Check record",check_record_and_error_task:"Check record and error task",workflow_title:"Workflow title"},vueFlowStyleSettings:{title:"Style Settings",edge_type:"Edge type",edge_type_bezier:"Bezier",edge_type_step:"Step",edge_type_smoothstep:"Smoothstep",edge_type_straight:"Straight",edge_animated:"Edge animated"}},codeEditorModal:{title:"Code editor",please_enter_code:"Please enter the code, the function name is fixed to main, and the input parameters should be consistent with the set name.",copy_code:"Copy code",copy_success:"Copy success"},templateEditorModal:{title:"Template editor",variable_fields:"Variable fields",template:"Template",drag_to_insert:"Drag to insert"},nodes:{common:{input:"Input",output:"Output"},baseNode:{document_link:"Document link",clone_node:"Clone node",delete_node:"Delete node"},baseField:{show_in_use_interface:"Whether to display in the use interface",show:"Show",hide:"Hide"},listField:{add_item:"Add item"},assistedNodes:{title:"Assisted nodes",CommentNode:{title:"Comment node",description:"Used to add comments, will not have any effect on the workflow run.",comment:"Comment"}},fileProcessing:{title:"File processing",FileLoader:{title:"Read file",description:"Read the contents of the file.",files:"File",output:"Output"}},textProcessing:{title:"Text processing",TemplateCompose:{title:"Template compose",description:"Compose the text according to the template.",template:"Template",output:"Output",add_field:"Add field",add_field_type:"Add field type",field_type_input:"Single line input box",field_type_textarea:"Multi-line input box",field_type_select:"List selection input",add_field_display_name:"Display name",add_field_list_options:"List options",click_to_add_to_template:"Click to add variables to the template",open_template_editor:"Open template editor"},MarkdownToHtml:{title:"Markdown to HTML",description:"Convert Markdown to HTML.",markdown:"Markdown",html:"HTML"},TextSplitters:{title:"Text splitters",description:"Split the text into multiple texts according to the specified method.",text:"Text",split_method:"Split method",split_method_general:"General",split_method_delimiter:"Delimiter",split_method_markdown:"Markdown",delimiter:"Delimiter",chunk_length:"Chunk length",chunk_overlap:"Chunk overlap",output:"Output"},ListRender:{title:"List render",description:"Render the list into text.",list:"List",add_item:"Add item",separator:"Merge item separator",output_type:"Output type",output_type_text:"Text",output_type_list:"List",output:"Output"},TextInOut:{title:"Text in/out",description:"Output the input text as it is. Used when the same text is needed in multiple places.",text:"Text",output:"Output"},TextTruncation:{title:"Text truncation",description:"Truncate the text to the specified length.",text:"Text",truncate_method:"Truncate method",truncate_method_general:"General truncation",truncate_method_markdown:"Markdown truncation",truncate_length:"Truncate length",floating_range:"Floating range",output:"Output"}},llms:{title:"Language models",OpenAI:{title:"OpenAI",description:"OpenAI is a non-profit artificial intelligence research company founded in 2015 by Elon Musk, Sam Altman, and Greg Brockman. It is dedicated to ensuring that artificial general intelligence benefits all of humanity.",prompt:"Prompt",llm_model:"Model",temperature:"AI preference (temperature)",creative:"Creative",balanced:"Balanced",precise:"Precise",output:"Output"},ChatGLM:{title:"ChatGLM",description:"ChatGLM series models, through the injection of code pre-training, supervised fine-tuning and other technologies to align human intentions, with question and answer, multi-round dialogue, code generation and other capabilities.",prompt:"Prompt",llm_model:"Model",temperature:"AI preference (temperature)",creative:"Creative",balanced:"Balanced",precise:"Precise",output:"Output"}},imageGeneration:{title:"Image generation",StableDiffusion:{title:"Stable Diffusion",description:"Stable Diffusion is a deep learning text-to-image generation model released in 2022.",prompt:"Prompt",negative_prompt:"Negative prompt",model:"Model",cfg_scale:"CFG Scale",sampler:"Sampler",width:"Width",height:"Height",output_type:"Output type",output_type_only_link:"Only link",output_type_markdown:"Markdown",output_type_html:"HTML",output:"Output"}},outputs:{title:"Outputs",Text:{title:"Text",description:"Used to present text in the user interface.",text:"Text content",output_title:"Text title (used to distinguish modules in the use interface)",render_markdown:"Render Markdown",output:"Output"},Email:{title:"Email",description:"Used to send emails.",to_email:"To email",subject:"Subject",content_html:"Content HTML"},Document:{title:"Document",description:"Used to generate documents.",file_name:"File name",content:"Content (text type is recommended to enter Markdown format content)",export_type:"Export type",output_type:"Output type",output_type_only_path:"Only path",output_type_markdown:"Markdown",output_type_html:"HTML",output:"Output"},Audio:{title:"Audio",description:"Used to generate audio files.",content:"Content",show_player:"Show player",output_type:"Output type",output_type_only_link:"Only link",output_type_markdown:"Markdown",output_type_html:"HTML",show_local_file:"Show local file",output:"Output"},Mindmap:{title:"Mindmap",description:"Used to generate mind maps.",content:"Markdown content",show_mind_map:"Show mind map",output_type:"Output type",output:"Output"},Mermaid:{title:"Mermaid",description:"Used to generate Mermaid diagrams.",content:"Mermaid content",show_mermaid:"Show Mermaid diagram",output_type:"Output type",output:"Output"},Echarts:{title:"Charts",description:"Used to generate Echarts charts.",option:"Echarts option",show_echarts:"Show Echarts",output_type:"Output type",output:"Output"},WorkflowInvokeOutput:{title:"Workflow invoke output",description:"Used to display the output when called by the workflow invoke node, not displayed in the use interface.",value:"Value",display_name:"Display name"}},webCrawlers:{title:"Web crawlers",TextCrawler:{title:"Text crawler",description:"Used to crawl text from web pages.",url:"URL",output_type:"Output type",text:"Text",json:"JSON",use_oversea_crawler:"Use crawler outside China",output_text:"Web page text",output_title:"Web page title"},BilibiliCrawler:{title:"Bilibili crawler",description:"Used to crawl videos from Bilibili.",url_or_bvid:"URL or BVID",output_type:"Output type",str:"String",list:"List",output_subtitle:"Subtitle",output_title:"Title"},YoutubeCrawler:{title:"Youtube ",description:"Used to crawl videos from youtube.",url_or_video_id:"URL or video ID",output_type:"Output type",str:"String",list:"List",output_subtitle:"Subtitle",output_title:"Title"}},triggers:{title:"Triggers",ButtonTrigger:{title:"Button trigger",description:"Used to trigger workflow runs. As a special node, it can be used without connecting to other nodes.",button_text:"Button text",run:"Run",output:"Output"},ScheduleTrigger:{title:"Scheduled Trigger",description:"Used to trigger workflow runs at specified times.",schedule:"Schedule",schedule_settings:"Schedule settings",save_schedule_settings:"Save schedule settings",output:"Output"}},vectorDb:{title:"Vector database",AddData:{title:"Add data",description:"Used to add data to the vector database.",text:"Text",content_title:"Title",source_url:"Source URL",data_type:"Data type",database:"Database",split_method:"Split method",split_method_general:"General",chunk_length:"Chunk length",output:"Output",object_id:"Object ID"},DeleteData:{title:"Delete data",description:"Used to delete data from the vector database.",object_id:"Object ID",database:"Database",delete_success:"Delete success"},Search:{title:"Search data",description:"Used to search for data in the vector database. The search results are sorted by similarity.",search_text:"Search text",data_type:"Data type",database:"Database",count:"Search results count",output_type:"Output type",text:"Text",list:"List",output:"Output"}},tools:{title:"Tools",ProgrammingFunction:{title:"Programming function",description:"Used to run code.",language:"Language",code:"Code",open_editor:"Open code editor",add_parameter:"Add parameter",add_parameter_type:"Parameter type",parameter_type_str:"String",parameter_type_int:"Integer",parameter_type_float:"Float",parameter_type_bool:"Boolean",parameter_type_list:"List",add_parameter_name:"Parameter name",list_input:"List input",output:"Output"},ImageSearch:{title:"Image search",description:"Used to search for images on the Internet.",search_text:"Search text",search_engine:"Search engine",search_engine_bing:"Bing",search_engine_pexels:"Pexels",count:"Search results count",output_type:"Output type",output_type_text:"Text",output_type_markdown:"Markdown",output:"Output"},WorkflowInvoke:{title:"Workflow invoke",description:"Used to invoke the workflow and get the result.",select_workflow:"Select workflow",selected_workflow:"Selected workflow",workflow_id:"Workflow ID",fail_all:"If this node fails, the entire workflow fails",list_input:"List input",workflow_fields:"Workflow fields"}},controlFlows:{title:"Control flows",Empty:{title:"Empty node",description:"Used in cases where it is necessary to ensure that the workflow is executed in order.",input:"Input",output:"Output (does not change the value of the connected node)"},Conditional:{title:"Conditional",description:"Used to execute different modules according to different conditions.",field_type:"Data type",field_type_string:"String",field_type_number:"Number",left_field:"Left data",right_field:"Right data",operator:"Condition judgment operator",operator_equal:"Equal",operator_not_equal:"Not equal",operator_greater_than:"Greater than",operator_less_than:"Less than",operator_greater_than_or_equal:"Greater than or equal",operator_less_than_or_equal:"Less than or equal",operator_include:"Left include right",operator_not_include:"Left not include right",operator_is_empty:"Is empty",operator_is_not_empty:"Is not empty",operator_starts_with:"Left starts with right",operator_ends_with:"Left ends with right",true_output:"Output when the condition is met",false_output:"Output when the condition is not met",output:"Output"},RandomChoice:{title:"Random choice",description:"Used to randomly select an element from a list.",input:"Input",output:"Output"},JsonProcess:{title:"JSON process",description:"Used to process JSON or Python dictionary data.",input:"Input",process_mode:"Process mode",process_mode_get_value:"Get value by Key",process_mode_list_values:"List all values",process_mode_list_keys:"List all keys",key:"Key",default_value:"Default value (when Key does not exist)",output:"Output"}}}},layouts:{workspaceLayout:{tour:{workflow_button_title:"Switch to workflow interface",workflow_button_description:"Click this button to switch to the workflow interface. Your workflows and official templates can be found here.",database_button_title:"Switch to database interface",database_button_description:"Click this button to switch to the database interface. You can create your personal knowledge base here and upload your data for use in workflows."}}}},Tl={"zh-CN":"中文","en-US":"English"},UC=DMe({legacy:!1,allowComposition:!0,globalInjection:!0,global:!0,locale:localStorage.getItem("userSettings.language")||"zh-CN",fallbackLocale:localStorage.getItem("userSettings.language")||"zh-CN",messages:{"zh-CN":e$e,"en-US":t$e}}),n$e={__name:"SettingDrawer",setup(e){const{t}=cl(),n=ue(!0),r=rd();fa(async()=>{const u=await om("get",{});r.setSetting(u.data),o.id=u.data.id,o.data.openai_api_type=u.data.data.openai_api_type||"open_ai",o.data.openai_api_key=u.data.data.openai_api_key||"",o.data.openai_api_base=u.data.data.openai_api_base||"https://api.openai.com/v1",o.data.openai_chat_engine=u.data.data.openai_chat_engine||"",o.data.openai_embedding_engine=u.data.data.openai_embedding_engine||"",o.data.chatglm6b_api_base=u.data.data.chatglm6b_api_base||"http://127.0.0.1:8000",o.data.output_folder=u.data.data.output_folder||"./",o.data.email_user=u.data.data.email_user||"",o.data.email_password=u.data.data.email_password||"",o.data.email_smtp_host=u.data.data.email_smtp_host||"",o.data.email_smtp_port=u.data.data.email_smtp_port||"",o.data.email_smtp_ssl=u.data.data.email_smtp_ssl||!0,o.data.pexels_api_key=u.data.data.pexels_api_key||"",o.data.stable_diffusion_base_url=u.data.data.stable_diffusion_base_url||"http://127.0.0.1:7860",o.data.use_system_proxy=u.data.data.use_system_proxy||!0,n.value=!1,a.value=!1});const o=mt({id:1,data:{openai_api_type:"openai",openai_api_key:"",openai_api_base:"https://api.openai.com/v1",openai_chat_engine:"",openai_embedding_engine:"",chatglm6b_api_base:"http://127.0.0.1:8000",output_folder:"./",email_user:"",email_password:"",email_smtp_host:"",email_smtp_port:"",email_smtp_ssl:!0,pexels_api_key:"",stable_diffusion_base_url:"http://127.0.0.1:7860",use_system_proxy:!0}}),a=ue(!1),i=async()=>{a.value=!0,n.value=!1},l=()=>{a.value=!1},s=async()=>{try{const u=await window.pywebview.api.open_folder_dialog(o.output_folder);if(!u)return;o.data.output_folder=u[0]}catch(u){console.log(u)}},c=async()=>{n.value=!0,await r.setSetting(et(o)),await om("update",o),ju.success(t("components.layout.settingDrawer.save_success")),n.value=!1,a.value=!1};return(u,d)=>{const p=pt("a-button"),f=pt("a-radio-button"),_=pt("a-radio-group"),m=pt("a-form-item"),v=pt("a-input-password"),h=pt("a-input"),b=pt("a-divider"),E=pt("a-typography-text"),C=pt("a-space"),y=pt("a-col"),T=pt("a-row"),O=pt("a-input-number"),x=pt("a-switch"),w=pt("a-checkbox"),R=pt("a-form"),N=pt("a-spin"),L=pt("a-drawer");return kt(),Jo(Ue,null,[g(p,{type:"primary",onClick:i},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.open")),1)]),_:1}),g(L,{title:Be(t)("components.layout.settingDrawer.my_setting"),size:"large",open:a.value,onClose:l},{extra:Le(()=>[g(p,{type:"primary",onClick:c},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.save")),1)]),_:1})]),default:Le(()=>[g(N,{spinning:n.value},{default:Le(()=>[g(T,{justify:"space-between",align:"middle"},{default:Le(()=>[g(y,{span:24},{default:Le(()=>[g(R,null,{default:Le(()=>[g(m,{label:Be(t)("components.layout.settingDrawer.openai_api_type")},{default:Le(()=>[g(_,{value:o.data.openai_api_type,"onUpdate:value":d[0]||(d[0]=$=>o.data.openai_api_type=$)},{default:Le(()=>[g(f,{value:"open_ai"},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.openai")),1)]),_:1}),g(f,{value:"azure"},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.azure")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.openai_api_key")},{default:Le(()=>[g(v,{value:o.data.openai_api_key,"onUpdate:value":d[1]||(d[1]=$=>o.data.openai_api_key=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.openai_api_base")},{default:Le(()=>[g(h,{value:o.data.openai_api_base,"onUpdate:value":d[2]||(d[2]=$=>o.data.openai_api_base=$)},null,8,["value"])]),_:1},8,["label"]),o.data.openai_api_type=="azure"?(kt(),xn(m,{key:0,label:Be(t)("components.layout.settingDrawer.openai_chat_engine")},{default:Le(()=>[g(h,{value:o.data.openai_chat_engine,"onUpdate:value":d[3]||(d[3]=$=>o.data.openai_chat_engine=$)},null,8,["value"])]),_:1},8,["label"])):af("",!0),o.data.openai_api_type=="azure"?(kt(),xn(m,{key:1,label:Be(t)("components.layout.settingDrawer.openai_embedding_engine")},{default:Le(()=>[g(h,{value:o.data.openai_embedding_engine,"onUpdate:value":d[4]||(d[4]=$=>o.data.openai_embedding_engine=$)},null,8,["value"])]),_:1},8,["label"])):af("",!0),g(b),g(m,{label:Be(t)("components.layout.settingDrawer.chatglm6b_api_base")},{default:Le(()=>[g(h,{value:o.data.chatglm6b_api_base,"onUpdate:value":d[5]||(d[5]=$=>o.data.chatglm6b_api_base=$)},null,8,["value"])]),_:1},8,["label"]),g(b),g(T,{gutter:[12,12]},{default:Le(()=>[g(y,{span:24},{default:Le(()=>[g(C,null,{default:Le(()=>[g(E,null,{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.output_folder"))+": ",1)]),_:1}),g(E,null,{default:Le(()=>[bt(Gt(o.data.output_folder),1)]),_:1})]),_:1})]),_:1}),g(y,{span:24},{default:Le(()=>[g(p,{type:"primary",block:"",onClick:s},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.select_folder")),1)]),_:1})]),_:1})]),_:1}),g(b,null,{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.email_settings")),1)]),_:1}),g(m,{label:Be(t)("components.layout.settingDrawer.email_user")},{default:Le(()=>[g(h,{value:o.data.email_user,"onUpdate:value":d[6]||(d[6]=$=>o.data.email_user=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_password")},{default:Le(()=>[g(v,{value:o.data.email_password,"onUpdate:value":d[7]||(d[7]=$=>o.data.email_password=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_smtp_host")},{default:Le(()=>[g(h,{value:o.data.email_smtp_host,"onUpdate:value":d[8]||(d[8]=$=>o.data.email_smtp_host=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_smtp_port")},{default:Le(()=>[g(O,{value:o.data.email_smtp_port,"onUpdate:value":d[9]||(d[9]=$=>o.data.email_smtp_port=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_smtp_ssl")},{default:Le(()=>[g(x,{checked:o.data.email_smtp_ssl,"onUpdate:checked":d[10]||(d[10]=$=>o.data.email_smtp_ssl=$)},null,8,["checked"])]),_:1},8,["label"]),g(b),g(m,{label:Be(t)("components.layout.settingDrawer.pexels_api_key")},{default:Le(()=>[g(v,{value:o.data.pexels_api_key,"onUpdate:value":d[11]||(d[11]=$=>o.data.pexels_api_key=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.stable_diffusion_base_url")},{default:Le(()=>[g(h,{value:o.data.stable_diffusion_base_url,"onUpdate:value":d[12]||(d[12]=$=>o.data.stable_diffusion_base_url=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.use_system_proxy")},{default:Le(()=>[g(w,{checked:o.data.use_system_proxy,"onUpdate:checked":d[13]||(d[13]=$=>o.data.use_system_proxy=$)},null,8,["checked"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])]),_:1},8,["title","open"])],64)}}};var Dt={};const r$e="Á",o$e="á",a$e="Ă",i$e="ă",l$e="∾",s$e="∿",c$e="∾̳",u$e="Â",d$e="â",p$e="´",f$e="А",m$e="а",g$e="Æ",_$e="æ",h$e="⁡",v$e="𝔄",b$e="𝔞",S$e="À",E$e="à",y$e="ℵ",C$e="ℵ",T$e="Α",O$e="α",x$e="Ā",w$e="ā",R$e="⨿",I$e="&",N$e="&",A$e="⩕",D$e="⩓",P$e="∧",M$e="⩜",$$e="⩘",L$e="⩚",k$e="∠",F$e="⦤",B$e="∠",U$e="⦨",H$e="⦩",z$e="⦪",G$e="⦫",V$e="⦬",Y$e="⦭",W$e="⦮",q$e="⦯",K$e="∡",j$e="∟",X$e="⊾",Q$e="⦝",Z$e="∢",J$e="Å",eLe="⍼",tLe="Ą",nLe="ą",rLe="𝔸",oLe="𝕒",aLe="⩯",iLe="≈",lLe="⩰",sLe="≊",cLe="≋",uLe="'",dLe="⁡",pLe="≈",fLe="≊",mLe="Å",gLe="å",_Le="𝒜",hLe="𝒶",vLe="≔",bLe="*",SLe="≈",ELe="≍",yLe="Ã",CLe="ã",TLe="Ä",OLe="ä",xLe="∳",wLe="⨑",RLe="≌",ILe="϶",NLe="‵",ALe="∽",DLe="⋍",PLe="∖",MLe="⫧",$Le="⊽",LLe="⌅",kLe="⌆",FLe="⌅",BLe="⎵",ULe="⎶",HLe="≌",zLe="Б",GLe="б",VLe="„",YLe="∵",WLe="∵",qLe="∵",KLe="⦰",jLe="϶",XLe="ℬ",QLe="ℬ",ZLe="Β",JLe="β",eke="ℶ",tke="≬",nke="𝔅",rke="𝔟",oke="⋂",ake="◯",ike="⋃",lke="⨀",ske="⨁",cke="⨂",uke="⨆",dke="★",pke="▽",fke="△",mke="⨄",gke="⋁",_ke="⋀",hke="⤍",vke="⧫",bke="▪",Ske="▴",Eke="▾",yke="◂",Cke="▸",Tke="␣",Oke="▒",xke="░",wke="▓",Rke="█",Ike="=⃥",Nke="≡⃥",Ake="⫭",Dke="⌐",Pke="𝔹",Mke="𝕓",$ke="⊥",Lke="⊥",kke="⋈",Fke="⧉",Bke="┐",Uke="╕",Hke="╖",zke="╗",Gke="┌",Vke="╒",Yke="╓",Wke="╔",qke="─",Kke="═",jke="┬",Xke="╤",Qke="╥",Zke="╦",Jke="┴",e2e="╧",t2e="╨",n2e="╩",r2e="⊟",o2e="⊞",a2e="⊠",i2e="┘",l2e="╛",s2e="╜",c2e="╝",u2e="└",d2e="╘",p2e="╙",f2e="╚",m2e="│",g2e="║",_2e="┼",h2e="╪",v2e="╫",b2e="╬",S2e="┤",E2e="╡",y2e="╢",C2e="╣",T2e="├",O2e="╞",x2e="╟",w2e="╠",R2e="‵",I2e="˘",N2e="˘",A2e="¦",D2e="𝒷",P2e="ℬ",M2e="⁏",$2e="∽",L2e="⋍",k2e="⧅",F2e="\\",B2e="⟈",U2e="•",H2e="•",z2e="≎",G2e="⪮",V2e="≏",Y2e="≎",W2e="≏",q2e="Ć",K2e="ć",j2e="⩄",X2e="⩉",Q2e="⩋",Z2e="∩",J2e="⋒",eFe="⩇",tFe="⩀",nFe="ⅅ",rFe="∩︀",oFe="⁁",aFe="ˇ",iFe="ℭ",lFe="⩍",sFe="Č",cFe="č",uFe="Ç",dFe="ç",pFe="Ĉ",fFe="ĉ",mFe="∰",gFe="⩌",_Fe="⩐",hFe="Ċ",vFe="ċ",bFe="¸",SFe="¸",EFe="⦲",yFe="¢",CFe="·",TFe="·",OFe="𝔠",xFe="ℭ",wFe="Ч",RFe="ч",IFe="✓",NFe="✓",AFe="Χ",DFe="χ",PFe="ˆ",MFe="≗",$Fe="↺",LFe="↻",kFe="⊛",FFe="⊚",BFe="⊝",UFe="⊙",HFe="®",zFe="Ⓢ",GFe="⊖",VFe="⊕",YFe="⊗",WFe="○",qFe="⧃",KFe="≗",jFe="⨐",XFe="⫯",QFe="⧂",ZFe="∲",JFe="”",eBe="’",tBe="♣",nBe="♣",rBe=":",oBe="∷",aBe="⩴",iBe="≔",lBe="≔",sBe=",",cBe="@",uBe="∁",dBe="∘",pBe="∁",fBe="ℂ",mBe="≅",gBe="⩭",_Be="≡",hBe="∮",vBe="∯",bBe="∮",SBe="𝕔",EBe="ℂ",yBe="∐",CBe="∐",TBe="©",OBe="©",xBe="℗",wBe="∳",RBe="↵",IBe="✗",NBe="⨯",ABe="𝒞",DBe="𝒸",PBe="⫏",MBe="⫑",$Be="⫐",LBe="⫒",kBe="⋯",FBe="⤸",BBe="⤵",UBe="⋞",HBe="⋟",zBe="↶",GBe="⤽",VBe="⩈",YBe="⩆",WBe="≍",qBe="∪",KBe="⋓",jBe="⩊",XBe="⊍",QBe="⩅",ZBe="∪︀",JBe="↷",e3e="⤼",t3e="⋞",n3e="⋟",r3e="⋎",o3e="⋏",a3e="¤",i3e="↶",l3e="↷",s3e="⋎",c3e="⋏",u3e="∲",d3e="∱",p3e="⌭",f3e="†",m3e="‡",g3e="ℸ",_3e="↓",h3e="↡",v3e="⇓",b3e="‐",S3e="⫤",E3e="⊣",y3e="⤏",C3e="˝",T3e="Ď",O3e="ď",x3e="Д",w3e="д",R3e="‡",I3e="⇊",N3e="ⅅ",A3e="ⅆ",D3e="⤑",P3e="⩷",M3e="°",$3e="∇",L3e="Δ",k3e="δ",F3e="⦱",B3e="⥿",U3e="𝔇",H3e="𝔡",z3e="⥥",G3e="⇃",V3e="⇂",Y3e="´",W3e="˙",q3e="˝",K3e="`",j3e="˜",X3e="⋄",Q3e="⋄",Z3e="⋄",J3e="♦",e4e="♦",t4e="¨",n4e="ⅆ",r4e="ϝ",o4e="⋲",a4e="÷",i4e="÷",l4e="⋇",s4e="⋇",c4e="Ђ",u4e="ђ",d4e="⌞",p4e="⌍",f4e="$",m4e="𝔻",g4e="𝕕",_4e="¨",h4e="˙",v4e="⃜",b4e="≐",S4e="≑",E4e="≐",y4e="∸",C4e="∔",T4e="⊡",O4e="⌆",x4e="∯",w4e="¨",R4e="⇓",I4e="⇐",N4e="⇔",A4e="⫤",D4e="⟸",P4e="⟺",M4e="⟹",$4e="⇒",L4e="⊨",k4e="⇑",F4e="⇕",B4e="∥",U4e="⤓",H4e="↓",z4e="↓",G4e="⇓",V4e="⇵",Y4e="̑",W4e="⇊",q4e="⇃",K4e="⇂",j4e="⥐",X4e="⥞",Q4e="⥖",Z4e="↽",J4e="⥟",eUe="⥗",tUe="⇁",nUe="↧",rUe="⊤",oUe="⤐",aUe="⌟",iUe="⌌",lUe="𝒟",sUe="𝒹",cUe="Ѕ",uUe="ѕ",dUe="⧶",pUe="Đ",fUe="đ",mUe="⋱",gUe="▿",_Ue="▾",hUe="⇵",vUe="⥯",bUe="⦦",SUe="Џ",EUe="џ",yUe="⟿",CUe="É",TUe="é",OUe="⩮",xUe="Ě",wUe="ě",RUe="Ê",IUe="ê",NUe="≖",AUe="≕",DUe="Э",PUe="э",MUe="⩷",$Ue="Ė",LUe="ė",kUe="≑",FUe="ⅇ",BUe="≒",UUe="𝔈",HUe="𝔢",zUe="⪚",GUe="È",VUe="è",YUe="⪖",WUe="⪘",qUe="⪙",KUe="∈",jUe="⏧",XUe="ℓ",QUe="⪕",ZUe="⪗",JUe="Ē",e6e="ē",t6e="∅",n6e="∅",r6e="◻",o6e="∅",a6e="▫",i6e=" ",l6e=" ",s6e=" ",c6e="Ŋ",u6e="ŋ",d6e=" ",p6e="Ę",f6e="ę",m6e="𝔼",g6e="𝕖",_6e="⋕",h6e="⧣",v6e="⩱",b6e="ε",S6e="Ε",E6e="ε",y6e="ϵ",C6e="≖",T6e="≕",O6e="≂",x6e="⪖",w6e="⪕",R6e="⩵",I6e="=",N6e="≂",A6e="≟",D6e="⇌",P6e="≡",M6e="⩸",$6e="⧥",L6e="⥱",k6e="≓",F6e="ℯ",B6e="ℰ",U6e="≐",H6e="⩳",z6e="≂",G6e="Η",V6e="η",Y6e="Ð",W6e="ð",q6e="Ë",K6e="ë",j6e="€",X6e="!",Q6e="∃",Z6e="∃",J6e="ℰ",e8e="ⅇ",t8e="ⅇ",n8e="≒",r8e="Ф",o8e="ф",a8e="♀",i8e="ffi",l8e="ff",s8e="ffl",c8e="𝔉",u8e="𝔣",d8e="fi",p8e="◼",f8e="▪",m8e="fj",g8e="♭",_8e="fl",h8e="▱",v8e="ƒ",b8e="𝔽",S8e="𝕗",E8e="∀",y8e="∀",C8e="⋔",T8e="⫙",O8e="ℱ",x8e="⨍",w8e="½",R8e="⅓",I8e="¼",N8e="⅕",A8e="⅙",D8e="⅛",P8e="⅔",M8e="⅖",$8e="¾",L8e="⅗",k8e="⅜",F8e="⅘",B8e="⅚",U8e="⅝",H8e="⅞",z8e="⁄",G8e="⌢",V8e="𝒻",Y8e="ℱ",W8e="ǵ",q8e="Γ",K8e="γ",j8e="Ϝ",X8e="ϝ",Q8e="⪆",Z8e="Ğ",J8e="ğ",e5e="Ģ",t5e="Ĝ",n5e="ĝ",r5e="Г",o5e="г",a5e="Ġ",i5e="ġ",l5e="≥",s5e="≧",c5e="⪌",u5e="⋛",d5e="≥",p5e="≧",f5e="⩾",m5e="⪩",g5e="⩾",_5e="⪀",h5e="⪂",v5e="⪄",b5e="⋛︀",S5e="⪔",E5e="𝔊",y5e="𝔤",C5e="≫",T5e="⋙",O5e="⋙",x5e="ℷ",w5e="Ѓ",R5e="ѓ",I5e="⪥",N5e="≷",A5e="⪒",D5e="⪤",P5e="⪊",M5e="⪊",$5e="⪈",L5e="≩",k5e="⪈",F5e="≩",B5e="⋧",U5e="𝔾",H5e="𝕘",z5e="`",G5e="≥",V5e="⋛",Y5e="≧",W5e="⪢",q5e="≷",K5e="⩾",j5e="≳",X5e="𝒢",Q5e="ℊ",Z5e="≳",J5e="⪎",eHe="⪐",tHe="⪧",nHe="⩺",rHe=">",oHe=">",aHe="≫",iHe="⋗",lHe="⦕",sHe="⩼",cHe="⪆",uHe="⥸",dHe="⋗",pHe="⋛",fHe="⪌",mHe="≷",gHe="≳",_He="≩︀",hHe="≩︀",vHe="ˇ",bHe=" ",SHe="½",EHe="ℋ",yHe="Ъ",CHe="ъ",THe="⥈",OHe="↔",xHe="⇔",wHe="↭",RHe="^",IHe="ℏ",NHe="Ĥ",AHe="ĥ",DHe="♥",PHe="♥",MHe="…",$He="⊹",LHe="𝔥",kHe="ℌ",FHe="ℋ",BHe="⤥",UHe="⤦",HHe="⇿",zHe="∻",GHe="↩",VHe="↪",YHe="𝕙",WHe="ℍ",qHe="―",KHe="─",jHe="𝒽",XHe="ℋ",QHe="ℏ",ZHe="Ħ",JHe="ħ",eze="≎",tze="≏",nze="⁃",rze="‐",oze="Í",aze="í",ize="⁣",lze="Î",sze="î",cze="И",uze="и",dze="İ",pze="Е",fze="е",mze="¡",gze="⇔",_ze="𝔦",hze="ℑ",vze="Ì",bze="ì",Sze="ⅈ",Eze="⨌",yze="∭",Cze="⧜",Tze="℩",Oze="IJ",xze="ij",wze="Ī",Rze="ī",Ize="ℑ",Nze="ⅈ",Aze="ℐ",Dze="ℑ",Pze="ı",Mze="ℑ",$ze="⊷",Lze="Ƶ",kze="⇒",Fze="℅",Bze="∞",Uze="⧝",Hze="ı",zze="⊺",Gze="∫",Vze="∬",Yze="ℤ",Wze="∫",qze="⊺",Kze="⋂",jze="⨗",Xze="⨼",Qze="⁣",Zze="⁢",Jze="Ё",eGe="ё",tGe="Į",nGe="į",rGe="𝕀",oGe="𝕚",aGe="Ι",iGe="ι",lGe="⨼",sGe="¿",cGe="𝒾",uGe="ℐ",dGe="∈",pGe="⋵",fGe="⋹",mGe="⋴",gGe="⋳",_Ge="∈",hGe="⁢",vGe="Ĩ",bGe="ĩ",SGe="І",EGe="і",yGe="Ï",CGe="ï",TGe="Ĵ",OGe="ĵ",xGe="Й",wGe="й",RGe="𝔍",IGe="𝔧",NGe="ȷ",AGe="𝕁",DGe="𝕛",PGe="𝒥",MGe="𝒿",$Ge="Ј",LGe="ј",kGe="Є",FGe="є",BGe="Κ",UGe="κ",HGe="ϰ",zGe="Ķ",GGe="ķ",VGe="К",YGe="к",WGe="𝔎",qGe="𝔨",KGe="ĸ",jGe="Х",XGe="х",QGe="Ќ",ZGe="ќ",JGe="𝕂",e7e="𝕜",t7e="𝒦",n7e="𝓀",r7e="⇚",o7e="Ĺ",a7e="ĺ",i7e="⦴",l7e="ℒ",s7e="Λ",c7e="λ",u7e="⟨",d7e="⟪",p7e="⦑",f7e="⟨",m7e="⪅",g7e="ℒ",_7e="«",h7e="⇤",v7e="⤟",b7e="←",S7e="↞",E7e="⇐",y7e="⤝",C7e="↩",T7e="↫",O7e="⤹",x7e="⥳",w7e="↢",R7e="⤙",I7e="⤛",N7e="⪫",A7e="⪭",D7e="⪭︀",P7e="⤌",M7e="⤎",$7e="❲",L7e="{",k7e="[",F7e="⦋",B7e="⦏",U7e="⦍",H7e="Ľ",z7e="ľ",G7e="Ļ",V7e="ļ",Y7e="⌈",W7e="{",q7e="Л",K7e="л",j7e="⤶",X7e="“",Q7e="„",Z7e="⥧",J7e="⥋",e9e="↲",t9e="≤",n9e="≦",r9e="⟨",o9e="⇤",a9e="←",i9e="←",l9e="⇐",s9e="⇆",c9e="↢",u9e="⌈",d9e="⟦",p9e="⥡",f9e="⥙",m9e="⇃",g9e="⌊",_9e="↽",h9e="↼",v9e="⇇",b9e="↔",S9e="↔",E9e="⇔",y9e="⇆",C9e="⇋",T9e="↭",O9e="⥎",x9e="↤",w9e="⊣",R9e="⥚",I9e="⋋",N9e="⧏",A9e="⊲",D9e="⊴",P9e="⥑",M9e="⥠",$9e="⥘",L9e="↿",k9e="⥒",F9e="↼",B9e="⪋",U9e="⋚",H9e="≤",z9e="≦",G9e="⩽",V9e="⪨",Y9e="⩽",W9e="⩿",q9e="⪁",K9e="⪃",j9e="⋚︀",X9e="⪓",Q9e="⪅",Z9e="⋖",J9e="⋚",eVe="⪋",tVe="⋚",nVe="≦",rVe="≶",oVe="≶",aVe="⪡",iVe="≲",lVe="⩽",sVe="≲",cVe="⥼",uVe="⌊",dVe="𝔏",pVe="𝔩",fVe="≶",mVe="⪑",gVe="⥢",_Ve="↽",hVe="↼",vVe="⥪",bVe="▄",SVe="Љ",EVe="љ",yVe="⇇",CVe="≪",TVe="⋘",OVe="⌞",xVe="⇚",wVe="⥫",RVe="◺",IVe="Ŀ",NVe="ŀ",AVe="⎰",DVe="⎰",PVe="⪉",MVe="⪉",$Ve="⪇",LVe="≨",kVe="⪇",FVe="≨",BVe="⋦",UVe="⟬",HVe="⇽",zVe="⟦",GVe="⟵",VVe="⟵",YVe="⟸",WVe="⟷",qVe="⟷",KVe="⟺",jVe="⟼",XVe="⟶",QVe="⟶",ZVe="⟹",JVe="↫",eYe="↬",tYe="⦅",nYe="𝕃",rYe="𝕝",oYe="⨭",aYe="⨴",iYe="∗",lYe="_",sYe="↙",cYe="↘",uYe="◊",dYe="◊",pYe="⧫",fYe="(",mYe="⦓",gYe="⇆",_Ye="⌟",hYe="⇋",vYe="⥭",bYe="‎",SYe="⊿",EYe="‹",yYe="𝓁",CYe="ℒ",TYe="↰",OYe="↰",xYe="≲",wYe="⪍",RYe="⪏",IYe="[",NYe="‘",AYe="‚",DYe="Ł",PYe="ł",MYe="⪦",$Ye="⩹",LYe="<",kYe="<",FYe="≪",BYe="⋖",UYe="⋋",HYe="⋉",zYe="⥶",GYe="⩻",VYe="◃",YYe="⊴",WYe="◂",qYe="⦖",KYe="⥊",jYe="⥦",XYe="≨︀",QYe="≨︀",ZYe="¯",JYe="♂",eWe="✠",tWe="✠",nWe="↦",rWe="↦",oWe="↧",aWe="↤",iWe="↥",lWe="▮",sWe="⨩",cWe="М",uWe="м",dWe="—",pWe="∺",fWe="∡",mWe=" ",gWe="ℳ",_We="𝔐",hWe="𝔪",vWe="℧",bWe="µ",SWe="*",EWe="⫰",yWe="∣",CWe="·",TWe="⊟",OWe="−",xWe="∸",wWe="⨪",RWe="∓",IWe="⫛",NWe="…",AWe="∓",DWe="⊧",PWe="𝕄",MWe="𝕞",$We="∓",LWe="𝓂",kWe="ℳ",FWe="∾",BWe="Μ",UWe="μ",HWe="⊸",zWe="⊸",GWe="∇",VWe="Ń",YWe="ń",WWe="∠⃒",qWe="≉",KWe="⩰̸",jWe="≋̸",XWe="ʼn",QWe="≉",ZWe="♮",JWe="ℕ",eqe="♮",tqe=" ",nqe="≎̸",rqe="≏̸",oqe="⩃",aqe="Ň",iqe="ň",lqe="Ņ",sqe="ņ",cqe="≇",uqe="⩭̸",dqe="⩂",pqe="Н",fqe="н",mqe="–",gqe="⤤",_qe="↗",hqe="⇗",vqe="↗",bqe="≠",Sqe="≐̸",Eqe="​",yqe="​",Cqe="​",Tqe="​",Oqe="≢",xqe="⤨",wqe="≂̸",Rqe="≫",Iqe="≪",Nqe=` +The open-source version of VectorVein, developed by MakerBi, is available for personal use only and cannot be used for commercial purposes.`}},markdownEditor:{raw_text:"Raw text",markdown_text:"Markdown text"},workspace:{workflowEditor:{add_node:"Add node",add_tag:"Add tag",brief_editor:"Brief editor",brief_images:"Brief images"},uiDesign:{"typography-paragraph":{title:"Text Content",placeholder:"Supports Markdown syntax, which will be rendered directly in the interface",tip:"Can be used to place tips in the interface"}},uploaderFieldUse:{upload:"Upload",upload_success:"{file} upload success",upload_failed:"{file} upload failed",uploader_text:"Click or drag file to this area to upload",uploader_hint:"Currently supported file types: {fileTypes}"},mindmapRenderer:{download_svg:"Download svg"},echartsRenderer:{download_image:"Download image"},newWorkflowModal:{create_new_workflow:"Create new workflow",empty_workflow:"Create empty workflow"},shareWorkflowModal:{share_workflow:"Share workflow",title:"Title",description:"Description",description_min_require:"Description requires at least {count} characters",description_hint1:"Introduce the purpose, input and output of the workflow so that other users can better understand the workflow.",description_hint2:"Support Markdown format.",share_to_community:"Share to community",share_to_community_description:"After sharing to the community, other users can search for the workflow in the community. Otherwise, it can only be accessed through the shared link.",share_success:"Share success"},tagInput:{select_tags:"Select tags"},workflowRunRecordsDrawer:{workflows_run_records:"Workflows run records",my_workflows_run_records:"My workflows run records",start_time:"Start",end_time:"End",used_credits:"Used credits",status:"Status",status_not_started:"Not started",status_queued:"Queued",status_running:"Running",status_finished:"Finished",status_failed:"Failed",check_record:"Check record",check_record_and_error_task:"Check record and error task",workflow_title:"Workflow title"},vueFlowStyleSettings:{title:"Style Settings",edge_type:"Edge type",edge_type_bezier:"Bezier",edge_type_step:"Step",edge_type_smoothstep:"Smoothstep",edge_type_straight:"Straight",edge_animated:"Edge animated"}},codeEditorModal:{title:"Code editor",please_enter_code:"Please enter the code, the function name is fixed to main, and the input parameters should be consistent with the set name.",copy_code:"Copy code",copy_success:"Copy success"},templateEditorModal:{title:"Template editor",variable_fields:"Variable fields",template:"Template",drag_to_insert:"Drag to insert"},nodes:{common:{input:"Input",output:"Output"},baseNode:{document_link:"Document link",clone_node:"Clone node",delete_node:"Delete node"},baseField:{show_in_use_interface:"Whether to display in the use interface",show:"Show",hide:"Hide"},listField:{add_item:"Add item"},assistedNodes:{title:"Assisted nodes",CommentNode:{title:"Comment node",description:"Used to add comments, will not have any effect on the workflow run.",comment:"Comment"}},fileProcessing:{title:"File processing",FileLoader:{title:"Read file",description:"Read the contents of the file.",files:"File",output:"Output"}},textProcessing:{title:"Text processing",TemplateCompose:{title:"Template compose",description:"Compose the text according to the template.",template:"Template",output:"Output",add_field:"Add field",add_field_type:"Add field type",field_type_input:"Single line input box",field_type_textarea:"Multi-line input box",field_type_select:"List selection input",add_field_display_name:"Display name",add_field_list_options:"List options",click_to_add_to_template:"Click to add variables to the template",open_template_editor:"Open template editor"},MarkdownToHtml:{title:"Markdown to HTML",description:"Convert Markdown to HTML.",markdown:"Markdown",html:"HTML"},TextSplitters:{title:"Text splitters",description:"Split the text into multiple texts according to the specified method.",text:"Text",split_method:"Split method",split_method_general:"General",split_method_delimiter:"Delimiter",split_method_markdown:"Markdown",delimiter:"Delimiter",chunk_length:"Chunk length",chunk_overlap:"Chunk overlap",output:"Output"},ListRender:{title:"List render",description:"Render the list into text.",list:"List",add_item:"Add item",separator:"Merge item separator",output_type:"Output type",output_type_text:"Text",output_type_list:"List",output:"Output"},TextInOut:{title:"Text in/out",description:"Output the input text as it is. Used when the same text is needed in multiple places.",text:"Text",output:"Output"},TextTruncation:{title:"Text truncation",description:"Truncate the text to the specified length.",text:"Text",truncate_method:"Truncate method",truncate_method_general:"General truncation",truncate_method_markdown:"Markdown truncation",truncate_length:"Truncate length",floating_range:"Floating range",output:"Output"}},llms:{title:"Language models",OpenAI:{title:"OpenAI",description:"OpenAI is a non-profit artificial intelligence research company founded in 2015 by Elon Musk, Sam Altman, and Greg Brockman. It is dedicated to ensuring that artificial general intelligence benefits all of humanity.",use_function_call:"Use function call",functions:"Functions",function_call_mode:"Function call mode",add_function:"Add function",function_name:"Function name",function_description:"Function description",function_parameters:"Function parameters",function_required_parameters:"Required parameters",add_parameter:"Add parameter",parameter_name:"Name",parameter_description:"Description",parameter_type:"Type",prompt:"Prompt",llm_model:"Model",temperature:"AI preference (temperature)",creative:"Creative",balanced:"Balanced",precise:"Precise",output:"Output",function_call_output:"Function call output"},ChatGLM:{title:"ChatGLM",description:"ChatGLM series models, through the injection of code pre-training, supervised fine-tuning and other technologies to align human intentions, with question and answer, multi-round dialogue, code generation and other capabilities.",prompt:"Prompt",llm_model:"Model",temperature:"AI preference (temperature)",creative:"Creative",balanced:"Balanced",precise:"Precise",output:"Output"}},imageGeneration:{title:"Image generation",StableDiffusion:{title:"Stable Diffusion",description:"Stable Diffusion is a deep learning text-to-image generation model released in 2022.",prompt:"Prompt",negative_prompt:"Negative prompt",model:"Model",cfg_scale:"CFG Scale",sampler:"Sampler",width:"Width",height:"Height",output_type:"Output type",output_type_only_link:"Only link",output_type_markdown:"Markdown",output_type_html:"HTML",output:"Output"}},outputs:{title:"Outputs",Text:{title:"Text",description:"Used to present text in the user interface.",text:"Text content",output_title:"Text title (used to distinguish modules in the use interface)",render_markdown:"Render Markdown",output:"Output"},Email:{title:"Email",description:"Used to send emails.",to_email:"To email",subject:"Subject",content_html:"Content HTML"},Document:{title:"Document",description:"Used to generate documents.",file_name:"File name",content:"Content (text type is recommended to enter Markdown format content)",export_type:"Export type",output_type:"Output type",output_type_only_path:"Only path",output_type_markdown:"Markdown",output_type_html:"HTML",output:"Output"},Audio:{title:"Audio",description:"Used to generate audio files.",content:"Content",show_player:"Show player",output_type:"Output type",output_type_only_link:"Only link",output_type_markdown:"Markdown",output_type_html:"HTML",show_local_file:"Show local file",output:"Output"},Mindmap:{title:"Mindmap",description:"Used to generate mind maps.",content:"Markdown content",show_mind_map:"Show mind map",output_type:"Output type",output:"Output"},Mermaid:{title:"Mermaid",description:"Used to generate Mermaid diagrams.",content:"Mermaid content",show_mermaid:"Show Mermaid diagram",output_type:"Output type",output:"Output"},Echarts:{title:"Charts",description:"Used to generate Echarts charts.",option:"Echarts option",show_echarts:"Show Echarts",output_type:"Output type",output:"Output"},WorkflowInvokeOutput:{title:"Workflow invoke output",description:"Used to display the output when called by the workflow invoke node, not displayed in the use interface.",value:"Value",display_name:"Display name"}},webCrawlers:{title:"Web crawlers",TextCrawler:{title:"Text crawler",description:"Used to crawl text from web pages.",url:"URL",output_type:"Output type",text:"Text",json:"JSON",use_oversea_crawler:"Use crawler outside China",output_text:"Web page text",output_title:"Web page title"},BilibiliCrawler:{title:"Bilibili crawler",description:"Used to crawl videos from Bilibili.",url_or_bvid:"URL or BVID",output_type:"Output type",str:"String",list:"List",output_subtitle:"Subtitle",output_title:"Title"},YoutubeCrawler:{title:"Youtube ",description:"Used to crawl videos from youtube.",url_or_video_id:"URL or video ID",output_type:"Output type",str:"String",list:"List",output_subtitle:"Subtitle",output_title:"Title"}},triggers:{title:"Triggers",ButtonTrigger:{title:"Button trigger",description:"Used to trigger workflow runs. As a special node, it can be used without connecting to other nodes.",button_text:"Button text",run:"Run",output:"Output"},ScheduleTrigger:{title:"Scheduled Trigger",description:"Used to trigger workflow runs at specified times.",schedule:"Schedule",schedule_settings:"Schedule settings",save_schedule_settings:"Save schedule settings",output:"Output"}},vectorDb:{title:"Vector database",AddData:{title:"Add data",description:"Used to add data to the vector database.",text:"Text",content_title:"Title",source_url:"Source URL",data_type:"Data type",database:"Database",split_method:"Split method",split_method_general:"General",chunk_length:"Chunk length",output:"Output",object_id:"Object ID"},DeleteData:{title:"Delete data",description:"Used to delete data from the vector database.",object_id:"Object ID",database:"Database",delete_success:"Delete success"},Search:{title:"Search data",description:"Used to search for data in the vector database. The search results are sorted by similarity.",search_text:"Search text",data_type:"Data type",database:"Database",count:"Search results count",output_type:"Output type",text:"Text",list:"List",output:"Output"}},tools:{title:"Tools",ProgrammingFunction:{title:"Programming function",description:"Used to run code.",language:"Language",code:"Code",open_editor:"Open code editor",add_parameter:"Add parameter",add_parameter_type:"Parameter type",parameter_type_str:"String",parameter_type_int:"Integer",parameter_type_float:"Float",parameter_type_bool:"Boolean",parameter_type_list:"List",add_parameter_name:"Parameter name",list_input:"List input",output:"Output"},ImageSearch:{title:"Image search",description:"Used to search for images on the Internet.",search_text:"Search text",search_engine:"Search engine",search_engine_bing:"Bing",search_engine_pexels:"Pexels",count:"Search results count",output_type:"Output type",output_type_text:"Text",output_type_markdown:"Markdown",output:"Output"},WorkflowInvoke:{title:"Workflow invoke",description:"Used to invoke the workflow and get the result.",select_workflow:"Select workflow",selected_workflow:"Selected workflow",workflow_id:"Workflow ID",fail_all:"If this node fails, the entire workflow fails",list_input:"List input",workflow_fields:"Workflow fields"}},controlFlows:{title:"Control flows",Empty:{title:"Empty node",description:"Used in cases where it is necessary to ensure that the workflow is executed in order.",input:"Input",output:"Output (does not change the value of the connected node)"},Conditional:{title:"Conditional",description:"Used to execute different modules according to different conditions.",field_type:"Data type",field_type_string:"String",field_type_number:"Number",left_field:"Left data",right_field:"Right data",operator:"Condition judgment operator",operator_equal:"Equal",operator_not_equal:"Not equal",operator_greater_than:"Greater than",operator_less_than:"Less than",operator_greater_than_or_equal:"Greater than or equal",operator_less_than_or_equal:"Less than or equal",operator_include:"Left include right",operator_not_include:"Left not include right",operator_is_empty:"Is empty",operator_is_not_empty:"Is not empty",operator_starts_with:"Left starts with right",operator_ends_with:"Left ends with right",true_output:"Output when the condition is met",false_output:"Output when the condition is not met",output:"Output"},RandomChoice:{title:"Random choice",description:"Used to randomly select an element from a list.",input:"Input",output:"Output"},JsonProcess:{title:"JSON process",description:"Used to process JSON or Python dictionary data.",input:"Input",process_mode:"Process mode",process_mode_get_value:"Get value by Key",process_mode_list_values:"List all values",process_mode_list_keys:"List all keys",key:"Key",default_value:"Default value (when Key does not exist)",output:"Output"}}}},layouts:{workspaceLayout:{tour:{workflow_button_title:"Switch to workflow interface",workflow_button_description:"Click this button to switch to the workflow interface. Your workflows and official templates can be found here.",database_button_title:"Switch to database interface",database_button_description:"Click this button to switch to the database interface. You can create your personal knowledge base here and upload your data for use in workflows."}}}},Tl={"zh-CN":"中文","en-US":"English"},UC=DMe({legacy:!1,allowComposition:!0,globalInjection:!0,global:!0,locale:localStorage.getItem("userSettings.language")||"zh-CN",fallbackLocale:localStorage.getItem("userSettings.language")||"zh-CN",messages:{"zh-CN":e$e,"en-US":t$e}}),n$e={__name:"SettingDrawer",setup(e){const{t}=cl(),n=ue(!0),r=rd();fa(async()=>{const u=await om("get",{});r.setSetting(u.data),o.id=u.data.id,o.data.openai_api_type=u.data.data.openai_api_type||"open_ai",o.data.openai_api_key=u.data.data.openai_api_key||"",o.data.openai_api_base=u.data.data.openai_api_base||"https://api.openai.com/v1",o.data.openai_chat_engine=u.data.data.openai_chat_engine||"",o.data.openai_embedding_engine=u.data.data.openai_embedding_engine||"",o.data.chatglm6b_api_base=u.data.data.chatglm6b_api_base||"http://127.0.0.1:8000",o.data.output_folder=u.data.data.output_folder||"./",o.data.email_user=u.data.data.email_user||"",o.data.email_password=u.data.data.email_password||"",o.data.email_smtp_host=u.data.data.email_smtp_host||"",o.data.email_smtp_port=u.data.data.email_smtp_port||"",o.data.email_smtp_ssl=u.data.data.email_smtp_ssl||!0,o.data.pexels_api_key=u.data.data.pexels_api_key||"",o.data.stable_diffusion_base_url=u.data.data.stable_diffusion_base_url||"http://127.0.0.1:7860",o.data.use_system_proxy=u.data.data.use_system_proxy||!0,n.value=!1,a.value=!1});const o=mt({id:1,data:{openai_api_type:"openai",openai_api_key:"",openai_api_base:"https://api.openai.com/v1",openai_chat_engine:"",openai_embedding_engine:"",chatglm6b_api_base:"http://127.0.0.1:8000",output_folder:"./",email_user:"",email_password:"",email_smtp_host:"",email_smtp_port:"",email_smtp_ssl:!0,pexels_api_key:"",stable_diffusion_base_url:"http://127.0.0.1:7860",use_system_proxy:!0}}),a=ue(!1),i=async()=>{a.value=!0,n.value=!1},l=()=>{a.value=!1},s=async()=>{try{const u=await window.pywebview.api.open_folder_dialog(o.output_folder);if(!u)return;o.data.output_folder=u[0]}catch(u){console.log(u)}},c=async()=>{n.value=!0,await r.setSetting(et(o)),await om("update",o),ju.success(t("components.layout.settingDrawer.save_success")),n.value=!1,a.value=!1};return(u,d)=>{const p=pt("a-button"),f=pt("a-radio-button"),_=pt("a-radio-group"),m=pt("a-form-item"),v=pt("a-input-password"),h=pt("a-input"),b=pt("a-divider"),E=pt("a-typography-text"),C=pt("a-space"),y=pt("a-col"),T=pt("a-row"),O=pt("a-input-number"),x=pt("a-switch"),w=pt("a-checkbox"),R=pt("a-form"),N=pt("a-spin"),L=pt("a-drawer");return kt(),Jo(Ue,null,[g(p,{type:"primary",onClick:i},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.open")),1)]),_:1}),g(L,{title:Be(t)("components.layout.settingDrawer.my_setting"),size:"large",open:a.value,onClose:l},{extra:Le(()=>[g(p,{type:"primary",onClick:c},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.save")),1)]),_:1})]),default:Le(()=>[g(N,{spinning:n.value},{default:Le(()=>[g(T,{justify:"space-between",align:"middle"},{default:Le(()=>[g(y,{span:24},{default:Le(()=>[g(R,null,{default:Le(()=>[g(m,{label:Be(t)("components.layout.settingDrawer.openai_api_type")},{default:Le(()=>[g(_,{value:o.data.openai_api_type,"onUpdate:value":d[0]||(d[0]=$=>o.data.openai_api_type=$)},{default:Le(()=>[g(f,{value:"open_ai"},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.openai")),1)]),_:1}),g(f,{value:"azure"},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.azure")),1)]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.openai_api_key")},{default:Le(()=>[g(v,{value:o.data.openai_api_key,"onUpdate:value":d[1]||(d[1]=$=>o.data.openai_api_key=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.openai_api_base")},{default:Le(()=>[g(h,{value:o.data.openai_api_base,"onUpdate:value":d[2]||(d[2]=$=>o.data.openai_api_base=$)},null,8,["value"])]),_:1},8,["label"]),o.data.openai_api_type=="azure"?(kt(),xn(m,{key:0,label:Be(t)("components.layout.settingDrawer.openai_chat_engine")},{default:Le(()=>[g(h,{value:o.data.openai_chat_engine,"onUpdate:value":d[3]||(d[3]=$=>o.data.openai_chat_engine=$)},null,8,["value"])]),_:1},8,["label"])):af("",!0),o.data.openai_api_type=="azure"?(kt(),xn(m,{key:1,label:Be(t)("components.layout.settingDrawer.openai_embedding_engine")},{default:Le(()=>[g(h,{value:o.data.openai_embedding_engine,"onUpdate:value":d[4]||(d[4]=$=>o.data.openai_embedding_engine=$)},null,8,["value"])]),_:1},8,["label"])):af("",!0),g(b),g(m,{label:Be(t)("components.layout.settingDrawer.chatglm6b_api_base")},{default:Le(()=>[g(h,{value:o.data.chatglm6b_api_base,"onUpdate:value":d[5]||(d[5]=$=>o.data.chatglm6b_api_base=$)},null,8,["value"])]),_:1},8,["label"]),g(b),g(T,{gutter:[12,12]},{default:Le(()=>[g(y,{span:24},{default:Le(()=>[g(C,null,{default:Le(()=>[g(E,null,{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.output_folder"))+": ",1)]),_:1}),g(E,null,{default:Le(()=>[bt(Gt(o.data.output_folder),1)]),_:1})]),_:1})]),_:1}),g(y,{span:24},{default:Le(()=>[g(p,{type:"primary",block:"",onClick:s},{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.select_folder")),1)]),_:1})]),_:1})]),_:1}),g(b,null,{default:Le(()=>[bt(Gt(Be(t)("components.layout.settingDrawer.email_settings")),1)]),_:1}),g(m,{label:Be(t)("components.layout.settingDrawer.email_user")},{default:Le(()=>[g(h,{value:o.data.email_user,"onUpdate:value":d[6]||(d[6]=$=>o.data.email_user=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_password")},{default:Le(()=>[g(v,{value:o.data.email_password,"onUpdate:value":d[7]||(d[7]=$=>o.data.email_password=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_smtp_host")},{default:Le(()=>[g(h,{value:o.data.email_smtp_host,"onUpdate:value":d[8]||(d[8]=$=>o.data.email_smtp_host=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_smtp_port")},{default:Le(()=>[g(O,{value:o.data.email_smtp_port,"onUpdate:value":d[9]||(d[9]=$=>o.data.email_smtp_port=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.email_smtp_ssl")},{default:Le(()=>[g(x,{checked:o.data.email_smtp_ssl,"onUpdate:checked":d[10]||(d[10]=$=>o.data.email_smtp_ssl=$)},null,8,["checked"])]),_:1},8,["label"]),g(b),g(m,{label:Be(t)("components.layout.settingDrawer.pexels_api_key")},{default:Le(()=>[g(v,{value:o.data.pexels_api_key,"onUpdate:value":d[11]||(d[11]=$=>o.data.pexels_api_key=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.stable_diffusion_base_url")},{default:Le(()=>[g(h,{value:o.data.stable_diffusion_base_url,"onUpdate:value":d[12]||(d[12]=$=>o.data.stable_diffusion_base_url=$)},null,8,["value"])]),_:1},8,["label"]),g(m,{label:Be(t)("components.layout.settingDrawer.use_system_proxy")},{default:Le(()=>[g(w,{checked:o.data.use_system_proxy,"onUpdate:checked":d[13]||(d[13]=$=>o.data.use_system_proxy=$)},null,8,["checked"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])]),_:1},8,["title","open"])],64)}}};var Dt={};const r$e="Á",o$e="á",a$e="Ă",i$e="ă",l$e="∾",s$e="∿",c$e="∾̳",u$e="Â",d$e="â",p$e="´",f$e="А",m$e="а",g$e="Æ",_$e="æ",h$e="⁡",v$e="𝔄",b$e="𝔞",S$e="À",E$e="à",y$e="ℵ",C$e="ℵ",T$e="Α",O$e="α",x$e="Ā",w$e="ā",R$e="⨿",I$e="&",N$e="&",A$e="⩕",D$e="⩓",P$e="∧",M$e="⩜",$$e="⩘",L$e="⩚",k$e="∠",F$e="⦤",B$e="∠",U$e="⦨",H$e="⦩",z$e="⦪",G$e="⦫",V$e="⦬",Y$e="⦭",W$e="⦮",q$e="⦯",K$e="∡",j$e="∟",X$e="⊾",Q$e="⦝",Z$e="∢",J$e="Å",eLe="⍼",tLe="Ą",nLe="ą",rLe="𝔸",oLe="𝕒",aLe="⩯",iLe="≈",lLe="⩰",sLe="≊",cLe="≋",uLe="'",dLe="⁡",pLe="≈",fLe="≊",mLe="Å",gLe="å",_Le="𝒜",hLe="𝒶",vLe="≔",bLe="*",SLe="≈",ELe="≍",yLe="Ã",CLe="ã",TLe="Ä",OLe="ä",xLe="∳",wLe="⨑",RLe="≌",ILe="϶",NLe="‵",ALe="∽",DLe="⋍",PLe="∖",MLe="⫧",$Le="⊽",LLe="⌅",kLe="⌆",FLe="⌅",BLe="⎵",ULe="⎶",HLe="≌",zLe="Б",GLe="б",VLe="„",YLe="∵",WLe="∵",qLe="∵",KLe="⦰",jLe="϶",XLe="ℬ",QLe="ℬ",ZLe="Β",JLe="β",eke="ℶ",tke="≬",nke="𝔅",rke="𝔟",oke="⋂",ake="◯",ike="⋃",lke="⨀",ske="⨁",cke="⨂",uke="⨆",dke="★",pke="▽",fke="△",mke="⨄",gke="⋁",_ke="⋀",hke="⤍",vke="⧫",bke="▪",Ske="▴",Eke="▾",yke="◂",Cke="▸",Tke="␣",Oke="▒",xke="░",wke="▓",Rke="█",Ike="=⃥",Nke="≡⃥",Ake="⫭",Dke="⌐",Pke="𝔹",Mke="𝕓",$ke="⊥",Lke="⊥",kke="⋈",Fke="⧉",Bke="┐",Uke="╕",Hke="╖",zke="╗",Gke="┌",Vke="╒",Yke="╓",Wke="╔",qke="─",Kke="═",jke="┬",Xke="╤",Qke="╥",Zke="╦",Jke="┴",e2e="╧",t2e="╨",n2e="╩",r2e="⊟",o2e="⊞",a2e="⊠",i2e="┘",l2e="╛",s2e="╜",c2e="╝",u2e="└",d2e="╘",p2e="╙",f2e="╚",m2e="│",g2e="║",_2e="┼",h2e="╪",v2e="╫",b2e="╬",S2e="┤",E2e="╡",y2e="╢",C2e="╣",T2e="├",O2e="╞",x2e="╟",w2e="╠",R2e="‵",I2e="˘",N2e="˘",A2e="¦",D2e="𝒷",P2e="ℬ",M2e="⁏",$2e="∽",L2e="⋍",k2e="⧅",F2e="\\",B2e="⟈",U2e="•",H2e="•",z2e="≎",G2e="⪮",V2e="≏",Y2e="≎",W2e="≏",q2e="Ć",K2e="ć",j2e="⩄",X2e="⩉",Q2e="⩋",Z2e="∩",J2e="⋒",eFe="⩇",tFe="⩀",nFe="ⅅ",rFe="∩︀",oFe="⁁",aFe="ˇ",iFe="ℭ",lFe="⩍",sFe="Č",cFe="č",uFe="Ç",dFe="ç",pFe="Ĉ",fFe="ĉ",mFe="∰",gFe="⩌",_Fe="⩐",hFe="Ċ",vFe="ċ",bFe="¸",SFe="¸",EFe="⦲",yFe="¢",CFe="·",TFe="·",OFe="𝔠",xFe="ℭ",wFe="Ч",RFe="ч",IFe="✓",NFe="✓",AFe="Χ",DFe="χ",PFe="ˆ",MFe="≗",$Fe="↺",LFe="↻",kFe="⊛",FFe="⊚",BFe="⊝",UFe="⊙",HFe="®",zFe="Ⓢ",GFe="⊖",VFe="⊕",YFe="⊗",WFe="○",qFe="⧃",KFe="≗",jFe="⨐",XFe="⫯",QFe="⧂",ZFe="∲",JFe="”",eBe="’",tBe="♣",nBe="♣",rBe=":",oBe="∷",aBe="⩴",iBe="≔",lBe="≔",sBe=",",cBe="@",uBe="∁",dBe="∘",pBe="∁",fBe="ℂ",mBe="≅",gBe="⩭",_Be="≡",hBe="∮",vBe="∯",bBe="∮",SBe="𝕔",EBe="ℂ",yBe="∐",CBe="∐",TBe="©",OBe="©",xBe="℗",wBe="∳",RBe="↵",IBe="✗",NBe="⨯",ABe="𝒞",DBe="𝒸",PBe="⫏",MBe="⫑",$Be="⫐",LBe="⫒",kBe="⋯",FBe="⤸",BBe="⤵",UBe="⋞",HBe="⋟",zBe="↶",GBe="⤽",VBe="⩈",YBe="⩆",WBe="≍",qBe="∪",KBe="⋓",jBe="⩊",XBe="⊍",QBe="⩅",ZBe="∪︀",JBe="↷",e3e="⤼",t3e="⋞",n3e="⋟",r3e="⋎",o3e="⋏",a3e="¤",i3e="↶",l3e="↷",s3e="⋎",c3e="⋏",u3e="∲",d3e="∱",p3e="⌭",f3e="†",m3e="‡",g3e="ℸ",_3e="↓",h3e="↡",v3e="⇓",b3e="‐",S3e="⫤",E3e="⊣",y3e="⤏",C3e="˝",T3e="Ď",O3e="ď",x3e="Д",w3e="д",R3e="‡",I3e="⇊",N3e="ⅅ",A3e="ⅆ",D3e="⤑",P3e="⩷",M3e="°",$3e="∇",L3e="Δ",k3e="δ",F3e="⦱",B3e="⥿",U3e="𝔇",H3e="𝔡",z3e="⥥",G3e="⇃",V3e="⇂",Y3e="´",W3e="˙",q3e="˝",K3e="`",j3e="˜",X3e="⋄",Q3e="⋄",Z3e="⋄",J3e="♦",e4e="♦",t4e="¨",n4e="ⅆ",r4e="ϝ",o4e="⋲",a4e="÷",i4e="÷",l4e="⋇",s4e="⋇",c4e="Ђ",u4e="ђ",d4e="⌞",p4e="⌍",f4e="$",m4e="𝔻",g4e="𝕕",_4e="¨",h4e="˙",v4e="⃜",b4e="≐",S4e="≑",E4e="≐",y4e="∸",C4e="∔",T4e="⊡",O4e="⌆",x4e="∯",w4e="¨",R4e="⇓",I4e="⇐",N4e="⇔",A4e="⫤",D4e="⟸",P4e="⟺",M4e="⟹",$4e="⇒",L4e="⊨",k4e="⇑",F4e="⇕",B4e="∥",U4e="⤓",H4e="↓",z4e="↓",G4e="⇓",V4e="⇵",Y4e="̑",W4e="⇊",q4e="⇃",K4e="⇂",j4e="⥐",X4e="⥞",Q4e="⥖",Z4e="↽",J4e="⥟",eUe="⥗",tUe="⇁",nUe="↧",rUe="⊤",oUe="⤐",aUe="⌟",iUe="⌌",lUe="𝒟",sUe="𝒹",cUe="Ѕ",uUe="ѕ",dUe="⧶",pUe="Đ",fUe="đ",mUe="⋱",gUe="▿",_Ue="▾",hUe="⇵",vUe="⥯",bUe="⦦",SUe="Џ",EUe="џ",yUe="⟿",CUe="É",TUe="é",OUe="⩮",xUe="Ě",wUe="ě",RUe="Ê",IUe="ê",NUe="≖",AUe="≕",DUe="Э",PUe="э",MUe="⩷",$Ue="Ė",LUe="ė",kUe="≑",FUe="ⅇ",BUe="≒",UUe="𝔈",HUe="𝔢",zUe="⪚",GUe="È",VUe="è",YUe="⪖",WUe="⪘",qUe="⪙",KUe="∈",jUe="⏧",XUe="ℓ",QUe="⪕",ZUe="⪗",JUe="Ē",e6e="ē",t6e="∅",n6e="∅",r6e="◻",o6e="∅",a6e="▫",i6e=" ",l6e=" ",s6e=" ",c6e="Ŋ",u6e="ŋ",d6e=" ",p6e="Ę",f6e="ę",m6e="𝔼",g6e="𝕖",_6e="⋕",h6e="⧣",v6e="⩱",b6e="ε",S6e="Ε",E6e="ε",y6e="ϵ",C6e="≖",T6e="≕",O6e="≂",x6e="⪖",w6e="⪕",R6e="⩵",I6e="=",N6e="≂",A6e="≟",D6e="⇌",P6e="≡",M6e="⩸",$6e="⧥",L6e="⥱",k6e="≓",F6e="ℯ",B6e="ℰ",U6e="≐",H6e="⩳",z6e="≂",G6e="Η",V6e="η",Y6e="Ð",W6e="ð",q6e="Ë",K6e="ë",j6e="€",X6e="!",Q6e="∃",Z6e="∃",J6e="ℰ",e8e="ⅇ",t8e="ⅇ",n8e="≒",r8e="Ф",o8e="ф",a8e="♀",i8e="ffi",l8e="ff",s8e="ffl",c8e="𝔉",u8e="𝔣",d8e="fi",p8e="◼",f8e="▪",m8e="fj",g8e="♭",_8e="fl",h8e="▱",v8e="ƒ",b8e="𝔽",S8e="𝕗",E8e="∀",y8e="∀",C8e="⋔",T8e="⫙",O8e="ℱ",x8e="⨍",w8e="½",R8e="⅓",I8e="¼",N8e="⅕",A8e="⅙",D8e="⅛",P8e="⅔",M8e="⅖",$8e="¾",L8e="⅗",k8e="⅜",F8e="⅘",B8e="⅚",U8e="⅝",H8e="⅞",z8e="⁄",G8e="⌢",V8e="𝒻",Y8e="ℱ",W8e="ǵ",q8e="Γ",K8e="γ",j8e="Ϝ",X8e="ϝ",Q8e="⪆",Z8e="Ğ",J8e="ğ",e5e="Ģ",t5e="Ĝ",n5e="ĝ",r5e="Г",o5e="г",a5e="Ġ",i5e="ġ",l5e="≥",s5e="≧",c5e="⪌",u5e="⋛",d5e="≥",p5e="≧",f5e="⩾",m5e="⪩",g5e="⩾",_5e="⪀",h5e="⪂",v5e="⪄",b5e="⋛︀",S5e="⪔",E5e="𝔊",y5e="𝔤",C5e="≫",T5e="⋙",O5e="⋙",x5e="ℷ",w5e="Ѓ",R5e="ѓ",I5e="⪥",N5e="≷",A5e="⪒",D5e="⪤",P5e="⪊",M5e="⪊",$5e="⪈",L5e="≩",k5e="⪈",F5e="≩",B5e="⋧",U5e="𝔾",H5e="𝕘",z5e="`",G5e="≥",V5e="⋛",Y5e="≧",W5e="⪢",q5e="≷",K5e="⩾",j5e="≳",X5e="𝒢",Q5e="ℊ",Z5e="≳",J5e="⪎",eHe="⪐",tHe="⪧",nHe="⩺",rHe=">",oHe=">",aHe="≫",iHe="⋗",lHe="⦕",sHe="⩼",cHe="⪆",uHe="⥸",dHe="⋗",pHe="⋛",fHe="⪌",mHe="≷",gHe="≳",_He="≩︀",hHe="≩︀",vHe="ˇ",bHe=" ",SHe="½",EHe="ℋ",yHe="Ъ",CHe="ъ",THe="⥈",OHe="↔",xHe="⇔",wHe="↭",RHe="^",IHe="ℏ",NHe="Ĥ",AHe="ĥ",DHe="♥",PHe="♥",MHe="…",$He="⊹",LHe="𝔥",kHe="ℌ",FHe="ℋ",BHe="⤥",UHe="⤦",HHe="⇿",zHe="∻",GHe="↩",VHe="↪",YHe="𝕙",WHe="ℍ",qHe="―",KHe="─",jHe="𝒽",XHe="ℋ",QHe="ℏ",ZHe="Ħ",JHe="ħ",eze="≎",tze="≏",nze="⁃",rze="‐",oze="Í",aze="í",ize="⁣",lze="Î",sze="î",cze="И",uze="и",dze="İ",pze="Е",fze="е",mze="¡",gze="⇔",_ze="𝔦",hze="ℑ",vze="Ì",bze="ì",Sze="ⅈ",Eze="⨌",yze="∭",Cze="⧜",Tze="℩",Oze="IJ",xze="ij",wze="Ī",Rze="ī",Ize="ℑ",Nze="ⅈ",Aze="ℐ",Dze="ℑ",Pze="ı",Mze="ℑ",$ze="⊷",Lze="Ƶ",kze="⇒",Fze="℅",Bze="∞",Uze="⧝",Hze="ı",zze="⊺",Gze="∫",Vze="∬",Yze="ℤ",Wze="∫",qze="⊺",Kze="⋂",jze="⨗",Xze="⨼",Qze="⁣",Zze="⁢",Jze="Ё",eGe="ё",tGe="Į",nGe="į",rGe="𝕀",oGe="𝕚",aGe="Ι",iGe="ι",lGe="⨼",sGe="¿",cGe="𝒾",uGe="ℐ",dGe="∈",pGe="⋵",fGe="⋹",mGe="⋴",gGe="⋳",_Ge="∈",hGe="⁢",vGe="Ĩ",bGe="ĩ",SGe="І",EGe="і",yGe="Ï",CGe="ï",TGe="Ĵ",OGe="ĵ",xGe="Й",wGe="й",RGe="𝔍",IGe="𝔧",NGe="ȷ",AGe="𝕁",DGe="𝕛",PGe="𝒥",MGe="𝒿",$Ge="Ј",LGe="ј",kGe="Є",FGe="є",BGe="Κ",UGe="κ",HGe="ϰ",zGe="Ķ",GGe="ķ",VGe="К",YGe="к",WGe="𝔎",qGe="𝔨",KGe="ĸ",jGe="Х",XGe="х",QGe="Ќ",ZGe="ќ",JGe="𝕂",e7e="𝕜",t7e="𝒦",n7e="𝓀",r7e="⇚",o7e="Ĺ",a7e="ĺ",i7e="⦴",l7e="ℒ",s7e="Λ",c7e="λ",u7e="⟨",d7e="⟪",p7e="⦑",f7e="⟨",m7e="⪅",g7e="ℒ",_7e="«",h7e="⇤",v7e="⤟",b7e="←",S7e="↞",E7e="⇐",y7e="⤝",C7e="↩",T7e="↫",O7e="⤹",x7e="⥳",w7e="↢",R7e="⤙",I7e="⤛",N7e="⪫",A7e="⪭",D7e="⪭︀",P7e="⤌",M7e="⤎",$7e="❲",L7e="{",k7e="[",F7e="⦋",B7e="⦏",U7e="⦍",H7e="Ľ",z7e="ľ",G7e="Ļ",V7e="ļ",Y7e="⌈",W7e="{",q7e="Л",K7e="л",j7e="⤶",X7e="“",Q7e="„",Z7e="⥧",J7e="⥋",e9e="↲",t9e="≤",n9e="≦",r9e="⟨",o9e="⇤",a9e="←",i9e="←",l9e="⇐",s9e="⇆",c9e="↢",u9e="⌈",d9e="⟦",p9e="⥡",f9e="⥙",m9e="⇃",g9e="⌊",_9e="↽",h9e="↼",v9e="⇇",b9e="↔",S9e="↔",E9e="⇔",y9e="⇆",C9e="⇋",T9e="↭",O9e="⥎",x9e="↤",w9e="⊣",R9e="⥚",I9e="⋋",N9e="⧏",A9e="⊲",D9e="⊴",P9e="⥑",M9e="⥠",$9e="⥘",L9e="↿",k9e="⥒",F9e="↼",B9e="⪋",U9e="⋚",H9e="≤",z9e="≦",G9e="⩽",V9e="⪨",Y9e="⩽",W9e="⩿",q9e="⪁",K9e="⪃",j9e="⋚︀",X9e="⪓",Q9e="⪅",Z9e="⋖",J9e="⋚",eVe="⪋",tVe="⋚",nVe="≦",rVe="≶",oVe="≶",aVe="⪡",iVe="≲",lVe="⩽",sVe="≲",cVe="⥼",uVe="⌊",dVe="𝔏",pVe="𝔩",fVe="≶",mVe="⪑",gVe="⥢",_Ve="↽",hVe="↼",vVe="⥪",bVe="▄",SVe="Љ",EVe="љ",yVe="⇇",CVe="≪",TVe="⋘",OVe="⌞",xVe="⇚",wVe="⥫",RVe="◺",IVe="Ŀ",NVe="ŀ",AVe="⎰",DVe="⎰",PVe="⪉",MVe="⪉",$Ve="⪇",LVe="≨",kVe="⪇",FVe="≨",BVe="⋦",UVe="⟬",HVe="⇽",zVe="⟦",GVe="⟵",VVe="⟵",YVe="⟸",WVe="⟷",qVe="⟷",KVe="⟺",jVe="⟼",XVe="⟶",QVe="⟶",ZVe="⟹",JVe="↫",eYe="↬",tYe="⦅",nYe="𝕃",rYe="𝕝",oYe="⨭",aYe="⨴",iYe="∗",lYe="_",sYe="↙",cYe="↘",uYe="◊",dYe="◊",pYe="⧫",fYe="(",mYe="⦓",gYe="⇆",_Ye="⌟",hYe="⇋",vYe="⥭",bYe="‎",SYe="⊿",EYe="‹",yYe="𝓁",CYe="ℒ",TYe="↰",OYe="↰",xYe="≲",wYe="⪍",RYe="⪏",IYe="[",NYe="‘",AYe="‚",DYe="Ł",PYe="ł",MYe="⪦",$Ye="⩹",LYe="<",kYe="<",FYe="≪",BYe="⋖",UYe="⋋",HYe="⋉",zYe="⥶",GYe="⩻",VYe="◃",YYe="⊴",WYe="◂",qYe="⦖",KYe="⥊",jYe="⥦",XYe="≨︀",QYe="≨︀",ZYe="¯",JYe="♂",eWe="✠",tWe="✠",nWe="↦",rWe="↦",oWe="↧",aWe="↤",iWe="↥",lWe="▮",sWe="⨩",cWe="М",uWe="м",dWe="—",pWe="∺",fWe="∡",mWe=" ",gWe="ℳ",_We="𝔐",hWe="𝔪",vWe="℧",bWe="µ",SWe="*",EWe="⫰",yWe="∣",CWe="·",TWe="⊟",OWe="−",xWe="∸",wWe="⨪",RWe="∓",IWe="⫛",NWe="…",AWe="∓",DWe="⊧",PWe="𝕄",MWe="𝕞",$We="∓",LWe="𝓂",kWe="ℳ",FWe="∾",BWe="Μ",UWe="μ",HWe="⊸",zWe="⊸",GWe="∇",VWe="Ń",YWe="ń",WWe="∠⃒",qWe="≉",KWe="⩰̸",jWe="≋̸",XWe="ʼn",QWe="≉",ZWe="♮",JWe="ℕ",eqe="♮",tqe=" ",nqe="≎̸",rqe="≏̸",oqe="⩃",aqe="Ň",iqe="ň",lqe="Ņ",sqe="ņ",cqe="≇",uqe="⩭̸",dqe="⩂",pqe="Н",fqe="н",mqe="–",gqe="⤤",_qe="↗",hqe="⇗",vqe="↗",bqe="≠",Sqe="≐̸",Eqe="​",yqe="​",Cqe="​",Tqe="​",Oqe="≢",xqe="⤨",wqe="≂̸",Rqe="≫",Iqe="≪",Nqe=` `,Aqe="∄",Dqe="∄",Pqe="𝔑",Mqe="𝔫",$qe="≧̸",Lqe="≱",kqe="≱",Fqe="≧̸",Bqe="⩾̸",Uqe="⩾̸",Hqe="⋙̸",zqe="≵",Gqe="≫⃒",Vqe="≯",Yqe="≯",Wqe="≫̸",qqe="↮",Kqe="⇎",jqe="⫲",Xqe="∋",Qqe="⋼",Zqe="⋺",Jqe="∋",eKe="Њ",tKe="њ",nKe="↚",rKe="⇍",oKe="‥",aKe="≦̸",iKe="≰",lKe="↚",sKe="⇍",cKe="↮",uKe="⇎",dKe="≰",pKe="≦̸",fKe="⩽̸",mKe="⩽̸",gKe="≮",_Ke="⋘̸",hKe="≴",vKe="≪⃒",bKe="≮",SKe="⋪",EKe="⋬",yKe="≪̸",CKe="∤",TKe="⁠",OKe=" ",xKe="𝕟",wKe="ℕ",RKe="⫬",IKe="¬",NKe="≢",AKe="≭",DKe="∦",PKe="∉",MKe="≠",$Ke="≂̸",LKe="∄",kKe="≯",FKe="≱",BKe="≧̸",UKe="≫̸",HKe="≹",zKe="⩾̸",GKe="≵",VKe="≎̸",YKe="≏̸",WKe="∉",qKe="⋵̸",KKe="⋹̸",jKe="∉",XKe="⋷",QKe="⋶",ZKe="⧏̸",JKe="⋪",eje="⋬",tje="≮",nje="≰",rje="≸",oje="≪̸",aje="⩽̸",ije="≴",lje="⪢̸",sje="⪡̸",cje="∌",uje="∌",dje="⋾",pje="⋽",fje="⊀",mje="⪯̸",gje="⋠",_je="∌",hje="⧐̸",vje="⋫",bje="⋭",Sje="⊏̸",Eje="⋢",yje="⊐̸",Cje="⋣",Tje="⊂⃒",Oje="⊈",xje="⊁",wje="⪰̸",Rje="⋡",Ije="≿̸",Nje="⊃⃒",Aje="⊉",Dje="≁",Pje="≄",Mje="≇",$je="≉",Lje="∤",kje="∦",Fje="∦",Bje="⫽⃥",Uje="∂̸",Hje="⨔",zje="⊀",Gje="⋠",Vje="⊀",Yje="⪯̸",Wje="⪯̸",qje="⤳̸",Kje="↛",jje="⇏",Xje="↝̸",Qje="↛",Zje="⇏",Jje="⋫",eXe="⋭",tXe="⊁",nXe="⋡",rXe="⪰̸",oXe="𝒩",aXe="𝓃",iXe="∤",lXe="∦",sXe="≁",cXe="≄",uXe="≄",dXe="∤",pXe="∦",fXe="⋢",mXe="⋣",gXe="⊄",_Xe="⫅̸",hXe="⊈",vXe="⊂⃒",bXe="⊈",SXe="⫅̸",EXe="⊁",yXe="⪰̸",CXe="⊅",TXe="⫆̸",OXe="⊉",xXe="⊃⃒",wXe="⊉",RXe="⫆̸",IXe="≹",NXe="Ñ",AXe="ñ",DXe="≸",PXe="⋪",MXe="⋬",$Xe="⋫",LXe="⋭",kXe="Ν",FXe="ν",BXe="#",UXe="№",HXe=" ",zXe="≍⃒",GXe="⊬",VXe="⊭",YXe="⊮",WXe="⊯",qXe="≥⃒",KXe=">⃒",jXe="⤄",XXe="⧞",QXe="⤂",ZXe="≤⃒",JXe="<⃒",eQe="⊴⃒",tQe="⤃",nQe="⊵⃒",rQe="∼⃒",oQe="⤣",aQe="↖",iQe="⇖",lQe="↖",sQe="⤧",cQe="Ó",uQe="ó",dQe="⊛",pQe="Ô",fQe="ô",mQe="⊚",gQe="О",_Qe="о",hQe="⊝",vQe="Ő",bQe="ő",SQe="⨸",EQe="⊙",yQe="⦼",CQe="Œ",TQe="œ",OQe="⦿",xQe="𝔒",wQe="𝔬",RQe="˛",IQe="Ò",NQe="ò",AQe="⧁",DQe="⦵",PQe="Ω",MQe="∮",$Qe="↺",LQe="⦾",kQe="⦻",FQe="‾",BQe="⧀",UQe="Ō",HQe="ō",zQe="Ω",GQe="ω",VQe="Ο",YQe="ο",WQe="⦶",qQe="⊖",KQe="𝕆",jQe="𝕠",XQe="⦷",QQe="“",ZQe="‘",JQe="⦹",eZe="⊕",tZe="↻",nZe="⩔",rZe="∨",oZe="⩝",aZe="ℴ",iZe="ℴ",lZe="ª",sZe="º",cZe="⊶",uZe="⩖",dZe="⩗",pZe="⩛",fZe="Ⓢ",mZe="𝒪",gZe="ℴ",_Ze="Ø",hZe="ø",vZe="⊘",bZe="Õ",SZe="õ",EZe="⨶",yZe="⨷",CZe="⊗",TZe="Ö",OZe="ö",xZe="⌽",wZe="‾",RZe="⏞",IZe="⎴",NZe="⏜",AZe="¶",DZe="∥",PZe="∥",MZe="⫳",$Ze="⫽",LZe="∂",kZe="∂",FZe="П",BZe="п",UZe="%",HZe=".",zZe="‰",GZe="⊥",VZe="‱",YZe="𝔓",WZe="𝔭",qZe="Φ",KZe="φ",jZe="ϕ",XZe="ℳ",QZe="☎",ZZe="Π",JZe="π",eJe="⋔",tJe="ϖ",nJe="ℏ",rJe="ℎ",oJe="ℏ",aJe="⨣",iJe="⊞",lJe="⨢",sJe="+",cJe="∔",uJe="⨥",dJe="⩲",pJe="±",fJe="±",mJe="⨦",gJe="⨧",_Je="±",hJe="ℌ",vJe="⨕",bJe="𝕡",SJe="ℙ",EJe="£",yJe="⪷",CJe="⪻",TJe="≺",OJe="≼",xJe="⪷",wJe="≺",RJe="≼",IJe="≺",NJe="⪯",AJe="≼",DJe="≾",PJe="⪯",MJe="⪹",$Je="⪵",LJe="⋨",kJe="⪯",FJe="⪳",BJe="≾",UJe="′",HJe="″",zJe="ℙ",GJe="⪹",VJe="⪵",YJe="⋨",WJe="∏",qJe="∏",KJe="⌮",jJe="⌒",XJe="⌓",QJe="∝",ZJe="∝",JJe="∷",eet="∝",tet="≾",net="⊰",ret="𝒫",oet="𝓅",aet="Ψ",iet="ψ",set=" ",cet="𝔔",uet="𝔮",det="⨌",pet="𝕢",fet="ℚ",met="⁗",get="𝒬",_et="𝓆",het="ℍ",vet="⨖",bet="?",Eet="≟",yet='"',Cet='"',Tet="⇛",Oet="∽̱",xet="Ŕ",wet="ŕ",Ret="√",Iet="⦳",Net="⟩",Aet="⟫",Det="⦒",Pet="⦥",Met="⟩",$et="»",Let="⥵",ket="⇥",Fet="⤠",Bet="⤳",Uet="→",Het="↠",zet="⇒",Get="⤞",Vet="↪",Yet="↬",Wet="⥅",qet="⥴",Ket="⤖",jet="↣",Xet="↝",Qet="⤚",Zet="⤜",Jet="∶",ett="ℚ",ttt="⤍",ntt="⤏",rtt="⤐",ott="❳",att="}",itt="]",ltt="⦌",stt="⦎",ctt="⦐",utt="Ř",dtt="ř",ptt="Ŗ",ftt="ŗ",mtt="⌉",gtt="}",_tt="Р",htt="р",vtt="⤷",btt="⥩",Stt="”",Ett="”",ytt="↳",Ctt="ℜ",Ttt="ℛ",Ott="ℜ",xtt="ℝ",wtt="ℜ",Rtt="▭",Itt="®",Ntt="®",Att="∋",Dtt="⇋",Ptt="⥯",Mtt="⥽",$tt="⌋",Ltt="𝔯",ktt="ℜ",Ftt="⥤",Btt="⇁",Utt="⇀",Htt="⥬",ztt="Ρ",Gtt="ρ",Vtt="ϱ",Ytt="⟩",Wtt="⇥",qtt="→",Ktt="→",jtt="⇒",Xtt="⇄",Qtt="↣",Ztt="⌉",Jtt="⟧",ent="⥝",tnt="⥕",nnt="⇂",rnt="⌋",ont="⇁",ant="⇀",int="⇄",lnt="⇌",snt="⇉",cnt="↝",unt="↦",dnt="⊢",pnt="⥛",fnt="⋌",mnt="⧐",gnt="⊳",_nt="⊵",hnt="⥏",vnt="⥜",bnt="⥔",Snt="↾",Ent="⥓",ynt="⇀",Cnt="˚",Tnt="≓",Ont="⇄",xnt="⇌",wnt="‏",Rnt="⎱",Int="⎱",Nnt="⫮",Ant="⟭",Dnt="⇾",Pnt="⟧",Mnt="⦆",$nt="𝕣",Lnt="ℝ",knt="⨮",Fnt="⨵",Bnt="⥰",Unt=")",Hnt="⦔",znt="⨒",Gnt="⇉",Vnt="⇛",Ynt="›",Wnt="𝓇",qnt="ℛ",Knt="↱",jnt="↱",Xnt="]",Qnt="’",Znt="’",Jnt="⋌",ert="⋊",trt="▹",nrt="⊵",rrt="▸",ort="⧎",art="⧴",irt="⥨",lrt="℞",srt="Ś",crt="ś",urt="‚",drt="⪸",prt="Š",frt="š",mrt="⪼",grt="≻",_rt="≽",hrt="⪰",vrt="⪴",brt="Ş",Srt="ş",Ert="Ŝ",yrt="ŝ",Crt="⪺",Trt="⪶",Ort="⋩",xrt="⨓",wrt="≿",Rrt="С",Irt="с",Nrt="⊡",Art="⋅",Drt="⩦",Prt="⤥",Mrt="↘",$rt="⇘",Lrt="↘",krt="§",Frt=";",Brt="⤩",Urt="∖",Hrt="∖",zrt="✶",Grt="𝔖",Vrt="𝔰",Yrt="⌢",Wrt="♯",qrt="Щ",Krt="щ",jrt="Ш",Xrt="ш",Qrt="↓",Zrt="←",Jrt="∣",eot="∥",tot="→",not="↑",rot="­",oot="Σ",aot="σ",iot="ς",lot="ς",sot="∼",cot="⩪",uot="≃",dot="≃",pot="⪞",fot="⪠",mot="⪝",got="⪟",_ot="≆",hot="⨤",vot="⥲",bot="←",Sot="∘",Eot="∖",yot="⨳",Cot="⧤",Tot="∣",Oot="⌣",xot="⪪",wot="⪬",Rot="⪬︀",Iot="Ь",Not="ь",Aot="⌿",Dot="⧄",Pot="/",Mot="𝕊",$ot="𝕤",Lot="♠",kot="♠",Fot="∥",Bot="⊓",Uot="⊓︀",Hot="⊔",zot="⊔︀",Got="√",Vot="⊏",Yot="⊑",Wot="⊏",qot="⊑",Kot="⊐",jot="⊒",Xot="⊐",Qot="⊒",Zot="□",Jot="□",eat="⊓",tat="⊏",nat="⊑",rat="⊐",oat="⊒",aat="⊔",iat="▪",lat="□",sat="▪",cat="→",uat="𝒮",dat="𝓈",pat="∖",fat="⌣",mat="⋆",gat="⋆",_at="☆",hat="★",vat="ϵ",bat="ϕ",Sat="¯",Eat="⊂",yat="⋐",Cat="⪽",Tat="⫅",Oat="⊆",xat="⫃",wat="⫁",Rat="⫋",Iat="⊊",Nat="⪿",Aat="⥹",Dat="⊂",Pat="⋐",Mat="⊆",$at="⫅",Lat="⊆",kat="⊊",Fat="⫋",Bat="⫇",Uat="⫕",Hat="⫓",zat="⪸",Gat="≻",Vat="≽",Yat="≻",Wat="⪰",qat="≽",Kat="≿",jat="⪰",Xat="⪺",Qat="⪶",Zat="⋩",Jat="≿",eit="∋",tit="∑",nit="∑",rit="♪",oit="¹",ait="²",iit="³",lit="⊃",sit="⋑",cit="⪾",uit="⫘",dit="⫆",pit="⊇",fit="⫄",mit="⊃",git="⊇",_it="⟉",hit="⫗",vit="⥻",bit="⫂",Sit="⫌",Eit="⊋",yit="⫀",Cit="⊃",Tit="⋑",Oit="⊇",xit="⫆",wit="⊋",Rit="⫌",Iit="⫈",Nit="⫔",Ait="⫖",Dit="⤦",Pit="↙",Mit="⇙",$it="↙",Lit="⤪",kit="ß",Fit=" ",Bit="⌖",Uit="Τ",Hit="τ",zit="⎴",Git="Ť",Vit="ť",Yit="Ţ",Wit="ţ",qit="Т",Kit="т",jit="⃛",Xit="⌕",Qit="𝔗",Zit="𝔱",Jit="∴",elt="∴",tlt="∴",nlt="Θ",rlt="θ",olt="ϑ",alt="ϑ",ilt="≈",llt="∼",slt="  ",clt=" ",ult=" ",dlt="≈",plt="∼",flt="Þ",mlt="þ",glt="˜",_lt="∼",hlt="≃",vlt="≅",blt="≈",Slt="⨱",Elt="⊠",ylt="×",Clt="⨰",Tlt="∭",Olt="⤨",xlt="⌶",wlt="⫱",Rlt="⊤",Ilt="𝕋",Nlt="𝕥",Alt="⫚",Dlt="⤩",Plt="‴",Mlt="™",$lt="™",Llt="▵",klt="▿",Flt="◃",Blt="⊴",Ult="≜",Hlt="▹",zlt="⊵",Glt="◬",Vlt="≜",Ylt="⨺",Wlt="⃛",qlt="⨹",Klt="⧍",jlt="⨻",Xlt="⏢",Qlt="𝒯",Zlt="𝓉",Jlt="Ц",est="ц",tst="Ћ",nst="ћ",rst="Ŧ",ost="ŧ",ast="≬",ist="↞",lst="↠",sst="Ú",cst="ú",ust="↑",dst="↟",pst="⇑",fst="⥉",mst="Ў",gst="ў",_st="Ŭ",hst="ŭ",vst="Û",bst="û",Sst="У",Est="у",yst="⇅",Cst="Ű",Tst="ű",Ost="⥮",xst="⥾",wst="𝔘",Rst="𝔲",Ist="Ù",Nst="ù",Ast="⥣",Dst="↿",Pst="↾",Mst="▀",$st="⌜",Lst="⌜",kst="⌏",Fst="◸",Bst="Ū",Ust="ū",Hst="¨",zst="_",Gst="⏟",Vst="⎵",Yst="⏝",Wst="⋃",qst="⊎",Kst="Ų",jst="ų",Xst="𝕌",Qst="𝕦",Zst="⤒",Jst="↑",ect="↑",tct="⇑",nct="⇅",rct="↕",oct="↕",act="⇕",ict="⥮",lct="↿",sct="↾",cct="⊎",uct="↖",dct="↗",pct="υ",fct="ϒ",mct="ϒ",gct="Υ",_ct="υ",hct="↥",vct="⊥",bct="⇈",Sct="⌝",Ect="⌝",yct="⌎",Cct="Ů",Tct="ů",Oct="◹",xct="𝒰",wct="𝓊",Rct="⋰",Ict="Ũ",Nct="ũ",Act="▵",Dct="▴",Pct="⇈",Mct="Ü",$ct="ü",Lct="⦧",kct="⦜",Fct="ϵ",Bct="ϰ",Uct="∅",Hct="ϕ",zct="ϖ",Gct="∝",Vct="↕",Yct="⇕",Wct="ϱ",qct="ς",Kct="⊊︀",jct="⫋︀",Xct="⊋︀",Qct="⫌︀",Zct="ϑ",Jct="⊲",eut="⊳",tut="⫨",nut="⫫",rut="⫩",out="В",aut="в",iut="⊢",lut="⊨",sut="⊩",cut="⊫",uut="⫦",dut="⊻",put="∨",fut="⋁",mut="≚",gut="⋮",_ut="|",hut="‖",vut="|",but="‖",Sut="∣",Eut="|",yut="❘",Cut="≀",Tut=" ",Out="𝔙",xut="𝔳",wut="⊲",Rut="⊂⃒",Iut="⊃⃒",Nut="𝕍",Aut="𝕧",Dut="∝",Put="⊳",Mut="𝒱",$ut="𝓋",Lut="⫋︀",kut="⊊︀",Fut="⫌︀",But="⊋︀",Uut="⊪",Hut="⦚",zut="Ŵ",Gut="ŵ",Vut="⩟",Yut="∧",Wut="⋀",qut="≙",Kut="℘",jut="𝔚",Xut="𝔴",Qut="𝕎",Zut="𝕨",Jut="℘",edt="≀",tdt="≀",ndt="𝒲",rdt="𝓌",odt="⋂",adt="◯",idt="⋃",ldt="▽",sdt="𝔛",cdt="𝔵",udt="⟷",ddt="⟺",pdt="Ξ",fdt="ξ",mdt="⟵",gdt="⟸",_dt="⟼",hdt="⋻",vdt="⨀",bdt="𝕏",Sdt="𝕩",Edt="⨁",ydt="⨂",Cdt="⟶",Tdt="⟹",Odt="𝒳",xdt="𝓍",wdt="⨆",Rdt="⨄",Idt="△",Ndt="⋁",Adt="⋀",Ddt="Ý",Pdt="ý",Mdt="Я",$dt="я",Ldt="Ŷ",kdt="ŷ",Fdt="Ы",Bdt="ы",Udt="¥",Hdt="𝔜",zdt="𝔶",Gdt="Ї",Vdt="ї",Ydt="𝕐",Wdt="𝕪",qdt="𝒴",Kdt="𝓎",jdt="Ю",Xdt="ю",Qdt="ÿ",Zdt="Ÿ",Jdt="Ź",ept="ź",tpt="Ž",npt="ž",rpt="З",opt="з",apt="Ż",ipt="ż",lpt="ℨ",spt="​",cpt="Ζ",upt="ζ",dpt="𝔷",ppt="ℨ",fpt="Ж",mpt="ж",gpt="⇝",_pt="𝕫",hpt="ℤ",vpt="𝒵",bpt="𝓏",Spt="‍",Ept="‌",ypt={Aacute:r$e,aacute:o$e,Abreve:a$e,abreve:i$e,ac:l$e,acd:s$e,acE:c$e,Acirc:u$e,acirc:d$e,acute:p$e,Acy:f$e,acy:m$e,AElig:g$e,aelig:_$e,af:h$e,Afr:v$e,afr:b$e,Agrave:S$e,agrave:E$e,alefsym:y$e,aleph:C$e,Alpha:T$e,alpha:O$e,Amacr:x$e,amacr:w$e,amalg:R$e,amp:I$e,AMP:N$e,andand:A$e,And:D$e,and:P$e,andd:M$e,andslope:$$e,andv:L$e,ang:k$e,ange:F$e,angle:B$e,angmsdaa:U$e,angmsdab:H$e,angmsdac:z$e,angmsdad:G$e,angmsdae:V$e,angmsdaf:Y$e,angmsdag:W$e,angmsdah:q$e,angmsd:K$e,angrt:j$e,angrtvb:X$e,angrtvbd:Q$e,angsph:Z$e,angst:J$e,angzarr:eLe,Aogon:tLe,aogon:nLe,Aopf:rLe,aopf:oLe,apacir:aLe,ap:iLe,apE:lLe,ape:sLe,apid:cLe,apos:uLe,ApplyFunction:dLe,approx:pLe,approxeq:fLe,Aring:mLe,aring:gLe,Ascr:_Le,ascr:hLe,Assign:vLe,ast:bLe,asymp:SLe,asympeq:ELe,Atilde:yLe,atilde:CLe,Auml:TLe,auml:OLe,awconint:xLe,awint:wLe,backcong:RLe,backepsilon:ILe,backprime:NLe,backsim:ALe,backsimeq:DLe,Backslash:PLe,Barv:MLe,barvee:$Le,barwed:LLe,Barwed:kLe,barwedge:FLe,bbrk:BLe,bbrktbrk:ULe,bcong:HLe,Bcy:zLe,bcy:GLe,bdquo:VLe,becaus:YLe,because:WLe,Because:qLe,bemptyv:KLe,bepsi:jLe,bernou:XLe,Bernoullis:QLe,Beta:ZLe,beta:JLe,beth:eke,between:tke,Bfr:nke,bfr:rke,bigcap:oke,bigcirc:ake,bigcup:ike,bigodot:lke,bigoplus:ske,bigotimes:cke,bigsqcup:uke,bigstar:dke,bigtriangledown:pke,bigtriangleup:fke,biguplus:mke,bigvee:gke,bigwedge:_ke,bkarow:hke,blacklozenge:vke,blacksquare:bke,blacktriangle:Ske,blacktriangledown:Eke,blacktriangleleft:yke,blacktriangleright:Cke,blank:Tke,blk12:Oke,blk14:xke,blk34:wke,block:Rke,bne:Ike,bnequiv:Nke,bNot:Ake,bnot:Dke,Bopf:Pke,bopf:Mke,bot:$ke,bottom:Lke,bowtie:kke,boxbox:Fke,boxdl:Bke,boxdL:Uke,boxDl:Hke,boxDL:zke,boxdr:Gke,boxdR:Vke,boxDr:Yke,boxDR:Wke,boxh:qke,boxH:Kke,boxhd:jke,boxHd:Xke,boxhD:Qke,boxHD:Zke,boxhu:Jke,boxHu:e2e,boxhU:t2e,boxHU:n2e,boxminus:r2e,boxplus:o2e,boxtimes:a2e,boxul:i2e,boxuL:l2e,boxUl:s2e,boxUL:c2e,boxur:u2e,boxuR:d2e,boxUr:p2e,boxUR:f2e,boxv:m2e,boxV:g2e,boxvh:_2e,boxvH:h2e,boxVh:v2e,boxVH:b2e,boxvl:S2e,boxvL:E2e,boxVl:y2e,boxVL:C2e,boxvr:T2e,boxvR:O2e,boxVr:x2e,boxVR:w2e,bprime:R2e,breve:I2e,Breve:N2e,brvbar:A2e,bscr:D2e,Bscr:P2e,bsemi:M2e,bsim:$2e,bsime:L2e,bsolb:k2e,bsol:F2e,bsolhsub:B2e,bull:U2e,bullet:H2e,bump:z2e,bumpE:G2e,bumpe:V2e,Bumpeq:Y2e,bumpeq:W2e,Cacute:q2e,cacute:K2e,capand:j2e,capbrcup:X2e,capcap:Q2e,cap:Z2e,Cap:J2e,capcup:eFe,capdot:tFe,CapitalDifferentialD:nFe,caps:rFe,caret:oFe,caron:aFe,Cayleys:iFe,ccaps:lFe,Ccaron:sFe,ccaron:cFe,Ccedil:uFe,ccedil:dFe,Ccirc:pFe,ccirc:fFe,Cconint:mFe,ccups:gFe,ccupssm:_Fe,Cdot:hFe,cdot:vFe,cedil:bFe,Cedilla:SFe,cemptyv:EFe,cent:yFe,centerdot:CFe,CenterDot:TFe,cfr:OFe,Cfr:xFe,CHcy:wFe,chcy:RFe,check:IFe,checkmark:NFe,Chi:AFe,chi:DFe,circ:PFe,circeq:MFe,circlearrowleft:$Fe,circlearrowright:LFe,circledast:kFe,circledcirc:FFe,circleddash:BFe,CircleDot:UFe,circledR:HFe,circledS:zFe,CircleMinus:GFe,CirclePlus:VFe,CircleTimes:YFe,cir:WFe,cirE:qFe,cire:KFe,cirfnint:jFe,cirmid:XFe,cirscir:QFe,ClockwiseContourIntegral:ZFe,CloseCurlyDoubleQuote:JFe,CloseCurlyQuote:eBe,clubs:tBe,clubsuit:nBe,colon:rBe,Colon:oBe,Colone:aBe,colone:iBe,coloneq:lBe,comma:sBe,commat:cBe,comp:uBe,compfn:dBe,complement:pBe,complexes:fBe,cong:mBe,congdot:gBe,Congruent:_Be,conint:hBe,Conint:vBe,ContourIntegral:bBe,copf:SBe,Copf:EBe,coprod:yBe,Coproduct:CBe,copy:TBe,COPY:OBe,copysr:xBe,CounterClockwiseContourIntegral:wBe,crarr:RBe,cross:IBe,Cross:NBe,Cscr:ABe,cscr:DBe,csub:PBe,csube:MBe,csup:$Be,csupe:LBe,ctdot:kBe,cudarrl:FBe,cudarrr:BBe,cuepr:UBe,cuesc:HBe,cularr:zBe,cularrp:GBe,cupbrcap:VBe,cupcap:YBe,CupCap:WBe,cup:qBe,Cup:KBe,cupcup:jBe,cupdot:XBe,cupor:QBe,cups:ZBe,curarr:JBe,curarrm:e3e,curlyeqprec:t3e,curlyeqsucc:n3e,curlyvee:r3e,curlywedge:o3e,curren:a3e,curvearrowleft:i3e,curvearrowright:l3e,cuvee:s3e,cuwed:c3e,cwconint:u3e,cwint:d3e,cylcty:p3e,dagger:f3e,Dagger:m3e,daleth:g3e,darr:_3e,Darr:h3e,dArr:v3e,dash:b3e,Dashv:S3e,dashv:E3e,dbkarow:y3e,dblac:C3e,Dcaron:T3e,dcaron:O3e,Dcy:x3e,dcy:w3e,ddagger:R3e,ddarr:I3e,DD:N3e,dd:A3e,DDotrahd:D3e,ddotseq:P3e,deg:M3e,Del:$3e,Delta:L3e,delta:k3e,demptyv:F3e,dfisht:B3e,Dfr:U3e,dfr:H3e,dHar:z3e,dharl:G3e,dharr:V3e,DiacriticalAcute:Y3e,DiacriticalDot:W3e,DiacriticalDoubleAcute:q3e,DiacriticalGrave:K3e,DiacriticalTilde:j3e,diam:X3e,diamond:Q3e,Diamond:Z3e,diamondsuit:J3e,diams:e4e,die:t4e,DifferentialD:n4e,digamma:r4e,disin:o4e,div:a4e,divide:i4e,divideontimes:l4e,divonx:s4e,DJcy:c4e,djcy:u4e,dlcorn:d4e,dlcrop:p4e,dollar:f4e,Dopf:m4e,dopf:g4e,Dot:_4e,dot:h4e,DotDot:v4e,doteq:b4e,doteqdot:S4e,DotEqual:E4e,dotminus:y4e,dotplus:C4e,dotsquare:T4e,doublebarwedge:O4e,DoubleContourIntegral:x4e,DoubleDot:w4e,DoubleDownArrow:R4e,DoubleLeftArrow:I4e,DoubleLeftRightArrow:N4e,DoubleLeftTee:A4e,DoubleLongLeftArrow:D4e,DoubleLongLeftRightArrow:P4e,DoubleLongRightArrow:M4e,DoubleRightArrow:$4e,DoubleRightTee:L4e,DoubleUpArrow:k4e,DoubleUpDownArrow:F4e,DoubleVerticalBar:B4e,DownArrowBar:U4e,downarrow:H4e,DownArrow:z4e,Downarrow:G4e,DownArrowUpArrow:V4e,DownBreve:Y4e,downdownarrows:W4e,downharpoonleft:q4e,downharpoonright:K4e,DownLeftRightVector:j4e,DownLeftTeeVector:X4e,DownLeftVectorBar:Q4e,DownLeftVector:Z4e,DownRightTeeVector:J4e,DownRightVectorBar:eUe,DownRightVector:tUe,DownTeeArrow:nUe,DownTee:rUe,drbkarow:oUe,drcorn:aUe,drcrop:iUe,Dscr:lUe,dscr:sUe,DScy:cUe,dscy:uUe,dsol:dUe,Dstrok:pUe,dstrok:fUe,dtdot:mUe,dtri:gUe,dtrif:_Ue,duarr:hUe,duhar:vUe,dwangle:bUe,DZcy:SUe,dzcy:EUe,dzigrarr:yUe,Eacute:CUe,eacute:TUe,easter:OUe,Ecaron:xUe,ecaron:wUe,Ecirc:RUe,ecirc:IUe,ecir:NUe,ecolon:AUe,Ecy:DUe,ecy:PUe,eDDot:MUe,Edot:$Ue,edot:LUe,eDot:kUe,ee:FUe,efDot:BUe,Efr:UUe,efr:HUe,eg:zUe,Egrave:GUe,egrave:VUe,egs:YUe,egsdot:WUe,el:qUe,Element:KUe,elinters:jUe,ell:XUe,els:QUe,elsdot:ZUe,Emacr:JUe,emacr:e6e,empty:t6e,emptyset:n6e,EmptySmallSquare:r6e,emptyv:o6e,EmptyVerySmallSquare:a6e,emsp13:i6e,emsp14:l6e,emsp:s6e,ENG:c6e,eng:u6e,ensp:d6e,Eogon:p6e,eogon:f6e,Eopf:m6e,eopf:g6e,epar:_6e,eparsl:h6e,eplus:v6e,epsi:b6e,Epsilon:S6e,epsilon:E6e,epsiv:y6e,eqcirc:C6e,eqcolon:T6e,eqsim:O6e,eqslantgtr:x6e,eqslantless:w6e,Equal:R6e,equals:I6e,EqualTilde:N6e,equest:A6e,Equilibrium:D6e,equiv:P6e,equivDD:M6e,eqvparsl:$6e,erarr:L6e,erDot:k6e,escr:F6e,Escr:B6e,esdot:U6e,Esim:H6e,esim:z6e,Eta:G6e,eta:V6e,ETH:Y6e,eth:W6e,Euml:q6e,euml:K6e,euro:j6e,excl:X6e,exist:Q6e,Exists:Z6e,expectation:J6e,exponentiale:e8e,ExponentialE:t8e,fallingdotseq:n8e,Fcy:r8e,fcy:o8e,female:a8e,ffilig:i8e,fflig:l8e,ffllig:s8e,Ffr:c8e,ffr:u8e,filig:d8e,FilledSmallSquare:p8e,FilledVerySmallSquare:f8e,fjlig:m8e,flat:g8e,fllig:_8e,fltns:h8e,fnof:v8e,Fopf:b8e,fopf:S8e,forall:E8e,ForAll:y8e,fork:C8e,forkv:T8e,Fouriertrf:O8e,fpartint:x8e,frac12:w8e,frac13:R8e,frac14:I8e,frac15:N8e,frac16:A8e,frac18:D8e,frac23:P8e,frac25:M8e,frac34:$8e,frac35:L8e,frac38:k8e,frac45:F8e,frac56:B8e,frac58:U8e,frac78:H8e,frasl:z8e,frown:G8e,fscr:V8e,Fscr:Y8e,gacute:W8e,Gamma:q8e,gamma:K8e,Gammad:j8e,gammad:X8e,gap:Q8e,Gbreve:Z8e,gbreve:J8e,Gcedil:e5e,Gcirc:t5e,gcirc:n5e,Gcy:r5e,gcy:o5e,Gdot:a5e,gdot:i5e,ge:l5e,gE:s5e,gEl:c5e,gel:u5e,geq:d5e,geqq:p5e,geqslant:f5e,gescc:m5e,ges:g5e,gesdot:_5e,gesdoto:h5e,gesdotol:v5e,gesl:b5e,gesles:S5e,Gfr:E5e,gfr:y5e,gg:C5e,Gg:T5e,ggg:O5e,gimel:x5e,GJcy:w5e,gjcy:R5e,gla:I5e,gl:N5e,glE:A5e,glj:D5e,gnap:P5e,gnapprox:M5e,gne:$5e,gnE:L5e,gneq:k5e,gneqq:F5e,gnsim:B5e,Gopf:U5e,gopf:H5e,grave:z5e,GreaterEqual:G5e,GreaterEqualLess:V5e,GreaterFullEqual:Y5e,GreaterGreater:W5e,GreaterLess:q5e,GreaterSlantEqual:K5e,GreaterTilde:j5e,Gscr:X5e,gscr:Q5e,gsim:Z5e,gsime:J5e,gsiml:eHe,gtcc:tHe,gtcir:nHe,gt:rHe,GT:oHe,Gt:aHe,gtdot:iHe,gtlPar:lHe,gtquest:sHe,gtrapprox:cHe,gtrarr:uHe,gtrdot:dHe,gtreqless:pHe,gtreqqless:fHe,gtrless:mHe,gtrsim:gHe,gvertneqq:_He,gvnE:hHe,Hacek:vHe,hairsp:bHe,half:SHe,hamilt:EHe,HARDcy:yHe,hardcy:CHe,harrcir:THe,harr:OHe,hArr:xHe,harrw:wHe,Hat:RHe,hbar:IHe,Hcirc:NHe,hcirc:AHe,hearts:DHe,heartsuit:PHe,hellip:MHe,hercon:$He,hfr:LHe,Hfr:kHe,HilbertSpace:FHe,hksearow:BHe,hkswarow:UHe,hoarr:HHe,homtht:zHe,hookleftarrow:GHe,hookrightarrow:VHe,hopf:YHe,Hopf:WHe,horbar:qHe,HorizontalLine:KHe,hscr:jHe,Hscr:XHe,hslash:QHe,Hstrok:ZHe,hstrok:JHe,HumpDownHump:eze,HumpEqual:tze,hybull:nze,hyphen:rze,Iacute:oze,iacute:aze,ic:ize,Icirc:lze,icirc:sze,Icy:cze,icy:uze,Idot:dze,IEcy:pze,iecy:fze,iexcl:mze,iff:gze,ifr:_ze,Ifr:hze,Igrave:vze,igrave:bze,ii:Sze,iiiint:Eze,iiint:yze,iinfin:Cze,iiota:Tze,IJlig:Oze,ijlig:xze,Imacr:wze,imacr:Rze,image:Ize,ImaginaryI:Nze,imagline:Aze,imagpart:Dze,imath:Pze,Im:Mze,imof:$ze,imped:Lze,Implies:kze,incare:Fze,in:"∈",infin:Bze,infintie:Uze,inodot:Hze,intcal:zze,int:Gze,Int:Vze,integers:Yze,Integral:Wze,intercal:qze,Intersection:Kze,intlarhk:jze,intprod:Xze,InvisibleComma:Qze,InvisibleTimes:Zze,IOcy:Jze,iocy:eGe,Iogon:tGe,iogon:nGe,Iopf:rGe,iopf:oGe,Iota:aGe,iota:iGe,iprod:lGe,iquest:sGe,iscr:cGe,Iscr:uGe,isin:dGe,isindot:pGe,isinE:fGe,isins:mGe,isinsv:gGe,isinv:_Ge,it:hGe,Itilde:vGe,itilde:bGe,Iukcy:SGe,iukcy:EGe,Iuml:yGe,iuml:CGe,Jcirc:TGe,jcirc:OGe,Jcy:xGe,jcy:wGe,Jfr:RGe,jfr:IGe,jmath:NGe,Jopf:AGe,jopf:DGe,Jscr:PGe,jscr:MGe,Jsercy:$Ge,jsercy:LGe,Jukcy:kGe,jukcy:FGe,Kappa:BGe,kappa:UGe,kappav:HGe,Kcedil:zGe,kcedil:GGe,Kcy:VGe,kcy:YGe,Kfr:WGe,kfr:qGe,kgreen:KGe,KHcy:jGe,khcy:XGe,KJcy:QGe,kjcy:ZGe,Kopf:JGe,kopf:e7e,Kscr:t7e,kscr:n7e,lAarr:r7e,Lacute:o7e,lacute:a7e,laemptyv:i7e,lagran:l7e,Lambda:s7e,lambda:c7e,lang:u7e,Lang:d7e,langd:p7e,langle:f7e,lap:m7e,Laplacetrf:g7e,laquo:_7e,larrb:h7e,larrbfs:v7e,larr:b7e,Larr:S7e,lArr:E7e,larrfs:y7e,larrhk:C7e,larrlp:T7e,larrpl:O7e,larrsim:x7e,larrtl:w7e,latail:R7e,lAtail:I7e,lat:N7e,late:A7e,lates:D7e,lbarr:P7e,lBarr:M7e,lbbrk:$7e,lbrace:L7e,lbrack:k7e,lbrke:F7e,lbrksld:B7e,lbrkslu:U7e,Lcaron:H7e,lcaron:z7e,Lcedil:G7e,lcedil:V7e,lceil:Y7e,lcub:W7e,Lcy:q7e,lcy:K7e,ldca:j7e,ldquo:X7e,ldquor:Q7e,ldrdhar:Z7e,ldrushar:J7e,ldsh:e9e,le:t9e,lE:n9e,LeftAngleBracket:r9e,LeftArrowBar:o9e,leftarrow:a9e,LeftArrow:i9e,Leftarrow:l9e,LeftArrowRightArrow:s9e,leftarrowtail:c9e,LeftCeiling:u9e,LeftDoubleBracket:d9e,LeftDownTeeVector:p9e,LeftDownVectorBar:f9e,LeftDownVector:m9e,LeftFloor:g9e,leftharpoondown:_9e,leftharpoonup:h9e,leftleftarrows:v9e,leftrightarrow:b9e,LeftRightArrow:S9e,Leftrightarrow:E9e,leftrightarrows:y9e,leftrightharpoons:C9e,leftrightsquigarrow:T9e,LeftRightVector:O9e,LeftTeeArrow:x9e,LeftTee:w9e,LeftTeeVector:R9e,leftthreetimes:I9e,LeftTriangleBar:N9e,LeftTriangle:A9e,LeftTriangleEqual:D9e,LeftUpDownVector:P9e,LeftUpTeeVector:M9e,LeftUpVectorBar:$9e,LeftUpVector:L9e,LeftVectorBar:k9e,LeftVector:F9e,lEg:B9e,leg:U9e,leq:H9e,leqq:z9e,leqslant:G9e,lescc:V9e,les:Y9e,lesdot:W9e,lesdoto:q9e,lesdotor:K9e,lesg:j9e,lesges:X9e,lessapprox:Q9e,lessdot:Z9e,lesseqgtr:J9e,lesseqqgtr:eVe,LessEqualGreater:tVe,LessFullEqual:nVe,LessGreater:rVe,lessgtr:oVe,LessLess:aVe,lesssim:iVe,LessSlantEqual:lVe,LessTilde:sVe,lfisht:cVe,lfloor:uVe,Lfr:dVe,lfr:pVe,lg:fVe,lgE:mVe,lHar:gVe,lhard:_Ve,lharu:hVe,lharul:vVe,lhblk:bVe,LJcy:SVe,ljcy:EVe,llarr:yVe,ll:CVe,Ll:TVe,llcorner:OVe,Lleftarrow:xVe,llhard:wVe,lltri:RVe,Lmidot:IVe,lmidot:NVe,lmoustache:AVe,lmoust:DVe,lnap:PVe,lnapprox:MVe,lne:$Ve,lnE:LVe,lneq:kVe,lneqq:FVe,lnsim:BVe,loang:UVe,loarr:HVe,lobrk:zVe,longleftarrow:GVe,LongLeftArrow:VVe,Longleftarrow:YVe,longleftrightarrow:WVe,LongLeftRightArrow:qVe,Longleftrightarrow:KVe,longmapsto:jVe,longrightarrow:XVe,LongRightArrow:QVe,Longrightarrow:ZVe,looparrowleft:JVe,looparrowright:eYe,lopar:tYe,Lopf:nYe,lopf:rYe,loplus:oYe,lotimes:aYe,lowast:iYe,lowbar:lYe,LowerLeftArrow:sYe,LowerRightArrow:cYe,loz:uYe,lozenge:dYe,lozf:pYe,lpar:fYe,lparlt:mYe,lrarr:gYe,lrcorner:_Ye,lrhar:hYe,lrhard:vYe,lrm:bYe,lrtri:SYe,lsaquo:EYe,lscr:yYe,Lscr:CYe,lsh:TYe,Lsh:OYe,lsim:xYe,lsime:wYe,lsimg:RYe,lsqb:IYe,lsquo:NYe,lsquor:AYe,Lstrok:DYe,lstrok:PYe,ltcc:MYe,ltcir:$Ye,lt:LYe,LT:kYe,Lt:FYe,ltdot:BYe,lthree:UYe,ltimes:HYe,ltlarr:zYe,ltquest:GYe,ltri:VYe,ltrie:YYe,ltrif:WYe,ltrPar:qYe,lurdshar:KYe,luruhar:jYe,lvertneqq:XYe,lvnE:QYe,macr:ZYe,male:JYe,malt:eWe,maltese:tWe,Map:"⤅",map:nWe,mapsto:rWe,mapstodown:oWe,mapstoleft:aWe,mapstoup:iWe,marker:lWe,mcomma:sWe,Mcy:cWe,mcy:uWe,mdash:dWe,mDDot:pWe,measuredangle:fWe,MediumSpace:mWe,Mellintrf:gWe,Mfr:_We,mfr:hWe,mho:vWe,micro:bWe,midast:SWe,midcir:EWe,mid:yWe,middot:CWe,minusb:TWe,minus:OWe,minusd:xWe,minusdu:wWe,MinusPlus:RWe,mlcp:IWe,mldr:NWe,mnplus:AWe,models:DWe,Mopf:PWe,mopf:MWe,mp:$We,mscr:LWe,Mscr:kWe,mstpos:FWe,Mu:BWe,mu:UWe,multimap:HWe,mumap:zWe,nabla:GWe,Nacute:VWe,nacute:YWe,nang:WWe,nap:qWe,napE:KWe,napid:jWe,napos:XWe,napprox:QWe,natural:ZWe,naturals:JWe,natur:eqe,nbsp:tqe,nbump:nqe,nbumpe:rqe,ncap:oqe,Ncaron:aqe,ncaron:iqe,Ncedil:lqe,ncedil:sqe,ncong:cqe,ncongdot:uqe,ncup:dqe,Ncy:pqe,ncy:fqe,ndash:mqe,nearhk:gqe,nearr:_qe,neArr:hqe,nearrow:vqe,ne:bqe,nedot:Sqe,NegativeMediumSpace:Eqe,NegativeThickSpace:yqe,NegativeThinSpace:Cqe,NegativeVeryThinSpace:Tqe,nequiv:Oqe,nesear:xqe,nesim:wqe,NestedGreaterGreater:Rqe,NestedLessLess:Iqe,NewLine:Nqe,nexist:Aqe,nexists:Dqe,Nfr:Pqe,nfr:Mqe,ngE:$qe,nge:Lqe,ngeq:kqe,ngeqq:Fqe,ngeqslant:Bqe,nges:Uqe,nGg:Hqe,ngsim:zqe,nGt:Gqe,ngt:Vqe,ngtr:Yqe,nGtv:Wqe,nharr:qqe,nhArr:Kqe,nhpar:jqe,ni:Xqe,nis:Qqe,nisd:Zqe,niv:Jqe,NJcy:eKe,njcy:tKe,nlarr:nKe,nlArr:rKe,nldr:oKe,nlE:aKe,nle:iKe,nleftarrow:lKe,nLeftarrow:sKe,nleftrightarrow:cKe,nLeftrightarrow:uKe,nleq:dKe,nleqq:pKe,nleqslant:fKe,nles:mKe,nless:gKe,nLl:_Ke,nlsim:hKe,nLt:vKe,nlt:bKe,nltri:SKe,nltrie:EKe,nLtv:yKe,nmid:CKe,NoBreak:TKe,NonBreakingSpace:OKe,nopf:xKe,Nopf:wKe,Not:RKe,not:IKe,NotCongruent:NKe,NotCupCap:AKe,NotDoubleVerticalBar:DKe,NotElement:PKe,NotEqual:MKe,NotEqualTilde:$Ke,NotExists:LKe,NotGreater:kKe,NotGreaterEqual:FKe,NotGreaterFullEqual:BKe,NotGreaterGreater:UKe,NotGreaterLess:HKe,NotGreaterSlantEqual:zKe,NotGreaterTilde:GKe,NotHumpDownHump:VKe,NotHumpEqual:YKe,notin:WKe,notindot:qKe,notinE:KKe,notinva:jKe,notinvb:XKe,notinvc:QKe,NotLeftTriangleBar:ZKe,NotLeftTriangle:JKe,NotLeftTriangleEqual:eje,NotLess:tje,NotLessEqual:nje,NotLessGreater:rje,NotLessLess:oje,NotLessSlantEqual:aje,NotLessTilde:ije,NotNestedGreaterGreater:lje,NotNestedLessLess:sje,notni:cje,notniva:uje,notnivb:dje,notnivc:pje,NotPrecedes:fje,NotPrecedesEqual:mje,NotPrecedesSlantEqual:gje,NotReverseElement:_je,NotRightTriangleBar:hje,NotRightTriangle:vje,NotRightTriangleEqual:bje,NotSquareSubset:Sje,NotSquareSubsetEqual:Eje,NotSquareSuperset:yje,NotSquareSupersetEqual:Cje,NotSubset:Tje,NotSubsetEqual:Oje,NotSucceeds:xje,NotSucceedsEqual:wje,NotSucceedsSlantEqual:Rje,NotSucceedsTilde:Ije,NotSuperset:Nje,NotSupersetEqual:Aje,NotTilde:Dje,NotTildeEqual:Pje,NotTildeFullEqual:Mje,NotTildeTilde:$je,NotVerticalBar:Lje,nparallel:kje,npar:Fje,nparsl:Bje,npart:Uje,npolint:Hje,npr:zje,nprcue:Gje,nprec:Vje,npreceq:Yje,npre:Wje,nrarrc:qje,nrarr:Kje,nrArr:jje,nrarrw:Xje,nrightarrow:Qje,nRightarrow:Zje,nrtri:Jje,nrtrie:eXe,nsc:tXe,nsccue:nXe,nsce:rXe,Nscr:oXe,nscr:aXe,nshortmid:iXe,nshortparallel:lXe,nsim:sXe,nsime:cXe,nsimeq:uXe,nsmid:dXe,nspar:pXe,nsqsube:fXe,nsqsupe:mXe,nsub:gXe,nsubE:_Xe,nsube:hXe,nsubset:vXe,nsubseteq:bXe,nsubseteqq:SXe,nsucc:EXe,nsucceq:yXe,nsup:CXe,nsupE:TXe,nsupe:OXe,nsupset:xXe,nsupseteq:wXe,nsupseteqq:RXe,ntgl:IXe,Ntilde:NXe,ntilde:AXe,ntlg:DXe,ntriangleleft:PXe,ntrianglelefteq:MXe,ntriangleright:$Xe,ntrianglerighteq:LXe,Nu:kXe,nu:FXe,num:BXe,numero:UXe,numsp:HXe,nvap:zXe,nvdash:GXe,nvDash:VXe,nVdash:YXe,nVDash:WXe,nvge:qXe,nvgt:KXe,nvHarr:jXe,nvinfin:XXe,nvlArr:QXe,nvle:ZXe,nvlt:JXe,nvltrie:eQe,nvrArr:tQe,nvrtrie:nQe,nvsim:rQe,nwarhk:oQe,nwarr:aQe,nwArr:iQe,nwarrow:lQe,nwnear:sQe,Oacute:cQe,oacute:uQe,oast:dQe,Ocirc:pQe,ocirc:fQe,ocir:mQe,Ocy:gQe,ocy:_Qe,odash:hQe,Odblac:vQe,odblac:bQe,odiv:SQe,odot:EQe,odsold:yQe,OElig:CQe,oelig:TQe,ofcir:OQe,Ofr:xQe,ofr:wQe,ogon:RQe,Ograve:IQe,ograve:NQe,ogt:AQe,ohbar:DQe,ohm:PQe,oint:MQe,olarr:$Qe,olcir:LQe,olcross:kQe,oline:FQe,olt:BQe,Omacr:UQe,omacr:HQe,Omega:zQe,omega:GQe,Omicron:VQe,omicron:YQe,omid:WQe,ominus:qQe,Oopf:KQe,oopf:jQe,opar:XQe,OpenCurlyDoubleQuote:QQe,OpenCurlyQuote:ZQe,operp:JQe,oplus:eZe,orarr:tZe,Or:nZe,or:rZe,ord:oZe,order:aZe,orderof:iZe,ordf:lZe,ordm:sZe,origof:cZe,oror:uZe,orslope:dZe,orv:pZe,oS:fZe,Oscr:mZe,oscr:gZe,Oslash:_Ze,oslash:hZe,osol:vZe,Otilde:bZe,otilde:SZe,otimesas:EZe,Otimes:yZe,otimes:CZe,Ouml:TZe,ouml:OZe,ovbar:xZe,OverBar:wZe,OverBrace:RZe,OverBracket:IZe,OverParenthesis:NZe,para:AZe,parallel:DZe,par:PZe,parsim:MZe,parsl:$Ze,part:LZe,PartialD:kZe,Pcy:FZe,pcy:BZe,percnt:UZe,period:HZe,permil:zZe,perp:GZe,pertenk:VZe,Pfr:YZe,pfr:WZe,Phi:qZe,phi:KZe,phiv:jZe,phmmat:XZe,phone:QZe,Pi:ZZe,pi:JZe,pitchfork:eJe,piv:tJe,planck:nJe,planckh:rJe,plankv:oJe,plusacir:aJe,plusb:iJe,pluscir:lJe,plus:sJe,plusdo:cJe,plusdu:uJe,pluse:dJe,PlusMinus:pJe,plusmn:fJe,plussim:mJe,plustwo:gJe,pm:_Je,Poincareplane:hJe,pointint:vJe,popf:bJe,Popf:SJe,pound:EJe,prap:yJe,Pr:CJe,pr:TJe,prcue:OJe,precapprox:xJe,prec:wJe,preccurlyeq:RJe,Precedes:IJe,PrecedesEqual:NJe,PrecedesSlantEqual:AJe,PrecedesTilde:DJe,preceq:PJe,precnapprox:MJe,precneqq:$Je,precnsim:LJe,pre:kJe,prE:FJe,precsim:BJe,prime:UJe,Prime:HJe,primes:zJe,prnap:GJe,prnE:VJe,prnsim:YJe,prod:WJe,Product:qJe,profalar:KJe,profline:jJe,profsurf:XJe,prop:QJe,Proportional:ZJe,Proportion:JJe,propto:eet,prsim:tet,prurel:net,Pscr:ret,pscr:oet,Psi:aet,psi:iet,puncsp:set,Qfr:cet,qfr:uet,qint:det,qopf:pet,Qopf:fet,qprime:met,Qscr:get,qscr:_et,quaternions:het,quatint:vet,quest:bet,questeq:Eet,quot:yet,QUOT:Cet,rAarr:Tet,race:Oet,Racute:xet,racute:wet,radic:Ret,raemptyv:Iet,rang:Net,Rang:Aet,rangd:Det,range:Pet,rangle:Met,raquo:$et,rarrap:Let,rarrb:ket,rarrbfs:Fet,rarrc:Bet,rarr:Uet,Rarr:Het,rArr:zet,rarrfs:Get,rarrhk:Vet,rarrlp:Yet,rarrpl:Wet,rarrsim:qet,Rarrtl:Ket,rarrtl:jet,rarrw:Xet,ratail:Qet,rAtail:Zet,ratio:Jet,rationals:ett,rbarr:ttt,rBarr:ntt,RBarr:rtt,rbbrk:ott,rbrace:att,rbrack:itt,rbrke:ltt,rbrksld:stt,rbrkslu:ctt,Rcaron:utt,rcaron:dtt,Rcedil:ptt,rcedil:ftt,rceil:mtt,rcub:gtt,Rcy:_tt,rcy:htt,rdca:vtt,rdldhar:btt,rdquo:Stt,rdquor:Ett,rdsh:ytt,real:Ctt,realine:Ttt,realpart:Ott,reals:xtt,Re:wtt,rect:Rtt,reg:Itt,REG:Ntt,ReverseElement:Att,ReverseEquilibrium:Dtt,ReverseUpEquilibrium:Ptt,rfisht:Mtt,rfloor:$tt,rfr:Ltt,Rfr:ktt,rHar:Ftt,rhard:Btt,rharu:Utt,rharul:Htt,Rho:ztt,rho:Gtt,rhov:Vtt,RightAngleBracket:Ytt,RightArrowBar:Wtt,rightarrow:qtt,RightArrow:Ktt,Rightarrow:jtt,RightArrowLeftArrow:Xtt,rightarrowtail:Qtt,RightCeiling:Ztt,RightDoubleBracket:Jtt,RightDownTeeVector:ent,RightDownVectorBar:tnt,RightDownVector:nnt,RightFloor:rnt,rightharpoondown:ont,rightharpoonup:ant,rightleftarrows:int,rightleftharpoons:lnt,rightrightarrows:snt,rightsquigarrow:cnt,RightTeeArrow:unt,RightTee:dnt,RightTeeVector:pnt,rightthreetimes:fnt,RightTriangleBar:mnt,RightTriangle:gnt,RightTriangleEqual:_nt,RightUpDownVector:hnt,RightUpTeeVector:vnt,RightUpVectorBar:bnt,RightUpVector:Snt,RightVectorBar:Ent,RightVector:ynt,ring:Cnt,risingdotseq:Tnt,rlarr:Ont,rlhar:xnt,rlm:wnt,rmoustache:Rnt,rmoust:Int,rnmid:Nnt,roang:Ant,roarr:Dnt,robrk:Pnt,ropar:Mnt,ropf:$nt,Ropf:Lnt,roplus:knt,rotimes:Fnt,RoundImplies:Bnt,rpar:Unt,rpargt:Hnt,rppolint:znt,rrarr:Gnt,Rrightarrow:Vnt,rsaquo:Ynt,rscr:Wnt,Rscr:qnt,rsh:Knt,Rsh:jnt,rsqb:Xnt,rsquo:Qnt,rsquor:Znt,rthree:Jnt,rtimes:ert,rtri:trt,rtrie:nrt,rtrif:rrt,rtriltri:ort,RuleDelayed:art,ruluhar:irt,rx:lrt,Sacute:srt,sacute:crt,sbquo:urt,scap:drt,Scaron:prt,scaron:frt,Sc:mrt,sc:grt,sccue:_rt,sce:hrt,scE:vrt,Scedil:brt,scedil:Srt,Scirc:Ert,scirc:yrt,scnap:Crt,scnE:Trt,scnsim:Ort,scpolint:xrt,scsim:wrt,Scy:Rrt,scy:Irt,sdotb:Nrt,sdot:Art,sdote:Drt,searhk:Prt,searr:Mrt,seArr:$rt,searrow:Lrt,sect:krt,semi:Frt,seswar:Brt,setminus:Urt,setmn:Hrt,sext:zrt,Sfr:Grt,sfr:Vrt,sfrown:Yrt,sharp:Wrt,SHCHcy:qrt,shchcy:Krt,SHcy:jrt,shcy:Xrt,ShortDownArrow:Qrt,ShortLeftArrow:Zrt,shortmid:Jrt,shortparallel:eot,ShortRightArrow:tot,ShortUpArrow:not,shy:rot,Sigma:oot,sigma:aot,sigmaf:iot,sigmav:lot,sim:sot,simdot:cot,sime:uot,simeq:dot,simg:pot,simgE:fot,siml:mot,simlE:got,simne:_ot,simplus:hot,simrarr:vot,slarr:bot,SmallCircle:Sot,smallsetminus:Eot,smashp:yot,smeparsl:Cot,smid:Tot,smile:Oot,smt:xot,smte:wot,smtes:Rot,SOFTcy:Iot,softcy:Not,solbar:Aot,solb:Dot,sol:Pot,Sopf:Mot,sopf:$ot,spades:Lot,spadesuit:kot,spar:Fot,sqcap:Bot,sqcaps:Uot,sqcup:Hot,sqcups:zot,Sqrt:Got,sqsub:Vot,sqsube:Yot,sqsubset:Wot,sqsubseteq:qot,sqsup:Kot,sqsupe:jot,sqsupset:Xot,sqsupseteq:Qot,square:Zot,Square:Jot,SquareIntersection:eat,SquareSubset:tat,SquareSubsetEqual:nat,SquareSuperset:rat,SquareSupersetEqual:oat,SquareUnion:aat,squarf:iat,squ:lat,squf:sat,srarr:cat,Sscr:uat,sscr:dat,ssetmn:pat,ssmile:fat,sstarf:mat,Star:gat,star:_at,starf:hat,straightepsilon:vat,straightphi:bat,strns:Sat,sub:Eat,Sub:yat,subdot:Cat,subE:Tat,sube:Oat,subedot:xat,submult:wat,subnE:Rat,subne:Iat,subplus:Nat,subrarr:Aat,subset:Dat,Subset:Pat,subseteq:Mat,subseteqq:$at,SubsetEqual:Lat,subsetneq:kat,subsetneqq:Fat,subsim:Bat,subsub:Uat,subsup:Hat,succapprox:zat,succ:Gat,succcurlyeq:Vat,Succeeds:Yat,SucceedsEqual:Wat,SucceedsSlantEqual:qat,SucceedsTilde:Kat,succeq:jat,succnapprox:Xat,succneqq:Qat,succnsim:Zat,succsim:Jat,SuchThat:eit,sum:tit,Sum:nit,sung:rit,sup1:oit,sup2:ait,sup3:iit,sup:lit,Sup:sit,supdot:cit,supdsub:uit,supE:dit,supe:pit,supedot:fit,Superset:mit,SupersetEqual:git,suphsol:_it,suphsub:hit,suplarr:vit,supmult:bit,supnE:Sit,supne:Eit,supplus:yit,supset:Cit,Supset:Tit,supseteq:Oit,supseteqq:xit,supsetneq:wit,supsetneqq:Rit,supsim:Iit,supsub:Nit,supsup:Ait,swarhk:Dit,swarr:Pit,swArr:Mit,swarrow:$it,swnwar:Lit,szlig:kit,Tab:Fit,target:Bit,Tau:Uit,tau:Hit,tbrk:zit,Tcaron:Git,tcaron:Vit,Tcedil:Yit,tcedil:Wit,Tcy:qit,tcy:Kit,tdot:jit,telrec:Xit,Tfr:Qit,tfr:Zit,there4:Jit,therefore:elt,Therefore:tlt,Theta:nlt,theta:rlt,thetasym:olt,thetav:alt,thickapprox:ilt,thicksim:llt,ThickSpace:slt,ThinSpace:clt,thinsp:ult,thkap:dlt,thksim:plt,THORN:flt,thorn:mlt,tilde:glt,Tilde:_lt,TildeEqual:hlt,TildeFullEqual:vlt,TildeTilde:blt,timesbar:Slt,timesb:Elt,times:ylt,timesd:Clt,tint:Tlt,toea:Olt,topbot:xlt,topcir:wlt,top:Rlt,Topf:Ilt,topf:Nlt,topfork:Alt,tosa:Dlt,tprime:Plt,trade:Mlt,TRADE:$lt,triangle:Llt,triangledown:klt,triangleleft:Flt,trianglelefteq:Blt,triangleq:Ult,triangleright:Hlt,trianglerighteq:zlt,tridot:Glt,trie:Vlt,triminus:Ylt,TripleDot:Wlt,triplus:qlt,trisb:Klt,tritime:jlt,trpezium:Xlt,Tscr:Qlt,tscr:Zlt,TScy:Jlt,tscy:est,TSHcy:tst,tshcy:nst,Tstrok:rst,tstrok:ost,twixt:ast,twoheadleftarrow:ist,twoheadrightarrow:lst,Uacute:sst,uacute:cst,uarr:ust,Uarr:dst,uArr:pst,Uarrocir:fst,Ubrcy:mst,ubrcy:gst,Ubreve:_st,ubreve:hst,Ucirc:vst,ucirc:bst,Ucy:Sst,ucy:Est,udarr:yst,Udblac:Cst,udblac:Tst,udhar:Ost,ufisht:xst,Ufr:wst,ufr:Rst,Ugrave:Ist,ugrave:Nst,uHar:Ast,uharl:Dst,uharr:Pst,uhblk:Mst,ulcorn:$st,ulcorner:Lst,ulcrop:kst,ultri:Fst,Umacr:Bst,umacr:Ust,uml:Hst,UnderBar:zst,UnderBrace:Gst,UnderBracket:Vst,UnderParenthesis:Yst,Union:Wst,UnionPlus:qst,Uogon:Kst,uogon:jst,Uopf:Xst,uopf:Qst,UpArrowBar:Zst,uparrow:Jst,UpArrow:ect,Uparrow:tct,UpArrowDownArrow:nct,updownarrow:rct,UpDownArrow:oct,Updownarrow:act,UpEquilibrium:ict,upharpoonleft:lct,upharpoonright:sct,uplus:cct,UpperLeftArrow:uct,UpperRightArrow:dct,upsi:pct,Upsi:fct,upsih:mct,Upsilon:gct,upsilon:_ct,UpTeeArrow:hct,UpTee:vct,upuparrows:bct,urcorn:Sct,urcorner:Ect,urcrop:yct,Uring:Cct,uring:Tct,urtri:Oct,Uscr:xct,uscr:wct,utdot:Rct,Utilde:Ict,utilde:Nct,utri:Act,utrif:Dct,uuarr:Pct,Uuml:Mct,uuml:$ct,uwangle:Lct,vangrt:kct,varepsilon:Fct,varkappa:Bct,varnothing:Uct,varphi:Hct,varpi:zct,varpropto:Gct,varr:Vct,vArr:Yct,varrho:Wct,varsigma:qct,varsubsetneq:Kct,varsubsetneqq:jct,varsupsetneq:Xct,varsupsetneqq:Qct,vartheta:Zct,vartriangleleft:Jct,vartriangleright:eut,vBar:tut,Vbar:nut,vBarv:rut,Vcy:out,vcy:aut,vdash:iut,vDash:lut,Vdash:sut,VDash:cut,Vdashl:uut,veebar:dut,vee:put,Vee:fut,veeeq:mut,vellip:gut,verbar:_ut,Verbar:hut,vert:vut,Vert:but,VerticalBar:Sut,VerticalLine:Eut,VerticalSeparator:yut,VerticalTilde:Cut,VeryThinSpace:Tut,Vfr:Out,vfr:xut,vltri:wut,vnsub:Rut,vnsup:Iut,Vopf:Nut,vopf:Aut,vprop:Dut,vrtri:Put,Vscr:Mut,vscr:$ut,vsubnE:Lut,vsubne:kut,vsupnE:Fut,vsupne:But,Vvdash:Uut,vzigzag:Hut,Wcirc:zut,wcirc:Gut,wedbar:Vut,wedge:Yut,Wedge:Wut,wedgeq:qut,weierp:Kut,Wfr:jut,wfr:Xut,Wopf:Qut,wopf:Zut,wp:Jut,wr:edt,wreath:tdt,Wscr:ndt,wscr:rdt,xcap:odt,xcirc:adt,xcup:idt,xdtri:ldt,Xfr:sdt,xfr:cdt,xharr:udt,xhArr:ddt,Xi:pdt,xi:fdt,xlarr:mdt,xlArr:gdt,xmap:_dt,xnis:hdt,xodot:vdt,Xopf:bdt,xopf:Sdt,xoplus:Edt,xotime:ydt,xrarr:Cdt,xrArr:Tdt,Xscr:Odt,xscr:xdt,xsqcup:wdt,xuplus:Rdt,xutri:Idt,xvee:Ndt,xwedge:Adt,Yacute:Ddt,yacute:Pdt,YAcy:Mdt,yacy:$dt,Ycirc:Ldt,ycirc:kdt,Ycy:Fdt,ycy:Bdt,yen:Udt,Yfr:Hdt,yfr:zdt,YIcy:Gdt,yicy:Vdt,Yopf:Ydt,yopf:Wdt,Yscr:qdt,yscr:Kdt,YUcy:jdt,yucy:Xdt,yuml:Qdt,Yuml:Zdt,Zacute:Jdt,zacute:ept,Zcaron:tpt,zcaron:npt,Zcy:rpt,zcy:opt,Zdot:apt,zdot:ipt,zeetrf:lpt,ZeroWidthSpace:spt,Zeta:cpt,zeta:upt,zfr:dpt,Zfr:ppt,ZHcy:fpt,zhcy:mpt,zigrarr:gpt,zopf:_pt,Zopf:hpt,Zscr:vpt,zscr:bpt,zwj:Spt,zwnj:Ept};var pz=ypt,Ew=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\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-\u2E4E\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]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,zs={},Fk={};function Cpt(e){var t,n,r=Fk[e];if(r)return r;for(r=Fk[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t"u"&&(n=!0),l=Cpt(t),r=0,o=e.length;r=55296&&a<=57343){if(a>=55296&&a<=56319&&r+1=56320&&i<=57343)){s+=encodeURIComponent(e[r]+e[r+1]),r++;continue}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[r])}return s}Kg.defaultChars=";/?:@&=+$,-_.!~*'()#";Kg.componentChars="-_.!~*'()";var Tpt=Kg,Bk={};function Opt(e){var t,n,r=Bk[e];if(r)return r;for(r=Bk[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t=55296&&u<=57343?d+="���":d+=String.fromCharCode(u),o+=6;continue}if((i&248)===240&&o+91114111?d+="����":(u-=65536,d+=String.fromCharCode(55296+(u>>10),56320+(u&1023))),o+=9;continue}d+="�"}return d})}jg.defaultChars=";/?:@&=+$,#";jg.componentChars="";var xpt=jg,wpt=function(t){var n="";return n+=t.protocol||"",n+=t.slashes?"//":"",n+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?n+="["+t.hostname+"]":n+=t.hostname||"",n+=t.port?":"+t.port:"",n+=t.pathname||"",n+=t.search||"",n+=t.hash||"",n};function am(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Rpt=/^([a-z0-9.+-]+:)/i,Ipt=/:[0-9]*$/,Npt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Apt=["<",">",'"',"`"," ","\r",` `," "],Dpt=["{","}","|","\\","^","`"].concat(Apt),Ppt=["'"].concat(Dpt),Uk=["%","/","?",";","#"].concat(Ppt),Hk=["/","?","#"],Mpt=255,zk=/^[+a-z0-9A-Z_-]{0,63}$/,$pt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Gk={javascript:!0,"javascript:":!0},Vk={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Lpt(e,t){if(e&&e instanceof am)return e;var n=new am;return n.parse(e,t),n}am.prototype.parse=function(e,t){var n,r,o,a,i,l=e;if(l=l.trim(),!t&&e.split("#").length===1){var s=Npt.exec(l);if(s)return this.pathname=s[1],s[2]&&(this.search=s[2]),this}var c=Rpt.exec(l);if(c&&(c=c[0],o=c.toLowerCase(),this.protocol=c,l=l.substr(c.length)),(t||c||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=l.substr(0,2)==="//",i&&!(c&&Gk[c])&&(l=l.substr(2),this.slashes=!0)),!Gk[c]&&(i||c&&!Vk[c])){var u=-1;for(n=0;n127?h+="x":h+=v[b];if(!h.match(zk)){var C=m.slice(0,n),y=m.slice(n+1),T=v.match($pt);T&&(C.push(T[1]),y.unshift(T[2])),y.length&&(l=y.join(".")+l),this.hostname=C.join(".");break}}}}this.hostname.length>Mpt&&(this.hostname=""),_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var O=l.indexOf("#");O!==-1&&(this.hash=l.substr(O),l=l.slice(0,O));var x=l.indexOf("?");return x!==-1&&(this.search=l.substr(x),l=l.slice(0,x)),l&&(this.pathname=l),Vk[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this};am.prototype.parseHost=function(e){var t=Ipt.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var kpt=Lpt;zs.encode=Tpt;zs.decode=xpt;zs.format=wpt;zs.parse=kpt;var pi={},CE,Yk;function fz(){return Yk||(Yk=1,CE=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),CE}var TE,Wk;function mz(){return Wk||(Wk=1,TE=/[\0-\x1F\x7F-\x9F]/),TE}var OE,qk;function Fpt(){return qk||(qk=1,OE=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),OE}var xE,Kk;function gz(){return Kk||(Kk=1,xE=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),xE}var jk;function Bpt(){return jk||(jk=1,pi.Any=fz(),pi.Cc=mz(),pi.Cf=Fpt(),pi.P=Ew,pi.Z=gz()),pi}(function(e){function t(P){return Object.prototype.toString.call(P)}function n(P){return t(P)==="[object String]"}var r=Object.prototype.hasOwnProperty;function o(P,A){return r.call(P,A)}function a(P){var A=Array.prototype.slice.call(arguments,1);return A.forEach(function(k){if(k){if(typeof k!="object")throw new TypeError(k+"must be object");Object.keys(k).forEach(function(M){P[M]=k[M]})}}),P}function i(P,A,k){return[].concat(P.slice(0,A),k,P.slice(A+1))}function l(P){return!(P>=55296&&P<=57343||P>=64976&&P<=65007||(P&65535)===65535||(P&65535)===65534||P>=0&&P<=8||P===11||P>=14&&P<=31||P>=127&&P<=159||P>1114111)}function s(P){if(P>65535){P-=65536;var A=55296+(P>>10),k=56320+(P&1023);return String.fromCharCode(A,k)}return String.fromCharCode(P)}var c=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,d=new RegExp(c.source+"|"+u.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,f=pz;function _(P,A){var k=0;return o(f,A)?f[A]:A.charCodeAt(0)===35&&p.test(A)&&(k=A[1].toLowerCase()==="x"?parseInt(A.slice(2),16):parseInt(A.slice(1),10),l(k))?s(k):P}function m(P){return P.indexOf("\\")<0?P:P.replace(c,"$1")}function v(P){return P.indexOf("\\")<0&&P.indexOf("&")<0?P:P.replace(d,function(A,k,M){return k||_(A,M)})}var h=/[&<>"]/,b=/[&<>"]/g,E={"&":"&","<":"<",">":">",'"':"""};function C(P){return E[P]}function y(P){return h.test(P)?P.replace(b,C):P}var T=/[.?*+^$[\]\\(){}|-]/g;function O(P){return P.replace(T,"\\$&")}function x(P){switch(P){case 9:case 32:return!0}return!1}function w(P){if(P>=8192&&P<=8202)return!0;switch(P){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var R=Ew;function N(P){return R.test(P)}function L(P){switch(P){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function $(P){return P=P.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(P=P.replace(/ẞ/g,"ß")),P.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=zs,e.lib.ucmicro=Bpt(),e.assign=a,e.isString=n,e.has=o,e.unescapeMd=m,e.unescapeAll=v,e.isValidEntityCode=l,e.fromCodePoint=s,e.escapeHtml=y,e.arrayReplaceAt=i,e.isSpace=x,e.isWhiteSpace=w,e.isMdAsciiPunct=L,e.isPunctChar=N,e.escapeRE=O,e.normalizeReference=$})(Dt);var Xg={},Upt=function(t,n,r){var o,a,i,l,s=-1,c=t.posMax,u=t.pos;for(t.pos=n+1,o=1;t.pos32))return s;if(o===41){if(a===0)break;a--}n++}return l===n||a!==0||(s.str=Xk(t.slice(l,n)),s.lines=i,s.pos=n,s.ok=!0),s},zpt=Dt.unescapeAll,Gpt=function(t,n,r){var o,a,i=0,l=n,s={ok:!1,pos:0,lines:0,str:""};if(n>=r||(a=t.charCodeAt(n),a!==34&&a!==39&&a!==40))return s;for(n++,a===40&&(a=41);n"+Ki(e[t].content)+""};ko.code_block=function(e,t,n,r,o){var a=e[t];return""+Ki(e[t].content)+`
`};ko.fence=function(e,t,n,r,o){var a=e[t],i=a.info?Ypt(a.info).trim():"",l="",s="",c,u,d,p,f;return i&&(d=i.split(/(\s+)/g),l=d[0],s=d.slice(2).join("")),n.highlight?c=n.highlight(a.content,l,s)||Ki(a.content):c=Ki(a.content),c.indexOf("",a)};Gs.prototype.renderInline=function(e,t,n){for(var r,o="",a=this.rules,i=0,l=e.length;i\s]/i.test(e)}function eft(e){return/^<\/a\s*>/i.test(e)}var tft=function(t){var n,r,o,a,i,l,s,c,u,d,p,f,_,m,v,h,b=t.tokens,E;if(t.md.options.linkify){for(r=0,o=b.length;r=0;n--){if(l=a[n],l.type==="link_close"){for(n--;a[n].level!==l.level&&a[n].type!=="link_open";)n--;continue}if(l.type==="html_inline"&&(Jpt(l.content)&&_>0&&_--,eft(l.content)&&_++),!(_>0)&&l.type==="text"&&t.md.linkify.test(l.content)){for(u=l.content,E=t.md.linkify.match(u),s=[],f=l.level,p=0,c=0;cp&&(i=new t.Token("text","",0),i.content=u.slice(p,d),i.level=f,s.push(i)),i=new t.Token("link_open","a",1),i.attrs=[["href",v]],i.level=f++,i.markup="linkify",i.info="auto",s.push(i),i=new t.Token("text","",0),i.content=h,i.level=f,s.push(i),i=new t.Token("link_close","a",-1),i.level=--f,i.markup="linkify",i.info="auto",s.push(i),p=E[c].lastIndex);p=0;t--)n=e[t],n.type==="text"&&!r&&(n.content=n.content.replace(rft,aft)),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}function lft(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)n=e[t],n.type==="text"&&!r&&_z.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}var sft=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type==="inline"&&(nft.test(t.tokens[n].content)&&ift(t.tokens[n].children),_z.test(t.tokens[n].content)&&lft(t.tokens[n].children))},Qk=Dt.isWhiteSpace,Zk=Dt.isPunctChar,Jk=Dt.isMdAsciiPunct,cft=/['"]/,e2=/['"]/g,t2="’";function ip(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function uft(e,t){var n,r,o,a,i,l,s,c,u,d,p,f,_,m,v,h,b,E,C,y,T;for(C=[],n=0;n=0&&!(C[b].level<=s);b--);if(C.length=b+1,r.type==="text"){o=r.content,i=0,l=o.length;e:for(;i=0)u=o.charCodeAt(a.index-1);else for(b=n-1;b>=0&&!(e[b].type==="softbreak"||e[b].type==="hardbreak");b--)if(e[b].content){u=e[b].content.charCodeAt(e[b].content.length-1);break}if(d=32,i=48&&u<=57&&(h=v=!1),v&&h&&(v=p,h=f),!v&&!h){E&&(r.content=ip(r.content,a.index,t2));continue}if(h){for(b=C.length-1;b>=0&&(c=C[b],!(C[b].level=0;n--)t.tokens[n].type!=="inline"||!cft.test(t.tokens[n].content)||uft(t.tokens[n].children,t)};function Vs(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Vs.prototype.attrIndex=function(t){var n,r,o;if(!this.attrs)return-1;for(n=this.attrs,r=0,o=n.length;r=0&&(r=this.attrs[n][1]),r};Vs.prototype.attrJoin=function(t,n){var r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var Cw=Vs,pft=Cw;function hz(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}hz.prototype.Token=pft;var fft=hz,mft=yw,wE=[["normalize",jpt],["block",Xpt],["inline",Qpt],["linkify",tft],["replacements",sft],["smartquotes",dft]];function Tw(){this.ruler=new mft;for(var e=0;er||(u=n+1,t.sCount[u]=4||(l=t.bMarks[u]+t.tShift[u],l>=t.eMarks[u])||(y=t.src.charCodeAt(l++),y!==124&&y!==45&&y!==58)||l>=t.eMarks[u]||(T=t.src.charCodeAt(l++),T!==124&&T!==45&&T!==58&&!RE(T))||y===45&&RE(T))return!1;for(;l=4||(d=n2(i),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),p=d.length,p===0||p!==_.length))return!1;if(o)return!0;for(b=t.parentType,t.parentType="table",C=t.md.block.ruler.getRules("blockquote"),f=t.push("table_open","table",1),f.map=v=[n,0],f=t.push("thead_open","thead",1),f.map=[n,n+1],f=t.push("tr_open","tr",1),f.map=[n,n+1],s=0;s=4)break;for(d=n2(i),d.length&&d[0]===""&&d.shift(),d.length&&d[d.length-1]===""&&d.pop(),u===n+2&&(f=t.push("tbody_open","tbody",1),f.map=h=[n+2,0]),f=t.push("tr_open","tr",1),f.map=[u,u+1],s=0;s=4){o++,a=o;continue}break}return t.line=a,i=t.push("code_block","code",0),i.content=t.getLines(n,a,4+t.blkIndent,!1)+` -`,i.map=[n,t.line],!0},vft=function(t,n,r,o){var a,i,l,s,c,u,d,p=!1,f=t.bMarks[n]+t.tShift[n],_=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||f+3>_||(a=t.src.charCodeAt(f),a!==126&&a!==96)||(c=f,f=t.skipChars(f,a),i=f-c,i<3)||(d=t.src.slice(c,f),l=t.src.slice(f,_),a===96&&l.indexOf(String.fromCharCode(a))>=0))return!1;if(o)return!0;for(s=n;s++,!(s>=r||(f=c=t.bMarks[s]+t.tShift[s],_=t.eMarks[s],f<_&&t.sCount[s]=4)&&(f=t.skipChars(f,a),!(f-c=4||t.src.charCodeAt(R++)!==62)return!1;if(o)return!0;for(s=f=t.sCount[n]+1,t.src.charCodeAt(R)===32?(R++,s++,f++,a=!1,C=!0):t.src.charCodeAt(R)===9?(C=!0,(t.bsCount[n]+f)%4===3?(R++,s++,f++,a=!1):a=!0):C=!1,_=[t.bMarks[n]],t.bMarks[n]=R;R=N,b=[t.sCount[n]],t.sCount[n]=f-s,E=[t.tShift[n]],t.tShift[n]=R-t.bMarks[n],T=t.md.block.ruler.getRules("blockquote"),h=t.parentType,t.parentType="blockquote",p=n+1;p=N));p++){if(t.src.charCodeAt(R++)===62&&!x){for(s=f=t.sCount[p]+1,t.src.charCodeAt(R)===32?(R++,s++,f++,a=!1,C=!0):t.src.charCodeAt(R)===9?(C=!0,(t.bsCount[p]+f)%4===3?(R++,s++,f++,a=!1):a=!0):C=!1,_.push(t.bMarks[p]),t.bMarks[p]=R;R=N,m.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(C?1:0),b.push(t.sCount[p]),t.sCount[p]=f-s,E.push(t.tShift[p]),t.tShift[p]=R-t.bMarks[p];continue}if(u)break;for(y=!1,l=0,c=T.length;l",O.map=d=[n,0],t.md.block.tokenize(t,n,p),O=t.push("blockquote_close","blockquote",-1),O.markup=">",t.lineMax=w,t.parentType=h,d[1]=t.line,l=0;l=4||(a=t.src.charCodeAt(c++),a!==42&&a!==45&&a!==95))return!1;for(i=1;c=a||(n=e.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=a)return-1;if(n=e.src.charCodeAt(o++),n>=48&&n<=57){if(o-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return o=4||t.listIndent>=0&&t.sCount[n]-t.listIndent>=4&&t.sCount[n]=t.blkIndent&&(M=!0),(N=a2(t,n))>=0){if(d=!0,$=t.bMarks[n]+t.tShift[n],h=Number(t.src.slice($,N-1)),M&&h!==1)return!1}else if((N=o2(t,n))>=0)d=!1;else return!1;if(M&&t.skipSpaces(N)>=t.eMarks[n])return!1;if(v=t.src.charCodeAt(N-1),o)return!0;for(m=t.tokens.length,d?(k=t.push("ordered_list_open","ol",1),h!==1&&(k.attrs=[["start",h]])):k=t.push("bullet_list_open","ul",1),k.map=_=[n,0],k.markup=String.fromCharCode(v),E=n,L=!1,A=t.md.block.ruler.getRules("list"),T=t.parentType,t.parentType="list";E=b?c=1:c=C-u,c>4&&(c=1),s=u+c,k=t.push("list_item_open","li",1),k.markup=String.fromCharCode(v),k.map=p=[n,0],d&&(k.info=t.src.slice($,N-1)),w=t.tight,x=t.tShift[n],O=t.sCount[n],y=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=s,t.tight=!0,t.tShift[n]=i-t.bMarks[n],t.sCount[n]=C,i>=b&&t.isEmpty(n+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,n,r,!0),(!t.tight||L)&&(D=!1),L=t.line-n>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=y,t.tShift[n]=x,t.sCount[n]=O,t.tight=w,k=t.push("list_item_close","li",-1),k.markup=String.fromCharCode(v),E=n=t.line,p[1]=E,i=t.bMarks[n],E>=r||t.sCount[E]=4)break;for(P=!1,l=0,f=A.length;l=4||t.src.charCodeAt(T)!==91)return!1;for(;++T3)&&!(t.sCount[x]<0)){for(b=!1,u=0,d=E.length;u"u"&&(t.env.references={}),typeof t.env.references[p]>"u"&&(t.env.references[p]={title:C,href:c}),t.parentType=_,t.line=n+y+1),!0)},xft=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qg={},wft="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rft="[^\"'=<>`\\x00-\\x20]+",Ift="'[^']*'",Nft='"[^"]*"',Aft="(?:"+Rft+"|"+Ift+"|"+Nft+")",Dft="(?:\\s+"+wft+"(?:\\s*=\\s*"+Aft+")?)",bz="<[A-Za-z][A-Za-z0-9\\-]*"+Dft+"*\\s*\\/?>",Sz="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Pft="|",Mft="<[?][\\s\\S]*?[?]>",$ft="]*>",Lft="",kft=new RegExp("^(?:"+bz+"|"+Sz+"|"+Pft+"|"+Mft+"|"+$ft+"|"+Lft+")"),Fft=new RegExp("^(?:"+bz+"|"+Sz+")");Qg.HTML_TAG_RE=kft;Qg.HTML_OPEN_CLOSE_TAG_RE=Fft;var Bft=xft,Uft=Qg.HTML_OPEN_CLOSE_TAG_RE,Ol=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Uft.source+"\\s*$"),/^$/,!1]],Hft=function(t,n,r,o){var a,i,l,s,c=t.bMarks[n]+t.tShift[n],u=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(c)!==60)return!1;for(s=t.src.slice(c,u),a=0;a=4||(a=t.src.charCodeAt(c),a!==35||c>=u))return!1;for(i=1,a=t.src.charCodeAt(++c);a===35&&c6||cc&&i2(t.src.charCodeAt(l-1))&&(u=l),t.line=n+1,s=t.push("heading_open","h"+String(i),1),s.markup="########".slice(0,i),s.map=[n,t.line],s=t.push("inline","",0),s.content=t.src.slice(c,u).trim(),s.map=[n,t.line],s.children=[],s=t.push("heading_close","h"+String(i),-1),s.markup="########".slice(0,i)),!0)},Gft=function(t,n,r){var o,a,i,l,s,c,u,d,p,f=n+1,_,m=t.md.block.ruler.getRules("paragraph");if(t.sCount[n]-t.blkIndent>=4)return!1;for(_=t.parentType,t.parentType="paragraph";f3)){if(t.sCount[f]>=t.blkIndent&&(c=t.bMarks[f]+t.tShift[f],u=t.eMarks[f],c=u)))){d=p===61?1:2;break}if(!(t.sCount[f]<0)){for(a=!1,i=0,l=m.length;i3)&&!(t.sCount[c]<0)){for(o=!1,a=0,i=u.length;a0&&this.level++,this.tokens.push(r),r};Fo.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Fo.prototype.skipEmptyLines=function(t){for(var n=this.lineMax;tn;)if(!Zg(this.src.charCodeAt(--t)))return t+1;return t};Fo.prototype.skipChars=function(t,n){for(var r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Fo.prototype.getLines=function(t,n,r,o){var a,i,l,s,c,u,d,p=t;if(t>=n)return"";for(u=new Array(n-t),a=0;pr?u[a]=new Array(i-r+1).join(" ")+this.src.slice(s,c):u[a]=this.src.slice(s,c)}return u.join("")};Fo.prototype.Token=Ez;var Yft=Fo,Wft=yw,sp=[["table",_ft,["paragraph","reference"]],["code",hft],["fence",vft,["paragraph","reference","blockquote","list"]],["blockquote",bft,["paragraph","reference","blockquote","list"]],["hr",Eft,["paragraph","reference","blockquote","list"]],["list",Cft,["paragraph","reference","blockquote"]],["reference",Oft],["html_block",Hft,["paragraph","reference","blockquote"]],["heading",zft,["paragraph","reference","blockquote"]],["lheading",Gft],["paragraph",Vft]];function Jg(){this.ruler=new Wft;for(var e=0;e=n||e.sCount[l]=c){e.line=n;break}for(o=0;o=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){for(a=r-1;a>=1&&t.pending.charCodeAt(a-1)===32;)a--;t.pending=t.pending.slice(0,a),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(i++;i?@[]^_`{|}~-".split("").forEach(function(e){Ow[e.charCodeAt(0)]=1});var Jft=function(t,n){var r,o=t.pos,a=t.posMax;if(t.src.charCodeAt(o)!==92)return!1;if(o++,o=0;n--)r=t[n],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(o=t[r.end],l=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=e.tokens[r.token],a.type=l?"strong_open":"em_open",a.tag=l?"strong":"em",a.nesting=1,a.markup=l?i+i:i,a.content="",a=e.tokens[o.token],a.type=l?"strong_close":"em_close",a.tag=l?"strong":"em",a.nesting=-1,a.markup=l?i+i:i,a.content="",l&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}t_.postProcess=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(c2(t,t.delimiters),n=0;n=m)return!1;if(v=s,c=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),c.ok){for(p=t.md.normalizeLink(c.str),t.md.validateLink(p)?s=c.pos:p="",v=s;s=m||t.src.charCodeAt(s)!==41)&&(h=!0),s++}if(h){if(typeof t.env.references>"u")return!1;if(s=0?a=t.src.slice(v,s++):s=i+1):s=i+1,a||(a=t.src.slice(l,i)),u=t.env.references[tmt(a)],!u)return t.pos=_,!1;p=u.href,f=u.title}return n||(t.pos=l,t.posMax=i,d=t.push("link_open","a",1),d.attrs=r=[["href",p]],f&&r.push(["title",f]),t.md.inline.tokenize(t),d=t.push("link_close","a",-1)),t.pos=s,t.posMax=m,!0},rmt=Dt.normalizeReference,AE=Dt.isSpace,omt=function(t,n){var r,o,a,i,l,s,c,u,d,p,f,_,m,v="",h=t.pos,b=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91||(s=t.pos+2,l=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),l<0))return!1;if(c=l+1,c=b)return!1;for(m=c,d=t.md.helpers.parseLinkDestination(t.src,c,t.posMax),d.ok&&(v=t.md.normalizeLink(d.str),t.md.validateLink(v)?c=d.pos:v=""),m=c;c=b||t.src.charCodeAt(c)!==41)return t.pos=h,!1;c++}else{if(typeof t.env.references>"u")return!1;if(c=0?i=t.src.slice(m,c++):c=l+1):c=l+1,i||(i=t.src.slice(s,l)),u=t.env.references[rmt(i)],!u)return t.pos=h,!1;v=u.href,p=u.title}return n||(a=t.src.slice(s,l),t.md.inline.parse(a,t.md,t.env,_=[]),f=t.push("image","img",0),f.attrs=r=[["src",v],["alt",""]],f.children=_,f.content=a,p&&r.push(["title",p])),t.pos=c,t.posMax=b,!0},amt=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,imt=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,lmt=function(t,n){var r,o,a,i,l,s,c=t.pos;if(t.src.charCodeAt(c)!==60)return!1;for(l=t.pos,s=t.posMax;;){if(++c>=s||(i=t.src.charCodeAt(c),i===60))return!1;if(i===62)break}return r=t.src.slice(l+1,c),imt.test(r)?(o=t.md.normalizeLink(r),t.md.validateLink(o)?(n||(a=t.push("link_open","a",1),a.attrs=[["href",o]],a.markup="autolink",a.info="auto",a=t.push("text","",0),a.content=t.md.normalizeLinkText(r),a=t.push("link_close","a",-1),a.markup="autolink",a.info="auto"),t.pos+=r.length+2,!0):!1):amt.test(r)?(o=t.md.normalizeLink("mailto:"+r),t.md.validateLink(o)?(n||(a=t.push("link_open","a",1),a.attrs=[["href",o]],a.markup="autolink",a.info="auto",a=t.push("text","",0),a.content=t.md.normalizeLinkText(r),a=t.push("link_close","a",-1),a.markup="autolink",a.info="auto"),t.pos+=r.length+2,!0):!1):!1},smt=Qg.HTML_TAG_RE;function cmt(e){var t=e|32;return t>=97&&t<=122}var umt=function(t,n){var r,o,a,i,l=t.pos;return!t.md.options.html||(a=t.posMax,t.src.charCodeAt(l)!==60||l+2>=a)||(r=t.src.charCodeAt(l+1),r!==33&&r!==63&&r!==47&&!cmt(r))||(o=t.src.slice(l).match(smt),!o)?!1:(n||(i=t.push("html_inline","",0),i.content=t.src.slice(l,l+o[0].length)),t.pos+=o[0].length,!0)},u2=pz,dmt=Dt.has,pmt=Dt.isValidEntityCode,d2=Dt.fromCodePoint,fmt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mmt=/^&([a-z][a-z0-9]{1,31});/i,gmt=function(t,n){var r,o,a,i=t.pos,l=t.posMax;if(t.src.charCodeAt(i)!==38)return!1;if(i+1i;r-=_[r]+1)if(a=t[r],a.marker===o.marker&&a.open&&a.end<0&&(s=!1,(a.close||o.open)&&(a.length+o.length)%3===0&&(a.length%3!==0||o.length%3!==0)&&(s=!0),!s)){c=r>0&&!t[r-1].open?_[r-1]+1:0,_[n]=n-r+c,_[r]=c,o.open=!1,a.end=n,a.close=!1,l=-1,f=-2;break}l!==-1&&(u[o.marker][(o.open?3:0)+(o.length||0)%3]=l)}}}var _mt=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(p2(t,t.delimiters),n=0;n0&&o++,a[n].type==="text"&&n+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};od.prototype.scanDelims=function(e,t){var n=e,r,o,a,i,l,s,c,u,d,p=!0,f=!0,_=this.posMax,m=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;n<_&&this.src.charCodeAt(n)===m;)n++;return a=n-e,o=n<_?this.src.charCodeAt(n):32,c=g2(r)||m2(String.fromCharCode(r)),d=g2(o)||m2(String.fromCharCode(o)),s=f2(r),u=f2(o),u?p=!1:d&&(s||c||(p=!1)),s?f=!1:c&&(u||d||(f=!1)),t?(i=p,l=f):(i=p&&(!f||c),l=f&&(!p||d)),{can_open:i,can_close:l,length:a}};od.prototype.Token=xw;var vmt=od,_2=yw,DE=[["text",jft],["newline",Qft],["escape",Jft],["backticks",emt],["strikethrough",e_.tokenize],["emphasis",t_.tokenize],["link",nmt],["image",omt],["autolink",lmt],["html_inline",umt],["entity",gmt]],PE=[["balance_pairs",_mt],["strikethrough",e_.postProcess],["emphasis",t_.postProcess],["text_collapse",hmt]];function ad(){var e;for(this.ruler=new _2,e=0;e=a)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ad.prototype.parse=function(e,t,n,r){var o,a,i,l=new this.State(e,t,n,r);for(this.tokenize(l),a=this.ruler2.getRules(""),i=a.length,o=0;o|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),ME}function HC(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function n_(e){return Object.prototype.toString.call(e)}function Emt(e){return n_(e)==="[object String]"}function ymt(e){return n_(e)==="[object Object]"}function Cmt(e){return n_(e)==="[object RegExp]"}function v2(e){return n_(e)==="[object Function]"}function Tmt(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var yz={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Omt(e){return Object.keys(e||{}).reduce(function(t,n){return t||yz.hasOwnProperty(n)},!1)}var xmt={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},wmt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Rmt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Imt(e){e.__index__=-1,e.__text_cache__=""}function Nmt(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function b2(){return function(e,t){t.normalize(e)}}function im(e){var t=e.re=Smt()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(wmt),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var o=[];e.__compiled__={};function a(l,s){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+s)}Object.keys(e.__schemas__).forEach(function(l){var s=e.__schemas__[l];if(s!==null){var c={validate:null,link:null};if(e.__compiled__[l]=c,ymt(s)){Cmt(s.validate)?c.validate=Nmt(s.validate):v2(s.validate)?c.validate=s.validate:a(l,s),v2(s.normalize)?c.normalize=s.normalize:s.normalize?a(l,s):c.normalize=b2();return}if(Emt(s)){o.push(l);return}a(l,s)}}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:b2()};var i=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(Tmt).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Imt(e)}function Amt(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function S2(e,t){var n=new Amt(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Gr(e,t){if(!(this instanceof Gr))return new Gr(e,t);t||Omt(e)&&(t=e,e={}),this.__opts__=HC({},yz,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=HC({},xmt,e),this.__compiled__={},this.__tlds__=Rmt,this.__tlds_replaced__=!1,this.re={},im(this)}Gr.prototype.add=function(t,n){return this.__schemas__[t]=n,im(this),this};Gr.prototype.set=function(t){return this.__opts__=HC(this.__opts__,t),this};Gr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,r,o,a,i,l,s,c,u;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(n=s.exec(t))!==null;)if(a=this.testSchemaAt(t,n[2],s.lastIndex),a){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&(o=t.match(this.re.email_fuzzy))!==null&&(i=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=l))),this.__index__>=0};Gr.prototype.pretest=function(t){return this.re.pretest.test(t)};Gr.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Gr.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(S2(this,n)),n=this.__last_index__);for(var o=n?t.slice(n):t;this.test(o);)r.push(S2(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};Gr.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,a){return r!==a[o-1]}).reverse(),im(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,im(this),this)};Gr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Gr.prototype.onCompile=function(){};var Dmt=Gr;const ts=2147483647,To=36,ww=1,Pu=26,Pmt=38,Mmt=700,Cz=72,Tz=128,Oz="-",$mt=/^xn--/,Lmt=/[^\0-\x7F]/,kmt=/[\x2E\u3002\uFF0E\uFF61]/g,Fmt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$E=To-ww,Oo=Math.floor,LE=String.fromCharCode;function Da(e){throw new RangeError(Fmt[e])}function Bmt(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function xz(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(kmt,".");const o=e.split("."),a=Bmt(o,t).join(".");return r+a}function Rw(e){const t=[];let n=0;const r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),Umt=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:To},E2=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Rz=function(e,t,n){let r=0;for(e=n?Oo(e/Mmt):e>>1,e+=Oo(e/t);e>$E*Pu>>1;r+=To)e=Oo(e/$E);return Oo(r+($E+1)*e/(e+Pmt))},Iw=function(e){const t=[],n=e.length;let r=0,o=Tz,a=Cz,i=e.lastIndexOf(Oz);i<0&&(i=0);for(let l=0;l=128&&Da("not-basic"),t.push(e.charCodeAt(l));for(let l=i>0?i+1:0;l=n&&Da("invalid-input");const p=Umt(e.charCodeAt(l++));p>=To&&Da("invalid-input"),p>Oo((ts-r)/u)&&Da("overflow"),r+=p*u;const f=d<=a?ww:d>=a+Pu?Pu:d-a;if(pOo(ts/_)&&Da("overflow"),u*=_}const c=t.length+1;a=Rz(r-s,c,s==0),Oo(r/c)>ts-o&&Da("overflow"),o+=Oo(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Nw=function(e){const t=[];e=Rw(e);const n=e.length;let r=Tz,o=0,a=Cz;for(const s of e)s<128&&t.push(LE(s));const i=t.length;let l=i;for(i&&t.push(Oz);l=r&&uOo((ts-o)/c)&&Da("overflow"),o+=(s-r)*c,r=s;for(const u of e)if(uts&&Da("overflow"),u===r){let d=o;for(let p=To;;p+=To){const f=p<=a?ww:p>=a+Pu?Pu:p-a;if(d=0))try{t.hostname=Az.toASCII(t.hostname)}catch{}return Ri.encode(Ri.format(t))}function ogt(e){var t=Ri.parse(e,!0);if(t.hostname&&(!t.protocol||Dz.indexOf(t.protocol)>=0))try{t.hostname=Az.toUnicode(t.hostname)}catch{}return Ri.decode(Ri.format(t),Ri.decode.defaultChars+"%")}function Vr(e,t){if(!(this instanceof Vr))return new Vr(e,t);t||qc.isString(e)||(t=e||{},e="default"),this.inline=new Qmt,this.block=new Xmt,this.core=new jmt,this.renderer=new Kmt,this.linkify=new Zmt,this.validateLink=ngt,this.normalizeLink=rgt,this.normalizeLinkText=ogt,this.utils=qc,this.helpers=qc.assign({},qmt),this.options={},this.configure(e),t&&this.set(t)}Vr.prototype.set=function(e){return qc.assign(this.options,e),this};Vr.prototype.configure=function(e){var t=this,n;if(qc.isString(e)&&(n=e,e=Jmt[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};Vr.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Vr.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Vr.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Vr.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Vr.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Vr.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Vr.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var agt=Vr,igt=agt;const lgt=Mo(igt);var sgt=ce({name:"VueMarkdown",props:{source:{type:String,required:!0},options:{type:Object,required:!1}},data:function(){return{md:null}},computed:{content:function(){var e,t=this.source;return(e=this.md)===null||e===void 0?void 0:e.render(t)}},created:function(){var e;this.md=new lgt((e=this.options)!==null&&e!==void 0?e:{})},render:function(){return ia("div",{innerHTML:this.content})}});const y2=sgt;async function cgt(e,t){return await ul(`official_site__${e}`,t)}const ugt={href:"https://vectorvein.com/help/docs/introduction",target:"_blank"},dgt={__name:"HelpDropdown",setup(e){const{t}=cl(),n=rd(),{language:r}=_T(n),o=mt({updatable:!1,version:"",download_url:"",release_date:"",release_notes:""});fa(()=>{cgt("get_update_info",{}).then(l=>{l.status===200&&(o.updatable=l.data.updatable,o.version=l.data.version,o.release_date=l.data.release_date,o.release_notes=l.data.release_notes)})});const a=ue(!1),i=ue(!1);return(l,s)=>{const c=pt("a-menu-item"),u=pt("a-modal"),d=pt("a-menu"),p=pt("a-dropdown"),f=lF("highlight");return kt(),xn(p,null,{overlay:Le(()=>[g(d,null,{default:Le(()=>[g(c,null,{default:Le(()=>[Er("a",ugt,Gt(Be(t)("components.layout.helpDropdown.documentation")),1)]),_:1}),o.updatable?(kt(),xn(c,{key:0,onClick:s[2]||(s[2]=_=>i.value=!0)},{default:Le(()=>[bt(Gt(Be(t)("components.layout.helpDropdown.update_available"))+" ",1),g(u,{title:Be(t)("components.layout.helpDropdown.new_version",{version:o.version,releaseDatetime:new Date(o.release_date).toLocaleString()}),open:i.value,footer:null,onCancel:s[1]||(s[1]=_=>i.value=!1)},{default:Le(()=>[Qt(g(Be(y2),{source:o.release_notes[Be(r)],class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[f]])]),_:1},8,["title","open"])]),_:1})):af("",!0),g(c,{onClick:s[4]||(s[4]=_=>a.value=!0)},{default:Le(()=>[bt(Gt(Be(t)("components.layout.helpDropdown.about_vectorvein"))+" ",1),g(u,{title:Be(t)("components.layout.helpDropdown.about_vectorvein"),open:a.value,footer:null,onCancel:s[3]||(s[3]=_=>a.value=!1)},{default:Le(()=>[Qt(g(Be(y2),{source:Be(t)("components.layout.helpDropdown.about_vectorvein_description"),class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[f]])]),_:1},8,["title","open"])]),_:1})]),_:1})]),default:Le(()=>[Er("a",{class:"ant-dropdown-link",onClick:s[0]||(s[0]=os(()=>{},["prevent"]))},[bt(Gt(Be(t)("components.layout.helpDropdown.help"))+" ",1),g(Be(rl))])]),_:1})}}};const pgt=["src"],fgt={href:"/",class:"logo"},mgt=["src"],ggt={__name:"BasicHeader",setup(e){const t=ue(!0),n=hPe(),r=rd(),{language:o}=_T(r),{locale:a,t:i,te:l}=cl({useScope:"global"}),s=u=>{r.setLanguage(u.key),a.value=u.key,document.title=dz(l,i,n.meta.title)},c=ue(window.innerWidth);return fa(()=>{t.value=!1,window.addEventListener("resize",()=>{c.value=window.innerWidth})}),(u,d)=>{const p=pt("a-col"),f=pt("a-button"),_=pt("router-link"),m=pt("a-menu-item"),v=pt("a-menu"),h=pt("a-dropdown"),b=pt("a-row"),E=pt("a-sub-menu"),C=pt("a-layout-header");return kt(),xn(C,{style:{background:"#fff",width:"100%",padding:"0 50px","box-shadow":"0 2px 10px 0 rgb(0 0 0 / 8%)"},class:"basic-header"},{default:Le(()=>[c.value>960?(kt(),xn(b,{key:0,type:"flex",align:"middle",justify:"space-between",gutter:[16,16],style:{width:"100%"}},{default:Le(()=>[g(p,{flex:"0 0",class:"logo"},{default:Le(()=>[Er("img",{alt:"VectorVein",src:Be(kk)},null,8,pgt)]),_:1}),g(p,{flex:"0 0"},{default:Le(()=>[g(_,{to:"/workflow"},{default:Le(()=>[g(f,{type:"link",id:"header-workflow-button"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.workflow_space")),1)]),_:1})]),_:1})]),_:1}),g(p,{flex:"0 0"},{default:Le(()=>[g(_,{to:"/data"},{default:Le(()=>[g(f,{type:"link",id:"header-data-button"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1})]),_:1}),g(p,{flex:"1 0",style:{display:"flex","justify-content":"end","align-items":"center",gap:"16px"}},{default:Le(()=>[g(n$e),g(h,null,{overlay:Le(()=>[g(v,{onClick:s},{default:Le(()=>[(kt(!0),Jo(Ue,null,eu(Object.keys(Be(Tl)),y=>(kt(),xn(m,{key:y},{default:Le(()=>[bt(Gt(Be(Tl)[y]),1)]),_:2},1024))),128))]),_:1})]),default:Le(()=>[Er("a",{class:"ant-dropdown-link",onClick:d[0]||(d[0]=os(()=>{},["prevent"]))},[g(Be(vA)),bt(" International - "+Gt(Be(Tl)[Be(o)])+" ",1),g(Be(rl))])]),_:1}),g(dgt)]),_:1})]),_:1})):(kt(),xn(b,{key:1,style:{width:"100%"},justify:"space-between"},{default:Le(()=>[g(p,null,{default:Le(()=>[Er("a",fgt,[Er("img",{alt:"VectorVein",src:Be(kk)},null,8,mgt)])]),_:1}),g(p,null,{default:Le(()=>[g(h,null,{overlay:Le(()=>[g(v,null,{default:Le(()=>[g(m,{key:"1"},{default:Le(()=>[g(_,{to:"/workflow"},{default:Le(()=>[g(f,{type:"link"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.workflow_space")),1)]),_:1})]),_:1})]),_:1}),g(m,{key:"2"},{default:Le(()=>[g(_,{to:"/data"},{default:Le(()=>[g(f,{type:"link"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1})]),_:1}),g(E,{key:"3"},{title:Le(()=>[g(Be(vA)),bt(" International - "+Gt(Be(Tl)[Be(o)]),1)]),default:Le(()=>[(kt(!0),Jo(Ue,null,eu(Object.keys(Be(Tl)),y=>(kt(),xn(m,{key:y,onClick:os(T=>s({key:y}),["prevent"])},{default:Le(()=>[bt(Gt(Be(Tl)[y]),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})]),default:Le(()=>[g(f,null,{default:Le(()=>[g(Be(Tme))]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})}}};const _gt=["src"],C2={__name:"WorkspaceLayout",setup(e){const{t}=cl(),n=zMe(),r=rd(),{setting:o}=_T(r),a=ue(!1);fa(async()=>{const[u,d]=await Promise.all([JMe(n,!0),om("get",{})]);r.setSetting(d.data),!(typeof o.value.data.tour_version>"u")&&o.value.data.tour_version{a.value=!0},1e3))});const i=I(()=>jMe()),l=ue(0),s=[{title:t("layouts.workspaceLayout.tour.workflow_button_title"),description:t("layouts.workspaceLayout.tour.workflow_button_description"),target:()=>document.getElementById("header-workflow-button")},{title:t("layouts.workspaceLayout.tour.database_button_title"),description:t("layouts.workspaceLayout.tour.database_button_description"),target:()=>document.getElementById("header-data-button")}],c=()=>{r.setTourVersion(yE),a.value=!1};return(u,d)=>{const p=pt("router-view"),f=pt("a-layout-content"),_=pt("a-tour"),m=pt("a-back-top"),v=pt("a-layout");return kt(),xn(v,{style:{"min-height":"100vh"}},{default:Le(()=>[g(ggt),g(f,{class:"layout-content-container",style:{marginTop:"64px"}},{default:Le(()=>[g(p,{class:"content-view-container"}),Er("img",{class:"layout-background-img",src:i.value},null,8,_gt)]),_:1}),g(_,{current:l.value,"onUpdate:current":d[0]||(d[0]=h=>l.value=h),open:a.value,steps:s,onClose:c},null,8,["current","open"]),g(m)]),_:1})}}},hgt=[{path:"/workflow/editor/:workflowId",name:"WorkflowEditor",meta:{login:!0},component:()=>Kr(()=>import("./WorkflowEditor-0cc440c6.js"),["assets/WorkflowEditor-0cc440c6.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/index-fb7c1fe5.js","assets/QuestionPopover-c8fa17cc.js","assets/QuestionPopover-9967181b.css","assets/EchartsRenderer-3d08027d.js","assets/EchartsRenderer-22c6610f.css","assets/AddOne-dbc3bffb.js","assets/userDatabase-87373af7.js","assets/MarkdownEditor-38e43a8d.js","assets/UploaderFieldUse-71f49711.js","assets/database-adffb067.js","assets/stringify-ec884b6d.js","assets/WorkflowEditor-e7ec6859.css"])},{path:"/",component:C2,children:[{path:"",redirect:"/workflow"},{path:"workflow",name:"WorkflowSpace",meta:{title:"router.workspace.children.workflow_space"},component:()=>Kr(()=>import("./WorkflowSpace-0fcbdd01.js"),["assets/WorkflowSpace-0fcbdd01.js","assets/NewWorkflowModal-1c07a1e7.js","assets/AddOne-dbc3bffb.js","assets/index-fb7c1fe5.js","assets/NewWorkflowModal-2b09b3f1.css","assets/_plugin-vue_export-helper-c27b6911.js","assets/WorkflowSpace-659ac1dd.css"]),children:[{path:"",name:"WorkflowSpaceMain",meta:{title:"router.workspace.children.workflow_main"},component:()=>Kr(()=>import("./WorkflowSpaceMain-5fe037a4.js"),["assets/WorkflowSpaceMain-5fe037a4.js","assets/QuestionPopover-c8fa17cc.js","assets/QuestionPopover-9967181b.css","assets/MarkdownEditor-38e43a8d.js","assets/NewWorkflowModal-1c07a1e7.js","assets/AddOne-dbc3bffb.js","assets/index-fb7c1fe5.js","assets/NewWorkflowModal-2b09b3f1.css","assets/WorkflowRunRecordsDrawer-55188329.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/WorkflowSpaceMain-90b977ed.css"])},{path:"template/:workflowTemplateId",name:"WorkflowTemplate",meta:{title:"router.workspace.children.workflow_template"},component:()=>Kr(()=>import("./WorkflowTemplate-99a45f9a.js"),["assets/WorkflowTemplate-99a45f9a.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/WorkflowTemplate-8c61c83e.css"])},{path:":workflowId",name:"WorkflowUse",meta:{title:"router.workspace.children.workflow_use"},component:()=>Kr(()=>import("./WorkflowSpaceUse-4d5d179e.js"),["assets/WorkflowSpaceUse-4d5d179e.js","assets/userDatabase-87373af7.js","assets/EchartsRenderer-3d08027d.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/EchartsRenderer-22c6610f.css","assets/UploaderFieldUse-71f49711.js","assets/WorkflowRunRecordsDrawer-55188329.js","assets/database-adffb067.js","assets/index-fb7c1fe5.js","assets/WorkflowSpaceUse-a2195012.css"])}]},{path:"data",name:"DataSpace",meta:{title:"router.workspace.children.data_space"},children:[{path:"",name:"DataSpace",meta:{title:"router.workspace.children.data_space"},component:()=>Kr(()=>import("./DataSpace-5bfdea19.js"),["assets/DataSpace-5bfdea19.js","assets/userDatabase-87373af7.js","assets/database-adffb067.js","assets/DataSpace-56541c64.css"])},{path:":databaseId",name:"DatabaseDetail",meta:{title:"router.workspace.children.database_detail"},component:()=>Kr(()=>import("./DatabaseDetail-8f650464.js"),["assets/DatabaseDetail-8f650464.js","assets/database-adffb067.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/DatabaseOutlined-78db540c.js","assets/DatabaseDetail-532d61aa.css"])},{path:":databaseId/create",name:"DatabaseObjectCreate",meta:{title:"router.workspace.children.database_detail"},component:()=>Kr(()=>import("./DatabaseObjectCreate-a9926f95.js"),["assets/DatabaseObjectCreate-a9926f95.js","assets/UploaderFieldUse-71f49711.js","assets/QuestionPopover-c8fa17cc.js","assets/QuestionPopover-9967181b.css","assets/database-adffb067.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/DatabaseOutlined-78db540c.js","assets/DatabaseObjectCreate-5f6ec6a4.css"])},{path:":databaseId/object/:objectId",name:"DatabaseObjectDetail",meta:{title:"router.workspace.children.database_object_detail"},component:()=>Kr(()=>import("./DatabaseObjectDetail-c9c6824c.js"),["assets/DatabaseObjectDetail-c9c6824c.js","assets/database-adffb067.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/DatabaseOutlined-78db540c.js","assets/DatabaseObjectDetail-43cc50d8.css"])}]}]},{path:"/account",name:"account",component:C2,meta:{login:!0},children:[{path:"info",name:"AccountInfo",meta:{title:"router.account.children.account_info"},component:()=>Kr(()=>import("./AccountInfo-00e84a61.js"),["assets/AccountInfo-00e84a61.js","assets/userAccount-2cf446f2.js"])},{path:"settings",name:"AccountSettings",meta:{title:"router.account.children.account_settings"},component:()=>Kr(()=>import("./AccountSettings-19940ed7.js"),["assets/AccountSettings-19940ed7.js","assets/userAccount-2cf446f2.js"])}]}],Pz=gPe({history:ADe("/"),routes:hgt});const dl=DF(uDe);dl.use(c9());dl.use(Pz);dl.use(Awe);dl.use(UC);dl.use(rDe);dl.mount("#app");dl.directive("highlight",function(e){e.querySelectorAll("pre code").forEach(n=>{nAe.highlightElement(n)})});Pz.beforeEach(async(e,t,n)=>{e.meta.title&&(document.title=dz(UC.global.te,UC.global.t,e.meta.title)),n()});export{_T as $,rt as A,eo as B,ln as C,fa as D,Ye as E,Ue as F,Er as G,Gt as H,af as I,dm as J,xn as K,ia as L,ot as M,nt as N,mm as O,pt as P,e7 as Q,bt as R,Egt as S,Gl as T,cl as U,Ffe as V,mse as W,le as X,et as Y,Tgt as Z,Cgt as _,ce as a,Xm as a$,Agt as a0,XMe as a1,ju as a2,Mgt as a3,Lk as a4,lF as a5,Ir as a6,Qt as a7,y2 as a8,hPe as a9,b0 as aA,wr as aB,gu as aC,QT as aD,Gte as aE,cJ as aF,eee as aG,pee as aH,C0 as aI,Um as aJ,p3 as aK,Pee as aL,Dte as aM,xo as aN,dn as aO,Za as aP,Wn as aQ,E0 as aR,En as aS,ry as aT,GV as aU,HV as aV,c4 as aW,Kr as aX,Rgt as aY,Rr as aZ,$6 as a_,Ogt as aa,zMe as ab,rd as ac,wgt as ad,er as ae,qa as af,f4 as ag,Pgt as ah,Ngt as ai,yn as aj,ew as ak,nge as al,os as am,JMe as an,cgt as ao,xgt as ap,Dgt as aq,QMe as ar,Igt as as,ro as at,xs as au,jT as av,YT as aw,OJ as ax,K3 as ay,Fu as az,I as b,M6 as b0,ul as b1,u4 as b2,Mo as b3,$ie as b4,Pie as b5,Nc as b6,h0 as b7,bJ as b8,Lte as b9,dj as ba,O0 as bb,Jm as bc,Pte as bd,yte as be,ws as bf,Zm as bg,eg as bh,Hm as bi,rJ as bj,X3 as bk,xne as bl,BJ as bm,v0 as bn,mJ as bo,GJ as bp,G_ as bq,jte as br,Vte as bs,Sp as bt,g as c,kF as d,Jo as e,Em as f,KC as g,qC as h,We as i,A2 as j,G2 as k,Sgt as l,mt as m,pm as n,kt as o,Qe as p,ygt as q,ue as r,$n as s,Ge as t,Be as u,qe as v,ye as w,Le as x,eu as y,Vt as z}; +`,i.map=[n,t.line],!0},vft=function(t,n,r,o){var a,i,l,s,c,u,d,p=!1,f=t.bMarks[n]+t.tShift[n],_=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||f+3>_||(a=t.src.charCodeAt(f),a!==126&&a!==96)||(c=f,f=t.skipChars(f,a),i=f-c,i<3)||(d=t.src.slice(c,f),l=t.src.slice(f,_),a===96&&l.indexOf(String.fromCharCode(a))>=0))return!1;if(o)return!0;for(s=n;s++,!(s>=r||(f=c=t.bMarks[s]+t.tShift[s],_=t.eMarks[s],f<_&&t.sCount[s]=4)&&(f=t.skipChars(f,a),!(f-c=4||t.src.charCodeAt(R++)!==62)return!1;if(o)return!0;for(s=f=t.sCount[n]+1,t.src.charCodeAt(R)===32?(R++,s++,f++,a=!1,C=!0):t.src.charCodeAt(R)===9?(C=!0,(t.bsCount[n]+f)%4===3?(R++,s++,f++,a=!1):a=!0):C=!1,_=[t.bMarks[n]],t.bMarks[n]=R;R=N,b=[t.sCount[n]],t.sCount[n]=f-s,E=[t.tShift[n]],t.tShift[n]=R-t.bMarks[n],T=t.md.block.ruler.getRules("blockquote"),h=t.parentType,t.parentType="blockquote",p=n+1;p=N));p++){if(t.src.charCodeAt(R++)===62&&!x){for(s=f=t.sCount[p]+1,t.src.charCodeAt(R)===32?(R++,s++,f++,a=!1,C=!0):t.src.charCodeAt(R)===9?(C=!0,(t.bsCount[p]+f)%4===3?(R++,s++,f++,a=!1):a=!0):C=!1,_.push(t.bMarks[p]),t.bMarks[p]=R;R=N,m.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(C?1:0),b.push(t.sCount[p]),t.sCount[p]=f-s,E.push(t.tShift[p]),t.tShift[p]=R-t.bMarks[p];continue}if(u)break;for(y=!1,l=0,c=T.length;l",O.map=d=[n,0],t.md.block.tokenize(t,n,p),O=t.push("blockquote_close","blockquote",-1),O.markup=">",t.lineMax=w,t.parentType=h,d[1]=t.line,l=0;l=4||(a=t.src.charCodeAt(c++),a!==42&&a!==45&&a!==95))return!1;for(i=1;c=a||(n=e.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=a)return-1;if(n=e.src.charCodeAt(o++),n>=48&&n<=57){if(o-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return o=4||t.listIndent>=0&&t.sCount[n]-t.listIndent>=4&&t.sCount[n]=t.blkIndent&&(M=!0),(N=a2(t,n))>=0){if(d=!0,$=t.bMarks[n]+t.tShift[n],h=Number(t.src.slice($,N-1)),M&&h!==1)return!1}else if((N=o2(t,n))>=0)d=!1;else return!1;if(M&&t.skipSpaces(N)>=t.eMarks[n])return!1;if(v=t.src.charCodeAt(N-1),o)return!0;for(m=t.tokens.length,d?(k=t.push("ordered_list_open","ol",1),h!==1&&(k.attrs=[["start",h]])):k=t.push("bullet_list_open","ul",1),k.map=_=[n,0],k.markup=String.fromCharCode(v),E=n,L=!1,A=t.md.block.ruler.getRules("list"),T=t.parentType,t.parentType="list";E=b?c=1:c=C-u,c>4&&(c=1),s=u+c,k=t.push("list_item_open","li",1),k.markup=String.fromCharCode(v),k.map=p=[n,0],d&&(k.info=t.src.slice($,N-1)),w=t.tight,x=t.tShift[n],O=t.sCount[n],y=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=s,t.tight=!0,t.tShift[n]=i-t.bMarks[n],t.sCount[n]=C,i>=b&&t.isEmpty(n+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,n,r,!0),(!t.tight||L)&&(D=!1),L=t.line-n>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=y,t.tShift[n]=x,t.sCount[n]=O,t.tight=w,k=t.push("list_item_close","li",-1),k.markup=String.fromCharCode(v),E=n=t.line,p[1]=E,i=t.bMarks[n],E>=r||t.sCount[E]=4)break;for(P=!1,l=0,f=A.length;l=4||t.src.charCodeAt(T)!==91)return!1;for(;++T3)&&!(t.sCount[x]<0)){for(b=!1,u=0,d=E.length;u"u"&&(t.env.references={}),typeof t.env.references[p]>"u"&&(t.env.references[p]={title:C,href:c}),t.parentType=_,t.line=n+y+1),!0)},xft=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qg={},wft="[a-zA-Z_:][a-zA-Z0-9:._-]*",Rft="[^\"'=<>`\\x00-\\x20]+",Ift="'[^']*'",Nft='"[^"]*"',Aft="(?:"+Rft+"|"+Ift+"|"+Nft+")",Dft="(?:\\s+"+wft+"(?:\\s*=\\s*"+Aft+")?)",bz="<[A-Za-z][A-Za-z0-9\\-]*"+Dft+"*\\s*\\/?>",Sz="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Pft="|",Mft="<[?][\\s\\S]*?[?]>",$ft="]*>",Lft="",kft=new RegExp("^(?:"+bz+"|"+Sz+"|"+Pft+"|"+Mft+"|"+$ft+"|"+Lft+")"),Fft=new RegExp("^(?:"+bz+"|"+Sz+")");Qg.HTML_TAG_RE=kft;Qg.HTML_OPEN_CLOSE_TAG_RE=Fft;var Bft=xft,Uft=Qg.HTML_OPEN_CLOSE_TAG_RE,Ol=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Uft.source+"\\s*$"),/^$/,!1]],Hft=function(t,n,r,o){var a,i,l,s,c=t.bMarks[n]+t.tShift[n],u=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(c)!==60)return!1;for(s=t.src.slice(c,u),a=0;a=4||(a=t.src.charCodeAt(c),a!==35||c>=u))return!1;for(i=1,a=t.src.charCodeAt(++c);a===35&&c6||cc&&i2(t.src.charCodeAt(l-1))&&(u=l),t.line=n+1,s=t.push("heading_open","h"+String(i),1),s.markup="########".slice(0,i),s.map=[n,t.line],s=t.push("inline","",0),s.content=t.src.slice(c,u).trim(),s.map=[n,t.line],s.children=[],s=t.push("heading_close","h"+String(i),-1),s.markup="########".slice(0,i)),!0)},Gft=function(t,n,r){var o,a,i,l,s,c,u,d,p,f=n+1,_,m=t.md.block.ruler.getRules("paragraph");if(t.sCount[n]-t.blkIndent>=4)return!1;for(_=t.parentType,t.parentType="paragraph";f3)){if(t.sCount[f]>=t.blkIndent&&(c=t.bMarks[f]+t.tShift[f],u=t.eMarks[f],c=u)))){d=p===61?1:2;break}if(!(t.sCount[f]<0)){for(a=!1,i=0,l=m.length;i3)&&!(t.sCount[c]<0)){for(o=!1,a=0,i=u.length;a0&&this.level++,this.tokens.push(r),r};Fo.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Fo.prototype.skipEmptyLines=function(t){for(var n=this.lineMax;tn;)if(!Zg(this.src.charCodeAt(--t)))return t+1;return t};Fo.prototype.skipChars=function(t,n){for(var r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Fo.prototype.getLines=function(t,n,r,o){var a,i,l,s,c,u,d,p=t;if(t>=n)return"";for(u=new Array(n-t),a=0;pr?u[a]=new Array(i-r+1).join(" ")+this.src.slice(s,c):u[a]=this.src.slice(s,c)}return u.join("")};Fo.prototype.Token=Ez;var Yft=Fo,Wft=yw,sp=[["table",_ft,["paragraph","reference"]],["code",hft],["fence",vft,["paragraph","reference","blockquote","list"]],["blockquote",bft,["paragraph","reference","blockquote","list"]],["hr",Eft,["paragraph","reference","blockquote","list"]],["list",Cft,["paragraph","reference","blockquote"]],["reference",Oft],["html_block",Hft,["paragraph","reference","blockquote"]],["heading",zft,["paragraph","reference","blockquote"]],["lheading",Gft],["paragraph",Vft]];function Jg(){this.ruler=new Wft;for(var e=0;e=n||e.sCount[l]=c){e.line=n;break}for(o=0;o=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){for(a=r-1;a>=1&&t.pending.charCodeAt(a-1)===32;)a--;t.pending=t.pending.slice(0,a),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(i++;i?@[]^_`{|}~-".split("").forEach(function(e){Ow[e.charCodeAt(0)]=1});var Jft=function(t,n){var r,o=t.pos,a=t.posMax;if(t.src.charCodeAt(o)!==92)return!1;if(o++,o=0;n--)r=t[n],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(o=t[r.end],l=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=e.tokens[r.token],a.type=l?"strong_open":"em_open",a.tag=l?"strong":"em",a.nesting=1,a.markup=l?i+i:i,a.content="",a=e.tokens[o.token],a.type=l?"strong_close":"em_close",a.tag=l?"strong":"em",a.nesting=-1,a.markup=l?i+i:i,a.content="",l&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}t_.postProcess=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(c2(t,t.delimiters),n=0;n=m)return!1;if(v=s,c=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),c.ok){for(p=t.md.normalizeLink(c.str),t.md.validateLink(p)?s=c.pos:p="",v=s;s=m||t.src.charCodeAt(s)!==41)&&(h=!0),s++}if(h){if(typeof t.env.references>"u")return!1;if(s=0?a=t.src.slice(v,s++):s=i+1):s=i+1,a||(a=t.src.slice(l,i)),u=t.env.references[tmt(a)],!u)return t.pos=_,!1;p=u.href,f=u.title}return n||(t.pos=l,t.posMax=i,d=t.push("link_open","a",1),d.attrs=r=[["href",p]],f&&r.push(["title",f]),t.md.inline.tokenize(t),d=t.push("link_close","a",-1)),t.pos=s,t.posMax=m,!0},rmt=Dt.normalizeReference,AE=Dt.isSpace,omt=function(t,n){var r,o,a,i,l,s,c,u,d,p,f,_,m,v="",h=t.pos,b=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91||(s=t.pos+2,l=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),l<0))return!1;if(c=l+1,c=b)return!1;for(m=c,d=t.md.helpers.parseLinkDestination(t.src,c,t.posMax),d.ok&&(v=t.md.normalizeLink(d.str),t.md.validateLink(v)?c=d.pos:v=""),m=c;c=b||t.src.charCodeAt(c)!==41)return t.pos=h,!1;c++}else{if(typeof t.env.references>"u")return!1;if(c=0?i=t.src.slice(m,c++):c=l+1):c=l+1,i||(i=t.src.slice(s,l)),u=t.env.references[rmt(i)],!u)return t.pos=h,!1;v=u.href,p=u.title}return n||(a=t.src.slice(s,l),t.md.inline.parse(a,t.md,t.env,_=[]),f=t.push("image","img",0),f.attrs=r=[["src",v],["alt",""]],f.children=_,f.content=a,p&&r.push(["title",p])),t.pos=c,t.posMax=b,!0},amt=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,imt=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,lmt=function(t,n){var r,o,a,i,l,s,c=t.pos;if(t.src.charCodeAt(c)!==60)return!1;for(l=t.pos,s=t.posMax;;){if(++c>=s||(i=t.src.charCodeAt(c),i===60))return!1;if(i===62)break}return r=t.src.slice(l+1,c),imt.test(r)?(o=t.md.normalizeLink(r),t.md.validateLink(o)?(n||(a=t.push("link_open","a",1),a.attrs=[["href",o]],a.markup="autolink",a.info="auto",a=t.push("text","",0),a.content=t.md.normalizeLinkText(r),a=t.push("link_close","a",-1),a.markup="autolink",a.info="auto"),t.pos+=r.length+2,!0):!1):amt.test(r)?(o=t.md.normalizeLink("mailto:"+r),t.md.validateLink(o)?(n||(a=t.push("link_open","a",1),a.attrs=[["href",o]],a.markup="autolink",a.info="auto",a=t.push("text","",0),a.content=t.md.normalizeLinkText(r),a=t.push("link_close","a",-1),a.markup="autolink",a.info="auto"),t.pos+=r.length+2,!0):!1):!1},smt=Qg.HTML_TAG_RE;function cmt(e){var t=e|32;return t>=97&&t<=122}var umt=function(t,n){var r,o,a,i,l=t.pos;return!t.md.options.html||(a=t.posMax,t.src.charCodeAt(l)!==60||l+2>=a)||(r=t.src.charCodeAt(l+1),r!==33&&r!==63&&r!==47&&!cmt(r))||(o=t.src.slice(l).match(smt),!o)?!1:(n||(i=t.push("html_inline","",0),i.content=t.src.slice(l,l+o[0].length)),t.pos+=o[0].length,!0)},u2=pz,dmt=Dt.has,pmt=Dt.isValidEntityCode,d2=Dt.fromCodePoint,fmt=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,mmt=/^&([a-z][a-z0-9]{1,31});/i,gmt=function(t,n){var r,o,a,i=t.pos,l=t.posMax;if(t.src.charCodeAt(i)!==38)return!1;if(i+1i;r-=_[r]+1)if(a=t[r],a.marker===o.marker&&a.open&&a.end<0&&(s=!1,(a.close||o.open)&&(a.length+o.length)%3===0&&(a.length%3!==0||o.length%3!==0)&&(s=!0),!s)){c=r>0&&!t[r-1].open?_[r-1]+1:0,_[n]=n-r+c,_[r]=c,o.open=!1,a.end=n,a.close=!1,l=-1,f=-2;break}l!==-1&&(u[o.marker][(o.open?3:0)+(o.length||0)%3]=l)}}}var _mt=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(p2(t,t.delimiters),n=0;n0&&o++,a[n].type==="text"&&n+10&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r};od.prototype.scanDelims=function(e,t){var n=e,r,o,a,i,l,s,c,u,d,p=!0,f=!0,_=this.posMax,m=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;n<_&&this.src.charCodeAt(n)===m;)n++;return a=n-e,o=n<_?this.src.charCodeAt(n):32,c=g2(r)||m2(String.fromCharCode(r)),d=g2(o)||m2(String.fromCharCode(o)),s=f2(r),u=f2(o),u?p=!1:d&&(s||c||(p=!1)),s?f=!1:c&&(u||d||(f=!1)),t?(i=p,l=f):(i=p&&(!f||c),l=f&&(!p||d)),{can_open:i,can_close:l,length:a}};od.prototype.Token=xw;var vmt=od,_2=yw,DE=[["text",jft],["newline",Qft],["escape",Jft],["backticks",emt],["strikethrough",e_.tokenize],["emphasis",t_.tokenize],["link",nmt],["image",omt],["autolink",lmt],["html_inline",umt],["entity",gmt]],PE=[["balance_pairs",_mt],["strikethrough",e_.postProcess],["emphasis",t_.postProcess],["text_collapse",hmt]];function ad(){var e;for(this.ruler=new _2,e=0;e=a)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ad.prototype.parse=function(e,t,n,r){var o,a,i,l=new this.State(e,t,n,r);for(this.tokenize(l),a=this.ruler2.getRules(""),i=a.length,o=0;o|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),ME}function HC(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function n_(e){return Object.prototype.toString.call(e)}function Emt(e){return n_(e)==="[object String]"}function ymt(e){return n_(e)==="[object Object]"}function Cmt(e){return n_(e)==="[object RegExp]"}function v2(e){return n_(e)==="[object Function]"}function Tmt(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var yz={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Omt(e){return Object.keys(e||{}).reduce(function(t,n){return t||yz.hasOwnProperty(n)},!1)}var xmt={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},wmt="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Rmt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Imt(e){e.__index__=-1,e.__text_cache__=""}function Nmt(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function b2(){return function(e,t){t.normalize(e)}}function im(e){var t=e.re=Smt()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(wmt),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var o=[];e.__compiled__={};function a(l,s){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+s)}Object.keys(e.__schemas__).forEach(function(l){var s=e.__schemas__[l];if(s!==null){var c={validate:null,link:null};if(e.__compiled__[l]=c,ymt(s)){Cmt(s.validate)?c.validate=Nmt(s.validate):v2(s.validate)?c.validate=s.validate:a(l,s),v2(s.normalize)?c.normalize=s.normalize:s.normalize?a(l,s):c.normalize=b2();return}if(Emt(s)){o.push(l);return}a(l,s)}}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:b2()};var i=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(Tmt).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+i+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Imt(e)}function Amt(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function S2(e,t){var n=new Amt(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Gr(e,t){if(!(this instanceof Gr))return new Gr(e,t);t||Omt(e)&&(t=e,e={}),this.__opts__=HC({},yz,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=HC({},xmt,e),this.__compiled__={},this.__tlds__=Rmt,this.__tlds_replaced__=!1,this.re={},im(this)}Gr.prototype.add=function(t,n){return this.__schemas__[t]=n,im(this),this};Gr.prototype.set=function(t){return this.__opts__=HC(this.__opts__,t),this};Gr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,r,o,a,i,l,s,c,u;if(this.re.schema_test.test(t)){for(s=this.re.schema_search,s.lastIndex=0;(n=s.exec(t))!==null;)if(a=this.testSchemaAt(t,n[2],s.lastIndex),a){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c=0&&(o=t.match(this.re.email_fuzzy))!==null&&(i=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=l))),this.__index__>=0};Gr.prototype.pretest=function(t){return this.re.pretest.test(t)};Gr.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Gr.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(S2(this,n)),n=this.__last_index__);for(var o=n?t.slice(n):t;this.test(o);)r.push(S2(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null};Gr.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,a){return r!==a[o-1]}).reverse(),im(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,im(this),this)};Gr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Gr.prototype.onCompile=function(){};var Dmt=Gr;const ts=2147483647,To=36,ww=1,Pu=26,Pmt=38,Mmt=700,Cz=72,Tz=128,Oz="-",$mt=/^xn--/,Lmt=/[^\0-\x7F]/,kmt=/[\x2E\u3002\uFF0E\uFF61]/g,Fmt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$E=To-ww,Oo=Math.floor,LE=String.fromCharCode;function Da(e){throw new RangeError(Fmt[e])}function Bmt(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function xz(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(kmt,".");const o=e.split("."),a=Bmt(o,t).join(".");return r+a}function Rw(e){const t=[];let n=0;const r=e.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...e),Umt=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:To},E2=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Rz=function(e,t,n){let r=0;for(e=n?Oo(e/Mmt):e>>1,e+=Oo(e/t);e>$E*Pu>>1;r+=To)e=Oo(e/$E);return Oo(r+($E+1)*e/(e+Pmt))},Iw=function(e){const t=[],n=e.length;let r=0,o=Tz,a=Cz,i=e.lastIndexOf(Oz);i<0&&(i=0);for(let l=0;l=128&&Da("not-basic"),t.push(e.charCodeAt(l));for(let l=i>0?i+1:0;l=n&&Da("invalid-input");const p=Umt(e.charCodeAt(l++));p>=To&&Da("invalid-input"),p>Oo((ts-r)/u)&&Da("overflow"),r+=p*u;const f=d<=a?ww:d>=a+Pu?Pu:d-a;if(pOo(ts/_)&&Da("overflow"),u*=_}const c=t.length+1;a=Rz(r-s,c,s==0),Oo(r/c)>ts-o&&Da("overflow"),o+=Oo(r/c),r%=c,t.splice(r++,0,o)}return String.fromCodePoint(...t)},Nw=function(e){const t=[];e=Rw(e);const n=e.length;let r=Tz,o=0,a=Cz;for(const s of e)s<128&&t.push(LE(s));const i=t.length;let l=i;for(i&&t.push(Oz);l=r&&uOo((ts-o)/c)&&Da("overflow"),o+=(s-r)*c,r=s;for(const u of e)if(uts&&Da("overflow"),u===r){let d=o;for(let p=To;;p+=To){const f=p<=a?ww:p>=a+Pu?Pu:p-a;if(d=0))try{t.hostname=Az.toASCII(t.hostname)}catch{}return Ri.encode(Ri.format(t))}function ogt(e){var t=Ri.parse(e,!0);if(t.hostname&&(!t.protocol||Dz.indexOf(t.protocol)>=0))try{t.hostname=Az.toUnicode(t.hostname)}catch{}return Ri.decode(Ri.format(t),Ri.decode.defaultChars+"%")}function Vr(e,t){if(!(this instanceof Vr))return new Vr(e,t);t||qc.isString(e)||(t=e||{},e="default"),this.inline=new Qmt,this.block=new Xmt,this.core=new jmt,this.renderer=new Kmt,this.linkify=new Zmt,this.validateLink=ngt,this.normalizeLink=rgt,this.normalizeLinkText=ogt,this.utils=qc,this.helpers=qc.assign({},qmt),this.options={},this.configure(e),t&&this.set(t)}Vr.prototype.set=function(e){return qc.assign(this.options,e),this};Vr.prototype.configure=function(e){var t=this,n;if(qc.isString(e)&&(n=e,e=Jmt[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this};Vr.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};Vr.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};Vr.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};Vr.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};Vr.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};Vr.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};Vr.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var agt=Vr,igt=agt;const lgt=Mo(igt);var sgt=ce({name:"VueMarkdown",props:{source:{type:String,required:!0},options:{type:Object,required:!1}},data:function(){return{md:null}},computed:{content:function(){var e,t=this.source;return(e=this.md)===null||e===void 0?void 0:e.render(t)}},created:function(){var e;this.md=new lgt((e=this.options)!==null&&e!==void 0?e:{})},render:function(){return ia("div",{innerHTML:this.content})}});const y2=sgt;async function cgt(e,t){return await ul(`official_site__${e}`,t)}const ugt={href:"https://vectorvein.com/help/docs/introduction",target:"_blank"},dgt={__name:"HelpDropdown",setup(e){const{t}=cl(),n=rd(),{language:r}=_T(n),o=mt({updatable:!1,version:"",download_url:"",release_date:"",release_notes:""});fa(()=>{cgt("get_update_info",{}).then(l=>{l.status===200&&(o.updatable=l.data.updatable,o.version=l.data.version,o.release_date=l.data.release_date,o.release_notes=l.data.release_notes)})});const a=ue(!1),i=ue(!1);return(l,s)=>{const c=pt("a-menu-item"),u=pt("a-modal"),d=pt("a-menu"),p=pt("a-dropdown"),f=lF("highlight");return kt(),xn(p,null,{overlay:Le(()=>[g(d,null,{default:Le(()=>[g(c,null,{default:Le(()=>[Er("a",ugt,Gt(Be(t)("components.layout.helpDropdown.documentation")),1)]),_:1}),o.updatable?(kt(),xn(c,{key:0,onClick:s[2]||(s[2]=_=>i.value=!0)},{default:Le(()=>[bt(Gt(Be(t)("components.layout.helpDropdown.update_available"))+" ",1),g(u,{title:Be(t)("components.layout.helpDropdown.new_version",{version:o.version,releaseDatetime:new Date(o.release_date).toLocaleString()}),open:i.value,footer:null,onCancel:s[1]||(s[1]=_=>i.value=!1)},{default:Le(()=>[Qt(g(Be(y2),{source:o.release_notes[Be(r)],class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[f]])]),_:1},8,["title","open"])]),_:1})):af("",!0),g(c,{onClick:s[4]||(s[4]=_=>a.value=!0)},{default:Le(()=>[bt(Gt(Be(t)("components.layout.helpDropdown.about_vectorvein"))+" ",1),g(u,{title:Be(t)("components.layout.helpDropdown.about_vectorvein"),open:a.value,footer:null,onCancel:s[3]||(s[3]=_=>a.value=!1)},{default:Le(()=>[Qt(g(Be(y2),{source:Be(t)("components.layout.helpDropdown.about_vectorvein_description"),class:"custom-scrollbar markdown-body custom-hljs"},null,8,["source"]),[[f]])]),_:1},8,["title","open"])]),_:1})]),_:1})]),default:Le(()=>[Er("a",{class:"ant-dropdown-link",onClick:s[0]||(s[0]=os(()=>{},["prevent"]))},[bt(Gt(Be(t)("components.layout.helpDropdown.help"))+" ",1),g(Be(rl))])]),_:1})}}};const pgt=["src"],fgt={href:"/",class:"logo"},mgt=["src"],ggt={__name:"BasicHeader",setup(e){const t=ue(!0),n=hPe(),r=rd(),{language:o}=_T(r),{locale:a,t:i,te:l}=cl({useScope:"global"}),s=u=>{r.setLanguage(u.key),a.value=u.key,document.title=dz(l,i,n.meta.title)},c=ue(window.innerWidth);return fa(()=>{t.value=!1,window.addEventListener("resize",()=>{c.value=window.innerWidth})}),(u,d)=>{const p=pt("a-col"),f=pt("a-button"),_=pt("router-link"),m=pt("a-menu-item"),v=pt("a-menu"),h=pt("a-dropdown"),b=pt("a-row"),E=pt("a-sub-menu"),C=pt("a-layout-header");return kt(),xn(C,{style:{background:"#fff",width:"100%",padding:"0 50px","box-shadow":"0 2px 10px 0 rgb(0 0 0 / 8%)"},class:"basic-header"},{default:Le(()=>[c.value>960?(kt(),xn(b,{key:0,type:"flex",align:"middle",justify:"space-between",gutter:[16,16],style:{width:"100%"}},{default:Le(()=>[g(p,{flex:"0 0",class:"logo"},{default:Le(()=>[Er("img",{alt:"VectorVein",src:Be(kk)},null,8,pgt)]),_:1}),g(p,{flex:"0 0"},{default:Le(()=>[g(_,{to:"/workflow"},{default:Le(()=>[g(f,{type:"link",id:"header-workflow-button"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.workflow_space")),1)]),_:1})]),_:1})]),_:1}),g(p,{flex:"0 0"},{default:Le(()=>[g(_,{to:"/data"},{default:Le(()=>[g(f,{type:"link",id:"header-data-button"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1})]),_:1}),g(p,{flex:"1 0",style:{display:"flex","justify-content":"end","align-items":"center",gap:"16px"}},{default:Le(()=>[g(n$e),g(h,null,{overlay:Le(()=>[g(v,{onClick:s},{default:Le(()=>[(kt(!0),Jo(Ue,null,eu(Object.keys(Be(Tl)),y=>(kt(),xn(m,{key:y},{default:Le(()=>[bt(Gt(Be(Tl)[y]),1)]),_:2},1024))),128))]),_:1})]),default:Le(()=>[Er("a",{class:"ant-dropdown-link",onClick:d[0]||(d[0]=os(()=>{},["prevent"]))},[g(Be(vA)),bt(" International - "+Gt(Be(Tl)[Be(o)])+" ",1),g(Be(rl))])]),_:1}),g(dgt)]),_:1})]),_:1})):(kt(),xn(b,{key:1,style:{width:"100%"},justify:"space-between"},{default:Le(()=>[g(p,null,{default:Le(()=>[Er("a",fgt,[Er("img",{alt:"VectorVein",src:Be(kk)},null,8,mgt)])]),_:1}),g(p,null,{default:Le(()=>[g(h,null,{overlay:Le(()=>[g(v,null,{default:Le(()=>[g(m,{key:"1"},{default:Le(()=>[g(_,{to:"/workflow"},{default:Le(()=>[g(f,{type:"link"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.workflow_space")),1)]),_:1})]),_:1})]),_:1}),g(m,{key:"2"},{default:Le(()=>[g(_,{to:"/data"},{default:Le(()=>[g(f,{type:"link"},{default:Le(()=>[bt(Gt(Be(i)("components.layout.basicHeader.data_space")),1)]),_:1})]),_:1})]),_:1}),g(E,{key:"3"},{title:Le(()=>[g(Be(vA)),bt(" International - "+Gt(Be(Tl)[Be(o)]),1)]),default:Le(()=>[(kt(!0),Jo(Ue,null,eu(Object.keys(Be(Tl)),y=>(kt(),xn(m,{key:y,onClick:os(T=>s({key:y}),["prevent"])},{default:Le(()=>[bt(Gt(Be(Tl)[y]),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})]),default:Le(()=>[g(f,null,{default:Le(()=>[g(Be(Tme))]),_:1})]),_:1})]),_:1})]),_:1}))]),_:1})}}};const _gt=["src"],C2={__name:"WorkspaceLayout",setup(e){const{t}=cl(),n=zMe(),r=rd(),{setting:o}=_T(r),a=ue(!1);fa(async()=>{const[u,d]=await Promise.all([JMe(n,!0),om("get",{})]);r.setSetting(d.data),!(typeof o.value.data.tour_version>"u")&&o.value.data.tour_version{a.value=!0},1e3))});const i=I(()=>jMe()),l=ue(0),s=[{title:t("layouts.workspaceLayout.tour.workflow_button_title"),description:t("layouts.workspaceLayout.tour.workflow_button_description"),target:()=>document.getElementById("header-workflow-button")},{title:t("layouts.workspaceLayout.tour.database_button_title"),description:t("layouts.workspaceLayout.tour.database_button_description"),target:()=>document.getElementById("header-data-button")}],c=()=>{r.setTourVersion(yE),a.value=!1};return(u,d)=>{const p=pt("router-view"),f=pt("a-layout-content"),_=pt("a-tour"),m=pt("a-back-top"),v=pt("a-layout");return kt(),xn(v,{style:{"min-height":"100vh"}},{default:Le(()=>[g(ggt),g(f,{class:"layout-content-container",style:{marginTop:"64px"}},{default:Le(()=>[g(p,{class:"content-view-container"}),Er("img",{class:"layout-background-img",src:i.value},null,8,_gt)]),_:1}),g(_,{current:l.value,"onUpdate:current":d[0]||(d[0]=h=>l.value=h),open:a.value,steps:s,onClose:c},null,8,["current","open"]),g(m)]),_:1})}}},hgt=[{path:"/workflow/editor/:workflowId",name:"WorkflowEditor",meta:{login:!0},component:()=>Kr(()=>import("./WorkflowEditor-c7747b26.js"),["assets/WorkflowEditor-c7747b26.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/index-ace83a9e.js","assets/QuestionPopover-3baee3b6.js","assets/QuestionPopover-9967181b.css","assets/TextOutput-39ff842e.js","assets/TextOutput-22c6610f.css","assets/MarkdownEditor-de9455d7.js","assets/userDatabase-3faee336.js","assets/UploaderFieldUse-7351b05e.js","assets/database-2818470e.js","assets/stringify-ec884b6d.js","assets/WorkflowEditor-14bce7c1.css"])},{path:"/",component:C2,children:[{path:"",redirect:"/workflow"},{path:"workflow",name:"WorkflowSpace",meta:{title:"router.workspace.children.workflow_space"},component:()=>Kr(()=>import("./WorkflowSpace-859f20d4.js"),["assets/WorkflowSpace-859f20d4.js","assets/NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js","assets/NewWorkflowModal-2b09b3f1.css","assets/_plugin-vue_export-helper-c27b6911.js","assets/WorkflowSpace-fb9ee385.css"]),children:[{path:"",name:"WorkflowSpaceMain",meta:{title:"router.workspace.children.workflow_main"},component:()=>Kr(()=>import("./WorkflowSpaceMain-deef18a5.js"),["assets/WorkflowSpaceMain-deef18a5.js","assets/QuestionPopover-3baee3b6.js","assets/QuestionPopover-9967181b.css","assets/MarkdownEditor-de9455d7.js","assets/index-ace83a9e.js","assets/NewWorkflowModal.vue_vue_type_style_index_0_lang-f4546029.js","assets/NewWorkflowModal-2b09b3f1.css","assets/WorkflowRunRecordsDrawer-31cf6fb4.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/WorkflowSpaceMain-a9d4ce5d.css"])},{path:"template/:workflowTemplateId",name:"WorkflowTemplate",meta:{title:"router.workspace.children.workflow_template"},component:()=>Kr(()=>import("./WorkflowTemplate-1699e51b.js"),["assets/WorkflowTemplate-1699e51b.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/WorkflowTemplate-8c61c83e.css"])},{path:":workflowId",name:"WorkflowUse",meta:{title:"router.workspace.children.workflow_use"},component:()=>Kr(()=>import("./WorkflowSpaceUse-b6815112.js"),["assets/WorkflowSpaceUse-b6815112.js","assets/userDatabase-3faee336.js","assets/TextOutput-39ff842e.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/TextOutput-22c6610f.css","assets/UploaderFieldUse-7351b05e.js","assets/WorkflowRunRecordsDrawer-31cf6fb4.js","assets/database-2818470e.js","assets/index-ace83a9e.js","assets/WorkflowSpaceUse-de96bfae.css"])}]},{path:"data",name:"DataSpace",meta:{title:"router.workspace.children.data_space"},children:[{path:"",name:"DataSpace",meta:{title:"router.workspace.children.data_space"},component:()=>Kr(()=>import("./DataSpace-cdee42ed.js"),["assets/DataSpace-cdee42ed.js","assets/userDatabase-3faee336.js","assets/database-2818470e.js","assets/DataSpace-56541c64.css"])},{path:":databaseId",name:"DatabaseDetail",meta:{title:"router.workspace.children.database_detail"},component:()=>Kr(()=>import("./DatabaseDetail-565a03e8.js"),["assets/DatabaseDetail-565a03e8.js","assets/database-2818470e.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/DatabaseOutlined-a293b150.js","assets/DatabaseDetail-532d61aa.css"])},{path:":databaseId/create",name:"DatabaseObjectCreate",meta:{title:"router.workspace.children.database_detail"},component:()=>Kr(()=>import("./DatabaseObjectCreate-67d5a16a.js"),["assets/DatabaseObjectCreate-67d5a16a.js","assets/UploaderFieldUse-7351b05e.js","assets/QuestionPopover-3baee3b6.js","assets/QuestionPopover-9967181b.css","assets/database-2818470e.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/DatabaseOutlined-a293b150.js","assets/DatabaseObjectCreate-5f6ec6a4.css"])},{path:":databaseId/object/:objectId",name:"DatabaseObjectDetail",meta:{title:"router.workspace.children.database_object_detail"},component:()=>Kr(()=>import("./DatabaseObjectDetail-d150ff81.js"),["assets/DatabaseObjectDetail-d150ff81.js","assets/database-2818470e.js","assets/_plugin-vue_export-helper-c27b6911.js","assets/DatabaseOutlined-a293b150.js","assets/DatabaseObjectDetail-43cc50d8.css"])}]}]},{path:"/account",name:"account",component:C2,meta:{login:!0},children:[{path:"info",name:"AccountInfo",meta:{title:"router.account.children.account_info"},component:()=>Kr(()=>import("./AccountInfo-ba1104d6.js"),["assets/AccountInfo-ba1104d6.js","assets/userAccount-fedc0a01.js"])},{path:"settings",name:"AccountSettings",meta:{title:"router.account.children.account_settings"},component:()=>Kr(()=>import("./AccountSettings-ee4b14cb.js"),["assets/AccountSettings-ee4b14cb.js","assets/userAccount-fedc0a01.js"])}]}],Pz=gPe({history:ADe("/"),routes:hgt});const dl=DF(uDe);dl.use(c9());dl.use(Pz);dl.use(Awe);dl.use(UC);dl.use(rDe);dl.mount("#app");dl.directive("highlight",function(e){e.querySelectorAll("pre code").forEach(n=>{nAe.highlightElement(n)})});Pz.beforeEach(async(e,t,n)=>{e.meta.title&&(document.title=dz(UC.global.te,UC.global.t,e.meta.title)),n()});export{Tgt as $,rt as A,eo as B,ln as C,fa as D,Ye as E,Ue as F,Er as G,Gt as H,af as I,dm as J,xn as K,ia as L,ot as M,nt as N,mm as O,pt as P,e7 as Q,bt as R,Egt as S,Gl as T,cl as U,Qt as V,er as W,Ffe as X,mse as Y,le as Z,et as _,ce as a,Xm as a$,Cgt as a0,_T as a1,Agt as a2,XMe as a3,ju as a4,Mgt as a5,Lk as a6,Ir as a7,hPe as a8,Ogt as a9,b0 as aA,wr as aB,gu as aC,QT as aD,Gte as aE,cJ as aF,eee as aG,pee as aH,C0 as aI,Um as aJ,p3 as aK,Pee as aL,Dte as aM,xo as aN,dn as aO,Za as aP,Wn as aQ,E0 as aR,En as aS,ry as aT,GV as aU,HV as aV,c4 as aW,Kr as aX,Rgt as aY,Rr as aZ,$6 as a_,zMe as aa,rd as ab,wgt as ac,qa as ad,f4 as ae,Pgt as af,Ngt as ag,yn as ah,ew as ai,nge as aj,os as ak,JMe as al,cgt as am,lF as an,y2 as ao,xgt as ap,Dgt as aq,QMe as ar,Igt as as,ro as at,xs as au,jT as av,YT as aw,OJ as ax,K3 as ay,Fu as az,I as b,M6 as b0,ul as b1,u4 as b2,Mo as b3,$ie as b4,Pie as b5,Nc as b6,h0 as b7,bJ as b8,Lte as b9,dj as ba,O0 as bb,Jm as bc,Pte as bd,yte as be,ws as bf,Zm as bg,eg as bh,Hm as bi,rJ as bj,X3 as bk,xne as bl,BJ as bm,v0 as bn,mJ as bo,GJ as bp,G_ as bq,jte as br,Vte as bs,Sp as bt,g as c,kF as d,Jo as e,Em as f,KC as g,qC as h,We as i,A2 as j,G2 as k,Sgt as l,mt as m,pm as n,kt as o,Qe as p,ygt as q,ue as r,$n as s,Ge as t,Be as u,qe as v,ye as w,Le as x,eu as y,Vt as z}; diff --git a/backend/web/assets/index-f58d48f9-4ae439b4.js b/backend/web/assets/index-f58d48f9-4ae439b4.js new file mode 100644 index 00000000..d8352d07 --- /dev/null +++ b/backend/web/assets/index-f58d48f9-4ae439b4.js @@ -0,0 +1 @@ +import{i as m,m as D,G as k,l as j}from"./layout-218ba7ee.js";import{b6 as G}from"./index-ef7aa48c.js";import{i as A,u as M,s as _,a as H,b as V,p as B,c as U,d as W,e as Y,f as q,g as O,h as X}from"./edges-0005682e-ae86cacb.js";import{p as n,y as N,j as E,o as L}from"./TextOutput-39ff842e.js";import{c as z}from"./createText-3b1f58a4-cb14bcdc.js";var K=4;function Q(e){return G(e,K)}function y(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Z(e),edges:I(e)};return m(e.graph())||(t.value=Q(e.graph())),t}function Z(e){return D(e.nodes(),function(t){var i=e.node(t),r=e.parent(t),s={v:t};return m(i)||(s.value=i),m(r)||(s.parent=r),s})}function I(e){return D(e.edges(),function(t){var i=e.edge(t),r={v:t.v,w:t.w};return m(t.name)||(r.name=t.name),m(i)||(r.value=i),r})}let f={},x={},T={};const tt=()=>{x={},T={},f={}},S=(e,t)=>(n.trace("In isDecendant",t," ",e," = ",x[t].includes(e)),!!x[t].includes(e)),et=(e,t)=>(n.info("Decendants of ",t," is ",x[t]),n.info("Edge is ",e),e.v===t||e.w===t?!1:x[t]?x[t].includes(e.v)||S(e.v,t)||S(e.w,t)||x[t].includes(e.w):(n.debug("Tilt, ",t,",not in decendants"),!1)),p=(e,t,i,r)=>{n.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),n.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)p(a,t,i,r);else{const h=t.node(a);n.info("cp ",a," to ",r," with parent ",e),i.setNode(a,h),r!==t.parent(a)&&(n.warn("Setting parent",a,t.parent(a)),i.setParent(a,t.parent(a))),e!==r&&a!==e?(n.debug("Setting parent",a,e),i.setParent(a,e)):(n.info("In copy ",e,"root",r,"data",t.node(e),r),n.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==r,"node!==clusterId",a!==e));const l=t.edges(a);n.debug("Copying Edges",l),l.forEach(d=>{n.info("Edge",d);const w=t.edge(d.v,d.w,d.name);n.info("Edge data",w,r);try{et(d,r)?(n.info("Copying as ",d.v,d.w,w,d.name),i.setEdge(d.v,d.w,w,d.name),n.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):n.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch(g){n.error(g)}})}n.debug("Removing node",a),t.removeNode(a)})},J=(e,t)=>{const i=t.children(e);let r=[...i];for(const s of i)T[s]=e,r=[...r,...J(s,t)];return r},v=(e,t)=>{n.trace("Searching",e);const i=t.children(e);if(n.trace("Searching children of id ",e,i),i.length<1)return n.trace("This is a valid node",e),e;for(const r of i){const s=v(r,t);if(s)return n.trace("Found replacement for",e," => ",s),s}},b=e=>!f[e]||!f[e].externalConnections?e:f[e]?f[e].id:e,it=(e,t)=>{if(!e||t>10){n.debug("Opting out, no graph ");return}else n.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(n.warn("Cluster identified",i," Replacement id in edges: ",v(i,e)),x[i]=J(i,e),f[i]={id:v(i,e),clusterData:e.node(i)})}),e.nodes().forEach(function(i){const r=e.children(i),s=e.edges();r.length>0?(n.debug("Cluster identified",i,x),s.forEach(a=>{if(a.v!==i&&a.w!==i){const h=S(a.v,i),l=S(a.w,i);h^l&&(n.warn("Edge: ",a," leaves cluster ",i),n.warn("Decendants of XXX ",i,": ",x[i]),f[i].externalConnections=!0)}})):n.debug("Not a cluster ",i,x)}),e.edges().forEach(function(i){const r=e.edge(i);n.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),n.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let s=i.v,a=i.w;if(n.warn("Fix XXX",f,"ids:",i.v,i.w,"Translating: ",f[i.v]," --- ",f[i.w]),f[i.v]&&f[i.w]&&f[i.v]===f[i.w]){n.warn("Fixing and trixing link to self - removing XXX",i.v,i.w,i.name),n.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=b(i.v),a=b(i.w),e.removeEdge(i.v,i.w,i.name);const h=i.w+"---"+i.v;e.setNode(h,{domId:h,id:h,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const l=JSON.parse(JSON.stringify(r)),d=JSON.parse(JSON.stringify(r));l.label="",l.arrowTypeEnd="none",d.label="",l.fromCluster=i.v,d.toCluster=i.v,e.setEdge(s,h,l,i.name+"-cyclic-special"),e.setEdge(h,a,d,i.name+"-cyclic-special")}else(f[i.v]||f[i.w])&&(n.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=b(i.v),a=b(i.w),e.removeEdge(i.v,i.w,i.name),s!==i.v&&(r.fromCluster=i.v),a!==i.w&&(r.toCluster=i.w),n.warn("Fix Replacing with XXX",s,a,i.name),e.setEdge(s,a,r,i.name))}),n.warn("Adjusted Graph",y(e)),R(e,0),n.trace(f)},R=(e,t)=>{if(n.warn("extractor - ",t,y(e),e.children("D")),t>10){n.error("Bailing out");return}let i=e.nodes(),r=!1;for(const s of i){const a=e.children(s);r=r||a.length>0}if(!r){n.debug("Done, no node has children",e.nodes());return}n.debug("Nodes = ",i,t);for(const s of i)if(n.debug("Extracting node",s,f,f[s]&&!f[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!f[s])n.debug("Not a cluster",s,t);else if(!f[s].externalConnections&&e.children(s)&&e.children(s).length>0){n.warn("Cluster without external connections, without a parent and with children",s,t);let h=e.graph().rankdir==="TB"?"LR":"TB";f[s]&&f[s].clusterData&&f[s].clusterData.dir&&(h=f[s].clusterData.dir,n.warn("Fixing dir",f[s].clusterData.dir,h));const l=new k({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});n.warn("Old graph before copy",y(e)),p(s,e,l,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:f[s].clusterData,labelText:f[s].labelText,graph:l}),n.warn("New graph after copy node: (",s,")",y(l)),n.debug("Old graph after copy",y(e))}else n.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!f[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),n.debug(f);i=e.nodes(),n.warn("New list of nodes",i);for(const s of i){const a=e.node(s);n.warn(" Now next level",s,a),a.clusterNode&&R(a.graph,t+1)}},P=(e,t)=>{if(t.length===0)return[];let i=Object.assign(t);return t.forEach(r=>{const s=e.children(r),a=P(e,s);i=[...i,...a]}),i},nt=e=>P(e,e.children()),st=(e,t)=>{n.info("Creating subgraph rect for ",t.id,t);const i=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=i.insert("rect",":first-child"),s=N(E().flowchart.htmlLabels),a=i.insert("g").attr("class","cluster-label"),h=t.labelType==="markdown"?z(a,t.labelText,{style:t.labelStyle,useHtmlLabels:s}):a.node().appendChild(O(t.labelText,t.labelStyle,void 0,!0));let l=h.getBBox();if(N(E().flowchart.htmlLabels)){const o=h.children[0],u=L(h);l=o.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}const d=0*t.padding,w=d/2,g=t.width<=l.width+d?l.width+d:t.width;t.width<=l.width+d?t.diff=(l.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,n.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-g/2).attr("y",t.y-t.height/2-w).attr("width",g).attr("height",t.height+d),s?a.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2)+")"):a.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const c=r.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(o){return X(t,o)},i},rt=(e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=i.insert("rect",":first-child"),s=0*t.padding,a=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const h=r.node().getBBox();return t.width=h.width,t.height=h.height,t.intersect=function(l){return X(t,l)},i},at=(e,t)=>{const i=e.insert("g").attr("class",t.classes).attr("id",t.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),a=i.append("rect"),h=s.node().appendChild(O(t.labelText,t.labelStyle,void 0,!0));let l=h.getBBox();if(N(E().flowchart.htmlLabels)){const o=h.children[0],u=L(h);l=o.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}l=h.getBBox();const d=0*t.padding,w=d/2,g=t.width<=l.width+t.padding?l.width+t.padding:t.width;t.width<=l.width+t.padding?t.diff=(l.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-g/2-w).attr("y",t.y-t.height/2-w).attr("width",g+d).attr("height",t.height+d),a.attr("class","inner").attr("x",t.x-g/2-w).attr("y",t.y-t.height/2-w+l.height-1).attr("width",g+d).attr("height",t.height+d-l.height-3),s.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2-t.padding/3+(N(E().flowchart.htmlLabels)?5:3))+")");const c=r.node().getBBox();return t.height=c.height,t.intersect=function(o){return X(t,o)},i},ct=(e,t)=>{const i=e.insert("g").attr("class",t.classes).attr("id",t.id),r=i.insert("rect",":first-child"),s=0*t.padding,a=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const h=r.node().getBBox();return t.width=h.width,t.height=h.height,t.diff=-t.padding/2,t.intersect=function(l){return X(t,l)},i},ot={rect:st,roundedWithTitle:at,noteGroup:rt,divider:ct};let F={};const lt=(e,t)=>{n.trace("Inserting cluster");const i=t.shape||"rect";F[t.id]=ot[i](e,t)},ft=()=>{F={}},$=async(e,t,i,r)=>{n.info("Graph in recursive render: XXX",y(t),r);const s=t.graph().rankdir;n.trace("Dir in recursive render - dir:",s);const a=e.insert("g").attr("class","root");t.nodes()?n.info("Recursive render XXX",t.nodes()):n.info("No nodes found for",t),t.edges().length>0&&n.trace("Recursive edges",t.edge(t.edges()[0]));const h=a.insert("g").attr("class","clusters"),l=a.insert("g").attr("class","edgePaths"),d=a.insert("g").attr("class","edgeLabels"),w=a.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(c){const o=t.node(c);if(r!==void 0){const u=JSON.parse(JSON.stringify(r.clusterData));n.info("Setting data for cluster XXX (",c,") ",u,r),t.setNode(r.id,u),t.parent(c)||(n.trace("Setting parent",c,r.id),t.setParent(c,r.id,u))}if(n.info("(Insert) Node XXX"+c+": "+JSON.stringify(t.node(c))),o&&o.clusterNode){n.info("Cluster identified",c,o.width,t.node(c));const u=await $(w,o.graph,i,t.node(c)),C=u.elem;M(o,C),o.diff=u.diff||0,n.info("Node bounds (abc123)",c,o,o.width,o.x,o.y),_(C,o),n.warn("Recursive render complete ",C,o)}else t.children(c).length>0?(n.info("Cluster - the non recursive path XXX",c,o.id,o,t),n.info(v(o.id,t)),f[o.id]={id:v(o.id,t),node:o}):(n.info("Node - the non recursive path",c,o.id,o),await H(w,t.node(c),s))})),t.edges().forEach(function(c){const o=t.edge(c.v,c.w,c.name);n.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c)),n.info("Edge "+c.v+" -> "+c.w+": ",c," ",JSON.stringify(t.edge(c))),n.info("Fix",f,"ids:",c.v,c.w,"Translateing: ",f[c.v],f[c.w]),V(d,o)}),t.edges().forEach(function(c){n.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c))}),n.info("#############################################"),n.info("### Layout ###"),n.info("#############################################"),n.info(t),j(t),n.info("Graph after layout:",y(t));let g=0;return nt(t).forEach(function(c){const o=t.node(c);n.info("Position "+c+": "+JSON.stringify(t.node(c))),n.info("Position "+c+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o&&o.clusterNode?B(o):t.children(c).length>0?(lt(h,o),f[o.id].node=o):B(o)}),t.edges().forEach(function(c){const o=t.edge(c);n.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(o),o);const u=U(l,c,o,f,i,t);W(o,u)}),t.nodes().forEach(function(c){const o=t.node(c);n.info(c,o.type,o.diff),o.type==="group"&&(g=o.diff)}),{elem:a,diff:g}},xt=async(e,t,i,r,s)=>{A(e,i,r,s),Y(),q(),ft(),tt(),n.warn("Graph at first:",y(t)),it(t),n.warn("Graph after:",y(t)),await $(e,t,r)};export{xt as r}; diff --git a/backend/web/assets/index-f58d48f9-594fab58.js b/backend/web/assets/index-f58d48f9-594fab58.js deleted file mode 100644 index 38eba64b..00000000 --- a/backend/web/assets/index-f58d48f9-594fab58.js +++ /dev/null @@ -1 +0,0 @@ -import{i as m,m as D,G as k,l as G}from"./layout-e00002c0.js";import{b6 as j}from"./index-51905ea3.js";import{i as A,u as M,s as _,a as H,b as V,p as B,c as U,d as W,e as Y,f as q,g as O,h as X}from"./edges-0005682e-04b6df38.js";import{o as n,x as N,i as E,n as L}from"./EchartsRenderer-3d08027d.js";import{c as z}from"./createText-3b1f58a4-cf050b71.js";var K=4;function Q(e){return j(e,K)}function y(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Z(e),edges:I(e)};return m(e.graph())||(t.value=Q(e.graph())),t}function Z(e){return D(e.nodes(),function(t){var i=e.node(t),r=e.parent(t),s={v:t};return m(i)||(s.value=i),m(r)||(s.parent=r),s})}function I(e){return D(e.edges(),function(t){var i=e.edge(t),r={v:t.v,w:t.w};return m(t.name)||(r.name=t.name),m(i)||(r.value=i),r})}let f={},x={},T={};const tt=()=>{x={},T={},f={}},S=(e,t)=>(n.trace("In isDecendant",t," ",e," = ",x[t].includes(e)),!!x[t].includes(e)),et=(e,t)=>(n.info("Decendants of ",t," is ",x[t]),n.info("Edge is ",e),e.v===t||e.w===t?!1:x[t]?x[t].includes(e.v)||S(e.v,t)||S(e.w,t)||x[t].includes(e.w):(n.debug("Tilt, ",t,",not in decendants"),!1)),J=(e,t,i,r)=>{n.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const s=t.children(e)||[];e!==r&&s.push(e),n.warn("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)J(a,t,i,r);else{const h=t.node(a);n.info("cp ",a," to ",r," with parent ",e),i.setNode(a,h),r!==t.parent(a)&&(n.warn("Setting parent",a,t.parent(a)),i.setParent(a,t.parent(a))),e!==r&&a!==e?(n.debug("Setting parent",a,e),i.setParent(a,e)):(n.info("In copy ",e,"root",r,"data",t.node(e),r),n.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==r,"node!==clusterId",a!==e));const l=t.edges(a);n.debug("Copying Edges",l),l.forEach(d=>{n.info("Edge",d);const w=t.edge(d.v,d.w,d.name);n.info("Edge data",w,r);try{et(d,r)?(n.info("Copying as ",d.v,d.w,w,d.name),i.setEdge(d.v,d.w,w,d.name),n.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):n.info("Skipping copy of edge ",d.v,"-->",d.w," rootId: ",r," clusterId:",e)}catch(g){n.error(g)}})}n.debug("Removing node",a),t.removeNode(a)})},p=(e,t)=>{const i=t.children(e);let r=[...i];for(const s of i)T[s]=e,r=[...r,...p(s,t)];return r},v=(e,t)=>{n.trace("Searching",e);const i=t.children(e);if(n.trace("Searching children of id ",e,i),i.length<1)return n.trace("This is a valid node",e),e;for(const r of i){const s=v(r,t);if(s)return n.trace("Found replacement for",e," => ",s),s}},b=e=>!f[e]||!f[e].externalConnections?e:f[e]?f[e].id:e,it=(e,t)=>{if(!e||t>10){n.debug("Opting out, no graph ");return}else n.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(n.warn("Cluster identified",i," Replacement id in edges: ",v(i,e)),x[i]=p(i,e),f[i]={id:v(i,e),clusterData:e.node(i)})}),e.nodes().forEach(function(i){const r=e.children(i),s=e.edges();r.length>0?(n.debug("Cluster identified",i,x),s.forEach(a=>{if(a.v!==i&&a.w!==i){const h=S(a.v,i),l=S(a.w,i);h^l&&(n.warn("Edge: ",a," leaves cluster ",i),n.warn("Decendants of XXX ",i,": ",x[i]),f[i].externalConnections=!0)}})):n.debug("Not a cluster ",i,x)}),e.edges().forEach(function(i){const r=e.edge(i);n.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),n.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let s=i.v,a=i.w;if(n.warn("Fix XXX",f,"ids:",i.v,i.w,"Translating: ",f[i.v]," --- ",f[i.w]),f[i.v]&&f[i.w]&&f[i.v]===f[i.w]){n.warn("Fixing and trixing link to self - removing XXX",i.v,i.w,i.name),n.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=b(i.v),a=b(i.w),e.removeEdge(i.v,i.w,i.name);const h=i.w+"---"+i.v;e.setNode(h,{domId:h,id:h,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const l=JSON.parse(JSON.stringify(r)),d=JSON.parse(JSON.stringify(r));l.label="",l.arrowTypeEnd="none",d.label="",l.fromCluster=i.v,d.toCluster=i.v,e.setEdge(s,h,l,i.name+"-cyclic-special"),e.setEdge(h,a,d,i.name+"-cyclic-special")}else(f[i.v]||f[i.w])&&(n.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=b(i.v),a=b(i.w),e.removeEdge(i.v,i.w,i.name),s!==i.v&&(r.fromCluster=i.v),a!==i.w&&(r.toCluster=i.w),n.warn("Fix Replacing with XXX",s,a,i.name),e.setEdge(s,a,r,i.name))}),n.warn("Adjusted Graph",y(e)),R(e,0),n.trace(f)},R=(e,t)=>{if(n.warn("extractor - ",t,y(e),e.children("D")),t>10){n.error("Bailing out");return}let i=e.nodes(),r=!1;for(const s of i){const a=e.children(s);r=r||a.length>0}if(!r){n.debug("Done, no node has children",e.nodes());return}n.debug("Nodes = ",i,t);for(const s of i)if(n.debug("Extracting node",s,f,f[s]&&!f[s].externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",t),!f[s])n.debug("Not a cluster",s,t);else if(!f[s].externalConnections&&e.children(s)&&e.children(s).length>0){n.warn("Cluster without external connections, without a parent and with children",s,t);let h=e.graph().rankdir==="TB"?"LR":"TB";f[s]&&f[s].clusterData&&f[s].clusterData.dir&&(h=f[s].clusterData.dir,n.warn("Fixing dir",f[s].clusterData.dir,h));const l=new k({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});n.warn("Old graph before copy",y(e)),J(s,e,l,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:f[s].clusterData,labelText:f[s].labelText,graph:l}),n.warn("New graph after copy node: (",s,")",y(l)),n.debug("Old graph after copy",y(e))}else n.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!f[s].externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),t),n.debug(f);i=e.nodes(),n.warn("New list of nodes",i);for(const s of i){const a=e.node(s);n.warn(" Now next level",s,a),a.clusterNode&&R(a.graph,t+1)}},P=(e,t)=>{if(t.length===0)return[];let i=Object.assign(t);return t.forEach(r=>{const s=e.children(r),a=P(e,s);i=[...i,...a]}),i},nt=e=>P(e,e.children()),st=(e,t)=>{n.info("Creating subgraph rect for ",t.id,t);const i=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=i.insert("rect",":first-child"),s=N(E().flowchart.htmlLabels),a=i.insert("g").attr("class","cluster-label"),h=t.labelType==="markdown"?z(a,t.labelText,{style:t.labelStyle,useHtmlLabels:s}):a.node().appendChild(O(t.labelText,t.labelStyle,void 0,!0));let l=h.getBBox();if(N(E().flowchart.htmlLabels)){const o=h.children[0],u=L(h);l=o.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}const d=0*t.padding,w=d/2,g=t.width<=l.width+d?l.width+d:t.width;t.width<=l.width+d?t.diff=(l.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,n.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-g/2).attr("y",t.y-t.height/2-w).attr("width",g).attr("height",t.height+d),s?a.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2)+")"):a.attr("transform","translate("+t.x+", "+(t.y-t.height/2)+")");const c=r.node().getBBox();return t.width=c.width,t.height=c.height,t.intersect=function(o){return X(t,o)},i},rt=(e,t)=>{const i=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=i.insert("rect",":first-child"),s=0*t.padding,a=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const h=r.node().getBBox();return t.width=h.width,t.height=h.height,t.intersect=function(l){return X(t,l)},i},at=(e,t)=>{const i=e.insert("g").attr("class",t.classes).attr("id",t.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),a=i.append("rect"),h=s.node().appendChild(O(t.labelText,t.labelStyle,void 0,!0));let l=h.getBBox();if(N(E().flowchart.htmlLabels)){const o=h.children[0],u=L(h);l=o.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}l=h.getBBox();const d=0*t.padding,w=d/2,g=t.width<=l.width+t.padding?l.width+t.padding:t.width;t.width<=l.width+t.padding?t.diff=(l.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-g/2-w).attr("y",t.y-t.height/2-w).attr("width",g+d).attr("height",t.height+d),a.attr("class","inner").attr("x",t.x-g/2-w).attr("y",t.y-t.height/2-w+l.height-1).attr("width",g+d).attr("height",t.height+d-l.height-3),s.attr("transform","translate("+(t.x-l.width/2)+", "+(t.y-t.height/2-t.padding/3+(N(E().flowchart.htmlLabels)?5:3))+")");const c=r.node().getBBox();return t.height=c.height,t.intersect=function(o){return X(t,o)},i},ct=(e,t)=>{const i=e.insert("g").attr("class",t.classes).attr("id",t.id),r=i.insert("rect",":first-child"),s=0*t.padding,a=s/2;r.attr("class","divider").attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2).attr("width",t.width+s).attr("height",t.height+s);const h=r.node().getBBox();return t.width=h.width,t.height=h.height,t.diff=-t.padding/2,t.intersect=function(l){return X(t,l)},i},ot={rect:st,roundedWithTitle:at,noteGroup:rt,divider:ct};let F={};const lt=(e,t)=>{n.trace("Inserting cluster");const i=t.shape||"rect";F[t.id]=ot[i](e,t)},ft=()=>{F={}},$=async(e,t,i,r)=>{n.info("Graph in recursive render: XXX",y(t),r);const s=t.graph().rankdir;n.trace("Dir in recursive render - dir:",s);const a=e.insert("g").attr("class","root");t.nodes()?n.info("Recursive render XXX",t.nodes()):n.info("No nodes found for",t),t.edges().length>0&&n.trace("Recursive edges",t.edge(t.edges()[0]));const h=a.insert("g").attr("class","clusters"),l=a.insert("g").attr("class","edgePaths"),d=a.insert("g").attr("class","edgeLabels"),w=a.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(c){const o=t.node(c);if(r!==void 0){const u=JSON.parse(JSON.stringify(r.clusterData));n.info("Setting data for cluster XXX (",c,") ",u,r),t.setNode(r.id,u),t.parent(c)||(n.trace("Setting parent",c,r.id),t.setParent(c,r.id,u))}if(n.info("(Insert) Node XXX"+c+": "+JSON.stringify(t.node(c))),o&&o.clusterNode){n.info("Cluster identified",c,o.width,t.node(c));const u=await $(w,o.graph,i,t.node(c)),C=u.elem;M(o,C),o.diff=u.diff||0,n.info("Node bounds (abc123)",c,o,o.width,o.x,o.y),_(C,o),n.warn("Recursive render complete ",C,o)}else t.children(c).length>0?(n.info("Cluster - the non recursive path XXX",c,o.id,o,t),n.info(v(o.id,t)),f[o.id]={id:v(o.id,t),node:o}):(n.info("Node - the non recursive path",c,o.id,o),await H(w,t.node(c),s))})),t.edges().forEach(function(c){const o=t.edge(c.v,c.w,c.name);n.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c)),n.info("Edge "+c.v+" -> "+c.w+": ",c," ",JSON.stringify(t.edge(c))),n.info("Fix",f,"ids:",c.v,c.w,"Translateing: ",f[c.v],f[c.w]),V(d,o)}),t.edges().forEach(function(c){n.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c))}),n.info("#############################################"),n.info("### Layout ###"),n.info("#############################################"),n.info(t),G(t),n.info("Graph after layout:",y(t));let g=0;return nt(t).forEach(function(c){const o=t.node(c);n.info("Position "+c+": "+JSON.stringify(t.node(c))),n.info("Position "+c+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o&&o.clusterNode?B(o):t.children(c).length>0?(lt(h,o),f[o.id].node=o):B(o)}),t.edges().forEach(function(c){const o=t.edge(c);n.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(o),o);const u=U(l,c,o,f,i,t);W(o,u)}),t.nodes().forEach(function(c){const o=t.node(c);n.info(c,o.type,o.diff),o.type==="group"&&(g=o.diff)}),{elem:a,diff:g}},xt=async(e,t,i,r,s)=>{A(e,i,r,s),Y(),q(),ft(),tt(),n.warn("Graph at first:",y(t)),it(t),n.warn("Graph after:",y(t)),await $(e,t,r)};export{xt as r}; diff --git a/backend/web/assets/infoDiagram-64895a6e-76b1892c.js b/backend/web/assets/infoDiagram-64895a6e-d5aa12d6.js similarity index 75% rename from backend/web/assets/infoDiagram-64895a6e-76b1892c.js rename to backend/web/assets/infoDiagram-64895a6e-d5aa12d6.js index 7052ea90..16db5429 100644 --- a/backend/web/assets/infoDiagram-64895a6e-76b1892c.js +++ b/backend/web/assets/infoDiagram-64895a6e-d5aa12d6.js @@ -1,7 +1,7 @@ -import{o as U,Y as D,p as M}from"./EchartsRenderer-3d08027d.js";import"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={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,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=Y()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`: +import{p as Y,Z as D,q as M}from"./TextOutput-39ff842e.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";var O=function(){var a=function(u,t,e,n){for(e=e||{},n=u.length;n--;e[u[n]]=t);return e},f=[6,9,10],m={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,e,n,s,r,i,d){switch(i.length-1,r){case 1:return s;case 4:break;case 6:s.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(f,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(f,[2,3]),a(f,[2,4]),a(f,[2,5]),a(f,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(e.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=e,n}},parse:function(t){var e=this,n=[0],s=[],r=[null],i=[],d=this.table,P="",v=0,L=0,N=2,T=1,R=i.slice.call(arguments,1),o=Object.create(this.lexer),p={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(p.yy[E]=this.yy[E]);o.setInput(t,p.yy),p.yy.lexer=o,p.yy.parser=this,typeof o.yylloc>"u"&&(o.yylloc={});var I=o.yylloc;i.push(I);var z=o.options&&o.options.ranges;typeof p.yy.parseError=="function"?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(){var y;return y=s.pop()||o.lex()||T,typeof y!="number"&&(y instanceof Array&&(s=y,y=s.pop()),y=e.symbols_[y]||y),y}for(var l,g,h,w,_={},b,c,F,S;;){if(g=n[n.length-1],this.defaultActions[g]?h=this.defaultActions[g]:((l===null||typeof l>"u")&&(l=U()),h=d[g]&&d[g][l]),typeof h>"u"||!h.length||!h[0]){var A="";S=[];for(b in d[g])this.terminals_[b]&&b>N&&S.push("'"+this.terminals_[b]+"'");o.showPosition?A="Parse error on line "+(v+1)+`: `+o.showPosition()+` Expecting `+S.join(", ")+", got '"+(this.terminals_[l]||l)+"'":A="Parse error on line "+(v+1)+": Unexpected "+(l==T?"end of input":"'"+(this.terminals_[l]||l)+"'"),this.parseError(A,{text:o.match,token:this.terminals_[l]||l,line:o.yylineno,loc:I,expected:S})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+l);switch(h[0]){case 1:n.push(l),r.push(o.yytext),i.push(o.yylloc),n.push(h[1]),l=null,L=o.yyleng,P=o.yytext,v=o.yylineno,I=o.yylloc;break;case 2:if(c=this.productions_[h[1]][1],_.$=r[r.length-c],_._$={first_line:i[i.length-(c||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(c||1)].first_column,last_column:i[i.length-1].last_column},z&&(_._$.range=[i[i.length-(c||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(_,[P,L,v,p.yy,h[1],r,i].concat(R)),typeof w<"u")return w;c&&(n=n.slice(0,-1*c*2),r=r.slice(0,-1*c),i=i.slice(0,-1*c)),n.push(this.productions_[h[1]][0]),r.push(_.$),i.push(_._$),F=d[n[n.length-2]][n[n.length-1]],n.push(F);break;case 3:return!0}}return!0}},k=function(){var u={EOF:1,parseError:function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(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];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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 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 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:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[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(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},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()+` `+e+"^"},test_match:function(t,e){var n,s,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))),s=t[0].match(/(?:\r\n?|\n).*/g),s&&(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,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,s;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;ie[0].length)){if(e=n,s=i,this.options.backtrack_lexer){if(t=this.test_match(n,r[i]),t!==!1)return t;if(this._backtrack){e=!1;continue}else return!1}else if(!this.options.flex)break}return e?(t=this.test_match(e,r[s]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+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(){var e=this.conditionStack.length-1;return e>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),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,n,s,r){switch(s){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}}};return u}();m.lexer=k;function x(){this.yy={}}return x.prototype=m,m.Parser=x,new x}();O.parser=O;const B=O,j={info:!1};let $=j.info;const V=a=>{$=a},X=()=>$,q=()=>{$=j.info},C={clear:q,setInfo:V,getInfo:X},G=(a,f,m)=>{U.debug(`rendering info diagram -`+a);const k=D(f);M(k,100,400,!0),k.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${m}`)},H={draw:G},W={parser:B,db:C,renderer:H};export{W as diagram}; +`+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(){var e=this.conditionStack.length-1;return e>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),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,n,s,r){switch(s){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}}};return u}();m.lexer=k;function x(){this.yy={}}return x.prototype=m,m.Parser=x,new x}();O.parser=O;const q=O,j={info:!1};let $=j.info;const B=a=>{$=a},V=()=>$,X=()=>{$=j.info},Z={clear:X,setInfo:B,getInfo:V},C=(a,f,m)=>{Y.debug(`rendering info diagram +`+a);const k=D(f);M(k,100,400,!0),k.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${m}`)},G={draw:C},Q={parser:q,db:Z,renderer:G};export{Q as diagram}; diff --git a/backend/web/assets/journeyDiagram-adaa34f8-532986db.js b/backend/web/assets/journeyDiagram-adaa34f8-a7e82d80.js similarity index 72% rename from backend/web/assets/journeyDiagram-adaa34f8-532986db.js rename to backend/web/assets/journeyDiagram-adaa34f8-a7e82d80.js index 84c970f5..d32c972d 100644 --- a/backend/web/assets/journeyDiagram-adaa34f8-532986db.js +++ b/backend/web/assets/journeyDiagram-adaa34f8-a7e82d80.js @@ -1,9 +1,9 @@ -import{i as V,H as gt,I as mt,s as xt,g as _t,h as kt,f as bt,m as vt,J as wt,n as G,p as Tt}from"./EchartsRenderer-3d08027d.js";import{d as $t,f as St,a as Mt,g as ct}from"./svgDrawCommon-42e92da3-e31904ea.js";import"./index-51905ea3.js";import{a as it}from"./arc-b31ff68c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./path-53f90ab3.js";var J=function(){var t=function(_,r,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=r);return a},e=[1,2],s=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],l=[1,16],o=[1,17],y=[1,18],u=[1,19],x=[1,20],g=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(r,a,h,p,m,c,R){var k=c.length-1;switch(m){case 1:return c[k-1];case 3:this.$=[];break;case 4:c[k-1].push(c[k]),this.$=c[k-1];break;case 5:case 6:this.$=c[k];break;case 7:case 8:this.$=[];break;case 11:p.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 12:this.$=c[k].trim(),p.setAccTitle(this.$);break;case 13:case 14:this.$=c[k].trim(),p.setAccDescription(this.$);break;case 15:p.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 16:p.addTask(c[k-1],c[k]),this.$="task";break;case 18:p.parseDirective("%%{","open_directive");break;case 19:p.parseDirective(c[k],"type_directive");break;case 20:c[k]=c[k].trim().replace(/'/g,'"'),p.parseDirective(c[k],"arg_directive");break;case 21:p.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:s},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:s},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:l,20:o,22:y,23:u,24:x,26:s},{1:[2,2]},{14:22,15:[1,23],29:g},t([15,29],[2,19]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:21,10:25,12:4,17:i,18:l,20:o,22:y,23:u,24:x,26:s},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{19:[1,26]},{21:[1,27]},t(n,[2,14]),t(n,[2,15]),{25:[1,28]},t(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(n,[2,5]),t(n,[2,12]),t(n,[2,13]),t(n,[2,16]),t(f,[2,9]),{14:32,29:g},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},parse:function(r){var a=this,h=[0],p=[],m=[null],c=[],R=this.table,k="",z=0,Q=0,yt=2,tt=1,dt=c.slice.call(arguments,1),v=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);v.setInput(r,I.yy),I.yy.lexer=v,I.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var H=v.yylloc;c.push(H);var pt=v.options&&v.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var E;return E=p.pop()||v.lex()||tt,typeof E!="number"&&(E instanceof Array&&(p=E,E=p.pop()),E=a.symbols_[E]||E),E}for(var w,A,$,W,F={},Y,M,et,O;;){if(A=h[h.length-1],this.defaultActions[A]?$=this.defaultActions[A]:((w===null||typeof w>"u")&&(w=ft()),$=R[A]&&R[A][w]),typeof $>"u"||!$.length||!$[0]){var X="";O=[];for(Y in R[A])this.terminals_[Y]&&Y>yt&&O.push("'"+this.terminals_[Y]+"'");v.showPosition?X="Parse error on line "+(z+1)+`: +import{j as V,I as gt,J as mt,s as xt,g as _t,i as kt,h as bt,m as vt,K as wt,o as H,q as Tt}from"./TextOutput-39ff842e.js";import{d as $t,f as St,a as Mt,g as ct}from"./svgDrawCommon-42e92da3-fd0afe46.js";import"./index-ef7aa48c.js";import{a as it}from"./arc-b070a76c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./path-53f90ab3.js";var J=function(){var t=function(_,r,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=r);return a},e=[1,2],s=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],l=[1,16],o=[1,17],y=[1,18],u=[1,19],x=[1,20],g=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(r,a,h,p,m,c,R){var k=c.length-1;switch(m){case 1:return c[k-1];case 3:this.$=[];break;case 4:c[k-1].push(c[k]),this.$=c[k-1];break;case 5:case 6:this.$=c[k];break;case 7:case 8:this.$=[];break;case 11:p.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 12:this.$=c[k].trim(),p.setAccTitle(this.$);break;case 13:case 14:this.$=c[k].trim(),p.setAccDescription(this.$);break;case 15:p.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 16:p.addTask(c[k-1],c[k]),this.$="task";break;case 18:p.parseDirective("%%{","open_directive");break;case 19:p.parseDirective(c[k],"type_directive");break;case 20:c[k]=c[k].trim().replace(/'/g,'"'),p.parseDirective(c[k],"arg_directive");break;case 21:p.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:s},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:s},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:l,20:o,22:y,23:u,24:x,26:s},{1:[2,2]},{14:22,15:[1,23],29:g},t([15,29],[2,19]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:21,10:25,12:4,17:i,18:l,20:o,22:y,23:u,24:x,26:s},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{19:[1,26]},{21:[1,27]},t(n,[2,14]),t(n,[2,15]),{25:[1,28]},t(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(n,[2,5]),t(n,[2,12]),t(n,[2,13]),t(n,[2,16]),t(f,[2,9]),{14:32,29:g},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(r,a){if(a.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=a,h}},parse:function(r){var a=this,h=[0],p=[],m=[null],c=[],R=this.table,k="",z=0,Q=0,yt=2,tt=1,dt=c.slice.call(arguments,1),v=Object.create(this.lexer),I={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(I.yy[D]=this.yy[D]);v.setInput(r,I.yy),I.yy.lexer=v,I.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var W=v.yylloc;c.push(W);var pt=v.options&&v.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var E;return E=p.pop()||v.lex()||tt,typeof E!="number"&&(E instanceof Array&&(p=E,E=p.pop()),E=a.symbols_[E]||E),E}for(var w,A,$,X,F={},Y,M,et,q;;){if(A=h[h.length-1],this.defaultActions[A]?$=this.defaultActions[A]:((w===null||typeof w>"u")&&(w=ft()),$=R[A]&&R[A][w]),typeof $>"u"||!$.length||!$[0]){var G="";q=[];for(Y in R[A])this.terminals_[Y]&&Y>yt&&q.push("'"+this.terminals_[Y]+"'");v.showPosition?G="Parse error on line "+(z+1)+`: `+v.showPosition()+` -Expecting `+O.join(", ")+", got '"+(this.terminals_[w]||w)+"'":X="Parse error on line "+(z+1)+": Unexpected "+(w==tt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(X,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:H,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+w);switch($[0]){case 1:h.push(w),m.push(v.yytext),c.push(v.yylloc),h.push($[1]),w=null,Q=v.yyleng,k=v.yytext,z=v.yylineno,H=v.yylloc;break;case 2:if(M=this.productions_[$[1]][1],F.$=m[m.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},pt&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),W=this.performAction.apply(F,[k,Q,z,I.yy,$[1],m,c].concat(dt)),typeof W<"u")return W;M&&(h=h.slice(0,-1*M*2),m=m.slice(0,-1*M),c=c.slice(0,-1*M)),h.push(this.productions_[$[1]][0]),m.push(F.$),c.push(F._$),et=R[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},T=function(){var _={EOF:1,parseError:function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},setInput:function(r,a){return this.yy=a||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),h.length-1&&(this.yylineno-=h.length-1);var m=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:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":G="Parse error on line "+(z+1)+": Unexpected "+(w==tt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(G,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:W,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+w);switch($[0]){case 1:h.push(w),m.push(v.yytext),c.push(v.yylloc),h.push($[1]),w=null,Q=v.yyleng,k=v.yytext,z=v.yylineno,W=v.yylloc;break;case 2:if(M=this.productions_[$[1]][1],F.$=m[m.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},pt&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),X=this.performAction.apply(F,[k,Q,z,I.yy,$[1],m,c].concat(dt)),typeof X<"u")return X;M&&(h=h.slice(0,-1*M*2),m=m.slice(0,-1*M),c=c.slice(0,-1*M)),h.push(this.productions_[$[1]][0]),m.push(F.$),c.push(F._$),et=R[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},T=function(){var _={EOF:1,parseError:function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},setInput:function(r,a){return this.yy=a||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var a=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),h.length-1&&(this.yylineno-=h.length-1);var m=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:h?(h.length===p.length?this.yylloc.first_column:0)+p[p.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` `+a+"^"},test_match:function(r,a){var h,p,m;if(this.options.backtrack_lexer&&(m={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&&(m.yylloc.range=this.yylloc.range.slice(0))),p=r[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var c in m)this[c]=m[c];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,h,p;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),c=0;ca[0].length)){if(a=h,p=c,this.options.backtrack_lexer){if(r=this.test_match(h,m[c]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,m[p]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(a,h,p,m){switch(p){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\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:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();d.lexer=T;function b(){this.yy={}}return b.prototype=d,d.Parser=b,new b}();J.parser=J;const Et=J;let L="";const Z=[],N=[],B=[],Pt=function(t,e,s){vt.parseDirective(this,t,e,s)},It=function(){Z.length=0,N.length=0,L="",B.length=0,wt()},At=function(t){L=t,Z.push(t)},Ct=function(){return Z},Vt=function(){let t=st();const e=100;let s=0;for(;!t&&s{s.people&&t.push(...s.people)}),[...new Set(t)].sort()},Lt=function(t,e){const s=e.substr(1).split(":");let n=0,i=[];s.length===1?(n=Number(s[0]),i=[]):(n=Number(s[0]),i=s[1].split(","));const l=i.map(y=>y.trim()),o={section:L,type:L,people:l,task:t,score:n};B.push(o)},Rt=function(t){const e={section:L,type:L,description:t,task:t,classes:[]};N.push(e)},st=function(){const t=function(s){return B[s].processed};let e=!0;for(const[s,n]of B.entries())t(s),e=e&&n.processed;return e},Nt=function(){return Ft()},rt={parseDirective:Pt,getConfig:()=>V().journey,clear:It,setDiagramTitle:gt,getDiagramTitle:mt,setAccTitle:xt,getAccTitle:_t,setAccDescription:kt,getAccDescription:bt,addSection:At,getSections:Ct,getTasks:Vt,addTask:Lt,addTaskOrg:Rt,getActors:Nt},Bt=t=>`.label { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(a,h,p,m){switch(p){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\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:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();d.lexer=T;function b(){this.yy={}}return b.prototype=d,d.Parser=b,new b}();J.parser=J;const Et=J;let L="";const K=[],N=[],j=[],Pt=function(t,e,s){vt.parseDirective(this,t,e,s)},It=function(){K.length=0,N.length=0,L="",j.length=0,wt()},At=function(t){L=t,K.push(t)},Ct=function(){return K},Vt=function(){let t=st();const e=100;let s=0;for(;!t&&s{s.people&&t.push(...s.people)}),[...new Set(t)].sort()},Lt=function(t,e){const s=e.substr(1).split(":");let n=0,i=[];s.length===1?(n=Number(s[0]),i=[]):(n=Number(s[0]),i=s[1].split(","));const l=i.map(y=>y.trim()),o={section:L,type:L,people:l,task:t,score:n};j.push(o)},Rt=function(t){const e={section:L,type:L,description:t,task:t,classes:[]};N.push(e)},st=function(){const t=function(s){return j[s].processed};let e=!0;for(const[s,n]of j.entries())t(s),e=e&&n.processed;return e},Nt=function(){return Ft()},rt={parseDirective:Pt,getConfig:()=>V().journey,clear:It,setDiagramTitle:gt,getDiagramTitle:mt,setAccTitle:xt,getAccTitle:_t,setAccDescription:kt,getAccDescription:bt,addSection:At,getSections:Ct,getTasks:Vt,addTask:Lt,addTaskOrg:Rt,getActors:Nt},jt=t=>`.label { font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); color: ${t.textColor}; @@ -136,4 +136,4 @@ Expecting `+O.join(", ")+", got '"+(this.terminals_[w]||w)+"'":X="Parse error on .actor-5 { ${t.actor5?`fill: ${t.actor5}`:""}; } -`,jt=Bt,K=function(t,e){return $t(t,e)},zt=function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function l(u){const x=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(u){const x=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function y(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?l(i):e.score<3?o(i):y(i),n},lt=function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},ht=function(t,e){return St(t,e)},Yt=function(t,e){function s(i,l,o,y,u){return i+","+l+" "+(i+o)+","+l+" "+(i+o)+","+(l+y-u)+" "+(i+o-u*1.2)+","+(l+y)+" "+i+","+(l+y)}const n=t.append("polygon");n.attr("points",s(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ht(t,e)},Ot=function(t,e,s){const n=t.append("g"),i=ct();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),i.height=s.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,K(n,i),ut(s)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},s,e.colour)};let nt=-1;const qt=function(t,e,s){const n=e.x+s.width/2,i=t.append("g");nt++;const l=300+5*30;i.append("line").attr("id","task"+nt).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",l).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),zt(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});const o=ct();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=s.width,o.height=s.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,K(i,o);let y=e.x+14;e.people.forEach(u=>{const x=e.actors[u].color,g={cx:y,cy:e.y,r:7,fill:x,stroke:"#000",title:u,pos:e.actors[u].position};lt(i,g),y+=10}),ut(s)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},s,e.colour)},Dt=function(t,e){Mt(t,e)},ut=function(){function t(i,l,o,y,u,x,g,f){const d=l.append("text").attr("x",o+u/2).attr("y",y+x/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,g)}function e(i,l,o,y,u,x,g,f,d){const{taskFontSize:T,taskFontFamily:b}=f,_=i.split(//gi);for(let r=0;r<_.length;r++){const a=r*T-T*(_.length-1)/2,h=l.append("text").attr("x",o+u/2).attr("y",y).attr("fill",d).style("text-anchor","middle").style("font-size",T).style("font-family",b);h.append("tspan").attr("x",o+u/2).attr("dy",a).text(_[r]),h.attr("y",y+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(h,g)}}function s(i,l,o,y,u,x,g,f){const d=l.append("switch"),b=d.append("foreignObject").attr("x",o).attr("y",y).attr("width",u).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,o,y,u,x,g,f),n(b,g)}function n(i,l){for(const o in l)o in l&&i.attr(o,l[o])}return function(i){return i.textPlacement==="fo"?s:i.textPlacement==="old"?t:e}}(),Ht=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")},j={drawRect:K,drawCircle:lt,drawSection:Ot,drawText:ht,drawLabel:Yt,drawTask:qt,drawBackgroundRect:Dt,initGraphics:Ht},Wt=function(t){Object.keys(t).forEach(function(s){q[s]=t[s]})},P={};function Xt(t){const e=V().journey;let s=60;Object.keys(P).forEach(n=>{const i=P[n].color,l={cx:20,cy:s,r:7,fill:i,stroke:"#000",pos:P[n].position};j.drawCircle(t,l);const o={x:40,y:s+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};j.drawText(t,o),s+=20})}const q=V().journey,C=q.leftMargin,Gt=function(t,e,s,n){const i=V().journey,l=V().securityLevel;let o;l==="sandbox"&&(o=G("#i"+e));const y=l==="sandbox"?G(o.nodes()[0].contentDocument.body):G("body");S.init();const u=y.select("#"+e);j.initGraphics(u);const x=n.db.getTasks(),g=n.db.getDiagramTitle(),f=n.db.getActors();for(const a in P)delete P[a];let d=0;f.forEach(a=>{P[a]={color:i.actorColours[d%i.actorColours.length],position:d},d++}),Xt(u),S.insert(0,0,C,Object.keys(P).length*50),Ut(u,x,0);const T=S.getBounds();g&&u.append("text").text(g).attr("x",C).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const b=T.stopy-T.starty+2*i.diagramMarginY,_=C+T.stopx+2*i.diagramMarginX;Tt(u,b,_,i.useMaxWidth),u.append("line").attr("x1",C).attr("y1",i.height*4).attr("x2",_-C-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const r=g?70:0;u.attr("viewBox",`${T.startx} -25 ${_} ${b+r}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+r+25)},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,s,n){t[e]===void 0?t[e]=s:t[e]=n(s,t[e])},updateBounds:function(t,e,s,n){const i=V().journey,l=this;let o=0;function y(u){return function(g){o++;const f=l.sequenceItems.length-o+1;l.updateVal(g,"starty",e-f*i.boxMargin,Math.min),l.updateVal(g,"stopy",n+f*i.boxMargin,Math.max),l.updateVal(S.data,"startx",t-f*i.boxMargin,Math.min),l.updateVal(S.data,"stopx",s+f*i.boxMargin,Math.max),u!=="activation"&&(l.updateVal(g,"startx",t-f*i.boxMargin,Math.min),l.updateVal(g,"stopx",s+f*i.boxMargin,Math.max),l.updateVal(S.data,"starty",e-f*i.boxMargin,Math.min),l.updateVal(S.data,"stopy",n+f*i.boxMargin,Math.max))}}this.sequenceItems.forEach(y())},insert:function(t,e,s,n){const i=Math.min(t,s),l=Math.max(t,s),o=Math.min(e,n),y=Math.max(e,n);this.updateVal(S.data,"startx",i,Math.min),this.updateVal(S.data,"starty",o,Math.min),this.updateVal(S.data,"stopx",l,Math.max),this.updateVal(S.data,"stopy",y,Math.max),this.updateBounds(i,o,l,y)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},U=q.sectionFills,at=q.sectionColours,Ut=function(t,e,s){const n=V().journey;let i="";const l=n.height*2+n.diagramMarginY,o=s+l;let y=0,u="#CCC",x="black",g=0;for(const[f,d]of e.entries()){if(i!==d.section){u=U[y%U.length],g=y%U.length,x=at[y%at.length];let b=0;const _=d.section;for(let a=f;a(P[_]&&(b[_]=P[_]),b),{});d.x=f*n.taskMargin+f*n.width+C,d.y=o,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=x,d.fill=u,d.num=g,d.actors=T,j.drawTask(t,d,n),S.insert(d.x,d.y,d.x+d.width+n.taskMargin,300+5*30)}},ot={setConf:Wt,draw:Gt},ie={parser:Et,db:rt,renderer:ot,styles:jt,init:t=>{ot.setConf(t.journey),rt.clear()}};export{ie as diagram}; +`,Bt=jt,Z=function(t,e){return $t(t,e)},zt=function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function l(u){const x=it().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(u){const x=it().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function y(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?l(i):e.score<3?o(i):y(i),n},lt=function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},ht=function(t,e){return St(t,e)},Yt=function(t,e){function s(i,l,o,y,u){return i+","+l+" "+(i+o)+","+l+" "+(i+o)+","+(l+y-u)+" "+(i+o-u*1.2)+","+(l+y)+" "+i+","+(l+y)}const n=t.append("polygon");n.attr("points",s(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ht(t,e)},qt=function(t,e,s){const n=t.append("g"),i=ct();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),i.height=s.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Z(n,i),ut(s)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},s,e.colour)};let nt=-1;const Ot=function(t,e,s){const n=e.x+s.width/2,i=t.append("g");nt++;const l=300+5*30;i.append("line").attr("id","task"+nt).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",l).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),zt(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});const o=ct();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=s.width,o.height=s.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,Z(i,o);let y=e.x+14;e.people.forEach(u=>{const x=e.actors[u].color,g={cx:y,cy:e.y,r:7,fill:x,stroke:"#000",title:u,pos:e.actors[u].position};lt(i,g),y+=10}),ut(s)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},s,e.colour)},Dt=function(t,e){Mt(t,e)},ut=function(){function t(i,l,o,y,u,x,g,f){const d=l.append("text").attr("x",o+u/2).attr("y",y+x/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(d,g)}function e(i,l,o,y,u,x,g,f,d){const{taskFontSize:T,taskFontFamily:b}=f,_=i.split(//gi);for(let r=0;r<_.length;r++){const a=r*T-T*(_.length-1)/2,h=l.append("text").attr("x",o+u/2).attr("y",y).attr("fill",d).style("text-anchor","middle").style("font-size",T).style("font-family",b);h.append("tspan").attr("x",o+u/2).attr("dy",a).text(_[r]),h.attr("y",y+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(h,g)}}function s(i,l,o,y,u,x,g,f){const d=l.append("switch"),b=d.append("foreignObject").attr("x",o).attr("y",y).attr("width",u).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");b.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,d,o,y,u,x,g,f),n(b,g)}function n(i,l){for(const o in l)o in l&&i.attr(o,l[o])}return function(i){return i.textPlacement==="fo"?s:i.textPlacement==="old"?t:e}}(),Wt=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")},B={drawRect:Z,drawCircle:lt,drawSection:qt,drawText:ht,drawLabel:Yt,drawTask:Ot,drawBackgroundRect:Dt,initGraphics:Wt},Xt=function(t){Object.keys(t).forEach(function(s){O[s]=t[s]})},P={};function Gt(t){const e=V().journey;let s=60;Object.keys(P).forEach(n=>{const i=P[n].color,l={cx:20,cy:s,r:7,fill:i,stroke:"#000",pos:P[n].position};B.drawCircle(t,l);const o={x:40,y:s+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};B.drawText(t,o),s+=20})}const O=V().journey,C=O.leftMargin,Ht=function(t,e,s,n){const i=V().journey,l=V().securityLevel;let o;l==="sandbox"&&(o=H("#i"+e));const y=l==="sandbox"?H(o.nodes()[0].contentDocument.body):H("body");S.init();const u=y.select("#"+e);B.initGraphics(u);const x=n.db.getTasks(),g=n.db.getDiagramTitle(),f=n.db.getActors();for(const a in P)delete P[a];let d=0;f.forEach(a=>{P[a]={color:i.actorColours[d%i.actorColours.length],position:d},d++}),Gt(u),S.insert(0,0,C,Object.keys(P).length*50),Ut(u,x,0);const T=S.getBounds();g&&u.append("text").text(g).attr("x",C).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const b=T.stopy-T.starty+2*i.diagramMarginY,_=C+T.stopx+2*i.diagramMarginX;Tt(u,b,_,i.useMaxWidth),u.append("line").attr("x1",C).attr("y1",i.height*4).attr("x2",_-C-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const r=g?70:0;u.attr("viewBox",`${T.startx} -25 ${_} ${b+r}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+r+25)},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,s,n){t[e]===void 0?t[e]=s:t[e]=n(s,t[e])},updateBounds:function(t,e,s,n){const i=V().journey,l=this;let o=0;function y(u){return function(g){o++;const f=l.sequenceItems.length-o+1;l.updateVal(g,"starty",e-f*i.boxMargin,Math.min),l.updateVal(g,"stopy",n+f*i.boxMargin,Math.max),l.updateVal(S.data,"startx",t-f*i.boxMargin,Math.min),l.updateVal(S.data,"stopx",s+f*i.boxMargin,Math.max),u!=="activation"&&(l.updateVal(g,"startx",t-f*i.boxMargin,Math.min),l.updateVal(g,"stopx",s+f*i.boxMargin,Math.max),l.updateVal(S.data,"starty",e-f*i.boxMargin,Math.min),l.updateVal(S.data,"stopy",n+f*i.boxMargin,Math.max))}}this.sequenceItems.forEach(y())},insert:function(t,e,s,n){const i=Math.min(t,s),l=Math.max(t,s),o=Math.min(e,n),y=Math.max(e,n);this.updateVal(S.data,"startx",i,Math.min),this.updateVal(S.data,"starty",o,Math.min),this.updateVal(S.data,"stopx",l,Math.max),this.updateVal(S.data,"stopy",y,Math.max),this.updateBounds(i,o,l,y)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},U=O.sectionFills,at=O.sectionColours,Ut=function(t,e,s){const n=V().journey;let i="";const l=n.height*2+n.diagramMarginY,o=s+l;let y=0,u="#CCC",x="black",g=0;for(const[f,d]of e.entries()){if(i!==d.section){u=U[y%U.length],g=y%U.length,x=at[y%at.length];let b=0;const _=d.section;for(let a=f;a(P[_]&&(b[_]=P[_]),b),{});d.x=f*n.taskMargin+f*n.width+C,d.y=o,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=x,d.fill=u,d.num=g,d.actors=T,B.drawTask(t,d,n),S.insert(d.x,d.y,d.x+d.width+n.taskMargin,300+5*30)}},ot={setConf:Xt,draw:Ht},ie={parser:Et,db:rt,renderer:ot,styles:Bt,init:t=>{ot.setConf(t.journey),rt.clear()}};export{ie as diagram}; diff --git a/backend/web/assets/layout-218ba7ee.js b/backend/web/assets/layout-218ba7ee.js new file mode 100644 index 00000000..04812557 --- /dev/null +++ b/backend/web/assets/layout-218ba7ee.js @@ -0,0 +1 @@ +import{ax as te,aA as Re,aw as He,b7 as $,aB as O,b8 as Ke,b9 as q,ba as Je,bb as R,au as Ze,bc as I,aM as Qe,bd as Me,be as en,bf as y,ay as nn,bg as ee,bh as rn,bi as tn,bj as U,bk as Pe,bl as an,aE as on,bm as sn,bn as un,bo as T,aK as le,aW as ve,bp as V,bq as pe,br as ie,b2 as G,bs as j,bt as dn}from"./index-ef7aa48c.js";import{ad as Y,ae as ne}from"./TextOutput-39ff842e.js";function fn(e,n,r,t){var i=-1,a=e==null?0:e.length;for(t&&a&&(r=e[++i]);++i2?n[2]:void 0;for(i&&Y(n[0],n[1],i)&&(t=1);++rn}var gn=Object.prototype,wn=gn.hasOwnProperty;function _n(e,n){return e!=null&&wn.call(e,n)}function b(e,n){return e!=null&&en(e,n,_n)}function En(e,n){return I(n,function(r){return e[r]})}function x(e){return e==null?[]:En(e,y(e))}function w(e){return e===void 0}function Ie(e,n){return en||a&&o&&u&&!s&&!d||t&&o&&u||!r&&u||!i)return 1;if(!t&&!a&&!d&&e=s)return u;var d=r[t];return u*(d=="desc"?-1:1)}}return e.index-n.index}function Ln(e,n,r){n.length?n=I(n,function(a){return O(a)?function(o){return rn(o,a.length===1?a[0]:a)}:a}):n=[$];var t=-1;n=I(n,tn(R));var i=Fe(e,function(a,o,s){var u=I(n,function(d){return d(a)});return{criteria:u,index:++t,value:a}});return xn(i,function(a,o){return yn(a,o,r)})}var Nn=Math.ceil,Cn=Math.max;function On(e,n,r,t){for(var i=-1,a=Cn(Nn((n-e)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=e,e+=r;return o}function Rn(e){return function(n,r,t){return t&&typeof t!="number"&&Y(n,r,t)&&(r=t=void 0),n=U(n),r===void 0?(r=n,n=0):r=U(r),t=t===void 0?n1&&Y(e,n[0],n[1])?n=[]:r>2&&Y(n[0],n[1],n[2])&&(n=[n[0]]),Ln(e,Pe(n,1),[])});const B=Tn;var Fn=te(function(e){return an(Pe(e,1,on,!0))});const In=Fn;var Sn=0;function ue(e){var n=++Sn;return sn(e)+n}function An(e,n,r){for(var t=-1,i=e.length,a=n.length,o={};++t1?i.setNode(a,r):i.setNode(a)}),this}setNode(n,r){return b(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=k,this._children[n]={},this._children[k][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)}node(n){return this._nodes[n]}hasNode(n){return b(this._nodes,n)}removeNode(n){var r=this;if(b(this._nodes,n)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],f(this.children(n),function(i){r.setParent(i)}),delete this._children[n]),f(y(this._in[n]),t),delete this._in[n],delete this._preds[n],f(y(this._out[n]),t),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this}setParent(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(w(r))r=k;else{r+="";for(var t=r;!w(t);t=this.parent(t))if(t===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this}_removeFromParentsChildList(n){delete this._children[this._parent[n]][n]}parent(n){if(this._isCompound){var r=this._parent[n];if(r!==k)return r}}children(n){if(w(n)&&(n=k),this._isCompound){var r=this._children[n];if(r)return y(r)}else{if(n===k)return this.nodes();if(this.hasNode(n))return[]}}predecessors(n){var r=this._preds[n];if(r)return y(r)}successors(n){var r=this._sucs[n];if(r)return y(r)}neighbors(n){var r=this.predecessors(n);if(r)return In(r,this.successors(n))}isLeaf(n){var r;return this.isDirected()?r=this.successors(n):r=this.neighbors(n),r.length===0}filterNodes(n){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;f(this._nodes,function(o,s){n(s)&&r.setNode(s,o)}),f(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var s=t.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&&f(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(n){return le(n)||(n=T(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return x(this._edgeObjs)}setPath(n,r){var t=this,i=arguments;return D(n,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var n,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(n=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(n=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),n=""+n,r=""+r,w(t)||(t=""+t);var s=F(this._isDirected,n,r,t);if(b(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!w(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(n,r,t);var u=Bn(this._isDirected,n,r,t);return n=u.v,r=u.w,Object.freeze(u),this._edgeObjs[s]=u,me(this._preds[r],n),me(this._sucs[n],r),this._in[r][s]=u,this._out[n][s]=u,this._edgeCount++,this}edge(n,r,t){var i=arguments.length===1?X(this._isDirected,arguments[0]):F(this._isDirected,n,r,t);return this._edgeLabels[i]}hasEdge(n,r,t){var i=arguments.length===1?X(this._isDirected,arguments[0]):F(this._isDirected,n,r,t);return b(this._edgeLabels,i)}removeEdge(n,r,t){var i=arguments.length===1?X(this._isDirected,arguments[0]):F(this._isDirected,n,r,t),a=this._edgeObjs[i];return a&&(n=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],ge(this._preds[r],n),ge(this._sucs[n],r),delete this._in[r][i],delete this._out[n][i],this._edgeCount--),this}inEdges(n,r){var t=this._in[n];if(t){var i=x(t);return r?E(i,function(a){return a.v===r}):i}}outEdges(n,r){var t=this._out[n];if(t){var i=x(t);return r?E(i,function(a){return a.w===r}):i}}nodeEdges(n,r){var t=this.inEdges(n,r);if(t)return t.concat(this.outEdges(n,r))}}_.prototype._nodeCount=0;_.prototype._edgeCount=0;function me(e,n){e[n]?e[n]++:e[n]=1}function ge(e,n){--e[n]||delete e[n]}function F(e,n,r,t){var i=""+n,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+be+a+be+(w(t)?Dn:t)}function Bn(e,n,r,t){var i=""+n,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return t&&(s.name=t),s}function X(e,n){return F(e,n.v,n.w,n.name)}class Gn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return we(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&we(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,jn)),t=t._prev;return"["+n.join(", ")+"]"}}function we(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function jn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Yn=T(1);function $n(e,n){if(e.nodeCount()<=1)return[];var r=Wn(e,n||Yn),t=qn(r.graph,r.buckets,r.zeroIdx);return V(m(t,function(i){return e.outEdges(i.v,i.w)}))}function qn(e,n,r){for(var t=[],i=n[n.length-1],a=n[0],o;e.nodeCount();){for(;o=a.dequeue();)H(e,n,r,o);for(;o=i.dequeue();)H(e,n,r,o);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(o=n[s].dequeue(),o){t=t.concat(H(e,n,r,o,!0));break}}}return t}function H(e,n,r,t,i){var a=i?[]:void 0;return f(e.inEdges(t.v),function(o){var s=e.edge(o),u=e.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,re(n,r,u)}),f(e.outEdges(t.v),function(o){var s=e.edge(o),u=o.w,d=e.node(u);d.in-=s,re(n,r,d)}),e.removeNode(t.v),a}function Wn(e,n){var r=new _,t=0,i=0;f(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),f(e.edges(),function(s){var u=r.edge(s.v,s.w)||0,d=n(s),h=u+d;r.setEdge(s.v,s.w,h),i=Math.max(i,r.node(s.v).out+=d),t=Math.max(t,r.node(s.w).in+=d)});var a=C(i+t+3).map(function(){return new Gn}),o=t+1;return f(r.nodes(),function(s){re(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function re(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function zn(e){var n=e.graph().acyclicer==="greedy"?$n(e,r(e)):Un(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,ue("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Un(e){var n=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,f(e.outEdges(a),function(o){b(r,o.w)?n.push(o):i(o.w)}),delete r[a])}return f(e.nodes(),i),n}function Xn(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function M(e,n,r,t){var i;do i=ue(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Hn(e){var n=new _().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Se(e){var n=new _({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function _e(e,n){var r=e.x,t=e.y,i=n.x-r,a=n.y-t,o=e.width/2,s=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,d;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,d=s):(i<0&&(o=-o),u=o,d=o*a/i),{x:r+u,y:t+d}}function z(e){var n=m(C(Ae(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;w(i)||(n[i][t.order]=r)}),n}function Kn(e){var n=S(m(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);b(t,"rank")&&(t.rank-=n)})}function Jn(e){var n=S(m(e.nodes(),function(a){return e.node(a).rank})),r=[];f(e.nodes(),function(a){var o=e.node(a).rank-n;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=e.graph().nodeRankFactor;f(r,function(a,o){w(a)&&o%i!==0?--t:t&&f(a,function(s){e.node(s).rank+=t})})}function Ee(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),M(e,"border",i,n)}function Ae(e){return L(m(e.nodes(),function(n){var r=e.node(n).rank;if(!w(r))return r}))}function Zn(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Qn(e,n){var r=pe();try{return n()}finally{console.log(e+" time: "+(pe()-r)+"ms")}}function er(e,n){return n()}function nr(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,u=!0);var d=E(n.edges(),function(h){return u===ye(e,e.node(h.v),s)&&u!==ye(e,e.node(h.w),s)});return se(d,function(h){return A(n,h)})}function We(e,n,r,t){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(t.v,t.w,{}),he(e),fe(e,n),br(e,n)}function br(e,n){var r=ie(e.nodes(),function(i){return!n.node(i).parent}),t=vr(e,r);t=t.slice(1),f(t,function(i){var a=e.node(i).parent,o=n.edge(i,a),s=!1;o||(o=n.edge(a,i),s=!0),n.node(i).rank=n.node(a).rank+(s?o.minlen:-o.minlen)})}function mr(e,n,r){return e.hasEdge(n,r)}function ye(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function gr(e){switch(e.graph().ranker){case"network-simplex":Le(e);break;case"tight-tree":_r(e);break;case"longest-path":wr(e);break;default:Le(e)}}var wr=de;function _r(e){de(e),De(e)}function Le(e){N(e)}function Er(e){var n=M(e,"root",{},"_root"),r=xr(e),t=L(x(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=i});var a=kr(e)+1;f(e.children(),function(o){ze(e,n,i,a,t,r,o)}),e.graph().nodeRankFactor=i}function ze(e,n,r,t,i,a,o){var s=e.children(o);if(!s.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var u=Ee(e,"_bt"),d=Ee(e,"_bb"),h=e.node(o);e.setParent(u,o),h.borderTop=u,e.setParent(d,o),h.borderBottom=d,f(s,function(c){ze(e,n,r,t,i,a,c);var l=e.node(c),v=l.borderTop?l.borderTop:c,p=l.borderBottom?l.borderBottom:c,g=l.borderTop?t:2*t,P=v!==p?1:i-a[o]+1;e.setEdge(u,v,{weight:g,minlen:P,nestingEdge:!0}),e.setEdge(p,d,{weight:g,minlen:P,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,u,{weight:0,minlen:i+a[o]})}function xr(e){var n={};function r(t,i){var a=e.children(t);a&&a.length&&f(a,function(o){r(o,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function kr(e){return D(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function yr(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Lr(e,n,r){var t={},i;f(r,function(a){for(var o=e.parent(a),s,u;o;){if(s=e.parent(o),s?(u=t[s],t[s]=o):(u=i,i=o),u&&u!==o){n.setEdge(u,o);return}o=s}})}function Nr(e,n,r){var t=Cr(e),i=new _({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return e.node(a)});return f(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||t),f(e[r](a),function(u){var d=u.v===a?u.w:u.v,h=i.edge(d,a),c=w(h)?0:h.weight;i.setEdge(d,a,{weight:e.edge(u).weight+c})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),i}function Cr(e){for(var n;e.hasNode(n=ue("_root")););return n}function Or(e,n){for(var r=0,t=1;t0;)h%2&&(c+=s[h+1]),h=h-1>>1,s[h]+=d.weight;u+=d.weight*c})),u}function Mr(e){var n={},r=E(e.nodes(),function(s){return!e.children(s).length}),t=L(m(r,function(s){return e.node(s).rank})),i=m(C(t+1),function(){return[]});function a(s){if(!b(n,s)){n[s]=!0;var u=e.node(s);i[u.rank].push(s),f(e.successors(s),a)}}var o=B(r,function(s){return e.node(s).rank});return f(o,a),i}function Pr(e,n){return m(n,function(r){var t=e.inEdges(r);if(t.length){var i=D(t,function(a,o){var s=e.edge(o),u=e.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Tr(e,n){var r={};f(e,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};w(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),f(n.edges(),function(i){var a=r[i.v],o=r[i.w];!w(a)&&!w(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=E(r,function(i){return!i.indegree});return Fr(t)}function Fr(e){var n=[];function r(a){return function(o){o.merged||(w(o.barycenter)||w(a.barycenter)||o.barycenter>=a.barycenter)&&Ir(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return m(E(n,function(a){return!a.merged}),function(a){return G(a,["vs","i","barycenter","weight"])})}function Ir(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Sr(e,n){var r=Zn(e,function(h){return b(h,"barycenter")}),t=r.lhs,i=B(r.rhs,function(h){return-h.i}),a=[],o=0,s=0,u=0;t.sort(Ar(!!n)),u=Ne(a,i,u),f(t,function(h){u+=h.vs.length,a.push(h.vs),o+=h.barycenter*h.weight,s+=h.weight,u=Ne(a,i,u)});var d={vs:V(a)};return s&&(d.barycenter=o/s,d.weight=s),d}function Ne(e,n,r){for(var t;n.length&&(t=j(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ar(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Ue(e,n,r,t){var i=e.children(n),a=e.node(n),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=E(i,function(p){return p!==o&&p!==s}));var d=Pr(e,i);f(d,function(p){if(e.children(p.v).length){var g=Ue(e,p.v,r,t);u[p.v]=g,b(g,"barycenter")&&Dr(p,g)}});var h=Tr(d,r);Vr(h,u);var c=Sr(h,t);if(o&&(c.vs=V([o,c.vs,s]),e.predecessors(o).length)){var l=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(s)[0]);b(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+l.order+v.order)/(c.weight+2),c.weight+=2}return c}function Vr(e,n){f(e,function(r){r.vs=V(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Dr(e,n){w(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Br(e){var n=Ae(e),r=Ce(e,C(1,n+1),"inEdges"),t=Ce(e,C(n-1,-1,-1),"outEdges"),i=Mr(e);Oe(e,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){Gr(s%2?r:t,s%4>=2),i=z(e);var d=Or(e,i);do||s>n[u].lim));for(d=u,u=t;(u=e.parent(u))!==d;)a.push(u);return{path:i.concat(a.reverse()),lca:d}}function $r(e){var n={},r=0;function t(i){var a=r;f(e.children(i),t),n[i]={low:a,lim:r++}}return f(e.children(),t),n}function qr(e,n){var r={};function t(i,a){var o=0,s=0,u=i.length,d=j(a);return f(a,function(h,c){var l=zr(e,h),v=l?e.node(l).order:u;(l||h===d)&&(f(a.slice(s,c+1),function(p){f(e.predecessors(p),function(g){var P=e.node(g),ce=P.order;(ced)&&Xe(r,l,h)})})}function i(a,o){var s=-1,u,d=0;return f(o,function(h,c){if(e.node(h).dummy==="border"){var l=e.predecessors(h);l.length&&(u=e.node(l[0]).order,t(o,d,c,s,u),d=c,s=u)}t(o,d,o.length,u,a.length)}),o}return D(n,i),r}function zr(e,n){if(e.node(n).dummy)return ie(e.predecessors(n),function(r){return e.node(r).dummy})}function Xe(e,n,r){if(n>r){var t=n;n=r,r=t}var i=e[n];i||(e[n]=i={}),i[r]=!0}function Ur(e,n,r){if(n>r){var t=n;n=r,r=t}return b(e[n],r)}function Xr(e,n,r,t){var i={},a={},o={};return f(n,function(s){f(s,function(u,d){i[u]=u,a[u]=u,o[u]=d})}),f(n,function(s){var u=-1;f(s,function(d){var h=t(d);if(h.length){h=B(h,function(g){return o[g]});for(var c=(h.length-1)/2,l=Math.floor(c),v=Math.ceil(c);l<=v;++l){var p=h[l];a[d]===d&&u2?n[2]:void 0;for(i&&Y(n[0],n[1],i)&&(t=1);++rn}var gn=Object.prototype,wn=gn.hasOwnProperty;function _n(e,n){return e!=null&&wn.call(e,n)}function b(e,n){return e!=null&&en(e,n,_n)}function En(e,n){return I(n,function(r){return e[r]})}function x(e){return e==null?[]:En(e,y(e))}function w(e){return e===void 0}function Ie(e,n){return en||a&&o&&u&&!s&&!d||t&&o&&u||!r&&u||!i)return 1;if(!t&&!a&&!d&&e=s)return u;var d=r[t];return u*(d=="desc"?-1:1)}}return e.index-n.index}function Ln(e,n,r){n.length?n=I(n,function(a){return O(a)?function(o){return rn(o,a.length===1?a[0]:a)}:a}):n=[$];var t=-1;n=I(n,tn(R));var i=Fe(e,function(a,o,s){var u=I(n,function(d){return d(a)});return{criteria:u,index:++t,value:a}});return xn(i,function(a,o){return yn(a,o,r)})}var Nn=Math.ceil,Cn=Math.max;function On(e,n,r,t){for(var i=-1,a=Cn(Nn((n-e)/(r||1)),0),o=Array(a);a--;)o[t?a:++i]=e,e+=r;return o}function Rn(e){return function(n,r,t){return t&&typeof t!="number"&&Y(n,r,t)&&(r=t=void 0),n=U(n),r===void 0?(r=n,n=0):r=U(r),t=t===void 0?n1&&Y(e,n[0],n[1])?n=[]:r>2&&Y(n[0],n[1],n[2])&&(n=[n[0]]),Ln(e,Pe(n,1),[])});const B=Tn;var Fn=te(function(e){return an(Pe(e,1,on,!0))});const In=Fn;var Sn=0;function ue(e){var n=++Sn;return sn(e)+n}function An(e,n,r){for(var t=-1,i=e.length,a=n.length,o={};++t1?i.setNode(a,r):i.setNode(a)}),this}setNode(n,r){return b(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=k,this._children[n]={},this._children[k][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)}node(n){return this._nodes[n]}hasNode(n){return b(this._nodes,n)}removeNode(n){var r=this;if(b(this._nodes,n)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],f(this.children(n),function(i){r.setParent(i)}),delete this._children[n]),f(y(this._in[n]),t),delete this._in[n],delete this._preds[n],f(y(this._out[n]),t),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this}setParent(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(w(r))r=k;else{r+="";for(var t=r;!w(t);t=this.parent(t))if(t===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this}_removeFromParentsChildList(n){delete this._children[this._parent[n]][n]}parent(n){if(this._isCompound){var r=this._parent[n];if(r!==k)return r}}children(n){if(w(n)&&(n=k),this._isCompound){var r=this._children[n];if(r)return y(r)}else{if(n===k)return this.nodes();if(this.hasNode(n))return[]}}predecessors(n){var r=this._preds[n];if(r)return y(r)}successors(n){var r=this._sucs[n];if(r)return y(r)}neighbors(n){var r=this.predecessors(n);if(r)return In(r,this.successors(n))}isLeaf(n){var r;return this.isDirected()?r=this.successors(n):r=this.neighbors(n),r.length===0}filterNodes(n){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;f(this._nodes,function(o,s){n(s)&&r.setNode(s,o)}),f(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,t.edge(o))});var i={};function a(o){var s=t.parent(o);return s===void 0||r.hasNode(s)?(i[o]=s,s):s in i?i[s]:a(s)}return this._isCompound&&f(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(n){return le(n)||(n=T(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return x(this._edgeObjs)}setPath(n,r){var t=this,i=arguments;return D(n,function(a,o){return i.length>1?t.setEdge(a,o,r):t.setEdge(a,o),o}),this}setEdge(){var n,r,t,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(n=o.v,r=o.w,t=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(n=o,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),n=""+n,r=""+r,w(t)||(t=""+t);var s=F(this._isDirected,n,r,t);if(b(this._edgeLabels,s))return a&&(this._edgeLabels[s]=i),this;if(!w(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(r),this._edgeLabels[s]=a?i:this._defaultEdgeLabelFn(n,r,t);var u=Bn(this._isDirected,n,r,t);return n=u.v,r=u.w,Object.freeze(u),this._edgeObjs[s]=u,me(this._preds[r],n),me(this._sucs[n],r),this._in[r][s]=u,this._out[n][s]=u,this._edgeCount++,this}edge(n,r,t){var i=arguments.length===1?X(this._isDirected,arguments[0]):F(this._isDirected,n,r,t);return this._edgeLabels[i]}hasEdge(n,r,t){var i=arguments.length===1?X(this._isDirected,arguments[0]):F(this._isDirected,n,r,t);return b(this._edgeLabels,i)}removeEdge(n,r,t){var i=arguments.length===1?X(this._isDirected,arguments[0]):F(this._isDirected,n,r,t),a=this._edgeObjs[i];return a&&(n=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],ge(this._preds[r],n),ge(this._sucs[n],r),delete this._in[r][i],delete this._out[n][i],this._edgeCount--),this}inEdges(n,r){var t=this._in[n];if(t){var i=x(t);return r?E(i,function(a){return a.v===r}):i}}outEdges(n,r){var t=this._out[n];if(t){var i=x(t);return r?E(i,function(a){return a.w===r}):i}}nodeEdges(n,r){var t=this.inEdges(n,r);if(t)return t.concat(this.outEdges(n,r))}}_.prototype._nodeCount=0;_.prototype._edgeCount=0;function me(e,n){e[n]?e[n]++:e[n]=1}function ge(e,n){--e[n]||delete e[n]}function F(e,n,r,t){var i=""+n,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+be+a+be+(w(t)?Dn:t)}function Bn(e,n,r,t){var i=""+n,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return t&&(s.name=t),s}function X(e,n){return F(e,n.v,n.w,n.name)}class Gn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return we(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&we(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,jn)),t=t._prev;return"["+n.join(", ")+"]"}}function we(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function jn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Yn=T(1);function $n(e,n){if(e.nodeCount()<=1)return[];var r=Wn(e,n||Yn),t=qn(r.graph,r.buckets,r.zeroIdx);return V(m(t,function(i){return e.outEdges(i.v,i.w)}))}function qn(e,n,r){for(var t=[],i=n[n.length-1],a=n[0],o;e.nodeCount();){for(;o=a.dequeue();)H(e,n,r,o);for(;o=i.dequeue();)H(e,n,r,o);if(e.nodeCount()){for(var s=n.length-2;s>0;--s)if(o=n[s].dequeue(),o){t=t.concat(H(e,n,r,o,!0));break}}}return t}function H(e,n,r,t,i){var a=i?[]:void 0;return f(e.inEdges(t.v),function(o){var s=e.edge(o),u=e.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,re(n,r,u)}),f(e.outEdges(t.v),function(o){var s=e.edge(o),u=o.w,d=e.node(u);d.in-=s,re(n,r,d)}),e.removeNode(t.v),a}function Wn(e,n){var r=new _,t=0,i=0;f(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),f(e.edges(),function(s){var u=r.edge(s.v,s.w)||0,d=n(s),h=u+d;r.setEdge(s.v,s.w,h),i=Math.max(i,r.node(s.v).out+=d),t=Math.max(t,r.node(s.w).in+=d)});var a=C(i+t+3).map(function(){return new Gn}),o=t+1;return f(r.nodes(),function(s){re(a,o,r.node(s))}),{graph:r,buckets:a,zeroIdx:o}}function re(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function zn(e){var n=e.graph().acyclicer==="greedy"?$n(e,r(e)):Un(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,ue("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Un(e){var n=[],r={},t={};function i(a){b(t,a)||(t[a]=!0,r[a]=!0,f(e.outEdges(a),function(o){b(r,o.w)?n.push(o):i(o.w)}),delete r[a])}return f(e.nodes(),i),n}function Xn(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function M(e,n,r,t){var i;do i=ue(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function Hn(e){var n=new _().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Se(e){var n=new _({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function _e(e,n){var r=e.x,t=e.y,i=n.x-r,a=n.y-t,o=e.width/2,s=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,d;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,d=s):(i<0&&(o=-o),u=o,d=o*a/i),{x:r+u,y:t+d}}function z(e){var n=m(C(Ae(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;w(i)||(n[i][t.order]=r)}),n}function Kn(e){var n=S(m(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);b(t,"rank")&&(t.rank-=n)})}function Jn(e){var n=S(m(e.nodes(),function(a){return e.node(a).rank})),r=[];f(e.nodes(),function(a){var o=e.node(a).rank-n;r[o]||(r[o]=[]),r[o].push(a)});var t=0,i=e.graph().nodeRankFactor;f(r,function(a,o){w(a)&&o%i!==0?--t:t&&f(a,function(s){e.node(s).rank+=t})})}function Ee(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),M(e,"border",i,n)}function Ae(e){return L(m(e.nodes(),function(n){var r=e.node(n).rank;if(!w(r))return r}))}function Zn(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Qn(e,n){var r=pe();try{return n()}finally{console.log(e+" time: "+(pe()-r)+"ms")}}function er(e,n){return n()}function nr(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),b(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,u=!0);var d=E(n.edges(),function(h){return u===ye(e,e.node(h.v),s)&&u!==ye(e,e.node(h.w),s)});return se(d,function(h){return A(n,h)})}function We(e,n,r,t){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(t.v,t.w,{}),he(e),fe(e,n),br(e,n)}function br(e,n){var r=ie(e.nodes(),function(i){return!n.node(i).parent}),t=vr(e,r);t=t.slice(1),f(t,function(i){var a=e.node(i).parent,o=n.edge(i,a),s=!1;o||(o=n.edge(a,i),s=!0),n.node(i).rank=n.node(a).rank+(s?o.minlen:-o.minlen)})}function mr(e,n,r){return e.hasEdge(n,r)}function ye(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function gr(e){switch(e.graph().ranker){case"network-simplex":Le(e);break;case"tight-tree":_r(e);break;case"longest-path":wr(e);break;default:Le(e)}}var wr=de;function _r(e){de(e),De(e)}function Le(e){N(e)}function Er(e){var n=M(e,"root",{},"_root"),r=xr(e),t=L(x(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=i});var a=kr(e)+1;f(e.children(),function(o){ze(e,n,i,a,t,r,o)}),e.graph().nodeRankFactor=i}function ze(e,n,r,t,i,a,o){var s=e.children(o);if(!s.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var u=Ee(e,"_bt"),d=Ee(e,"_bb"),h=e.node(o);e.setParent(u,o),h.borderTop=u,e.setParent(d,o),h.borderBottom=d,f(s,function(c){ze(e,n,r,t,i,a,c);var l=e.node(c),v=l.borderTop?l.borderTop:c,p=l.borderBottom?l.borderBottom:c,g=l.borderTop?t:2*t,P=v!==p?1:i-a[o]+1;e.setEdge(u,v,{weight:g,minlen:P,nestingEdge:!0}),e.setEdge(p,d,{weight:g,minlen:P,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,u,{weight:0,minlen:i+a[o]})}function xr(e){var n={};function r(t,i){var a=e.children(t);a&&a.length&&f(a,function(o){r(o,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function kr(e){return D(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function yr(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Lr(e,n,r){var t={},i;f(r,function(a){for(var o=e.parent(a),s,u;o;){if(s=e.parent(o),s?(u=t[s],t[s]=o):(u=i,i=o),u&&u!==o){n.setEdge(u,o);return}o=s}})}function Nr(e,n,r){var t=Cr(e),i=new _({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return e.node(a)});return f(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||t),f(e[r](a),function(u){var d=u.v===a?u.w:u.v,h=i.edge(d,a),c=w(h)?0:h.weight;i.setEdge(d,a,{weight:e.edge(u).weight+c})}),b(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),i}function Cr(e){for(var n;e.hasNode(n=ue("_root")););return n}function Or(e,n){for(var r=0,t=1;t0;)h%2&&(c+=s[h+1]),h=h-1>>1,s[h]+=d.weight;u+=d.weight*c})),u}function Mr(e){var n={},r=E(e.nodes(),function(s){return!e.children(s).length}),t=L(m(r,function(s){return e.node(s).rank})),i=m(C(t+1),function(){return[]});function a(s){if(!b(n,s)){n[s]=!0;var u=e.node(s);i[u.rank].push(s),f(e.successors(s),a)}}var o=B(r,function(s){return e.node(s).rank});return f(o,a),i}function Pr(e,n){return m(n,function(r){var t=e.inEdges(r);if(t.length){var i=D(t,function(a,o){var s=e.edge(o),u=e.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Tr(e,n){var r={};f(e,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};w(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),f(n.edges(),function(i){var a=r[i.v],o=r[i.w];!w(a)&&!w(o)&&(o.indegree++,a.out.push(r[i.w]))});var t=E(r,function(i){return!i.indegree});return Fr(t)}function Fr(e){var n=[];function r(a){return function(o){o.merged||(w(o.barycenter)||w(a.barycenter)||o.barycenter>=a.barycenter)&&Ir(a,o)}}function t(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return m(E(n,function(a){return!a.merged}),function(a){return G(a,["vs","i","barycenter","weight"])})}function Ir(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Sr(e,n){var r=Zn(e,function(h){return b(h,"barycenter")}),t=r.lhs,i=B(r.rhs,function(h){return-h.i}),a=[],o=0,s=0,u=0;t.sort(Ar(!!n)),u=Ne(a,i,u),f(t,function(h){u+=h.vs.length,a.push(h.vs),o+=h.barycenter*h.weight,s+=h.weight,u=Ne(a,i,u)});var d={vs:V(a)};return s&&(d.barycenter=o/s,d.weight=s),d}function Ne(e,n,r){for(var t;n.length&&(t=j(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Ar(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Ue(e,n,r,t){var i=e.children(n),a=e.node(n),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=E(i,function(p){return p!==o&&p!==s}));var d=Pr(e,i);f(d,function(p){if(e.children(p.v).length){var g=Ue(e,p.v,r,t);u[p.v]=g,b(g,"barycenter")&&Dr(p,g)}});var h=Tr(d,r);Vr(h,u);var c=Sr(h,t);if(o&&(c.vs=V([o,c.vs,s]),e.predecessors(o).length)){var l=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(s)[0]);b(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+l.order+v.order)/(c.weight+2),c.weight+=2}return c}function Vr(e,n){f(e,function(r){r.vs=V(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Dr(e,n){w(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function Br(e){var n=Ae(e),r=Ce(e,C(1,n+1),"inEdges"),t=Ce(e,C(n-1,-1,-1),"outEdges"),i=Mr(e);Oe(e,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){Gr(s%2?r:t,s%4>=2),i=z(e);var d=Or(e,i);do||s>n[u].lim));for(d=u,u=t;(u=e.parent(u))!==d;)a.push(u);return{path:i.concat(a.reverse()),lca:d}}function $r(e){var n={},r=0;function t(i){var a=r;f(e.children(i),t),n[i]={low:a,lim:r++}}return f(e.children(),t),n}function qr(e,n){var r={};function t(i,a){var o=0,s=0,u=i.length,d=j(a);return f(a,function(h,c){var l=zr(e,h),v=l?e.node(l).order:u;(l||h===d)&&(f(a.slice(s,c+1),function(p){f(e.predecessors(p),function(g){var P=e.node(g),ce=P.order;(ced)&&Xe(r,l,h)})})}function i(a,o){var s=-1,u,d=0;return f(o,function(h,c){if(e.node(h).dummy==="border"){var l=e.predecessors(h);l.length&&(u=e.node(l[0]).order,t(o,d,c,s,u),d=c,s=u)}t(o,d,o.length,u,a.length)}),o}return D(n,i),r}function zr(e,n){if(e.node(n).dummy)return ie(e.predecessors(n),function(r){return e.node(r).dummy})}function Xe(e,n,r){if(n>r){var t=n;n=r,r=t}var i=e[n];i||(e[n]=i={}),i[r]=!0}function Ur(e,n,r){if(n>r){var t=n;n=r,r=t}return b(e[n],r)}function Xr(e,n,r,t){var i={},a={},o={};return f(n,function(s){f(s,function(u,d){i[u]=u,a[u]=u,o[u]=d})}),f(n,function(s){var u=-1;f(s,function(d){var h=t(d);if(h.length){h=B(h,function(g){return o[g]});for(var c=(h.length-1)/2,l=Math.floor(c),v=Math.ceil(c);l<=v;++l){var p=h[l];a[d]===d&&ut?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o>>1;e(u[h],c)<0?o=h+1:l=h}while(o>>1;e(u[h],c)<=0?o=h+1:l=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?J:Pn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:zn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=Q[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Bn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Gn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?On:Gn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Un(){return Xn()(A,A)}function Yn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Zn(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Yn(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},cn.apply(n,arguments),Zn(n)}export{Vn as a,_ as b,Un as c,Hn as l,Nn as t}; diff --git a/backend/web/assets/linear-e4d2c5e8.js b/backend/web/assets/linear-e4d2c5e8.js deleted file mode 100644 index 774097f4..00000000 --- a/backend/web/assets/linear-e4d2c5e8.js +++ /dev/null @@ -1 +0,0 @@ -import{a4 as un,a5 as I,a6 as U,a7 as Y,a8 as fn}from"./EchartsRenderer-3d08027d.js";import{i as cn}from"./init-77b53fdd.js";function F(n,t){return n==null||t==null?NaN:nt?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,l=u.length){if(o>>1;e(u[h],c)<0?o=h+1:l=h}while(o>>1;e(u[h],c)<=0?o=h+1:l=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function sn(n){return n===null?NaN:+n}const ln=_(F),dn=ln.right;_(sn).center;const gn=dn,yn=Math.sqrt(50),Mn=Math.sqrt(10),pn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=yn?10:f>=Mn?5:f>=pn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function Pn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function zn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var $n=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=$n.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Fn(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Rn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:jn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Rn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function En(n){var t=n.grouping===void 0||n.thousands===void 0?J:Pn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:zn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var s=h.fill,p=h.align,y=h.sign,S=h.symbol,k=h.zero,b=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||s==="0"&&p==="=")&&(k=!0,s="0",p="=");var en=S==="$"?e:S==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=S==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=Fn(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function l(h,s){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(s)/3)))*3,S=Math.pow(10,-y),k=Q[8+y/3];return function(b){return p(S*b)+k}}return{format:o,formatPrefix:l}}var $,tn,rn;Dn({thousands:",",grouping:[3],currency:["$",""]});function Dn(n){return $=En(n),tn=$.format,rn=$.formatPrefix,$}function Tn(n){return Math.max(0,-v(Math.abs(n)))}function In(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function Ln(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function qn(n){return function(){return n}}function Cn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:qn(isNaN(t)?NaN:.5)}function Bn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Gn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?On:Gn,c=o=null,h}function h(s){return s==null||isNaN(s=+s)?f:(c||(c=u(n.map(r),t,e)))(r(a(s)))}return h.invert=function(s){return a(i((o||(o=u(t,n.map(r),I)))(s)))},h.domain=function(s){return arguments.length?(n=Array.from(s,Cn),l()):n.slice()},h.range=function(s){return arguments.length?(t=Array.from(s),l()):t.slice()},h.rangeRound=function(s){return t=Array.from(s),e=bn,l()},h.clamp=function(s){return arguments.length?(a=s?!0:A,l()):a!==A},h.interpolate=function(s){return arguments.length?(e=s,l()):e},h.unknown=function(s){return arguments.length?(f=s,h):f},function(s,p){return r=s,i=p,l()}}function Un(){return Xn()(A,A)}function Yn(n,t,e,r){var i=Nn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=In(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=Ln(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Tn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Zn(n){var t=n.domain;return n.ticks=function(e){var r=t();return wn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Yn(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,l=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Hn(){var n=Un();return n.copy=function(){return Vn(n,Hn())},cn.apply(n,arguments),Zn(n)}export{Vn as a,_ as b,Un as c,Hn as l,Nn as t}; diff --git a/backend/web/assets/mindmap-definition-57868176-9f488f05.js b/backend/web/assets/mindmap-definition-57868176-3f6fc2a7.js similarity index 99% rename from backend/web/assets/mindmap-definition-57868176-9f488f05.js rename to backend/web/assets/mindmap-definition-57868176-3f6fc2a7.js index 1f26e32b..80d3b118 100644 --- a/backend/web/assets/mindmap-definition-57868176-9f488f05.js +++ b/backend/web/assets/mindmap-definition-57868176-3f6fc2a7.js @@ -1,4 +1,4 @@ -import{j as Ep,i as sn,o as qr,n as ti,z as wp,ai as xp,aj as Tp,ak as Cp}from"./EchartsRenderer-3d08027d.js";import{c as Dp}from"./createText-3b1f58a4-cf050b71.js";import{aP as Da,b3 as _u}from"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";var Uu={exports:{}};(function(pe,le){(function(ee,ce){pe.exports=ce()})(Da,function(){function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(t)}function ce(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,a=new Array(e);rt.length)&&(e=t.length);for(var r=0,a=new Array(e);r"u"?null:window,V=D?D.navigator:null;D&&D.document;var _=ee(""),Q=ee({}),ne=ee(function(){}),oe=typeof HTMLElement>"u"?"undefined":ee(HTMLElement),J=function(e){return e&&e.instanceString&&Y(e.instanceString)?e.instanceString():null},j=function(e){return e!=null&&ee(e)==_},Y=function(e){return e!=null&&ee(e)===ne},te=function(e){return!de(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},L=function(e){return e!=null&&ee(e)===Q&&!te(e)&&e.constructor===Object},$=function(e){return e!=null&&ee(e)===Q},R=function(e){return e!=null&&ee(e)===ee(1)&&!isNaN(e)},W=function(e){return R(e)&&Math.floor(e)===e},fe=function(e){if(oe!=="undefined")return e!=null&&e instanceof HTMLElement},de=function(e){return Ae(e)||Ne(e)},Ae=function(e){return J(e)==="collection"&&e._private.single},Ne=function(e){return J(e)==="collection"&&!e._private.single},_e=function(e){return J(e)==="core"},tt=function(e){return J(e)==="stylesheet"},vt=function(e){return J(e)==="event"},Pe=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},$e=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Xe=function(e){return L(e)&&R(e.x1)&&R(e.x2)&&R(e.y1)&&R(e.y2)},rt=function(e){return $(e)&&Y(e.then)},lt=function(){return V&&V.userAgent.match(/msie|trident|edge/i)},at=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},ju=function(e,r){return-1*ji(e,r)},Ue=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(y-=1),y<1/6?v+(p-v)*6*y:y<1/2?p:y<2/3?v+(p-v)*(2/3-y)*6:v}var h=new RegExp("^"+un+"$").exec(e);if(h){if(a=parseInt(h[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(h[2]),n<0||n>100||(n=n/100,i=parseFloat(h[3]),i<0||i>100)||(i=i/100,s=h[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,d=2*i-c;o=Math.round(255*f(d,c,a+1/3)),l=Math.round(255*f(d,c,a)),u=Math.round(255*f(d,c,a-1/3))}r=[o,l,u,s]}return r},rl=function(e){var r,a=new RegExp("^"+dr+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},al=function(e){return il[e.toLowerCase()]},nl=function(e){return(te(e)?e:null)||al(e)||el(e)||rl(e)||tl(e)},il={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]},es=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i=e||x<0||h&&I>=i}function g(){var A=ri();if(y(A))return m(A);o=setTimeout(g,p(A))}function m(A){return o=void 0,c&&a?d(A):(a=n=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function E(){return o===void 0?s:m(ri())}function N(){var A=ri(),x=y(A);if(a=arguments,n=this,l=A,x){if(o===void 0)return v(l);if(h)return clearTimeout(o),o=setTimeout(g,e),d(l)}return o===void 0&&(o=setTimeout(g,e)),s}return N.cancel=b,N.flush=E,N}var fn=Ul,ai=D?D.performance:null,os=ai&&ai.now?function(){return ai.now()}:function(){return Date.now()},Yl=function(){if(D){if(D.requestAnimationFrame)return function(t){D.requestAnimationFrame(t)};if(D.mozRequestAnimationFrame)return function(t){D.mozRequestAnimationFrame(t)};if(D.webkitRequestAnimationFrame)return function(t){D.webkitRequestAnimationFrame(t)};if(D.msRequestAnimationFrame)return function(t){D.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(os())},1e3/60)}}(),hn=function(e){return Yl(e)},gr=os,Jr=9261,us=65599,Na=5381,ls=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr,a=r,n;n=e.next(),!n.done;)a=a*us+n.value|0;return a},Ma=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jr;return r*us+e|0},Ia=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Na;return(r<<5)+r+e|0},Hl=function(e,r){return e*2097152+r},wr=function(e){return e[0]*2097152+e[1]},cn=function(e,r){return[Ma(e[0],r[0]),Ia(e[1],r[1])]},Xl=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0&&!(e[n]===r&&(e.splice(n,1),a));n--);},si=function(e){e.splice(0,e.length)},jl=function(e,r){for(var a=0;a"u"?"undefined":ee(Set))!==tf?Set:rf,dn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!_e(e)){Tt("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Tt("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new jr,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.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(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];te(r.classes)?u=r.classes:j(r.classes)&&(u=r.classes.split(/\s+/));for(var f=0,h=u.length;fm?1:0},f=function(g,m,b,E,N){var A;if(b==null&&(b=0),N==null&&(N=a),b<0)throw new Error("lo must be non-negative");for(E==null&&(E=g.length);bF;0<=F?C++:C--)I.push(C);return I}).apply(this).reverse(),x=[],E=0,N=A.length;Ez;0<=z?++I:--I)M.push(s(g,b));return M},p=function(g,m,b,E){var N,A,x;for(E==null&&(E=a),N=g[b];b>m;){if(x=b-1>>1,A=g[x],E(N,A)<0){g[b]=A,b=x;continue}break}return g[b]=N},y=function(g,m,b){var E,N,A,x,I;for(b==null&&(b=a),N=g.length,I=m,A=g[m],E=2*m+1;E0;){var A=m.pop(),x=y(A),I=A.id();if(c[I]=x,x!==1/0)for(var C=A.neighborhood().intersect(v),F=0;F0)for(ie.unshift(Z);h[ge];){var se=h[ge];ie.unshift(se.edge),ie.unshift(se.node),ue=se.node,ge=ue.id()}return o.spawn(ie)}}}},of={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=function(E){for(var N=0;N0;){if(N(),x++,E===f){for(var I=[],C=i,F=f,z=g[F];I.unshift(C),z!=null&&I.unshift(z),C=y[F],C!=null;)F=C.id(),z=g[F];return{found:!0,distance:h[E],path:this.spawn(I),steps:x}}d[E]=!0;for(var M=b._private.edges,X=0;Xz&&(v[F]=z,m[F]=C,b[F]=N),!i){var M=C*f+I;!i&&v[M]>z&&(v[M]=z,m[M]=I,b[M]=N)}}}for(var X=0;X1&&arguments[1]!==void 0?arguments[1]:s,je=b(ke),Ze=[],Ye=je;;){if(Ye==null)return r.spawn();var ct=m(Ye),De=ct.edge,k=ct.pred;if(Ze.unshift(Ye[0]),Ye.same(ze)&&Ze.length>0)break;De!=null&&Ze.unshift(De),Ye=k}return l.spawn(Ze)},A=0;A=0;f--){var h=u[f],c=h[1],d=h[2];(r[c]===o&&r[d]===l||r[c]===l&&r[d]===o)&&u.splice(f,1)}for(var v=0;vn;){var i=Math.floor(Math.random()*r.length);r=gf(i,e,r),a--}return r},pf={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(ie){return ie.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/df);if(i<2){Tt("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],f=0;f1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,d){return c-d});var f=e.length,h=Math.floor(f/2);return f%2!==0?e[h+1+o]:(e[h-1+o]+e[h+o])/2},xf=function(e){return Math.PI*e/180},pn=function(e,r){return Math.atan2(r,e)-Math.PI/2},ui=Math.log2||function(t){return Math.log(t)/Math.log(2)},bs=function(e){return e>0?1:e<0?-1:0},Br=function(e,r){return Math.sqrt(Fr(e,r))},Fr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},Tf=function(e){for(var r=e.length,a=0,n=0;n=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(e.w!=null&&e.h!=null&&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}}},Df=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Sf=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Lf=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},Af=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},yn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},li=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=w(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Es=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},fi=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},ra=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},Of=function(e,r){return ra(e,r.x,r.y)},ws=function(e,r){return ra(e,r.x1,r.y1)&&ra(e,r.x2,r.y2)},xs=function(e,r,a,n,i,s,o){var l=za(i,s),u=i/2,f=s/2,h;{var c=a-u+l-o,d=n-f-o,v=a+u-l+o,p=d;if(h=Cr(e,r,a,n,c,d,v,p,!1),h.length>0)return h}{var y=a+u+o,g=n-f+l-o,m=y,b=n+f-l+o;if(h=Cr(e,r,a,n,y,g,m,b,!1),h.length>0)return h}{var E=a-u+l-o,N=n+f+o,A=a+u-l+o,x=N;if(h=Cr(e,r,a,n,E,N,A,x,!1),h.length>0)return h}{var I=a-u-o,C=n-f+l-o,F=I,z=n+f-l+o;if(h=Cr(e,r,a,n,I,C,F,z,!1),h.length>0)return h}var M;{var X=a-u+l,B=n-f+l;if(M=Ba(e,r,a,n,X,B,l+o),M.length>0&&M[0]<=X&&M[1]<=B)return[M[0],M[1]]}{var re=a+u-l,q=n-f+l;if(M=Ba(e,r,a,n,re,q,l+o),M.length>0&&M[0]>=re&&M[1]<=q)return[M[0],M[1]]}{var Z=a+u-l,ie=n+f-l;if(M=Ba(e,r,a,n,Z,ie,l+o),M.length>0&&M[0]>=Z&&M[1]>=ie)return[M[0],M[1]]}{var ue=a-u+l,ge=n+f-l;if(M=Ba(e,r,a,n,ue,ge,l+o),M.length>0&&M[0]<=ue&&M[1]>=ge)return[M[0],M[1]]}return[]},Nf=function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),f=Math.max(a,i),h=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=f+l&&h-l<=r&&r<=c+l},Mf=function(e,r,a,n,i,s,o,l,u){var f={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ef.x2||rf.y2)},If=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},Rf=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,f,h,c,d,v;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,d=r/3,o>0){h=u+Math.sqrt(o),h=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+h+c,d+=(h+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+h)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,o===0){v=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+2*v,i[4]=i[2]=-(v+d);return}l=-l,f=l*l*l,f=Math.acos(u/Math.sqrt(f)),v=2*Math.sqrt(l),i[0]=-d+v*Math.cos(f/3),i[2]=-d+v*Math.cos((f+2*Math.PI)/3),i[4]=-d+v*Math.cos((f+4*Math.PI)/3)},kf=function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,f=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,h=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,d=[];Rf(u,f,h,c,d);for(var v=1e-7,p=[],y=0;y<6;y+=2)Math.abs(d[y+1])=0&&d[y]<=1&&p.push(d[y]);p.push(1),p.push(0);for(var g=-1,m,b,E,N=0;N=0?Eu?(e-i)*(e-i)+(r-s)*(r-s):f-c},Ht=function(e,r,a){for(var n,i,s,o,l,u=0,f=0;f=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},pr=function(e,r,a,n,i,s,o,l,u){var f=new Array(a.length),h;l[0]!=null?(h=Math.atan(l[1]/l[0]),l[0]<0?h=h+Math.PI/2:h=-h-Math.PI/2):h=l;for(var c=Math.cos(-h),d=Math.sin(-h),v=0;v0){var y=Cs(f,-u);p=Ts(y)}else p=f;return Ht(e,r,p)},Bf=function(e,r,a,n,i,s,o){for(var l=new Array(a.length),u=s/2,f=o/2,h=vi(s,o),c=h*h,d=0;d=0&&y<=1&&m.push(y),g>=0&&g<=1&&m.push(g),m.length===0)return[];var b=m[0]*l[0]+e,E=m[0]*l[1]+r;if(m.length>1){if(m[0]==m[1])return[b,E];var N=m[1]*l[0]+e,A=m[1]*l[1]+r;return[b,E,N,A]}else return[b,E]},hi=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Cr=function(e,r,a,n,i,s,o,l,u){var f=e-i,h=a-e,c=o-i,d=r-s,v=n-r,p=l-s,y=c*d-p*f,g=h*d-v*f,m=p*h-c*v;if(m!==0){var b=y/m,E=g/m,N=.001,A=0-N,x=1+N;return A<=b&&b<=x&&A<=E&&E<=x?[e+b*h,r+b*v]:u?[e+b*h,r+b*v]:[]}else return y===0||g===0?hi(e,a,o)===o?[o,l]:hi(e,a,i)===i?[i,s]:hi(i,o,a)===a?[a,n]:[]:[]},Fa=function(e,r,a,n,i,s,o,l){var u=[],f,h=new Array(a.length),c=!0;s==null&&(c=!1);var d;if(c){for(var v=0;v0){var p=Cs(h,-l);d=Ts(p)}else d=h}else d=a;for(var y,g,m,b,E=0;E2){for(var q=[u[0],u[1]],Z=Math.pow(q[0]-e,2)+Math.pow(q[1]-r,2),ie=1;ief&&(f=E)},get:function(b){return u[b]}},c=0;c0?q=re.edgesTo(B)[0]:q=B.edgesTo(re)[0];var Z=n(q);B=B.id(),I[B]>I[M]+Z&&(I[B]=I[M]+Z,C.nodes.indexOf(B)<0?C.push(B):C.updateItem(B),x[B]=0,A[B]=[]),I[B]==I[M]+Z&&(x[B]=x[B]+x[M],A[B].push(M))}else for(var ie=0;ie0;){for(var ve=N.pop(),ye=0;ye0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},Jf=function(e,r){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:th,o=n,l,u,f=0;f=2?Ga(e,r,a,0,Rs,rh):Ga(e,r,a,0,Is)},squaredEuclidean:function(e,r,a){return Ga(e,r,a,0,Rs)},manhattan:function(e,r,a){return Ga(e,r,a,0,Is)},max:function(e,r,a){return Ga(e,r,a,-1/0,ah)}};ia["squared-euclidean"]=ia.squaredEuclidean,ia.squaredeuclidean=ia.squaredEuclidean;function bn(t,e,r,a,n,i){var s;return Y(t)?s=t:s=ia[t]||ia.euclidean,e===0&&Y(t)?s(n,i):s(e,r,a,n,i)}var nh=At({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),pi=function(e){return nh(e)},En=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(h){return a[h]}:function(h){return n[h](a)},l=function(c){return n[c](r)},u=a,f=r;return bn(e,n.length,o,l,u,f)},yi=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;ua)return!1}return!0},oh=function(e,r,a){for(var n=0;no&&(o=r[u][f],l=f);i[l].push(e[u])}for(var h=0;h=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var v=r[s],p=r[n[s]],y;i.mode==="dendrogram"?y={left:v,right:p,key:v.key}:y={value:v.value.concat(p.value),key:v.key},e[v.index]=y,e.splice(p.index,1),r[v.key]=y;for(var g=0;ga[p.key][m.key]&&(l=a[p.key][m.key])):i.linkage==="max"?(l=a[v.key][m.key],a[v.key][m.key]0&&n.push(i);return n},Vs=function(e,r,a){for(var n=[],i=0;io&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var f=0;fu&&(l=f,u=h)}a[i]=s[l]}return n=Vs(e,r,a),n},_s=function(e){for(var r=this.cy(),a=this.nodes(),n=wh(e),i={},s=0;s=z?(M=z,z=B,X=re):B>M&&(M=B);for(var q=0;q0?1:0;x[C%n.minIterations*o+ve]=ye,se+=ye}if(se>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var Te=0,be=0;be1||A>1)&&(o=!0),h[b]=[],m.outgoers().forEach(function(I){I.isEdge()&&h[b].push(I.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var E=m.degree(!0);E%2&&(l?u?o=!0:u=b:l=b),h[b]=[],m.connectedEdges().forEach(function(N){return h[b].push(N.id())})}else c[b]=[m.source().id(),m.target().id()]});var d={found:!1,trail:void 0};if(o)return d;if(u&&l)if(i){if(f&&u!=f)return d;f=u}else{if(f&&u!=f&&l!=f)return d;f||(f=u)}else f||(f=s[0].id());var v=function(b){for(var E=b,N=[b],A,x,I;h[E].length;)A=h[E].shift(),x=c[A][0],I=c[A][1],E!=I?(h[I]=h[I].filter(function(C){return C!=A}),E=I):!i&&E!=x&&(h[x]=h[x].filter(function(C){return C!=A}),E=x),N.unshift(A),N.unshift(E);return N},p=[],y=[];for(y=v(f);y.length!=1;)h[y[0]].length==0?(p.unshift(s.getElementById(y.shift())),p.unshift(s.getElementById(y.shift()))):y=v(y.shift()).concat(y);p.unshift(s.getElementById(y.shift()));for(var g in h)if(h[g].length)return d;return d.found=!0,d.trail=this.spawn(p,!0),d}},xn=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=function(c,d){for(var v=s.length-1,p=[],y=e.spawn();s[v].x!=c||s[v].y!=d;)p.push(s.pop().edge),v--;p.push(s.pop().edge),p.forEach(function(g){var m=g.connectedNodes().intersection(e);y.merge(g),m.forEach(function(b){var E=b.id(),N=b.connectedEdges().intersection(e);y.merge(b),r[E].cutVertex?y.merge(N.filter(function(A){return A.isLoop()})):y.merge(N)})}),i.push(y)},u=function h(c,d,v){c===v&&(n+=1),r[d]={id:a,low:a++,cutVertex:!1};var p=e.getElementById(d).connectedEdges().intersection(e);if(p.size()===0)i.push(e.spawn(e.getElementById(d)));else{var y,g,m,b;p.forEach(function(E){y=E.source().id(),g=E.target().id(),m=y===d?g:y,m!==v&&(b=E.id(),o[b]||(o[b]=!0,s.push({x:d,y:m,edge:E})),m in r?r[d].low=Math.min(r[d].low,r[m].id):(h(c,m,d),r[d].low=Math.min(r[d].low,r[m].low),r[d].id<=r[m].low&&(r[d].cutVertex=!0,l(d,m))))})}};e.forEach(function(h){if(h.isNode()){var c=h.id();c in r||(n=0,u(c,c),r[c].cutVertex=n>1)}});var f=Object.keys(r).filter(function(h){return r[h].cutVertex}).map(function(h){return e.getElementById(h)});return{cut:e.spawn(f),components:i}},Oh={hopcroftTarjanBiconnected:xn,htbc:xn,htb:xn,hopcroftTarjanBiconnectedComponents:xn},Tn=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function l(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var f=e.getElementById(u).connectedEdges().intersection(e);if(f.forEach(function(p){var y=p.target().id();y!==u&&(y in r||l(y),r[y].explored||(r[u].low=Math.min(r[u].low,r[y].low)))}),r[u].index===r[u].low){for(var h=e.spawn();;){var c=i.pop();if(h.merge(e.getElementById(c)),r[c].low=r[u].index,r[c].explored=!0,c===u)break}var d=h.edgesWith(h),v=h.merge(d);n.push(v),s=s.difference(v)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},Nh={tarjanStronglyConnected:Tn,tsc:Tn,tscc:Tn,tarjanStronglyConnectedComponents:Tn},Us={};[Ra,sf,of,lf,hf,vf,pf,Vf,aa,na,gi,eh,vh,bh,Sh,Ah,Oh,Nh].forEach(function(t){Ue(Us,t)});/*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) diff --git a/backend/web/assets/pieDiagram-3fca7ce7-72c81148.js b/backend/web/assets/pieDiagram-3fca7ce7-29dfb0d5.js similarity index 64% rename from backend/web/assets/pieDiagram-3fca7ce7-72c81148.js rename to backend/web/assets/pieDiagram-3fca7ce7-29dfb0d5.js index 5f4fdb83..4b6c4bb9 100644 --- a/backend/web/assets/pieDiagram-3fca7ce7-72c81148.js +++ b/backend/web/assets/pieDiagram-3fca7ce7-29dfb0d5.js @@ -1,9 +1,9 @@ -import{Z as K,$ as ot,H as ht,I as ut,s as pt,g as ft,h as yt,f as gt,a0 as dt,J as _t,j as mt,i as nt,o as st,a1 as vt,Y as kt,p as bt,a2 as xt}from"./EchartsRenderer-3d08027d.js";import"./index-51905ea3.js";import{a as it}from"./arc-b31ff68c.js";import{o as St}from"./ordinal-ba9b4969.js";import{a as Et}from"./array-9f3ba611.js";import{c as z}from"./path-53f90ab3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./init-77b53fdd.js";function wt(t,c){return ct?1:c>=t?0:NaN}function At(t){return t}function $t(){var t=At,c=wt,_=null,d=z(0),w=z(K),x=z(0);function o(a){var u,h=(a=Et(a)).length,S,I,N=0,m=new Array(h),b=new Array(h),v=+d.apply(this,arguments),p=Math.min(K,Math.max(-K,w.apply(this,arguments)-v)),$,V=Math.min(Math.abs(p)/h,x.apply(this,arguments)),A=V*(p<0?-1:1),D;for(u=0;u0&&(N+=D);for(c!=null?m.sort(function(C,g){return c(b[C],b[g])}):_!=null&&m.sort(function(C,g){return _(a[C],a[g])}),u=0,I=N?(p-h*A)/N:0;u0?D*I:0)+A,b[S]={data:a[S],index:u,value:D,startAngle:v,endAngle:$,padAngle:V};return b}return o.value=function(a){return arguments.length?(t=typeof a=="function"?a:z(+a),o):t},o.sortValues=function(a){return arguments.length?(c=a,_=null,o):c},o.sort=function(a){return arguments.length?(_=a,c=null,o):_},o.startAngle=function(a){return arguments.length?(d=typeof a=="function"?a:z(+a),o):d},o.endAngle=function(a){return arguments.length?(w=typeof a=="function"?a:z(+a),o):w},o.padAngle=function(a){return arguments.length?(x=typeof a=="function"?a:z(+a),o):x},o}var Q=function(){var t=function(g,e,n,s){for(n=n||{},s=g.length;s--;n[g[s]]=e);return n},c=[1,4],_=[1,5],d=[1,6],w=[1,7],x=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],a=[2,5],u=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],S=[2,8],I=[1,18],N=[1,19],m=[1,20],b=[1,21],v=[1,22],p=[1,23],$=[1,28],V=[6,26,27,28,29],A={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement: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,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",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",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(e,n,s,r,l,i,T){var f=i.length-1;switch(l){case 4:r.setShowData(!0);break;case 7:this.$=i[f-1];break;case 9:r.addSection(i[f-1],r.cleanupValue(i[f]));break;case 10:this.$=i[f].trim(),r.setDiagramTitle(this.$);break;case 11:this.$=i[f].trim(),r.setAccTitle(this.$);break;case 12:case 13:this.$=i[f].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(i[f].substr(8)),this.$=i[f].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(i[f],"type_directive");break;case 23:i[f]=i[f].trim().replace(/'/g,'"'),r.parseDirective(i[f],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:c,21:8,26:_,27:d,28:w,29:x},{1:[3]},{3:10,4:2,5:3,6:c,21:8,26:_,27:d,28:w,29:x},{3:11,4:2,5:3,6:c,21:8,26:_,27:d,28:w,29:x},t(o,a,{7:12,8:[1,13]}),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(h,S,{21:8,9:16,10:17,5:24,1:[2,3],11:I,13:N,15:m,17:b,19:v,20:p,29:x}),t(o,a,{7:25}),{23:26,24:[1,27],32:$},t([24,32],[2,22]),t(o,[2,6]),{4:29,26:_,27:d,28:w},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),t(h,S,{21:8,9:16,10:17,5:24,1:[2,4],11:I,13:N,15:m,17:b,19:v,20:p,29:x}),t(V,[2,16]),{25:34,31:[1,35]},t(V,[2,24]),t(o,[2,7]),t(h,[2,9]),t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),{23:36,32:$},{32:[2,23]},t(V,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(e,n){if(n.recoverable)this.trace(e);else{var s=new Error(e);throw s.hash=n,s}},parse:function(e){var n=this,s=[0],r=[],l=[null],i=[],T=this.table,f="",R=0,M=0,B=2,tt=1,at=i.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(L.yy[Z]=this.yy[Z]);y.setInput(e,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var H=y.yylloc;i.push(H);var lt=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ct(){var P;return P=r.pop()||y.lex()||tt,typeof P!="number"&&(P instanceof Array&&(r=P,P=r.pop()),P=n.symbols_[P]||P),P}for(var k,F,E,J,j={},W,O,et,G;;){if(F=s[s.length-1],this.defaultActions[F]?E=this.defaultActions[F]:((k===null||typeof k>"u")&&(k=ct()),E=T[F]&&T[F][k]),typeof E>"u"||!E.length||!E[0]){var q="";G=[];for(W in T[F])this.terminals_[W]&&W>B&&G.push("'"+this.terminals_[W]+"'");y.showPosition?q="Parse error on line "+(R+1)+`: +import{$ as H,a0 as ot,I as ht,J as ut,s as pt,g as ft,i as yt,h as gt,a1 as dt,K as _t,k as mt,j as nt,p as st,a2 as vt,Z as kt,q as bt,a3 as xt}from"./TextOutput-39ff842e.js";import"./index-ef7aa48c.js";import{a as it}from"./arc-b070a76c.js";import{o as St}from"./ordinal-ba9b4969.js";import{a as Et}from"./array-9f3ba611.js";import{c as z}from"./path-53f90ab3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./init-77b53fdd.js";function wt(t,c){return ct?1:c>=t?0:NaN}function At(t){return t}function $t(){var t=At,c=wt,_=null,d=z(0),w=z(H),x=z(0);function o(a){var u,h=(a=Et(a)).length,S,I,N=0,m=new Array(h),b=new Array(h),v=+d.apply(this,arguments),p=Math.min(H,Math.max(-H,w.apply(this,arguments)-v)),$,V=Math.min(Math.abs(p)/h,x.apply(this,arguments)),A=V*(p<0?-1:1),D;for(u=0;u0&&(N+=D);for(c!=null?m.sort(function(C,g){return c(b[C],b[g])}):_!=null&&m.sort(function(C,g){return _(a[C],a[g])}),u=0,I=N?(p-h*A)/N:0;u0?D*I:0)+A,b[S]={data:a[S],index:u,value:D,startAngle:v,endAngle:$,padAngle:V};return b}return o.value=function(a){return arguments.length?(t=typeof a=="function"?a:z(+a),o):t},o.sortValues=function(a){return arguments.length?(c=a,_=null,o):c},o.sort=function(a){return arguments.length?(_=a,c=null,o):_},o.startAngle=function(a){return arguments.length?(d=typeof a=="function"?a:z(+a),o):d},o.endAngle=function(a){return arguments.length?(w=typeof a=="function"?a:z(+a),o):w},o.padAngle=function(a){return arguments.length?(x=typeof a=="function"?a:z(+a),o):x},o}var Q=function(){var t=function(g,e,n,s){for(n=n||{},s=g.length;s--;n[g[s]]=e);return n},c=[1,4],_=[1,5],d=[1,6],w=[1,7],x=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],a=[2,5],u=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],S=[2,8],I=[1,18],N=[1,19],m=[1,20],b=[1,21],v=[1,22],p=[1,23],$=[1,28],V=[6,26,27,28,29],A={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement: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,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",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",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(e,n,s,r,l,i,T){var f=i.length-1;switch(l){case 4:r.setShowData(!0);break;case 7:this.$=i[f-1];break;case 9:r.addSection(i[f-1],r.cleanupValue(i[f]));break;case 10:this.$=i[f].trim(),r.setDiagramTitle(this.$);break;case 11:this.$=i[f].trim(),r.setAccTitle(this.$);break;case 12:case 13:this.$=i[f].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(i[f].substr(8)),this.$=i[f].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(i[f],"type_directive");break;case 23:i[f]=i[f].trim().replace(/'/g,'"'),r.parseDirective(i[f],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:c,21:8,26:_,27:d,28:w,29:x},{1:[3]},{3:10,4:2,5:3,6:c,21:8,26:_,27:d,28:w,29:x},{3:11,4:2,5:3,6:c,21:8,26:_,27:d,28:w,29:x},t(o,a,{7:12,8:[1,13]}),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(h,S,{21:8,9:16,10:17,5:24,1:[2,3],11:I,13:N,15:m,17:b,19:v,20:p,29:x}),t(o,a,{7:25}),{23:26,24:[1,27],32:$},t([24,32],[2,22]),t(o,[2,6]),{4:29,26:_,27:d,28:w},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),t(h,S,{21:8,9:16,10:17,5:24,1:[2,4],11:I,13:N,15:m,17:b,19:v,20:p,29:x}),t(V,[2,16]),{25:34,31:[1,35]},t(V,[2,24]),t(o,[2,7]),t(h,[2,9]),t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),{23:36,32:$},{32:[2,23]},t(V,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(e,n){if(n.recoverable)this.trace(e);else{var s=new Error(e);throw s.hash=n,s}},parse:function(e){var n=this,s=[0],r=[],l=[null],i=[],T=this.table,f="",R=0,M=0,Y=2,tt=1,at=i.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(L.yy[Z]=this.yy[Z]);y.setInput(e,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var q=y.yylloc;i.push(q);var lt=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ct(){var P;return P=r.pop()||y.lex()||tt,typeof P!="number"&&(P instanceof Array&&(r=P,P=r.pop()),P=n.symbols_[P]||P),P}for(var k,F,E,J,j={},W,O,et,G;;){if(F=s[s.length-1],this.defaultActions[F]?E=this.defaultActions[F]:((k===null||typeof k>"u")&&(k=ct()),E=T[F]&&T[F][k]),typeof E>"u"||!E.length||!E[0]){var K="";G=[];for(W in T[F])this.terminals_[W]&&W>Y&&G.push("'"+this.terminals_[W]+"'");y.showPosition?K="Parse error on line "+(R+1)+`: `+y.showPosition()+` -Expecting `+G.join(", ")+", got '"+(this.terminals_[k]||k)+"'":q="Parse error on line "+(R+1)+": Unexpected "+(k==tt?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(q,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:H,expected:G})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+k);switch(E[0]){case 1:s.push(k),l.push(y.yytext),i.push(y.yylloc),s.push(E[1]),k=null,M=y.yyleng,f=y.yytext,R=y.yylineno,H=y.yylloc;break;case 2:if(O=this.productions_[E[1]][1],j.$=l[l.length-O],j._$={first_line:i[i.length-(O||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(O||1)].first_column,last_column:i[i.length-1].last_column},lt&&(j._$.range=[i[i.length-(O||1)].range[0],i[i.length-1].range[1]]),J=this.performAction.apply(j,[f,M,R,L.yy,E[1],l,i].concat(at)),typeof J<"u")return J;O&&(s=s.slice(0,-1*O*2),l=l.slice(0,-1*O),i=i.slice(0,-1*O)),s.push(this.productions_[E[1]][0]),l.push(j.$),i.push(j._$),et=T[s[s.length-2]][s[s.length-1]],s.push(et);break;case 3:return!0}}return!0}},D=function(){var g={EOF:1,parseError:function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw new Error(n)},setInput:function(e,n){return this.yy=n||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];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var n=e.match(/(?:\r\n?|\n).*/g);return n?(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 n=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),s.length-1&&(this.yylineno-=s.length-1);var l=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===r.length?this.yylloc.first_column:0)+r[r.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+G.join(", ")+", got '"+(this.terminals_[k]||k)+"'":K="Parse error on line "+(R+1)+": Unexpected "+(k==tt?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(K,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:q,expected:G})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+k);switch(E[0]){case 1:s.push(k),l.push(y.yytext),i.push(y.yylloc),s.push(E[1]),k=null,M=y.yyleng,f=y.yytext,R=y.yylineno,q=y.yylloc;break;case 2:if(O=this.productions_[E[1]][1],j.$=l[l.length-O],j._$={first_line:i[i.length-(O||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(O||1)].first_column,last_column:i[i.length-1].last_column},lt&&(j._$.range=[i[i.length-(O||1)].range[0],i[i.length-1].range[1]]),J=this.performAction.apply(j,[f,M,R,L.yy,E[1],l,i].concat(at)),typeof J<"u")return J;O&&(s=s.slice(0,-1*O*2),l=l.slice(0,-1*O),i=i.slice(0,-1*O)),s.push(this.productions_[E[1]][0]),l.push(j.$),i.push(j._$),et=T[s[s.length-2]][s[s.length-1]],s.push(et);break;case 3:return!0}}return!0}},D=function(){var g={EOF:1,parseError:function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw new Error(n)},setInput:function(e,n){return this.yy=n||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];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var n=e.match(/(?:\r\n?|\n).*/g);return n?(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 n=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),s.length-1&&(this.yylineno-=s.length-1);var l=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===r.length?this.yylloc.first_column:0)+r[r.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},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(),n=new Array(e.length+1).join("-");return e+this.upcomingInput()+` `+n+"^"},test_match:function(e,n){var s,r,l;if(this.options.backtrack_lexer&&(l={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&&(l.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(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],s=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var i in l)this[i]=l[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,n,s,r;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),i=0;in[0].length)){if(n=s,r=i,this.options.backtrack_lexer){if(e=this.test_match(s,l[i]),e!==!1)return e;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(e=this.test_match(n,l[r]),e!==!1?e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return n||this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){var n=this.conditionStack.length-1;return n>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(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(n){this.begin(n)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(n,s,r,l){switch(r){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\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:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return g}();A.lexer=D;function C(){this.yy={}}return C.prototype=A,A.Parser=C,new C}();Q.parser=Q;const Dt=Q,rt=ot.pie,U={sections:{},showData:!1,config:rt};let Y=U.sections,X=U.showData;const Tt=structuredClone(rt),It=()=>structuredClone(Tt),Vt=(t,c,_)=>{dt(void 0,t,c,_)},Ct=()=>{Y=structuredClone(U.sections),X=U.showData,_t()},Ot=(t,c)=>{t=mt(t,nt()),Y[t]===void 0&&(Y[t]=c,st.debug(`added new section: ${t}, with value: ${c}`))},Pt=()=>Y,Nt=t=>(t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())),Lt=t=>{X=t},Ft=()=>X,zt={getConfig:It,parseDirective:Vt,clear:Ct,setDiagramTitle:ht,getDiagramTitle:ut,setAccTitle:pt,getAccTitle:ft,setAccDescription:yt,getAccDescription:gt,addSection:Ot,getSections:Pt,cleanupValue:Nt,setShowData:Lt,getShowData:Ft},Rt=t=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return n||this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){var n=this.conditionStack.length-1;return n>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(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},pushState:function(n){this.begin(n)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(n,s,r,l){switch(r){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\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:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return g}();A.lexer=D;function C(){this.yy={}}return C.prototype=A,A.Parser=C,new C}();Q.parser=Q;const Dt=Q,rt=ot.pie,U={sections:{},showData:!1,config:rt};let B=U.sections,X=U.showData;const Tt=structuredClone(rt),It=()=>structuredClone(Tt),Vt=(t,c,_)=>{dt(void 0,t,c,_)},Ct=()=>{B=structuredClone(U.sections),X=U.showData,_t()},Ot=(t,c)=>{t=mt(t,nt()),B[t]===void 0&&(B[t]=c,st.debug(`added new section: ${t}, with value: ${c}`))},Pt=()=>B,Nt=t=>(t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())),Lt=t=>{X=t},Ft=()=>X,zt={getConfig:It,parseDirective:Vt,clear:Ct,setDiagramTitle:ht,getDiagramTitle:ut,setAccTitle:pt,getAccTitle:ft,setAccDescription:yt,getAccDescription:gt,addSection:Ot,getSections:Pt,cleanupValue:Nt,setShowData:Lt,getShowData:Ft},Rt=t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; @@ -32,4 +32,4 @@ Expecting `+G.join(", ")+", got '"+(this.terminals_[k]||k)+"'":q="Parse error on font-size: ${t.pieLegendTextSize}; } `,jt=Rt,Mt=t=>{const c=Object.entries(t).map(d=>({label:d[0],value:d[1]}));return $t().value(d=>d.value)(c)},Wt=(t,c,_,d)=>{var w,x;st.debug(`rendering pie chart -`+t);const o=d.db,a=nt(),u=vt(o.getConfig(),a.pie),h=450,S=((x=(w=document.getElementById(c))==null?void 0:w.parentElement)==null?void 0:x.offsetWidth)??u.useWidth,I=kt(c);I.attr("viewBox",`0 0 ${S} ${h}`),bt(I,h,S,u.useMaxWidth);const N=40,m=18,b=4,v=I.append("g");v.attr("transform","translate("+S/2+","+h/2+")");const{themeVariables:p}=a;let[$]=xt(p.pieOuterStrokeWidth);$??($=2);const V=u.textPosition,A=Math.min(S,h)/2-N,D=it().innerRadius(0).outerRadius(A),C=it().innerRadius(A*V).outerRadius(A*V);v.append("circle").attr("cx",0).attr("cy",0).attr("r",A+$/2).attr("class","pieOuterCircle");const g=o.getSections(),e=Mt(g),n=[p.pie1,p.pie2,p.pie3,p.pie4,p.pie5,p.pie6,p.pie7,p.pie8,p.pie9,p.pie10,p.pie11,p.pie12],s=St(n);v.selectAll("mySlices").data(e).enter().append("path").attr("d",D).attr("fill",i=>s(i.data.label)).attr("class","pieCircle");let r=0;Object.keys(g).forEach(i=>{r+=g[i]}),v.selectAll("mySlices").data(e).enter().append("text").text(i=>(i.data.value/r*100).toFixed(0)+"%").attr("transform",i=>"translate("+C.centroid(i)+")").style("text-anchor","middle").attr("class","slice"),v.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");const l=v.selectAll(".legend").data(s.domain()).enter().append("g").attr("class","legend").attr("transform",(i,T)=>{const f=m+b,R=f*s.domain().length/2,M=12*m,B=T*f-R;return"translate("+M+","+B+")"});l.append("rect").attr("width",m).attr("height",m).style("fill",s).style("stroke",s),l.data(e).append("text").attr("x",m+b).attr("y",m-b).text(i=>{const{label:T,value:f}=i.data;return o.getShowData()?`${T} [${f}]`:T})},Gt={draw:Wt},Qt={parser:Dt,db:zt,renderer:Gt,styles:jt};export{Qt as diagram}; +`+t);const o=d.db,a=nt(),u=vt(o.getConfig(),a.pie),h=450,S=((x=(w=document.getElementById(c))==null?void 0:w.parentElement)==null?void 0:x.offsetWidth)??u.useWidth,I=kt(c);I.attr("viewBox",`0 0 ${S} ${h}`),bt(I,h,S,u.useMaxWidth);const N=40,m=18,b=4,v=I.append("g");v.attr("transform","translate("+S/2+","+h/2+")");const{themeVariables:p}=a;let[$]=xt(p.pieOuterStrokeWidth);$??($=2);const V=u.textPosition,A=Math.min(S,h)/2-N,D=it().innerRadius(0).outerRadius(A),C=it().innerRadius(A*V).outerRadius(A*V);v.append("circle").attr("cx",0).attr("cy",0).attr("r",A+$/2).attr("class","pieOuterCircle");const g=o.getSections(),e=Mt(g),n=[p.pie1,p.pie2,p.pie3,p.pie4,p.pie5,p.pie6,p.pie7,p.pie8,p.pie9,p.pie10,p.pie11,p.pie12],s=St(n);v.selectAll("mySlices").data(e).enter().append("path").attr("d",D).attr("fill",i=>s(i.data.label)).attr("class","pieCircle");let r=0;Object.keys(g).forEach(i=>{r+=g[i]}),v.selectAll("mySlices").data(e).enter().append("text").text(i=>(i.data.value/r*100).toFixed(0)+"%").attr("transform",i=>"translate("+C.centroid(i)+")").style("text-anchor","middle").attr("class","slice"),v.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-(h-50)/2).attr("class","pieTitleText");const l=v.selectAll(".legend").data(s.domain()).enter().append("g").attr("class","legend").attr("transform",(i,T)=>{const f=m+b,R=f*s.domain().length/2,M=12*m,Y=T*f-R;return"translate("+M+","+Y+")"});l.append("rect").attr("width",m).attr("height",m).style("fill",s).style("stroke",s),l.data(e).append("text").attr("x",m+b).attr("y",m-b).text(i=>{const{label:T,value:f}=i.data;return o.getShowData()?`${T} [${f}]`:T})},Gt={draw:Wt},Qt={parser:Dt,db:zt,renderer:Gt,styles:jt};export{Qt as diagram}; diff --git a/backend/web/assets/quadrantDiagram-0ca4be02-1efcd4bd.js b/backend/web/assets/quadrantDiagram-0ca4be02-6c7c14fd.js similarity index 72% rename from backend/web/assets/quadrantDiagram-0ca4be02-1efcd4bd.js rename to backend/web/assets/quadrantDiagram-0ca4be02-6c7c14fd.js index 4be800a3..5eac7fd9 100644 --- a/backend/web/assets/quadrantDiagram-0ca4be02-1efcd4bd.js +++ b/backend/web/assets/quadrantDiagram-0ca4be02-6c7c14fd.js @@ -1,7 +1,7 @@ -import{a3 as Dt,i as _t,$ as I,o as ct,s as zt,g as Et,H as It,I as vt,f as Bt,h as Vt,m as wt,J as Rt,n as yt,p as Wt,j as Nt}from"./EchartsRenderer-3d08027d.js";import"./index-51905ea3.js";import{l as St}from"./linear-e4d2c5e8.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./init-77b53fdd.js";var qt=function(){var e=function(K,n,r,d){for(r=r||{},d=K.length;d--;r[K[d]]=n);return r},a=[1,3],c=[1,5],f=[1,6],g=[1,7],x=[1,8],h=[1,10],p=[1,5,14,16,18,20,21,26,28,29,30,31,32,38,39,40,41,47,48,50,51,52,53,54,55,56,57,58,59,60],s=[1,5,7,14,16,18,20,21,26,28,29,30,31,32,38,39,40,41,47,48,50,51,52,53,54,55,56,57,58,59,60],l=[38,39,40],y=[2,8],B=[1,19],W=[1,23],L=[1,24],C=[1,25],N=[1,26],M=[1,27],X=[1,29],D=[1,30],it=[1,31],at=[1,32],nt=[1,33],rt=[1,34],Q=[1,37],U=[1,38],T=[1,39],_=[1,40],t=[1,41],m=[1,42],b=[1,43],A=[1,44],S=[1,45],v=[1,46],k=[1,47],F=[1,48],P=[1,49],Tt=[1,52],O=[1,67],Y=[1,68],z=[5,23,27,38,39,40,50,51,52,53,54,55,56,57,58,59,60,61],ht=[5,7,38,39,40,41],dt={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,directive:6,QUADRANT:7,document:8,line:9,statement:10,axisDetails:11,quadrantDetails:12,points: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:21,text: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,openDirective:33,typeDirective:34,closeDirective:35,":":36,argDirective:37,NEWLINE:38,SEMI:39,EOF:40,open_directive:41,type_directive:42,arg_directive:43,close_directive:44,alphaNumToken:45,textNoTagsToken:46,STR:47,MD_STR:48,alphaNum:49,PUNCTUATION:50,AMP:51,NUM:52,ALPHA:53,COMMA:54,PLUS:55,EQUALS:56,MULT:57,DOT:58,BRKT:59,UNDERSCORE:60,MINUS:61,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",7:"QUADRANT",14:"title",15:"title_value",16:"acc_title",17:"acc_title_value",18:"acc_descr",19:"acc_descr_value",20:"acc_descr_multiline_value",21:"section",23:"point_start",24:"point_x",25:"point_y",26:"X-AXIS",27:"AXIS-TEXT-DELIMITER",28:"Y-AXIS",29:"QUADRANT_1",30:"QUADRANT_2",31:"QUADRANT_3",32:"QUADRANT_4",36:":",38:"NEWLINE",39:"SEMI",40:"EOF",41:"open_directive",42:"type_directive",43:"arg_directive",44:"close_directive",47:"STR",48:"MD_STR",50:"PUNCTUATION",51:"AMP",52:"NUM",53:"ALPHA",54:"COMMA",55:"PLUS",56:"EQUALS",57:"MULT",58:"DOT",59:"BRKT",60:"UNDERSCORE",61:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[10,0],[10,2],[10,1],[10,1],[10,1],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[13,4],[11,4],[11,3],[11,2],[11,4],[11,3],[11,2],[12,2],[12,2],[12,2],[12,2],[6,3],[6,5],[4,1],[4,1],[4,1],[33,1],[34,1],[37,1],[35,1],[22,1],[22,2],[22,1],[22,1],[49,1],[49,2],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,1],[46,1],[46,1]],performAction:function(n,r,d,o,q,i,et){var u=i.length-1;switch(q){case 13:this.$=i[u].trim(),o.setDiagramTitle(this.$);break;case 14:this.$=i[u].trim(),o.setAccTitle(this.$);break;case 15:case 16:this.$=i[u].trim(),o.setAccDescription(this.$);break;case 17:o.addSection(i[u].substr(8)),this.$=i[u].substr(8);break;case 19:o.addPoint(i[u-3],i[u-1],i[u]);break;case 20:o.setXAxisLeftText(i[u-2]),o.setXAxisRightText(i[u]);break;case 21:i[u-1].text+=" ⟶ ",o.setXAxisLeftText(i[u-1]);break;case 22:o.setXAxisLeftText(i[u]);break;case 23:o.setYAxisBottomText(i[u-2]),o.setYAxisTopText(i[u]);break;case 24:i[u-1].text+=" ⟶ ",o.setYAxisBottomText(i[u-1]);break;case 25:o.setYAxisBottomText(i[u]);break;case 26:o.setQuadrant1Text(i[u]);break;case 27:o.setQuadrant2Text(i[u]);break;case 28:o.setQuadrant3Text(i[u]);break;case 29:o.setQuadrant4Text(i[u]);break;case 35:o.parseDirective("%%{","open_directive");break;case 36:o.parseDirective(i[u],"type_directive");break;case 37:i[u]=i[u].trim().replace(/'/g,'"'),o.parseDirective(i[u],"arg_directive");break;case 38:o.parseDirective("}%%","close_directive","quadrantChart");break;case 39:this.$={text:i[u],type:"text"};break;case 40:this.$={text:i[u-1].text+""+i[u],type:i[u-1].type};break;case 41:this.$={text:i[u],type:"text"};break;case 42:this.$={text:i[u],type:"markdown"};break;case 43:this.$=i[u];break;case 44:this.$=i[u-1]+""+i[u];break}},table:[{3:1,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},{1:[3]},{3:11,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},{3:12,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},{3:13,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},e(p,[2,5],{8:14}),e(s,[2,32]),e(s,[2,33]),e(s,[2,34]),{34:15,42:[1,16]},{42:[2,35]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(l,y,{33:9,9:17,10:18,11:20,12:21,13:22,6:28,22:35,45:36,1:[2,4],5:B,14:W,16:L,18:C,20:N,21:M,26:X,28:D,29:it,30:at,31:nt,32:rt,41:h,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),{35:50,36:[1,51],44:Tt},e([36,44],[2,36]),e(p,[2,6]),{4:53,38:f,39:g,40:x},e(l,y,{33:9,11:20,12:21,13:22,6:28,22:35,45:36,10:54,5:B,14:W,16:L,18:C,20:N,21:M,26:X,28:D,29:it,30:at,31:nt,32:rt,41:h,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),e(l,[2,10]),e(l,[2,11]),e(l,[2,12]),{15:[1,55]},{17:[1,56]},{19:[1,57]},e(l,[2,16]),e(l,[2,17]),e(l,[2,18]),{22:58,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:59,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:60,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:61,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:62,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:63,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{5:O,23:[1,64],45:66,46:65,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y},e(z,[2,39]),e(z,[2,41]),e(z,[2,42]),e(z,[2,45]),e(z,[2,46]),e(z,[2,47]),e(z,[2,48]),e(z,[2,49]),e(z,[2,50]),e(z,[2,51]),e(z,[2,52]),e(z,[2,53]),e(z,[2,54]),e(z,[2,55]),e(ht,[2,30]),{37:69,43:[1,70]},e(ht,[2,38]),e(p,[2,7]),e(l,[2,9]),e(l,[2,13]),e(l,[2,14]),e(l,[2,15]),e(l,[2,22],{46:65,45:66,5:O,27:[1,71],50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,25],{46:65,45:66,5:O,27:[1,72],50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,26],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,27],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,28],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,29],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),{24:[1,73]},e(z,[2,40]),e(z,[2,56]),e(z,[2,57]),e(z,[2,58]),{35:74,44:Tt},{44:[2,37]},e(l,[2,21],{45:36,22:75,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),e(l,[2,24],{45:36,22:76,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),{25:[1,77]},e(ht,[2,31]),e(l,[2,20],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,23],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,19])],defaultActions:{10:[2,35],11:[2,1],12:[2,2],13:[2,3],70:[2,37]},parseError:function(n,r){if(r.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=r,d}},parse:function(n){var r=this,d=[0],o=[],q=[null],i=[],et=this.table,u="",st=0,mt=0,Ft=2,bt=1,Pt=i.slice.call(arguments,1),E=Object.create(this.lexer),J={yy:{}};for(var xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xt)&&(J.yy[xt]=this.yy[xt]);E.setInput(n,J.yy),J.yy.lexer=E,J.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ft=E.yylloc;i.push(ft);var Lt=E.options&&E.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(){var $;return $=o.pop()||E.lex()||bt,typeof $!="number"&&($ instanceof Array&&(o=$,$=o.pop()),$=r.symbols_[$]||$),$}for(var R,Z,H,gt,tt={},lt,j,At,ot;;){if(Z=d[d.length-1],this.defaultActions[Z]?H=this.defaultActions[Z]:((R===null||typeof R>"u")&&(R=Ct()),H=et[Z]&&et[Z][R]),typeof H>"u"||!H.length||!H[0]){var pt="";ot=[];for(lt in et[Z])this.terminals_[lt]&<>Ft&&ot.push("'"+this.terminals_[lt]+"'");E.showPosition?pt="Parse error on line "+(st+1)+`: +import{a4 as Dt,j as _t,a0 as I,p as ct,s as zt,g as Et,I as It,J as vt,h as Bt,i as Vt,m as wt,K as Rt,o as yt,q as Wt,k as Nt}from"./TextOutput-39ff842e.js";import"./index-ef7aa48c.js";import{l as St}from"./linear-7918616e.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./init-77b53fdd.js";var qt=function(){var e=function(K,n,r,d){for(r=r||{},d=K.length;d--;r[K[d]]=n);return r},a=[1,3],c=[1,5],f=[1,6],g=[1,7],x=[1,8],h=[1,10],p=[1,5,14,16,18,20,21,26,28,29,30,31,32,38,39,40,41,47,48,50,51,52,53,54,55,56,57,58,59,60],s=[1,5,7,14,16,18,20,21,26,28,29,30,31,32,38,39,40,41,47,48,50,51,52,53,54,55,56,57,58,59,60],l=[38,39,40],y=[2,8],B=[1,19],W=[1,23],L=[1,24],C=[1,25],N=[1,26],M=[1,27],X=[1,29],D=[1,30],it=[1,31],at=[1,32],nt=[1,33],rt=[1,34],Q=[1,37],U=[1,38],T=[1,39],_=[1,40],t=[1,41],m=[1,42],b=[1,43],A=[1,44],S=[1,45],v=[1,46],k=[1,47],F=[1,48],P=[1,49],Tt=[1,52],O=[1,67],Y=[1,68],z=[5,23,27,38,39,40,50,51,52,53,54,55,56,57,58,59,60,61],ht=[5,7,38,39,40,41],dt={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,SPACE:5,directive:6,QUADRANT:7,document:8,line:9,statement:10,axisDetails:11,quadrantDetails:12,points: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:21,text: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,openDirective:33,typeDirective:34,closeDirective:35,":":36,argDirective:37,NEWLINE:38,SEMI:39,EOF:40,open_directive:41,type_directive:42,arg_directive:43,close_directive:44,alphaNumToken:45,textNoTagsToken:46,STR:47,MD_STR:48,alphaNum:49,PUNCTUATION:50,AMP:51,NUM:52,ALPHA:53,COMMA:54,PLUS:55,EQUALS:56,MULT:57,DOT:58,BRKT:59,UNDERSCORE:60,MINUS:61,$accept:0,$end:1},terminals_:{2:"error",5:"SPACE",7:"QUADRANT",14:"title",15:"title_value",16:"acc_title",17:"acc_title_value",18:"acc_descr",19:"acc_descr_value",20:"acc_descr_multiline_value",21:"section",23:"point_start",24:"point_x",25:"point_y",26:"X-AXIS",27:"AXIS-TEXT-DELIMITER",28:"Y-AXIS",29:"QUADRANT_1",30:"QUADRANT_2",31:"QUADRANT_3",32:"QUADRANT_4",36:":",38:"NEWLINE",39:"SEMI",40:"EOF",41:"open_directive",42:"type_directive",43:"arg_directive",44:"close_directive",47:"STR",48:"MD_STR",50:"PUNCTUATION",51:"AMP",52:"NUM",53:"ALPHA",54:"COMMA",55:"PLUS",56:"EQUALS",57:"MULT",58:"DOT",59:"BRKT",60:"UNDERSCORE",61:"MINUS"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[10,0],[10,2],[10,1],[10,1],[10,1],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[13,4],[11,4],[11,3],[11,2],[11,4],[11,3],[11,2],[12,2],[12,2],[12,2],[12,2],[6,3],[6,5],[4,1],[4,1],[4,1],[33,1],[34,1],[37,1],[35,1],[22,1],[22,2],[22,1],[22,1],[49,1],[49,2],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,1],[46,1],[46,1]],performAction:function(n,r,d,o,q,i,et){var u=i.length-1;switch(q){case 13:this.$=i[u].trim(),o.setDiagramTitle(this.$);break;case 14:this.$=i[u].trim(),o.setAccTitle(this.$);break;case 15:case 16:this.$=i[u].trim(),o.setAccDescription(this.$);break;case 17:o.addSection(i[u].substr(8)),this.$=i[u].substr(8);break;case 19:o.addPoint(i[u-3],i[u-1],i[u]);break;case 20:o.setXAxisLeftText(i[u-2]),o.setXAxisRightText(i[u]);break;case 21:i[u-1].text+=" ⟶ ",o.setXAxisLeftText(i[u-1]);break;case 22:o.setXAxisLeftText(i[u]);break;case 23:o.setYAxisBottomText(i[u-2]),o.setYAxisTopText(i[u]);break;case 24:i[u-1].text+=" ⟶ ",o.setYAxisBottomText(i[u-1]);break;case 25:o.setYAxisBottomText(i[u]);break;case 26:o.setQuadrant1Text(i[u]);break;case 27:o.setQuadrant2Text(i[u]);break;case 28:o.setQuadrant3Text(i[u]);break;case 29:o.setQuadrant4Text(i[u]);break;case 35:o.parseDirective("%%{","open_directive");break;case 36:o.parseDirective(i[u],"type_directive");break;case 37:i[u]=i[u].trim().replace(/'/g,'"'),o.parseDirective(i[u],"arg_directive");break;case 38:o.parseDirective("}%%","close_directive","quadrantChart");break;case 39:this.$={text:i[u],type:"text"};break;case 40:this.$={text:i[u-1].text+""+i[u],type:i[u-1].type};break;case 41:this.$={text:i[u],type:"text"};break;case 42:this.$={text:i[u],type:"markdown"};break;case 43:this.$=i[u];break;case 44:this.$=i[u-1]+""+i[u];break}},table:[{3:1,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},{1:[3]},{3:11,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},{3:12,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},{3:13,4:2,5:a,6:4,7:c,33:9,38:f,39:g,40:x,41:h},e(p,[2,5],{8:14}),e(s,[2,32]),e(s,[2,33]),e(s,[2,34]),{34:15,42:[1,16]},{42:[2,35]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(l,y,{33:9,9:17,10:18,11:20,12:21,13:22,6:28,22:35,45:36,1:[2,4],5:B,14:W,16:L,18:C,20:N,21:M,26:X,28:D,29:it,30:at,31:nt,32:rt,41:h,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),{35:50,36:[1,51],44:Tt},e([36,44],[2,36]),e(p,[2,6]),{4:53,38:f,39:g,40:x},e(l,y,{33:9,11:20,12:21,13:22,6:28,22:35,45:36,10:54,5:B,14:W,16:L,18:C,20:N,21:M,26:X,28:D,29:it,30:at,31:nt,32:rt,41:h,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),e(l,[2,10]),e(l,[2,11]),e(l,[2,12]),{15:[1,55]},{17:[1,56]},{19:[1,57]},e(l,[2,16]),e(l,[2,17]),e(l,[2,18]),{22:58,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:59,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:60,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:61,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:62,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{22:63,45:36,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P},{5:O,23:[1,64],45:66,46:65,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y},e(z,[2,39]),e(z,[2,41]),e(z,[2,42]),e(z,[2,45]),e(z,[2,46]),e(z,[2,47]),e(z,[2,48]),e(z,[2,49]),e(z,[2,50]),e(z,[2,51]),e(z,[2,52]),e(z,[2,53]),e(z,[2,54]),e(z,[2,55]),e(ht,[2,30]),{37:69,43:[1,70]},e(ht,[2,38]),e(p,[2,7]),e(l,[2,9]),e(l,[2,13]),e(l,[2,14]),e(l,[2,15]),e(l,[2,22],{46:65,45:66,5:O,27:[1,71],50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,25],{46:65,45:66,5:O,27:[1,72],50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,26],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,27],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,28],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,29],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),{24:[1,73]},e(z,[2,40]),e(z,[2,56]),e(z,[2,57]),e(z,[2,58]),{35:74,44:Tt},{44:[2,37]},e(l,[2,21],{45:36,22:75,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),e(l,[2,24],{45:36,22:76,47:Q,48:U,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P}),{25:[1,77]},e(ht,[2,31]),e(l,[2,20],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,23],{46:65,45:66,5:O,50:T,51:_,52:t,53:m,54:b,55:A,56:S,57:v,58:k,59:F,60:P,61:Y}),e(l,[2,19])],defaultActions:{10:[2,35],11:[2,1],12:[2,2],13:[2,3],70:[2,37]},parseError:function(n,r){if(r.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=r,d}},parse:function(n){var r=this,d=[0],o=[],q=[null],i=[],et=this.table,u="",st=0,mt=0,Ft=2,bt=1,Pt=i.slice.call(arguments,1),E=Object.create(this.lexer),J={yy:{}};for(var xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xt)&&(J.yy[xt]=this.yy[xt]);E.setInput(n,J.yy),J.yy.lexer=E,J.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ft=E.yylloc;i.push(ft);var Lt=E.options&&E.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(){var G;return G=o.pop()||E.lex()||bt,typeof G!="number"&&(G instanceof Array&&(o=G,G=o.pop()),G=r.symbols_[G]||G),G}for(var R,Z,H,gt,tt={},lt,j,At,ot;;){if(Z=d[d.length-1],this.defaultActions[Z]?H=this.defaultActions[Z]:((R===null||typeof R>"u")&&(R=Ct()),H=et[Z]&&et[Z][R]),typeof H>"u"||!H.length||!H[0]){var pt="";ot=[];for(lt in et[Z])this.terminals_[lt]&<>Ft&&ot.push("'"+this.terminals_[lt]+"'");E.showPosition?pt="Parse error on line "+(st+1)+`: `+E.showPosition()+` Expecting `+ot.join(", ")+", got '"+(this.terminals_[R]||R)+"'":pt="Parse error on line "+(st+1)+": Unexpected "+(R==bt?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(pt,{text:E.match,token:this.terminals_[R]||R,line:E.yylineno,loc:ft,expected:ot})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+R);switch(H[0]){case 1:d.push(R),q.push(E.yytext),i.push(E.yylloc),d.push(H[1]),R=null,mt=E.yyleng,u=E.yytext,st=E.yylineno,ft=E.yylloc;break;case 2:if(j=this.productions_[H[1]][1],tt.$=q[q.length-j],tt._$={first_line:i[i.length-(j||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(j||1)].first_column,last_column:i[i.length-1].last_column},Lt&&(tt._$.range=[i[i.length-(j||1)].range[0],i[i.length-1].range[1]]),gt=this.performAction.apply(tt,[u,mt,st,J.yy,H[1],q,i].concat(Pt)),typeof gt<"u")return gt;j&&(d=d.slice(0,-1*j*2),q=q.slice(0,-1*j),i=i.slice(0,-1*j)),d.push(this.productions_[H[1]][0]),q.push(tt.$),i.push(tt._$),At=et[d[d.length-2]][d[d.length-1]],d.push(At);break;case 3:return!0}}return!0}},kt=function(){var K={EOF:1,parseError:function(r,d){if(this.yy.parser)this.yy.parser.parseError(r,d);else throw new Error(r)},setInput:function(n,r){return this.yy=r||this.yy||{},this._input=n,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 n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var r=n.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var r=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var o=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),d.length-1&&(this.yylineno-=d.length-1);var q=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:d?(d.length===o.length?this.yylloc.first_column:0)+o[o.length-d.length].length-d[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[q[0],q[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),r=new Array(n.length+1).join("-");return n+this.upcomingInput()+` `+r+"^"},test_match:function(n,r){var d,o,q;if(this.options.backtrack_lexer&&(q={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&&(q.yylloc.range=this.yylloc.range.slice(0))),o=n[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],d=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var i in q)this[i]=q[i];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,r,d,o;this._more||(this.yytext="",this.match="");for(var q=this._currentRules(),i=0;ir[0].length)){if(r=d,o=i,this.options.backtrack_lexer){if(n=this.test_match(d,q[i]),n!==!1)return n;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(n=this.test_match(r,q[o]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,d,o,q){switch(o){case 0:return this.begin("open_directive"),41;case 1:return this.begin("type_directive"),42;case 2:return this.popState(),this.begin("arg_directive"),36;case 3:return this.popState(),this.popState(),44;case 4:return 43;case 5:break;case 6:break;case 7:return 38;case 8:break;case 9:return this.begin("title"),14;case 10:return this.popState(),"title_value";case 11:return this.begin("acc_title"),16;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),18;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 26;case 19:return 28;case 20:return 27;case 21:return 29;case 22:return 30;case 23:return 31;case 24:return 32;case 25:this.begin("md_string");break;case 26:return"MD_STR";case 27:this.popState();break;case 28:this.begin("string");break;case 29:this.popState();break;case 30:return"STR";case 31:return this.begin("point_start"),23;case 32:return this.begin("point_x"),24;case 33:this.popState();break;case 34:this.popState(),this.begin("point_y");break;case 35:return this.popState(),25;case 36:return 7;case 37:return 53;case 38:return"COLON";case 39:return 55;case 40:return 54;case 41:return 56;case 42:return 56;case 43:return 57;case 44:return 59;case 45:return 60;case 46:return 58;case 47:return 51;case 48:return 61;case 49:return 52;case 50:return 5;case 51:return 39;case 52:return 50;case 53:return 40}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\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:[35],inclusive:!1},point_x:{rules:[34],inclusive:!1},point_start:{rules:[32,33],inclusive:!1},acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[10],inclusive:!1},md_string:{rules:[26,27],inclusive:!1},string:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,11,13,15,18,19,20,21,22,23,24,25,28,31,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],inclusive:!0}}};return K}();dt.lexer=kt;function ut(){this.yy={}}return ut.prototype=dt,dt.Parser=ut,new ut}();qt.parser=qt;const Ut=qt,w=Dt();class Qt{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,c,f,g,x,h,p,s,l,y,B,W,L,C,N,M,X,D;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((a=I.quadrantChart)==null?void 0:a.chartWidth)||500,chartWidth:((c=I.quadrantChart)==null?void 0:c.chartHeight)||500,titlePadding:((f=I.quadrantChart)==null?void 0:f.titlePadding)||10,titleFontSize:((g=I.quadrantChart)==null?void 0:g.titleFontSize)||20,quadrantPadding:((x=I.quadrantChart)==null?void 0:x.quadrantPadding)||5,xAxisLabelPadding:((h=I.quadrantChart)==null?void 0:h.xAxisLabelPadding)||5,yAxisLabelPadding:((p=I.quadrantChart)==null?void 0:p.yAxisLabelPadding)||5,xAxisLabelFontSize:((s=I.quadrantChart)==null?void 0:s.xAxisLabelFontSize)||16,yAxisLabelFontSize:((l=I.quadrantChart)==null?void 0:l.yAxisLabelFontSize)||16,quadrantLabelFontSize:((y=I.quadrantChart)==null?void 0:y.quadrantLabelFontSize)||16,quadrantTextTopPadding:((B=I.quadrantChart)==null?void 0:B.quadrantTextTopPadding)||5,pointTextPadding:((W=I.quadrantChart)==null?void 0:W.pointTextPadding)||5,pointLabelFontSize:((L=I.quadrantChart)==null?void 0:L.pointLabelFontSize)||12,pointRadius:((C=I.quadrantChart)==null?void 0:C.pointRadius)||5,xAxisPosition:((N=I.quadrantChart)==null?void 0:N.xAxisPosition)||"top",yAxisPosition:((M=I.quadrantChart)==null?void 0:M.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((X=I.quadrantChart)==null?void 0:X.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((D=I.quadrantChart)==null?void 0:D.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:w.quadrant1Fill,quadrant2Fill:w.quadrant2Fill,quadrant3Fill:w.quadrant3Fill,quadrant4Fill:w.quadrant4Fill,quadrant1TextFill:w.quadrant1TextFill,quadrant2TextFill:w.quadrant2TextFill,quadrant3TextFill:w.quadrant3TextFill,quadrant4TextFill:w.quadrant4TextFill,quadrantPointFill:w.quadrantPointFill,quadrantPointTextFill:w.quadrantPointTextFill,quadrantXAxisTextFill:w.quadrantXAxisTextFill,quadrantYAxisTextFill:w.quadrantYAxisTextFill,quadrantTitleFill:w.quadrantTitleFill,quadrantInternalBorderStrokeFill:w.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:w.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),ct.info("clear called")}setData(a){this.data={...this.data,...a}}addPoints(a){this.data.points=[...a,...this.data.points]}setConfig(a){ct.trace("setConfig called with: ",a),this.config={...this.config,...a}}setThemeConfig(a){ct.trace("setThemeConfig called with: ",a),this.themeConfig={...this.themeConfig,...a}}calculateSpace(a,c,f,g){const x=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,h={top:a==="top"&&c?x:0,bottom:a==="bottom"&&c?x:0},p=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition==="left"&&f?p:0,right:this.config.yAxisPosition==="right"&&f?p:0},l=this.config.titleFontSize+this.config.titlePadding*2,y={top:g?l:0},B=this.config.quadrantPadding+s.left,W=this.config.quadrantPadding+h.top+y.top,L=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,C=this.config.chartHeight-this.config.quadrantPadding*2-h.top-h.bottom-y.top,N=L/2,M=C/2;return{xAxisSpace:h,yAxisSpace:s,titleSpace:y,quadrantSpace:{quadrantLeft:B,quadrantTop:W,quadrantWidth:L,quadrantHalfWidth:N,quadrantHeight:C,quadrantHalfHeight:M}}}getAxisLabels(a,c,f,g){const{quadrantSpace:x,titleSpace:h}=g,{quadrantHalfHeight:p,quadrantHeight:s,quadrantLeft:l,quadrantHalfWidth:y,quadrantTop:B,quadrantWidth:W}=x,L=this.data.points.length===0,C=[];return this.data.xAxisLeftText&&c&&C.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(L?y/2:0),y:a==="top"?this.config.xAxisLabelPadding+h.top:this.config.xAxisLabelPadding+B+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&c&&C.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+y+(L?y/2:0),y:a==="top"?this.config.xAxisLabelPadding+h.top:this.config.xAxisLabelPadding+B+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&f&&C.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+W+this.config.quadrantPadding,y:B+s-(L?p/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&f&&C.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+W+this.config.quadrantPadding,y:B+p-(L?p/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:-90}),C}getQuadrants(a){const{quadrantSpace:c}=a,{quadrantHalfHeight:f,quadrantLeft:g,quadrantHalfWidth:x,quadrantTop:h}=c,p=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:g+x,y:h,width:x,height:f,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:g,y:h,width:x,height:f,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:g,y:h+f,width:x,height:f,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:g+x,y:h+f,width:x,height:f,fill:this.themeConfig.quadrant4Fill}];for(const s of p)s.text.x=s.x+s.width/2,this.data.points.length===0?(s.text.y=s.y+s.height/2,s.text.horizontalPos="middle"):(s.text.y=s.y+this.config.quadrantTextTopPadding,s.text.horizontalPos="top");return p}getQuadrantPoints(a){const{quadrantSpace:c}=a,{quadrantHeight:f,quadrantLeft:g,quadrantTop:x,quadrantWidth:h}=c,p=St().domain([0,1]).range([g,h+g]),s=St().domain([0,1]).range([f+x,x]);return this.data.points.map(y=>({x:p(y.x),y:s(y.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:y.text,fill:this.themeConfig.quadrantPointTextFill,x:p(y.x),y:s(y.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}}))}getBorders(a){const c=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:f}=a,{quadrantHalfHeight:g,quadrantHeight:x,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:s,quadrantWidth:l}=f;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h-c,y1:s,x2:h+l+c,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h+l,y1:s+c,x2:h+l,y2:s+x-c},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h-c,y1:s+x,x2:h+l+c,y2:s+x},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h,y1:s+c,x2:h,y2:s+x-c},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:h+p,y1:s+c,x2:h+p,y2:s+x-c},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:h+c,y1:s+g,x2:h+l-c,y2:s+g}]}getTitle(a){if(a)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 a=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),c=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),f=this.config.showTitle&&!!this.data.titleText,g=this.data.points.length>0?"bottom":this.config.xAxisPosition,x=this.calculateSpace(g,a,c,f);return{points:this.getQuadrantPoints(x),quadrants:this.getQuadrants(x),axisLabels:this.getAxisLabels(g,a,c,x),borderLines:this.getBorders(x),title:this.getTitle(f)}}}const Ht=_t();function G(e){return Nt(e.trim(),Ht)}const V=new Qt;function Mt(e){V.setData({quadrant1Text:G(e.text)})}function Xt(e){V.setData({quadrant2Text:G(e.text)})}function Ot(e){V.setData({quadrant3Text:G(e.text)})}function Yt(e){V.setData({quadrant4Text:G(e.text)})}function jt(e){V.setData({xAxisLeftText:G(e.text)})}function $t(e){V.setData({xAxisRightText:G(e.text)})}function Gt(e){V.setData({yAxisTopText:G(e.text)})}function Kt(e){V.setData({yAxisBottomText:G(e.text)})}function Jt(e,a,c){V.addPoints([{x:a,y:c,text:G(e.text)}])}function Zt(e){V.setConfig({chartWidth:e})}function te(e){V.setConfig({chartHeight:e})}function ee(){const e=_t(),{themeVariables:a,quadrantChart:c}=e;return c&&V.setConfig(c),V.setThemeConfig({quadrant1Fill:a.quadrant1Fill,quadrant2Fill:a.quadrant2Fill,quadrant3Fill:a.quadrant3Fill,quadrant4Fill:a.quadrant4Fill,quadrant1TextFill:a.quadrant1TextFill,quadrant2TextFill:a.quadrant2TextFill,quadrant3TextFill:a.quadrant3TextFill,quadrant4TextFill:a.quadrant4TextFill,quadrantPointFill:a.quadrantPointFill,quadrantPointTextFill:a.quadrantPointTextFill,quadrantXAxisTextFill:a.quadrantXAxisTextFill,quadrantYAxisTextFill:a.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:a.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:a.quadrantInternalBorderStrokeFill,quadrantTitleFill:a.quadrantTitleFill}),V.setData({titleText:vt()}),V.build()}const ie=function(e,a,c){wt.parseDirective(this,e,a,c)},ae=function(){V.clear(),Rt()},ne={setWidth:Zt,setHeight:te,setQuadrant1Text:Mt,setQuadrant2Text:Xt,setQuadrant3Text:Ot,setQuadrant4Text:Yt,setXAxisLeftText:jt,setXAxisRightText:$t,setYAxisTopText:Gt,setYAxisBottomText:Kt,addPoint:Jt,getQuadrantData:ee,parseDirective:ie,clear:ae,setAccTitle:zt,getAccTitle:Et,setDiagramTitle:It,getDiagramTitle:vt,getAccDescription:Bt,setAccDescription:Vt},re=(e,a,c,f)=>{var g,x,h;function p(t){return t==="top"?"hanging":"middle"}function s(t){return t==="left"?"start":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}const y=_t();ct.debug(`Rendering quadrant chart +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(r,d,o,q){switch(o){case 0:return this.begin("open_directive"),41;case 1:return this.begin("type_directive"),42;case 2:return this.popState(),this.begin("arg_directive"),36;case 3:return this.popState(),this.popState(),44;case 4:return 43;case 5:break;case 6:break;case 7:return 38;case 8:break;case 9:return this.begin("title"),14;case 10:return this.popState(),"title_value";case 11:return this.begin("acc_title"),16;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),18;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 26;case 19:return 28;case 20:return 27;case 21:return 29;case 22:return 30;case 23:return 31;case 24:return 32;case 25:this.begin("md_string");break;case 26:return"MD_STR";case 27:this.popState();break;case 28:this.begin("string");break;case 29:this.popState();break;case 30:return"STR";case 31:return this.begin("point_start"),23;case 32:return this.begin("point_x"),24;case 33:this.popState();break;case 34:this.popState(),this.begin("point_y");break;case 35:return this.popState(),25;case 36:return 7;case 37:return 53;case 38:return"COLON";case 39:return 55;case 40:return 54;case 41:return 56;case 42:return 56;case 43:return 57;case 44:return 59;case 45:return 60;case 46:return 58;case 47:return 51;case 48:return 61;case 49:return 52;case 50:return 5;case 51:return 39;case 52:return 50;case 53:return 40}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\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:[35],inclusive:!1},point_x:{rules:[34],inclusive:!1},point_start:{rules:[32,33],inclusive:!1},acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[10],inclusive:!1},md_string:{rules:[26,27],inclusive:!1},string:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,11,13,15,18,19,20,21,22,23,24,25,28,31,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],inclusive:!0}}};return K}();dt.lexer=kt;function ut(){this.yy={}}return ut.prototype=dt,dt.Parser=ut,new ut}();qt.parser=qt;const Ut=qt,w=Dt();class Qt{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,c,f,g,x,h,p,s,l,y,B,W,L,C,N,M,X,D;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((a=I.quadrantChart)==null?void 0:a.chartWidth)||500,chartWidth:((c=I.quadrantChart)==null?void 0:c.chartHeight)||500,titlePadding:((f=I.quadrantChart)==null?void 0:f.titlePadding)||10,titleFontSize:((g=I.quadrantChart)==null?void 0:g.titleFontSize)||20,quadrantPadding:((x=I.quadrantChart)==null?void 0:x.quadrantPadding)||5,xAxisLabelPadding:((h=I.quadrantChart)==null?void 0:h.xAxisLabelPadding)||5,yAxisLabelPadding:((p=I.quadrantChart)==null?void 0:p.yAxisLabelPadding)||5,xAxisLabelFontSize:((s=I.quadrantChart)==null?void 0:s.xAxisLabelFontSize)||16,yAxisLabelFontSize:((l=I.quadrantChart)==null?void 0:l.yAxisLabelFontSize)||16,quadrantLabelFontSize:((y=I.quadrantChart)==null?void 0:y.quadrantLabelFontSize)||16,quadrantTextTopPadding:((B=I.quadrantChart)==null?void 0:B.quadrantTextTopPadding)||5,pointTextPadding:((W=I.quadrantChart)==null?void 0:W.pointTextPadding)||5,pointLabelFontSize:((L=I.quadrantChart)==null?void 0:L.pointLabelFontSize)||12,pointRadius:((C=I.quadrantChart)==null?void 0:C.pointRadius)||5,xAxisPosition:((N=I.quadrantChart)==null?void 0:N.xAxisPosition)||"top",yAxisPosition:((M=I.quadrantChart)==null?void 0:M.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((X=I.quadrantChart)==null?void 0:X.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((D=I.quadrantChart)==null?void 0:D.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:w.quadrant1Fill,quadrant2Fill:w.quadrant2Fill,quadrant3Fill:w.quadrant3Fill,quadrant4Fill:w.quadrant4Fill,quadrant1TextFill:w.quadrant1TextFill,quadrant2TextFill:w.quadrant2TextFill,quadrant3TextFill:w.quadrant3TextFill,quadrant4TextFill:w.quadrant4TextFill,quadrantPointFill:w.quadrantPointFill,quadrantPointTextFill:w.quadrantPointTextFill,quadrantXAxisTextFill:w.quadrantXAxisTextFill,quadrantYAxisTextFill:w.quadrantYAxisTextFill,quadrantTitleFill:w.quadrantTitleFill,quadrantInternalBorderStrokeFill:w.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:w.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),ct.info("clear called")}setData(a){this.data={...this.data,...a}}addPoints(a){this.data.points=[...a,...this.data.points]}setConfig(a){ct.trace("setConfig called with: ",a),this.config={...this.config,...a}}setThemeConfig(a){ct.trace("setThemeConfig called with: ",a),this.themeConfig={...this.themeConfig,...a}}calculateSpace(a,c,f,g){const x=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,h={top:a==="top"&&c?x:0,bottom:a==="bottom"&&c?x:0},p=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition==="left"&&f?p:0,right:this.config.yAxisPosition==="right"&&f?p:0},l=this.config.titleFontSize+this.config.titlePadding*2,y={top:g?l:0},B=this.config.quadrantPadding+s.left,W=this.config.quadrantPadding+h.top+y.top,L=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,C=this.config.chartHeight-this.config.quadrantPadding*2-h.top-h.bottom-y.top,N=L/2,M=C/2;return{xAxisSpace:h,yAxisSpace:s,titleSpace:y,quadrantSpace:{quadrantLeft:B,quadrantTop:W,quadrantWidth:L,quadrantHalfWidth:N,quadrantHeight:C,quadrantHalfHeight:M}}}getAxisLabels(a,c,f,g){const{quadrantSpace:x,titleSpace:h}=g,{quadrantHalfHeight:p,quadrantHeight:s,quadrantLeft:l,quadrantHalfWidth:y,quadrantTop:B,quadrantWidth:W}=x,L=this.data.points.length===0,C=[];return this.data.xAxisLeftText&&c&&C.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(L?y/2:0),y:a==="top"?this.config.xAxisLabelPadding+h.top:this.config.xAxisLabelPadding+B+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&c&&C.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+y+(L?y/2:0),y:a==="top"?this.config.xAxisLabelPadding+h.top:this.config.xAxisLabelPadding+B+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&f&&C.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+W+this.config.quadrantPadding,y:B+s-(L?p/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&f&&C.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+W+this.config.quadrantPadding,y:B+p-(L?p/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:-90}),C}getQuadrants(a){const{quadrantSpace:c}=a,{quadrantHalfHeight:f,quadrantLeft:g,quadrantHalfWidth:x,quadrantTop:h}=c,p=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:g+x,y:h,width:x,height:f,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:g,y:h,width:x,height:f,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:g,y:h+f,width:x,height:f,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:g+x,y:h+f,width:x,height:f,fill:this.themeConfig.quadrant4Fill}];for(const s of p)s.text.x=s.x+s.width/2,this.data.points.length===0?(s.text.y=s.y+s.height/2,s.text.horizontalPos="middle"):(s.text.y=s.y+this.config.quadrantTextTopPadding,s.text.horizontalPos="top");return p}getQuadrantPoints(a){const{quadrantSpace:c}=a,{quadrantHeight:f,quadrantLeft:g,quadrantTop:x,quadrantWidth:h}=c,p=St().domain([0,1]).range([g,h+g]),s=St().domain([0,1]).range([f+x,x]);return this.data.points.map(y=>({x:p(y.x),y:s(y.y),fill:this.themeConfig.quadrantPointFill,radius:this.config.pointRadius,text:{text:y.text,fill:this.themeConfig.quadrantPointTextFill,x:p(y.x),y:s(y.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0}}))}getBorders(a){const c=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:f}=a,{quadrantHalfHeight:g,quadrantHeight:x,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:s,quadrantWidth:l}=f;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h-c,y1:s,x2:h+l+c,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h+l,y1:s+c,x2:h+l,y2:s+x-c},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h-c,y1:s+x,x2:h+l+c,y2:s+x},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:h,y1:s+c,x2:h,y2:s+x-c},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:h+p,y1:s+c,x2:h+p,y2:s+x-c},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:h+c,y1:s+g,x2:h+l-c,y2:s+g}]}getTitle(a){if(a)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 a=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),c=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),f=this.config.showTitle&&!!this.data.titleText,g=this.data.points.length>0?"bottom":this.config.xAxisPosition,x=this.calculateSpace(g,a,c,f);return{points:this.getQuadrantPoints(x),quadrants:this.getQuadrants(x),axisLabels:this.getAxisLabels(g,a,c,x),borderLines:this.getBorders(x),title:this.getTitle(f)}}}const Ht=_t();function $(e){return Nt(e.trim(),Ht)}const V=new Qt;function Mt(e){V.setData({quadrant1Text:$(e.text)})}function Xt(e){V.setData({quadrant2Text:$(e.text)})}function Ot(e){V.setData({quadrant3Text:$(e.text)})}function Yt(e){V.setData({quadrant4Text:$(e.text)})}function jt(e){V.setData({xAxisLeftText:$(e.text)})}function Gt(e){V.setData({xAxisRightText:$(e.text)})}function $t(e){V.setData({yAxisTopText:$(e.text)})}function Kt(e){V.setData({yAxisBottomText:$(e.text)})}function Jt(e,a,c){V.addPoints([{x:a,y:c,text:$(e.text)}])}function Zt(e){V.setConfig({chartWidth:e})}function te(e){V.setConfig({chartHeight:e})}function ee(){const e=_t(),{themeVariables:a,quadrantChart:c}=e;return c&&V.setConfig(c),V.setThemeConfig({quadrant1Fill:a.quadrant1Fill,quadrant2Fill:a.quadrant2Fill,quadrant3Fill:a.quadrant3Fill,quadrant4Fill:a.quadrant4Fill,quadrant1TextFill:a.quadrant1TextFill,quadrant2TextFill:a.quadrant2TextFill,quadrant3TextFill:a.quadrant3TextFill,quadrant4TextFill:a.quadrant4TextFill,quadrantPointFill:a.quadrantPointFill,quadrantPointTextFill:a.quadrantPointTextFill,quadrantXAxisTextFill:a.quadrantXAxisTextFill,quadrantYAxisTextFill:a.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:a.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:a.quadrantInternalBorderStrokeFill,quadrantTitleFill:a.quadrantTitleFill}),V.setData({titleText:vt()}),V.build()}const ie=function(e,a,c){wt.parseDirective(this,e,a,c)},ae=function(){V.clear(),Rt()},ne={setWidth:Zt,setHeight:te,setQuadrant1Text:Mt,setQuadrant2Text:Xt,setQuadrant3Text:Ot,setQuadrant4Text:Yt,setXAxisLeftText:jt,setXAxisRightText:Gt,setYAxisTopText:$t,setYAxisBottomText:Kt,addPoint:Jt,getQuadrantData:ee,parseDirective:ie,clear:ae,setAccTitle:zt,getAccTitle:Et,setDiagramTitle:It,getDiagramTitle:vt,getAccDescription:Bt,setAccDescription:Vt},re=(e,a,c,f)=>{var g,x,h;function p(t){return t==="top"?"hanging":"middle"}function s(t){return t==="left"?"start":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}const y=_t();ct.debug(`Rendering quadrant chart `+e);const B=y.securityLevel;let W;B==="sandbox"&&(W=yt("#i"+a));const C=(B==="sandbox"?yt(W.nodes()[0].contentDocument.body):yt("body")).select(`[id="${a}"]`),N=C.append("g").attr("class","main"),M=((g=y.quadrantChart)==null?void 0:g.chartWidth)||500,X=((x=y.quadrantChart)==null?void 0:x.chartHeight)||500;Wt(C,X,M,((h=y.quadrantChart)==null?void 0:h.useMaxWidth)||!0),C.attr("viewBox","0 0 "+M+" "+X),f.db.setHeight(X),f.db.setWidth(M);const D=f.db.getQuadrantData(),it=N.append("g").attr("class","quadrants"),at=N.append("g").attr("class","border"),nt=N.append("g").attr("class","data-points"),rt=N.append("g").attr("class","labels"),Q=N.append("g").attr("class","title");D.title&&Q.append("text").attr("x",0).attr("y",0).attr("fill",D.title.fill).attr("font-size",D.title.fontSize).attr("dominant-baseline",p(D.title.horizontalPos)).attr("text-anchor",s(D.title.verticalPos)).attr("transform",l(D.title)).text(D.title.text),D.borderLines&&at.selectAll("line").data(D.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 U=it.selectAll("g.quadrant").data(D.quadrants).enter().append("g").attr("class","quadrant");U.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),U.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=>p(t.text.horizontalPos)).attr("text-anchor",t=>s(t.text.verticalPos)).attr("transform",t=>l(t.text)).text(t=>t.text.text),rt.selectAll("g.label").data(D.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=>p(t.horizontalPos)).attr("text-anchor",t=>s(t.verticalPos)).attr("transform",t=>l(t));const _=nt.selectAll("g.data-point").data(D.points).enter().append("g").attr("class","data-point");_.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill),_.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=>p(t.text.horizontalPos)).attr("text-anchor",t=>s(t.text.verticalPos)).attr("transform",t=>l(t.text))},se={draw:re},ue={parser:Ut,db:ne,renderer:se,styles:()=>""};export{ue as diagram}; diff --git a/backend/web/assets/requirementDiagram-e13af0f0-97e4242f.js b/backend/web/assets/requirementDiagram-e13af0f0-d96c1e5a.js similarity index 62% rename from backend/web/assets/requirementDiagram-e13af0f0-97e4242f.js rename to backend/web/assets/requirementDiagram-e13af0f0-d96c1e5a.js index cfce6272..3ec5d184 100644 --- a/backend/web/assets/requirementDiagram-e13af0f0-97e4242f.js +++ b/backend/web/assets/requirementDiagram-e13af0f0-d96c1e5a.js @@ -1,9 +1,9 @@ -import{i as ve,s as Fe,g as Me,h as Pe,f as Ye,m as Ue,o as xe,J as Be,n as oe,p as Qe,q as Te}from"./EchartsRenderer-3d08027d.js";import{G as He,l as We}from"./layout-e00002c0.js";import"./index-51905ea3.js";import{l as Ke}from"./line-7fbcfe17.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";var he=function(){var e=function(q,r,s,l){for(s=s||{},l=q.length;l--;s[q[l]]=r);return s},t=[1,3],a=[1,5],o=[1,6],d=[1,7],u=[1,8],p=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],h=[1,22],c=[2,13],g=[1,26],R=[1,27],v=[1,28],S=[1,29],T=[1,30],x=[1,31],A=[1,24],N=[1,32],w=[1,33],pe=[1,36],F=[71,72],_e=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],fe=[1,56],ye=[1,57],ge=[1,58],Ee=[1,59],Re=[1,60],me=[1,61],Ie=[1,62],L=[62,63],M=[1,74],P=[1,70],Y=[1,71],U=[1,72],B=[1,73],Q=[1,75],j=[1,79],X=[1,80],J=[1,77],Z=[1,78],m=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],re={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(r,s,l,i,f,n,K){var _=n.length-1;switch(f){case 6:this.$=n[_].trim(),i.setAccTitle(this.$);break;case 7:case 8:this.$=n[_].trim(),i.setAccDescription(this.$);break;case 9:i.parseDirective("%%{","open_directive");break;case 10:i.parseDirective(n[_],"type_directive");break;case 11:n[_]=n[_].trim().replace(/'/g,'"'),i.parseDirective(n[_],"arg_directive");break;case 12:i.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:i.addRequirement(n[_-3],n[_-4]);break;case 20:i.setNewReqId(n[_-2]);break;case 21:i.setNewReqText(n[_-2]);break;case 22:i.setNewReqRisk(n[_-2]);break;case 23:i.setNewReqVerifyMethod(n[_-2]);break;case 26:this.$=i.RequirementType.REQUIREMENT;break;case 27:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=i.RiskLevel.LOW_RISK;break;case 33:this.$=i.RiskLevel.MED_RISK;break;case 34:this.$=i.RiskLevel.HIGH_RISK;break;case 35:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=i.VerifyType.VERIFY_TEST;break;case 39:i.addElement(n[_-3]);break;case 40:i.setNewElementType(n[_-2]);break;case 41:i.setNewElementDocRef(n[_-2]);break;case 44:i.addRelationship(n[_-2],n[_],n[_-4]);break;case 45:i.addRelationship(n[_-2],n[_-4],n[_]);break;case 46:this.$=i.Relationships.CONTAINS;break;case 47:this.$=i.Relationships.COPIES;break;case 48:this.$=i.Relationships.DERIVES;break;case 49:this.$=i.Relationships.SATISFIES;break;case 50:this.$=i.Relationships.VERIFIES;break;case 51:this.$=i.Relationships.REFINES;break;case 52:this.$=i.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:4,14:a,16:o,18:d,19:u},{1:[3]},{3:10,4:2,5:[1,9],6:t,9:4,14:a,16:o,18:d,19:u},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(p,[2,8]),{20:[2,9]},{3:16,4:2,6:t,9:4,14:a,16:o,18:d,19:u},{1:[2,2]},{4:21,5:h,7:17,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{11:34,12:[1,35],22:pe},e([12,22],[2,10]),e(p,[2,6]),e(p,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:h,7:38,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:39,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:40,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:41,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:42,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(F,[2,26]),e(F,[2,27]),e(F,[2,28]),e(F,[2,29]),e(F,[2,30]),e(F,[2,31]),e(_e,[2,55]),e(_e,[2,56]),e(p,[2,4]),{13:51,21:[1,52]},e(p,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:fe,65:ye,66:ge,67:Ee,68:Re,69:me,70:Ie},{61:63,64:fe,65:ye,66:ge,67:Ee,68:Re,69:me,70:Ie},{11:64,22:pe},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(L,[2,46]),e(L,[2,47]),e(L,[2,48]),e(L,[2,49]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),{63:[1,68]},e(p,[2,5]),{5:M,29:69,30:P,33:Y,35:U,37:B,39:Q},{5:j,39:X,55:76,56:J,58:Z},{32:81,71:N,72:w},{32:82,71:N,72:w},e(m,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:P,33:Y,35:U,37:B,39:Q},e(m,[2,25]),e(m,[2,39]),{31:[1,88]},{31:[1,89]},{5:j,39:X,55:90,56:J,58:Z},e(m,[2,43]),e(m,[2,44]),e(m,[2,45]),{32:91,71:N,72:w},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(m,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(m,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:M,29:116,30:P,33:Y,35:U,37:B,39:Q},{5:M,29:117,30:P,33:Y,35:U,37:B,39:Q},{5:M,29:118,30:P,33:Y,35:U,37:B,39:Q},{5:M,29:119,30:P,33:Y,35:U,37:B,39:Q},{5:j,39:X,55:120,56:J,58:Z},{5:j,39:X,55:121,56:J,58:Z},e(m,[2,20]),e(m,[2,21]),e(m,[2,22]),e(m,[2,23]),e(m,[2,40]),e(m,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(r,s){if(s.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=s,l}},parse:function(r){var s=this,l=[0],i=[],f=[null],n=[],K=this.table,_="",ee=0,be=0,Oe=2,ke=1,Le=n.slice.call(arguments,1),E=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);E.setInput(r,C.yy),C.yy.lexer=E,C.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ae=E.yylloc;n.push(ae);var Ce=E.options&&E.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(){var $;return $=i.pop()||E.lex()||ke,typeof $!="number"&&($ instanceof Array&&(i=$,$=i.pop()),$=s.symbols_[$]||$),$}for(var I,D,k,le,H={},te,V,Se,ie;;){if(D=l[l.length-1],this.defaultActions[D]?k=this.defaultActions[D]:((I===null||typeof I>"u")&&(I=De()),k=K[D]&&K[D][I]),typeof k>"u"||!k.length||!k[0]){var ce="";ie=[];for(te in K[D])this.terminals_[te]&&te>Oe&&ie.push("'"+this.terminals_[te]+"'");E.showPosition?ce="Parse error on line "+(ee+1)+`: +import{j as ve,s as Fe,g as Me,i as Pe,h as Ye,m as Ue,p as xe,K as Be,o as oe,q as Qe,r as Te}from"./TextOutput-39ff842e.js";import{G as He,l as We}from"./layout-218ba7ee.js";import"./index-ef7aa48c.js";import{l as Ke}from"./line-971ba693.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";var he=function(){var e=function(q,r,s,l){for(s=s||{},l=q.length;l--;s[q[l]]=r);return s},t=[1,3],a=[1,5],o=[1,6],d=[1,7],u=[1,8],p=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],h=[1,22],c=[2,13],g=[1,26],R=[1,27],v=[1,28],S=[1,29],T=[1,30],x=[1,31],A=[1,24],N=[1,32],w=[1,33],pe=[1,36],F=[71,72],_e=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],fe=[1,56],ye=[1,57],ge=[1,58],Ee=[1,59],Re=[1,60],me=[1,61],Ie=[1,62],L=[62,63],M=[1,74],P=[1,70],Y=[1,71],U=[1,72],B=[1,73],Q=[1,75],z=[1,79],X=[1,80],J=[1,77],Z=[1,78],m=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],re={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(r,s,l,i,f,n,K){var _=n.length-1;switch(f){case 6:this.$=n[_].trim(),i.setAccTitle(this.$);break;case 7:case 8:this.$=n[_].trim(),i.setAccDescription(this.$);break;case 9:i.parseDirective("%%{","open_directive");break;case 10:i.parseDirective(n[_],"type_directive");break;case 11:n[_]=n[_].trim().replace(/'/g,'"'),i.parseDirective(n[_],"arg_directive");break;case 12:i.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:i.addRequirement(n[_-3],n[_-4]);break;case 20:i.setNewReqId(n[_-2]);break;case 21:i.setNewReqText(n[_-2]);break;case 22:i.setNewReqRisk(n[_-2]);break;case 23:i.setNewReqVerifyMethod(n[_-2]);break;case 26:this.$=i.RequirementType.REQUIREMENT;break;case 27:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=i.RiskLevel.LOW_RISK;break;case 33:this.$=i.RiskLevel.MED_RISK;break;case 34:this.$=i.RiskLevel.HIGH_RISK;break;case 35:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=i.VerifyType.VERIFY_TEST;break;case 39:i.addElement(n[_-3]);break;case 40:i.setNewElementType(n[_-2]);break;case 41:i.setNewElementDocRef(n[_-2]);break;case 44:i.addRelationship(n[_-2],n[_],n[_-4]);break;case 45:i.addRelationship(n[_-2],n[_-4],n[_]);break;case 46:this.$=i.Relationships.CONTAINS;break;case 47:this.$=i.Relationships.COPIES;break;case 48:this.$=i.Relationships.DERIVES;break;case 49:this.$=i.Relationships.SATISFIES;break;case 50:this.$=i.Relationships.VERIFIES;break;case 51:this.$=i.Relationships.REFINES;break;case 52:this.$=i.Relationships.TRACES;break}},table:[{3:1,4:2,6:t,9:4,14:a,16:o,18:d,19:u},{1:[3]},{3:10,4:2,5:[1,9],6:t,9:4,14:a,16:o,18:d,19:u},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(p,[2,8]),{20:[2,9]},{3:16,4:2,6:t,9:4,14:a,16:o,18:d,19:u},{1:[2,2]},{4:21,5:h,7:17,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{11:34,12:[1,35],22:pe},e([12,22],[2,10]),e(p,[2,6]),e(p,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:h,7:38,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:39,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:40,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:41,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{4:21,5:h,7:42,8:c,9:4,14:a,16:o,18:d,19:u,23:18,24:19,25:20,26:23,32:25,40:g,41:R,42:v,43:S,44:T,45:x,53:A,71:N,72:w},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(F,[2,26]),e(F,[2,27]),e(F,[2,28]),e(F,[2,29]),e(F,[2,30]),e(F,[2,31]),e(_e,[2,55]),e(_e,[2,56]),e(p,[2,4]),{13:51,21:[1,52]},e(p,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:fe,65:ye,66:ge,67:Ee,68:Re,69:me,70:Ie},{61:63,64:fe,65:ye,66:ge,67:Ee,68:Re,69:me,70:Ie},{11:64,22:pe},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(L,[2,46]),e(L,[2,47]),e(L,[2,48]),e(L,[2,49]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),{63:[1,68]},e(p,[2,5]),{5:M,29:69,30:P,33:Y,35:U,37:B,39:Q},{5:z,39:X,55:76,56:J,58:Z},{32:81,71:N,72:w},{32:82,71:N,72:w},e(m,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:P,33:Y,35:U,37:B,39:Q},e(m,[2,25]),e(m,[2,39]),{31:[1,88]},{31:[1,89]},{5:z,39:X,55:90,56:J,58:Z},e(m,[2,43]),e(m,[2,44]),e(m,[2,45]),{32:91,71:N,72:w},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(m,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(m,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:M,29:116,30:P,33:Y,35:U,37:B,39:Q},{5:M,29:117,30:P,33:Y,35:U,37:B,39:Q},{5:M,29:118,30:P,33:Y,35:U,37:B,39:Q},{5:M,29:119,30:P,33:Y,35:U,37:B,39:Q},{5:z,39:X,55:120,56:J,58:Z},{5:z,39:X,55:121,56:J,58:Z},e(m,[2,20]),e(m,[2,21]),e(m,[2,22]),e(m,[2,23]),e(m,[2,40]),e(m,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(r,s){if(s.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=s,l}},parse:function(r){var s=this,l=[0],i=[],f=[null],n=[],K=this.table,_="",ee=0,be=0,Oe=2,ke=1,Le=n.slice.call(arguments,1),E=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);E.setInput(r,C.yy),C.yy.lexer=E,C.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var ae=E.yylloc;n.push(ae);var Ce=E.options&&E.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(){var $;return $=i.pop()||E.lex()||ke,typeof $!="number"&&($ instanceof Array&&(i=$,$=i.pop()),$=s.symbols_[$]||$),$}for(var I,D,k,le,H={},te,V,Se,ie;;){if(D=l[l.length-1],this.defaultActions[D]?k=this.defaultActions[D]:((I===null||typeof I>"u")&&(I=De()),k=K[D]&&K[D][I]),typeof k>"u"||!k.length||!k[0]){var ce="";ie=[];for(te in K[D])this.terminals_[te]&&te>Oe&&ie.push("'"+this.terminals_[te]+"'");E.showPosition?ce="Parse error on line "+(ee+1)+`: `+E.showPosition()+` Expecting `+ie.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ce="Parse error on line "+(ee+1)+": Unexpected "+(I==ke?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ce,{text:E.match,token:this.terminals_[I]||I,line:E.yylineno,loc:ae,expected:ie})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+I);switch(k[0]){case 1:l.push(I),f.push(E.yytext),n.push(E.yylloc),l.push(k[1]),I=null,be=E.yyleng,_=E.yytext,ee=E.yylineno,ae=E.yylloc;break;case 2:if(V=this.productions_[k[1]][1],H.$=f[f.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},Ce&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),le=this.performAction.apply(H,[_,be,ee,C.yy,k[1],f,n].concat(Le)),typeof le<"u")return le;V&&(l=l.slice(0,-1*V*2),f=f.slice(0,-1*V),n=n.slice(0,-1*V)),l.push(this.productions_[k[1]][0]),f.push(H.$),n.push(H._$),Se=K[l[l.length-2]][l[l.length-1]],l.push(Se);break;case 3:return!0}}return!0}},qe=function(){var q={EOF:1,parseError:function(s,l){if(this.yy.parser)this.yy.parser.parseError(s,l);else throw new Error(s)},setInput:function(r,s){return this.yy=s||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var s=r.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var s=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;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),l.length-1&&(this.yylineno-=l.length-1);var f=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:l?(l.length===i.length?this.yylloc.first_column:0)+i[i.length-l.length].length-l[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),s=new Array(r.length+1).join("-");return r+this.upcomingInput()+` `+s+"^"},test_match:function(r,s){var l,i,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),i=r[0].match(/(?:\r\n?|\n).*/g),i&&(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+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var n in f)this[n]=f[n];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,s,l,i;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),n=0;ns[0].length)){if(s=l,i=n,this.options.backtrack_lexer){if(r=this.test_match(l,f[n]),r!==!1)return r;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(r=this.test_match(s,f[i]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>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(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(s,l,i,f){switch(i){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"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 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return l.yytext=l.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:(\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:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,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,55],inclusive:!0}}};return q}();re.lexer=qe;function ne(){this.yy={}}return ne.prototype=re,re.Parser=ne,new ne}();he.parser=he;const Ge=he;let de=[],b={},G={},O={},z={};const ze={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},je={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},Xe={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Je={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Ze=function(e,t,a){Ue.parseDirective(this,e,t,a)},et=(e,t)=>(G[e]===void 0&&(G[e]={name:e,type:t,id:b.id,text:b.text,risk:b.risk,verifyMethod:b.verifyMethod}),b={},G[e]),tt=()=>G,it=e=>{b!==void 0&&(b.id=e)},rt=e=>{b!==void 0&&(b.text=e)},nt=e=>{b!==void 0&&(b.risk=e)},st=e=>{b!==void 0&&(b.verifyMethod=e)},at=e=>(z[e]===void 0&&(z[e]={name:e,type:O.type,docRef:O.docRef},xe.info("Added new requirement: ",e)),O={},z[e]),lt=()=>z,ct=e=>{O!==void 0&&(O.type=e)},ot=e=>{O!==void 0&&(O.docRef=e)},ht=(e,t,a)=>{de.push({type:e,src:t,dst:a})},ut=()=>de,dt=()=>{de=[],b={},G={},O={},z={},Be()},pt={RequirementType:ze,RiskLevel:je,VerifyType:Xe,Relationships:Je,parseDirective:Ze,getConfig:()=>ve().req,addRequirement:et,getRequirements:tt,setNewReqId:it,setNewReqText:rt,setNewReqRisk:nt,setNewReqVerifyMethod:st,setAccTitle:Fe,getAccTitle:Me,setAccDescription:Pe,getAccDescription:Ye,addElement:at,getElements:lt,setNewElementType:ct,setNewElementDocRef:ot,addRelationship:ht,getRelationships:ut,clear:dt},_t=e=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>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(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(s,l,i,f){switch(i){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"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 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return l.yytext=l.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:(\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:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,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,55],inclusive:!0}}};return q}();re.lexer=qe;function ne(){this.yy={}}return ne.prototype=re,re.Parser=ne,new ne}();he.parser=he;const Ge=he;let de=[],b={},G={},O={},j={};const je={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},ze={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},Xe={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Je={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Ze=function(e,t,a){Ue.parseDirective(this,e,t,a)},et=(e,t)=>(G[e]===void 0&&(G[e]={name:e,type:t,id:b.id,text:b.text,risk:b.risk,verifyMethod:b.verifyMethod}),b={},G[e]),tt=()=>G,it=e=>{b!==void 0&&(b.id=e)},rt=e=>{b!==void 0&&(b.text=e)},nt=e=>{b!==void 0&&(b.risk=e)},st=e=>{b!==void 0&&(b.verifyMethod=e)},at=e=>(j[e]===void 0&&(j[e]={name:e,type:O.type,docRef:O.docRef},xe.info("Added new requirement: ",e)),O={},j[e]),lt=()=>j,ct=e=>{O!==void 0&&(O.type=e)},ot=e=>{O!==void 0&&(O.docRef=e)},ht=(e,t,a)=>{de.push({type:e,src:t,dst:a})},ut=()=>de,dt=()=>{de=[],b={},G={},O={},j={},Be()},pt={RequirementType:je,RiskLevel:ze,VerifyType:Xe,Relationships:Je,parseDirective:Ze,getConfig:()=>ve().req,addRequirement:et,getRequirements:tt,setNewReqId:it,setNewReqText:rt,setNewReqRisk:nt,setNewReqVerifyMethod:st,setAccTitle:Fe,getAccTitle:Me,setAccDescription:Pe,getAccDescription:Ye,addElement:at,getElements:lt,setNewElementType:ct,setNewElementDocRef:ot,addRelationship:ht,getRelationships:ut,clear:dt},_t=e=>` marker { fill: ${e.relationColor}; diff --git a/backend/web/assets/sankeyDiagram-a7f8e230-2ffb6873.js b/backend/web/assets/sankeyDiagram-a7f8e230-2ffb6873.js deleted file mode 100644 index 46c5e4c2..00000000 --- a/backend/web/assets/sankeyDiagram-a7f8e230-2ffb6873.js +++ /dev/null @@ -1,8 +0,0 @@ -import{ay as yt,az as at,i as ot,g as pt,s as mt,f as _t,h as kt,I as xt,H as vt,J as bt,q as wt,af as St,n as H,p as Lt}from"./EchartsRenderer-3d08027d.js";import"./index-51905ea3.js";import{o as Et}from"./ordinal-ba9b4969.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./init-77b53fdd.js";function Z(t,n){let a=0;if(n===void 0)for(let h of t)(h=+h)&&(a+=h);else{let h=-1;for(let f of t)(f=+n(f,++h,t))&&(a+=f)}return a}function At(t){for(var n=t.length/6|0,a=new Array(n),h=0;h[m(c,s,e),c]));for(const[c,s]of u.entries()){s.index=c;let{source:_,target:v}=s;typeof _!="object"&&(_=s.source=ut(o,_)),typeof v!="object"&&(v=s.target=ut(o,v)),_.sourceLinks.push(s),v.targetLinks.push(s)}if(l!=null)for(const{sourceLinks:c,targetLinks:s}of e)c.sort(l),s.sort(l)}function L({nodes:e}){for(const u of e)u.value=u.fixedValue===void 0?Math.max(Z(u.sourceLinks,J),Z(u.targetLinks,J)):u.fixedValue}function A({nodes:e}){const u=e.length;let o=new Set(e),c=new Set,s=0;for(;o.size;){for(const _ of o){_.depth=s;for(const{target:v}of _.sourceLinks)c.add(v)}if(++s>u)throw new Error("circular link");o=c,c=new Set}}function N({nodes:e}){const u=e.length;let o=new Set(e),c=new Set,s=0;for(;o.size;){for(const _ of o){_.height=s;for(const{source:v}of _.targetLinks)c.add(v)}if(++s>u)throw new Error("circular link");o=c,c=new Set}}function P({nodes:e}){const u=at(e,s=>s.depth)+1,o=(a-t-f)/(u-1),c=new Array(u);for(const s of e){const _=Math.max(0,Math.min(u-1,Math.floor(i.call(null,s,u))));s.layer=_,s.x0=t+_*o,s.x1=s.x0+f,c[_]?c[_].push(s):c[_]=[s]}if(r)for(const s of c)s.sort(r);return c}function z(e){const u=yt(e,o=>(h-n-(o.length-1)*g)/Z(o,J));for(const o of e){let c=n;for(const s of o){s.y0=c,s.y1=c+s.value*u,c=s.y1+g;for(const _ of s.sourceLinks)_.width=_.value*u}c=(h-c+g)/(o.length+1);for(let s=0;so.length)-1)),z(u);for(let o=0;o0))continue;let F=(V/j-v.y0)*u;v.y0+=F,v.y1+=F,w(v)}r===void 0&&_.sort(q),C(_,o)}}function O(e,u,o){for(let c=e.length,s=c-2;s>=0;--s){const _=e[s];for(const v of _){let V=0,j=0;for(const{target:U,value:K}of v.sourceLinks){let W=K*(U.layer-v.layer);V+=R(v,U)*W,j+=W}if(!(j>0))continue;let F=(V/j-v.y0)*u;v.y0+=F,v.y1+=F,w(v)}r===void 0&&_.sort(q),C(_,o)}}function C(e,u){const o=e.length>>1,c=e[o];d(e,c.y0-g,o-1,u),I(e,c.y1+g,o+1,u),d(e,h,e.length-1,u),I(e,n,0,u)}function I(e,u,o,c){for(;o1e-6&&(s.y0+=_,s.y1+=_),u=s.y1+g}}function d(e,u,o,c){for(;o>=0;--o){const s=e[o],_=(s.y1-u)*c;_>1e-6&&(s.y0-=_,s.y1-=_),u=s.y0-g}}function w({sourceLinks:e,targetLinks:u}){if(l===void 0){for(const{source:{sourceLinks:o}}of u)o.sort(ct);for(const{target:{targetLinks:o}}of e)o.sort(lt)}}function $(e){if(l===void 0)for(const{sourceLinks:u,targetLinks:o}of e)u.sort(ct),o.sort(lt)}function T(e,u){let o=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:c,width:s}of e.sourceLinks){if(c===u)break;o+=s+g}for(const{source:c,width:s}of u.targetLinks){if(c===e)break;o-=s}return o}function R(e,u){let o=u.y0-(u.targetLinks.length-1)*g/2;for(const{source:c,width:s}of u.targetLinks){if(c===e)break;o+=s+g}for(const{target:c,width:s}of e.sourceLinks){if(c===u)break;o-=s}return o}return x}var tt=Math.PI,et=2*tt,D=1e-6,jt=et-D;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function gt(){return new nt}nt.prototype=gt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(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,a,h){this._+="Q"+ +t+","+ +n+","+(this._x1=+a)+","+(this._y1=+h)},bezierCurveTo:function(t,n,a,h,f,k){this._+="C"+ +t+","+ +n+","+ +a+","+ +h+","+(this._x1=+f)+","+(this._y1=+k)},arcTo:function(t,n,a,h,f){t=+t,n=+n,a=+a,h=+h,f=+f;var k=this._x1,g=this._y1,m=a-t,i=h-n,r=k-t,l=g-n,p=r*r+l*l;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(p>D)if(!(Math.abs(l*m-i*r)>D)||!f)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=a-k,y=h-g,x=m*m+i*i,E=b*b+y*y,L=Math.sqrt(x),A=Math.sqrt(p),N=f*Math.tan((tt-Math.acos((x+p-E)/(2*L*A)))/2),P=N/A,z=N/L;Math.abs(P-1)>D&&(this._+="L"+(t+P*r)+","+(n+P*l)),this._+="A"+f+","+f+",0,0,"+ +(l*b>r*y)+","+(this._x1=t+z*m)+","+(this._y1=n+z*i)}},arc:function(t,n,a,h,f,k){t=+t,n=+n,a=+a,k=!!k;var g=a*Math.cos(h),m=a*Math.sin(h),i=t+g,r=n+m,l=1^k,p=k?h-f:f-h;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+i+","+r:(Math.abs(this._x1-i)>D||Math.abs(this._y1-r)>D)&&(this._+="L"+i+","+r),a&&(p<0&&(p=p%et+et),p>jt?this._+="A"+a+","+a+",0,1,"+l+","+(t-g)+","+(n-m)+"A"+a+","+a+",0,1,"+l+","+(this._x1=i)+","+(this._y1=r):p>D&&(this._+="A"+a+","+a+",0,"+ +(p>=tt)+","+l+","+(this._x1=t+a*Math.cos(f))+","+(this._y1=n+a*Math.sin(f))))},rect:function(t,n,a,h){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +a+"v"+ +h+"h"+-a+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Dt(t){return t[0]}function Bt(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Ft(t){return t.target}function Ut(t){var n=Vt,a=Ft,h=Dt,f=Bt,k=null;function g(){var m,i=Rt.call(arguments),r=n.apply(this,i),l=a.apply(this,i);if(k||(k=m=gt()),t(k,+h.apply(this,(i[0]=r,i)),+f.apply(this,i),+h.apply(this,(i[0]=l,i)),+f.apply(this,i)),m)return k=null,m+""||null}return g.source=function(m){return arguments.length?(n=m,g):n},g.target=function(m){return arguments.length?(a=m,g):a},g.x=function(m){return arguments.length?(h=typeof m=="function"?m:ft(+m),g):h},g.y=function(m){return arguments.length?(f=typeof m=="function"?m:ft(+m),g):f},g.context=function(m){return arguments.length?(k=m??null,g):k},g}function Wt(t,n,a,h,f){t.moveTo(n,a),t.bezierCurveTo(n=(n+h)/2,a,n,f,h,f)}function Ht(){return Ut(Wt)}function Yt(t){return[t.source.x1,t.y0]}function qt(t){return[t.target.x0,t.y1]}function Gt(){return Ht().source(Yt).target(qt)}var it=function(){var t=function(m,i,r,l){for(r=r||{},l=m.length;l--;r[m[l]]=i);return r},n=[1,9],a=[1,10],h=[1,5,10,12],f={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(i,r,l,p,b,y,x){var E=y.length-1;switch(b){case 7:const L=p.findOrCreateNode(y[E-4].trim().replaceAll('""','"')),A=p.findOrCreateNode(y[E-2].trim().replaceAll('""','"')),N=parseFloat(y[E].trim());p.addLink(L,A,N);break;case 8:case 9:case 11:this.$=y[E];break;case 10:this.$=y[E-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:a},{1:[2,6],7:11,10:[1,12]},t(a,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(h,[2,8]),t(h,[2,9]),{19:[1,16]},t(h,[2,11]),{1:[2,1]},{1:[2,5]},t(a,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:a},{15:18,16:7,17:8,18:n,20:a},{18:[1,19]},t(a,[2,3]),{12:[1,20]},t(h,[2,10]),{15:21,16:7,17:8,18:n,20:a},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=r,l}},parse:function(i){var r=this,l=[0],p=[],b=[null],y=[],x=this.table,E="",L=0,A=0,N=2,P=1,z=y.slice.call(arguments,1),S=Object.create(this.lexer),M={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(M.yy[O]=this.yy[O]);S.setInput(i,M.yy),M.yy.lexer=S,M.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var C=S.yylloc;y.push(C);var I=S.options&&S.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=p.pop()||S.lex()||P,typeof v!="number"&&(v instanceof Array&&(p=v,v=p.pop()),v=r.symbols_[v]||v),v}for(var w,$,T,R,e={},u,o,c,s;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),T=x[$]&&x[$][w]),typeof T>"u"||!T.length||!T[0]){var _="";s=[];for(u in x[$])this.terminals_[u]&&u>N&&s.push("'"+this.terminals_[u]+"'");S.showPosition?_="Parse error on line "+(L+1)+`: -`+S.showPosition()+` -Expecting `+s.join(", ")+", got '"+(this.terminals_[w]||w)+"'":_="Parse error on line "+(L+1)+": Unexpected "+(w==P?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(_,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:C,expected:s})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(T[0]){case 1:l.push(w),b.push(S.yytext),y.push(S.yylloc),l.push(T[1]),w=null,A=S.yyleng,E=S.yytext,L=S.yylineno,C=S.yylloc;break;case 2:if(o=this.productions_[T[1]][1],e.$=b[b.length-o],e._$={first_line:y[y.length-(o||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(o||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(o||1)].range[0],y[y.length-1].range[1]]),R=this.performAction.apply(e,[E,A,L,M.yy,T[1],b,y].concat(z)),typeof R<"u")return R;o&&(l=l.slice(0,-1*o*2),b=b.slice(0,-1*o),y=y.slice(0,-1*o)),l.push(this.productions_[T[1]][0]),b.push(e.$),y.push(e._$),c=x[l[l.length-2]][l[l.length-1]],l.push(c);break;case 3:return!0}}return!0}},k=function(){var m={EOF:1,parseError:function(r,l){if(this.yy.parser)this.yy.parser.parseError(r,l);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var p=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),l.length-1&&(this.yylineno-=l.length-1);var b=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+` -`+r+"^"},test_match:function(i,r){var l,p,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,l,p;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;yr[0].length)){if(r=l,p=y,this.options.backtrack_lexer){if(i=this.test_match(l,b[y]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,b[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{easy_keword_rules:!0},performAction:function(r,l,p,b){switch(p){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)/,/^(?:$)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:(\u002C))/,/^(?:(\u0022))/,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/,/^(?:(\u0022)(?!(\u0022)))/,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/],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}}};return m}();f.lexer=k;function g(){this.yy={}}return g.prototype=f,f.Parser=g,new g}();it.parser=it;const G=it;let X=[],Q=[],B={};const Xt=()=>{X=[],Q=[],B={},bt()};class Qt{constructor(n,a,h=0){this.source=n,this.target=a,this.value=h}}const Kt=(t,n,a)=>{X.push(new Qt(t,n,a))};class Zt{constructor(n){this.ID=n}}const Jt=t=>(t=wt.sanitizeText(t,ot()),B[t]||(B[t]=new Zt(t),Q.push(B[t])),B[t]),te=()=>Q,ee=()=>X,ne=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),ie={nodesMap:B,getConfig:()=>ot().sankey,getNodes:te,getLinks:ee,getGraph:ne,addLink:Kt,findOrCreateNode:Jt,getAccTitle:pt,setAccTitle:mt,getAccDescription:_t,setAccDescription:kt,getDiagramTitle:xt,setDiagramTitle:vt,clear:Xt},st=class{static next(t){return new st(t+ ++st.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}};let rt=st;rt.count=0;const se={left:Nt,right:Pt,center:Ct,justify:dt},re=function(t,n,a,h){const{securityLevel:f,sankey:k}=ot(),g=St.sankey;let m;f==="sandbox"&&(m=H("#i"+n));const i=f==="sandbox"?H(m.nodes()[0].contentDocument.body):H("body"),r=f==="sandbox"?i.select(`[id="${n}"]`):H(`[id="${n}"]`),l=(k==null?void 0:k.width)??g.width,p=(k==null?void 0:k.height)??g.width,b=(k==null?void 0:k.useMaxWidth)??g.useMaxWidth,y=(k==null?void 0:k.nodeAlignment)??g.nodeAlignment,x=(k==null?void 0:k.prefix)??g.prefix,E=(k==null?void 0:k.suffix)??g.suffix,L=(k==null?void 0:k.showValues)??g.showValues;Lt(r,p,l,b);const A=h.db.getGraph(),N=se[y],P=10;zt().nodeId(d=>d.id).nodeWidth(P).nodePadding(10+(L?15:0)).nodeAlign(N).extent([[0,0],[l,p]])(A);const S=Et(Tt);r.append("g").attr("class","nodes").selectAll(".node").data(A.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=rt.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=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const M=({id:d,value:w})=>L?`${d} -${x}${Math.round(w*100)/100}${E}`:d;r.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(A.nodes).join("text").attr("x",d=>d.x0(d.y1+d.y0)/2).attr("dy",`${L?"0":"0.35"}em`).attr("text-anchor",d=>d.x0(w.uid=rt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(C){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=C}O.append("path").attr("d",Gt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width))},oe={draw:re},ae=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` -`).trim(),le=G.parse.bind(G);G.parse=t=>le(ae(t));const de={parser:G,db:ie,renderer:oe};export{de as diagram}; diff --git a/backend/web/assets/sankeyDiagram-a7f8e230-5b80af1c.js b/backend/web/assets/sankeyDiagram-a7f8e230-5b80af1c.js new file mode 100644 index 00000000..501dec1c --- /dev/null +++ b/backend/web/assets/sankeyDiagram-a7f8e230-5b80af1c.js @@ -0,0 +1,8 @@ +import{az as yt,aA as at,j as ot,g as pt,s as mt,h as _t,i as kt,J as xt,I as vt,K as bt,r as wt,ag as St,o as Y,q as Lt}from"./TextOutput-39ff842e.js";import"./index-ef7aa48c.js";import{o as Et}from"./ordinal-ba9b4969.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./init-77b53fdd.js";function Z(t,n){let a=0;if(n===void 0)for(let h of t)(h=+h)&&(a+=h);else{let h=-1;for(let f of t)(f=+n(f,++h,t))&&(a+=f)}return a}function At(t){for(var n=t.length/6|0,a=new Array(n),h=0;h[m(c,s,e),c]));for(const[c,s]of u.entries()){s.index=c;let{source:_,target:v}=s;typeof _!="object"&&(_=s.source=ut(o,_)),typeof v!="object"&&(v=s.target=ut(o,v)),_.sourceLinks.push(s),v.targetLinks.push(s)}if(l!=null)for(const{sourceLinks:c,targetLinks:s}of e)c.sort(l),s.sort(l)}function L({nodes:e}){for(const u of e)u.value=u.fixedValue===void 0?Math.max(Z(u.sourceLinks,J),Z(u.targetLinks,J)):u.fixedValue}function A({nodes:e}){const u=e.length;let o=new Set(e),c=new Set,s=0;for(;o.size;){for(const _ of o){_.depth=s;for(const{target:v}of _.sourceLinks)c.add(v)}if(++s>u)throw new Error("circular link");o=c,c=new Set}}function N({nodes:e}){const u=e.length;let o=new Set(e),c=new Set,s=0;for(;o.size;){for(const _ of o){_.height=s;for(const{source:v}of _.targetLinks)c.add(v)}if(++s>u)throw new Error("circular link");o=c,c=new Set}}function P({nodes:e}){const u=at(e,s=>s.depth)+1,o=(a-t-f)/(u-1),c=new Array(u);for(const s of e){const _=Math.max(0,Math.min(u-1,Math.floor(i.call(null,s,u))));s.layer=_,s.x0=t+_*o,s.x1=s.x0+f,c[_]?c[_].push(s):c[_]=[s]}if(r)for(const s of c)s.sort(r);return c}function z(e){const u=yt(e,o=>(h-n-(o.length-1)*g)/Z(o,J));for(const o of e){let c=n;for(const s of o){s.y0=c,s.y1=c+s.value*u,c=s.y1+g;for(const _ of s.sourceLinks)_.width=_.value*u}c=(h-c+g)/(o.length+1);for(let s=0;so.length)-1)),z(u);for(let o=0;o0))continue;let F=(V/j-v.y0)*u;v.y0+=F,v.y1+=F,w(v)}r===void 0&&_.sort(G),C(_,o)}}function O(e,u,o){for(let c=e.length,s=c-2;s>=0;--s){const _=e[s];for(const v of _){let V=0,j=0;for(const{target:U,value:Q}of v.sourceLinks){let W=Q*(U.layer-v.layer);V+=R(v,U)*W,j+=W}if(!(j>0))continue;let F=(V/j-v.y0)*u;v.y0+=F,v.y1+=F,w(v)}r===void 0&&_.sort(G),C(_,o)}}function C(e,u){const o=e.length>>1,c=e[o];d(e,c.y0-g,o-1,u),I(e,c.y1+g,o+1,u),d(e,h,e.length-1,u),I(e,n,0,u)}function I(e,u,o,c){for(;o1e-6&&(s.y0+=_,s.y1+=_),u=s.y1+g}}function d(e,u,o,c){for(;o>=0;--o){const s=e[o],_=(s.y1-u)*c;_>1e-6&&(s.y0-=_,s.y1-=_),u=s.y0-g}}function w({sourceLinks:e,targetLinks:u}){if(l===void 0){for(const{source:{sourceLinks:o}}of u)o.sort(ct);for(const{target:{targetLinks:o}}of e)o.sort(lt)}}function $(e){if(l===void 0)for(const{sourceLinks:u,targetLinks:o}of e)u.sort(ct),o.sort(lt)}function T(e,u){let o=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:c,width:s}of e.sourceLinks){if(c===u)break;o+=s+g}for(const{source:c,width:s}of u.targetLinks){if(c===e)break;o-=s}return o}function R(e,u){let o=u.y0-(u.targetLinks.length-1)*g/2;for(const{source:c,width:s}of u.targetLinks){if(c===e)break;o+=s+g}for(const{target:c,width:s}of e.sourceLinks){if(c===u)break;o-=s}return o}return x}var tt=Math.PI,et=2*tt,D=1e-6,jt=et-D;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function gt(){return new nt}nt.prototype=gt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(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,a,h){this._+="Q"+ +t+","+ +n+","+(this._x1=+a)+","+(this._y1=+h)},bezierCurveTo:function(t,n,a,h,f,k){this._+="C"+ +t+","+ +n+","+ +a+","+ +h+","+(this._x1=+f)+","+(this._y1=+k)},arcTo:function(t,n,a,h,f){t=+t,n=+n,a=+a,h=+h,f=+f;var k=this._x1,g=this._y1,m=a-t,i=h-n,r=k-t,l=g-n,p=r*r+l*l;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(p>D)if(!(Math.abs(l*m-i*r)>D)||!f)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=a-k,y=h-g,x=m*m+i*i,E=b*b+y*y,L=Math.sqrt(x),A=Math.sqrt(p),N=f*Math.tan((tt-Math.acos((x+p-E)/(2*L*A)))/2),P=N/A,z=N/L;Math.abs(P-1)>D&&(this._+="L"+(t+P*r)+","+(n+P*l)),this._+="A"+f+","+f+",0,0,"+ +(l*b>r*y)+","+(this._x1=t+z*m)+","+(this._y1=n+z*i)}},arc:function(t,n,a,h,f,k){t=+t,n=+n,a=+a,k=!!k;var g=a*Math.cos(h),m=a*Math.sin(h),i=t+g,r=n+m,l=1^k,p=k?h-f:f-h;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+i+","+r:(Math.abs(this._x1-i)>D||Math.abs(this._y1-r)>D)&&(this._+="L"+i+","+r),a&&(p<0&&(p=p%et+et),p>jt?this._+="A"+a+","+a+",0,1,"+l+","+(t-g)+","+(n-m)+"A"+a+","+a+",0,1,"+l+","+(this._x1=i)+","+(this._y1=r):p>D&&(this._+="A"+a+","+a+",0,"+ +(p>=tt)+","+l+","+(this._x1=t+a*Math.cos(f))+","+(this._y1=n+a*Math.sin(f))))},rect:function(t,n,a,h){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +a+"v"+ +h+"h"+-a+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Dt(t){return t[0]}function Bt(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Ft(t){return t.target}function Ut(t){var n=Vt,a=Ft,h=Dt,f=Bt,k=null;function g(){var m,i=Rt.call(arguments),r=n.apply(this,i),l=a.apply(this,i);if(k||(k=m=gt()),t(k,+h.apply(this,(i[0]=r,i)),+f.apply(this,i),+h.apply(this,(i[0]=l,i)),+f.apply(this,i)),m)return k=null,m+""||null}return g.source=function(m){return arguments.length?(n=m,g):n},g.target=function(m){return arguments.length?(a=m,g):a},g.x=function(m){return arguments.length?(h=typeof m=="function"?m:ft(+m),g):h},g.y=function(m){return arguments.length?(f=typeof m=="function"?m:ft(+m),g):f},g.context=function(m){return arguments.length?(k=m??null,g):k},g}function Wt(t,n,a,h,f){t.moveTo(n,a),t.bezierCurveTo(n=(n+h)/2,a,n,f,h,f)}function Yt(){return Ut(Wt)}function qt(t){return[t.source.x1,t.y0]}function Gt(t){return[t.target.x0,t.y1]}function Ht(){return Yt().source(qt).target(Gt)}var it=function(){var t=function(m,i,r,l){for(r=r||{},l=m.length;l--;r[m[l]]=i);return r},n=[1,9],a=[1,10],h=[1,5,10,12],f={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(i,r,l,p,b,y,x){var E=y.length-1;switch(b){case 7:const L=p.findOrCreateNode(y[E-4].trim().replaceAll('""','"')),A=p.findOrCreateNode(y[E-2].trim().replaceAll('""','"')),N=parseFloat(y[E].trim());p.addLink(L,A,N);break;case 8:case 9:case 11:this.$=y[E];break;case 10:this.$=y[E-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:a},{1:[2,6],7:11,10:[1,12]},t(a,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(h,[2,8]),t(h,[2,9]),{19:[1,16]},t(h,[2,11]),{1:[2,1]},{1:[2,5]},t(a,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:a},{15:18,16:7,17:8,18:n,20:a},{18:[1,19]},t(a,[2,3]),{12:[1,20]},t(h,[2,10]),{15:21,16:7,17:8,18:n,20:a},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=r,l}},parse:function(i){var r=this,l=[0],p=[],b=[null],y=[],x=this.table,E="",L=0,A=0,N=2,P=1,z=y.slice.call(arguments,1),S=Object.create(this.lexer),M={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(M.yy[O]=this.yy[O]);S.setInput(i,M.yy),M.yy.lexer=S,M.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var C=S.yylloc;y.push(C);var I=S.options&&S.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=p.pop()||S.lex()||P,typeof v!="number"&&(v instanceof Array&&(p=v,v=p.pop()),v=r.symbols_[v]||v),v}for(var w,$,T,R,e={},u,o,c,s;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),T=x[$]&&x[$][w]),typeof T>"u"||!T.length||!T[0]){var _="";s=[];for(u in x[$])this.terminals_[u]&&u>N&&s.push("'"+this.terminals_[u]+"'");S.showPosition?_="Parse error on line "+(L+1)+`: +`+S.showPosition()+` +Expecting `+s.join(", ")+", got '"+(this.terminals_[w]||w)+"'":_="Parse error on line "+(L+1)+": Unexpected "+(w==P?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(_,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:C,expected:s})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(T[0]){case 1:l.push(w),b.push(S.yytext),y.push(S.yylloc),l.push(T[1]),w=null,A=S.yyleng,E=S.yytext,L=S.yylineno,C=S.yylloc;break;case 2:if(o=this.productions_[T[1]][1],e.$=b[b.length-o],e._$={first_line:y[y.length-(o||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(o||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(o||1)].range[0],y[y.length-1].range[1]]),R=this.performAction.apply(e,[E,A,L,M.yy,T[1],b,y].concat(z)),typeof R<"u")return R;o&&(l=l.slice(0,-1*o*2),b=b.slice(0,-1*o),y=y.slice(0,-1*o)),l.push(this.productions_[T[1]][0]),b.push(e.$),y.push(e._$),c=x[l[l.length-2]][l[l.length-1]],l.push(c);break;case 3:return!0}}return!0}},k=function(){var m={EOF:1,parseError:function(r,l){if(this.yy.parser)this.yy.parser.parseError(r,l);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var p=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),l.length-1&&(this.yylineno-=l.length-1);var b=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+r+"^"},test_match:function(i,r){var l,p,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,r,l,p;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;yr[0].length)){if(r=l,p=y,this.options.backtrack_lexer){if(i=this.test_match(l,b[y]),i!==!1)return i;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(i=this.test_match(r,b[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{easy_keword_rules:!0},performAction:function(r,l,p,b){switch(p){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)/,/^(?:$)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:(\u002C))/,/^(?:(\u0022))/,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/,/^(?:(\u0022)(?!(\u0022)))/,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/],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}}};return m}();f.lexer=k;function g(){this.yy={}}return g.prototype=f,f.Parser=g,new g}();it.parser=it;const H=it;let X=[],K=[],B={};const Xt=()=>{X=[],K=[],B={},bt()};class Kt{constructor(n,a,h=0){this.source=n,this.target=a,this.value=h}}const Qt=(t,n,a)=>{X.push(new Kt(t,n,a))};class Zt{constructor(n){this.ID=n}}const Jt=t=>(t=wt.sanitizeText(t,ot()),B[t]||(B[t]=new Zt(t),K.push(B[t])),B[t]),te=()=>K,ee=()=>X,ne=()=>({nodes:K.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),ie={nodesMap:B,getConfig:()=>ot().sankey,getNodes:te,getLinks:ee,getGraph:ne,addLink:Qt,findOrCreateNode:Jt,getAccTitle:pt,setAccTitle:mt,getAccDescription:_t,setAccDescription:kt,getDiagramTitle:xt,setDiagramTitle:vt,clear:Xt},st=class{static next(t){return new st(t+ ++st.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}};let rt=st;rt.count=0;const se={left:Nt,right:Pt,center:Ct,justify:dt},re=function(t,n,a,h){const{securityLevel:f,sankey:k}=ot(),g=St.sankey;let m;f==="sandbox"&&(m=Y("#i"+n));const i=f==="sandbox"?Y(m.nodes()[0].contentDocument.body):Y("body"),r=f==="sandbox"?i.select(`[id="${n}"]`):Y(`[id="${n}"]`),l=(k==null?void 0:k.width)??g.width,p=(k==null?void 0:k.height)??g.width,b=(k==null?void 0:k.useMaxWidth)??g.useMaxWidth,y=(k==null?void 0:k.nodeAlignment)??g.nodeAlignment,x=(k==null?void 0:k.prefix)??g.prefix,E=(k==null?void 0:k.suffix)??g.suffix,L=(k==null?void 0:k.showValues)??g.showValues;Lt(r,p,l,b);const A=h.db.getGraph(),N=se[y],P=10;zt().nodeId(d=>d.id).nodeWidth(P).nodePadding(10+(L?15:0)).nodeAlign(N).extent([[0,0],[l,p]])(A);const S=Et(Tt);r.append("g").attr("class","nodes").selectAll(".node").data(A.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=rt.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=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const M=({id:d,value:w})=>L?`${d} +${x}${Math.round(w*100)/100}${E}`:d;r.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(A.nodes).join("text").attr("x",d=>d.x0(d.y1+d.y0)/2).attr("dy",`${L?"0":"0.35"}em`).attr("text-anchor",d=>d.x0(w.uid=rt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(C){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=C}O.append("path").attr("d",Ht()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width))},oe={draw:re},ae=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),le=H.parse.bind(H);H.parse=t=>le(ae(t));const de={parser:H,db:ie,renderer:oe};export{de as diagram}; diff --git a/backend/web/assets/sequenceDiagram-84aa38e3-a1db5076.js b/backend/web/assets/sequenceDiagram-84aa38e3-3c31c30f.js similarity index 80% rename from backend/web/assets/sequenceDiagram-84aa38e3-a1db5076.js rename to backend/web/assets/sequenceDiagram-84aa38e3-3c31c30f.js index 25c690a7..e6b405f4 100644 --- a/backend/web/assets/sequenceDiagram-84aa38e3-a1db5076.js +++ b/backend/web/assets/sequenceDiagram-84aa38e3-3c31c30f.js @@ -1,4 +1,4 @@ -import{g as Ie,I as Ae,H as Ne,i as pt,s as oe,h as Se,f as Me,m as Re,J as De,o as G,j as Mt,q as w,k as Ve,n as St,p as Ce,F as B,t as ce,a2 as le,a9 as Oe,aa as Be}from"./EchartsRenderer-3d08027d.js";import{d as Ye,a as Fe,g as Rt,b as We,c as qe,e as Xt}from"./svgDrawCommon-42e92da3-e31904ea.js";import"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";var zt=function(){var t=function(dt,m,v,_){for(v=v||{},_=dt.length;_--;v[dt[_]]=m);return v},e=[1,2],o=[1,3],i=[1,5],s=[1,7],n=[2,5],l=[1,15],h=[1,17],p=[1,19],r=[1,20],g=[1,22],y=[1,23],u=[1,24],x=[1,30],b=[1,31],k=[1,32],N=[1,33],D=[1,34],S=[1,35],W=[1,36],M=[1,37],it=[1,38],z=[1,39],X=[1,40],Q=[1,41],j=[1,42],F=[1,44],O=[1,45],q=[1,46],H=[1,48],J=[1,49],$=[1,50],tt=[1,51],E=[1,52],L=[1,53],I=[1,56],P=[1,4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],U=[4,5,22,56,58,59],A=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],te=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,55,56,58,59,60,65,66,67,68,76,86],Ct=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,54,56,58,59,60,65,66,67,68,76,86],ee=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,56,58,59,60,65,66,67,68,76,86],ht=[74,75,76],rt=[1,133],ie=[1,4,5,7,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],Ot={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,create:19,box:20,restOfLine:21,end:22,signal:23,autonumber:24,NUM:25,off:26,activate:27,actor:28,deactivate:29,note_statement:30,links_statement:31,link_statement:32,properties_statement:33,details_statement:34,title:35,legacy_title:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,loop:42,rect:43,opt:44,alt:45,else_sections:46,par:47,par_sections:48,par_over:49,critical:50,option_sections:51,break:52,option:53,and:54,else:55,participant:56,AS:57,participant_actor:58,destroy:59,note:60,placement:61,text2:62,over:63,actor_pair:64,links:65,link:66,properties:67,details:68,spaceList:69,",":70,left_of:71,right_of:72,signaltype:73,"+":74,"-":75,ACTOR:76,SOLID_OPEN_ARROW:77,DOTTED_OPEN_ARROW:78,SOLID_ARROW:79,DOTTED_ARROW:80,SOLID_CROSS:81,DOTTED_CROSS:82,SOLID_POINT:83,DOTTED_POINT:84,TXT:85,open_directive:86,type_directive:87,arg_directive:88,close_directive:89,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"create",20:"box",21:"restOfLine",22:"end",24:"autonumber",25:"NUM",26:"off",27:"activate",29:"deactivate",35:"title",36:"legacy_title",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"loop",43:"rect",44:"opt",45:"alt",47:"par",49:"par_over",50:"critical",52:"break",53:"option",54:"and",55:"else",56:"participant",57:"AS",58:"participant_actor",59:"destroy",60:"note",63:"over",65:"links",66:"link",67:"properties",68:"details",70:",",71:"left_of",72:"right_of",74:"+",75:"-",76:"ACTOR",77:"SOLID_OPEN_ARROW",78:"DOTTED_OPEN_ARROW",79:"SOLID_ARROW",80:"DOTTED_ARROW",81:"SOLID_CROSS",82:"DOTTED_CROSS",83:"SOLID_POINT",84:"DOTTED_POINT",85:"TXT",86:"open_directive",87:"type_directive",88:"arg_directive",89:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,2],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[51,1],[51,4],[48,1],[48,4],[46,1],[46,4],[13,5],[13,3],[13,5],[13,3],[13,3],[30,4],[30,4],[31,3],[32,3],[33,3],[34,3],[69,2],[69,1],[64,3],[64,1],[61,1],[61,1],[23,5],[23,5],[23,4],[28,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[62,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(m,v,_,T,R,c,vt){var d=c.length-1;switch(R){case 4:return T.apply(c[d]),c[d];case 5:case 10:this.$=[];break;case 6:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 7:case 8:case 12:case 13:this.$=c[d];break;case 9:case 14:this.$=[];break;case 18:c[d].type="createParticipant",this.$=c[d];break;case 19:c[d-1].unshift({type:"boxStart",boxData:T.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:T.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 25:this.$={type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:c[d-1]};break;case 26:this.$={type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:c[d-1]};break;case 32:T.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 33:T.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 34:this.$=c[d].trim(),T.setAccTitle(this.$);break;case 35:case 36:this.$=c[d].trim(),T.setAccDescription(this.$);break;case 37:c[d-1].unshift({type:"loopStart",loopText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:T.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"rectStart",color:T.parseMessage(c[d-2]),signalType:T.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:T.parseMessage(c[d-2]),signalType:T.LINETYPE.RECT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"optStart",optText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.OPT_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"altStart",altText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:T.LINETYPE.ALT_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"parStart",parText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"parStart",parText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=c[d-1];break;case 43:c[d-1].unshift({type:"criticalStart",criticalText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:T.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 44:c[d-1].unshift({type:"breakStart",breakText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 47:this.$=c[d-3].concat([{type:"option",optionText:T.parseMessage(c[d-1]),signalType:T.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 49:this.$=c[d-3].concat([{type:"and",parText:T.parseMessage(c[d-1]),signalType:T.LINETYPE.PAR_AND},c[d]]);break;case 51:this.$=c[d-3].concat([{type:"else",altText:T.parseMessage(c[d-1]),signalType:T.LINETYPE.ALT_ELSE},c[d]]);break;case 52:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=T.parseMessage(c[d-1]),this.$=c[d-3];break;case 53:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=T.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 57:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 58:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:T.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 59:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 65:this.$=[c[d-2],c[d]];break;case 66:this.$=c[d];break;case 67:this.$=T.PLACEMENT.LEFTOF;break;case 68:this.$=T.PLACEMENT.RIGHTOF;break;case 69:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:c[d-1]}];break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:c[d-4]}];break;case 71:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 72:this.$={type:"addParticipant",actor:c[d]};break;case 73:this.$=T.LINETYPE.SOLID_OPEN;break;case 74:this.$=T.LINETYPE.DOTTED_OPEN;break;case 75:this.$=T.LINETYPE.SOLID;break;case 76:this.$=T.LINETYPE.DOTTED;break;case 77:this.$=T.LINETYPE.SOLID_CROSS;break;case 78:this.$=T.LINETYPE.DOTTED_CROSS;break;case 79:this.$=T.LINETYPE.SOLID_POINT;break;case 80:this.$=T.LINETYPE.DOTTED_POINT;break;case 81:this.$=T.parseMessage(c[d].trim().substring(1));break;case 82:T.parseDirective("%%{","open_directive");break;case 83:T.parseDirective(c[d],"type_directive");break;case 84:c[d]=c[d].trim().replace(/'/g,'"'),T.parseDirective(c[d],"arg_directive");break;case 85:T.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:o,6:4,7:i,14:6,86:s},{1:[3]},{3:8,4:e,5:o,6:4,7:i,14:6,86:s},{3:9,4:e,5:o,6:4,7:i,14:6,86:s},{3:10,4:e,5:o,6:4,7:i,14:6,86:s},t([1,4,5,19,20,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],n,{8:11}),{15:12,87:[1,13]},{87:[2,82]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{16:54,17:[1,55],89:I},t([17,89],[2,83]),t(P,[2,6]),{6:43,10:57,13:18,14:6,19:p,20:r,23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},t(P,[2,8]),t(P,[2,9]),t(P,[2,17]),{13:58,56:F,58:O,59:q},{21:[1,59]},{5:[1,60]},{5:[1,63],25:[1,61],26:[1,62]},{28:64,76:L},{28:65,76:L},{5:[1,66]},{5:[1,67]},{5:[1,68]},{5:[1,69]},{5:[1,70]},t(P,[2,32]),t(P,[2,33]),{38:[1,71]},{40:[1,72]},t(P,[2,36]),{21:[1,73]},{21:[1,74]},{21:[1,75]},{21:[1,76]},{21:[1,77]},{21:[1,78]},{21:[1,79]},{21:[1,80]},t(P,[2,45]),{28:81,76:L},{28:82,76:L},{28:83,76:L},{73:84,77:[1,85],78:[1,86],79:[1,87],80:[1,88],81:[1,89],82:[1,90],83:[1,91],84:[1,92]},{61:93,63:[1,94],71:[1,95],72:[1,96]},{28:97,76:L},{28:98,76:L},{28:99,76:L},{28:100,76:L},t([5,57,70,77,78,79,80,81,82,83,84,85],[2,72]),{5:[1,101]},{18:102,88:[1,103]},{5:[2,85]},t(P,[2,7]),t(P,[2,18]),t(U,[2,10],{11:104}),t(P,[2,20]),{5:[1,106],25:[1,105]},{5:[1,107]},t(P,[2,24]),{5:[1,108]},{5:[1,109]},t(P,[2,27]),t(P,[2,28]),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,34]),t(P,[2,35]),t(A,n,{8:110}),t(A,n,{8:111}),t(A,n,{8:112}),t(te,n,{46:113,8:114}),t(Ct,n,{48:115,8:116}),t(Ct,n,{8:116,48:117}),t(ee,n,{51:118,8:119}),t(A,n,{8:120}),{5:[1,122],57:[1,121]},{5:[1,124],57:[1,123]},{5:[1,125]},{28:128,74:[1,126],75:[1,127],76:L},t(ht,[2,73]),t(ht,[2,74]),t(ht,[2,75]),t(ht,[2,76]),t(ht,[2,77]),t(ht,[2,78]),t(ht,[2,79]),t(ht,[2,80]),{28:129,76:L},{28:131,64:130,76:L},{76:[2,67]},{76:[2,68]},{62:132,85:rt},{62:134,85:rt},{62:135,85:rt},{62:136,85:rt},t(ie,[2,15]),{16:137,89:I},{89:[2,84]},{4:[1,140],5:[1,142],12:139,13:141,22:[1,138],56:F,58:O,59:q},{5:[1,143]},t(P,[2,22]),t(P,[2,23]),t(P,[2,25]),t(P,[2,26]),{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,144],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,145],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,146],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{22:[1,147]},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[2,50],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,55:[1,148],56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{22:[1,149]},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[2,48],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,54:[1,150],56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{22:[1,151]},{22:[1,152]},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[2,46],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,53:[1,153],56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,154],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{21:[1,155]},t(P,[2,53]),{21:[1,156]},t(P,[2,55]),t(P,[2,56]),{28:157,76:L},{28:158,76:L},{62:159,85:rt},{62:160,85:rt},{62:161,85:rt},{70:[1,162],85:[2,66]},{5:[2,59]},{5:[2,81]},{5:[2,60]},{5:[2,61]},{5:[2,62]},{5:[1,163]},t(P,[2,19]),t(U,[2,11]),{13:164,56:F,58:O,59:q},t(U,[2,13]),t(U,[2,14]),t(P,[2,21]),t(P,[2,37]),t(P,[2,38]),t(P,[2,39]),t(P,[2,40]),{21:[1,165]},t(P,[2,41]),{21:[1,166]},t(P,[2,42]),t(P,[2,43]),{21:[1,167]},t(P,[2,44]),{5:[1,168]},{5:[1,169]},{62:170,85:rt},{62:171,85:rt},{5:[2,71]},{5:[2,57]},{5:[2,58]},{28:172,76:L},t(ie,[2,16]),t(U,[2,12]),t(te,n,{8:114,46:173}),t(Ct,n,{8:116,48:174}),t(ee,n,{8:119,51:175}),t(P,[2,52]),t(P,[2,54]),{5:[2,69]},{5:[2,70]},{85:[2,65]},{22:[2,51]},{22:[2,49]},{22:[2,47]}],defaultActions:{7:[2,82],8:[2,1],9:[2,2],10:[2,3],56:[2,85],95:[2,67],96:[2,68],103:[2,84],132:[2,59],133:[2,81],134:[2,60],135:[2,61],136:[2,62],159:[2,71],160:[2,57],161:[2,58],170:[2,69],171:[2,70],172:[2,65],173:[2,51],174:[2,49],175:[2,47]},parseError:function(m,v){if(v.recoverable)this.trace(m);else{var _=new Error(m);throw _.hash=v,_}},parse:function(m){var v=this,_=[0],T=[],R=[null],c=[],vt=this.table,d="",It=0,se=0,_e=2,ne=1,ke=c.slice.call(arguments,1),Y=Object.create(this.lexer),ut={yy:{}};for(var Yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Yt)&&(ut.yy[Yt]=this.yy[Yt]);Y.setInput(m,ut.yy),ut.yy.lexer=Y,ut.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var Ft=Y.yylloc;c.push(Ft);var Pe=Y.options&&Y.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(){var ot;return ot=T.pop()||Y.lex()||ne,typeof ot!="number"&&(ot instanceof Array&&(T=ot,ot=T.pop()),ot=v.symbols_[ot]||ot),ot}for(var K,ft,et,Wt,yt={},At,at,re,Nt;;){if(ft=_[_.length-1],this.defaultActions[ft]?et=this.defaultActions[ft]:((K===null||typeof K>"u")&&(K=Le()),et=vt[ft]&&vt[ft][K]),typeof et>"u"||!et.length||!et[0]){var qt="";Nt=[];for(At in vt[ft])this.terminals_[At]&&At>_e&&Nt.push("'"+this.terminals_[At]+"'");Y.showPosition?qt="Parse error on line "+(It+1)+`: +import{g as Ie,J as Ae,I as Ne,j as pt,s as oe,i as Se,h as Me,m as Re,K as De,p as G,k as Mt,r as w,l as Ve,o as St,q as Ce,G as B,u as ce,a3 as le,aa as Oe,ab as Be}from"./TextOutput-39ff842e.js";import{d as Ye,a as Fe,g as Rt,b as We,c as qe,e as Xt}from"./svgDrawCommon-42e92da3-fd0afe46.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";var zt=function(){var t=function(dt,m,v,_){for(v=v||{},_=dt.length;_--;v[dt[_]]=m);return v},e=[1,2],o=[1,3],i=[1,5],s=[1,7],n=[2,5],l=[1,15],h=[1,17],p=[1,19],r=[1,20],g=[1,22],y=[1,23],u=[1,24],x=[1,30],b=[1,31],k=[1,32],N=[1,33],D=[1,34],S=[1,35],W=[1,36],M=[1,37],it=[1,38],z=[1,39],X=[1,40],Q=[1,41],j=[1,42],F=[1,44],O=[1,45],q=[1,46],H=[1,48],J=[1,49],$=[1,50],tt=[1,51],E=[1,52],L=[1,53],I=[1,56],P=[1,4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],U=[4,5,22,56,58,59],A=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],te=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,55,56,58,59,60,65,66,67,68,76,86],Ct=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,54,56,58,59,60,65,66,67,68,76,86],ee=[4,5,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,56,58,59,60,65,66,67,68,76,86],ht=[74,75,76],rt=[1,133],ie=[1,4,5,7,19,20,22,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,53,54,55,56,58,59,60,65,66,67,68,76,86],Ot={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,create:19,box:20,restOfLine:21,end:22,signal:23,autonumber:24,NUM:25,off:26,activate:27,actor:28,deactivate:29,note_statement:30,links_statement:31,link_statement:32,properties_statement:33,details_statement:34,title:35,legacy_title:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,loop:42,rect:43,opt:44,alt:45,else_sections:46,par:47,par_sections:48,par_over:49,critical:50,option_sections:51,break:52,option:53,and:54,else:55,participant:56,AS:57,participant_actor:58,destroy:59,note:60,placement:61,text2:62,over:63,actor_pair:64,links:65,link:66,properties:67,details:68,spaceList:69,",":70,left_of:71,right_of:72,signaltype:73,"+":74,"-":75,ACTOR:76,SOLID_OPEN_ARROW:77,DOTTED_OPEN_ARROW:78,SOLID_ARROW:79,DOTTED_ARROW:80,SOLID_CROSS:81,DOTTED_CROSS:82,SOLID_POINT:83,DOTTED_POINT:84,TXT:85,open_directive:86,type_directive:87,arg_directive:88,close_directive:89,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"create",20:"box",21:"restOfLine",22:"end",24:"autonumber",25:"NUM",26:"off",27:"activate",29:"deactivate",35:"title",36:"legacy_title",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"loop",43:"rect",44:"opt",45:"alt",47:"par",49:"par_over",50:"critical",52:"break",53:"option",54:"and",55:"else",56:"participant",57:"AS",58:"participant_actor",59:"destroy",60:"note",63:"over",65:"links",66:"link",67:"properties",68:"details",70:",",71:"left_of",72:"right_of",74:"+",75:"-",76:"ACTOR",77:"SOLID_OPEN_ARROW",78:"DOTTED_OPEN_ARROW",79:"SOLID_ARROW",80:"DOTTED_ARROW",81:"SOLID_CROSS",82:"DOTTED_CROSS",83:"SOLID_POINT",84:"DOTTED_POINT",85:"TXT",86:"open_directive",87:"type_directive",88:"arg_directive",89:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,2],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[51,1],[51,4],[48,1],[48,4],[46,1],[46,4],[13,5],[13,3],[13,5],[13,3],[13,3],[30,4],[30,4],[31,3],[32,3],[33,3],[34,3],[69,2],[69,1],[64,3],[64,1],[61,1],[61,1],[23,5],[23,5],[23,4],[28,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[73,1],[62,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(m,v,_,T,R,c,vt){var d=c.length-1;switch(R){case 4:return T.apply(c[d]),c[d];case 5:case 10:this.$=[];break;case 6:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 7:case 8:case 12:case 13:this.$=c[d];break;case 9:case 14:this.$=[];break;case 18:c[d].type="createParticipant",this.$=c[d];break;case 19:c[d-1].unshift({type:"boxStart",boxData:T.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:T.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:T.LINETYPE.AUTONUMBER};break;case 25:this.$={type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:c[d-1]};break;case 26:this.$={type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:c[d-1]};break;case 32:T.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 33:T.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 34:this.$=c[d].trim(),T.setAccTitle(this.$);break;case 35:case 36:this.$=c[d].trim(),T.setAccDescription(this.$);break;case 37:c[d-1].unshift({type:"loopStart",loopText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:T.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"rectStart",color:T.parseMessage(c[d-2]),signalType:T.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:T.parseMessage(c[d-2]),signalType:T.LINETYPE.RECT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"optStart",optText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.OPT_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"altStart",altText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:T.LINETYPE.ALT_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"parStart",parText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"parStart",parText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:T.LINETYPE.PAR_END}),this.$=c[d-1];break;case 43:c[d-1].unshift({type:"criticalStart",criticalText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:T.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 44:c[d-1].unshift({type:"breakStart",breakText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:T.parseMessage(c[d-2]),signalType:T.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 47:this.$=c[d-3].concat([{type:"option",optionText:T.parseMessage(c[d-1]),signalType:T.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 49:this.$=c[d-3].concat([{type:"and",parText:T.parseMessage(c[d-1]),signalType:T.LINETYPE.PAR_AND},c[d]]);break;case 51:this.$=c[d-3].concat([{type:"else",altText:T.parseMessage(c[d-1]),signalType:T.LINETYPE.ALT_ELSE},c[d]]);break;case 52:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=T.parseMessage(c[d-1]),this.$=c[d-3];break;case 53:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=T.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 57:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 58:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:T.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 59:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 65:this.$=[c[d-2],c[d]];break;case 66:this.$=c[d];break;case 67:this.$=T.PLACEMENT.LEFTOF;break;case 68:this.$=T.PLACEMENT.RIGHTOF;break;case 69:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeStart",signalType:T.LINETYPE.ACTIVE_START,actor:c[d-1]}];break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:T.LINETYPE.ACTIVE_END,actor:c[d-4]}];break;case 71:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 72:this.$={type:"addParticipant",actor:c[d]};break;case 73:this.$=T.LINETYPE.SOLID_OPEN;break;case 74:this.$=T.LINETYPE.DOTTED_OPEN;break;case 75:this.$=T.LINETYPE.SOLID;break;case 76:this.$=T.LINETYPE.DOTTED;break;case 77:this.$=T.LINETYPE.SOLID_CROSS;break;case 78:this.$=T.LINETYPE.DOTTED_CROSS;break;case 79:this.$=T.LINETYPE.SOLID_POINT;break;case 80:this.$=T.LINETYPE.DOTTED_POINT;break;case 81:this.$=T.parseMessage(c[d].trim().substring(1));break;case 82:T.parseDirective("%%{","open_directive");break;case 83:T.parseDirective(c[d],"type_directive");break;case 84:c[d]=c[d].trim().replace(/'/g,'"'),T.parseDirective(c[d],"arg_directive");break;case 85:T.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:o,6:4,7:i,14:6,86:s},{1:[3]},{3:8,4:e,5:o,6:4,7:i,14:6,86:s},{3:9,4:e,5:o,6:4,7:i,14:6,86:s},{3:10,4:e,5:o,6:4,7:i,14:6,86:s},t([1,4,5,19,20,24,27,29,35,36,37,39,41,42,43,44,45,47,49,50,52,56,58,59,60,65,66,67,68,76,86],n,{8:11}),{15:12,87:[1,13]},{87:[2,82]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{16:54,17:[1,55],89:I},t([17,89],[2,83]),t(P,[2,6]),{6:43,10:57,13:18,14:6,19:p,20:r,23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},t(P,[2,8]),t(P,[2,9]),t(P,[2,17]),{13:58,56:F,58:O,59:q},{21:[1,59]},{5:[1,60]},{5:[1,63],25:[1,61],26:[1,62]},{28:64,76:L},{28:65,76:L},{5:[1,66]},{5:[1,67]},{5:[1,68]},{5:[1,69]},{5:[1,70]},t(P,[2,32]),t(P,[2,33]),{38:[1,71]},{40:[1,72]},t(P,[2,36]),{21:[1,73]},{21:[1,74]},{21:[1,75]},{21:[1,76]},{21:[1,77]},{21:[1,78]},{21:[1,79]},{21:[1,80]},t(P,[2,45]),{28:81,76:L},{28:82,76:L},{28:83,76:L},{73:84,77:[1,85],78:[1,86],79:[1,87],80:[1,88],81:[1,89],82:[1,90],83:[1,91],84:[1,92]},{61:93,63:[1,94],71:[1,95],72:[1,96]},{28:97,76:L},{28:98,76:L},{28:99,76:L},{28:100,76:L},t([5,57,70,77,78,79,80,81,82,83,84,85],[2,72]),{5:[1,101]},{18:102,88:[1,103]},{5:[2,85]},t(P,[2,7]),t(P,[2,18]),t(U,[2,10],{11:104}),t(P,[2,20]),{5:[1,106],25:[1,105]},{5:[1,107]},t(P,[2,24]),{5:[1,108]},{5:[1,109]},t(P,[2,27]),t(P,[2,28]),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t(P,[2,34]),t(P,[2,35]),t(A,n,{8:110}),t(A,n,{8:111}),t(A,n,{8:112}),t(te,n,{46:113,8:114}),t(Ct,n,{48:115,8:116}),t(Ct,n,{8:116,48:117}),t(ee,n,{51:118,8:119}),t(A,n,{8:120}),{5:[1,122],57:[1,121]},{5:[1,124],57:[1,123]},{5:[1,125]},{28:128,74:[1,126],75:[1,127],76:L},t(ht,[2,73]),t(ht,[2,74]),t(ht,[2,75]),t(ht,[2,76]),t(ht,[2,77]),t(ht,[2,78]),t(ht,[2,79]),t(ht,[2,80]),{28:129,76:L},{28:131,64:130,76:L},{76:[2,67]},{76:[2,68]},{62:132,85:rt},{62:134,85:rt},{62:135,85:rt},{62:136,85:rt},t(ie,[2,15]),{16:137,89:I},{89:[2,84]},{4:[1,140],5:[1,142],12:139,13:141,22:[1,138],56:F,58:O,59:q},{5:[1,143]},t(P,[2,22]),t(P,[2,23]),t(P,[2,25]),t(P,[2,26]),{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,144],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,145],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,146],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{22:[1,147]},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[2,50],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,55:[1,148],56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{22:[1,149]},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[2,48],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,54:[1,150],56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{22:[1,151]},{22:[1,152]},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[2,46],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,53:[1,153],56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{4:l,5:h,6:43,9:14,10:16,13:18,14:6,19:p,20:r,22:[1,154],23:21,24:g,27:y,28:47,29:u,30:25,31:26,32:27,33:28,34:29,35:x,36:b,37:k,39:N,41:D,42:S,43:W,44:M,45:it,47:z,49:X,50:Q,52:j,56:F,58:O,59:q,60:H,65:J,66:$,67:tt,68:E,76:L,86:s},{21:[1,155]},t(P,[2,53]),{21:[1,156]},t(P,[2,55]),t(P,[2,56]),{28:157,76:L},{28:158,76:L},{62:159,85:rt},{62:160,85:rt},{62:161,85:rt},{70:[1,162],85:[2,66]},{5:[2,59]},{5:[2,81]},{5:[2,60]},{5:[2,61]},{5:[2,62]},{5:[1,163]},t(P,[2,19]),t(U,[2,11]),{13:164,56:F,58:O,59:q},t(U,[2,13]),t(U,[2,14]),t(P,[2,21]),t(P,[2,37]),t(P,[2,38]),t(P,[2,39]),t(P,[2,40]),{21:[1,165]},t(P,[2,41]),{21:[1,166]},t(P,[2,42]),t(P,[2,43]),{21:[1,167]},t(P,[2,44]),{5:[1,168]},{5:[1,169]},{62:170,85:rt},{62:171,85:rt},{5:[2,71]},{5:[2,57]},{5:[2,58]},{28:172,76:L},t(ie,[2,16]),t(U,[2,12]),t(te,n,{8:114,46:173}),t(Ct,n,{8:116,48:174}),t(ee,n,{8:119,51:175}),t(P,[2,52]),t(P,[2,54]),{5:[2,69]},{5:[2,70]},{85:[2,65]},{22:[2,51]},{22:[2,49]},{22:[2,47]}],defaultActions:{7:[2,82],8:[2,1],9:[2,2],10:[2,3],56:[2,85],95:[2,67],96:[2,68],103:[2,84],132:[2,59],133:[2,81],134:[2,60],135:[2,61],136:[2,62],159:[2,71],160:[2,57],161:[2,58],170:[2,69],171:[2,70],172:[2,65],173:[2,51],174:[2,49],175:[2,47]},parseError:function(m,v){if(v.recoverable)this.trace(m);else{var _=new Error(m);throw _.hash=v,_}},parse:function(m){var v=this,_=[0],T=[],R=[null],c=[],vt=this.table,d="",It=0,se=0,_e=2,ne=1,ke=c.slice.call(arguments,1),Y=Object.create(this.lexer),ut={yy:{}};for(var Yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Yt)&&(ut.yy[Yt]=this.yy[Yt]);Y.setInput(m,ut.yy),ut.yy.lexer=Y,ut.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var Ft=Y.yylloc;c.push(Ft);var Pe=Y.options&&Y.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Le(){var ot;return ot=T.pop()||Y.lex()||ne,typeof ot!="number"&&(ot instanceof Array&&(T=ot,ot=T.pop()),ot=v.symbols_[ot]||ot),ot}for(var K,ft,et,Wt,yt={},At,at,re,Nt;;){if(ft=_[_.length-1],this.defaultActions[ft]?et=this.defaultActions[ft]:((K===null||typeof K>"u")&&(K=Le()),et=vt[ft]&&vt[ft][K]),typeof et>"u"||!et.length||!et[0]){var qt="";Nt=[];for(At in vt[ft])this.terminals_[At]&&At>_e&&Nt.push("'"+this.terminals_[At]+"'");Y.showPosition?qt="Parse error on line "+(It+1)+`: `+Y.showPosition()+` Expecting `+Nt.join(", ")+", got '"+(this.terminals_[K]||K)+"'":qt="Parse error on line "+(It+1)+": Unexpected "+(K==ne?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(qt,{text:Y.match,token:this.terminals_[K]||K,line:Y.yylineno,loc:Ft,expected:Nt})}if(et[0]instanceof Array&&et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ft+", token: "+K);switch(et[0]){case 1:_.push(K),R.push(Y.yytext),c.push(Y.yylloc),_.push(et[1]),K=null,se=Y.yyleng,d=Y.yytext,It=Y.yylineno,Ft=Y.yylloc;break;case 2:if(at=this.productions_[et[1]][1],yt.$=R[R.length-at],yt._$={first_line:c[c.length-(at||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(at||1)].first_column,last_column:c[c.length-1].last_column},Pe&&(yt._$.range=[c[c.length-(at||1)].range[0],c[c.length-1].range[1]]),Wt=this.performAction.apply(yt,[d,se,It,ut.yy,et[1],R,c].concat(ke)),typeof Wt<"u")return Wt;at&&(_=_.slice(0,-1*at*2),R=R.slice(0,-1*at),c=c.slice(0,-1*at)),_.push(this.productions_[et[1]][0]),R.push(yt.$),c.push(yt._$),re=vt[_[_.length-2]][_[_.length-1]],_.push(re);break;case 3:return!0}}return!0}},ve=function(){var dt={EOF:1,parseError:function(v,_){if(this.yy.parser)this.yy.parser.parseError(v,_);else throw new Error(v)},setInput:function(m,v){return this.yy=v||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var v=m.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var v=m.length,_=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var T=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),_.length-1&&(this.yylineno-=_.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:_?(_.length===T.length?this.yylloc.first_column:0)+T[T.length-_.length].length-_[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),v=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/backend/web/assets/stateDiagram-9a586ac6-1cfcb484.js b/backend/web/assets/stateDiagram-9a586ac6-1cfcb484.js deleted file mode 100644 index 4a54a204..00000000 --- a/backend/web/assets/stateDiagram-9a586ac6-1cfcb484.js +++ /dev/null @@ -1 +0,0 @@ -import{p as P,d as N,s as W}from"./styles-a1a6e33f-c5345b95.js";import{i as t,n as H,o as b,p as R,q as T,K as v,F as U}from"./EchartsRenderer-3d08027d.js";import{G as C,l as F}from"./layout-e00002c0.js";import"./index-51905ea3.js";import{l as $}from"./line-7fbcfe17.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const O=e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),X=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),J=(e,i)=>{const o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),o},Y=(e,i)=>{const o=function(l,m,w){const E=l.append("tspan").attr("x",2*t().state.padding).text(m);w||E.attr("dy",t().state.textHeight)},s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=s.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,r=!0;i.descriptions.forEach(function(l){a||(o(p,l,r),r=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),d=Math.max(x.width,s.width);return y.attr("x2",d+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",d+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},I=(e,i,o)=>{const c=t().state.padding,s=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,r=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=r.node().getBBox().width+s;let d=Math.max(x,p);d===p&&(d=d+s);let l;const m=e.node().getBBox();i.doc,l=a-c,x>p&&(l=(p-d)/2+c),Math.abs(a-m.x)p&&(l=a-(x-p)/2);const w=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",w).attr("class",o?"alt-composit":"composit").attr("width",d).attr("height",m.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),r.attr("x",l+c),x<=p&&r.attr("x",a+(d-s)/2-x/2+c),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",m.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},q=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),_=(e,i)=>{let o=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let s=o;o=c,c=s}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},K=(e,i,o,c)=>{let s=0;const g=c.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(T.lineBreakRegex);let r=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const d=g.append("tspan");if(d.text(x),r===0){const l=d.node().getBBox();r+=l.height}s+=r,d.attr("x",i+t().state.noteMargin),d.attr("y",o+s+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:s}},Z=(e,i)=>{i.attr("class","state-note");const o=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:s,textHeight:g}=K(e,0,0,c);return o.attr("height",g+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},L=function(e,i){const o=i.id,c={id:o,label:i.id,width:0,height:0},s=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&O(s),i.type==="end"&&q(s),(i.type==="fork"||i.type==="join")&&_(s,i),i.type==="note"&&Z(i.note.text,s),i.type==="divider"&&X(s),i.type==="default"&&i.descriptions.length===0&&J(s,i),i.type==="default"&&i.descriptions.length>0&&Y(s,i);const g=s.node().getBBox();return c.width=g.width+2*t().state.padding,c.height=g.height+2*t().state.padding,c};let G=0;const Q=function(e,i,o){const c=function(r){switch(r){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}};i.points=i.points.filter(r=>!Number.isNaN(r.y));const s=i.points,g=$().x(function(r){return r.x}).y(function(r){return r.y}).curve(v),p=e.append("path").attr("d",g(s)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),o.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:y,y:x}=U.calcLabelPosition(i.points),d=T.getRows(o.title);let l=0;const m=[];let w=0,E=0;for(let u=0;u<=d.length;u++){const h=r.append("text").attr("text-anchor","middle").text(d[u]).attr("x",y).attr("y",x+l),f=h.node().getBBox();w=Math.max(w,f.width),E=Math.min(E,f.x),b.info(f.x,y,x+l),l===0&&(l=h.node().getBBox().height,b.info("Title height",l,x)),m.push(h)}let k=l*d.length;if(d.length>1){const u=(d.length-1)*l*.5;m.forEach((h,f)=>h.attr("y",x+f*l-u)),k=l*d.length}const n=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",y-w/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",w+t().state.padding).attr("height",k+t().state.padding),b.info(n)}G++};let B;const z={},V=function(){},j=function(e){e.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")},D=function(e,i,o,c){B=t().state;const s=t().securityLevel;let g;s==="sandbox"&&(g=H("#i"+i));const p=s==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=s==="sandbox"?g.nodes()[0].contentDocument:document;b.debug("Rendering diagram "+e);const r=p.select(`[id='${i}']`);j(r);const y=c.db.getRootDoc();A(y,r,void 0,!1,p,a,c);const x=B.padding,d=r.node().getBBox(),l=d.width+x*2,m=d.height+x*2,w=l*1.75;R(r,m,w,B.useMaxWidth),r.attr("viewBox",`${d.x-B.padding} ${d.y-B.padding} `+l+" "+m)},tt=e=>e?e.length*B.fontSizeFactor:1,A=(e,i,o,c,s,g,p)=>{const a=new C({compound:!0,multigraph:!0});let r,y=!0;for(r=0;r{const f=h.parentElement;let S=0,M=0;f&&(f.parentElement&&(S=f.parentElement.getBBox().width),M=parseInt(f.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",S-M-8)})):b.debug("No Node "+n+": "+JSON.stringify(a.node(n)))});let E=w.getBBox();a.edges().forEach(function(n){n!==void 0&&a.edge(n)!==void 0&&(b.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(a.edge(n))),Q(i,a.edge(n),a.edge(n).relation))}),E=w.getBBox();const k={id:o||"root",label:o||"root",width:0,height:0};return k.width=E.width+2*B.padding,k.height=E.height+2*B.padding,b.debug("Doc rendered",k,a),k},et={setConf:V,draw:D},lt={parser:P,db:N,renderer:et,styles:W,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()}};export{lt as diagram}; diff --git a/backend/web/assets/stateDiagram-9a586ac6-bcbbce57.js b/backend/web/assets/stateDiagram-9a586ac6-bcbbce57.js new file mode 100644 index 00000000..74676ccf --- /dev/null +++ b/backend/web/assets/stateDiagram-9a586ac6-bcbbce57.js @@ -0,0 +1 @@ +import{p as P,d as N,s as W}from"./styles-a1a6e33f-335bad62.js";import{j as t,o as H,p as b,q as R,r as L,L as v,G as U}from"./TextOutput-39ff842e.js";import{G as C,l as F}from"./layout-218ba7ee.js";import"./index-ef7aa48c.js";import{l as $}from"./line-971ba693.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const O=e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),X=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),J=(e,i)=>{const o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),o},Y=(e,i)=>{const o=function(l,m,w){const E=l.append("tspan").attr("x",2*t().state.padding).text(m);w||E.attr("dy",t().state.textHeight)},s=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=s.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,r=!0;i.descriptions.forEach(function(l){a||(o(p,l,r),r=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),d=Math.max(x.width,s.width);return y.attr("x2",d+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",d+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},I=(e,i,o)=>{const c=t().state.padding,s=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,r=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=r.node().getBBox().width+s;let d=Math.max(x,p);d===p&&(d=d+s);let l;const m=e.node().getBBox();i.doc,l=a-c,x>p&&(l=(p-d)/2+c),Math.abs(a-m.x)p&&(l=a-(x-p)/2);const w=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",w).attr("class",o?"alt-composit":"composit").attr("width",d).attr("height",m.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),r.attr("x",l+c),x<=p&&r.attr("x",a+(d-s)/2-x/2+c),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",d).attr("height",m.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},q=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),_=(e,i)=>{let o=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let s=o;o=c,c=s}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},Z=(e,i,o,c)=>{let s=0;const g=c.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(L.lineBreakRegex);let r=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const d=g.append("tspan");if(d.text(x),r===0){const l=d.node().getBBox();r+=l.height}s+=r,d.attr("x",i+t().state.noteMargin),d.attr("y",o+s+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:s}},j=(e,i)=>{i.attr("class","state-note");const o=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:s,textHeight:g}=Z(e,0,0,c);return o.attr("height",g+2*t().state.noteMargin),o.attr("width",s+t().state.noteMargin*2),o},T=function(e,i){const o=i.id,c={id:o,label:i.id,width:0,height:0},s=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&O(s),i.type==="end"&&q(s),(i.type==="fork"||i.type==="join")&&_(s,i),i.type==="note"&&j(i.note.text,s),i.type==="divider"&&X(s),i.type==="default"&&i.descriptions.length===0&&J(s,i),i.type==="default"&&i.descriptions.length>0&&Y(s,i);const g=s.node().getBBox();return c.width=g.width+2*t().state.padding,c.height=g.height+2*t().state.padding,c};let G=0;const K=function(e,i,o){const c=function(r){switch(r){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}};i.points=i.points.filter(r=>!Number.isNaN(r.y));const s=i.points,g=$().x(function(r){return r.x}).y(function(r){return r.y}).curve(v),p=e.append("path").attr("d",g(s)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),o.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:y,y:x}=U.calcLabelPosition(i.points),d=L.getRows(o.title);let l=0;const m=[];let w=0,E=0;for(let u=0;u<=d.length;u++){const h=r.append("text").attr("text-anchor","middle").text(d[u]).attr("x",y).attr("y",x+l),f=h.node().getBBox();w=Math.max(w,f.width),E=Math.min(E,f.x),b.info(f.x,y,x+l),l===0&&(l=h.node().getBBox().height,b.info("Title height",l,x)),m.push(h)}let k=l*d.length;if(d.length>1){const u=(d.length-1)*l*.5;m.forEach((h,f)=>h.attr("y",x+f*l-u)),k=l*d.length}const n=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",y-w/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",w+t().state.padding).attr("height",k+t().state.padding),b.info(n)}G++};let B;const z={},Q=function(){},V=function(e){e.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")},D=function(e,i,o,c){B=t().state;const s=t().securityLevel;let g;s==="sandbox"&&(g=H("#i"+i));const p=s==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=s==="sandbox"?g.nodes()[0].contentDocument:document;b.debug("Rendering diagram "+e);const r=p.select(`[id='${i}']`);V(r);const y=c.db.getRootDoc();A(y,r,void 0,!1,p,a,c);const x=B.padding,d=r.node().getBBox(),l=d.width+x*2,m=d.height+x*2,w=l*1.75;R(r,m,w,B.useMaxWidth),r.attr("viewBox",`${d.x-B.padding} ${d.y-B.padding} `+l+" "+m)},tt=e=>e?e.length*B.fontSizeFactor:1,A=(e,i,o,c,s,g,p)=>{const a=new C({compound:!0,multigraph:!0});let r,y=!0;for(r=0;r{const f=h.parentElement;let S=0,M=0;f&&(f.parentElement&&(S=f.parentElement.getBBox().width),M=parseInt(f.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",S-M-8)})):b.debug("No Node "+n+": "+JSON.stringify(a.node(n)))});let E=w.getBBox();a.edges().forEach(function(n){n!==void 0&&a.edge(n)!==void 0&&(b.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(a.edge(n))),K(i,a.edge(n),a.edge(n).relation))}),E=w.getBBox();const k={id:o||"root",label:o||"root",width:0,height:0};return k.width=E.width+2*B.padding,k.height=E.height+2*B.padding,b.debug("Doc rendered",k,a),k},et={setConf:Q,draw:D},lt={parser:P,db:N,renderer:et,styles:W,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()}};export{lt as diagram}; diff --git a/backend/web/assets/stateDiagram-v2-96f2b9df-4f3bd457.js b/backend/web/assets/stateDiagram-v2-96f2b9df-4f3bd457.js new file mode 100644 index 00000000..1659813a --- /dev/null +++ b/backend/web/assets/stateDiagram-v2-96f2b9df-4f3bd457.js @@ -0,0 +1 @@ +import{p as J,d as B,s as Q,D as H,a as X,S as Z,b as F,c as I}from"./styles-a1a6e33f-335bad62.js";import{G as tt}from"./layout-218ba7ee.js";import{p as E,j as g,o as x,G as et,q as ot,r as G}from"./TextOutput-39ff842e.js";import{r as st}from"./index-f58d48f9-4ae439b4.js";import"./index-ef7aa48c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./edges-0005682e-ae86cacb.js";import"./createText-3b1f58a4-cb14bcdc.js";import"./svgDraw-70101091-6aa9b265.js";import"./line-971ba693.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const h="rect",C="rectWithTitle",nt="start",it="end",ct="divider",rt="roundedWithTitle",lt="note",at="noteGroup",_="statediagram",dt="state",Et=`${_}-${dt}`,U="transition",St="note",Tt="note-edge",pt=`${U} ${Tt}`,_t=`${_}-${St}`,ut="cluster",Dt=`${_}-${ut}`,bt="cluster-alt",ft=`${_}-${bt}`,V="parent",Y="note",At="state",N="----",ht=`${N}${Y}`,M=`${N}${V}`,m="fill:none",W="fill: #333",z="c",q="text",j="normal";let y={},d=0;const yt=function(t){const n=Object.keys(t);for(const e of n)t[e]},gt=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function $t(t){return t==null?"":t.classes?t.classes.join(" "):""}function R(t="",n=0,e="",i=N){const c=e!==null&&e.length>0?`${i}${e}`:"";return`${At}-${t}${c}-${n}`}const A=(t,n,e,i,c,r)=>{const o=e.id,u=$t(i[o]);if(o!=="root"){let T=h;e.start===!0&&(T=nt),e.start===!1&&(T=it),e.type!==H&&(T=e.type),y[o]||(y[o]={id:o,shape:T,description:G.sanitizeText(o,g()),classes:`${u} ${Et}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=G.sanitizeTextOrArray(s.description,g())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(E.info("Setting cluster for ",o,w(e)),s.type="group",s.dir=w(e),s.shape=e.type===X?ct:rt,s.classes=s.classes+" "+Dt+" "+(r?ft:""));const p={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:R(o,d),type:s.type,padding:15};if(p.centerLabel=!0,e.note){const l={labelStyle:"",shape:lt,labelText:e.note.text,classes:_t,style:"",id:o+ht+"-"+d,domId:R(o,d,Y),type:s.type,padding:15},a={labelStyle:"",shape:at,labelText:e.note.text,classes:s.classes,style:"",id:o+M,domId:R(o,d,V),type:"group",padding:0};d++;const D=o+M;t.setNode(D,a),t.setNode(l.id,l),t.setNode(o,p),t.setParent(o,D),t.setParent(l.id,D);let S=o,b=l.id;e.note.position==="left of"&&(S=l.id,b=o),t.setEdge(S,b,{arrowhead:"none",arrowType:"",style:m,labelStyle:"",classes:pt,arrowheadStyle:W,labelpos:z,labelType:q,thickness:j})}else t.setNode(o,p)}n&&n.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(E.trace("Adding nodes children "),xt(t,e,e.doc,i,c,!r))},xt=(t,n,e,i,c,r)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case F:A(t,n,o,i,c,r);break;case H:A(t,n,o,i,c,r);break;case Z:{A(t,n,o.state1,i,c,r),A(t,n,o.state2,i,c,r);const u={id:"edge"+d,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:m,labelStyle:"",label:G.sanitizeText(o.description,g()),arrowheadStyle:W,labelpos:z,labelType:q,thickness:j,classes:U};t.setEdge(o.state1.id,o.state2.id,u,d),d++}break}})},w=(t,n=I)=>{let e=n;if(t.doc)for(let i=0;i{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,B.clear()}};export{Vt as diagram}; diff --git a/backend/web/assets/stateDiagram-v2-96f2b9df-77469703.js b/backend/web/assets/stateDiagram-v2-96f2b9df-77469703.js deleted file mode 100644 index 14bad269..00000000 --- a/backend/web/assets/stateDiagram-v2-96f2b9df-77469703.js +++ /dev/null @@ -1 +0,0 @@ -import{p as F,d as B,s as J,D as H,a as Q,S as X,b as Z,c as I}from"./styles-a1a6e33f-c5345b95.js";import{G as tt}from"./layout-e00002c0.js";import{o as E,i as g,n as x,F as et,p as ot,q as w}from"./EchartsRenderer-3d08027d.js";import{r as st}from"./index-f58d48f9-594fab58.js";import"./index-51905ea3.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./edges-0005682e-04b6df38.js";import"./createText-3b1f58a4-cf050b71.js";import"./svgDraw-70101091-699797c4.js";import"./line-7fbcfe17.js";import"./array-9f3ba611.js";import"./path-53f90ab3.js";const h="rect",C="rectWithTitle",nt="start",it="end",ct="divider",rt="roundedWithTitle",lt="note",at="noteGroup",_="statediagram",dt="state",Et=`${_}-${dt}`,U="transition",St="note",Tt="note-edge",pt=`${U} ${Tt}`,_t=`${_}-${St}`,ut="cluster",Dt=`${_}-${ut}`,bt="cluster-alt",ft=`${_}-${bt}`,V="parent",Y="note",At="state",N="----",ht=`${N}${Y}`,M=`${N}${V}`,m="fill:none",W="fill: #333",z="c",q="text",K="normal";let y={},d=0;const yt=function(t){const n=Object.keys(t);for(const e of n)t[e]},gt=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function $t(t){return t==null?"":t.classes?t.classes.join(" "):""}function R(t="",n=0,e="",i=N){const c=e!==null&&e.length>0?`${i}${e}`:"";return`${At}-${t}${c}-${n}`}const A=(t,n,e,i,c,r)=>{const o=e.id,u=$t(i[o]);if(o!=="root"){let T=h;e.start===!0&&(T=nt),e.start===!1&&(T=it),e.type!==H&&(T=e.type),y[o]||(y[o]={id:o,shape:T,description:w.sanitizeText(o,g()),classes:`${u} ${Et}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=w.sanitizeTextOrArray(s.description,g())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(E.info("Setting cluster for ",o,G(e)),s.type="group",s.dir=G(e),s.shape=e.type===Q?ct:rt,s.classes=s.classes+" "+Dt+" "+(r?ft:""));const p={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:R(o,d),type:s.type,padding:15};if(p.centerLabel=!0,e.note){const l={labelStyle:"",shape:lt,labelText:e.note.text,classes:_t,style:"",id:o+ht+"-"+d,domId:R(o,d,Y),type:s.type,padding:15},a={labelStyle:"",shape:at,labelText:e.note.text,classes:s.classes,style:"",id:o+M,domId:R(o,d,V),type:"group",padding:0};d++;const D=o+M;t.setNode(D,a),t.setNode(l.id,l),t.setNode(o,p),t.setParent(o,D),t.setParent(l.id,D);let S=o,b=l.id;e.note.position==="left of"&&(S=l.id,b=o),t.setEdge(S,b,{arrowhead:"none",arrowType:"",style:m,labelStyle:"",classes:pt,arrowheadStyle:W,labelpos:z,labelType:q,thickness:K})}else t.setNode(o,p)}n&&n.id!=="root"&&(E.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(E.trace("Adding nodes children "),xt(t,e,e.doc,i,c,!r))},xt=(t,n,e,i,c,r)=>{E.trace("items",e),e.forEach(o=>{switch(o.stmt){case Z:A(t,n,o,i,c,r);break;case H:A(t,n,o,i,c,r);break;case X:{A(t,n,o.state1,i,c,r),A(t,n,o.state2,i,c,r);const u={id:"edge"+d,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:m,labelStyle:"",label:w.sanitizeText(o.description,g()),arrowheadStyle:W,labelpos:z,labelType:q,thickness:K,classes:U};t.setEdge(o.state1.id,o.state2.id,u,d),d++}break}})},G=(t,n=I)=>{let e=n;if(t.doc)for(let i=0;i{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,B.clear()}};export{Vt as diagram}; diff --git a/backend/web/assets/styles-1b0c237a-9ea92680.js b/backend/web/assets/styles-1b0c237a-9ea92680.js deleted file mode 100644 index 6b0652ad..00000000 --- a/backend/web/assets/styles-1b0c237a-9ea92680.js +++ /dev/null @@ -1,110 +0,0 @@ -import{G as V}from"./layout-e00002c0.js";import{S as D,B as F,C as M,D as R,E as U,v as N,o as y,x as j,i as C,q as G,y as $,u as E,n as _,F as H,z as K,G as W}from"./EchartsRenderer-3d08027d.js";import{r as X}from"./index-f58d48f9-594fab58.js";import{aI as J,aK as Q}from"./index-51905ea3.js";function Y(e){return typeof e=="string"?new D([document.querySelectorAll(e)],[document.documentElement]):new D([M(e)],F)}const Z=(e,l)=>R.lang.round(U.parse(e)[l]),O=Z;function fe(e,l){return!!e.children(l).length}function ue(e){return L(e.v)+":"+L(e.w)+":"+L(e.name)}var ee=/:/g;function L(e){return e?String(e).replace(ee,"\\:"):""}function te(e,l){l&&e.attr("style",l)}function we(e,l,c){l&&e.attr("class",l).attr("class",c+" "+e.attr("class"))}function he(e,l){var c=l.graph();if(J(c)){var a=c.transition;if(Q(a))return a(e)}return e}function re(e,l){var c=e.append("foreignObject").attr("width","100000"),a=c.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var i=l.label;switch(typeof i){case"function":a.insert(i);break;case"object":a.insert(function(){return i});break;default:a.html(i)}te(a,l.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var d=a.node().getBoundingClientRect();return c.attr("width",d.width).attr("height",d.height),c}const z={},le=function(e){const l=Object.keys(e);for(const c of l)z[c]=e[c]},q=function(e,l,c,a,i,d){const u=a.select(`[id="${c}"]`);Object.keys(e).forEach(function(p){const r=e[p];let g="default";r.classes.length>0&&(g=r.classes.join(" ")),g=g+" flowchart-label";const w=N(r.styles);let t=r.text!==void 0?r.text:r.id,s;if(y.info("vertex",r,r.labelType),r.labelType==="markdown")y.info("vertex",r,r.labelType);else if(j(C().flowchart.htmlLabels)){const m={label:t.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};s=re(u,m).node(),s.parentNode.removeChild(s)}else{const m=i.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("style",w.labelStyle.replace("color:","fill:"));const k=t.split(G.lineBreakRegex);for(const T of k){const v=i.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=T,m.appendChild(v)}s=m}let b=0,o="";switch(r.type){case"round":b=5,o="rect";break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"odd_right":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}l.setNode(r.id,{labelStyle:w.labelStyle,shape:o,labelText:t,labelType:r.labelType,rx:b,ry:b,class:g,style:w.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:d.db.getTooltip(r.id)||"",domId:d.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:r.type==="group"?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:C().flowchart.padding}),y.info("setNode",{labelStyle:w.labelStyle,labelType:r.labelType,shape:o,labelText:t,rx:b,ry:b,class:g,style:w.style,id:r.id,domId:d.db.lookUpDomId(r.id),width:r.type==="group"?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:C().flowchart.padding})})},P=function(e,l,c){y.info("abc78 edges = ",e);let a=0,i={},d,u;if(e.defaultStyle!==void 0){const n=N(e.defaultStyle);d=n.style,u=n.labelStyle}e.forEach(function(n){a++;const p="L-"+n.start+"-"+n.end;i[p]===void 0?(i[p]=0,y.info("abc78 new entry",p,i[p])):(i[p]++,y.info("abc78 new entry",p,i[p]));let r=p+"-"+i[p];y.info("abc78 new link id to be used is",p,r,i[p]);const g="LS-"+n.start,w="LE-"+n.end,t={style:"",labelStyle:""};switch(t.minlen=n.length||1,n.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let s="",b="";switch(n.stroke){case"normal":s="fill:none;",d!==void 0&&(s=d),u!==void 0&&(b=u),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(n.style!==void 0){const o=N(n.style);s=o.style,b=o.labelStyle}t.style=t.style+=s,t.labelStyle=t.labelStyle+=b,n.interpolate!==void 0?t.curve=$(n.interpolate,E):e.defaultInterpolate!==void 0?t.curve=$(e.defaultInterpolate,E):t.curve=$(z.curve,E),n.text===void 0?n.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=n.labelType,t.label=n.text.replace(G.lineBreakRegex,` -`),n.style===void 0&&(t.style=t.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),t.labelStyle=t.labelStyle.replace("color:","fill:"),t.id=r,t.classes="flowchart-link "+g+" "+w,l.setEdge(n.start,n.end,t,a)})},ae=function(e,l){return l.db.getClasses()},oe=async function(e,l,c,a){y.info("Drawing flowchart");let i=a.db.getDirection();i===void 0&&(i="TD");const{securityLevel:d,flowchart:u}=C(),n=u.nodeSpacing||50,p=u.rankSpacing||50;let r;d==="sandbox"&&(r=_("#i"+l));const g=d==="sandbox"?_(r.nodes()[0].contentDocument.body):_("body"),w=d==="sandbox"?r.nodes()[0].contentDocument:document,t=new V({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:n,ranksep:p,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let s;const b=a.db.getSubGraphs();y.info("Subgraphs - ",b);for(let f=b.length-1;f>=0;f--)s=b[f],y.info("Subgraph - ",s),a.db.addVertex(s.id,{text:s.title,type:s.labelType},"group",void 0,s.classes,s.dir);const o=a.db.getVertices(),m=a.db.getEdges();y.info("Edges",m);let k=0;for(k=b.length-1;k>=0;k--){s=b[k],Y("cluster").append("text");for(let f=0;f{const c=O,a=c(e,"r"),i=c(e,"g"),d=c(e,"b");return W(a,i,d,l)},se=e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span,p { - color: ${e.titleColor}; - } - - .label text,span,p { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.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: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${ne(e.edgeLabelBackground,.5)}; - // background-color: - } - - .cluster rect { - fill: ${e.clusterBkg}; - stroke: ${e.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span,p { - color: ${e.titleColor}; - } - /* .cluster div { - color: ${e.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } -`,ge=se;export{te as a,re as b,he as c,we as d,ue as e,ye as f,ge as g,fe as i,Y as s}; diff --git a/backend/web/assets/styles-1b0c237a-f93a9f01.js b/backend/web/assets/styles-1b0c237a-f93a9f01.js new file mode 100644 index 00000000..949808c5 --- /dev/null +++ b/backend/web/assets/styles-1b0c237a-f93a9f01.js @@ -0,0 +1,110 @@ +import{G as q}from"./layout-218ba7ee.js";import{S as D,C as F,D as M,E as R,F as j,x as A,p as y,y as H,j as C,r as G,z as $,v as E,o as _,G as U,A as K,H as W}from"./TextOutput-39ff842e.js";import{r as X}from"./index-f58d48f9-4ae439b4.js";import{aI as J,aK as Q}from"./index-ef7aa48c.js";function Y(e){return typeof e=="string"?new D([document.querySelectorAll(e)],[document.documentElement]):new D([M(e)],F)}const Z=(e,l)=>R.lang.round(j.parse(e)[l]),O=Z;function fe(e,l){return!!e.children(l).length}function ue(e){return L(e.v)+":"+L(e.w)+":"+L(e.name)}var ee=/:/g;function L(e){return e?String(e).replace(ee,"\\:"):""}function te(e,l){l&&e.attr("style",l)}function we(e,l,c){l&&e.attr("class",l).attr("class",c+" "+e.attr("class"))}function he(e,l){var c=l.graph();if(J(c)){var a=c.transition;if(Q(a))return a(e)}return e}function re(e,l){var c=e.append("foreignObject").attr("width","100000"),a=c.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var i=l.label;switch(typeof i){case"function":a.insert(i);break;case"object":a.insert(function(){return i});break;default:a.html(i)}te(a,l.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var d=a.node().getBoundingClientRect();return c.attr("width",d.width).attr("height",d.height),c}const z={},le=function(e){const l=Object.keys(e);for(const c of l)z[c]=e[c]},P=function(e,l,c,a,i,d){const u=a.select(`[id="${c}"]`);Object.keys(e).forEach(function(p){const r=e[p];let g="default";r.classes.length>0&&(g=r.classes.join(" ")),g=g+" flowchart-label";const w=A(r.styles);let t=r.text!==void 0?r.text:r.id,s;if(y.info("vertex",r,r.labelType),r.labelType==="markdown")y.info("vertex",r,r.labelType);else if(H(C().flowchart.htmlLabels)){const m={label:t.replace(/fa[blrs]?:fa-[\w-]+/g,k=>``)};s=re(u,m).node(),s.parentNode.removeChild(s)}else{const m=i.createElementNS("http://www.w3.org/2000/svg","text");m.setAttribute("style",w.labelStyle.replace("color:","fill:"));const k=t.split(G.lineBreakRegex);for(const T of k){const v=i.createElementNS("http://www.w3.org/2000/svg","tspan");v.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),v.setAttribute("dy","1em"),v.setAttribute("x","1"),v.textContent=T,m.appendChild(v)}s=m}let b=0,o="";switch(r.type){case"round":b=5,o="rect";break;case"square":o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"odd":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"odd_right":o="rect_left_inv_arrow";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"group":o="rect";break;case"doublecircle":o="doublecircle";break;default:o="rect"}l.setNode(r.id,{labelStyle:w.labelStyle,shape:o,labelText:t,labelType:r.labelType,rx:b,ry:b,class:g,style:w.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:d.db.getTooltip(r.id)||"",domId:d.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:r.type==="group"?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:C().flowchart.padding}),y.info("setNode",{labelStyle:w.labelStyle,labelType:r.labelType,shape:o,labelText:t,rx:b,ry:b,class:g,style:w.style,id:r.id,domId:d.db.lookUpDomId(r.id),width:r.type==="group"?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:C().flowchart.padding})})},V=function(e,l,c){y.info("abc78 edges = ",e);let a=0,i={},d,u;if(e.defaultStyle!==void 0){const n=A(e.defaultStyle);d=n.style,u=n.labelStyle}e.forEach(function(n){a++;const p="L-"+n.start+"-"+n.end;i[p]===void 0?(i[p]=0,y.info("abc78 new entry",p,i[p])):(i[p]++,y.info("abc78 new entry",p,i[p]));let r=p+"-"+i[p];y.info("abc78 new link id to be used is",p,r,i[p]);const g="LS-"+n.start,w="LE-"+n.end,t={style:"",labelStyle:""};switch(t.minlen=n.length||1,n.type==="arrow_open"?t.arrowhead="none":t.arrowhead="normal",t.arrowTypeStart="arrow_open",t.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":t.arrowTypeStart="arrow_cross";case"arrow_cross":t.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":t.arrowTypeStart="arrow_point";case"arrow_point":t.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":t.arrowTypeStart="arrow_circle";case"arrow_circle":t.arrowTypeEnd="arrow_circle";break}let s="",b="";switch(n.stroke){case"normal":s="fill:none;",d!==void 0&&(s=d),u!==void 0&&(b=u),t.thickness="normal",t.pattern="solid";break;case"dotted":t.thickness="normal",t.pattern="dotted",t.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":t.thickness="thick",t.pattern="solid",t.style="stroke-width: 3.5px;fill:none;";break;case"invisible":t.thickness="invisible",t.pattern="solid",t.style="stroke-width: 0;fill:none;";break}if(n.style!==void 0){const o=A(n.style);s=o.style,b=o.labelStyle}t.style=t.style+=s,t.labelStyle=t.labelStyle+=b,n.interpolate!==void 0?t.curve=$(n.interpolate,E):e.defaultInterpolate!==void 0?t.curve=$(e.defaultInterpolate,E):t.curve=$(z.curve,E),n.text===void 0?n.style!==void 0&&(t.arrowheadStyle="fill: #333"):(t.arrowheadStyle="fill: #333",t.labelpos="c"),t.labelType=n.labelType,t.label=n.text.replace(G.lineBreakRegex,` +`),n.style===void 0&&(t.style=t.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),t.labelStyle=t.labelStyle.replace("color:","fill:"),t.id=r,t.classes="flowchart-link "+g+" "+w,l.setEdge(n.start,n.end,t,a)})},ae=function(e,l){return l.db.getClasses()},oe=async function(e,l,c,a){y.info("Drawing flowchart");let i=a.db.getDirection();i===void 0&&(i="TD");const{securityLevel:d,flowchart:u}=C(),n=u.nodeSpacing||50,p=u.rankSpacing||50;let r;d==="sandbox"&&(r=_("#i"+l));const g=d==="sandbox"?_(r.nodes()[0].contentDocument.body):_("body"),w=d==="sandbox"?r.nodes()[0].contentDocument:document,t=new q({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:n,ranksep:p,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let s;const b=a.db.getSubGraphs();y.info("Subgraphs - ",b);for(let f=b.length-1;f>=0;f--)s=b[f],y.info("Subgraph - ",s),a.db.addVertex(s.id,{text:s.title,type:s.labelType},"group",void 0,s.classes,s.dir);const o=a.db.getVertices(),m=a.db.getEdges();y.info("Edges",m);let k=0;for(k=b.length-1;k>=0;k--){s=b[k],Y("cluster").append("text");for(let f=0;f{const c=O,a=c(e,"r"),i=c(e,"g"),d=c(e,"b");return W(a,i,d,l)},se=e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.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: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${ne(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`,ge=se;export{te as a,re as b,he as c,we as d,ue as e,ye as f,ge as g,fe as i,Y as s}; diff --git a/backend/web/assets/styles-622362e4-1f0c29e6.js b/backend/web/assets/styles-622362e4-fd075d51.js similarity index 65% rename from backend/web/assets/styles-622362e4-1f0c29e6.js rename to backend/web/assets/styles-622362e4-fd075d51.js index 5165a5dd..438186cb 100644 --- a/backend/web/assets/styles-622362e4-1f0c29e6.js +++ b/backend/web/assets/styles-622362e4-fd075d51.js @@ -1,9 +1,9 @@ -import{s as He,g as qe,f as We,h as Je,i as R,H as Ze,I as $e,m as et,J as tt,o as st,q as De,F as Ve,n as M}from"./EchartsRenderer-3d08027d.js";var Be=function(){var e=function(v,n,r,c){for(r=r||{},c=v.length;c--;r[v[c]]=n);return r},u=[1,34],l=[1,35],o=[1,36],h=[1,37],F=[1,9],g=[1,8],_=[1,19],D=[1,20],Y=[1,21],z=[1,40],L=[1,41],K=[1,27],Q=[1,25],j=[1,26],X=[1,32],H=[1,33],q=[1,28],W=[1,29],J=[1,30],Z=[1,31],f=[1,45],d=[1,42],E=[1,43],C=[1,44],m=[1,46],pe=[1,24],a=[1,16,24],$=[1,60],ee=[1,61],te=[1,62],se=[1,63],ie=[1,64],fe=[1,65],de=[1,66],ue=[1,16,24,52],Ne=[1,77],w=[1,16,24,27,28,36,50,52,55,68,69,70,71,72,73,74,79,81],ne=[1,16,24,27,28,34,36,50,52,55,59,68,69,70,71,72,73,74,79,81,94,96,97,98,99],Le=[1,86],re=[28,94,96,97,98,99],V=[28,73,74,94,96,97,98,99],Ie=[28,68,69,70,71,72,94,96,97,98,99],Ee=[1,99],Ce=[1,16,24,50,52,55],ae=[1,16,24,36],xe=[8,9,10,11,19,23,44,46,48,53,57,58,60,61,63,65,75,76,78,82,94,96,97,98,99],ke={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,statements:6,direction:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,EOF:24,statement:25,classLabel:26,SQS:27,STR:28,SQE:29,namespaceName:30,alphaNumToken:31,className:32,classLiteralName:33,GENERICTYPE:34,relationStatement:35,LABEL:36,namespaceStatement:37,classStatement:38,methodStatement:39,annotationStatement:40,clickStatement:41,cssClassStatement:42,noteStatement:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,namespaceIdentifier:49,STRUCT_START:50,classStatements:51,STRUCT_STOP:52,NAMESPACE:53,classIdentifier:54,STYLE_SEPARATOR:55,members:56,CLASS:57,ANNOTATION_START:58,ANNOTATION_END:59,MEMBER:60,SEPARATOR:61,relation:62,NOTE_FOR:63,noteText:64,NOTE:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,CSSCLASS:82,commentToken:83,textToken:84,graphCodeTokens:85,textNoTagsToken:86,TAGSTART:87,TAGEND:88,"==":89,"--":90,PCT:91,DEFAULT:92,SPACE:93,MINUS:94,keywords:95,UNICODE_TEXT:96,NUM:97,ALPHA:98,BQUOTE_STR:99,$accept:0,$end:1},terminals_:{2:"error",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",24:"EOF",27:"SQS",28:"STR",29:"SQE",34:"GENERICTYPE",36:"LABEL",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",50:"STRUCT_START",52:"STRUCT_STOP",53:"NAMESPACE",55:"STYLE_SEPARATOR",57:"CLASS",58:"ANNOTATION_START",59:"ANNOTATION_END",60:"MEMBER",61:"SEPARATOR",63:"NOTE_FOR",65:"NOTE",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"CSSCLASS",85:"graphCodeTokens",87:"TAGSTART",88:"TAGEND",89:"==",90:"--",91:"PCT",92:"DEFAULT",93:"SPACE",94:"MINUS",95:"keywords",96:"UNICODE_TEXT",97:"NUM",98:"ALPHA",99:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[3,1],[7,1],[7,1],[7,1],[7,1],[4,1],[5,4],[5,6],[13,1],[14,1],[18,1],[15,1],[12,4],[6,1],[6,2],[6,3],[26,3],[30,1],[30,2],[32,1],[32,1],[32,2],[32,2],[32,2],[25,1],[25,2],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,2],[25,2],[25,1],[37,4],[37,5],[49,2],[51,1],[51,2],[51,3],[38,1],[38,3],[38,4],[38,6],[54,2],[54,3],[40,4],[56,1],[56,2],[39,1],[39,2],[39,1],[39,1],[35,3],[35,4],[35,4],[35,5],[43,3],[43,2],[62,3],[62,2],[62,2],[62,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[41,3],[41,4],[41,3],[41,4],[41,4],[41,5],[41,3],[41,4],[41,4],[41,5],[41,4],[41,5],[41,5],[41,6],[42,3],[83,1],[83,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[86,1],[86,1],[86,1],[86,1],[31,1],[31,1],[31,1],[31,1],[33,1],[64,1]],performAction:function(n,r,c,i,A,t,G){var s=t.length-1;switch(A){case 4:i.setDirection("TB");break;case 5:i.setDirection("BT");break;case 6:i.setDirection("RL");break;case 7:i.setDirection("LR");break;case 11:i.parseDirective("%%{","open_directive");break;case 12:i.parseDirective(t[s],"type_directive");break;case 13:t[s]=t[s].trim().replace(/'/g,'"'),i.parseDirective(t[s],"arg_directive");break;case 14:i.parseDirective("}%%","close_directive","class");break;case 19:this.$=t[s-1];break;case 20:case 22:case 23:this.$=t[s];break;case 21:case 24:this.$=t[s-1]+t[s];break;case 25:case 26:this.$=t[s-1]+"~"+t[s]+"~";break;case 27:i.addRelation(t[s]);break;case 28:t[s-1].title=i.cleanupLabel(t[s]),i.addRelation(t[s-1]);break;case 37:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 40:i.addClassesToNamespace(t[s-3],t[s-1]);break;case 41:i.addClassesToNamespace(t[s-4],t[s-1]);break;case 42:this.$=t[s],i.addNamespace(t[s]);break;case 43:this.$=[t[s]];break;case 44:this.$=[t[s-1]];break;case 45:t[s].unshift(t[s-2]),this.$=t[s];break;case 47:i.setCssClass(t[s-2],t[s]);break;case 48:i.addMembers(t[s-3],t[s-1]);break;case 49:i.setCssClass(t[s-5],t[s-3]),i.addMembers(t[s-5],t[s-1]);break;case 50:this.$=t[s],i.addClass(t[s]);break;case 51:this.$=t[s-1],i.addClass(t[s-1]),i.setClassLabel(t[s-1],t[s]);break;case 52:i.addAnnotation(t[s],t[s-2]);break;case 53:this.$=[t[s]];break;case 54:t[s].push(t[s-1]),this.$=t[s];break;case 55:break;case 56:i.addMember(t[s-1],i.cleanupLabel(t[s]));break;case 57:break;case 58:break;case 59:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 60:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 61:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 62:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 63:i.addNote(t[s],t[s-1]);break;case 64:i.addNote(t[s]);break;case 65:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 66:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 67:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 68:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 69:this.$=i.relationType.AGGREGATION;break;case 70:this.$=i.relationType.EXTENSION;break;case 71:this.$=i.relationType.COMPOSITION;break;case 72:this.$=i.relationType.DEPENDENCY;break;case 73:this.$=i.relationType.LOLLIPOP;break;case 74:this.$=i.lineType.LINE;break;case 75:this.$=i.lineType.DOTTED_LINE;break;case 76:case 82:this.$=t[s-2],i.setClickEvent(t[s-1],t[s]);break;case 77:case 83:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 78:this.$=t[s-2],i.setLink(t[s-1],t[s]);break;case 79:this.$=t[s-3],i.setLink(t[s-2],t[s-1],t[s]);break;case 80:this.$=t[s-3],i.setLink(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 81:this.$=t[s-4],i.setLink(t[s-3],t[s-2],t[s]),i.setTooltip(t[s-3],t[s-1]);break;case 84:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1],t[s]);break;case 85:this.$=t[s-4],i.setClickEvent(t[s-3],t[s-2],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 86:this.$=t[s-3],i.setLink(t[s-2],t[s]);break;case 87:this.$=t[s-4],i.setLink(t[s-3],t[s-1],t[s]);break;case 88:this.$=t[s-4],i.setLink(t[s-3],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 89:this.$=t[s-5],i.setLink(t[s-4],t[s-2],t[s]),i.setTooltip(t[s-4],t[s-1]);break;case 90:i.setCssClass(t[s-1],t[s]);break}},table:[{3:1,4:2,5:3,6:4,7:18,8:u,9:l,10:o,11:h,12:5,13:6,19:F,23:g,25:7,31:38,32:22,33:39,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,44:_,46:D,48:Y,49:23,53:z,54:24,57:L,58:K,60:Q,61:j,63:X,65:H,75:q,76:W,78:J,82:Z,94:f,96:d,97:E,98:C,99:m},{1:[3]},{1:[2,1]},{3:47,4:2,5:3,6:4,7:18,8:u,9:l,10:o,11:h,12:5,13:6,19:F,23:g,25:7,31:38,32:22,33:39,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,44:_,46:D,48:Y,49:23,53:z,54:24,57:L,58:K,60:Q,61:j,63:X,65:H,75:q,76:W,78:J,82:Z,94:f,96:d,97:E,98:C,99:m},{1:[2,3]},{1:[2,8]},{14:48,20:[1,49]},e(pe,[2,16],{16:[1,50]}),{16:[1,51]},{20:[2,11]},e(a,[2,27],{36:[1,52]}),e(a,[2,29]),e(a,[2,30]),e(a,[2,31]),e(a,[2,32]),e(a,[2,33]),e(a,[2,34]),e(a,[2,35]),e(a,[2,36]),{45:[1,53]},{47:[1,54]},e(a,[2,39]),e(a,[2,55],{62:55,66:58,67:59,28:[1,56],36:[1,57],68:$,69:ee,70:te,71:se,72:ie,73:fe,74:de}),{50:[1,67]},e(ue,[2,46],{50:[1,69],55:[1,68]}),e(a,[2,57]),e(a,[2,58]),{31:70,94:f,96:d,97:E,98:C},{31:38,32:71,33:39,94:f,96:d,97:E,98:C,99:m},{31:38,32:72,33:39,94:f,96:d,97:E,98:C,99:m},{31:38,32:73,33:39,94:f,96:d,97:E,98:C,99:m},{28:[1,74]},{31:38,32:75,33:39,94:f,96:d,97:E,98:C,99:m},{28:Ne,64:76},e(a,[2,4]),e(a,[2,5]),e(a,[2,6]),e(a,[2,7]),e(w,[2,22],{31:38,33:39,32:78,34:[1,79],94:f,96:d,97:E,98:C,99:m}),e(w,[2,23],{34:[1,80]}),{30:81,31:82,94:f,96:d,97:E,98:C},{31:38,32:83,33:39,94:f,96:d,97:E,98:C,99:m},e(ne,[2,104]),e(ne,[2,105]),e(ne,[2,106]),e(ne,[2,107]),e([1,16,24,27,28,34,36,50,52,55,68,69,70,71,72,73,74,79,81],[2,108]),{1:[2,2]},{15:84,17:[1,85],22:Le},e([17,22],[2,12]),e(pe,[2,17],{25:7,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,7:18,32:22,49:23,54:24,31:38,33:39,6:87,8:u,9:l,10:o,11:h,44:_,46:D,48:Y,53:z,57:L,58:K,60:Q,61:j,63:X,65:H,75:q,76:W,78:J,82:Z,94:f,96:d,97:E,98:C,99:m}),{6:88,7:18,8:u,9:l,10:o,11:h,25:7,31:38,32:22,33:39,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,44:_,46:D,48:Y,49:23,53:z,54:24,57:L,58:K,60:Q,61:j,63:X,65:H,75:q,76:W,78:J,82:Z,94:f,96:d,97:E,98:C,99:m},e(a,[2,28]),e(a,[2,37]),e(a,[2,38]),{28:[1,90],31:38,32:89,33:39,94:f,96:d,97:E,98:C,99:m},{62:91,66:58,67:59,68:$,69:ee,70:te,71:se,72:ie,73:fe,74:de},e(a,[2,56]),{67:92,73:fe,74:de},e(re,[2,68],{66:93,68:$,69:ee,70:te,71:se,72:ie}),e(V,[2,69]),e(V,[2,70]),e(V,[2,71]),e(V,[2,72]),e(V,[2,73]),e(Ie,[2,74]),e(Ie,[2,75]),{16:[1,95],38:96,51:94,54:24,57:L},{31:97,94:f,96:d,97:E,98:C},{56:98,60:Ee},{59:[1,100]},{28:[1,101]},{28:[1,102]},{79:[1,103],81:[1,104]},{31:105,94:f,96:d,97:E,98:C},{28:Ne,64:106},e(a,[2,64]),e(a,[2,109]),e(w,[2,24]),e(w,[2,25]),e(w,[2,26]),{50:[2,42]},{30:107,31:82,50:[2,20],94:f,96:d,97:E,98:C},e(Ce,[2,50],{26:108,27:[1,109]}),{16:[1,110]},{18:111,21:[1,112]},{16:[2,14]},e(pe,[2,18]),{24:[1,113]},e(ae,[2,59]),{31:38,32:114,33:39,94:f,96:d,97:E,98:C,99:m},{28:[1,116],31:38,32:115,33:39,94:f,96:d,97:E,98:C,99:m},e(re,[2,67],{66:117,68:$,69:ee,70:te,71:se,72:ie}),e(re,[2,66]),{52:[1,118]},{38:96,51:119,54:24,57:L},{16:[1,120],52:[2,43]},e(ue,[2,47],{50:[1,121]}),{52:[1,122]},{52:[2,53],56:123,60:Ee},{31:38,32:124,33:39,94:f,96:d,97:E,98:C,99:m},e(a,[2,76],{28:[1,125]}),e(a,[2,78],{28:[1,127],77:[1,126]}),e(a,[2,82],{28:[1,128],80:[1,129]}),{28:[1,130]},e(a,[2,90]),e(a,[2,63]),{50:[2,21]},e(Ce,[2,51]),{28:[1,131]},e(xe,[2,9]),{15:132,22:Le},{22:[2,13]},{1:[2,15]},e(ae,[2,61]),e(ae,[2,60]),{31:38,32:133,33:39,94:f,96:d,97:E,98:C,99:m},e(re,[2,65]),e(a,[2,40]),{52:[1,134]},{38:96,51:135,52:[2,44],54:24,57:L},{56:136,60:Ee},e(ue,[2,48]),{52:[2,54]},e(a,[2,52]),e(a,[2,77]),e(a,[2,79]),e(a,[2,80],{77:[1,137]}),e(a,[2,83]),e(a,[2,84],{28:[1,138]}),e(a,[2,86],{28:[1,140],77:[1,139]}),{29:[1,141]},{16:[1,142]},e(ae,[2,62]),e(a,[2,41]),{52:[2,45]},{52:[1,143]},e(a,[2,81]),e(a,[2,85]),e(a,[2,87]),e(a,[2,88],{77:[1,144]}),e(Ce,[2,19]),e(xe,[2,10]),e(ue,[2,49]),e(a,[2,89])],defaultActions:{2:[2,1],4:[2,3],5:[2,8],9:[2,11],47:[2,2],81:[2,42],86:[2,14],107:[2,21],112:[2,13],113:[2,15],123:[2,54],135:[2,45]},parseError:function(n,r){if(r.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=r,c}},parse:function(n){var r=this,c=[0],i=[],A=[null],t=[],G=this.table,s="",ce=0,Oe=0,Ke=2,Re=1,Qe=t.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var me in this.yy)Object.prototype.hasOwnProperty.call(this.yy,me)&&(I.yy[me]=this.yy[me]);k.setInput(n,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Fe=k.yylloc;t.push(Fe);var je=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xe(){var y;return y=i.pop()||k.lex()||Re,typeof y!="number"&&(y instanceof Array&&(i=y,y=i.pop()),y=r.symbols_[y]||y),y}for(var b,x,B,be,O={},le,T,Pe,oe;;){if(x=c[c.length-1],this.defaultActions[x]?B=this.defaultActions[x]:((b===null||typeof b>"u")&&(b=Xe()),B=G[x]&&G[x][b]),typeof B>"u"||!B.length||!B[0]){var _e="";oe=[];for(le in G[x])this.terminals_[le]&&le>Ke&&oe.push("'"+this.terminals_[le]+"'");k.showPosition?_e="Parse error on line "+(ce+1)+`: +import{s as He,g as We,h as qe,i as Je,j as R,I as Ze,J as $e,m as et,K as tt,p as st,r as De,G as Ve,o as M}from"./TextOutput-39ff842e.js";var Be=function(){var e=function(v,n,r,c){for(r=r||{},c=v.length;c--;r[v[c]]=n);return r},u=[1,34],l=[1,35],o=[1,36],h=[1,37],F=[1,9],g=[1,8],_=[1,19],D=[1,20],K=[1,21],Y=[1,40],L=[1,41],z=[1,27],j=[1,25],Q=[1,26],X=[1,32],H=[1,33],W=[1,28],q=[1,29],J=[1,30],Z=[1,31],f=[1,45],d=[1,42],E=[1,43],C=[1,44],m=[1,46],pe=[1,24],a=[1,16,24],$=[1,60],ee=[1,61],te=[1,62],se=[1,63],ie=[1,64],fe=[1,65],de=[1,66],ue=[1,16,24,52],Ne=[1,77],w=[1,16,24,27,28,36,50,52,55,68,69,70,71,72,73,74,79,81],ne=[1,16,24,27,28,34,36,50,52,55,59,68,69,70,71,72,73,74,79,81,94,96,97,98,99],Le=[1,86],re=[28,94,96,97,98,99],V=[28,73,74,94,96,97,98,99],Ie=[28,68,69,70,71,72,94,96,97,98,99],Ee=[1,99],Ce=[1,16,24,50,52,55],ae=[1,16,24,36],xe=[8,9,10,11,19,23,44,46,48,53,57,58,60,61,63,65,75,76,78,82,94,96,97,98,99],ke={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,statements:6,direction:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,EOF:24,statement:25,classLabel:26,SQS:27,STR:28,SQE:29,namespaceName:30,alphaNumToken:31,className:32,classLiteralName:33,GENERICTYPE:34,relationStatement:35,LABEL:36,namespaceStatement:37,classStatement:38,methodStatement:39,annotationStatement:40,clickStatement:41,cssClassStatement:42,noteStatement:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,namespaceIdentifier:49,STRUCT_START:50,classStatements:51,STRUCT_STOP:52,NAMESPACE:53,classIdentifier:54,STYLE_SEPARATOR:55,members:56,CLASS:57,ANNOTATION_START:58,ANNOTATION_END:59,MEMBER:60,SEPARATOR:61,relation:62,NOTE_FOR:63,noteText:64,NOTE:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,CSSCLASS:82,commentToken:83,textToken:84,graphCodeTokens:85,textNoTagsToken:86,TAGSTART:87,TAGEND:88,"==":89,"--":90,PCT:91,DEFAULT:92,SPACE:93,MINUS:94,keywords:95,UNICODE_TEXT:96,NUM:97,ALPHA:98,BQUOTE_STR:99,$accept:0,$end:1},terminals_:{2:"error",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",24:"EOF",27:"SQS",28:"STR",29:"SQE",34:"GENERICTYPE",36:"LABEL",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",50:"STRUCT_START",52:"STRUCT_STOP",53:"NAMESPACE",55:"STYLE_SEPARATOR",57:"CLASS",58:"ANNOTATION_START",59:"ANNOTATION_END",60:"MEMBER",61:"SEPARATOR",63:"NOTE_FOR",65:"NOTE",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"CSSCLASS",85:"graphCodeTokens",87:"TAGSTART",88:"TAGEND",89:"==",90:"--",91:"PCT",92:"DEFAULT",93:"SPACE",94:"MINUS",95:"keywords",96:"UNICODE_TEXT",97:"NUM",98:"ALPHA",99:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[3,1],[7,1],[7,1],[7,1],[7,1],[4,1],[5,4],[5,6],[13,1],[14,1],[18,1],[15,1],[12,4],[6,1],[6,2],[6,3],[26,3],[30,1],[30,2],[32,1],[32,1],[32,2],[32,2],[32,2],[25,1],[25,2],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,2],[25,2],[25,1],[37,4],[37,5],[49,2],[51,1],[51,2],[51,3],[38,1],[38,3],[38,4],[38,6],[54,2],[54,3],[40,4],[56,1],[56,2],[39,1],[39,2],[39,1],[39,1],[35,3],[35,4],[35,4],[35,5],[43,3],[43,2],[62,3],[62,2],[62,2],[62,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[41,3],[41,4],[41,3],[41,4],[41,4],[41,5],[41,3],[41,4],[41,4],[41,5],[41,4],[41,5],[41,5],[41,6],[42,3],[83,1],[83,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[86,1],[86,1],[86,1],[86,1],[31,1],[31,1],[31,1],[31,1],[33,1],[64,1]],performAction:function(n,r,c,i,A,t,G){var s=t.length-1;switch(A){case 4:i.setDirection("TB");break;case 5:i.setDirection("BT");break;case 6:i.setDirection("RL");break;case 7:i.setDirection("LR");break;case 11:i.parseDirective("%%{","open_directive");break;case 12:i.parseDirective(t[s],"type_directive");break;case 13:t[s]=t[s].trim().replace(/'/g,'"'),i.parseDirective(t[s],"arg_directive");break;case 14:i.parseDirective("}%%","close_directive","class");break;case 19:this.$=t[s-1];break;case 20:case 22:case 23:this.$=t[s];break;case 21:case 24:this.$=t[s-1]+t[s];break;case 25:case 26:this.$=t[s-1]+"~"+t[s]+"~";break;case 27:i.addRelation(t[s]);break;case 28:t[s-1].title=i.cleanupLabel(t[s]),i.addRelation(t[s-1]);break;case 37:this.$=t[s].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),i.setAccDescription(this.$);break;case 40:i.addClassesToNamespace(t[s-3],t[s-1]);break;case 41:i.addClassesToNamespace(t[s-4],t[s-1]);break;case 42:this.$=t[s],i.addNamespace(t[s]);break;case 43:this.$=[t[s]];break;case 44:this.$=[t[s-1]];break;case 45:t[s].unshift(t[s-2]),this.$=t[s];break;case 47:i.setCssClass(t[s-2],t[s]);break;case 48:i.addMembers(t[s-3],t[s-1]);break;case 49:i.setCssClass(t[s-5],t[s-3]),i.addMembers(t[s-5],t[s-1]);break;case 50:this.$=t[s],i.addClass(t[s]);break;case 51:this.$=t[s-1],i.addClass(t[s-1]),i.setClassLabel(t[s-1],t[s]);break;case 52:i.addAnnotation(t[s],t[s-2]);break;case 53:this.$=[t[s]];break;case 54:t[s].push(t[s-1]),this.$=t[s];break;case 55:break;case 56:i.addMember(t[s-1],i.cleanupLabel(t[s]));break;case 57:break;case 58:break;case 59:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 60:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 61:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 62:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 63:i.addNote(t[s],t[s-1]);break;case 64:i.addNote(t[s]);break;case 65:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 66:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 67:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 68:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 69:this.$=i.relationType.AGGREGATION;break;case 70:this.$=i.relationType.EXTENSION;break;case 71:this.$=i.relationType.COMPOSITION;break;case 72:this.$=i.relationType.DEPENDENCY;break;case 73:this.$=i.relationType.LOLLIPOP;break;case 74:this.$=i.lineType.LINE;break;case 75:this.$=i.lineType.DOTTED_LINE;break;case 76:case 82:this.$=t[s-2],i.setClickEvent(t[s-1],t[s]);break;case 77:case 83:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 78:this.$=t[s-2],i.setLink(t[s-1],t[s]);break;case 79:this.$=t[s-3],i.setLink(t[s-2],t[s-1],t[s]);break;case 80:this.$=t[s-3],i.setLink(t[s-2],t[s-1]),i.setTooltip(t[s-2],t[s]);break;case 81:this.$=t[s-4],i.setLink(t[s-3],t[s-2],t[s]),i.setTooltip(t[s-3],t[s-1]);break;case 84:this.$=t[s-3],i.setClickEvent(t[s-2],t[s-1],t[s]);break;case 85:this.$=t[s-4],i.setClickEvent(t[s-3],t[s-2],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 86:this.$=t[s-3],i.setLink(t[s-2],t[s]);break;case 87:this.$=t[s-4],i.setLink(t[s-3],t[s-1],t[s]);break;case 88:this.$=t[s-4],i.setLink(t[s-3],t[s-1]),i.setTooltip(t[s-3],t[s]);break;case 89:this.$=t[s-5],i.setLink(t[s-4],t[s-2],t[s]),i.setTooltip(t[s-4],t[s-1]);break;case 90:i.setCssClass(t[s-1],t[s]);break}},table:[{3:1,4:2,5:3,6:4,7:18,8:u,9:l,10:o,11:h,12:5,13:6,19:F,23:g,25:7,31:38,32:22,33:39,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,44:_,46:D,48:K,49:23,53:Y,54:24,57:L,58:z,60:j,61:Q,63:X,65:H,75:W,76:q,78:J,82:Z,94:f,96:d,97:E,98:C,99:m},{1:[3]},{1:[2,1]},{3:47,4:2,5:3,6:4,7:18,8:u,9:l,10:o,11:h,12:5,13:6,19:F,23:g,25:7,31:38,32:22,33:39,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,44:_,46:D,48:K,49:23,53:Y,54:24,57:L,58:z,60:j,61:Q,63:X,65:H,75:W,76:q,78:J,82:Z,94:f,96:d,97:E,98:C,99:m},{1:[2,3]},{1:[2,8]},{14:48,20:[1,49]},e(pe,[2,16],{16:[1,50]}),{16:[1,51]},{20:[2,11]},e(a,[2,27],{36:[1,52]}),e(a,[2,29]),e(a,[2,30]),e(a,[2,31]),e(a,[2,32]),e(a,[2,33]),e(a,[2,34]),e(a,[2,35]),e(a,[2,36]),{45:[1,53]},{47:[1,54]},e(a,[2,39]),e(a,[2,55],{62:55,66:58,67:59,28:[1,56],36:[1,57],68:$,69:ee,70:te,71:se,72:ie,73:fe,74:de}),{50:[1,67]},e(ue,[2,46],{50:[1,69],55:[1,68]}),e(a,[2,57]),e(a,[2,58]),{31:70,94:f,96:d,97:E,98:C},{31:38,32:71,33:39,94:f,96:d,97:E,98:C,99:m},{31:38,32:72,33:39,94:f,96:d,97:E,98:C,99:m},{31:38,32:73,33:39,94:f,96:d,97:E,98:C,99:m},{28:[1,74]},{31:38,32:75,33:39,94:f,96:d,97:E,98:C,99:m},{28:Ne,64:76},e(a,[2,4]),e(a,[2,5]),e(a,[2,6]),e(a,[2,7]),e(w,[2,22],{31:38,33:39,32:78,34:[1,79],94:f,96:d,97:E,98:C,99:m}),e(w,[2,23],{34:[1,80]}),{30:81,31:82,94:f,96:d,97:E,98:C},{31:38,32:83,33:39,94:f,96:d,97:E,98:C,99:m},e(ne,[2,104]),e(ne,[2,105]),e(ne,[2,106]),e(ne,[2,107]),e([1,16,24,27,28,34,36,50,52,55,68,69,70,71,72,73,74,79,81],[2,108]),{1:[2,2]},{15:84,17:[1,85],22:Le},e([17,22],[2,12]),e(pe,[2,17],{25:7,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,7:18,32:22,49:23,54:24,31:38,33:39,6:87,8:u,9:l,10:o,11:h,44:_,46:D,48:K,53:Y,57:L,58:z,60:j,61:Q,63:X,65:H,75:W,76:q,78:J,82:Z,94:f,96:d,97:E,98:C,99:m}),{6:88,7:18,8:u,9:l,10:o,11:h,25:7,31:38,32:22,33:39,35:10,37:11,38:12,39:13,40:14,41:15,42:16,43:17,44:_,46:D,48:K,49:23,53:Y,54:24,57:L,58:z,60:j,61:Q,63:X,65:H,75:W,76:q,78:J,82:Z,94:f,96:d,97:E,98:C,99:m},e(a,[2,28]),e(a,[2,37]),e(a,[2,38]),{28:[1,90],31:38,32:89,33:39,94:f,96:d,97:E,98:C,99:m},{62:91,66:58,67:59,68:$,69:ee,70:te,71:se,72:ie,73:fe,74:de},e(a,[2,56]),{67:92,73:fe,74:de},e(re,[2,68],{66:93,68:$,69:ee,70:te,71:se,72:ie}),e(V,[2,69]),e(V,[2,70]),e(V,[2,71]),e(V,[2,72]),e(V,[2,73]),e(Ie,[2,74]),e(Ie,[2,75]),{16:[1,95],38:96,51:94,54:24,57:L},{31:97,94:f,96:d,97:E,98:C},{56:98,60:Ee},{59:[1,100]},{28:[1,101]},{28:[1,102]},{79:[1,103],81:[1,104]},{31:105,94:f,96:d,97:E,98:C},{28:Ne,64:106},e(a,[2,64]),e(a,[2,109]),e(w,[2,24]),e(w,[2,25]),e(w,[2,26]),{50:[2,42]},{30:107,31:82,50:[2,20],94:f,96:d,97:E,98:C},e(Ce,[2,50],{26:108,27:[1,109]}),{16:[1,110]},{18:111,21:[1,112]},{16:[2,14]},e(pe,[2,18]),{24:[1,113]},e(ae,[2,59]),{31:38,32:114,33:39,94:f,96:d,97:E,98:C,99:m},{28:[1,116],31:38,32:115,33:39,94:f,96:d,97:E,98:C,99:m},e(re,[2,67],{66:117,68:$,69:ee,70:te,71:se,72:ie}),e(re,[2,66]),{52:[1,118]},{38:96,51:119,54:24,57:L},{16:[1,120],52:[2,43]},e(ue,[2,47],{50:[1,121]}),{52:[1,122]},{52:[2,53],56:123,60:Ee},{31:38,32:124,33:39,94:f,96:d,97:E,98:C,99:m},e(a,[2,76],{28:[1,125]}),e(a,[2,78],{28:[1,127],77:[1,126]}),e(a,[2,82],{28:[1,128],80:[1,129]}),{28:[1,130]},e(a,[2,90]),e(a,[2,63]),{50:[2,21]},e(Ce,[2,51]),{28:[1,131]},e(xe,[2,9]),{15:132,22:Le},{22:[2,13]},{1:[2,15]},e(ae,[2,61]),e(ae,[2,60]),{31:38,32:133,33:39,94:f,96:d,97:E,98:C,99:m},e(re,[2,65]),e(a,[2,40]),{52:[1,134]},{38:96,51:135,52:[2,44],54:24,57:L},{56:136,60:Ee},e(ue,[2,48]),{52:[2,54]},e(a,[2,52]),e(a,[2,77]),e(a,[2,79]),e(a,[2,80],{77:[1,137]}),e(a,[2,83]),e(a,[2,84],{28:[1,138]}),e(a,[2,86],{28:[1,140],77:[1,139]}),{29:[1,141]},{16:[1,142]},e(ae,[2,62]),e(a,[2,41]),{52:[2,45]},{52:[1,143]},e(a,[2,81]),e(a,[2,85]),e(a,[2,87]),e(a,[2,88],{77:[1,144]}),e(Ce,[2,19]),e(xe,[2,10]),e(ue,[2,49]),e(a,[2,89])],defaultActions:{2:[2,1],4:[2,3],5:[2,8],9:[2,11],47:[2,2],81:[2,42],86:[2,14],107:[2,21],112:[2,13],113:[2,15],123:[2,54],135:[2,45]},parseError:function(n,r){if(r.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=r,c}},parse:function(n){var r=this,c=[0],i=[],A=[null],t=[],G=this.table,s="",ce=0,Oe=0,ze=2,Re=1,je=t.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var me in this.yy)Object.prototype.hasOwnProperty.call(this.yy,me)&&(I.yy[me]=this.yy[me]);k.setInput(n,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Fe=k.yylloc;t.push(Fe);var Qe=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Xe(){var y;return y=i.pop()||k.lex()||Re,typeof y!="number"&&(y instanceof Array&&(i=y,y=i.pop()),y=r.symbols_[y]||y),y}for(var b,x,B,be,O={},le,T,Pe,oe;;){if(x=c[c.length-1],this.defaultActions[x]?B=this.defaultActions[x]:((b===null||typeof b>"u")&&(b=Xe()),B=G[x]&&G[x][b]),typeof B>"u"||!B.length||!B[0]){var _e="";oe=[];for(le in G[x])this.terminals_[le]&&le>ze&&oe.push("'"+this.terminals_[le]+"'");k.showPosition?_e="Parse error on line "+(ce+1)+`: `+k.showPosition()+` -Expecting `+oe.join(", ")+", got '"+(this.terminals_[b]||b)+"'":_e="Parse error on line "+(ce+1)+": Unexpected "+(b==Re?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_e,{text:k.match,token:this.terminals_[b]||b,line:k.yylineno,loc:Fe,expected:oe})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(B[0]){case 1:c.push(b),A.push(k.yytext),t.push(k.yylloc),c.push(B[1]),b=null,Oe=k.yyleng,s=k.yytext,ce=k.yylineno,Fe=k.yylloc;break;case 2:if(T=this.productions_[B[1]][1],O.$=A[A.length-T],O._$={first_line:t[t.length-(T||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(T||1)].first_column,last_column:t[t.length-1].last_column},je&&(O._$.range=[t[t.length-(T||1)].range[0],t[t.length-1].range[1]]),be=this.performAction.apply(O,[s,Oe,ce,I.yy,B[1],A,t].concat(Qe)),typeof be<"u")return be;T&&(c=c.slice(0,-1*T*2),A=A.slice(0,-1*T),t=t.slice(0,-1*T)),c.push(this.productions_[B[1]][0]),A.push(O.$),t.push(O._$),Pe=G[c[c.length-2]][c[c.length-1]],c.push(Pe);break;case 3:return!0}}return!0}},ze=function(){var v={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(n,r){return this.yy=r||this.yy||{},this._input=n,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 n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var r=n.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var r=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;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),c.length-1&&(this.yylineno-=c.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:c?(c.length===i.length?this.yylloc.first_column:0)+i[i.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+oe.join(", ")+", got '"+(this.terminals_[b]||b)+"'":_e="Parse error on line "+(ce+1)+": Unexpected "+(b==Re?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_e,{text:k.match,token:this.terminals_[b]||b,line:k.yylineno,loc:Fe,expected:oe})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(B[0]){case 1:c.push(b),A.push(k.yytext),t.push(k.yylloc),c.push(B[1]),b=null,Oe=k.yyleng,s=k.yytext,ce=k.yylineno,Fe=k.yylloc;break;case 2:if(T=this.productions_[B[1]][1],O.$=A[A.length-T],O._$={first_line:t[t.length-(T||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(T||1)].first_column,last_column:t[t.length-1].last_column},Qe&&(O._$.range=[t[t.length-(T||1)].range[0],t[t.length-1].range[1]]),be=this.performAction.apply(O,[s,Oe,ce,I.yy,B[1],A,t].concat(je)),typeof be<"u")return be;T&&(c=c.slice(0,-1*T*2),A=A.slice(0,-1*T),t=t.slice(0,-1*T)),c.push(this.productions_[B[1]][0]),A.push(O.$),t.push(O._$),Pe=G[c[c.length-2]][c[c.length-1]],c.push(Pe);break;case 3:return!0}}return!0}},Ye=function(){var v={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(n,r){return this.yy=r||this.yy||{},this._input=n,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 n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var r=n.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var r=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;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),c.length-1&&(this.yylineno-=c.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:c?(c.length===i.length?this.yylloc.first_column:0)+i[i.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),r=new Array(n.length+1).join("-");return n+this.upcomingInput()+` `+r+"^"},test_match:function(n,r){var c,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=n[0].match(/(?:\r\n?|\n).*/g),i&&(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+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],c=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in A)this[t]=A[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,r,c,i;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),t=0;tr[0].length)){if(r=c,i=t,this.options.backtrack_lexer){if(n=this.test_match(c,A[t]),n!==!1)return n;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(n=this.test_match(r,A[i]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(r,c,i,A){switch(i){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),44;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),46;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return"EDGE_STATE";case 23:this.begin("callback_name");break;case 24:this.popState();break;case 25:this.popState(),this.begin("callback_args");break;case 26:return 79;case 27:this.popState();break;case 28:return 80;case 29:this.popState();break;case 30:return"STR";case 31:this.begin("string");break;case 32:return this.begin("namespace"),53;case 33:return this.popState(),16;case 34:break;case 35:return this.begin("namespace-body"),50;case 36:return this.popState(),52;case 37:return"EOF_IN_STRUCT";case 38:return 16;case 39:break;case 40:return"EDGE_STATE";case 41:return this.begin("class"),57;case 42:return this.popState(),16;case 43:break;case 44:return this.popState(),this.popState(),52;case 45:return this.begin("class-body"),50;case 46:return this.popState(),52;case 47:return"EOF_IN_STRUCT";case 48:return"EDGE_STATE";case 49:return"OPEN_IN_STRUCT";case 50:break;case 51:return"MEMBER";case 52:return 82;case 53:return 75;case 54:return 76;case 55:return 78;case 56:return 63;case 57:return 65;case 58:return 58;case 59:return 59;case 60:return 81;case 61:this.popState();break;case 62:return"GENERICTYPE";case 63:this.begin("generic");break;case 64:this.popState();break;case 65:return"BQUOTE_STR";case 66:this.begin("bqstring");break;case 67:return 77;case 68:return 77;case 69:return 77;case 70:return 77;case 71:return 69;case 72:return 69;case 73:return 71;case 74:return 71;case 75:return 70;case 76:return 68;case 77:return 72;case 78:return 73;case 79:return 74;case 80:return 36;case 81:return 55;case 82:return 94;case 83:return"DOT";case 84:return"PLUS";case 85:return 91;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 98;case 89:return 27;case 90:return 29;case 91:return"PUNCTUATION";case 92:return 97;case 93:return 96;case 94:return 93;case 95:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\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]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?: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)/,/^(?:$)/],conditions:{"namespace-body":{rules:[31,36,37,38,39,40,41,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},namespace:{rules:[31,32,33,34,35,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},"class-body":{rules:[31,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},class:{rules:[31,42,43,44,45,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},acc_descr_multiline:{rules:[16,17,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},acc_descr:{rules:[14,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},acc_title:{rules:[12,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},arg_directive:{rules:[7,8,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},type_directive:{rules:[6,7,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},open_directive:{rules:[5,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},callback_args:{rules:[27,28,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},callback_name:{rules:[24,25,26,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},href:{rules:[31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},struct:{rules:[31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},generic:{rules:[31,52,53,54,55,56,57,58,59,60,61,62,63,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],inclusive:!1},bqstring:{rules:[31,52,53,54,55,56,57,58,59,60,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],inclusive:!1},string:{rules:[29,30,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,31,32,41,52,53,54,55,56,57,58,59,60,63,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],inclusive:!0}}};return v}();ke.lexer=ze;function ge(){this.yy={}}return ge.prototype=ke,ke.Parser=ge,new ge}();Be.parser=Be;const Lt=Be,Ae="classId-";let Se=[],p={},he=[],we=0,N={},Te=0,U=[];const S=e=>De.sanitizeText(e,R()),it=function(e,u,l){et.parseDirective(this,e,u,l)},P=function(e){let u="",l=e;if(e.indexOf("~")>0){const o=e.split("~");l=S(o[0]),u=S(o[1])}return{className:l,type:u}},ut=function(e,u){u&&(u=S(u));const{className:l}=P(e);p[l].label=u},ye=function(e){const u=P(e);p[u.className]===void 0&&(p[u.className]={id:u.className,type:u.type,label:u.className,cssClasses:[],methods:[],members:[],annotations:[],domId:Ae+u.className+"-"+we},we++)},Ge=function(e){if(e in p)return p[e].domId;throw new Error("Class not found: "+e)},nt=function(){Se=[],p={},he=[],U=[],U.push(Ue),N={},Te=0,tt()},rt=function(e){return p[e]},at=function(){return p},ct=function(){return Se},lt=function(){return he},ot=function(e){st.debug("Adding relation: "+JSON.stringify(e)),ye(e.id1),ye(e.id2),e.id1=P(e.id1).className,e.id2=P(e.id2).className,e.relationTitle1=De.sanitizeText(e.relationTitle1.trim(),R()),e.relationTitle2=De.sanitizeText(e.relationTitle2.trim(),R()),Se.push(e)},ht=function(e,u){const l=P(e).className;p[l].annotations.push(u)},Me=function(e,u){const l=P(e).className,o=p[l];if(typeof u=="string"){const h=u.trim();h.startsWith("<<")&&h.endsWith(">>")?o.annotations.push(S(h.substring(2,h.length-2))):h.indexOf(")")>0?o.methods.push(S(h)):h&&o.members.push(S(h))}},At=function(e,u){Array.isArray(u)&&(u.reverse(),u.forEach(l=>Me(e,l)))},pt=function(e,u){const l={id:`note${he.length}`,class:u,text:e};he.push(l)},ft=function(e){return e.startsWith(":")&&(e=e.substring(1)),S(e.trim())},ve=function(e,u){e.split(",").forEach(function(l){let o=l;l[0].match(/\d/)&&(o=Ae+o),p[o]!==void 0&&p[o].cssClasses.push(u)})},dt=function(e,u){e.split(",").forEach(function(l){u!==void 0&&(p[l].tooltip=S(u))})},Et=function(e,u){return u?N[u].classes[e].tooltip:p[e].tooltip},Ct=function(e,u,l){const o=R();e.split(",").forEach(function(h){let F=h;h[0].match(/\d/)&&(F=Ae+F),p[F]!==void 0&&(p[F].link=Ve.formatUrl(u,o),o.securityLevel==="sandbox"?p[F].linkTarget="_top":typeof l=="string"?p[F].linkTarget=S(l):p[F].linkTarget="_blank")}),ve(e,"clickable")},kt=function(e,u,l){e.split(",").forEach(function(o){gt(o,u,l),p[o].haveCallback=!0}),ve(e,"clickable")},gt=function(e,u,l){if(R().securityLevel!=="loose"||u===void 0)return;const h=e;if(p[h]!==void 0){const F=Ge(h);let g=[];if(typeof l=="string"){g=l.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let _=0;_")),h.classed("hover",!0)}).on("mouseout",function(){u.transition().duration(500).style("opacity",0),M(this).classed("hover",!1)})};U.push(Ue);let Ye="TB";const _t=()=>Ye,Dt=e=>{Ye=e},Bt=function(e){N[e]===void 0&&(N[e]={id:e,classes:{},children:{},domId:Ae+e+"-"+Te},Te++)},Tt=function(e){return N[e]},yt=function(){return N},St=function(e,u){N[e]!==void 0&&u.map(l=>{p[l].parent=e,N[e].classes[l]=p[l]})},It={parseDirective:it,setAccTitle:He,getAccTitle:qe,getAccDescription:We,setAccDescription:Je,getConfig:()=>R().class,addClass:ye,bindFunctions:mt,clear:nt,getClass:rt,getClasses:at,getNotes:lt,addAnnotation:ht,addNote:pt,getRelations:ct,addRelation:ot,getDirection:_t,setDirection:Dt,addMember:Me,addMembers:At,cleanupLabel:ft,lineType:Ft,relationType:bt,setClickEvent:kt,setCssClass:ve,setLink:Ct,getTooltip:Et,setTooltip:dt,lookUpDomId:Ge,setDiagramTitle:Ze,getDiagramTitle:$e,setClassLabel:ut,addNamespace:Bt,addClassesToNamespace:St,getNamespace:Tt,getNamespaces:yt},vt=e=>`g.classGroup text { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var r=this.next();return r||this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){var r=this.conditionStack.length-1;return r>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(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(r,c,i,A){switch(i){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),44;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),46;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return"EDGE_STATE";case 23:this.begin("callback_name");break;case 24:this.popState();break;case 25:this.popState(),this.begin("callback_args");break;case 26:return 79;case 27:this.popState();break;case 28:return 80;case 29:this.popState();break;case 30:return"STR";case 31:this.begin("string");break;case 32:return this.begin("namespace"),53;case 33:return this.popState(),16;case 34:break;case 35:return this.begin("namespace-body"),50;case 36:return this.popState(),52;case 37:return"EOF_IN_STRUCT";case 38:return 16;case 39:break;case 40:return"EDGE_STATE";case 41:return this.begin("class"),57;case 42:return this.popState(),16;case 43:break;case 44:return this.popState(),this.popState(),52;case 45:return this.begin("class-body"),50;case 46:return this.popState(),52;case 47:return"EOF_IN_STRUCT";case 48:return"EDGE_STATE";case 49:return"OPEN_IN_STRUCT";case 50:break;case 51:return"MEMBER";case 52:return 82;case 53:return 75;case 54:return 76;case 55:return 78;case 56:return 63;case 57:return 65;case 58:return 58;case 59:return 59;case 60:return 81;case 61:this.popState();break;case 62:return"GENERICTYPE";case 63:this.begin("generic");break;case 64:this.popState();break;case 65:return"BQUOTE_STR";case 66:this.begin("bqstring");break;case 67:return 77;case 68:return 77;case 69:return 77;case 70:return 77;case 71:return 69;case 72:return 69;case 73:return 71;case 74:return 71;case 75:return 70;case 76:return 68;case 77:return 72;case 78:return 73;case 79:return 74;case 80:return 36;case 81:return 55;case 82:return 94;case 83:return"DOT";case 84:return"PLUS";case 85:return 91;case 86:return"EQUALS";case 87:return"EQUALS";case 88:return 98;case 89:return 27;case 90:return 29;case 91:return"PUNCTUATION";case 92:return 97;case 93:return 96;case 94:return 93;case 95:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\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]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?: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)/,/^(?:$)/],conditions:{"namespace-body":{rules:[31,36,37,38,39,40,41,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},namespace:{rules:[31,32,33,34,35,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},"class-body":{rules:[31,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},class:{rules:[31,42,43,44,45,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},acc_descr_multiline:{rules:[16,17,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},acc_descr:{rules:[14,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},acc_title:{rules:[12,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},arg_directive:{rules:[7,8,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},type_directive:{rules:[6,7,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},open_directive:{rules:[5,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},callback_args:{rules:[27,28,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},callback_name:{rules:[24,25,26,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},href:{rules:[31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},struct:{rules:[31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},generic:{rules:[31,52,53,54,55,56,57,58,59,60,61,62,63,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],inclusive:!1},bqstring:{rules:[31,52,53,54,55,56,57,58,59,60,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],inclusive:!1},string:{rules:[29,30,31,52,53,54,55,56,57,58,59,60,63,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],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,31,32,41,52,53,54,55,56,57,58,59,60,63,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],inclusive:!0}}};return v}();ke.lexer=Ye;function ge(){this.yy={}}return ge.prototype=ke,ke.Parser=ge,new ge}();Be.parser=Be;const Lt=Be,Ae="classId-";let Se=[],p={},he=[],we=0,N={},Te=0,U=[];const S=e=>De.sanitizeText(e,R()),it=function(e,u,l){et.parseDirective(this,e,u,l)},P=function(e){let u="",l=e;if(e.indexOf("~")>0){const o=e.split("~");l=S(o[0]),u=S(o[1])}return{className:l,type:u}},ut=function(e,u){u&&(u=S(u));const{className:l}=P(e);p[l].label=u},ye=function(e){const u=P(e);p[u.className]===void 0&&(p[u.className]={id:u.className,type:u.type,label:u.className,cssClasses:[],methods:[],members:[],annotations:[],domId:Ae+u.className+"-"+we},we++)},Ge=function(e){if(e in p)return p[e].domId;throw new Error("Class not found: "+e)},nt=function(){Se=[],p={},he=[],U=[],U.push(Ue),N={},Te=0,tt()},rt=function(e){return p[e]},at=function(){return p},ct=function(){return Se},lt=function(){return he},ot=function(e){st.debug("Adding relation: "+JSON.stringify(e)),ye(e.id1),ye(e.id2),e.id1=P(e.id1).className,e.id2=P(e.id2).className,e.relationTitle1=De.sanitizeText(e.relationTitle1.trim(),R()),e.relationTitle2=De.sanitizeText(e.relationTitle2.trim(),R()),Se.push(e)},ht=function(e,u){const l=P(e).className;p[l].annotations.push(u)},Me=function(e,u){const l=P(e).className,o=p[l];if(typeof u=="string"){const h=u.trim();h.startsWith("<<")&&h.endsWith(">>")?o.annotations.push(S(h.substring(2,h.length-2))):h.indexOf(")")>0?o.methods.push(S(h)):h&&o.members.push(S(h))}},At=function(e,u){Array.isArray(u)&&(u.reverse(),u.forEach(l=>Me(e,l)))},pt=function(e,u){const l={id:`note${he.length}`,class:u,text:e};he.push(l)},ft=function(e){return e.startsWith(":")&&(e=e.substring(1)),S(e.trim())},ve=function(e,u){e.split(",").forEach(function(l){let o=l;l[0].match(/\d/)&&(o=Ae+o),p[o]!==void 0&&p[o].cssClasses.push(u)})},dt=function(e,u){e.split(",").forEach(function(l){u!==void 0&&(p[l].tooltip=S(u))})},Et=function(e,u){return u?N[u].classes[e].tooltip:p[e].tooltip},Ct=function(e,u,l){const o=R();e.split(",").forEach(function(h){let F=h;h[0].match(/\d/)&&(F=Ae+F),p[F]!==void 0&&(p[F].link=Ve.formatUrl(u,o),o.securityLevel==="sandbox"?p[F].linkTarget="_top":typeof l=="string"?p[F].linkTarget=S(l):p[F].linkTarget="_blank")}),ve(e,"clickable")},kt=function(e,u,l){e.split(",").forEach(function(o){gt(o,u,l),p[o].haveCallback=!0}),ve(e,"clickable")},gt=function(e,u,l){if(R().securityLevel!=="loose"||u===void 0)return;const h=e;if(p[h]!==void 0){const F=Ge(h);let g=[];if(typeof l=="string"){g=l.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let _=0;_")),h.classed("hover",!0)}).on("mouseout",function(){u.transition().duration(500).style("opacity",0),M(this).classed("hover",!1)})};U.push(Ue);let Ke="TB";const _t=()=>Ke,Dt=e=>{Ke=e},Bt=function(e){N[e]===void 0&&(N[e]={id:e,classes:{},children:{},domId:Ae+e+"-"+Te},Te++)},Tt=function(e){return N[e]},yt=function(){return N},St=function(e,u){N[e]!==void 0&&u.map(l=>{p[l].parent=e,N[e].classes[l]=p[l]})},It={parseDirective:it,setAccTitle:He,getAccTitle:We,getAccDescription:qe,setAccDescription:Je,getConfig:()=>R().class,addClass:ye,bindFunctions:mt,clear:nt,getClass:rt,getClasses:at,getNotes:lt,addAnnotation:ht,addNote:pt,getRelations:ct,addRelation:ot,getDirection:_t,setDirection:Dt,addMember:Me,addMembers:At,cleanupLabel:ft,lineType:Ft,relationType:bt,setClickEvent:kt,setCssClass:ve,setLink:Ct,getTooltip:Et,setTooltip:dt,lookUpDomId:Ge,setDiagramTitle:Ze,getDiagramTitle:$e,setClassLabel:ut,addNamespace:Bt,addClassesToNamespace:St,getNamespace:Tt,getNamespaces:yt},vt=e=>`g.classGroup text { fill: ${e.nodeBorder}; fill: ${e.classText}; stroke: none; diff --git a/backend/web/assets/styles-a1a6e33f-c5345b95.js b/backend/web/assets/styles-a1a6e33f-335bad62.js similarity index 70% rename from backend/web/assets/styles-a1a6e33f-c5345b95.js rename to backend/web/assets/styles-a1a6e33f-335bad62.js index 3ab4e829..ac4de84d 100644 --- a/backend/web/assets/styles-a1a6e33f-c5345b95.js +++ b/backend/web/assets/styles-a1a6e33f-335bad62.js @@ -1,9 +1,9 @@ -import{i as Y,g as Ht,s as Xt,f as Jt,h as Kt,H as Wt,I as qt,m as Qt,o as v,q as ht,J as Zt,ab as te}from"./EchartsRenderer-3d08027d.js";var mt=function(){var t=function(D,r,a,i){for(a=a||{},i=D.length;i--;a[D[i]]=r);return a},s=[1,2],n=[1,3],h=[1,5],u=[1,7],f=[2,5],p=[1,15],x=[1,17],d=[1,21],k=[1,22],T=[1,23],G=[1,24],R=[1,37],j=[1,25],U=[1,26],z=[1,27],M=[1,28],H=[1,29],X=[1,32],J=[1,33],K=[1,34],W=[1,35],q=[1,36],Q=[1,39],Z=[1,40],tt=[1,41],et=[1,42],w=[1,38],Ct=[1,45],o=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],st=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],ut=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],At=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],dt={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement: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:29,notePosition:30,NOTE_TEXT:31,direction: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,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(r,a,i,l,y,e,B){var c=e.length-1;switch(y){case 4:return l.setRootDoc(e[c]),e[c];case 5:this.$=[];break;case 6:e[c]!="nl"&&(e[c-1].push(e[c]),this.$=e[c-1]);break;case 7:case 8:this.$=e[c];break;case 9:this.$="nl";break;case 12:this.$=e[c];break;case 13:const $=e[c-1];$.description=l.trimColon(e[c]),this.$=$;break;case 14:this.$={stmt:"relation",state1:e[c-2],state2:e[c]};break;case 15:const pt=l.trimColon(e[c]);this.$={stmt:"relation",state1:e[c-3],state2:e[c-1],description:pt};break;case 19:this.$={stmt:"state",id:e[c-3],type:"default",description:"",doc:e[c-1]};break;case 20:var C=e[c],O=e[c-2].trim();if(e[c].match(":")){var it=e[c].split(":");C=it[0],O=[O,it[1]]}this.$={stmt:"state",id:C,type:"default",description:O};break;case 21:this.$={stmt:"state",id:e[c-3],type:"default",description:e[c-5],doc:e[c-1]};break;case 22:this.$={stmt:"state",id:e[c],type:"fork"};break;case 23:this.$={stmt:"state",id:e[c],type:"join"};break;case 24:this.$={stmt:"state",id:e[c],type:"choice"};break;case 25:this.$={stmt:"state",id:l.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:e[c-1].trim(),note:{position:e[c-2].trim(),text:e[c].trim()}};break;case 30:this.$=e[c].trim(),l.setAccTitle(this.$);break;case 31:case 32:this.$=e[c].trim(),l.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:e[c-1].trim(),classes:e[c].trim()};break;case 35:this.$={stmt:"applyClass",id:e[c-1].trim(),styleClass:e[c].trim()};break;case 38:l.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:l.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:l.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:l.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:e[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:e[c-2].trim(),classes:[e[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:e[c-2].trim(),classes:[e[c].trim()],type:"default",description:""};break;case 50:l.parseDirective("%%{","open_directive");break;case 51:l.parseDirective(e[c],"type_directive");break;case 52:e[c]=e[c].trim().replace(/'/g,'"'),l.parseDirective(e[c],"arg_directive");break;case 53:l.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:s,5:n,6:4,7:h,45:6,60:u},{1:[3]},{3:8,4:s,5:n,6:4,7:h,45:6,60:u},{3:9,4:s,5:n,6:4,7:h,45:6,60:u},{3:10,4:s,5:n,6:4,7:h,45:6,60:u},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],f,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:p,5:x,6:30,9:14,10:16,11:18,12:19,13:20,16:d,17:k,19:T,22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:X,35:J,37:K,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},{47:43,48:[1,44],63:Ct},t([48,63],[2,51]),t(o,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:d,17:k,19:T,22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:X,35:J,37:K,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},t(o,[2,8]),t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),t(o,[2,12],{14:[1,47],15:[1,48]}),t(o,[2,16]),{18:[1,49]},t(o,[2,18],{20:[1,50]}),{23:[1,51]},t(o,[2,22]),t(o,[2,23]),t(o,[2,24]),t(o,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(o,[2,28]),t(o,[2,29]),{34:[1,56]},{36:[1,57]},t(o,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(st,[2,44],{57:[1,61]}),t(st,[2,45],{57:[1,62]}),t(o,[2,38]),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),t(ut,[2,36]),{49:63,62:[1,64]},t(ut,[2,53]),t(o,[2,7]),t(o,[2,13]),{13:65,24:R,56:w},t(o,[2,17]),t(At,f,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(o,[2,30]),t(o,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:Ct},{63:[2,52]},t(o,[2,14],{14:[1,76]}),{4:p,5:x,6:30,9:14,10:16,11:18,12:19,13:20,16:d,17:k,19:T,21:[1,77],22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:X,35:J,37:K,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},t(o,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(o,[2,33]),t(o,[2,34]),t(o,[2,35]),t(st,[2,46]),t(st,[2,47]),t(ut,[2,37]),t(o,[2,15]),t(o,[2,19]),t(At,f,{8:81}),t(o,[2,26]),t(o,[2,27]),{4:p,5:x,6:30,9:14,10:16,11:18,12:19,13:20,16:d,17:k,19:T,21:[1,82],22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:X,35:J,37:K,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},t(o,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(r,a){if(a.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=a,i}},parse:function(r){var a=this,i=[0],l=[],y=[null],e=[],B=this.table,c="",C=0,O=0,it=2,$=1,pt=e.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(A.yy[yt]=this.yy[yt]);S.setInput(r,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var St=S.yylloc;e.push(St);var zt=S.options&&S.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(){var E;return E=l.pop()||S.lex()||$,typeof E!="number"&&(E instanceof Array&&(l=E,E=l.pop()),E=a.symbols_[E]||E),E}for(var _,L,m,gt,N={},rt,b,Lt,nt;;){if(L=i[i.length-1],this.defaultActions[L]?m=this.defaultActions[L]:((_===null||typeof _>"u")&&(_=Mt()),m=B[L]&&B[L][_]),typeof m>"u"||!m.length||!m[0]){var _t="";nt=[];for(rt in B[L])this.terminals_[rt]&&rt>it&&nt.push("'"+this.terminals_[rt]+"'");S.showPosition?_t="Parse error on line "+(C+1)+`: +import{j as Y,g as Ht,s as Kt,h as Xt,i as Jt,I as Wt,J as qt,m as Qt,p as v,r as ht,K as Zt,ac as te}from"./TextOutput-39ff842e.js";var mt=function(){var t=function(D,r,a,i){for(a=a||{},i=D.length;i--;a[D[i]]=r);return a},s=[1,2],n=[1,3],h=[1,5],u=[1,7],f=[2,5],p=[1,15],x=[1,17],d=[1,21],k=[1,22],T=[1,23],G=[1,24],R=[1,37],j=[1,25],U=[1,26],z=[1,27],M=[1,28],H=[1,29],K=[1,32],X=[1,33],J=[1,34],W=[1,35],q=[1,36],Q=[1,39],Z=[1,40],tt=[1,41],et=[1,42],w=[1,38],Ct=[1,45],o=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],st=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],ut=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],At=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],dt={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement: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:29,notePosition:30,NOTE_TEXT:31,direction: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,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(r,a,i,l,y,e,B){var c=e.length-1;switch(y){case 4:return l.setRootDoc(e[c]),e[c];case 5:this.$=[];break;case 6:e[c]!="nl"&&(e[c-1].push(e[c]),this.$=e[c-1]);break;case 7:case 8:this.$=e[c];break;case 9:this.$="nl";break;case 12:this.$=e[c];break;case 13:const $=e[c-1];$.description=l.trimColon(e[c]),this.$=$;break;case 14:this.$={stmt:"relation",state1:e[c-2],state2:e[c]};break;case 15:const pt=l.trimColon(e[c]);this.$={stmt:"relation",state1:e[c-3],state2:e[c-1],description:pt};break;case 19:this.$={stmt:"state",id:e[c-3],type:"default",description:"",doc:e[c-1]};break;case 20:var C=e[c],O=e[c-2].trim();if(e[c].match(":")){var it=e[c].split(":");C=it[0],O=[O,it[1]]}this.$={stmt:"state",id:C,type:"default",description:O};break;case 21:this.$={stmt:"state",id:e[c-3],type:"default",description:e[c-5],doc:e[c-1]};break;case 22:this.$={stmt:"state",id:e[c],type:"fork"};break;case 23:this.$={stmt:"state",id:e[c],type:"join"};break;case 24:this.$={stmt:"state",id:e[c],type:"choice"};break;case 25:this.$={stmt:"state",id:l.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:e[c-1].trim(),note:{position:e[c-2].trim(),text:e[c].trim()}};break;case 30:this.$=e[c].trim(),l.setAccTitle(this.$);break;case 31:case 32:this.$=e[c].trim(),l.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:e[c-1].trim(),classes:e[c].trim()};break;case 35:this.$={stmt:"applyClass",id:e[c-1].trim(),styleClass:e[c].trim()};break;case 38:l.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:l.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:l.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:l.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:e[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:e[c-2].trim(),classes:[e[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:e[c-2].trim(),classes:[e[c].trim()],type:"default",description:""};break;case 50:l.parseDirective("%%{","open_directive");break;case 51:l.parseDirective(e[c],"type_directive");break;case 52:e[c]=e[c].trim().replace(/'/g,'"'),l.parseDirective(e[c],"arg_directive");break;case 53:l.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:s,5:n,6:4,7:h,45:6,60:u},{1:[3]},{3:8,4:s,5:n,6:4,7:h,45:6,60:u},{3:9,4:s,5:n,6:4,7:h,45:6,60:u},{3:10,4:s,5:n,6:4,7:h,45:6,60:u},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],f,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:p,5:x,6:30,9:14,10:16,11:18,12:19,13:20,16:d,17:k,19:T,22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:K,35:X,37:J,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},{47:43,48:[1,44],63:Ct},t([48,63],[2,51]),t(o,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:d,17:k,19:T,22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:K,35:X,37:J,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},t(o,[2,8]),t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),t(o,[2,12],{14:[1,47],15:[1,48]}),t(o,[2,16]),{18:[1,49]},t(o,[2,18],{20:[1,50]}),{23:[1,51]},t(o,[2,22]),t(o,[2,23]),t(o,[2,24]),t(o,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(o,[2,28]),t(o,[2,29]),{34:[1,56]},{36:[1,57]},t(o,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(st,[2,44],{57:[1,61]}),t(st,[2,45],{57:[1,62]}),t(o,[2,38]),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),t(ut,[2,36]),{49:63,62:[1,64]},t(ut,[2,53]),t(o,[2,7]),t(o,[2,13]),{13:65,24:R,56:w},t(o,[2,17]),t(At,f,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(o,[2,30]),t(o,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:Ct},{63:[2,52]},t(o,[2,14],{14:[1,76]}),{4:p,5:x,6:30,9:14,10:16,11:18,12:19,13:20,16:d,17:k,19:T,21:[1,77],22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:K,35:X,37:J,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},t(o,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(o,[2,33]),t(o,[2,34]),t(o,[2,35]),t(st,[2,46]),t(st,[2,47]),t(ut,[2,37]),t(o,[2,15]),t(o,[2,19]),t(At,f,{8:81}),t(o,[2,26]),t(o,[2,27]),{4:p,5:x,6:30,9:14,10:16,11:18,12:19,13:20,16:d,17:k,19:T,21:[1,82],22:G,24:R,25:j,26:U,27:z,28:M,29:H,32:31,33:K,35:X,37:J,38:W,42:q,45:6,50:Q,51:Z,52:tt,53:et,56:w,60:u},t(o,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(r,a){if(a.recoverable)this.trace(r);else{var i=new Error(r);throw i.hash=a,i}},parse:function(r){var a=this,i=[0],l=[],y=[null],e=[],B=this.table,c="",C=0,O=0,it=2,$=1,pt=e.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(A.yy[yt]=this.yy[yt]);S.setInput(r,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var St=S.yylloc;e.push(St);var zt=S.options&&S.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(){var E;return E=l.pop()||S.lex()||$,typeof E!="number"&&(E instanceof Array&&(l=E,E=l.pop()),E=a.symbols_[E]||E),E}for(var _,L,m,gt,N={},rt,b,Lt,nt;;){if(L=i[i.length-1],this.defaultActions[L]?m=this.defaultActions[L]:((_===null||typeof _>"u")&&(_=Mt()),m=B[L]&&B[L][_]),typeof m>"u"||!m.length||!m[0]){var _t="";nt=[];for(rt in B[L])this.terminals_[rt]&&rt>it&&nt.push("'"+this.terminals_[rt]+"'");S.showPosition?_t="Parse error on line "+(C+1)+`: `+S.showPosition()+` Expecting `+nt.join(", ")+", got '"+(this.terminals_[_]||_)+"'":_t="Parse error on line "+(C+1)+": Unexpected "+(_==$?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(_t,{text:S.match,token:this.terminals_[_]||_,line:S.yylineno,loc:St,expected:nt})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+_);switch(m[0]){case 1:i.push(_),y.push(S.yytext),e.push(S.yylloc),i.push(m[1]),_=null,O=S.yyleng,c=S.yytext,C=S.yylineno,St=S.yylloc;break;case 2:if(b=this.productions_[m[1]][1],N.$=y[y.length-b],N._$={first_line:e[e.length-(b||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(b||1)].first_column,last_column:e[e.length-1].last_column},zt&&(N._$.range=[e[e.length-(b||1)].range[0],e[e.length-1].range[1]]),gt=this.performAction.apply(N,[c,O,C,A.yy,m[1],y,e].concat(pt)),typeof gt<"u")return gt;b&&(i=i.slice(0,-1*b*2),y=y.slice(0,-1*b),e=e.slice(0,-1*b)),i.push(this.productions_[m[1]][0]),y.push(N.$),e.push(N._$),Lt=B[i[i.length-2]][i[i.length-1]],i.push(Lt);break;case 3:return!0}}return!0}},Ut=function(){var D={EOF:1,parseError:function(a,i){if(this.yy.parser)this.yy.parser.parseError(a,i);else throw new Error(a)},setInput:function(r,a){return this.yy=a||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var a=r.length,i=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var l=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 y=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===l.length?this.yylloc.first_column:0)+l[l.length-i.length].length-i[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` `+a+"^"},test_match:function(r,a){var i,l,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),l=r[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],i=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var e in y)this[e]=y[e];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,i,l;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),e=0;ea[0].length)){if(a=i,l=e,this.options.backtrack_lexer){if(r=this.test_match(i,y[e]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,y[l]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(a,i,l,y){switch(l){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),i.yytext=i.yytext.substr(2).trim(),31;case 69:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return i.yytext=i.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80: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,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/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:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return D}();dt.lexer=Ut;function ft(){this.yy={}}return ft.prototype=dt,dt.Parser=ft,new ft}();mt.parser=mt;const Ie=mt,ee="LR",Oe="TB",Tt="state",Rt="relation",se="classDef",ie="applyClass",vt="default",re="divider",xt="[*]",wt="start",Bt=xt,$t="end",It="color",Ot="fill",ne="bgFill",ae=",";function Pt(){return{}}let Vt=ee,lt=[],P=Pt();const Ft=()=>({relations:[],states:{},documents:{}});let ot={root:Ft()},g=ot.root,V=0,Nt=0;const ce={LINE:0,DOTTED_LINE:1},le={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},at=t=>JSON.parse(JSON.stringify(t)),oe=function(t,s,n){Qt.parseDirective(this,t,s,n)},he=t=>{v.info("Setting root doc",t),lt=t},ue=()=>lt,ct=(t,s,n)=>{if(s.stmt===Rt)ct(t,s.state1,!0),ct(t,s.state2,!1);else if(s.stmt===Tt&&(s.id==="[*]"?(s.id=n?t.id+"_start":t.id+"_end",s.start=n):s.id=s.id.trim()),s.doc){const h=[];let u=[],f;for(f=0;f0&&u.length>0){const p={stmt:Tt,id:te(),type:"divider",doc:at(u)};h.push(at(p)),s.doc=h}s.doc.forEach(p=>ct(s,p,!0))}},de=()=>(ct({id:"root"},{id:"root",doc:lt},!0),{id:"root",doc:lt}),fe=t=>{let s;t.doc?s=t.doc:s=t,v.info(s),Yt(!0),v.info("Extract",s),s.forEach(n=>{switch(n.stmt){case Tt:I(n.id.trim(),n.type,n.doc,n.description,n.note,n.classes,n.styles,n.textStyles);break;case Rt:Gt(n.state1,n.state2,n.description);break;case se:jt(n.id.trim(),n.classes);break;case ie:Dt(n.id.trim(),n.styleClass);break}})},I=function(t,s=vt,n=null,h=null,u=null,f=null,p=null,x=null){const d=t==null?void 0:t.trim();g.states[d]===void 0?(v.info("Adding state ",d,h),g.states[d]={id:d,descriptions:[],type:s,doc:n,note:u,classes:[],styles:[],textStyles:[]}):(g.states[d].doc||(g.states[d].doc=n),g.states[d].type||(g.states[d].type=s)),h&&(v.info("Setting state description",d,h),typeof h=="string"&&Et(d,h.trim()),typeof h=="object"&&h.forEach(k=>Et(d,k.trim()))),u&&(g.states[d].note=u,g.states[d].note.text=ht.sanitizeText(g.states[d].note.text,Y())),f&&(v.info("Setting state classes",d,f),(typeof f=="string"?[f]:f).forEach(T=>Dt(d,T.trim()))),p&&(v.info("Setting state styles",d,p),(typeof p=="string"?[p]:p).forEach(T=>Ee(d,T.trim()))),x&&(v.info("Setting state styles",d,p),(typeof x=="string"?[x]:x).forEach(T=>ve(d,T.trim())))},Yt=function(t){ot={root:Ft()},g=ot.root,V=0,P=Pt(),t||Zt()},F=function(t){return g.states[t]},pe=function(){return g.states},ye=function(){v.info("Documents = ",ot)},Se=function(){return g.relations};function kt(t=""){let s=t;return t===xt&&(V++,s=`${wt}${V}`),s}function bt(t="",s=vt){return t===xt?wt:s}function ge(t=""){let s=t;return t===Bt&&(V++,s=`${$t}${V}`),s}function _e(t="",s=vt){return t===Bt?$t:s}function me(t,s,n){let h=kt(t.id.trim()),u=bt(t.id.trim(),t.type),f=kt(s.id.trim()),p=bt(s.id.trim(),s.type);I(h,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),I(f,p,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),g.relations.push({id1:h,id2:f,relationTitle:ht.sanitizeText(n,Y())})}const Gt=function(t,s,n){if(typeof t=="object")me(t,s,n);else{const h=kt(t.trim()),u=bt(t),f=ge(s.trim()),p=_e(s);I(h,u),I(f,p),g.relations.push({id1:h,id2:f,title:ht.sanitizeText(n,Y())})}},Et=function(t,s){const n=g.states[t],h=s.startsWith(":")?s.replace(":","").trim():s;n.descriptions.push(ht.sanitizeText(h,Y()))},Te=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},ke=()=>(Nt++,"divider-id-"+Nt),jt=function(t,s=""){P[t]===void 0&&(P[t]={id:t,styles:[],textStyles:[]});const n=P[t];s!=null&&s.split(ae).forEach(h=>{const u=h.replace(/([^;]*);/,"$1").trim();if(h.match(It)){const p=u.replace(Ot,ne).replace(It,Ot);n.textStyles.push(p)}n.styles.push(u)})},be=function(){return P},Dt=function(t,s){t.split(",").forEach(function(n){let h=F(n);if(h===void 0){const u=n.trim();I(u),h=F(u)}h.classes.push(s)})},Ee=function(t,s){const n=F(t);n!==void 0&&n.textStyles.push(s)},ve=function(t,s){const n=F(t);n!==void 0&&n.textStyles.push(s)},xe=()=>Vt,De=t=>{Vt=t},Ce=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),Ne={parseDirective:oe,getConfig:()=>Y().state,addState:I,clear:Yt,getState:F,getStates:pe,getRelations:Se,getClasses:be,getDirection:xe,addRelation:Gt,getDividerId:ke,setDirection:De,cleanupLabel:Te,lineType:ce,relationType:le,logDocuments:ye,getRootDoc:ue,setRootDoc:he,getRootDocV2:de,extract:fe,trimColon:Ce,getAccTitle:Ht,setAccTitle:Xt,getAccDescription:Jt,setAccDescription:Kt,addStyleClass:jt,setCssClass:Dt,addDescription:Et,setDiagramTitle:Wt,getDiagramTitle:qt},Ae=t=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return a||this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},pushState:function(a){this.begin(a)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(a,i,l,y){switch(l){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),i.yytext=i.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),i.yytext=i.yytext.substr(2).trim(),31;case 69:return this.popState(),i.yytext=i.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return i.yytext=i.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80: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,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/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:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return D}();dt.lexer=Ut;function ft(){this.yy={}}return ft.prototype=dt,dt.Parser=ft,new ft}();mt.parser=mt;const Ie=mt,ee="LR",Oe="TB",Tt="state",Rt="relation",se="classDef",ie="applyClass",vt="default",re="divider",xt="[*]",wt="start",Bt=xt,$t="end",It="color",Ot="fill",ne="bgFill",ae=",";function Pt(){return{}}let Vt=ee,lt=[],P=Pt();const Ft=()=>({relations:[],states:{},documents:{}});let ot={root:Ft()},g=ot.root,V=0,Nt=0;const ce={LINE:0,DOTTED_LINE:1},le={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},at=t=>JSON.parse(JSON.stringify(t)),oe=function(t,s,n){Qt.parseDirective(this,t,s,n)},he=t=>{v.info("Setting root doc",t),lt=t},ue=()=>lt,ct=(t,s,n)=>{if(s.stmt===Rt)ct(t,s.state1,!0),ct(t,s.state2,!1);else if(s.stmt===Tt&&(s.id==="[*]"?(s.id=n?t.id+"_start":t.id+"_end",s.start=n):s.id=s.id.trim()),s.doc){const h=[];let u=[],f;for(f=0;f0&&u.length>0){const p={stmt:Tt,id:te(),type:"divider",doc:at(u)};h.push(at(p)),s.doc=h}s.doc.forEach(p=>ct(s,p,!0))}},de=()=>(ct({id:"root"},{id:"root",doc:lt},!0),{id:"root",doc:lt}),fe=t=>{let s;t.doc?s=t.doc:s=t,v.info(s),Yt(!0),v.info("Extract",s),s.forEach(n=>{switch(n.stmt){case Tt:I(n.id.trim(),n.type,n.doc,n.description,n.note,n.classes,n.styles,n.textStyles);break;case Rt:Gt(n.state1,n.state2,n.description);break;case se:jt(n.id.trim(),n.classes);break;case ie:Dt(n.id.trim(),n.styleClass);break}})},I=function(t,s=vt,n=null,h=null,u=null,f=null,p=null,x=null){const d=t==null?void 0:t.trim();g.states[d]===void 0?(v.info("Adding state ",d,h),g.states[d]={id:d,descriptions:[],type:s,doc:n,note:u,classes:[],styles:[],textStyles:[]}):(g.states[d].doc||(g.states[d].doc=n),g.states[d].type||(g.states[d].type=s)),h&&(v.info("Setting state description",d,h),typeof h=="string"&&Et(d,h.trim()),typeof h=="object"&&h.forEach(k=>Et(d,k.trim()))),u&&(g.states[d].note=u,g.states[d].note.text=ht.sanitizeText(g.states[d].note.text,Y())),f&&(v.info("Setting state classes",d,f),(typeof f=="string"?[f]:f).forEach(T=>Dt(d,T.trim()))),p&&(v.info("Setting state styles",d,p),(typeof p=="string"?[p]:p).forEach(T=>Ee(d,T.trim()))),x&&(v.info("Setting state styles",d,p),(typeof x=="string"?[x]:x).forEach(T=>ve(d,T.trim())))},Yt=function(t){ot={root:Ft()},g=ot.root,V=0,P=Pt(),t||Zt()},F=function(t){return g.states[t]},pe=function(){return g.states},ye=function(){v.info("Documents = ",ot)},Se=function(){return g.relations};function kt(t=""){let s=t;return t===xt&&(V++,s=`${wt}${V}`),s}function bt(t="",s=vt){return t===xt?wt:s}function ge(t=""){let s=t;return t===Bt&&(V++,s=`${$t}${V}`),s}function _e(t="",s=vt){return t===Bt?$t:s}function me(t,s,n){let h=kt(t.id.trim()),u=bt(t.id.trim(),t.type),f=kt(s.id.trim()),p=bt(s.id.trim(),s.type);I(h,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),I(f,p,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),g.relations.push({id1:h,id2:f,relationTitle:ht.sanitizeText(n,Y())})}const Gt=function(t,s,n){if(typeof t=="object")me(t,s,n);else{const h=kt(t.trim()),u=bt(t),f=ge(s.trim()),p=_e(s);I(h,u),I(f,p),g.relations.push({id1:h,id2:f,title:ht.sanitizeText(n,Y())})}},Et=function(t,s){const n=g.states[t],h=s.startsWith(":")?s.replace(":","").trim():s;n.descriptions.push(ht.sanitizeText(h,Y()))},Te=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},ke=()=>(Nt++,"divider-id-"+Nt),jt=function(t,s=""){P[t]===void 0&&(P[t]={id:t,styles:[],textStyles:[]});const n=P[t];s!=null&&s.split(ae).forEach(h=>{const u=h.replace(/([^;]*);/,"$1").trim();if(h.match(It)){const p=u.replace(Ot,ne).replace(It,Ot);n.textStyles.push(p)}n.styles.push(u)})},be=function(){return P},Dt=function(t,s){t.split(",").forEach(function(n){let h=F(n);if(h===void 0){const u=n.trim();I(u),h=F(u)}h.classes.push(s)})},Ee=function(t,s){const n=F(t);n!==void 0&&n.textStyles.push(s)},ve=function(t,s){const n=F(t);n!==void 0&&n.textStyles.push(s)},xe=()=>Vt,De=t=>{Vt=t},Ce=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),Ne={parseDirective:oe,getConfig:()=>Y().state,addState:I,clear:Yt,getState:F,getStates:pe,getRelations:Se,getClasses:be,getDirection:xe,addRelation:Gt,getDividerId:ke,setDirection:De,cleanupLabel:Te,lineType:ce,relationType:le,logDocuments:ye,getRootDoc:ue,setRootDoc:he,getRootDocV2:de,extract:fe,trimColon:Ce,getAccTitle:Ht,setAccTitle:Kt,getAccDescription:Xt,setAccDescription:Jt,addStyleClass:jt,setCssClass:Dt,addDescription:Et,setDiagramTitle:Wt,getDiagramTitle:qt},Ae=t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; diff --git a/backend/web/assets/svgDraw-70101091-699797c4.js b/backend/web/assets/svgDraw-70101091-699797c4.js deleted file mode 100644 index c0f8a23c..00000000 --- a/backend/web/assets/svgDraw-70101091-699797c4.js +++ /dev/null @@ -1,2 +0,0 @@ -import{K as k,F as v,o as B,L as N}from"./EchartsRenderer-3d08027d.js";import{l as I}from"./line-7fbcfe17.js";let S=0;const O=function(i,e,t,a,r){const o=function(d){switch(d){case r.db.relationType.AGGREGATION:return"aggregation";case r.db.relationType.EXTENSION:return"extension";case r.db.relationType.COMPOSITION:return"composition";case r.db.relationType.DEPENDENCY:return"dependency";case r.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(d=>!Number.isNaN(d.y));const l=e.points,g=I().x(function(d){return d.x}).y(function(d){return d.y}).curve(k),s=i.append("path").attr("d",g(l)).attr("id","edge"+S).attr("class","relation");let p="";a.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),t.relation.lineType==1&&s.attr("class","relation dashed-line"),t.relation.lineType==10&&s.attr("class","relation dotted-line"),t.relation.type1!=="none"&&s.attr("marker-start","url("+p+"#"+o(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&s.attr("marker-end","url("+p+"#"+o(t.relation.type2)+"End)");let h,n;const c=e.points.length;let b=v.calcLabelPosition(e.points);h=b.x,n=b.y;let x,m,f,T;if(c%2!==0&&c>1){let d=v.calcCardinalityPosition(t.relation.type1!=="none",e.points,e.points[0]),w=v.calcCardinalityPosition(t.relation.type2!=="none",e.points,e.points[c-1]);B.debug("cardinality_1_point "+JSON.stringify(d)),B.debug("cardinality_2_point "+JSON.stringify(w)),x=d.x,m=d.y,f=w.x,T=w.y}if(t.title!==void 0){const d=i.append("g").attr("class","classLabel"),w=d.append("text").attr("class","label").attr("x",h).attr("y",n).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=w;const y=w.node().getBBox();d.insert("rect",":first-child").attr("class","box").attr("x",y.x-a.padding/2).attr("y",y.y-a.padding/2).attr("width",y.width+a.padding).attr("height",y.height+a.padding)}B.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",x).attr("y",m).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",f).attr("y",T).attr("fill","black").attr("font-size","6").text(t.relationTitle2),S++},P=function(i,e,t,a){B.debug("Rendering class ",e,t);const r=e.id,o={id:r,label:e.id,width:0,height:0},l=i.append("g").attr("id",a.db.lookUpDomId(r)).attr("class","classGroup");let g;e.link?g=l.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):g=l.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let s=!0;e.annotations.forEach(function(u){const H=g.append("tspan").text("«"+u+"»");s||H.attr("dy",t.textHeight),s=!1});let p=E(e);const h=g.append("tspan").text(p).attr("class","title");s||h.attr("dy",t.textHeight);const n=g.node().getBBox().height,c=l.append("line").attr("x1",0).attr("y1",t.padding+n+t.dividerMargin/2).attr("y2",t.padding+n+t.dividerMargin/2),b=l.append("text").attr("x",t.padding).attr("y",n+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach(function(u){_(b,u,s,t),s=!1});const x=b.node().getBBox(),m=l.append("line").attr("x1",0).attr("y1",t.padding+n+t.dividerMargin+x.height).attr("y2",t.padding+n+t.dividerMargin+x.height),f=l.append("text").attr("x",t.padding).attr("y",n+2*t.dividerMargin+x.height+t.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach(function(u){_(f,u,s,t),s=!1});const T=l.node().getBBox();var d=" ";e.cssClasses.length>0&&(d=d+e.cssClasses.join(" "));const y=l.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",T.width+2*t.padding).attr("height",T.height+t.padding+.5*t.dividerMargin).attr("class",d).node().getBBox().width;return g.node().childNodes.forEach(function(u){u.setAttribute("x",(y-u.getBBox().width)/2)}),e.tooltip&&g.insert("title").text(e.tooltip),c.attr("x2",y),m.attr("x2",y),o.width=y,o.height=T.height+t.padding+.5*t.dividerMargin,o},E=function(i){let e=i.id;return i.type&&(e+="<"+i.type+">"),e},L=function(i,e,t,a){B.debug("Rendering note ",e,t);const r=e.id,o={id:r,text:e.text,width:0,height:0},l=i.append("g").attr("id",r).attr("class","classGroup");let g=l.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const s=JSON.parse(`"${e.text}"`).split(` -`);s.forEach(function(c){B.debug(`Adding line: ${c}`),g.append("tspan").text(c).attr("class","title").attr("dy",t.textHeight)});const p=l.node().getBBox(),n=l.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*t.padding).attr("height",p.height+s.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return g.node().childNodes.forEach(function(c){c.setAttribute("x",(n-c.getBBox().width)/2)}),o.width=n,o.height=p.height+s.length*t.textHeight+t.padding+.5*t.dividerMargin,o},M=function(i){let e="",t="",a="",r="",o=i.substring(0,1),l=i.substring(i.length-1,i.length);o.match(/[#+~-]/)&&(r=o);let g=/[\s\w)~]/;l.match(g)||(t=C(l));const s=r===""?0:1;let p=t===""?i.length:i.length-1;i=i.substring(s,p);const h=i.indexOf("("),n=i.indexOf(")");if(h>1&&n>h&&n<=i.length){let b=i.substring(0,h).trim();const x=i.substring(h+1,n);if(e=r+b+"("+N(x.trim())+")",n!Number.isNaN(d.y));const l=e.points,g=I().x(function(d){return d.x}).y(function(d){return d.y}).curve(k),s=i.append("path").attr("d",g(l)).attr("id","edge"+S).attr("class","relation");let p="";a.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),t.relation.lineType==1&&s.attr("class","relation dashed-line"),t.relation.lineType==10&&s.attr("class","relation dotted-line"),t.relation.type1!=="none"&&s.attr("marker-start","url("+p+"#"+o(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&s.attr("marker-end","url("+p+"#"+o(t.relation.type2)+"End)");let h,n;const c=e.points.length;let b=v.calcLabelPosition(e.points);h=b.x,n=b.y;let x,m,f,T;if(c%2!==0&&c>1){let d=v.calcCardinalityPosition(t.relation.type1!=="none",e.points,e.points[0]),w=v.calcCardinalityPosition(t.relation.type2!=="none",e.points,e.points[c-1]);B.debug("cardinality_1_point "+JSON.stringify(d)),B.debug("cardinality_2_point "+JSON.stringify(w)),x=d.x,m=d.y,f=w.x,T=w.y}if(t.title!==void 0){const d=i.append("g").attr("class","classLabel"),w=d.append("text").attr("class","label").attr("x",h).attr("y",n).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=w;const y=w.node().getBBox();d.insert("rect",":first-child").attr("class","box").attr("x",y.x-a.padding/2).attr("y",y.y-a.padding/2).attr("width",y.width+a.padding).attr("height",y.height+a.padding)}B.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",x).attr("y",m).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",f).attr("y",T).attr("fill","black").attr("font-size","6").text(t.relationTitle2),S++},P=function(i,e,t,a){B.debug("Rendering class ",e,t);const r=e.id,o={id:r,label:e.id,width:0,height:0},l=i.append("g").attr("id",a.db.lookUpDomId(r)).attr("class","classGroup");let g;e.link?g=l.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):g=l.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let s=!0;e.annotations.forEach(function(u){const H=g.append("tspan").text("«"+u+"»");s||H.attr("dy",t.textHeight),s=!1});let p=E(e);const h=g.append("tspan").text(p).attr("class","title");s||h.attr("dy",t.textHeight);const n=g.node().getBBox().height,c=l.append("line").attr("x1",0).attr("y1",t.padding+n+t.dividerMargin/2).attr("y2",t.padding+n+t.dividerMargin/2),b=l.append("text").attr("x",t.padding).attr("y",n+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach(function(u){_(b,u,s,t),s=!1});const x=b.node().getBBox(),m=l.append("line").attr("x1",0).attr("y1",t.padding+n+t.dividerMargin+x.height).attr("y2",t.padding+n+t.dividerMargin+x.height),f=l.append("text").attr("x",t.padding).attr("y",n+2*t.dividerMargin+x.height+t.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach(function(u){_(f,u,s,t),s=!1});const T=l.node().getBBox();var d=" ";e.cssClasses.length>0&&(d=d+e.cssClasses.join(" "));const y=l.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",T.width+2*t.padding).attr("height",T.height+t.padding+.5*t.dividerMargin).attr("class",d).node().getBBox().width;return g.node().childNodes.forEach(function(u){u.setAttribute("x",(y-u.getBBox().width)/2)}),e.tooltip&&g.insert("title").text(e.tooltip),c.attr("x2",y),m.attr("x2",y),o.width=y,o.height=T.height+t.padding+.5*t.dividerMargin,o},E=function(i){let e=i.id;return i.type&&(e+="<"+i.type+">"),e},L=function(i,e,t,a){B.debug("Rendering note ",e,t);const r=e.id,o={id:r,text:e.text,width:0,height:0},l=i.append("g").attr("id",r).attr("class","classGroup");let g=l.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const s=JSON.parse(`"${e.text}"`).split(` +`);s.forEach(function(c){B.debug(`Adding line: ${c}`),g.append("tspan").text(c).attr("class","title").attr("dy",t.textHeight)});const p=l.node().getBBox(),n=l.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*t.padding).attr("height",p.height+s.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return g.node().childNodes.forEach(function(c){c.setAttribute("x",(n-c.getBBox().width)/2)}),o.width=n,o.height=p.height+s.length*t.textHeight+t.padding+.5*t.dividerMargin,o},M=function(i){let e="",t="",a="",r="",o=i.substring(0,1),l=i.substring(i.length-1,i.length);o.match(/[#+~-]/)&&(r=o);let g=/[\s\w)~]/;l.match(g)||(t=C(l));const s=r===""?0:1;let p=t===""?i.length:i.length-1;i=i.substring(s,p);const h=i.indexOf("("),n=i.indexOf(")");if(h>1&&n>h&&n<=i.length){let b=i.substring(0,h).trim();const x=i.substring(h+1,n);if(e=r+b+"("+N(x.trim())+")",n{const e=s.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.rx!==void 0&&e.attr("rx",t.rx),t.ry!==void 0&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class!==void 0&&e.attr("class",t.class),e},x=(s,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(s,e).lower()},d=(s,t)=>{const e=t.text.replace(o," "),r=s.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class!==void 0&&r.attr("class",t.class);const n=r.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(e),r},h=(s,t,e,r)=>{const n=s.append("image");n.attr("x",t),n.attr("y",e);const a=i.sanitizeUrl(r);n.attr("xlink:href",a)},y=(s,t,e,r)=>{const n=s.append("use");n.attr("x",t),n.attr("y",e);const a=i.sanitizeUrl(r);n.attr("xlink:href",`#${a}`)},g=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),p=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0});export{x as a,y as b,h as c,c as d,p as e,d as f,g}; diff --git a/backend/web/assets/svgDrawCommon-42e92da3-fd0afe46.js b/backend/web/assets/svgDrawCommon-42e92da3-fd0afe46.js new file mode 100644 index 00000000..9ae11c51 --- /dev/null +++ b/backend/web/assets/svgDrawCommon-42e92da3-fd0afe46.js @@ -0,0 +1 @@ +import{af as o,u as i}from"./TextOutput-39ff842e.js";const c=(s,t)=>{const r=s.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.rx!==void 0&&r.attr("rx",t.rx),t.ry!==void 0&&r.attr("ry",t.ry),t.attrs!==void 0)for(const e in t.attrs)r.attr(e,t.attrs[e]);return t.class!==void 0&&r.attr("class",t.class),r},x=(s,t)=>{const r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(s,r).lower()},d=(s,t)=>{const r=t.text.replace(o," "),e=s.append("text");e.attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class!==void 0&&e.attr("class",t.class);const n=e.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),e},h=(s,t,r,e)=>{const n=s.append("image");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",a)},y=(s,t,r,e)=>{const n=s.append("use");n.attr("x",t),n.attr("y",r);const a=i.sanitizeUrl(e);n.attr("xlink:href",`#${a}`)},g=()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),p=()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0});export{x as a,y as b,h as c,c as d,p as e,d as f,g}; diff --git a/backend/web/assets/timeline-definition-1a90b03d-12fd19f1.js b/backend/web/assets/timeline-definition-1a90b03d-3181d6ca.js similarity index 79% rename from backend/web/assets/timeline-definition-1a90b03d-12fd19f1.js rename to backend/web/assets/timeline-definition-1a90b03d-3181d6ca.js index 18654a2a..39bdb948 100644 --- a/backend/web/assets/timeline-definition-1a90b03d-12fd19f1.js +++ b/backend/web/assets/timeline-definition-1a90b03d-3181d6ca.js @@ -1,9 +1,9 @@ -import{ah as bt,a0 as kt,J as vt,i as wt,o as I,n as q,z as St,ai as Et,aj as Tt,ak as It}from"./EchartsRenderer-3d08027d.js";import"./index-51905ea3.js";import{a as nt}from"./arc-b31ff68c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./path-53f90ab3.js";var Y=function(){var n=function(x,r,c,h){for(c=c||{},h=x.length;h--;c[x[h]]=r);return c},t=[1,2],e=[1,5],s=[6,9,11,17,18,20,22,23,26,27,28],i=[1,15],o=[1,16],a=[1,17],p=[1,18],y=[1,19],g=[1,23],b=[1,24],m=[1,27],k=[4,6,9,11,17,18,20,22,23,26,27,28],E={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,period_statement:24,event_statement:25,period:26,event:27,open_directive:28,type_directive:29,arg_directive:30,close_directive:31,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",26:"period",27:"event",28:"open_directive",29:"type_directive",30:"arg_directive",31:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[24,1],[25,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(r,c,h,d,u,l,M){var f=l.length-1;switch(u){case 1:return l[f-1];case 3:this.$=[];break;case 4:l[f-1].push(l[f]),this.$=l[f-1];break;case 5:case 6:this.$=l[f];break;case 7:case 8:this.$=[];break;case 11:d.getCommonDb().setDiagramTitle(l[f].substr(6)),this.$=l[f].substr(6);break;case 12:this.$=l[f].trim(),d.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=l[f].trim(),d.getCommonDb().setAccDescription(this.$);break;case 15:d.addSection(l[f].substr(8)),this.$=l[f].substr(8);break;case 19:d.addTask(l[f],0,""),this.$=l[f];break;case 20:d.addEvent(l[f].substr(2)),this.$=l[f];break;case 21:d.parseDirective("%%{","open_directive");break;case 22:d.parseDirective(l[f],"type_directive");break;case 23:l[f]=l[f].trim().replace(/'/g,'"'),d.parseDirective(l[f],"arg_directive");break;case 24:d.parseDirective("}%%","close_directive","timeline");break}},table:[{3:1,4:t,7:3,12:4,28:e},{1:[3]},n(s,[2,3],{5:6}),{3:7,4:t,7:3,12:4,28:e},{13:8,29:[1,9]},{29:[2,21]},{6:[1,10],7:22,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:o,20:a,22:p,23:y,24:20,25:21,26:g,27:b,28:e},{1:[2,2]},{14:25,15:[1,26],31:m},n([15,31],[2,22]),n(s,[2,8],{1:[2,1]}),n(s,[2,4]),{7:22,10:28,12:4,17:i,18:o,20:a,22:p,23:y,24:20,25:21,26:g,27:b,28:e},n(s,[2,6]),n(s,[2,7]),n(s,[2,11]),{19:[1,29]},{21:[1,30]},n(s,[2,14]),n(s,[2,15]),n(s,[2,16]),n(s,[2,17]),n(s,[2,18]),n(s,[2,19]),n(s,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},n(s,[2,5]),n(s,[2,12]),n(s,[2,13]),n(k,[2,9]),{14:34,31:m},{31:[2,23]},{11:[1,35]},n(k,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(r,c){if(c.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=c,h}},parse:function(r){var c=this,h=[0],d=[],u=[null],l=[],M=this.table,f="",C=0,J=0,z=2,w=1,L=l.slice.call(arguments,1),_=Object.create(this.lexer),$={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&($.yy[A]=this.yy[A]);_.setInput(r,$.yy),$.yy.lexer=_,$.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var O=_.yylloc;l.push(O);var K=_.options&&_.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var H;return H=d.pop()||_.lex()||w,typeof H!="number"&&(H instanceof Array&&(d=H,H=d.pop()),H=c.symbols_[H]||H),H}for(var T,V,N,Q,F={},j,P,et,G;;){if(V=h[h.length-1],this.defaultActions[V]?N=this.defaultActions[V]:((T===null||typeof T>"u")&&(T=_t()),N=M[V]&&M[V][T]),typeof N>"u"||!N.length||!N[0]){var X="";G=[];for(j in M[V])this.terminals_[j]&&j>z&&G.push("'"+this.terminals_[j]+"'");_.showPosition?X="Parse error on line "+(C+1)+`: +import{ai as bt,a1 as kt,K as vt,j as wt,p as I,o as q,A as St,aj as Et,ak as Tt,al as It}from"./TextOutput-39ff842e.js";import"./index-ef7aa48c.js";import{a as nt}from"./arc-b070a76c.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./path-53f90ab3.js";var Y=function(){var n=function(x,r,c,h){for(c=c||{},h=x.length;h--;c[x[h]]=r);return c},t=[1,2],e=[1,5],s=[6,9,11,17,18,20,22,23,26,27,28],i=[1,15],o=[1,16],a=[1,17],p=[1,18],y=[1,19],g=[1,23],b=[1,24],m=[1,27],k=[4,6,9,11,17,18,20,22,23,26,27,28],E={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,period_statement:24,event_statement:25,period:26,event:27,open_directive:28,type_directive:29,arg_directive:30,close_directive:31,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",26:"period",27:"event",28:"open_directive",29:"type_directive",30:"arg_directive",31:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[24,1],[25,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(r,c,h,d,u,l,M){var f=l.length-1;switch(u){case 1:return l[f-1];case 3:this.$=[];break;case 4:l[f-1].push(l[f]),this.$=l[f-1];break;case 5:case 6:this.$=l[f];break;case 7:case 8:this.$=[];break;case 11:d.getCommonDb().setDiagramTitle(l[f].substr(6)),this.$=l[f].substr(6);break;case 12:this.$=l[f].trim(),d.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=l[f].trim(),d.getCommonDb().setAccDescription(this.$);break;case 15:d.addSection(l[f].substr(8)),this.$=l[f].substr(8);break;case 19:d.addTask(l[f],0,""),this.$=l[f];break;case 20:d.addEvent(l[f].substr(2)),this.$=l[f];break;case 21:d.parseDirective("%%{","open_directive");break;case 22:d.parseDirective(l[f],"type_directive");break;case 23:l[f]=l[f].trim().replace(/'/g,'"'),d.parseDirective(l[f],"arg_directive");break;case 24:d.parseDirective("}%%","close_directive","timeline");break}},table:[{3:1,4:t,7:3,12:4,28:e},{1:[3]},n(s,[2,3],{5:6}),{3:7,4:t,7:3,12:4,28:e},{13:8,29:[1,9]},{29:[2,21]},{6:[1,10],7:22,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:o,20:a,22:p,23:y,24:20,25:21,26:g,27:b,28:e},{1:[2,2]},{14:25,15:[1,26],31:m},n([15,31],[2,22]),n(s,[2,8],{1:[2,1]}),n(s,[2,4]),{7:22,10:28,12:4,17:i,18:o,20:a,22:p,23:y,24:20,25:21,26:g,27:b,28:e},n(s,[2,6]),n(s,[2,7]),n(s,[2,11]),{19:[1,29]},{21:[1,30]},n(s,[2,14]),n(s,[2,15]),n(s,[2,16]),n(s,[2,17]),n(s,[2,18]),n(s,[2,19]),n(s,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},n(s,[2,5]),n(s,[2,12]),n(s,[2,13]),n(k,[2,9]),{14:34,31:m},{31:[2,23]},{11:[1,35]},n(k,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(r,c){if(c.recoverable)this.trace(r);else{var h=new Error(r);throw h.hash=c,h}},parse:function(r){var c=this,h=[0],d=[],u=[null],l=[],M=this.table,f="",C=0,K=0,V=2,w=1,L=l.slice.call(arguments,1),_=Object.create(this.lexer),$={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&($.yy[A]=this.yy[A]);_.setInput(r,$.yy),$.yy.lexer=_,$.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var O=_.yylloc;l.push(O);var J=_.options&&_.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _t(){var H;return H=d.pop()||_.lex()||w,typeof H!="number"&&(H instanceof Array&&(d=H,H=d.pop()),H=c.symbols_[H]||H),H}for(var T,z,N,Q,F={},j,P,et,G;;){if(z=h[h.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((T===null||typeof T>"u")&&(T=_t()),N=M[z]&&M[z][T]),typeof N>"u"||!N.length||!N[0]){var X="";G=[];for(j in M[z])this.terminals_[j]&&j>V&&G.push("'"+this.terminals_[j]+"'");_.showPosition?X="Parse error on line "+(C+1)+`: `+_.showPosition()+` -Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(T==w?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:O,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+T);switch(N[0]){case 1:h.push(T),u.push(_.yytext),l.push(_.yylloc),h.push(N[1]),T=null,J=_.yyleng,f=_.yytext,C=_.yylineno,O=_.yylloc;break;case 2:if(P=this.productions_[N[1]][1],F.$=u[u.length-P],F._$={first_line:l[l.length-(P||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(P||1)].first_column,last_column:l[l.length-1].last_column},K&&(F._$.range=[l[l.length-(P||1)].range[0],l[l.length-1].range[1]]),Q=this.performAction.apply(F,[f,J,C,$.yy,N[1],u,l].concat(L)),typeof Q<"u")return Q;P&&(h=h.slice(0,-1*P*2),u=u.slice(0,-1*P),l=l.slice(0,-1*P)),h.push(this.productions_[N[1]][0]),u.push(F.$),l.push(F._$),et=M[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},S=function(){var x={EOF:1,parseError:function(c,h){if(this.yy.parser)this.yy.parser.parseError(c,h);else throw new Error(c)},setInput:function(r,c){return this.yy=c||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var c=r.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var c=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var d=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),h.length-1&&(this.yylineno-=h.length-1);var u=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:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(T==w?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:O,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+T);switch(N[0]){case 1:h.push(T),u.push(_.yytext),l.push(_.yylloc),h.push(N[1]),T=null,K=_.yyleng,f=_.yytext,C=_.yylineno,O=_.yylloc;break;case 2:if(P=this.productions_[N[1]][1],F.$=u[u.length-P],F._$={first_line:l[l.length-(P||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(P||1)].first_column,last_column:l[l.length-1].last_column},J&&(F._$.range=[l[l.length-(P||1)].range[0],l[l.length-1].range[1]]),Q=this.performAction.apply(F,[f,K,C,$.yy,N[1],u,l].concat(L)),typeof Q<"u")return Q;P&&(h=h.slice(0,-1*P*2),u=u.slice(0,-1*P),l=l.slice(0,-1*P)),h.push(this.productions_[N[1]][0]),u.push(F.$),l.push(F._$),et=M[h[h.length-2]][h[h.length-1]],h.push(et);break;case 3:return!0}}return!0}},S=function(){var x={EOF:1,parseError:function(c,h){if(this.yy.parser)this.yy.parser.parseError(c,h);else throw new Error(c)},setInput:function(r,c){return this.yy=c||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var c=r.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},unput:function(r){var c=r.length,h=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var d=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),h.length-1&&(this.yylineno-=h.length-1);var u=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:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var r=this.pastInput(),c=new Array(r.length+1).join("-");return r+this.upcomingInput()+` `+c+"^"},test_match:function(r,c){var h,d,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),d=r[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],h=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var l in u)this[l]=u[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,c,h,d;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),l=0;lc[0].length)){if(c=h,d=l,this.options.backtrack_lexer){if(r=this.test_match(h,u[l]),r!==!1)return r;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(r=this.test_match(c,u[d]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var c=this.next();return c||this.lex()},begin:function(c){this.conditionStack.push(c)},popState:function(){var c=this.conditionStack.length-1;return c>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(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},pushState:function(c){this.begin(c)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(c,h,d,u){switch(d){case 0:return this.begin("open_directive"),28;case 1:return this.begin("type_directive"),29;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),31;case 4:return 30;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 27;case 21:return 26;case 22:return 6;case 23:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\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:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23],inclusive:!0}}};return x}();E.lexer=S;function v(){this.yy={}}return v.prototype=E,E.Parser=v,new v}();Y.parser=Y;const $t=Y;let W="",at=0;const D=[],U=[],B=[],ct=()=>bt,lt=(n,t,e)=>{kt(globalThis,n,t,e)},ot=function(){D.length=0,U.length=0,W="",B.length=0,vt()},ht=function(n){W=n,D.push(n)},dt=function(){return D},ut=function(){let n=it();const t=100;let e=0;for(;!n&&ee.id===at-1).events.push(n)},gt=function(n){const t={section:W,type:W,description:n,task:n,classes:[]};U.push(t)},it=function(){const n=function(e){return B[e].processed};let t=!0;for(const[e,s]of B.entries())n(e),t=t&&s.processed;return t},Nt={clear:ot,getCommonDb:ct,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt,parseDirective:lt},Mt=Object.freeze(Object.defineProperty({__proto__:null,addEvent:yt,addSection:ht,addTask:pt,addTaskOrg:gt,clear:ot,default:Nt,getCommonDb:ct,getSections:dt,getTasks:ut,parseDirective:lt},Symbol.toStringTag,{value:"Module"})),Lt=12,Z=function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},At=function(n,t){const s=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=n.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function o(y){const g=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function a(y){const g=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function p(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return t.score>3?o(i):t.score<3?a(i):p(i),s},Pt=function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},ft=function(n,t){const e=t.text.replace(//gi," "),s=n.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class!==void 0&&s.attr("class",t.class);const i=s.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),s},Ht=function(n,t){function e(i,o,a,p,y){return i+","+o+" "+(i+a)+","+o+" "+(i+a)+","+(o+p-y)+" "+(i+a-y*1.2)+","+(o+p)+" "+i+","+(o+p)}const s=n.append("polygon");s.attr("points",e(t.x,t.y,50,20,7)),s.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},Ct=function(n,t,e){const s=n.append("g"),i=tt();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,Z(s,i),mt(e)(t.text,s,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)};let st=-1;const zt=function(n,t,e){const s=t.x+e.width/2,i=n.append("g");st++;const o=300+5*30;i.append("line").attr("id","task"+st).attr("x1",s).attr("y1",t.y).attr("x2",s).attr("y2",o).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),At(i,{cx:s,cy:300+(5-t.score)*30,score:t.score});const a=tt();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=e.width,a.height=e.height,a.class="task task-type-"+t.num,a.rx=3,a.ry=3,Z(i,a),t.x+14,mt(e)(t.task,i,a.x,a.y,a.width,a.height,{class:"task"},e,t.colour)},Vt=function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},Rt=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},tt=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},mt=function(){function n(i,o,a,p,y,g,b,m){const k=o.append("text").attr("x",a+y/2).attr("y",p+g/2+5).style("font-color",m).style("text-anchor","middle").text(i);s(k,b)}function t(i,o,a,p,y,g,b,m,k){const{taskFontSize:E,taskFontFamily:S}=m,v=i.split(//gi);for(let x=0;x)/).reverse(),i,o=[],a=1.1,p=e.attr("y"),y=parseFloat(e.attr("dy")),g=e.text(null).append("tspan").attr("x",0).attr("y",p).attr("dy",y+"em");for(let b=0;bt||i==="
")&&(o.pop(),g.text(o.join(" ").trim()),i==="
"?o=[""]:o=[i],g=e.append("tspan").attr("x",0).attr("y",p).attr("dy",a+"em").text(i))})}const Wt=function(n,t,e,s){const i=e%Lt-1,o=n.append("g");t.section=i,o.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const a=o.append("g"),p=o.append("g"),g=p.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(xt,t.width).node().getBBox(),b=s.fontSize&&s.fontSize.replace?s.fontSize.replace("px",""):s.fontSize;return t.height=g.height+b*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,p.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Ot(a,t,i),t},Bt=function(n,t,e){const s=n.append("g"),o=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(xt,t.width).node().getBBox(),a=e.fontSize&&e.fontSize.replace?e.fontSize.replace("px",""):e.fontSize;return s.remove(),o.height+a*1.1*.5+t.padding},Ot=function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},R={drawRect:Z,drawCircle:Pt,drawSection:Ct,drawText:ft,drawLabel:Ht,drawTask:zt,drawBackgroundRect:Vt,getTextObj:Rt,getNoteRect:tt,initGraphics:Ft,drawNode:Wt,getVirtualNodeHeight:Bt},jt=function(n,t,e,s){var i,o;const a=wt(),p=a.leftMargin??50;I.debug("timeline",s.db);const y=a.securityLevel;let g;y==="sandbox"&&(g=q("#i"+t));const m=(y==="sandbox"?q(g.nodes()[0].contentDocument.body):q("body")).select("#"+t);m.append("g");const k=s.db.getTasks(),E=s.db.getCommonDb().getDiagramTitle();I.debug("task",k),R.initGraphics(m);const S=s.db.getSections();I.debug("sections",S);let v=0,x=0,r=0,c=0,h=50+p,d=50;c=50;let u=0,l=!0;S.forEach(function(z){const w={number:u,descr:z,section:u,width:150,padding:20,maxHeight:v},L=R.getVirtualNodeHeight(m,w,a);I.debug("sectionHeight before draw",L),v=Math.max(v,L+20)});let M=0,f=0;I.debug("tasks.length",k.length);for(const[z,w]of k.entries()){const L={number:z,descr:w,section:w.section,width:150,padding:20,maxHeight:x},_=R.getVirtualNodeHeight(m,L,a);I.debug("taskHeight before draw",_),x=Math.max(x,_+20),M=Math.max(M,w.events.length);let $=0;for(let A=0;A0?S.forEach(z=>{const w=k.filter(A=>A.section===z),L={number:u,descr:z,section:u,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:v};I.debug("sectionNode",L);const _=m.append("g"),$=R.drawNode(_,L,u,a);I.debug("sectionNode output",$),_.attr("transform",`translate(${h}, ${c})`),d+=v+50,w.length>0&&rt(m,w,u,h,d,x,a,M,f,v,!1),h+=200*Math.max(w.length,1),d=c,u++}):(l=!1,rt(m,k,u,h,d,x,a,M,f,v,!0));const C=m.node().getBBox();I.debug("bounds",C),E&&m.append("text").text(E).attr("x",C.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),r=l?v+x+150:x+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",r).attr("x2",C.width+3*p).attr("y2",r).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),St(void 0,m,((i=a.timeline)==null?void 0:i.padding)??50,((o=a.timeline)==null?void 0:o.useMaxWidth)??!1)},rt=function(n,t,e,s,i,o,a,p,y,g,b){var m;for(const k of t){const E={descr:k.task,section:e,number:e,width:150,padding:20,maxHeight:o};I.debug("taskNode",E);const S=n.append("g").attr("class","taskWrapper"),x=R.drawNode(S,E,e,a).height;if(I.debug("taskHeight after draw",x),S.attr("transform",`translate(${s}, ${i})`),o=Math.max(o,x),k.events){const r=n.append("g").attr("class","lineWrapper");let c=o;i+=100,c=c+Gt(n,k.events,e,s,i,a),i-=100,r.append("line").attr("x1",s+190/2).attr("y1",i+o).attr("x2",s+190/2).attr("y2",i+o+(b?o:g)+y+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s=s+200,b&&!((m=a.timeline)!=null&&m.disableMulticolor)&&e++}i=i-10},Gt=function(n,t,e,s,i,o){let a=0;const p=i;i=i+100;for(const y of t){const g={descr:y,section:e,number:e,width:150,padding:20,maxHeight:50};I.debug("eventNode",g);const b=n.append("g").attr("class","eventWrapper"),k=R.drawNode(b,g,e,o).height;a=a+k,b.attr("transform",`translate(${s}, ${i})`),i=i+10+k}return i=p,a},qt={setConf:()=>{},draw:jt},Ut=n=>{let t="";for(let e=0;e0?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(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},pushState:function(c){this.begin(c)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(c,h,d,u){switch(d){case 0:return this.begin("open_directive"),28;case 1:return this.begin("type_directive"),29;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),31;case 4:return 30;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 27;case 21:return 26;case 22:return 6;case 23:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\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:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23],inclusive:!0}}};return x}();E.lexer=S;function v(){this.yy={}}return v.prototype=E,E.Parser=v,new v}();Y.parser=Y;const $t=Y;let W="",at=0;const D=[],U=[],B=[],ct=()=>bt,lt=(n,t,e)=>{kt(globalThis,n,t,e)},ot=function(){D.length=0,U.length=0,W="",B.length=0,vt()},ht=function(n){W=n,D.push(n)},dt=function(){return D},ut=function(){let n=it();const t=100;let e=0;for(;!n&&ee.id===at-1).events.push(n)},gt=function(n){const t={section:W,type:W,description:n,task:n,classes:[]};U.push(t)},it=function(){const n=function(e){return B[e].processed};let t=!0;for(const[e,s]of B.entries())n(e),t=t&&s.processed;return t},Nt={clear:ot,getCommonDb:ct,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt,parseDirective:lt},Mt=Object.freeze(Object.defineProperty({__proto__:null,addEvent:yt,addSection:ht,addTask:pt,addTaskOrg:gt,clear:ot,default:Nt,getCommonDb:ct,getSections:dt,getTasks:ut,parseDirective:lt},Symbol.toStringTag,{value:"Module"})),Lt=12,Z=function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},At=function(n,t){const s=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=n.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function o(y){const g=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function a(y){const g=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function p(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return t.score>3?o(i):t.score<3?a(i):p(i),s},Pt=function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},ft=function(n,t){const e=t.text.replace(//gi," "),s=n.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class!==void 0&&s.attr("class",t.class);const i=s.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),s},Ht=function(n,t){function e(i,o,a,p,y){return i+","+o+" "+(i+a)+","+o+" "+(i+a)+","+(o+p-y)+" "+(i+a-y*1.2)+","+(o+p)+" "+i+","+(o+p)}const s=n.append("polygon");s.attr("points",e(t.x,t.y,50,20,7)),s.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},Ct=function(n,t,e){const s=n.append("g"),i=tt();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,Z(s,i),mt(e)(t.text,s,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)};let st=-1;const Vt=function(n,t,e){const s=t.x+e.width/2,i=n.append("g");st++;const o=300+5*30;i.append("line").attr("id","task"+st).attr("x1",s).attr("y1",t.y).attr("x2",s).attr("y2",o).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),At(i,{cx:s,cy:300+(5-t.score)*30,score:t.score});const a=tt();a.x=t.x,a.y=t.y,a.fill=t.fill,a.width=e.width,a.height=e.height,a.class="task task-type-"+t.num,a.rx=3,a.ry=3,Z(i,a),t.x+14,mt(e)(t.task,i,a.x,a.y,a.width,a.height,{class:"task"},e,t.colour)},zt=function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},Rt=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},tt=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},mt=function(){function n(i,o,a,p,y,g,b,m){const k=o.append("text").attr("x",a+y/2).attr("y",p+g/2+5).style("font-color",m).style("text-anchor","middle").text(i);s(k,b)}function t(i,o,a,p,y,g,b,m,k){const{taskFontSize:E,taskFontFamily:S}=m,v=i.split(//gi);for(let x=0;x)/).reverse(),i,o=[],a=1.1,p=e.attr("y"),y=parseFloat(e.attr("dy")),g=e.text(null).append("tspan").attr("x",0).attr("y",p).attr("dy",y+"em");for(let b=0;bt||i==="
")&&(o.pop(),g.text(o.join(" ").trim()),i==="
"?o=[""]:o=[i],g=e.append("tspan").attr("x",0).attr("y",p).attr("dy",a+"em").text(i))})}const Wt=function(n,t,e,s){const i=e%Lt-1,o=n.append("g");t.section=i,o.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const a=o.append("g"),p=o.append("g"),g=p.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(xt,t.width).node().getBBox(),b=s.fontSize&&s.fontSize.replace?s.fontSize.replace("px",""):s.fontSize;return t.height=g.height+b*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,p.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Ot(a,t,i),t},Bt=function(n,t,e){const s=n.append("g"),o=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(xt,t.width).node().getBBox(),a=e.fontSize&&e.fontSize.replace?e.fontSize.replace("px",""):e.fontSize;return s.remove(),o.height+a*1.1*.5+t.padding},Ot=function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},R={drawRect:Z,drawCircle:Pt,drawSection:Ct,drawText:ft,drawLabel:Ht,drawTask:Vt,drawBackgroundRect:zt,getTextObj:Rt,getNoteRect:tt,initGraphics:Ft,drawNode:Wt,getVirtualNodeHeight:Bt},jt=function(n,t,e,s){var i,o;const a=wt(),p=a.leftMargin??50;I.debug("timeline",s.db);const y=a.securityLevel;let g;y==="sandbox"&&(g=q("#i"+t));const m=(y==="sandbox"?q(g.nodes()[0].contentDocument.body):q("body")).select("#"+t);m.append("g");const k=s.db.getTasks(),E=s.db.getCommonDb().getDiagramTitle();I.debug("task",k),R.initGraphics(m);const S=s.db.getSections();I.debug("sections",S);let v=0,x=0,r=0,c=0,h=50+p,d=50;c=50;let u=0,l=!0;S.forEach(function(V){const w={number:u,descr:V,section:u,width:150,padding:20,maxHeight:v},L=R.getVirtualNodeHeight(m,w,a);I.debug("sectionHeight before draw",L),v=Math.max(v,L+20)});let M=0,f=0;I.debug("tasks.length",k.length);for(const[V,w]of k.entries()){const L={number:V,descr:w,section:w.section,width:150,padding:20,maxHeight:x},_=R.getVirtualNodeHeight(m,L,a);I.debug("taskHeight before draw",_),x=Math.max(x,_+20),M=Math.max(M,w.events.length);let $=0;for(let A=0;A0?S.forEach(V=>{const w=k.filter(A=>A.section===V),L={number:u,descr:V,section:u,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:v};I.debug("sectionNode",L);const _=m.append("g"),$=R.drawNode(_,L,u,a);I.debug("sectionNode output",$),_.attr("transform",`translate(${h}, ${c})`),d+=v+50,w.length>0&&rt(m,w,u,h,d,x,a,M,f,v,!1),h+=200*Math.max(w.length,1),d=c,u++}):(l=!1,rt(m,k,u,h,d,x,a,M,f,v,!0));const C=m.node().getBBox();I.debug("bounds",C),E&&m.append("text").text(E).attr("x",C.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),r=l?v+x+150:x+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",r).attr("x2",C.width+3*p).attr("y2",r).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),St(void 0,m,((i=a.timeline)==null?void 0:i.padding)??50,((o=a.timeline)==null?void 0:o.useMaxWidth)??!1)},rt=function(n,t,e,s,i,o,a,p,y,g,b){var m;for(const k of t){const E={descr:k.task,section:e,number:e,width:150,padding:20,maxHeight:o};I.debug("taskNode",E);const S=n.append("g").attr("class","taskWrapper"),x=R.drawNode(S,E,e,a).height;if(I.debug("taskHeight after draw",x),S.attr("transform",`translate(${s}, ${i})`),o=Math.max(o,x),k.events){const r=n.append("g").attr("class","lineWrapper");let c=o;i+=100,c=c+Gt(n,k.events,e,s,i,a),i-=100,r.append("line").attr("x1",s+190/2).attr("y1",i+o).attr("x2",s+190/2).attr("y2",i+o+(b?o:g)+y+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s=s+200,b&&!((m=a.timeline)!=null&&m.disableMulticolor)&&e++}i=i-10},Gt=function(n,t,e,s,i,o){let a=0;const p=i;i=i+100;for(const y of t){const g={descr:y,section:e,number:e,width:150,padding:20,maxHeight:50};I.debug("eventNode",g);const b=n.append("g").attr("class","eventWrapper"),k=R.drawNode(b,g,e,o).height;a=a+k,b.attr("transform",`translate(${s}, ${i})`),i=i+10+k}return i=p,a},qt={setConf:()=>{},draw:jt},Ut=n=>{let t="";for(let e=0;e{try{return JSON.parse(localStorage.getItem("userAccount")||"{}")}catch{return{}}},o=e("userAccount",{state:()=>({userAccount:r()}),actions:{setUserAccount(t){this.userAccount=t,localStorage.setItem("userAccount",JSON.stringify(this.userAccount))}}});export{o as u}; +import{d as e}from"./index-ef7aa48c.js";const r=()=>{try{return JSON.parse(localStorage.getItem("userAccount")||"{}")}catch{return{}}},o=e("userAccount",{state:()=>({userAccount:r()}),actions:{setUserAccount(t){this.userAccount=t,localStorage.setItem("userAccount",JSON.stringify(this.userAccount))}}});export{o as u}; diff --git a/backend/web/assets/userDatabase-87373af7.js b/backend/web/assets/userDatabase-3faee336.js similarity index 91% rename from backend/web/assets/userDatabase-87373af7.js rename to backend/web/assets/userDatabase-3faee336.js index 24eb5a43..38cc9e5c 100644 --- a/backend/web/assets/userDatabase-87373af7.js +++ b/backend/web/assets/userDatabase-3faee336.js @@ -1 +1 @@ -import{d as e}from"./index-51905ea3.js";const r=e("userDatabases",{state:()=>({userDatabases:JSON.parse(localStorage.getItem("userDatabases"))||[]}),actions:{setUserDatabases(s){this.userDatabases=s,localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))},updateUserDatabases(s){this.userDatabases=this.userDatabases.map(a=>a.vid===s.vid?s:a),localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))},addUserDatabase(s){this.userDatabases.push(s),localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))},deleteUserDatabase(s){this.userDatabases=this.userDatabases.filter(a=>a.vid!==s),localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))}}});export{r as u}; +import{d as e}from"./index-ef7aa48c.js";const r=e("userDatabases",{state:()=>({userDatabases:JSON.parse(localStorage.getItem("userDatabases"))||[]}),actions:{setUserDatabases(s){this.userDatabases=s,localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))},updateUserDatabases(s){this.userDatabases=this.userDatabases.map(a=>a.vid===s.vid?s:a),localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))},addUserDatabase(s){this.userDatabases.push(s),localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))},deleteUserDatabase(s){this.userDatabases=this.userDatabases.filter(a=>a.vid!==s),localStorage.setItem("userDatabases",JSON.stringify(this.userDatabases))}}});export{r as u}; diff --git a/backend/web/index.html b/backend/web/index.html index bc8201f0..2b83a2af 100644 --- a/backend/web/index.html +++ b/backend/web/index.html @@ -6,7 +6,7 @@ VectorVein - + diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index e0e53d7b..7b137486 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -198,30 +198,30 @@ packages: resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} + /@babel/helper-validator-identifier@7.22.15: + resolution: {integrity: sha512-4E/F9IIEi8WR94324mbDUMo074YTheJmd7eZF5vITTeYchqAi6sYXRLHUVsmkdmY4QjfKTcB2jB7dVP3NaBElQ==} engines: {node: '>=6.9.0'} - /@babel/parser@7.22.14: - resolution: {integrity: sha512-1KucTHgOvaw/LzCVrEOAyXkr9rQlp0A1HiHRYnSUE9dmb8PvPW7o5sscg+5169r54n3vGlbx6GevTE/Iw/P3AQ==} + /@babel/parser@7.22.15: + resolution: {integrity: sha512-RWmQ/sklUN9BvGGpCDgSubhHWfAx24XDTDObup4ffvxaYsptOg2P3KG0j+1eWKLxpkX0j0uHxmpq2Z1SP/VhxA==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.22.15 - /@babel/runtime@7.22.11: - resolution: {integrity: sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==} + /@babel/runtime@7.22.15: + resolution: {integrity: sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 dev: false - /@babel/types@7.22.11: - resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==} + /@babel/types@7.22.15: + resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 + '@babel/helper-validator-identifier': 7.22.15 to-fast-properties: 2.0.0 /@braintree/sanitize-url@6.0.4: @@ -1085,7 +1085,7 @@ packages: /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: - '@babel/parser': 7.22.14 + '@babel/parser': 7.22.15 '@vue/shared': 3.3.4 estree-walker: 2.0.2 source-map-js: 1.0.2 @@ -1099,7 +1099,7 @@ packages: /@vue/compiler-sfc@2.7.14: resolution: {integrity: sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==} dependencies: - '@babel/parser': 7.22.14 + '@babel/parser': 7.22.15 postcss: 8.4.29 source-map: 0.6.1 dev: false @@ -1107,7 +1107,7 @@ packages: /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: - '@babel/parser': 7.22.14 + '@babel/parser': 7.22.15 '@vue/compiler-core': 3.3.4 '@vue/compiler-dom': 3.3.4 '@vue/compiler-ssr': 3.3.4 @@ -1143,7 +1143,7 @@ packages: /@vue/reactivity-transform@3.3.4: resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.22.14 + '@babel/parser': 7.22.15 '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 @@ -1244,7 +1244,7 @@ packages: dependencies: '@ant-design/colors': 6.0.0 '@ant-design/icons-vue': 6.1.0(vue@3.3.4) - '@babel/runtime': 7.22.11 + '@babel/runtime': 7.22.15 '@ctrl/tinycolor': 3.6.1 '@simonwep/pickr': 1.8.2 array-tree-filter: 2.1.0 @@ -1270,7 +1270,7 @@ packages: dependencies: '@ant-design/colors': 6.0.0 '@ant-design/icons-vue': 6.1.0(vue@3.3.4) - '@babel/runtime': 7.22.11 + '@babel/runtime': 7.22.15 '@ctrl/tinycolor': 3.6.1 '@emotion/hash': 0.9.1 '@emotion/unitless': 0.8.1 @@ -2625,7 +2625,7 @@ packages: /markmap-common@0.14.2: resolution: {integrity: sha512-uGk++7mh237YneJRn9BH/KMbc1ImvMSlvOHOXqK9TyFP+NqQ0+ZYYKYXdTRyozzcMMtz0U0fb00k3Z7FNkAu1g==} dependencies: - '@babel/runtime': 7.22.11 + '@babel/runtime': 7.22.15 dev: false /markmap-lib@0.14.4(markmap-common@0.14.2): @@ -2634,7 +2634,7 @@ packages: peerDependencies: markmap-common: '*' dependencies: - '@babel/runtime': 7.22.11 + '@babel/runtime': 7.22.15 js-yaml: 4.1.0 katex: 0.16.8 markmap-common: 0.14.2 @@ -2649,7 +2649,7 @@ packages: peerDependencies: markmap-common: '*' dependencies: - '@babel/runtime': 7.22.11 + '@babel/runtime': 7.22.15 '@types/d3': 6.7.5 d3: 6.7.0 d3-flextree: 2.1.2