@juki-team/base-ui 1.4.118 → 1.4.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/ArrowForwardIcon-BGNGoaPb.js +1 -0
- package/dist/esm/BarChart-BRhncYPh.js +1 -0
- package/dist/esm/{CartesianChart-Be_Msy-L.js → CartesianChart-CHBFhWU-.js} +1 -1
- package/dist/esm/ChangePasswordModal-BQLB54Cr.js +1 -0
- package/dist/esm/CodeEditor-CYG_k0Lp.js +1 -0
- package/dist/esm/CodeViewer-B7gQlNa4.js +1 -0
- package/dist/esm/Collapse-qB-EKyco.js +1 -0
- package/dist/esm/{DataGrid-DAZ5DKz9.js → DataGrid-cnHfaSnO.js} +1 -1
- package/dist/esm/DataViewer-CtixdklI.js +1 -0
- package/dist/esm/DrawerView-BX-EuTEz.js +1 -0
- package/dist/esm/ExcalidrawButton-mBvm3E_8.js +1 -0
- package/dist/esm/GraphvizViewer-BSUIZVzn.js +1 -0
- package/dist/esm/ImageLoaderCropper-CAxLOrvB.js +1 -0
- package/dist/esm/InputCellPhoneNumber-sEhV7X7S.js +1 -0
- package/dist/esm/{InputColor-DrI8PNC-.js → InputColor-DzcLo0RL.js} +3 -3
- package/dist/esm/LineChart-9CP_N6Dp.js +1 -0
- package/dist/esm/MdMath-C2cj4Ncj.js +1 -0
- package/dist/esm/{MdMathEditor-ChZMTVwl.js → MdMathEditor-Bh-kGfC0.js} +1 -1
- package/dist/esm/{Popover-Crnc5Mbi.js → Popover-DI0clp6-.js} +1 -1
- package/dist/esm/ReplyIcon-B25ABlw2.js +1 -0
- package/dist/esm/SettingsIcon-ive9Ghpw.js +1 -0
- package/dist/esm/SlideDeck-CbQNd9o8.js +1 -0
- package/dist/esm/SubmissionDateField-D3AvKusK.js +1 -0
- package/dist/esm/TableOfContents-h0mxAylD.js +1 -0
- package/dist/esm/TextHeadCell-xNcsNvcB.js +1 -0
- package/dist/esm/{Tooltip-BLaMAeAf.js → Tooltip-B0QLaU02.js} +2 -2
- package/dist/esm/{UserCodeEditor-BawBx01d.js → UserCodeEditor-1Q_AyVss.js} +3 -3
- package/dist/esm/VirtualizedRowsFixed-FKX6Oha-.js +1 -0
- package/dist/esm/WorksheetAsSlides-DeGxqAVa.js +1 -0
- package/dist/esm/WorksheetBodies-C6g1jLca.js +1 -0
- package/dist/esm/WorksheetContents-BJVQN9Da.js +1 -0
- package/dist/esm/WorksheetEditor-OLyrUrSa.js +1 -0
- package/dist/esm/WorksheetNode-Cq5WqUjf.js +1 -0
- package/dist/esm/WorksheetViewer-KN7MZ6tv.js +1 -0
- package/dist/esm/architecture-YZFGNWBL-C3AvEsb9.js +1 -0
- package/dist/esm/architectureDiagram-Q4EWVU46-JfdzkzTF.js +1 -0
- package/dist/esm/blockDiagram-DXYQGD6D-CCNaXRDY.js +1 -0
- package/dist/esm/c4Diagram-AHTNJAMY-DYguHdC-.js +1 -0
- package/dist/esm/channel-BwWtuiHW.js +1 -0
- package/dist/esm/{chunk-4BX2VUAB-CdXAk4UL.js → chunk-4BX2VUAB-B3YOaF9V.js} +1 -1
- package/dist/esm/{chunk-4TB4RGXK-DeaLGiy0.js → chunk-4TB4RGXK-DoSJMkEM.js} +1 -1
- package/dist/esm/{chunk-55IACEB6-ZkJD77DM.js → chunk-55IACEB6-B252J5rd.js} +1 -1
- package/dist/esm/{chunk-EDXVE4YY-CqeZhnl8.js → chunk-EDXVE4YY-BFbj9sbF.js} +1 -1
- package/dist/esm/{chunk-FMBD7UC4-B4Z_oaMt.js → chunk-FMBD7UC4-yfeFLPr5.js} +1 -1
- package/dist/esm/{chunk-OYMX7WX6-CiBqSRlH.js → chunk-OYMX7WX6-Ck43KFw_.js} +1 -1
- package/dist/esm/{chunk-QZHKN3VN-C_DglKRL.js → chunk-QZHKN3VN-Bu8lDQIJ.js} +1 -1
- package/dist/esm/{chunk-YZCP3GAM-C92EM7hh.js → chunk-YZCP3GAM-BleOO0o9.js} +1 -1
- package/dist/esm/classDiagram-6PBFFD2Q-BXMqxslq.js +1 -0
- package/dist/esm/classDiagram-v2-HSJHXN6E-BXMqxslq.js +1 -0
- package/dist/esm/clone-BOCOsCRj.js +1 -0
- package/dist/esm/cose-bilkent-S5V4N54A-B9_if8Zu.js +1 -0
- package/dist/esm/dagre-KV5264BT-DV80i6H7.js +1 -0
- package/dist/esm/diagram-5BDNPKRD-CvSq5VhZ.js +1 -0
- package/dist/esm/diagram-G4DWMVQ6-2LXWeAq0.js +1 -0
- package/dist/esm/diagram-MMDJMWI5-C9TdZJKm.js +1 -0
- package/dist/esm/diagram-TYMM5635-BnRtbot8.js +1 -0
- package/dist/esm/erDiagram-SMLLAGMA-DcBeM5L8.js +1 -0
- package/dist/esm/flowDiagram-DWJPFMVM-DB-IVMWG.js +1 -0
- package/dist/esm/ganttDiagram-T4ZO3ILL-CHeCKKxg.js +1 -0
- package/dist/esm/gitGraph-7Q5UKJZL-NBOYkfJG.js +1 -0
- package/dist/esm/gitGraphDiagram-UUTBAWPF-Bu-s5uIZ.js +1 -0
- package/dist/esm/{graph-D6v73SUk.js → graph-Da_w8zjC.js} +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/{index-CHC6KNKh.js → index-BIV0VXr-.js} +1 -1
- package/dist/esm/index-CDfJgeHe.js +2 -0
- package/dist/esm/{index-BWbfbDmw.js → index-CH9DJEEq.js} +1 -1
- package/dist/esm/index-DSRdBu-J.js +1 -0
- package/dist/esm/index-tqdOtCFo.js +1 -0
- package/dist/esm/info-OMHHGYJF-CzmEvbS6.js +1 -0
- package/dist/esm/infoDiagram-42DDH7IO-CPcCPi5m.js +1 -0
- package/dist/esm/ishikawaDiagram-UXIWVN3A-CueHOskG.js +1 -0
- package/dist/esm/journeyDiagram-VCZTEJTY-CIFSUUZI.js +1 -0
- package/dist/esm/kanban-definition-6JOO6SKY-CIs3hbs0.js +1 -0
- package/dist/esm/{layout-FPgIfzKv.js → layout-DDbWXrIm.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/{mermaid-parser.core-BCKOf1D4.js → mermaid-parser.core-DanmL-Td.js} +1 -1
- package/dist/esm/{mermaid.core-Dx_hE5Vb.js → mermaid.core-BHSaFUkv.js} +1 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-SgHbFXe-.js +1 -0
- package/dist/esm/packet-4T2RLAQJ-CPh-Emqi.js +1 -0
- package/dist/esm/pie-ZZUOXDRM-BG9lV5xj.js +1 -0
- package/dist/esm/pieDiagram-DEJITSTG-BXJ3wszp.js +1 -0
- package/dist/esm/quadrantDiagram-34T5L4WZ-DQY0pNz6.js +1 -0
- package/dist/esm/radar-PYXPWWZC-CTTR6mD4.js +1 -0
- package/dist/esm/requirementDiagram-MS252O5E-BEx2GMJz.js +1 -0
- package/dist/esm/sankeyDiagram-XADWPNL6-Xs8yE439.js +1 -0
- package/dist/esm/sequenceDiagram-FGHM5R23-BRN5pTP-.js +1 -0
- package/dist/esm/server.js +1 -1
- package/dist/esm/settings.js +1 -1
- package/dist/esm/stateDiagram-FHFEXIEX-BgMmQXPF.js +1 -0
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-DcAYS7fn.js +1 -0
- package/dist/esm/time-BPMFfIa-.js +1 -0
- package/dist/esm/timeline-definition-GMOUNBTQ-B8yc3YE0.js +1 -0
- package/dist/esm/treeView-SZITEDCU-BQoV8XJs.js +1 -0
- package/dist/esm/treemap-W4RFUUIX-BuNBpvu9.js +1 -0
- package/dist/esm/{types-DMKo-tVy.js → types-Vls6Vkq9.js} +1 -1
- package/dist/esm/vennDiagram-DHZGUBPP-CWksExk6.js +1 -0
- package/dist/esm/wardley-RL74JXVD-B1RYxIGW.js +1 -0
- package/dist/esm/wardleyDiagram-NUSXRM2D-B0EUAKR5.js +1 -0
- package/dist/esm/websocket-DCvEZ5Ma.js +1 -0
- package/dist/esm/xychartDiagram-5P7HB3ND-KvOi074l.js +1 -0
- package/dist/module-types/src/components/molecules/Timer/types.d.ts +1 -12
- package/dist/module-types/src/components/molecules/index.d.ts +0 -2
- package/dist/module-types/src/components/molecules/server/TimerDisplay/types.d.ts +13 -0
- package/dist/module-types/src/components/molecules/server/index.d.ts +2 -0
- package/dist/module-types/src/components/molecules/server/types.d.ts +1 -0
- package/dist/module-types/src/components/templates/columns/contest-columns/index.d.ts +2 -2
- package/dist/module-types/src/components/templates/index.d.ts +0 -2
- package/dist/module-types/src/components/templates/{columns → server/columns}/contest-columns/getContestContestantsHeader.d.ts +1 -1
- package/dist/module-types/src/components/templates/{columns → server/columns}/contest-columns/getContestDateHeader.d.ts +1 -1
- package/dist/module-types/src/components/templates/server/index.d.ts +4 -0
- package/dist/module-types/src/components/templates/{problem → server/problem}/TagsField.d.ts +1 -1
- package/dist/module-types/src/components/templates/{submission → server/submission}/SubmissionDateField.d.ts +1 -1
- package/package.json +1 -1
- package/src/styles/components/atoms/_data-viewer.scss +3 -3
- package/dist/esm/ArrowForwardIcon-CfqRXB-e.js +0 -1
- package/dist/esm/BarChart-BflV6xj2.js +0 -1
- package/dist/esm/ChangePasswordModal-DX01z_Xk.js +0 -1
- package/dist/esm/CodeEditor-BOGzDG3d.js +0 -1
- package/dist/esm/CodeViewer-DViv-qRC.js +0 -1
- package/dist/esm/Collapse-B-9MQjHh.js +0 -1
- package/dist/esm/DataViewer-D8eXfNsQ.js +0 -1
- package/dist/esm/DrawerView-BVaIELlv.js +0 -1
- package/dist/esm/ExcalidrawButton-pTn865SY.js +0 -1
- package/dist/esm/GraphvizViewer-vH3t2wUS.js +0 -1
- package/dist/esm/ImageLoaderCropper-C5KjohnD.js +0 -1
- package/dist/esm/InputCellPhoneNumber-D9uGI1bD.js +0 -1
- package/dist/esm/LineChart-DLj6A5m5.js +0 -1
- package/dist/esm/MdMath-B4XKMYj5.js +0 -1
- package/dist/esm/ProblemStatus-FyUP73Qa.js +0 -1
- package/dist/esm/ReplyIcon-MNlM5Yom.js +0 -1
- package/dist/esm/SettingsIcon-DYcyghgs.js +0 -1
- package/dist/esm/SlideDeck-CzwvVTCV.js +0 -1
- package/dist/esm/TableOfContents-CBjKYpSh.js +0 -1
- package/dist/esm/TextHeadCell-Br9BtjJh.js +0 -1
- package/dist/esm/VirtualizedRowsFixed-CGitJjiS.js +0 -1
- package/dist/esm/WorksheetAsSlides-CLjpQVm5.js +0 -1
- package/dist/esm/WorksheetBodies-CZeRGme9.js +0 -1
- package/dist/esm/WorksheetContents-CnJBOanQ.js +0 -1
- package/dist/esm/WorksheetEditor-fMHttnD5.js +0 -1
- package/dist/esm/WorksheetNode-Kpoi8x-M.js +0 -1
- package/dist/esm/WorksheetViewer-CcPGkFZY.js +0 -1
- package/dist/esm/architecture-YZFGNWBL-B8OIAguO.js +0 -1
- package/dist/esm/architectureDiagram-Q4EWVU46-BqXqiLku.js +0 -1
- package/dist/esm/blockDiagram-DXYQGD6D-yjrbpeL0.js +0 -1
- package/dist/esm/c4Diagram-AHTNJAMY-4NdVv0Ao.js +0 -1
- package/dist/esm/channel-BzbUIu8B.js +0 -1
- package/dist/esm/classDiagram-6PBFFD2Q-IphAkZk8.js +0 -1
- package/dist/esm/classDiagram-v2-HSJHXN6E-IphAkZk8.js +0 -1
- package/dist/esm/clone-c8fZ8s2e.js +0 -1
- package/dist/esm/cose-bilkent-S5V4N54A-DXHTtvh4.js +0 -1
- package/dist/esm/dagre-KV5264BT-C1Bi5Hlh.js +0 -1
- package/dist/esm/date-Be2Mk-oF.js +0 -1
- package/dist/esm/diagram-5BDNPKRD-CRH_FA4_.js +0 -1
- package/dist/esm/diagram-G4DWMVQ6-GP4ahuTv.js +0 -1
- package/dist/esm/diagram-MMDJMWI5-DFTlftEV.js +0 -1
- package/dist/esm/diagram-TYMM5635-Cn4xZrOw.js +0 -1
- package/dist/esm/erDiagram-SMLLAGMA-Ck4PcI--.js +0 -1
- package/dist/esm/flowDiagram-DWJPFMVM-BBbHw1zk.js +0 -1
- package/dist/esm/ganttDiagram-T4ZO3ILL-GoBARLMA.js +0 -1
- package/dist/esm/gitGraph-7Q5UKJZL-D0FpBDlQ.js +0 -1
- package/dist/esm/gitGraphDiagram-UUTBAWPF-B-znwuk7.js +0 -1
- package/dist/esm/index-B0Ju49H0.js +0 -1
- package/dist/esm/index-CjH2xgIx.js +0 -2
- package/dist/esm/index-DaLn6fdm.js +0 -1
- package/dist/esm/info-OMHHGYJF-DloUnReg.js +0 -1
- package/dist/esm/infoDiagram-42DDH7IO-BZXN5IXJ.js +0 -1
- package/dist/esm/ishikawaDiagram-UXIWVN3A-DyGvD6G7.js +0 -1
- package/dist/esm/journeyDiagram-VCZTEJTY-DxXXhahs.js +0 -1
- package/dist/esm/kanban-definition-6JOO6SKY-D4Fz7zVa.js +0 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-BudCGGFH.js +0 -1
- package/dist/esm/packet-4T2RLAQJ-DrY-zHX-.js +0 -1
- package/dist/esm/pie-ZZUOXDRM-Ong88F43.js +0 -1
- package/dist/esm/pieDiagram-DEJITSTG-BhJWS0Q4.js +0 -1
- package/dist/esm/quadrantDiagram-34T5L4WZ-WoNzEH2-.js +0 -1
- package/dist/esm/radar-PYXPWWZC-D57lFxmR.js +0 -1
- package/dist/esm/requirementDiagram-MS252O5E-C0M6L425.js +0 -1
- package/dist/esm/sankeyDiagram-XADWPNL6-DwH4gDO6.js +0 -1
- package/dist/esm/sequenceDiagram-FGHM5R23-DgDclAkj.js +0 -1
- package/dist/esm/stateDiagram-FHFEXIEX-CuWet3bI.js +0 -1
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-CGfwkJ3x.js +0 -1
- package/dist/esm/timeline-definition-GMOUNBTQ-BMFr1mBJ.js +0 -1
- package/dist/esm/treeView-SZITEDCU-CYq4WblB.js +0 -1
- package/dist/esm/treemap-W4RFUUIX-70AFdrYl.js +0 -1
- package/dist/esm/vennDiagram-DHZGUBPP-D0NR4Ns6.js +0 -1
- package/dist/esm/wardley-RL74JXVD-Kam1OQea.js +0 -1
- package/dist/esm/wardleyDiagram-NUSXRM2D-CTlkGBtH.js +0 -1
- package/dist/esm/websocket-CoMeGplN.js +0 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-CWDBw8NU.js +0 -1
- /package/dist/module-types/src/components/molecules/{Timer → server/TimerDisplay}/TimerDisplay.d.ts +0 -0
- /package/dist/module-types/src/components/molecules/{layouts → server/layouts}/ApplicationLoaderLayout.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as t,g as e,t as a,q as r,a as o,b as n,_ as i,l as s,K as d,e as l,z as c,c as p,i as h}from"./mermaid.core-Dx_hE5Vb.js";import{p as x}from"./chunk-4BX2VUAB-CdXAk4UL.js";import{p as y}from"./mermaid-parser.core-BCKOf1D4.js";import"./index-CjH2xgIx.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./ProblemStatus-FyUP73Qa.js";import"./index-BWbfbDmw.js";import"./enums.js";import"./date-Be2Mk-oF.js";import"./date-DabTuCYQ.js";import"./websocket-CoMeGplN.js";import"./worksheet-ClM0CaBH.js";import"motion/react";import"react-dom";import"./index-BD_n8l03.js";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-BkjUCQC6.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";import"./map-BvlAjF4J.js";import"./_baseIteratee-DJNkOVK7.js";import"./isSymbol-CATEdeai.js";import"./_baseUniq-BJKKUJ6e.js";import"./min-Dc9VrJ6M.js";var g=i((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),f=i((t,e,a)=>({x:g(e,`${a} evolution`),y:g(t,`${a} visibility`)}),"toCoordinates"),m=i(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),u=i(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),a=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),w=i((t,e)=>{if(x(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const a=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);e.updateAxes({stages:a,stageBoundaries:r})}if(t.anchors.forEach(t=>{const a=f(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{const a=f(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,o=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,n=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,o,t.inertia,n)}),t.notes.forEach(t=>{const a=f(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{const a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{const o=`${t.parent}_${a.name}`,n=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,s=g(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(o,a.name,s,r,"pipeline-component",n,i),e.addPipelineComponent(t.parent,o)})}),t.links.forEach(t=>{const a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=m(t.fromPort)??m(t.toPort);const{flow:o,label:n}=u(t.arrow);!r&&o&&(r=o);const i=t.linkLabel,s=n??i;e.addLink(t.from,t.to,a,s,r)}),t.evolves.forEach(t=>{const a=e.getNode(t.component);if(void 0!==a?.y){const r=g(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,r,a.y)}}),t.annotations.length>0){const a=t.annotations[0],r=f(a.x,a.y,"Annotations box");e.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const a=f(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{const a=f(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{const a=f(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),k={parser:{yy:void 0},parse:i(async t=>{const e=await y("wardley",t);s.debug(e);const a=k.parser?.yy;if(!a||"function"!=typeof a.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w(e,a)},"parse")},b=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{i(this,"WardleyBuilder")}addNode(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function $(t){const e=p();return h(t.trim(),e)}function M(){return p()["wardley-beta"]}function v(t,e,a,r,o,n,i,s,d){b.addNode({id:t,label:$(e),x:a,y:r,className:o,labelOffsetX:n,labelOffsetY:i,inertia:s,sourceStrategy:d})}function S(t,e,a=!1,r,o){b.addLink({source:t,target:e,dashed:a,label:r,flow:o})}function P(t,e,a){b.addTrend({nodeId:t,targetX:e,targetY:a})}function C(t,e,a){b.addAnnotation({number:t,coordinates:e,text:a?$(a):void 0})}function z(t,e,a){b.addNote({text:$(t),x:e,y:a})}function L(t,e,a){b.addAccelerator({name:$(t),x:e,y:a})}function N(t,e,a){b.addDeaccelerator({name:$(t),x:e,y:a})}function A(t,e){b.setAnnotationsBox(t,e)}function j(t,e){b.setSize(t,e)}function E(t){b.startPipeline(t)}function T(t,e){b.addPipelineComponent(t,e)}function B(t){const e={};t.xLabel&&(e.xLabel=$(t.xLabel)),t.yLabel&&(e.yLabel=$(t.yLabel)),t.stages&&(e.stages=t.stages.map(t=>$(t))),t.stageBoundaries&&(e.stageBoundaries=t.stageBoundaries),b.setAxes(e)}function I(t){return b.getNode(t)}function R(){return b.build()}function X(){b.clear(),c()}i($,"textSanitizer"),i(M,"getConfig"),i(v,"addNode"),i(S,"addLink"),i(P,"addTrend"),i(C,"addAnnotation"),i(z,"addNote"),i(L,"addAccelerator"),i(N,"addDeaccelerator"),i(A,"setAnnotationsBox"),i(j,"setSize"),i(E,"startPipeline"),i(T,"addPipelineComponent"),i(B,"updateAxes"),i(I,"getNode"),i(R,"getWardleyData"),i(X,"clear");var Y={getConfig:M,addNode:v,addLink:S,addTrend:P,addAnnotation:C,addNote:z,addAccelerator:L,addDeaccelerator:N,setAnnotationsBox:A,setSize:j,startPipeline:E,addPipelineComponent:T,updateAxes:B,getNode:I,getWardleyData:R,clear:X,setAccTitle:n,getAccTitle:o,setDiagramTitle:r,getDiagramTitle:a,getAccDescription:e,setAccDescription:t},F=["Genesis","Custom Built","Product","Commodity"],O=i(()=>{const{themeVariables:t}=p();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),D=i(()=>{const t=p()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),q={parser:k,db:Y,renderer:{draw:i((t,e,a,r)=>{s.debug("Rendering Wardley map\n"+t);const o=D(),n=O(),c=1.6*o.nodeRadius,p=r.db,h=p.getWardleyData(),x=p.getDiagramTitle(),y=h.size?.width??o.width,g=h.size?.height??o.height,f=d(e);f.selectAll("*").remove(),l(f,g,y,o.useMaxWidth),f.attr("viewBox",`0 0 ${y} ${g}`);const m=f.append("g").attr("class","wardley-map"),u=f.append("defs");u.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",n.evolutionStroke).attr("stroke","none"),u.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",n.linkStroke).attr("stroke","none"),u.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",n.linkStroke).attr("stroke","none"),m.append("rect").attr("class","wardley-background").attr("width",y).attr("height",g).attr("fill",n.backgroundColor);const w=y-2*o.padding,k=g-2*o.padding;x&&m.append("text").attr("class","wardley-title").attr("x",y/2).attr("y",o.padding/2).attr("fill",n.axisTextColor).attr("font-size",1.05*o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(x);const b=i(t=>o.padding+t/100*w,"projectX"),$=i(t=>g-o.padding-t/100*k,"projectY"),M=m.append("g").attr("class","wardley-axes");M.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding).attr("y2",g-o.padding).attr("stroke",n.axisColor).attr("stroke-width",1),M.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",n.axisColor).attr("stroke-width",1);const v=h.axes.xLabel??"Evolution",S=h.axes.yLabel??"Visibility";M.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+w/2).attr("y",g-o.padding/4).attr("fill",n.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(v),M.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+k/2).attr("fill",n.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+k/2})`).text(S);const P=h.axes.stages&&h.axes.stages.length>0?h.axes.stages:F;if(P.length>0){const t=m.append("g").attr("class","wardley-stages"),e=h.axes.stageBoundaries,a=[];if(e&&e.length===P.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/P.length;P.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}P.forEach((e,r)=>{const i=a[r],s=o.padding+i.start*w,d=(s+(o.padding+i.end*w))/2;r>0&&t.append("line").attr("x1",s).attr("x2",s).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",d).attr("y",g-o.padding/1.5).attr("fill",n.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(o.showGrid){const t=m.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=o.padding+w*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",n.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding-k*a).attr("y2",g-o.padding-k*a).attr("stroke",n.gridColor).attr("stroke-dasharray","2 6")}}const C=new Map;if(h.nodes.forEach(t=>{C.set(t.id,{x:b(t.x),y:$(t.y),node:t})}),h.pipelines.length>0){const t=m.append("g").attr("class","wardley-pipelines"),e=m.append("g").attr("class","wardley-pipeline-links");h.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:C.get(t),node:h.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<r.length-1;t++){const a=r[t],o=r[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",a.pos.x).attr("y1",a.pos.y).attr("x2",o.pos.x).attr("y2",o.pos.y).attr("stroke",n.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let i=1/0,s=-1/0,d=0;if(a.componentIds.forEach(t=>{const e=C.get(t);e&&(i=Math.min(i,e.x),s=Math.max(s,e.x),d=e.y)}),i!==1/0&&s!==-1/0){const e=15,r=4*o.nodeRadius,l=d-r/2,p=C.get(a.nodeId);if(p){const t=(i+s)/2;p.x=t,p.y=l-c/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",i-e).attr("y",l).attr("width",s-i+2*e).attr("height",r).attr("fill","none").attr("stroke",n.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const z=m.append("g").attr("class","wardley-links"),L=new Map;h.pipelines.forEach(t=>{L.set(t.nodeId,new Set(t.componentIds))});const N=h.links.filter(t=>{if(!C.has(t.source)||!C.has(t.target))return!1;const e=L.get(t.target);return!e?.has(t.source)});z.selectAll("line").data(N).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=C.get(t.source),a=C.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.x+n/s*r}).attr("y1",t=>{const e=C.get(t.source),a=C.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.y+i/s*r}).attr("x2",t=>{const e=C.get(t.source),a=C.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.x+n/s*r}).attr("y2",t=>{const e=C.get(t.source),a=C.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.y+i/s*r}).attr("stroke",n.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),z.selectAll("text").data(N.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=C.get(t.source),a=C.get(t.target),r=(e.x+a.x)/2,o=a.y-e.y,n=a.x-e.x;return r+8*(o/Math.sqrt(n*n+o*o))}).attr("y",t=>{const e=C.get(t.source),a=C.get(t.target),r=(e.y+a.y)/2,o=a.x-e.x,n=a.y-e.y;return r+8*(-o/Math.sqrt(o*o+n*n))}).attr("fill",n.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=C.get(t.source),a=C.get(t.target),r=(e.x+a.x)/2,o=(e.y+a.y)/2,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i),d=r+8*(i/s),l=o+8*(-n/s);let c=180*Math.atan2(i,n)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${d} ${l})`}).text(t=>t.label);const A=m.append("g").attr("class","wardley-trends"),j=h.trends.map(t=>{const e=C.get(t.nodeId);if(!e)return null;const a=b(t.targetX),r=$(t.targetY),n=a-e.x,i=r-e.y,s=Math.sqrt(n*n+i*i),d=o.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>d?a-n/s*d:a,adjustedY2:s>d?r-i/s*d:r}}).filter(t=>null!==t);A.selectAll("line").data(j).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",n.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const E=m.append("g").attr("class","wardley-nodes").selectAll("g").data(h.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));E.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>C.get(t.id).x).attr("cy",t=>C.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#666").attr("stroke",n.componentStroke).attr("stroke-width",1),E.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>C.get(t.id).x).attr("cy",t=>C.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#ccc").attr("stroke",n.componentStroke).attr("stroke-width",1),E.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>C.get(t.id).x).attr("cy",t=>C.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=E.filter(t=>"market"===t.sourceStrategy);T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>C.get(t.id).x).attr("cy",t=>C.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","white").attr("stroke",n.componentStroke).attr("stroke-width",1),E.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>C.get(t.id).x).attr("cy",t=>C.get(t.id).y).attr("r",o.nodeRadius).attr("fill",n.componentFill).attr("stroke",n.componentStroke).attr("stroke-width",1);const B=.7*o.nodeRadius,I=1.2*o.nodeRadius;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>C.get(t.id).x).attr("y1",t=>C.get(t.id).y-I).attr("x2",t=>C.get(t.id).x-I*Math.cos(Math.PI/6)).attr("y2",t=>C.get(t.id).y+I*Math.sin(Math.PI/6)).attr("stroke",n.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>C.get(t.id).x-I*Math.cos(Math.PI/6)).attr("y1",t=>C.get(t.id).y+I*Math.sin(Math.PI/6)).attr("x2",t=>C.get(t.id).x+I*Math.cos(Math.PI/6)).attr("y2",t=>C.get(t.id).y+I*Math.sin(Math.PI/6)).attr("stroke",n.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>C.get(t.id).x+I*Math.cos(Math.PI/6)).attr("y1",t=>C.get(t.id).y+I*Math.sin(Math.PI/6)).attr("x2",t=>C.get(t.id).x).attr("y2",t=>C.get(t.id).y-I).attr("stroke",n.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>C.get(t.id).x).attr("cy",t=>C.get(t.id).y-I).attr("r",B).attr("fill","white").attr("stroke",n.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>C.get(t.id).x-I*Math.cos(Math.PI/6)).attr("cy",t=>C.get(t.id).y+I*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",n.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>C.get(t.id).x+I*Math.cos(Math.PI/6)).attr("cy",t=>C.get(t.id).y+I*Math.sin(Math.PI/6)).attr("r",B).attr("fill","white").attr("stroke",n.componentStroke).attr("stroke-width",2),E.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>C.get(t.id).x-c/2).attr("y",t=>C.get(t.id).y-c/2).attr("width",c).attr("height",c).attr("fill",n.componentFill).attr("stroke",n.componentStroke).attr("stroke-width",1),E.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=C.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=C.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=C.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=C.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y+a/2}).attr("stroke",n.componentStroke).attr("stroke-width",6),E.append("text").attr("x",t=>{const e=C.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=C.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?n.evolutionStroke:"anchor"===t.className?"#000":n.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),h.annotations.length>0){const t=m.append("g").attr("class","wardley-annotations");if(h.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:b(t.x),y:$(t.y)}));if(a.length>1)for(let e=0;e<a.length-1;e++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[e].x).attr("y1",a[e].y).attr("x2",a[e+1].x).attr("y2",a[e+1].y).attr("stroke",n.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");a.forEach(a=>{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",n.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",n.axisTextColor).attr("font-weight","bold").text(e.number)})}),h.annotationsBox){let e=b(h.annotationsBox.x),a=$(h.annotationsBox.y);const r=10,i=16,s=11,d=t.append("g").attr("class","wardley-annotations-box"),l=[...h.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(l.forEach((t,o)=>{const l=d.append("text").attr("x",e+r).attr("y",a+r+(o+1)*i).attr("font-size",s).attr("fill",n.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(l)}),c.length>0){let t=0,s=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const o=a.getBBox();s=Math.max(s,o.height)});const p=t+2*r+105,h=l.length*i+2*r+s/2,x=o.padding,f=y-o.padding-p,m=o.padding,u=g-o.padding-h;e=Math.max(x,Math.min(e,f)),a=Math.max(m,Math.min(a,u)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*i)}),d.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",h).attr("fill","white").attr("stroke",n.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(h.notes.length>0){const t=m.append("g").attr("class","wardley-notes");h.notes.forEach(e=>{const a=b(e.x),r=$(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",n.axisTextColor).attr("font-weight","bold").text(e.text)})}if(h.accelerators.length>0){const t=m.append("g").attr("class","wardley-accelerators");h.accelerators.forEach(e=>{const a=b(e.x),r=$(e.y),o=60,i=`\n M ${a} ${r-15}\n L ${a+o-20} ${r-15}\n L ${a+o-20} ${r-15-8}\n L ${a+o} ${r}\n L ${a+o-20} ${r+15+8}\n L ${a+o-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",i).attr("fill","white").attr("stroke",n.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",n.axisTextColor).attr("font-weight","bold").text(e.name)})}if(h.deaccelerators.length>0){const t=m.append("g").attr("class","wardley-deaccelerators");h.deaccelerators.forEach(e=>{const a=b(e.x),r=$(e.y),o=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",n.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",n.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:i(()=>"","styles")};export{q as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./settings-DgLs6IK_.js";import{QueryParamKey as t}from"./enums.js";import{y as s,H as n,m as r,z as o,A as a,a as i,j as S,B as c,d as l,i as u,C as d,D as E,S as T,x as I}from"./index-BWbfbDmw.js";import{P as p,L as _}from"./date-DabTuCYQ.js";import{jsx as N}from"react/jsx-runtime";import{Fragment as m}from"react";import{a as R}from"./date-Be2Mk-oF.js";import{S as C}from"./worksheet-ClM0CaBH.js";const A={ABORTED_REQUEST:"ABORTED_REQUEST",ERROR_ON_RESPONSE:"ERROR_ON_RESPONSE",SERVICE_NOT_FOUND:"SERVICE_NOT_FOUND"},U={SUCCESS:"SUCCESS",ERROR:"ERROR",LOADING:"LOADING",NONE:"NONE"},g={PING:"PING",CLIENT_TRACK_LOCATION:"CLIENT_TRACK_LOCATION",CLIENT_TRACK_SCREENSHOT:"CLIENT_TRACK_SCREENSHOT",CLIENT_TRACK_DEVICE:"CLIENT_TRACK_DEVICE",CHAT_COMPLETIONS:"CHAT_COMPLETIONS"},O={PONG:"PONG",CODE_RUN_STATUS:"CODE_RUN_STATUS",SUBMISSION_RUN_STATUS:"SUBMISSION_RUN_STATUS",USER_MESSAGE:"USER_MESSAGE",SEND_DATA:"SEND_DATA",SEND_DATA_ECS_TASK_DEFINITIONS_LIST:"SEND_DATA_ECS_TASK_DEFINITIONS_LIST",SEND_DATA_ECS_TASKS_LIST:"SEND_DATA_ECS_TASKS_LIST",SEND_DATA_EC2_INSTANCES_LIST:"SEND_DATA_EC2_INSTANCES_LIST",SEND_DATA_SSM_SESSIONS_LIST:"SEND_DATA_SSM_SESSIONS_LIST",SEND_DATA_RUN_COMMAND:"SEND_DATA_RUN_COMMAND",SEND_DATA_CLIENT_TRACK:"SEND_DATA_CLIENT_TRACK",SEND_DATA_CHAT_COMPLETIONS:"SEND_DATA_CHAT_COMPLETIONS",PROBLEM_CRAWLED:"PROBLEM_CRAWLED",SUBMISSIONS_CRAWL:"SUBMISSIONS_CRAWL",CONTEST_CHANGES:"CONTEST_CHANGES",CLIENT_TRACK:"CLIENT_TRACK",USER_NOTIFICATION:"USER_NOTIFICATION",USER_NOTIFICATION_SUBMISSION:"USER_NOTIFICATION_SUBMISSION",USER_NOTIFICATION_CONTEST_CLARIFICATION:"USER_NOTIFICATION_CONTEST_CLARIFICATION"},B={SUBSCRIBE_CODE_RUN_STATUS:"SUBSCRIBE_CODE_RUN_STATUS",UNSUBSCRIBE_CODE_RUN_STATUS:"UNSUBSCRIBE_CODE_RUN_STATUS",SUBSCRIBE_SUBMISSION_RUN_STATUS:"SUBSCRIBE_SUBMISSION_RUN_STATUS",UNSUBSCRIBE_SUBMISSION_RUN_STATUS:"UNSUBSCRIBE_SUBMISSION_RUN_STATUS",SUBSCRIBE_GET_DATA:"SUBSCRIBE_GET_DATA",UNSUBSCRIBE_GET_DATA:"SUBSCRIBE_GET_DATA",SUBSCRIBE_PROBLEM_CRAWLED:"SUBSCRIBE_PROBLEM_CRAWLED",UNSUBSCRIBE_PROBLEM_CRAWLED:"UNSUBSCRIBE_PROBLEM_CRAWLED",SUBSCRIBE_SUBMISSIONS_CRAWL:"SUBSCRIBE_SUBMISSIONS_CRAWL",UNSUBSCRIBE_SUBMISSIONS_CRAWL:"UNSUBSCRIBE_SUBMISSIONS_CRAWL",SUBSCRIBE_CONTEST_CHANGES:"SUBSCRIBE_CONTEST_CHANGES",UNSUBSCRIBE_CONTEST_CHANGES:"UNSUBSCRIBE_CONTEST_CHANGES",SUBSCRIBE_CLIENT_TRACK:"SUBSCRIBE_CLIENT_TRACK",UNSUBSCRIBE_CLIENT_TRACK:"UNSUBSCRIBE_CLIENT_TRACK",SUBSCRIBE_USER_NOTIFICATION:"SUBSCRIBE_USER_NOTIFICATION",UNSUBSCRIBE_USER_NOTIFICATION:"UNSUBSCRIBE_USER_NOTIFICATION"},h={SUBTASK:"SUBTASK",TOTAL:"TOTAL",PARTIAL:"PARTIAL"},f={STANDARD:"STANDARD",DYNAMIC:"DYNAMIC",INTERACTIVE:"INTERACTIVE"},b=e=>e.toLowerCase().replace(/_/g," ");class L extends Error{code;data;constructor(e,t){const s=t?.message||b(e);super(s),this.message=s,this.code=e,t?.stack&&(this.stack=t.stack),t?.data&&(this.data=t.data)}}const y=e=>{try{if("string"==typeof e)return JSON.parse(e),!0}catch{return!1}return!1},D=e=>{try{return"string"==typeof JSON.stringify(e)}catch{return!1}};function w(e,...t){return{success:!1,message:e,errors:t.map(e=>({code:e.code,message:e.message,detail:e.stack||(new Error).stack||"",data:e.data}))}}const v=e=>{if(!y(e)){const t=w(b(A.SERVICE_NOT_FOUND),new L(A.SERVICE_NOT_FOUND));return s({message:"response is not string json, success false on cleaning request",responseText:e,response:t}),t}const t=JSON.parse(e);if("boolean"==typeof t.success){const n=function(e){if(!0===e.success&&"string"==typeof e.message){if(e.content)return{success:!0,message:e.message,content:e.content};if(Array.isArray(e.contents)&&e.meta)return{success:!0,message:e.message,contents:e.contents,meta:e.meta}}return null}(t);if(n)return n;if(!1===t.success&&"string"==typeof t.message&&Array.isArray(t.errors)){const n={success:!1,message:t.message,errors:t.errors};return s({message:"success false on cleaning request",responseText:e,response:n}),n}}const n=w(b(A.ERROR_ON_RESPONSE),new L(A.ERROR_ON_RESPONSE));return s({message:"success false on cleaning request",responseText:e,response:n}),n},M=e=>{if("object"!=typeof e||null===e)return!1;const t=e;return(Object.values(B).includes(t.event)||Object.values(g).includes(t.event))&&"string"==typeof t.clientId&&!!t.clientId},$=e=>{if(!M(e))return!1;const t=e;return e.event===B.SUBSCRIBE_CODE_RUN_STATUS&&"string"==typeof t.runId&&!!t.runId},j=e=>{if(!M(e))return!1;const t=e;return e.event===B.SUBSCRIBE_SUBMISSION_RUN_STATUS&&"string"==typeof t.submitId&&!!t.submitId},P=e=>M(e)&&e.event===B.SUBSCRIBE_GET_DATA,K=e=>M(e)&&e.event===B.SUBSCRIBE_PROBLEM_CRAWLED,F=e=>M(e)&&e.event===B.SUBSCRIBE_SUBMISSIONS_CRAWL,k=e=>M(e)&&e.event===B.SUBSCRIBE_CONTEST_CHANGES,x=e=>M(e)&&e.event===B.SUBSCRIBE_CLIENT_TRACK,G=e=>M(e)&&e.event===B.SUBSCRIBE_USER_NOTIFICATION,W=e=>{if("object"!=typeof e||null===e)return!1;const t=e;return Object.values(O).includes(t.event)&&"string"==typeof t.key&&"string"==typeof t.connectionId&&"number"==typeof t.messageTimestamp&&!!t.messageTimestamp},H=e=>{if(!W(e))return!1;const t=e;return e.event===O.CODE_RUN_STATUS&&"string"==typeof t.runId&&!!t.runId&&Object.values(C).includes(t.status)},V=e=>{if(!W(e))return!1;const t=e;return e.event===O.SUBMISSION_RUN_STATUS&&"string"==typeof t.submitId&&!!t.submitId&&Object.values(C).includes(t.status)&&Object.values(p).includes(t.verdict)&&"number"==typeof t.points},J=(e,t,s)=>`${e}-${t}-${s}`,q=[h.TOTAL,h.SUBTASK,h.PARTIAL],Q={[h.TOTAL]:{value:h.TOTAL,label:"total",description:"if all test cases are Accepted the result is Accepted otherwise it will be Runtime Error, Time Limited Exceeded, Memory Limited Exceeded, Wrong Answer or Presentation Error in that order."},[h.SUBTASK]:{value:h.SUBTASK,label:"subtask",description:"the test cases are grouped and each group of test cases is assigned a score, if all test cases in a group are Accepted then the score assigned to that group of test cases is added to total score, if total score is equal to the sum of the assigned scores of all groups of test cases then the result is Accepted, otherwise if the total score is greater than zero the result is Partial Accepted with the total accumulated score, otherwise it will be Runtime Error, Time Limited Exceeded, Memory Limited Exceeded, Wrong Answer or Presentation Error in that order."},[h.PARTIAL]:{value:h.PARTIAL,label:"partial",description:"the test cases are grouped and each group is associated with X points, and each test case in a group scores X points "}},z={[f.STANDARD]:{value:f.STANDARD,label:"standard",description:"The contestant submit a single source code in one of the allowed programming languages. The source code is either standalone or to be compiled. The resulting user's executable does I/O standard input and output. The output produced by the contestant's program is then compared to the correct output using a simple diff algorithm."},[f.INTERACTIVE]:{value:f.INTERACTIVE,label:"interactive",description:"developing.."},[f.DYNAMIC]:{value:f.DYNAMIC,label:"dynamic",description:"The contestant submit a single source code in one of the allowed programming languages. The user's source code is either standalone or to be compiled. The resulting user's executable does I/O standard input and output. The output produced by the contestant's program is saved. The problem editor save a single source code in C++ 17. The editor's source code can read judge input filepath argv[1], judge output filepath argv[2], user's output filepath argv[3], user's error filepath argv[4], user's log filepath argv[5], user's source filepath argv[6] and submission information filepath argv[7] (organizationId, submitId, runId, userId, contestId, problemId, language, userNickname, timestamp). The resulting editor's executable should be \"AC\" or a number between 1 and 100 for partial accepted"}},Y=e=>e.isGlobal?{order:0,label:"global",bc:"bc-io"}:e.isEndless?{order:1,label:"endless",bc:"bc-io"}:e.isPast?{order:2,label:"past",bc:"bc-sf-md"}:e.isLive?{order:3,label:"live",bc:"bc-er"}:e.isFuture?{order:4,label:"upcoming",bc:"bc-ss"}:{order:5,label:"-",bc:"bc-sf-md"},X=async e=>{"undefined"!=typeof navigator&&await navigator.clipboard.writeText(e)},Z=/^[0-9a-fA-F]{24}$/;function ee(){let e="";return r()&&(e=new URLSearchParams(window.location.search).get(t.TOKEN)??""),24===(s=e).length&&Z.test(s)?e:"";var s}function te(){return"undefined"!=typeof localStorage?ee()||localStorage.getItem(e)||"":ee()||""}const se=(e,t,s)=>re(e,t,s),ne=(e,t,s)=>re(e,t,s),re=async(e,t,s)=>{const{method:S=n.GET,body:c,signal:l,responseType:u,headers:d,cache:E,next:T}=t||{},I=new Headers(d??{});I.set("accept","application/json"),c instanceof FormData||I.set("content-type","application/json"),r()&&I.set(o,window.location?.host);const p=te();p&&I.set(a,p);try{const t=await fetch(e,{method:S,headers:I,credentials:"include",...c?{body:c}:{},...l?{signal:l}:{},cache:E,next:T});try{return"blob"===u?await t.blob():await t.text()}catch(t){i("error on get data",{url:e,error:t,responseType:u})}return"blob"===u?new Blob:""}catch(t){if(i("error on fetch",{url:e,error:t}),l?.aborted)return"blob"===u?new Blob:JSON.stringify({success:!1,message:A.ABORTED_REQUEST.toLowerCase().replaceAll("_"," "),errors:[{code:A.ABORTED_REQUEST,detail:`[${S}] ${e} \n ${c}`}]});if(!1===s)throw t;return"blob"===u?new Blob:JSON.stringify({success:!1,message:A.ERROR_ON_RESPONSE.toLowerCase().replaceAll("_"," "),errors:[{code:A.ERROR_ON_RESPONSE,detail:`FETCH CATCH ERROR : ${JSON.stringify({method:S,url:e,body:c,error:t})}`}]})}},oe=e=>({origin:r()?window.location.origin:"https://juki.app",referer:r()?`${window.location.origin}/`:"https://juki.app/",[a]:e,[o]:"juki.app"}),ae=()=>({origin:r()?window.location.origin:"https://juki.app",referer:r()?`${window.location.origin}/`:"https://juki.app/",[d]:"true",[o]:"juki.app"}),ie=async e=>{const{url:t,...s}=S.apiV2.note.publish({body:{source:e.trim()}}),n=v(await se(t,s));return n?.success&&n?.content.sourceUrl?n.content.sourceUrl:(i("error on publish note",{request:n}),"")},Se=async(e,t)=>{try{const{url:s,...r}=S.apiV2.image.publish({body:{contentType:e.type,isPublic:t}}),o=v(await se(s,r));return o.success?(await fetch(o.content.signedUrl,{method:n.PUT,headers:{"Content-Type":e.type},body:e}),{status:U.SUCCESS,message:"image uploaded successfully",content:o.content}):(console.error("response not success on handleUploadImage",{response:o}),{status:U.ERROR,message:"Ups, please try again",content:null})}catch(e){return console.error(e),{status:U.ERROR,message:"Ups, please try again",content:null}}},ce=async(e,t)=>{try{const{url:r,...o}=S.apiV2.file.publish({body:{contentType:e.type,folder:t}}),a=v(await se(r,o));return a.success?(await fetch(a.content.signedUrl,{method:n.PUT,headers:{"Content-Type":e.type},body:e}),{status:U.SUCCESS,message:"image uploaded successfully",content:a.content}):(s("response not success on handleUploadImage",{response:a}),{status:U.ERROR,message:"Ups, please try again",content:null})}catch(e){return s(e),{status:U.ERROR,message:"Ups, please try again",content:null}}},le=async(e,t,s)=>{const{url:n,...r}=S.apiV2.export.websiteToPdf({params:{url:e,footerTemplate:s?.footerTemplate?.split("\n").join(""),headerTemplate:s?.headerTemplate?.split("\n").join(""),format:s?.format,margin:s?.margin}}),o=v(await se(n,r));if(!o.success)throw new Error("error on download pdf");await u(`https://${o.content.urlExportedPDF}`,t)},ue=async(e,t,s)=>{const{url:n,...r}=S.apiV2.note.createPdf({body:{source:e,theme:t}}),o=await se(n,{responseType:"blob",...r});if("string"==typeof o){if(D(o)){const e=JSON.parse(o).errors[0];if(e)throw new L(e.code,{message:e.detail})}throw new L(A.ABORTED_REQUEST,{message:"error generating the pdf"})}l(o,s)},de=async(e,t,n)=>{const o=te(),a=r()?window.location:new Location;s("Error to report",{error:e,errorInfo:t,location:a,visitorSessionId:o,data:n});try{const{url:r,...i}=S.apiV2.log.error({body:{location:a,visitorSessionId:o,errorName:e?.name||"",errorMessage:e?.message||"",errorStack:e?.stack||"",errorInfo:t,data:{error:e,...n||{}}}}),l=v(await se(r,i));l.success?c("Error reported"):s("Error reported failed",{error:e,errorInfo:t,location:a,visitorSessionId:o,response:l})}catch(n){s("error on log error",{error:e,errorInfo:t,location:a,visitorSessionId:o,errorOnLog:n})}},Ee=e=>`jk-editor-settings-store/${e}`,Te=e=>`jk-problem-storage/${e}`,Ie=e=>`jk-sources-storage/${e}`,pe=e=>`jk-code-editor-settings-storage/${e}`,_e=e=>`jk-test-cases-storage/${e}`,Ne=(e,{statement:t,settings:s},n,r)=>{const o=(t?.description?.[n]||t?.description?.[_.EN]||t?.description?.[_.ES]||"").trim(),a=(t?.input[n]||t?.input[_.EN]||t?.input[_.ES]||"").trim(),i=(t?.output[n]||t?.output[_.EN]||t?.output[_.ES]||"").trim(),S=(t?.note?.[n]||t?.note?.[_.EN]||t?.note?.[_.ES]||"").trim(),c=t?.sampleCases||[],l=Object.values(s?.byProgrammingLanguage||{});return{statementDescription:o,statementInput:a,statementOutput:i,statementNote:S,mdStatement:`\n# \\textAlign=center ${r}\n\n\\textAlign=center **${e("type")}:** ${z[s?.type]?.label}, **${e("mode")}:** ${Q[s?.scoringMode]?.label}\n\n|${e("language")}|${e("time limit")}|${e("memory limit")}|\n|--|--|--|\n| ${e("general")} | ${(s?.timeLimit/1e3).toFixed(1)} ${e("seconds")} | ${(s?.memoryLimit/1e3).toFixed(1)} ${e("MB")} |\n${l.map(t=>`| ${E[t.language]?.label} | ${(t?.timeLimit/1e3).toFixed(1)} ${e("seconds")} | ${(t?.memoryLimit/1e3).toFixed(1)} ${e("MB")}|`).join("\n")}\n\n# ${e("description")}\n\n${o}\n\n# ${e("input")}\n\n${a}\n\n# ${e("output")}\n\n${i}\n\n# ${e("subtasks description")}\n\n${s.scoringMode===h.SUBTASK?Object.values(s.pointsByGroups).map(t=>`### ${e("group")} ${t.group} (${t.points} ${e("points")})\n\n${t.description?.[n]}\n `).join("\n"):""}\n\n${c.map((t,s)=>`### ${e("input sample")} ${s+1}\n\`\`\`\n${t.input}\n\`\`\`\n### ${e("output sample")} ${s+1}\n\`\`\`\n${t.output}\n\`\`\`\n`).join("")}\n\n# ${e("note")}\n\n${S}\n`,shouldViewPDF:!(""!==o.trim()||""!==a.trim()||""!==i.trim()||""!==S.trim()||!t.pdfUrl[_.ES]&&!t.pdfUrl[_.EN])}},me=()=>r()&&("https://judge.juki.app"===window.location.origin||window.location.origin.endsWith(".jukijudge.com")||"http://localhost:3070"===window.location.origin),Re=(e,t)=>{if(me()||t===e)return"";let s=`https://${e}.jukijudge.com`;return"juki-app"===e&&(s="https://judge.juki.app"),s},Ce=(e,t)=>{const s="function"==typeof e?e():e;return void 0!==t?N(m,{children:s},t):s},Ae=(e,t,s)=>{const n="function"==typeof e?e(t):e;return void 0!==s?N(m,{children:n},s):n},Ue=e=>{let t="";for(const[s,n]of Object.entries(e))n&&(t&&(t+="&"),t+=`${s}=${encodeURIComponent(n.toString())}`);return t},ge=e=>{let t="";for(const[s,n]of Object.entries(e))!t||-1!==n&&1!==n||(t+=T),-1===n&&(t+=encodeURIComponent(`-${s}`)),1===n&&(t+=encodeURIComponent(`+${s}`));return t?`sort=${t}`:""},Oe=e=>{let t,s;if("string"==typeof e){const[n,r]=e.split("?");t=n||"",s=new URLSearchParams(r||"")}else t=e?.pathname||"",s=e?.searchParams||new URLSearchParams;const n=s.toString();return{pathname:t,searchParams:s,path:`${t}${n?`?${n}`:""}`}},Be=e=>"string"==typeof e?"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)):"",he=(e,t,s,n,r,o)=>{const a=(e=>{const t=[],s=1e3,n=6e4,r=36e5,o=864e5,a=6048e5,i=Math.floor(e/a);t.push({remaining:i,label:1===i?"week":"weeks",abbreviatedLabel:"w",milliseconds:a,digits:2});const S=Math.floor(e%a/o);t.push({remaining:S,label:1===S?"day":"days",abbreviatedLabel:"d",milliseconds:o,digits:2});const c=Math.floor(e%o/r);t.push({remaining:c,label:1===c?"hour":"hours",abbreviatedLabel:"h",milliseconds:r,digits:2});const l=Math.floor(e%r/n);t.push({remaining:l,label:1===l?"minute":"minutes",abbreviatedLabel:"m",milliseconds:n,digits:2});const u=Math.floor(e%n/s);t.push({remaining:u,label:1===u?"second":"seconds",abbreviatedLabel:"s",milliseconds:s,digits:2});const d=Math.floor(e%s);return t.push({remaining:d,label:1===d?"millisecond":"milliseconds",abbreviatedLabel:"ms",milliseconds:1,digits:3}),t})(Math.max(e,0)),{showWeeks:i,showDays:S,showHours:c,showMinutes:l,showSeconds:u,showMilliseconds:d}=R(t);for(i||(a[1].remaining+=a[0].milliseconds*a[0].remaining/a[1].milliseconds,a[1].label=1===a[1].remaining?"day":"days",a.shift(),S||(a[1].remaining+=a[0].milliseconds*a[0].remaining/a[1].milliseconds,a[1].label=1===a[1].remaining?"hour":"hours",a.shift(),c||(a[1].remaining+=a[0].milliseconds*a[0].remaining/a[1].milliseconds,a[1].label=1===a[1].remaining?"minute":"minutes",a.shift(),l||(a[1].remaining+=a[0].milliseconds*a[0].remaining/a[1].milliseconds,a[1].label=1===a[1].remaining?"second":"seconds",a.shift(),u||(a[1].remaining+=a[0].milliseconds*a[0].remaining/a[1].milliseconds,a[1].label=1===a[1].remaining?"millisecond":"milliseconds",a.shift()))))),d||(a.pop(),u||(a.pop(),l||(a.pop(),c||(a.pop(),S||a.pop()))));a.length>o&&(s||a.length>r)&&a.length&&0===a[0].remaining;)a.shift();for(;a.length>o&&(n||a.length>r)&&a.length&&0===a[a.length-1]?.remaining;)a.pop();for(;a.length>o&&a.length>r;)a.pop();return a};function fe(e){return $(e)||(e=>{if(!M(e))return!1;const t=e;return e.event===B.UNSUBSCRIBE_CODE_RUN_STATUS&&"string"==typeof t.runId&&!!t.runId})(e)?J(O.CODE_RUN_STATUS,e.clientId,e.runId):j(e)||(e=>{if(!M(e))return!1;const t=e;return e.event===B.UNSUBSCRIBE_SUBMISSION_RUN_STATUS&&"string"==typeof t.submitId&&!!t.submitId})(e)?J(O.SUBMISSION_RUN_STATUS,e.clientId,e.submitId):P(e)||(e=>M(e)&&e.event===B.UNSUBSCRIBE_GET_DATA)(e)?J(O.SEND_DATA,e.clientId,e.dataId):G(e)||(e=>M(e)&&e.event===B.UNSUBSCRIBE_USER_NOTIFICATION)(e)?J(O.USER_NOTIFICATION,e.clientId,"*"):K(e)||(e=>M(e)&&e.event===B.UNSUBSCRIBE_PROBLEM_CRAWLED)(e)?J(O.PROBLEM_CRAWLED,e.clientId,e.problemKey):F(e)||(e=>M(e)&&e.event===B.UNSUBSCRIBE_SUBMISSIONS_CRAWL)(e)?J(O.SUBMISSIONS_CRAWL,e.clientId,I([e.contestKey,e.problemKeys])):k(e)||(e=>M(e)&&e.event===B.UNSUBSCRIBE_CONTEST_CHANGES)(e)?J(O.CONTEST_CHANGES,e.clientId,e.contestKey):x(e)||(e=>M(e)&&e.event===B.UNSUBSCRIBE_CLIENT_TRACK)(e)?J(O.CLIENT_TRACK,e.clientId,"*"):""}function be(e){return $(e)?{...e,event:B.UNSUBSCRIBE_CODE_RUN_STATUS}:j(e)?{...e,event:B.UNSUBSCRIBE_SUBMISSION_RUN_STATUS}:P(e)?{...e,event:B.UNSUBSCRIBE_GET_DATA}:K(e)?{...e,event:B.UNSUBSCRIBE_PROBLEM_CRAWLED}:F(e)?{...e,event:B.UNSUBSCRIBE_SUBMISSIONS_CRAWL}:k(e)?{...e,event:B.UNSUBSCRIBE_CONTEST_CHANGES}:x(e)?{...e,event:B.UNSUBSCRIBE_CLIENT_TRACK}:G(e)?{...e,event:B.UNSUBSCRIBE_USER_NOTIFICATION}:e}export{Ce as A,de as B,Ue as C,ge as D,Be as E,y as F,v as G,D as H,Q as I,H as J,h as K,V as L,g as M,q as N,f as O,z as P,U as S,B as W,se as a,he as b,X as c,ue as d,le as e,ne as f,ee as g,Y as h,Ee as i,oe as j,Oe as k,Re as l,fe as m,ae as n,Te as o,pe as p,Ie as q,Ae as r,Ne as s,_e as t,be as u,te as v,ce as w,Se as x,me as y,ie as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as t,g as i,t as e,q as s,a,b as n,_ as o,l as h,K as r,e as l,z as c,E as g,i as u,G as x,H as d,L as p,M as f}from"./mermaid.core-Dx_hE5Vb.js";import{b as m}from"./band-D2afako6.js";import{l as y}from"./linear-BRlKh6eb.js";import{l as b}from"./string-LeDn2fkG.js";import"./index-CjH2xgIx.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./ProblemStatus-FyUP73Qa.js";import"./index-BWbfbDmw.js";import"./enums.js";import"./date-Be2Mk-oF.js";import"./date-DabTuCYQ.js";import"./websocket-CoMeGplN.js";import"./worksheet-ClM0CaBH.js";import"motion/react";import"react-dom";import"./index-BD_n8l03.js";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-BkjUCQC6.js";import"./memoize-CPUrcYQl.js";import"./init-DLRA0X12.js";import"./ordinal-zwWoQKz9.js";import"./defaultLocale-HOdfsG1x.js";var A=function(){var t=o(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],A=[1,37],w=[1,43],S=[1,42],C=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:o(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=n[h-1];break;case 20:this.$=[Number(n[h-2]),...n[h]];break;case 21:this.$=[Number(n[h])];break;case 22:s.setXAxisTitle(n[h]);break;case 23:s.setXAxisTitle(n[h-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(n[h]);break;case 26:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 28:this.$=[n[h-2],...n[h]];break;case 29:this.$=[n[h]];break;case 30:s.setYAxisTitle(n[h]);break;case 31:s.setYAxisTitle(n[h-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 37:case 38:this.$={text:n[h],type:"text"};break;case 39:this.$={text:n[h],type:"markdown"};break;case 40:this.$=n[h];break;case 41:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:a,35:n,36:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:a,35:n,36:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:n,36:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:a,35:n,36:h}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:a,35:n,36:h}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:39,13:38,24:w,27:S,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:45,15:44,27:C,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:w,27:S}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:C}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:m,48:y,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:o(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:o(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,r="",l=0,c=0,g=n.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(x.yy[d]=this.yy[d]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var p=u.yylloc;n.push(p);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||u.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),o(m,"lex");for(var y,b,A,w,S,C,k,_,T={};;){if(b=e[e.length-1],this.defaultActions[b]?A=this.defaultActions[b]:(null==y&&(y=m()),A=h[b]&&h[b][y]),void 0===A||!A.length||!A[0]){var R="";for(S in _=[],h[b])this.terminals_[S]&&S>2&&_.push("'"+this.terminals_[S]+"'");R=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[y]||y,line:u.yylineno,loc:p,expected:_})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+y);switch(A[0]){case 1:e.push(y),a.push(u.yytext),n.push(u.yylloc),e.push(A[1]),y=null,c=u.yyleng,r=u.yytext,l=u.yylineno,p=u.yylloc;break;case 2:if(C=this.productions_[A[1]][1],T.$=a[a.length-C],T._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},f&&(T._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),void 0!==(w=this.performAction.apply(T,[r,c,l,x.yy,A[1],a,n].concat(g))))return w;C&&(e=e.slice(0,-1*C*2),a=a.slice(0,-1*C),n=n.slice(0,-1*C)),e.push(this.productions_[A[1]][0]),a.push(T.$),n.push(T._$),k=h[e[e.length-2]][e[e.length-1]],e.push(k);break;case 3:return!0}}return!0},"parse")},P=function(){return{EOF:1,parseError:o(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:o(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var 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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:o(function(t,i){var e,s,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))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var t=this.next();return t||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,o(E,"Parser"),E.prototype=L,L.Parser=E,new E}();A.parser=A;var w=A;function S(t){return"bar"===t.type}function C(t){return"band"===t.type}function k(t){return"linear"===t.type}o(S,"isBarPlot"),o(C,"isBandAxisData"),o(k,"isLinearAxisData");var _=class{constructor(t){this.parentGroup=t}static{o(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=f(s,1,a),n=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,n),e.height=Math.max(e.height,o)}return s.remove(),e}},T=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{o(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const a=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},R=class extends T{static{o(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=m().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=m().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},D=class extends T{static{o(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=y().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=y().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function L(t,i,e,s){const a=new _(s);return C(t)?new R(i,e,t.categories,t.title,a):new D(i,e,[t.min,t.max],t.title,a)}o(L,"getAxis");var P=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{o(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function E(t,i,e,s){const a=new _(s);return new P(a,t,i,e)}o(E,"getChartTitleComponent");var v=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{o(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;return i="horizontal"===this.orientation?b().y(t=>t[0]).x(t=>t[1])(t):b().x(t=>t[0]).y(t=>t[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},M=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{o(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},I=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{o(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new v(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new M(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function $(t,i,e){return new I(t,i,e)}o($,"getPlotComponent");var B,z=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:E(t,i,e,s),plot:$(t,i,e),xAxis:L(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:L(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{o(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:n});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>S(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,a=e+h.height,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>S(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},O=class{static{o(this,"XYChartBuilder")}static build(t,i,e,s){return new z(t,i,e,s).getDrawableElement()}},W=0,F=U(),N=H(),X=G(),V=N.plotColorPalette.split(",").map(t=>t.trim()),j=!1,Y=!1;function H(){const t=p(),i=g();return x(t.xyChart,i.themeVariables.xyChart)}function U(){const t=g();return x(d.xyChart,t.xyChart)}function G(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Q(t){const i=g();return u(t.trim(),i)}function K(t){B=t}function q(t){F.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Z(t){X.xAxis.title=Q(t.text)}function J(t,i){X.xAxis={type:"linear",title:X.xAxis.title,min:t,max:i},j=!0}function tt(t){X.xAxis={type:"band",title:X.xAxis.title,categories:t.map(t=>Q(t.text))},j=!0}function it(t){X.yAxis.title=Q(t.text)}function et(t,i){X.yAxis={type:"linear",title:X.yAxis.title,min:t,max:i},Y=!0}function st(t){const i=Math.min(...t),e=Math.max(...t),s=k(X.yAxis)?X.yAxis.min:1/0,a=k(X.yAxis)?X.yAxis.max:-1/0;X.yAxis={type:"linear",title:X.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function at(t){let i=[];if(0===t.length)return i;if(!j){const i=k(X.xAxis)?X.xAxis.min:1/0,e=k(X.xAxis)?X.xAxis.max:-1/0;J(Math.min(i,1),Math.max(e,t.length))}if(Y||st(t),C(X.xAxis)&&(i=X.xAxis.categories.map((i,e)=>[i,t[e]])),k(X.xAxis)){const e=X.xAxis.min,s=X.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function nt(t){return V[0===t?0:t%V.length]}function ot(t,i){const e=at(i);X.plots.push({type:"line",strokeFill:nt(W),strokeWidth:2,data:e}),W++}function ht(t,i){const e=at(i);X.plots.push({type:"bar",fill:nt(W),data:e}),W++}function rt(){if(0===X.plots.length)throw Error("No Plot to render, please provide a plot with some data");return X.title=e(),O.build(F,X,N,B)}function lt(){return N}function ct(){return F}function gt(){return X}o(H,"getChartDefaultThemeConfig"),o(U,"getChartDefaultConfig"),o(G,"getChartDefaultData"),o(Q,"textSanitizer"),o(K,"setTmpSVGG"),o(q,"setOrientation"),o(Z,"setXAxisTitle"),o(J,"setXAxisRangeData"),o(tt,"setXAxisBand"),o(it,"setYAxisTitle"),o(et,"setYAxisRangeData"),o(st,"setYAxisRangeFromPlotData"),o(at,"transformDataWithoutCategory"),o(nt,"getPlotColorFromPalette"),o(ot,"setLineData"),o(ht,"setBarData"),o(rt,"getDrawableElem"),o(lt,"getChartThemeConfig"),o(ct,"getChartConfig"),o(gt,"getXYChartData");var ut={parser:w,db:{getDrawableElem:rt,clear:o(function(){c(),W=0,F=U(),X={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},N=H(),V=N.plotColorPalette.split(",").map(t=>t.trim()),j=!1,Y=!1},"clear"),setAccTitle:n,getAccTitle:a,setDiagramTitle:s,getDiagramTitle:e,getAccDescription:i,setAccDescription:t,setOrientation:q,setXAxisTitle:Z,setXAxisRangeData:J,setXAxisBand:tt,setYAxisTitle:it,setYAxisRangeData:et,setLineData:ot,setBarData:ht,setTmpSVGG:K,getChartThemeConfig:lt,getChartConfig:ct,getXYChartData:gt},renderer:{draw:o((t,i,e,s)=>{const a=s.db,n=a.getChartThemeConfig(),c=a.getChartConfig(),g=a.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(u,"getDominantBaseLine"),o(x,"getTextAnchor"),o(d,"getTextTransformation"),h.debug("Rendering xychart chart\n"+t);const p=r(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");l(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",n.backgroundColor),a.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));const y=a.getDrawableElem(),b={};function A(t){let i=f,e="";for(const[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],i=b[e],i||(i=b[e]=a.append("g").attr("class",t[s]))}return i}o(A,"getGroup");for(const t of y){if(0===t.data.length)continue;const i=A(t.groupTexts);switch(t.type){case"rect":if(i.selectAll("rect").data(t.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){const e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-h};o(s,"fitsHorizontally");const a=.7,h=10,r=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),l=r.map(t=>{const{data:i}=t;let e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}),c=Math.floor(Math.min(...l)),u=o(t=>e?t.data.x+t.data.width+h:t.data.x+t.data.width-h,"determineLabelXPosition");i.selectAll("text").data(r).enter().append("text").attr("x",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",n.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}else{let s=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};o(s,"fitsInBar");const a=10,h=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=h.map(t=>{const{data:i,label:e}=t;let n=i.width/(.7*e.length);for(;!s(t,n,a)&&n>0;)n-=1;return n}),l=Math.floor(Math.min(...r)),c=o(t=>e?t.data.y-a:t.data.y+a,"determineLabelYPosition");i.selectAll("text").data(h).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",c).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",n.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}}break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};export{ut as diagram};
|
/package/dist/module-types/src/components/molecules/{Timer → server/TimerDisplay}/TimerDisplay.d.ts
RENAMED
|
File without changes
|
|
File without changes
|