@juki-team/base-ui 1.4.121 → 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-tXHM9yHp.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-CD44fkam.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-D_uAIBKY.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-BUf36EaT.js → MdMathEditor-Bh-kGfC0.js} +1 -1
- package/dist/esm/{Popover-myjbsRtv.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/{ProblemStatus-C5CR0Z8d.js → SubmissionDateField-D3AvKusK.js} +1 -1
- package/dist/esm/TableOfContents-h0mxAylD.js +1 -0
- package/dist/esm/TextHeadCell-xNcsNvcB.js +1 -0
- package/dist/esm/{Tooltip-CHc2LM3e.js → Tooltip-B0QLaU02.js} +2 -2
- package/dist/esm/{UserCodeEditor-BwNoHEIy.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-COJYrArq.js → chunk-4BX2VUAB-B3YOaF9V.js} +1 -1
- package/dist/esm/{chunk-4TB4RGXK-BgOhjp4u.js → chunk-4TB4RGXK-DoSJMkEM.js} +1 -1
- package/dist/esm/{chunk-55IACEB6-BlGeNxvg.js → chunk-55IACEB6-B252J5rd.js} +1 -1
- package/dist/esm/{chunk-EDXVE4YY-CrsJ2Hnl.js → chunk-EDXVE4YY-BFbj9sbF.js} +1 -1
- package/dist/esm/{chunk-FMBD7UC4-PcmGZaXU.js → chunk-FMBD7UC4-yfeFLPr5.js} +1 -1
- package/dist/esm/{chunk-OYMX7WX6-Dd_OySsr.js → chunk-OYMX7WX6-Ck43KFw_.js} +1 -1
- package/dist/esm/{chunk-QZHKN3VN-D5wczz_U.js → chunk-QZHKN3VN-Bu8lDQIJ.js} +1 -1
- package/dist/esm/{chunk-YZCP3GAM-J0il8D93.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-Bh_6Hxf_.js → graph-Da_w8zjC.js} +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/{index-Bx0ktss6.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-BsYGzjO0.js → layout-DDbWXrIm.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/{mermaid-parser.core-DxB6tfwM.js → mermaid-parser.core-DanmL-Td.js} +1 -1
- package/dist/esm/{mermaid.core-DmkzFmrK.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/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-NAGOQCyQ.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-Nx7WdiK7.js → websocket-DCvEZ5Ma.js} +1 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-KvOi074l.js +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-CVIKnzmu.js +0 -1
- package/dist/esm/BarChart-C4j466sV.js +0 -1
- package/dist/esm/ChangePasswordModal-DAn7XeyD.js +0 -1
- package/dist/esm/CodeEditor-CFWIRByc.js +0 -1
- package/dist/esm/CodeViewer-C6XCe0GT.js +0 -1
- package/dist/esm/Collapse-DpriDerh.js +0 -1
- package/dist/esm/DataViewer-B1l0B0-d.js +0 -1
- package/dist/esm/DrawerView-hvnlPQq6.js +0 -1
- package/dist/esm/ExcalidrawButton-COXAKOpn.js +0 -1
- package/dist/esm/GraphvizViewer-BK4ypl3L.js +0 -1
- package/dist/esm/ImageLoaderCropper-DEt5ge51.js +0 -1
- package/dist/esm/InputCellPhoneNumber-CbFB6H2i.js +0 -1
- package/dist/esm/LineChart-B3nrTHaA.js +0 -1
- package/dist/esm/MdMath-Mf8WxhKy.js +0 -1
- package/dist/esm/ReplyIcon-DJFT1Tjl.js +0 -1
- package/dist/esm/SettingsIcon-CaFHSleq.js +0 -1
- package/dist/esm/SlideDeck-DvVHz3uy.js +0 -1
- package/dist/esm/TableOfContents-I1zUQZlM.js +0 -1
- package/dist/esm/TextHeadCell-CDT516Nd.js +0 -1
- package/dist/esm/VirtualizedRowsFixed-SmGRufd0.js +0 -1
- package/dist/esm/WorksheetAsSlides-BQVnbTDc.js +0 -1
- package/dist/esm/WorksheetBodies-kphWX0g5.js +0 -1
- package/dist/esm/WorksheetContents-CI8UrxIy.js +0 -1
- package/dist/esm/WorksheetEditor-CHC4ormG.js +0 -1
- package/dist/esm/WorksheetNode-C9ioDzE-.js +0 -1
- package/dist/esm/WorksheetViewer-Drg2e9_6.js +0 -1
- package/dist/esm/architecture-YZFGNWBL-DHLZLvJj.js +0 -1
- package/dist/esm/architectureDiagram-Q4EWVU46-DO8F0qz7.js +0 -1
- package/dist/esm/blockDiagram-DXYQGD6D-DNKe0cgR.js +0 -1
- package/dist/esm/c4Diagram-AHTNJAMY-DN5fuFmb.js +0 -1
- package/dist/esm/channel-4mHTJV-N.js +0 -1
- package/dist/esm/classDiagram-6PBFFD2Q-BudcHsyy.js +0 -1
- package/dist/esm/classDiagram-v2-HSJHXN6E-BudcHsyy.js +0 -1
- package/dist/esm/clone-Bdky4iBO.js +0 -1
- package/dist/esm/cose-bilkent-S5V4N54A-ZsIi3T0h.js +0 -1
- package/dist/esm/dagre-KV5264BT-Ps6KiA13.js +0 -1
- package/dist/esm/diagram-5BDNPKRD-CmcDSDfS.js +0 -1
- package/dist/esm/diagram-G4DWMVQ6-MRapKKyA.js +0 -1
- package/dist/esm/diagram-MMDJMWI5--Lf_QB5P.js +0 -1
- package/dist/esm/diagram-TYMM5635-CfbzkptG.js +0 -1
- package/dist/esm/erDiagram-SMLLAGMA-DmAtzyw1.js +0 -1
- package/dist/esm/flowDiagram-DWJPFMVM-Cd5g_eEq.js +0 -1
- package/dist/esm/ganttDiagram-T4ZO3ILL-O3kXJMuu.js +0 -1
- package/dist/esm/gitGraph-7Q5UKJZL-w9fSBFuS.js +0 -1
- package/dist/esm/gitGraphDiagram-UUTBAWPF-XLFtNk0y.js +0 -1
- package/dist/esm/index-DdRpaNiN.js +0 -1
- package/dist/esm/index-USryHMlL.js +0 -1
- package/dist/esm/index-tDMZSRa9.js +0 -2
- package/dist/esm/info-OMHHGYJF-6icJTSRL.js +0 -1
- package/dist/esm/infoDiagram-42DDH7IO-DiPK6iLZ.js +0 -1
- package/dist/esm/ishikawaDiagram-UXIWVN3A-DNCSSMvk.js +0 -1
- package/dist/esm/journeyDiagram-VCZTEJTY-BxyeAOhI.js +0 -1
- package/dist/esm/kanban-definition-6JOO6SKY-BR8Xd4RY.js +0 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-BUmIu9eO.js +0 -1
- package/dist/esm/packet-4T2RLAQJ-jB8585_W.js +0 -1
- package/dist/esm/pie-ZZUOXDRM-BKLoVTcY.js +0 -1
- package/dist/esm/pieDiagram-DEJITSTG-CJQonP9T.js +0 -1
- package/dist/esm/quadrantDiagram-34T5L4WZ-o3IEMDUC.js +0 -1
- package/dist/esm/radar-PYXPWWZC-BBal7TH8.js +0 -1
- package/dist/esm/requirementDiagram-MS252O5E-CSBSz0_J.js +0 -1
- package/dist/esm/sankeyDiagram-XADWPNL6-Dd0d-7E4.js +0 -1
- package/dist/esm/sequenceDiagram-FGHM5R23-DEPMVZxI.js +0 -1
- package/dist/esm/stateDiagram-FHFEXIEX-B_eljgWF.js +0 -1
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-D9FCD1lO.js +0 -1
- package/dist/esm/timeline-definition-GMOUNBTQ-Cg4NUF_H.js +0 -1
- package/dist/esm/treeView-SZITEDCU-S-ba_Q_y.js +0 -1
- package/dist/esm/treemap-W4RFUUIX-CnmNi6qL.js +0 -1
- package/dist/esm/vennDiagram-DHZGUBPP-B0vBQEXk.js +0 -1
- package/dist/esm/wardley-RL74JXVD-CQrog0ka.js +0 -1
- package/dist/esm/wardleyDiagram-NUSXRM2D-BxnrOeU9.js +0 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-B6KmAHYz.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,N as t,J as a}from"./settings-DgLs6IK_.js";import{isValidElement as o,Children as r,cloneElement as i}from"react";import{QueryParamKey as l,ContestTab as n,ProblemTab as s,ProfileTab as m}from"./enums.js";const c={POST:"POST",GET:"GET",PUT:"PUT",PATCH:"PATCH",DELETE:"DELETE"},d="javac 17.0.15",u="v20.19.2",p="Python 3.11.2",y="Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)\n[PyPy 7.3.11 with GCC 12.2.0]",g={mime:"text/x-csrc",mainFilename:"main.c",fileExtension:["c"],hasBuildFile:!0,executable:"gcc",executableVersion:"gcc (Debian 12.2.0-14+deb12u1) 12.2.0\nCopyright (C) 2022 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",templateSourceCode:'#include <stdio.h>\n \nint main(void) {\n \n printf("Hello World\\n");\n \n return 0;\n}',monacoKey:"c",codeMirrorKey:"c",highlightJsKey:"c"},h={mime:"text/x-c++src",mainFilename:"main.cpp",fileExtension:["cpp","c++","cxx","cc"],hasBuildFile:!0,executable:"g++",executableVersion:"g++ (Debian 12.2.0-14+deb12u1) 12.2.0\nCopyright (C) 2022 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",templateSourceCode:'#include <iostream>\n\nusing namespace std;\n\nint main() {\n \n cout << "Hello World" << endl;\n \n return 0;\n}',monacoKey:"cpp",codeMirrorKey:"cpp",highlightJsKey:"cpp"},f={mime:"text/x-python",mainFilename:"main.py",fileExtension:["py"],hasBuildFile:!1,templateSourceCode:'print("Hello World\\n")',monacoKey:"python",codeMirrorKey:"python",highlightJsKey:"python"},b={[e.C_11]:{value:e.C_11,label:"C 11",compilePattern:"/usr/bin/jk-c11 -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -fno-asm -lm -s -O2 -std=gnu11 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...g},[e.CPP_11]:{value:e.CPP_11,label:"C++ 11",compilePattern:"/usr/bin/jk-cpp11 -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=gnu++11 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP_20]:{value:e.CPP_20,label:"C++ 20",compilePattern:"/usr/bin/jk-cpp20 -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=gnu++20 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.JAVA_21]:{value:e.JAVA_21,label:"Java 21",mime:"text/x-java",mainFilename:"Main.java",fileExtension:["java"],compilePattern:"/usr/bin/jk-javac -cp '.;*' {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-java -Xmx512M -Xss64M -DONLINE_JUDGE=true -Duser.language=en -Duser.region=US -Duser.variant=US -cp {{folder_path}} {{class_name}}",templateSourceCode:'class Main {\n public static void main (String[] args) {\n \n System.out.println("Hello World");\n \n }\n}',hasBuildFile:!0,executable:"java",executableVersion:d,monacoKey:"java",codeMirrorKey:"java",highlightJsKey:"java"},[e.PYTHON_2]:{value:e.PYTHON_2,label:"Python 2 *",compilePattern:"/usr/bin/jk-python2 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-python2 {{folder_path}}/{{source_full_file_name}}",executable:"python2",executableVersion:y,...f},[e.PYTHON_3]:{value:e.PYTHON_3,label:"Python 3",compilePattern:"/usr/bin/jk-python3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-python3 {{folder_path}}/{{source_full_file_name}}",executable:"python3",executableVersion:y,...f},[e.PYTHON_PYPY_2]:{value:e.PYTHON_PYPY_2,label:"PyPy 2 *",compilePattern:"/usr/bin/jk-pypy2 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-pypy2 {{folder_path}}/{{source_full_file_name}}",executable:"pypy2",executableVersion:y,...f},[e.PYTHON_PYPY_3]:{value:e.PYTHON_PYPY_3,label:"PyPy 3",compilePattern:"/usr/bin/jk-pypy3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-pypy3 {{folder_path}}/{{source_full_file_name}}",executable:"pypy3",executableVersion:y,...f},[e.JAVASCRIPT_NODE_JS_22]:{value:e.JAVASCRIPT_NODE_JS_22,label:"Javascript Node.js 22",mime:"application/x-javascript",mainFilename:"main.js",fileExtension:["js"],compilePattern:"",runPattern:"/usr/bin/jk-node22 {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"javascript",codeMirrorKey:"javascript",highlightJsKey:"javascript"},[e.ICPC_C]:{value:e.ICPC_C,label:"ICPC C *",compilePattern:"gcc -x c -g -O2 -std=gnu11 -static -lm -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...g},[e.C]:{value:e.C,label:"C *",compilePattern:"gcc -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -fno-asm -lm -s -O2 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...g},[e.ICPC_CPP]:{value:e.ICPC_CPP,label:"ICPC C++ *",compilePattern:"g++ -x c++ -static -g -O2 -std=gnu++20 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP]:{value:e.CPP,label:"C++ *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP11]:{value:e.CPP11,label:"C++ 11 *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=c++11 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP14]:{value:e.CPP14,label:"C++ 14 *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=c++14 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP17]:{value:e.CPP17,label:"C++ 17 *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=c++17 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.JAVA]:{value:e.JAVA,label:"Java *",mime:"text/x-java",mainFilename:"Main.java",fileExtension:["java"],compilePattern:"javac -cp '.;*' {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/lib/jvm/java-17-openjdk-amd64/bin/java -Xmx512M -Xss64M -DONLINE_JUDGE=true -Duser.language=en -Duser.region=US -Duser.variant=US -cp {{folder_path}} {{class_name}}",templateSourceCode:'class Main {\n public static void main (String[] args) {\n \n System.out.println("Hello World");\n \n }\n}',hasBuildFile:!0,executable:"javac",executableVersion:d,monacoKey:"java",codeMirrorKey:"java",highlightJsKey:"java"},[e.ICPC_PYTHON]:{value:e.ICPC_PYTHON,label:"ICPC Python *",compilePattern:"pypy3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/pypy3 {{folder_path}}/{{source_full_file_name}}",executable:"pypy3",executableVersion:y,...f},[e.PYTHON]:{value:e.PYTHON,label:"Python *",compilePattern:"python3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/python3 {{folder_path}}/{{source_full_file_name}}",executable:"python3",executableVersion:p,...f},[e.PYTHON2]:{value:e.PYTHON2,label:"Python 2 *",compilePattern:"python2 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/python2 {{folder_path}}/{{source_full_file_name}}",executable:"python",executableVersion:"Python 2.7.18",...f},[e.PYTHON3]:{value:e.PYTHON3,label:"Python 3 *",compilePattern:"python3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/python3 {{folder_path}}/{{source_full_file_name}}",executable:"python3",executableVersion:p,...f},[e.JAVASCRIPT]:{value:e.JAVASCRIPT,label:"Javascript *",mime:"application/x-javascript",mainFilename:"main.js",fileExtension:["js"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"javascript",codeMirrorKey:"javascript",highlightJsKey:"javascript"},[e.TYPESCRIPT]:{value:e.TYPESCRIPT,label:"Typescript *",mime:"application/x-typescript",mainFilename:"main.ts",fileExtension:["ts"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"typescript",codeMirrorKey:"typescript",highlightJsKey:"typescript"},[e.TSX]:{value:e.TSX,label:"TSX *",mime:"application/x-typescript",mainFilename:"main.tsx",fileExtension:["tsx"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"typescript",codeMirrorKey:"typescript",highlightJsKey:"typescript"},[e.JSX]:{value:e.JSX,label:"JSX *",mime:"application/x-javascript",mainFilename:"main.jsx",fileExtension:["jsx"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"javascript",codeMirrorKey:"javascript",highlightJsKey:"javascript"},[e.PSEUDOCODE_PSEINT]:{value:e.PSEUDOCODE_PSEINT,label:"Pseudo-código (PSeInt)",mime:"text/plain",mainFilename:"main.psc",fileExtension:["psc"],compilePattern:"jk-pseint {{folder_path}}/{{source_full_file_name}} --norun --nouser && jk-pseint {{folder_path}}/{{source_full_file_name}} --draw {{folder_path}}/{{source_full_file_name}}.psd && jk-psexport {{folder_path}}/{{source_full_file_name}}.psd {{folder_path}}/{{source_full_file_name}}.cpp --lang=cpp && g++ -x c++ -g -O2 -std=gnu++20 -static -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}.cpp",runPattern:"{{folder_path}}/{{compiled_file_name}}",templateSourceCode:'Algoritmo HOLA_MUNDO\n\tImprimir "Hello World"\nFinAlgoritmo\n',hasBuildFile:!1,executable:"",executableVersion:"PSeInt 20230904-l64-wx3\nhttp://pseint.sourceforge.net\nby Pablo Novara (zaskar_84@yahoo.com.ar)\npsExport 20230904-l64-wx3\nhttp://pseint.sourceforge.net\nby Pablo Novara (zaskar_84@yahoo.com.ar)",monacoKey:"text",codeMirrorKey:"pseudocode-pseint",highlightJsKey:"plaintext"},[e.DOT]:{value:e.DOT,label:"DOT",mime:"text/vnd.graphviz",mainFilename:"diagram.dot",fileExtension:["dot"],compilePattern:"",runPattern:"",templateSourceCode:"digraph G {\n A -> B;\n B -> C;\n}",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"dot",codeMirrorKey:"dot",highlightJsKey:"plaintext"},[e.MERMAID]:{value:e.MERMAID,label:"Mermaid",mime:"text/mermaid",mainFilename:"diagram.mmd",fileExtension:["mmd","mermaid"],compilePattern:"",runPattern:"",templateSourceCode:"graph TD\n A[Start] --\x3e B{Is it working?}\n B -- Yes --\x3e C[Great!]\n B -- No --\x3e D[Fix it]\n D --\x3e B\n",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"mermaid",codeMirrorKey:"mermaid",highlightJsKey:"plaintext"},[e.JSON]:{value:e.JSON,label:"JSON",mime:"application/json",mainFilename:"main.json",fileExtension:["json"],compilePattern:"",runPattern:"",templateSourceCode:"{\n \n}",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"json",codeMirrorKey:"javascript",highlightJsKey:"json"},[e.TEXT]:{value:e.TEXT,label:"plain text",mime:"text/plain",mainFilename:"main.txt",fileExtension:["txt","text","in","out"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"text",codeMirrorKey:"text",highlightJsKey:"plaintext"},[e.DIFF]:{value:e.DIFF,label:"diff",mime:"text/plain",mainFilename:"main.patch",fileExtension:["diff","patch"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"diff",codeMirrorKey:"diff",highlightJsKey:"diff"},[e.LATEX]:{value:e.LATEX,label:"LaTeX",mime:"application/x-latex",mainFilename:"main.tex",fileExtension:["tex"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"latex",codeMirrorKey:"stex",highlightJsKey:"latex"},[e.MARKDOWN]:{value:e.MARKDOWN,label:"Markdown",mime:"text/plain",mainFilename:"main.md",fileExtension:["md"],compilePattern:"",runPattern:"",templateSourceCode:"# Hello World\n",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"markdown",codeMirrorKey:"markdown",highlightJsKey:"markdown"},[e.MDX]:{value:e.MDX,label:"MDX",mime:"text/plain",mainFilename:"main.mdx",fileExtension:["mdx"],compilePattern:"",runPattern:"",templateSourceCode:"# Hello World\n",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"markdown",codeMirrorKey:"markdown",highlightJsKey:"markdown"},[e.ARDUINO]:{value:e.ARDUINO,label:"Arduino",mime:"text/plain",mainFilename:"main.c",fileExtension:["c","cpp","pde","h","ino"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"c",codeMirrorKey:"c",highlightJsKey:"c"},[e.HTML]:{value:e.HTML,label:"HTML",mime:"text/HTML",mainFilename:"index.html",fileExtension:["html"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"html",codeMirrorKey:"html",highlightJsKey:"xml"},[e.BASH]:{value:e.BASH,label:"Bash",mime:"text/plain",mainFilename:"main.sh",fileExtension:["sh","bash"],compilePattern:"",runPattern:"",templateSourceCode:'#!/bin/bash\necho "Hello World"\n',hasBuildFile:!1,executable:"bash",executableVersion:"",monacoKey:"shell",codeMirrorKey:"shell",highlightJsKey:"bash"}},_={vivos:[{color:"#FF0000",title:"Rojo"},{color:"#FF5900",title:"Rojo - Naranja"},{color:"#FF8600",title:"Naranja"},{color:"#FFBF00",title:"Ámbar"},{color:"#FFFF00",title:"Amarillo"},{color:"#A6FF00",title:"Lima o Verde limon"},{color:"#00FF8C",title:"Verde puro"},{color:"#00FF8C",title:"Verde cian"},{color:"#00FFFF",title:"Cian"},{color:"#0099FF",title:"Cerúleo o Azur"},{color:"#0000FF",title:"Azul"},{color:"#9F00FF",title:"Violeta"},{color:"#FF00FF",title:"Magenta"},{color:"#FF0099",title:"Fucsia"}],oscuros:[{color:"#880000",title:"Granate"},{color:"#882F00",title:"Caoba o Rojo indio"},{color:"#884700",title:"Marrón o Pardo"},{color:"#886600",title:"Marrón dorado"},{color:"#888800",title:"Oliva"},{color:"#588800",title:"Verde palta"},{color:"#008800",title:"Verde estándar"},{color:"#008858",title:"Esmeralda"},{color:"#008888",title:"Cerceta o Azul verde"},{color:"#005288",title:"Añil"},{color:"#000080",title:"Azul marino"},{color:"#880088",title:"Azul púrpura"},{color:"#880088",title:"Púrpura o Morado"},{color:"#880047",title:"Vino"}],agrisados:[{color:"#BF4040",title:"Lacre"},{color:"#BF6340",title:"Cobre"},{color:"#BF8340",title:"Cnalea o Ocre"},{color:"#BF9F40",title:"Dorado"},{color:"#BFBF40",title:"Chartreuse"},{color:"#93BF40",title:"Verde manzana"},{color:"#93BF40",title:"Verde bosque"},{color:"#40BF40",title:"Verde mar"},{color:"#40BFBF",title:"Turquesa"},{color:"#408CBF",title:"Azul acero"},{color:"#4040BF",title:"Zafiro"},{color:"#9340BF",title:"Amastista"},{color:"#B140BF",title:"Púrpureo"},{color:"#B140BF",title:"Fandango"}],claros:[{color:"#FF7777",title:"Coral"},{color:"#FF9977",title:"Salmón"},{color:"#FFB977",title:"Melón o Durazno"},{color:"#FFDA80",title:"Crema"},{color:"#FFFF88",title:"Maíz"},{color:"#CFFF77",title:"Té verde"},{color:"#77FF77",title:"Verde claro"},{color:"#77FFAA",title:"Menta"},{color:"#80FFFF",title:"Aguamarina"},{color:"#73C7FF",title:"Celeste"},{color:"#8082FF",title:"Bígaro o aciano"},{color:"#C977FF",title:"Lavanda o lila"},{color:"#FF77FF",title:"Malva"},{color:"#FF77C1",title:"Rosado"}]},P="",S="x-juki-forwarded-host",T="x-juki-visitor-session-id",O="x-juki-metadata",x=(...e)=>{console.warn((new Date).toLocaleString(),...e)},$=(...e)=>{console.info((new Date).toLocaleString(),...e)},k=(...e)=>{console.error((new Date).toLocaleString(),...e)},E=e=>{const t=new ArrayBuffer(e.length),a=new Uint8Array(t);for(let t=0;t<e.length;t++)a[t]=255&e.charCodeAt(t);return t},F=e=>e.join(""),K=e=>e.split(""),v=(e,t)=>`${e}|${t}`,w=(e,t)=>`${e}|${t}`,C=e=>{const[t,a]=e.split("|");return{sessionId:t,uiId:a}};let N=null;const J=async()=>(N||($("loading XLSX..."),N=await import("./xlsx-XBWnafwQ.js")),N),j=e=>{if(!e)return"";if("string"==typeof e||"number"==typeof e)return`${e}`;if(Array.isArray(e))return e.map(j).join("");if(o(e)&&e.props.children){const t=e.props.children;return Array.isArray(t)?t.map(j).join(""):j(t)}return""};function z(){return"undefined"!=typeof window}const U=(e,t)=>{if("undefined"!=typeof document&&z()){const a=document.createElement("a");a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",t),a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>{z()&&window.URL.revokeObjectURL(e)},100)}};function D(e,t="file"){if(z()){const a=new Blob([e],{type:e.type||"application/octet-stream"}),o=window.URL.createObjectURL(a);U(o,t)}}async function G(e,t){if("undefined"!=typeof document){const a=await fetch(e);if(!a.ok)throw new Error(`HTTP error! Status: ${a.status}`);const o=await a.blob(),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,i.dispatchEvent(new MouseEvent("click")),URL.revokeObjectURL(r)}}const A=(e,t="file.csv")=>{D(new Blob([e.map(e=>e.join(",")).join("\n")],{type:"text/csv"}),t)},I=async(e,t="file.xlsx")=>{const{utils:a}=await J(),o=a.book_new();o.Props={Title:t,Subject:t,Author:"Juki",CreatedDate:new Date};for(const{name:t,autofilter:r,cols:i,rows:l,styles:n}of e){const e={s:{c:1e7,r:1e7},e:{c:0,r:0}};o.SheetNames.push(t);const s={};o.Sheets[t]=s;const m=[];s["!rows"]=m;for(const[t,o]of Object.entries(l)){const r=+t;o.height&&(m[r]={hpx:o.height});for(const[t,i]of Object.entries(o.cells)){const o=+t;e.s.r>r&&(e.s.r=r),e.s.c>o&&(e.s.c=o),e.e.r<r&&(e.e.r=r),e.e.c<o&&(e.e.c=o);const l={v:i.text,t:"s"};if(null==l.v)continue;const m=a.encode_cell({c:o,r:r});"number"==typeof l.v?l.t="n":"boolean"==typeof l.v?l.t="b":(l.v,Date),l.s={},"string"==typeof l.v&&l.v.includes("\n")&&(l.s.alignment={wrapText:!0});const c="number"==typeof i.style?n?.[i.style]:void 0;if(c){const{bgcolor:e,color:t,font:a,align:o,valign:r}=c;"string"==typeof e&&(l.s.fill={fgColor:{rgb:e.replace("#","")}}),"string"==typeof t&&(l.s.font||(l.s.font={}),l.s.font.color={rgb:t.replace("#","")}),a?.bold&&(l.s.font||(l.s.font={}),l.s.font.bold=!0),"string"==typeof o&&(l.s.alignment||(l.s.alignment={}),l.s.alignment.horizontal=o),"string"==typeof r&&(l.s.alignment||(l.s.alignment={}),l.s.alignment.vertical=r)}s[m]=l}}e.s.c<1e7&&(s["!ref"]=a.encode_range(e)),r?.ref&&(s["!autofilter"]={ref:r?.ref});const c=s["!cols"]??[];s["!cols"]=c;for(const[e,t]of Object.entries(i||{})){const a=+e,o=c[a]??{};c[a]=o,t.width&&(o.wpx=t.width)}}return o},M=async(e,t="file.xlsx")=>{const a=await I(e,t),{write:o}=await J(),r=o(a,{bookType:"xlsx",type:"binary"});D(new Blob([E(r)],{type:"application/octet-stream"}),t)},L=(e,t)=>"function"==typeof e?e(t):r.map(e,e=>e&&o(e)?i(e,t):e),B=(e,t,a,o,r,i,l,n,s,m,c,d,u,p,y)=>{let g="";for(const h of[e,t,a,o,r,i,l,n,s,m,c,d,u,p,y])if(h)if("string"==typeof h)g+=(g?" ":"")+h;else for(const e in h)h[e]&&(g+=(g?" ":"")+e);return g},V=(e,t)=>e===t||Array.isArray(e)&&e.includes(t);function H(e){return new Promise(t=>{e.toBlob(t)})}const R=e=>(e.current?.scrollWidth??0)>(e.current?.clientWidth??0);function Y(){return"production"!==t}const W=e=>{if(z()){const t=window.open(e,"_blank","noopener,noreferrer");t&&(t.opener=null)}},X=e=>e.trim().replace(/\/+/g,"/").replace(/^\/+/,"").replace(/\/+$/,""),q=e=>e.includes("?")?e:`${e}?`,Q=e=>"?"!==e[e.length-1]?`${e}&`:e,Z=(e,t,a)=>`${Q(q(e))}page=${t}&pageSize=${a}`,ee=(e,t)=>t?Q(q(e))+t:e,te=(e,t)=>t?Q(q(e))+t:e,ae=(e,t)=>t?`${Q(q(e))}organizationKey=${t}`:e;const oe=(e,t)=>`${e||""}${t}`,re=e=>new URLSearchParams(e.toString()),ie=e=>{const t=re(e);let a=new URLSearchParams;z()&&(a=new URLSearchParams(window.location.search));const o=a.get(l.TOKEN);o&&t.set(l.TOKEN,o);const r=a.get(l.COMPANY);r&&t.set(l.COMPANY,r);const i=a.get(l.SUBMISSION);i&&t.set(l.SUBMISSION,i);const n=a.get(l.SIGN_IN);n&&t.set(l.SIGN_IN,n);const s=a.get(l.SIGN_UP);return s&&t.set(l.SIGN_UP,s),t.toString()},le=e=>{const t=new URL(`https://juki.app${e}`),a=ie(t.searchParams);return a?`${t.pathname}?${a}`:t.pathname};const ne=new class{get apiV2(){const e=(e,t)=>`${a}/${e}${t}`,t=e=>a?e:()=>({url:"",method:c.GET});return{auth:{ping:t(()=>({url:e("auth","/ping"),method:c.GET})),signIn:t(({params:{organizationKey:t}={},body:a})=>({url:ae(e("auth","/sign-in"),t),method:c.POST,body:JSON.stringify(a)})),signUp:t(({body:t})=>({url:e("auth","/sign-up"),method:c.POST,body:JSON.stringify(t)})),createUser:t(({params:{organizationKey:t}={},body:a})=>({url:ae(e("auth","/sign-up"),t),method:c.POST,body:JSON.stringify({...a,isGenerated:!0})})),signOut:t(()=>({url:e("auth","/sign-out"),method:c.POST})),initiateResetPassword:t(({body:t})=>({url:e("auth","/initiate-reset-password"),method:c.POST,body:JSON.stringify(t)})),updatePassword:t(({params:{organizationKey:t,nickname:a},body:o})=>({url:e("auth",`/user-key/${v(a,t)}/update-password`),method:c.POST,body:JSON.stringify(o)})),resetPassword:t(({params:{organizationKey:t,nickname:a}})=>({url:e("auth",`/user-key/${v(a,t)}/reset-password`),method:c.POST})),createSession:t(({params:{organizationKey:t}={},body:a})=>({url:ae(e("auth","/create-session"),t),method:c.POST,body:JSON.stringify(a)}))},log:{error:t(({body:t})=>({url:e("log","/error"),method:c.POST,body:JSON.stringify(t)})),info:t(({body:t})=>({url:e("log","/info"),method:c.POST,body:JSON.stringify(t)}))},user:{getSummaryList:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("user","/summary-list"),t),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("user","/system-list"),t,a),o),r),method:c.GET})),getSummary:t(({params:{nickname:t,organizationKey:a}})=>({url:e("user",`/user-key/${v(t,a)}/summary`),method:c.GET})),getProfile:t(({params:{nickname:t,organizationKey:a}})=>({url:e("user",`/user-key/${v(t,a)}/profile`),method:c.GET})),getLogs:t(({params:{nickname:t,organizationKey:a}})=>({url:e("user",`/user-key/${v(t,a)}/logs`),method:c.GET})),getMySessions:t(()=>({url:e("user","/my-sessions"),method:c.GET})),getAllOnlineUsers:t(({params:{filterUrl:t,sortUrl:a}})=>({url:ee(te(e("user","/all-online-users"),t),a),method:c.GET})),getOnlineUsers:t(({params:{filterUrl:t,sortUrl:a}})=>({url:ee(te(e("user","/online-users"),t),a),method:c.GET})),deleteOldSessions:t(()=>({url:e("user","/delete-old-sessions"),method:c.POST})),updateProfileData:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/profile-data`),method:c.PUT,body:JSON.stringify(o)})),updateProfileImage:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/profile-image`),method:c.PUT,body:JSON.stringify(o)})),updatePreferences:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/preferences`),method:c.PUT,body:JSON.stringify(o)})),updateRoles:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/roles`),method:c.PUT,body:JSON.stringify(o)})),deleteSession:t(({params:{sessionId:t}})=>({url:e("user",`/session/${t}`),method:c.DELETE})),checkData:t(({params:{organizationKey:t},body:a})=>({url:ae(e("user","/check-data"),t),method:c.POST,body:JSON.stringify(a)})),clientTrack:t(({body:t})=>({url:e("user","/client-track"),method:c.POST,body:JSON.stringify(t)}))},problem:{create:t(()=>({url:e("problem",""),method:c.POST})),update:t(({params:{key:t}})=>({url:e("problem",`/${t}`),method:c.PUT})),delete:t(({params:{key:t}})=>({url:e("problem",`/${t}`),method:c.DELETE})),getMetadata:t(({params:{key:t}})=>({url:e("problem",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("problem",`/${t}/data`),method:c.GET})),getBasicSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("problem","/basic-summary-list"),t,a),o),r),method:c.GET})),getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("problem","/summary-list"),t,a),o),r),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("problem","/system-list"),t,a),o),r),method:c.GET})),getSummary:t(({params:{key:t}})=>({url:e("problem",`/${t}/summary`),method:c.GET})),getLogs:t(({params:{key:t}})=>({url:e("problem",`/${t}/logs`),method:c.GET})),getTestCases:t(({params:{key:t}})=>({url:e("problem",`/${t}/test-cases`),method:c.GET})),submit:t(({params:{key:t},body:a})=>({url:e("problem",`/${t}/submit`),method:c.POST,body:JSON.stringify(a)})),crawl:t(({body:t})=>({url:e("problem","/crawl"),method:c.POST,body:JSON.stringify(t)}))},contest:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("contest","/summary-list"),t,a),o),r),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("contest","/system-list"),t,a),o),r),method:c.GET})),getMetadata:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/metadata`),a),method:c.GET})),getData:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data`),a),method:c.GET})),getDataEvents:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data/events`),a),method:c.GET})),getDataMembers:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data/members`),a),method:c.GET})),getDataClarifications:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data/clarifications`),a),method:c.GET})),getScoreboard:t(({params:{key:t,unfrozen:a,organizationKey:o,official:r}})=>({url:ae(e("contest",`/${t}/data/scoreboard${a?"?state=unfrozen":""}${r?(a?"&":"?")+"official=true":""}`),o),method:c.GET})),getLogs:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/logs`),a),method:c.GET})),submit:t(({params:{key:t,problemKey:a,organizationKey:o},body:r})=>({url:ae(e("contest",`/${t}/problem/${a}/submit`),o),method:c.POST,body:JSON.stringify(r)})),recalculateScoreboard:t(({params:{key:t,organizationKey:a,official:o}})=>({url:ae(e("contest",`/${t}/recalculate-scoreboard${o?"?official=true":""}`),a),method:c.POST})),recalculatePrerequisites:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/recalculate-prerequisites`),a),method:c.POST})),problem:{rejudge:t(({params:{key:t,problemKey:a,organizationKey:o}})=>({url:ae(e("contest",`/${t}/problem/${a}/rejudge`),o),method:c.POST})),retrieve:t(({params:{key:t,problemKey:a,organizationKey:o}})=>({url:ae(e("contest",`/${t}/problem/${a}/retrieve`),o),method:c.POST}))},retrieve:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/retrieve`),a),method:c.POST})),editGlobal:t(({params:{key:t,organizationKey:a},body:o})=>({url:ae(e("contest",`/${t}/global`),a),method:c.PUT,body:JSON.stringify(o)})),createGlobal:t(({params:{organizationKey:t},body:a})=>({url:ae(e("contest","/global"),t),method:c.POST,body:JSON.stringify(a)})),unlinkSubmissions:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/unlink-submissions`),a),method:c.POST}))},submission:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("submission","/summary-list"),t,a),o),r),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("submission","/system-list"),t,a),o),r),method:c.GET})),getExportSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r,withSourceCodes:i}})=>({url:ee(te(Z(e("submission","/summary-list-export"+(i?"?withSourceCodes=true":"")),t,a),o),r),method:c.GET})),getData:t(({params:{id:t}})=>({url:e("submission",`/${t}/data`),method:c.GET})),getLogs:t(({params:{id:t}})=>({url:e("submission",`/${t}/logs`),method:c.GET})),rejudge:t(({params:{id:t}})=>({url:e("submission",`/${t}/rejudge`),method:c.POST})),retrieve:t(({params:{id:t}})=>({url:e("submission",`/${t}/retrieve`),method:c.POST})),judge:t(({params:{id:t},body:a})=>({url:e("submission",`/${t}/judge`),method:c.POST,body:JSON.stringify(a)})),archive:t(({params:{id:t}})=>({url:e("submission",`/${t}/archive`),method:c.POST})),release:t(({params:{id:t}})=>({url:e("submission",`/${t}/release`),method:c.POST}))},image:{getPublicList:t(()=>({url:e("image","/public-list"),method:c.GET})),publish:t(({body:t})=>({url:e("image","/publish"),method:c.POST,body:JSON.stringify(t)}))},file:{publish:t(({body:t})=>({url:e("file","/publish"),method:c.POST,body:JSON.stringify(t)}))},note:{publish:t(({body:t})=>({url:e("note","/publish"),method:c.POST,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})),getPdf:t(({params:{sourceUrl:t}})=>({url:e("note",`/pdf?sourceUrl=${t}`),method:c.GET})),createPdf:t(({body:t})=>({url:e("note","/pdf"),method:c.POST,body:JSON.stringify(t)}))},code:{run:t(({body:t})=>({url:e("code","/run"),method:c.POST,body:JSON.stringify(t)}))},ia:{chatCompletions:t(({body:t})=>({url:e("ia","/chat/completions"),method:c.POST,body:JSON.stringify(t)}))},organization:{get:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization",""),t),method:c.GET})),getPermissionList:t(()=>({url:e("organization","/permission-list"),method:c.GET})),getJudgeList:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/judge-list"),t),method:c.GET})),getTrustedCompaniesList:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/trusted-companies-list"),t),method:c.GET})),getResourceSpecifications:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/resource-specifications"),t),method:c.GET})),getEmailData:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/email-data"),t),method:c.GET})),updateImage:t(({params:{organizationKey:t}={organizationKey:""},body:a})=>({url:ae(e("organization","/image"),t),method:c.PUT,body:JSON.stringify(a)})),updateData:t(({params:{organizationKey:t}={organizationKey:""},body:a})=>({url:ae(e("organization",""),t),method:c.PATCH,body:JSON.stringify(a)})),updateSensitiveData:t(({params:{organizationKey:t}={organizationKey:""},body:a})=>({url:ae(e("organization","/sensitive-data"),t),method:c.PATCH,body:JSON.stringify(a)}))},locale:{get:t(({params:{locale:t,namespace:a}})=>({url:e("locale",`/${t}/${a}`),method:c.GET}))},judge:{getData:t(({params:{key:t}})=>({url:e("judge",`/${t}/data`),method:c.GET})),getSummaryList:t(({params:{filterUrl:t,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:ee(te(e("judge","/summary-list"),t),a),method:c.GET})),getSystemList:t(({params:{filterUrl:t,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:ee(te(e("judge","/system-list"),t),a),method:c.GET})),crawlLanguages:t(({params:{key:t}})=>({url:e("judge",`/${t}/crawl-languages`),method:c.POST})),patch:t(({params:{key:t},body:{languages:a,name:o,problemTags:r,isExternal:i,isSubmitSupported:l,url:n,logo:s,logoSize:m}})=>{const d={};return a&&(d.languages=a),"string"==typeof o&&(d.name=o),r&&(d.problemTags=r),"boolean"==typeof i&&(d.isExternal=i),"boolean"==typeof l&&(d.isSubmitSupported=l),"string"==typeof n&&(d.url=n),"string"==typeof s&&(d.logo=s),m&&(d.logoSize=m),{url:e("judge",`/${t}`),method:c.PATCH,body:JSON.stringify(d)}})},worksheet:{getData:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("worksheet",`/${t}/data`),a),method:c.GET})),update:t(({params:{key:t},body:a})=>({url:e("worksheet",`/${t}`),method:c.PUT,body:JSON.stringify(a)})),getList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("worksheet","/list"),t,a),o),r),method:c.GET})),getSubmissionsUser:t(({params:{key:t,userKey:a,secondaryKey:o}})=>({url:e("worksheet",`/${t}/submissions/user/${a}${o?`?secondaryKey=${o}`:""}`),method:c.GET})),submitJkMd:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/jk-md${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)})),submitCodeEditor:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/code-editor${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)})),submitQuizProblem:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/quiz-problem${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)})),submitQuizOptions:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/quiz-options${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)}))},system:{services:{checkAndStart:t(()=>({url:e("sys","/services/check-and-start"),method:c.POST})),check:t(()=>({url:e("sys","/services/check"),method:c.POST})),clean:t(()=>({url:e("sys","/services/clean"),method:c.POST}))}},comment:{get:t(({params:{key:t}})=>({url:e("comment",`/${t}`),method:c.GET})),post:t(({params:{key:t},body:a})=>({url:e("comment",`/${t}`),method:c.POST,body:JSON.stringify(a)})),reply:t(({params:{key:t,id:a},body:o})=>({url:e("comment",`/${t}/${a}/reply`),method:c.POST,body:JSON.stringify(o)})),react:t(({params:{key:t,id:a},body:o})=>({url:e("comment",`/${t}/${a}/react`),method:c.POST,body:JSON.stringify(o)})),hide:t(({params:{key:t,id:a}})=>({url:e("comment",`/${t}/${a}/hide`),method:c.POST})),unhide:t(({params:{key:t,id:a}})=>({url:e("comment",`/${t}/${a}/unhide`),method:c.POST}))},class:{viewAssignmentMyWorksheetSubmitCodeEditor:t(({params:{classKey:t,cycleId:a,sessionId:o,assignmentId:r},body:i})=>({url:e("class",`/${t}/cycle/${a}/session/${o}/assignment/${r}/worksheet/submit-code-editor`),method:c.POST,body:JSON.stringify(i)}))},documentTemplate:{create:t(({body:t})=>({url:e("document-template",""),method:c.POST,body:JSON.stringify(t)})),getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("document-template","/summary-list"),t,a),o),r),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("document-template",`/${t}/data`),method:c.GET})),updateData:t(({params:{key:t,organizationKey:a},body:o})=>({url:ae(e("document-template",`/${t}`),a),method:c.PUT,body:JSON.stringify(o)}))},statistics:{getorganizationStats:t(({params:{organizationKey:t,startTimestamp:a,endTimestamp:o,groupBy:r}})=>({url:ae(e("statistics",`/organization?startTimestamp=${a}&endTimestamp=${o}&groupBy=${r.join(",")}`),t),method:c.GET})),getProblemStats:t(({params:{organizationKey:t,problemKey:a,startTimestamp:o,endTimestamp:r}})=>({url:ae(e("statistics",`/problem/${a}?startTimestamp=${o}&endTimestamp=${r}`),t),method:c.GET})),getUsersTracksStats:t(({params:{organizationKeys:t,startTimestamp:a,endTimestamp:o,groupBy:r}})=>({url:e("statistics",`/users-tracks?startTimestamp=${a}&endTimestamp=${o}&groupBy=${r.join(",")}${t?`&organizationKeys=${t}`:""}`),method:c.GET}))},excalidraw:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("excalidraw","/summary-list"),t,a),o),r),method:c.GET})),create:t(({body:t})=>({url:e("excalidraw",""),method:c.POST,body:JSON.stringify(t)})),updateData:t(({params:{key:t},body:a})=>({url:e("excalidraw",`/${t}/data`),method:c.PUT,body:JSON.stringify(a)})),getMetadata:t(({params:{key:t}})=>({url:e("excalidraw",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("excalidraw",`/${t}/data`),method:c.GET}))},mermaid:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("mermaid","/summary-list"),t,a),o),r),method:c.GET})),create:t(({body:t})=>({url:e("mermaid",""),method:c.POST,body:JSON.stringify(t)})),updateData:t(({params:{key:t},body:a})=>({url:e("mermaid",`/${t}/data`),method:c.PUT,body:JSON.stringify(a)})),getMetadata:t(({params:{key:t}})=>({url:e("mermaid",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("mermaid",`/${t}/data`),method:c.GET}))},markdown:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("markdown","/summary-list"),t,a),o),r),method:c.GET})),create:t(({body:t})=>({url:e("markdown",""),method:c.POST,body:JSON.stringify(t)})),updateData:t(({params:{key:t},body:a})=>({url:e("markdown",`/${t}/data`),method:c.PUT,body:JSON.stringify(a)})),getMetadata:t(({params:{key:t}})=>({url:e("markdown",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("markdown",`/${t}/data`),method:c.GET}))},export:{websiteToPdf:t(({params:{url:t,headerTemplate:a,footerTemplate:o,margin:r,format:i}})=>({url:e("export","/website-to-pdf"),method:c.POST,body:JSON.stringify({url:t,headerTemplate:a,footerTemplate:o,margin:r,format:i})})),problem:{statementToPdf:t(({params:{key:t,language:a}})=>({url:e("export","/problem/statement-to-pdf"),method:c.POST,body:JSON.stringify({key:t,language:a})})),statementToPng:t(({params:{key:t,token:a,language:o}})=>({url:e("export","/problem/statement-to-png"),method:c.POST,body:JSON.stringify({key:t,token:a,language:o})}))},contest:{problems:{statementsToPdf:t(({params:{key:t,language:a}})=>({url:e("export","/contest/problems/statements-to-pdf"),method:c.POST,body:JSON.stringify({key:t,language:a})}))}}},webScraping:{codeforces:{problemStatement:t(({params:{contestId:t,index:a}})=>({url:e("web-scraping","/codeforces/problem-statement"),method:c.POST,body:JSON.stringify({contestId:t,index:a})}))},patito:{problemStatement:t(({params:{id:t}})=>({url:e("web-scraping","/patito/problem-statement"),method:c.POST,body:JSON.stringify({id:t})}))}},websocket:{auth:t(()=>({url:e("websocket","/auth"),method:c.POST}))}}}},se=new class{JUDGE(e){const t=e??"";return{home:()=>le("/"),profiles:{view:({nickname:e,organizationKey:a,tab:o=m.OVERVIEW})=>oe(t,le(`/profiles/${v(e,a)}${o?`?tab=${o}`:""}`))},problems:{list:()=>oe(t,le("/problems")),view:({key:e,tab:a=s.STATEMENT})=>oe(t,le(`/problems/${e}${a?`?tab=${a}`:""}`)),edit:({key:e,tab:a=s.STATEMENT})=>oe(t,le(`/problems/${e}/edit${a?`?tab=${a}`:""}`)),new:({judge:e,tab:a})=>oe(t,le(`/problems/new?judge=${e}${a?`&tab=${a}`:""}`))},contests:{list:({tab:e})=>oe(t,le("/contests"+(e?`?tab=${e}`:""))),view:({key:e,tab:a=n.OVERVIEW,subTab:o})=>oe(t,le(`/contests/${e}${a?`?tab=${a}`:""}${o?`${a?"&":"?"}subTab=${o}`:""}`)),edit:({key:e,tab:a=n.OVERVIEW})=>oe(t,le(`/contests/${e}/edit${a?`?tab=${a}`:""}`)),new:({tab:e}={tab:void 0})=>oe(t,le("/contests/new"+(e?`?tab=${e}`:"")))},submissions:{view:({id:e})=>oe(t,le(`/submissions/${e}`))},boards:{page:()=>oe(t,le("/boards"))},ide:{page:()=>oe(t,le("/ide"))}}}COACH(e){const t=e??"";return{home:()=>le("/"),worksheets:{list:()=>oe(t,le("/worksheets")),view:({key:e,page:a=1})=>oe(t,le(`/worksheets/${e}${a?`?page=${a}`:""}`)),edit:({key:e,tab:a,from:o})=>oe(t,le(`/worksheets/${e}/edit?tab=${a}${o?`&from=${o}`:""}`)),new:({tab:e})=>oe(t,le(`/worksheets/new?tab=${e}`))},classes:{list:()=>oe(t,le("/classes")),view:({key:e})=>oe(t,le(`/classes/${e}`)),cycleView:({key:e,cycleId:a})=>oe(t,le(`/classes/${e}/cycle/${a}`)),edit:({key:e})=>oe(t,le(`/classes/${e}/edit`)),new:()=>oe(t,le("/classes/new"))},courses:{list:()=>oe(t,le("/courses")),view:({key:e})=>oe(t,le(`/courses/${e}`)),lessonView:({key:e,lessonIndex:a,page:o=1})=>oe(t,le(`/courses/${e}/lessons/${a}${o?`?page=${o}`:""}`)),edit:({key:e})=>oe(t,le(`/courses/${e}/edit`)),new:()=>oe(t,le("/courses/new"))},profiles:{view:({nickname:e,tab:a=m.OVERVIEW})=>oe(t,le(`/profiles/${e}${a?`?tab=${a}`:""}`))}}}};export{T as A,$ as B,O as C,b as D,w as E,se as F,C as G,c as H,_ as P,P as S,x as a,re as b,B as c,D as d,A as e,U as f,v as g,M as h,G as i,ne as j,j as k,J as l,z as m,Y as n,R as o,V as p,X as q,W as r,ie as s,L as t,I as u,H as v,K as w,F as x,k as y,S as z};
|
|
1
|
+
import{C as e,N as t,J as a}from"./settings-DgLs6IK_.js";import{isValidElement as o,Children as r,cloneElement as i}from"react";import{QueryParamKey as l,ContestTab as n,ProblemTab as s,ProfileTab as m}from"./enums.js";const c={POST:"POST",GET:"GET",PUT:"PUT",PATCH:"PATCH",DELETE:"DELETE"},d="javac 17.0.15",u="v20.19.2",p="Python 3.11.2",y="Python 3.9.16 (7.3.11+dfsg-2+deb12u3, Dec 30 2024, 22:36:23)\n[PyPy 7.3.11 with GCC 12.2.0]",g={mime:"text/x-csrc",mainFilename:"main.c",fileExtension:["c"],hasBuildFile:!0,executable:"gcc",executableVersion:"gcc (Debian 12.2.0-14+deb12u1) 12.2.0\nCopyright (C) 2022 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",templateSourceCode:'#include <stdio.h>\n \nint main(void) {\n \n printf("Hello World\\n");\n \n return 0;\n}',monacoKey:"c",codeMirrorKey:"c",highlightJsKey:"c"},h={mime:"text/x-c++src",mainFilename:"main.cpp",fileExtension:["cpp","c++","cxx","cc"],hasBuildFile:!0,executable:"g++",executableVersion:"g++ (Debian 12.2.0-14+deb12u1) 12.2.0\nCopyright (C) 2022 Free Software Foundation, Inc.\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",templateSourceCode:'#include <iostream>\n\nusing namespace std;\n\nint main() {\n \n cout << "Hello World" << endl;\n \n return 0;\n}',monacoKey:"cpp",codeMirrorKey:"cpp",highlightJsKey:"cpp"},f={mime:"text/x-python",mainFilename:"main.py",fileExtension:["py"],hasBuildFile:!1,templateSourceCode:'print("Hello World\\n")',monacoKey:"python",codeMirrorKey:"python",highlightJsKey:"python"},b={[e.C_11]:{value:e.C_11,label:"C 11",compilePattern:"/usr/bin/jk-c11 -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -fno-asm -lm -s -O2 -std=gnu11 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...g},[e.CPP_11]:{value:e.CPP_11,label:"C++ 11",compilePattern:"/usr/bin/jk-cpp11 -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=gnu++11 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP_20]:{value:e.CPP_20,label:"C++ 20",compilePattern:"/usr/bin/jk-cpp20 -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=gnu++20 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.JAVA_21]:{value:e.JAVA_21,label:"Java 21",mime:"text/x-java",mainFilename:"Main.java",fileExtension:["java"],compilePattern:"/usr/bin/jk-javac -cp '.;*' {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-java -Xmx512M -Xss64M -DONLINE_JUDGE=true -Duser.language=en -Duser.region=US -Duser.variant=US -cp {{folder_path}} {{class_name}}",templateSourceCode:'class Main {\n public static void main (String[] args) {\n \n System.out.println("Hello World");\n \n }\n}',hasBuildFile:!0,executable:"java",executableVersion:d,monacoKey:"java",codeMirrorKey:"java",highlightJsKey:"java"},[e.PYTHON_2]:{value:e.PYTHON_2,label:"Python 2 *",compilePattern:"/usr/bin/jk-python2 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-python2 {{folder_path}}/{{source_full_file_name}}",executable:"python2",executableVersion:y,...f},[e.PYTHON_3]:{value:e.PYTHON_3,label:"Python 3",compilePattern:"/usr/bin/jk-python3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-python3 {{folder_path}}/{{source_full_file_name}}",executable:"python3",executableVersion:y,...f},[e.PYTHON_PYPY_2]:{value:e.PYTHON_PYPY_2,label:"PyPy 2 *",compilePattern:"/usr/bin/jk-pypy2 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-pypy2 {{folder_path}}/{{source_full_file_name}}",executable:"pypy2",executableVersion:y,...f},[e.PYTHON_PYPY_3]:{value:e.PYTHON_PYPY_3,label:"PyPy 3",compilePattern:"/usr/bin/jk-pypy3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/jk-pypy3 {{folder_path}}/{{source_full_file_name}}",executable:"pypy3",executableVersion:y,...f},[e.JAVASCRIPT_NODE_JS_22]:{value:e.JAVASCRIPT_NODE_JS_22,label:"Javascript Node.js 22",mime:"application/x-javascript",mainFilename:"main.js",fileExtension:["js"],compilePattern:"",runPattern:"/usr/bin/jk-node22 {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"javascript",codeMirrorKey:"javascript",highlightJsKey:"javascript"},[e.ICPC_C]:{value:e.ICPC_C,label:"ICPC C *",compilePattern:"gcc -x c -g -O2 -std=gnu11 -static -lm -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...g},[e.C]:{value:e.C,label:"C *",compilePattern:"gcc -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -fno-asm -lm -s -O2 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...g},[e.ICPC_CPP]:{value:e.ICPC_CPP,label:"ICPC C++ *",compilePattern:"g++ -x c++ -static -g -O2 -std=gnu++20 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP]:{value:e.CPP,label:"C++ *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP11]:{value:e.CPP11,label:"C++ 11 *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=c++11 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP14]:{value:e.CPP14,label:"C++ 14 *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=c++14 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.CPP17]:{value:e.CPP17,label:"C++ 17 *",compilePattern:"g++ -x c++ -static -DONLINE_JUDGE -lm -s -O2 -std=c++17 -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}",runPattern:"{{folder_path}}/{{compiled_file_name}}",...h},[e.JAVA]:{value:e.JAVA,label:"Java *",mime:"text/x-java",mainFilename:"Main.java",fileExtension:["java"],compilePattern:"javac -cp '.;*' {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/lib/jvm/java-17-openjdk-amd64/bin/java -Xmx512M -Xss64M -DONLINE_JUDGE=true -Duser.language=en -Duser.region=US -Duser.variant=US -cp {{folder_path}} {{class_name}}",templateSourceCode:'class Main {\n public static void main (String[] args) {\n \n System.out.println("Hello World");\n \n }\n}',hasBuildFile:!0,executable:"javac",executableVersion:d,monacoKey:"java",codeMirrorKey:"java",highlightJsKey:"java"},[e.ICPC_PYTHON]:{value:e.ICPC_PYTHON,label:"ICPC Python *",compilePattern:"pypy3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/pypy3 {{folder_path}}/{{source_full_file_name}}",executable:"pypy3",executableVersion:y,...f},[e.PYTHON]:{value:e.PYTHON,label:"Python *",compilePattern:"python3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/python3 {{folder_path}}/{{source_full_file_name}}",executable:"python3",executableVersion:p,...f},[e.PYTHON2]:{value:e.PYTHON2,label:"Python 2 *",compilePattern:"python2 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/python2 {{folder_path}}/{{source_full_file_name}}",executable:"python",executableVersion:"Python 2.7.18",...f},[e.PYTHON3]:{value:e.PYTHON3,label:"Python 3 *",compilePattern:"python3 -m py_compile {{folder_path}}/{{source_full_file_name}}",runPattern:"/usr/bin/python3 {{folder_path}}/{{source_full_file_name}}",executable:"python3",executableVersion:p,...f},[e.JAVASCRIPT]:{value:e.JAVASCRIPT,label:"Javascript *",mime:"application/x-javascript",mainFilename:"main.js",fileExtension:["js"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"javascript",codeMirrorKey:"javascript",highlightJsKey:"javascript"},[e.TYPESCRIPT]:{value:e.TYPESCRIPT,label:"Typescript *",mime:"application/x-typescript",mainFilename:"main.ts",fileExtension:["ts"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"typescript",codeMirrorKey:"typescript",highlightJsKey:"typescript"},[e.TSX]:{value:e.TSX,label:"TSX *",mime:"application/x-typescript",mainFilename:"main.tsx",fileExtension:["tsx"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"typescript",codeMirrorKey:"typescript",highlightJsKey:"typescript"},[e.JSX]:{value:e.JSX,label:"JSX *",mime:"application/x-javascript",mainFilename:"main.jsx",fileExtension:["jsx"],compilePattern:"",runPattern:"/usr/bin/node {{folder_path}}/{{source_full_file_name}}",templateSourceCode:'console.log("Hello World\\n")',hasBuildFile:!1,executable:"node",executableVersion:u,monacoKey:"javascript",codeMirrorKey:"javascript",highlightJsKey:"javascript"},[e.PSEUDOCODE_PSEINT]:{value:e.PSEUDOCODE_PSEINT,label:"Pseudo-código (PSeInt)",mime:"text/plain",mainFilename:"main.psc",fileExtension:["psc"],compilePattern:"jk-pseint {{folder_path}}/{{source_full_file_name}} --norun --nouser && jk-pseint {{folder_path}}/{{source_full_file_name}} --draw {{folder_path}}/{{source_full_file_name}}.psd && jk-psexport {{folder_path}}/{{source_full_file_name}}.psd {{folder_path}}/{{source_full_file_name}}.cpp --lang=cpp && g++ -x c++ -g -O2 -std=gnu++20 -static -o {{folder_path}}/{{compiled_file_name}} {{folder_path}}/{{source_full_file_name}}.cpp",runPattern:"{{folder_path}}/{{compiled_file_name}}",templateSourceCode:'Algoritmo HOLA_MUNDO\n\tImprimir "Hello World"\nFinAlgoritmo\n',hasBuildFile:!1,executable:"",executableVersion:"PSeInt 20230904-l64-wx3\nhttp://pseint.sourceforge.net\nby Pablo Novara (zaskar_84@yahoo.com.ar)\npsExport 20230904-l64-wx3\nhttp://pseint.sourceforge.net\nby Pablo Novara (zaskar_84@yahoo.com.ar)",monacoKey:"text",codeMirrorKey:"pseudocode-pseint",highlightJsKey:"plaintext"},[e.DOT]:{value:e.DOT,label:"DOT",mime:"text/vnd.graphviz",mainFilename:"diagram.dot",fileExtension:["dot"],compilePattern:"",runPattern:"",templateSourceCode:"digraph G {\n A -> B;\n B -> C;\n}",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"dot",codeMirrorKey:"dot",highlightJsKey:"plaintext"},[e.MERMAID]:{value:e.MERMAID,label:"Mermaid",mime:"text/mermaid",mainFilename:"diagram.mmd",fileExtension:["mmd","mermaid"],compilePattern:"",runPattern:"",templateSourceCode:"graph TD\n A[Start] --\x3e B{Is it working?}\n B -- Yes --\x3e C[Great!]\n B -- No --\x3e D[Fix it]\n D --\x3e B\n",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"mermaid",codeMirrorKey:"mermaid",highlightJsKey:"plaintext"},[e.JSON]:{value:e.JSON,label:"JSON",mime:"application/json",mainFilename:"main.json",fileExtension:["json"],compilePattern:"",runPattern:"",templateSourceCode:"{\n \n}",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"json",codeMirrorKey:"javascript",highlightJsKey:"json"},[e.TEXT]:{value:e.TEXT,label:"plain text",mime:"text/plain",mainFilename:"main.txt",fileExtension:["txt","text","in","out"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"text",codeMirrorKey:"text",highlightJsKey:"plaintext"},[e.DIFF]:{value:e.DIFF,label:"diff",mime:"text/plain",mainFilename:"main.patch",fileExtension:["diff","patch"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"diff",codeMirrorKey:"diff",highlightJsKey:"diff"},[e.LATEX]:{value:e.LATEX,label:"LaTeX",mime:"application/x-latex",mainFilename:"main.tex",fileExtension:["tex"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"latex",codeMirrorKey:"stex",highlightJsKey:"latex"},[e.MARKDOWN]:{value:e.MARKDOWN,label:"Markdown",mime:"text/plain",mainFilename:"main.md",fileExtension:["md"],compilePattern:"",runPattern:"",templateSourceCode:"# Hello World\n",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"markdown",codeMirrorKey:"markdown",highlightJsKey:"markdown"},[e.MDX]:{value:e.MDX,label:"MDX",mime:"text/plain",mainFilename:"main.mdx",fileExtension:["mdx"],compilePattern:"",runPattern:"",templateSourceCode:"# Hello World\n",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"markdown",codeMirrorKey:"markdown",highlightJsKey:"markdown"},[e.ARDUINO]:{value:e.ARDUINO,label:"Arduino",mime:"text/plain",mainFilename:"main.c",fileExtension:["c","cpp","pde","h","ino"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"c",codeMirrorKey:"c",highlightJsKey:"c"},[e.HTML]:{value:e.HTML,label:"HTML",mime:"text/HTML",mainFilename:"index.html",fileExtension:["html"],compilePattern:"",runPattern:"",templateSourceCode:"",hasBuildFile:!1,executable:"",executableVersion:"",monacoKey:"html",codeMirrorKey:"html",highlightJsKey:"xml"},[e.BASH]:{value:e.BASH,label:"Bash",mime:"text/plain",mainFilename:"main.sh",fileExtension:["sh","bash"],compilePattern:"",runPattern:"",templateSourceCode:'#!/bin/bash\necho "Hello World"\n',hasBuildFile:!1,executable:"bash",executableVersion:"",monacoKey:"shell",codeMirrorKey:"shell",highlightJsKey:"bash"}},_={vivos:[{color:"#FF0000",title:"Rojo"},{color:"#FF5900",title:"Rojo - Naranja"},{color:"#FF8600",title:"Naranja"},{color:"#FFBF00",title:"Ámbar"},{color:"#FFFF00",title:"Amarillo"},{color:"#A6FF00",title:"Lima o Verde limon"},{color:"#00FF8C",title:"Verde puro"},{color:"#00FF8C",title:"Verde cian"},{color:"#00FFFF",title:"Cian"},{color:"#0099FF",title:"Cerúleo o Azur"},{color:"#0000FF",title:"Azul"},{color:"#9F00FF",title:"Violeta"},{color:"#FF00FF",title:"Magenta"},{color:"#FF0099",title:"Fucsia"}],oscuros:[{color:"#880000",title:"Granate"},{color:"#882F00",title:"Caoba o Rojo indio"},{color:"#884700",title:"Marrón o Pardo"},{color:"#886600",title:"Marrón dorado"},{color:"#888800",title:"Oliva"},{color:"#588800",title:"Verde palta"},{color:"#008800",title:"Verde estándar"},{color:"#008858",title:"Esmeralda"},{color:"#008888",title:"Cerceta o Azul verde"},{color:"#005288",title:"Añil"},{color:"#000080",title:"Azul marino"},{color:"#880088",title:"Azul púrpura"},{color:"#880088",title:"Púrpura o Morado"},{color:"#880047",title:"Vino"}],agrisados:[{color:"#BF4040",title:"Lacre"},{color:"#BF6340",title:"Cobre"},{color:"#BF8340",title:"Cnalea o Ocre"},{color:"#BF9F40",title:"Dorado"},{color:"#BFBF40",title:"Chartreuse"},{color:"#93BF40",title:"Verde manzana"},{color:"#93BF40",title:"Verde bosque"},{color:"#40BF40",title:"Verde mar"},{color:"#40BFBF",title:"Turquesa"},{color:"#408CBF",title:"Azul acero"},{color:"#4040BF",title:"Zafiro"},{color:"#9340BF",title:"Amastista"},{color:"#B140BF",title:"Púrpureo"},{color:"#B140BF",title:"Fandango"}],claros:[{color:"#FF7777",title:"Coral"},{color:"#FF9977",title:"Salmón"},{color:"#FFB977",title:"Melón o Durazno"},{color:"#FFDA80",title:"Crema"},{color:"#FFFF88",title:"Maíz"},{color:"#CFFF77",title:"Té verde"},{color:"#77FF77",title:"Verde claro"},{color:"#77FFAA",title:"Menta"},{color:"#80FFFF",title:"Aguamarina"},{color:"#73C7FF",title:"Celeste"},{color:"#8082FF",title:"Bígaro o aciano"},{color:"#C977FF",title:"Lavanda o lila"},{color:"#FF77FF",title:"Malva"},{color:"#FF77C1",title:"Rosado"}]},P="",S="x-juki-forwarded-host",T="x-juki-visitor-session-id",O="x-juki-metadata",x=(...e)=>{console.warn((new Date).toLocaleString(),...e)},$=(...e)=>{console.info((new Date).toLocaleString(),...e)},k=(...e)=>{console.error((new Date).toLocaleString(),...e)},E=e=>{const t=new ArrayBuffer(e.length),a=new Uint8Array(t);for(let t=0;t<e.length;t++)a[t]=255&e.charCodeAt(t);return t},F=e=>e.join(""),K=e=>e.split(""),v=(e,t)=>`${e}|${t}`,w=(e,t)=>`${e}|${t}`,C=e=>{const[t,a]=e.split("|");return{sessionId:t,uiId:a}};let N=null;const J=async()=>(N||($("loading XLSX..."),N=await import("./xlsx-XBWnafwQ.js")),N),j=e=>{if(!e)return"";if("string"==typeof e||"number"==typeof e)return`${e}`;if(Array.isArray(e))return e.map(j).join("");if(o(e)&&e.props.children){const t=e.props.children;return Array.isArray(t)?t.map(j).join(""):j(t)}return""};function z(){return"undefined"!=typeof window}const U=(e,t)=>{if("undefined"!=typeof document&&z()){const a=document.createElement("a");a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",t),a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>{z()&&window.URL.revokeObjectURL(e)},100)}};function D(e,t="file"){if(z()){const a=new Blob([e],{type:e.type||"application/octet-stream"}),o=window.URL.createObjectURL(a);U(o,t)}}async function G(e,t){if("undefined"!=typeof document){const a=await fetch(e);if(!a.ok)throw new Error(`HTTP error! Status: ${a.status}`);const o=await a.blob(),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,i.dispatchEvent(new MouseEvent("click")),URL.revokeObjectURL(r)}}const A=(e,t="file.csv")=>{D(new Blob([e.map(e=>e.join(",")).join("\n")],{type:"text/csv"}),t)},I=async(e,t="file.xlsx")=>{const{utils:a}=await J(),o=a.book_new();o.Props={Title:t,Subject:t,Author:"Juki",CreatedDate:new Date};for(const{name:t,autofilter:r,cols:i,rows:l,styles:n}of e){const e={s:{c:1e7,r:1e7},e:{c:0,r:0}};o.SheetNames.push(t);const s={};o.Sheets[t]=s;const m=[];s["!rows"]=m;for(const[t,o]of Object.entries(l)){const r=+t;o.height&&(m[r]={hpx:o.height});for(const[t,i]of Object.entries(o.cells)){const o=+t;e.s.r>r&&(e.s.r=r),e.s.c>o&&(e.s.c=o),e.e.r<r&&(e.e.r=r),e.e.c<o&&(e.e.c=o);const l={v:i.text,t:"s"};if(null==l.v)continue;const m=a.encode_cell({c:o,r:r});"number"==typeof l.v?l.t="n":"boolean"==typeof l.v?l.t="b":(l.v,Date),l.s={},"string"==typeof l.v&&l.v.includes("\n")&&(l.s.alignment={wrapText:!0});const c="number"==typeof i.style?n?.[i.style]:void 0;if(c){const{bgcolor:e,color:t,font:a,align:o,valign:r}=c;"string"==typeof e&&(l.s.fill={fgColor:{rgb:e.replace("#","")}}),"string"==typeof t&&(l.s.font||(l.s.font={}),l.s.font.color={rgb:t.replace("#","")}),a?.bold&&(l.s.font||(l.s.font={}),l.s.font.bold=!0),"string"==typeof o&&(l.s.alignment||(l.s.alignment={}),l.s.alignment.horizontal=o),"string"==typeof r&&(l.s.alignment||(l.s.alignment={}),l.s.alignment.vertical=r)}s[m]=l}}e.s.c<1e7&&(s["!ref"]=a.encode_range(e)),r?.ref&&(s["!autofilter"]={ref:r?.ref});const c=s["!cols"]??[];s["!cols"]=c;for(const[e,t]of Object.entries(i||{})){const a=+e,o=c[a]??{};c[a]=o,t.width&&(o.wpx=t.width)}}return o},M=async(e,t="file.xlsx")=>{const a=await I(e,t),{write:o}=await J(),r=o(a,{bookType:"xlsx",type:"binary"});D(new Blob([E(r)],{type:"application/octet-stream"}),t)},L=(e,t)=>"function"==typeof e?e(t):r.map(e,e=>e&&o(e)?i(e,t):e),B=(e,t,a,o,r,i,l,n,s,m,c,d,u,p,y)=>{let g="";for(const h of[e,t,a,o,r,i,l,n,s,m,c,d,u,p,y])if(h)if("string"==typeof h)g+=(g?" ":"")+h;else for(const e in h)h[e]&&(g+=(g?" ":"")+e);return g},V=(e,t)=>e===t||Array.isArray(e)&&e.includes(t);function H(e){return new Promise(t=>{e.toBlob(t)})}const R=e=>(e.current?.scrollWidth??0)>(e.current?.clientWidth??0);function Y(){return"production"!==t}const W=e=>{if(z()){const t=window.open(e,"_blank","noopener,noreferrer");t&&(t.opener=null)}},X=e=>e.trim().replace(/\/+/g,"/").replace(/^\/+/,"").replace(/\/+$/,""),q=e=>e.includes("?")?e:`${e}?`,Q=e=>"?"!==e[e.length-1]?`${e}&`:e,Z=(e,t,a)=>`${Q(q(e))}page=${t}&pageSize=${a}`,ee=(e,t)=>t?Q(q(e))+t:e,te=(e,t)=>t?Q(q(e))+t:e,ae=(e,t)=>t?`${Q(q(e))}organizationKey=${t}`:e;const oe=(e,t)=>`${e||""}${t}`,re=e=>new URLSearchParams(e.toString()),ie=e=>{const t=re(e);let a=new URLSearchParams;z()&&(a=new URLSearchParams(window.location.search));const o=a.get(l.TOKEN);o&&t.set(l.TOKEN,o);const r=a.get(l.COMPANY);r&&t.set(l.COMPANY,r);const i=a.get(l.SUBMISSION);i&&t.set(l.SUBMISSION,i);const n=a.get(l.SIGN_IN);n&&t.set(l.SIGN_IN,n);const s=a.get(l.SIGN_UP);return s&&t.set(l.SIGN_UP,s),t.toString()},le=e=>{const t=new URL(`https://juki.app${e}`),a=ie(t.searchParams);return a?`${t.pathname}?${a}`:t.pathname};const ne=new class{get apiV2(){const e=(e,t)=>`${a}/${e}${t}`,t=e=>a?e:()=>({url:"",method:c.GET});return{auth:{ping:t(()=>({url:e("auth","/ping"),method:c.GET})),signIn:t(({params:{organizationKey:t}={},body:a})=>({url:ae(e("auth","/sign-in"),t),method:c.POST,body:JSON.stringify(a)})),signUp:t(({body:t})=>({url:e("auth","/sign-up"),method:c.POST,body:JSON.stringify(t)})),createUser:t(({params:{organizationKey:t}={},body:a})=>({url:ae(e("auth","/sign-up"),t),method:c.POST,body:JSON.stringify({...a,isGenerated:!0})})),signOut:t(()=>({url:e("auth","/sign-out"),method:c.POST})),initiateResetPassword:t(({body:t})=>({url:e("auth","/initiate-reset-password"),method:c.POST,body:JSON.stringify(t)})),updatePassword:t(({params:{organizationKey:t,nickname:a},body:o})=>({url:e("auth",`/user-key/${v(a,t)}/update-password`),method:c.POST,body:JSON.stringify(o)})),resetPassword:t(({params:{organizationKey:t,nickname:a}})=>({url:e("auth",`/user-key/${v(a,t)}/reset-password`),method:c.POST})),createSession:t(({params:{organizationKey:t}={},body:a})=>({url:ae(e("auth","/create-session"),t),method:c.POST,body:JSON.stringify(a)}))},log:{error:t(({body:t})=>({url:e("log","/error"),method:c.POST,body:JSON.stringify(t)})),info:t(({body:t})=>({url:e("log","/info"),method:c.POST,body:JSON.stringify(t)}))},user:{getSummaryList:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("user","/summary-list"),t),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("user","/system-list"),t,a),o),r),method:c.GET})),getSummary:t(({params:{nickname:t,organizationKey:a}})=>({url:e("user",`/user-key/${v(t,a)}/summary`),method:c.GET})),getProfile:t(({params:{nickname:t,organizationKey:a}})=>({url:e("user",`/user-key/${v(t,a)}/profile`),method:c.GET})),getLogs:t(({params:{nickname:t,organizationKey:a}})=>({url:e("user",`/user-key/${v(t,a)}/logs`),method:c.GET})),getMySessions:t(()=>({url:e("user","/my-sessions"),method:c.GET})),getAllOnlineUsers:t(({params:{filterUrl:t,sortUrl:a}})=>({url:ee(te(e("user","/all-online-users"),t),a),method:c.GET})),getOnlineUsers:t(({params:{filterUrl:t,sortUrl:a}})=>({url:ee(te(e("user","/online-users"),t),a),method:c.GET})),deleteOldSessions:t(()=>({url:e("user","/delete-old-sessions"),method:c.POST})),updateProfileData:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/profile-data`),method:c.PUT,body:JSON.stringify(o)})),updateProfileImage:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/profile-image`),method:c.PUT,body:JSON.stringify(o)})),updatePreferences:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/preferences`),method:c.PUT,body:JSON.stringify(o)})),updateRoles:t(({params:{nickname:t,organizationKey:a},body:o})=>({url:e("user",`/user-key/${v(t,a)}/roles`),method:c.PUT,body:JSON.stringify(o)})),deleteSession:t(({params:{sessionId:t}})=>({url:e("user",`/session/${t}`),method:c.DELETE})),checkData:t(({params:{organizationKey:t},body:a})=>({url:ae(e("user","/check-data"),t),method:c.POST,body:JSON.stringify(a)})),clientTrack:t(({body:t})=>({url:e("user","/client-track"),method:c.POST,body:JSON.stringify(t)}))},problem:{create:t(()=>({url:e("problem",""),method:c.POST})),update:t(({params:{key:t}})=>({url:e("problem",`/${t}`),method:c.PUT})),delete:t(({params:{key:t}})=>({url:e("problem",`/${t}`),method:c.DELETE})),getMetadata:t(({params:{key:t}})=>({url:e("problem",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("problem",`/${t}/data`),method:c.GET})),getBasicSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("problem","/basic-summary-list"),t,a),o),r),method:c.GET})),getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("problem","/summary-list"),t,a),o),r),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("problem","/system-list"),t,a),o),r),method:c.GET})),getSummary:t(({params:{key:t}})=>({url:e("problem",`/${t}/summary`),method:c.GET})),getLogs:t(({params:{key:t}})=>({url:e("problem",`/${t}/logs`),method:c.GET})),getTestCases:t(({params:{key:t}})=>({url:e("problem",`/${t}/test-cases`),method:c.GET})),submit:t(({params:{key:t},body:a})=>({url:e("problem",`/${t}/submit`),method:c.POST,body:JSON.stringify(a)})),crawl:t(({body:t})=>({url:e("problem","/crawl"),method:c.POST,body:JSON.stringify(t)}))},contest:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("contest","/summary-list"),t,a),o),r),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("contest","/system-list"),t,a),o),r),method:c.GET})),getMetadata:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/metadata`),a),method:c.GET})),getData:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data`),a),method:c.GET})),getDataEvents:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data/events`),a),method:c.GET})),getDataMembers:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data/members`),a),method:c.GET})),getDataClarifications:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/data/clarifications`),a),method:c.GET})),getScoreboard:t(({params:{key:t,unfrozen:a,organizationKey:o,official:r}})=>({url:ae(e("contest",`/${t}/data/scoreboard${a?"?state=unfrozen":""}${r?(a?"&":"?")+"official=true":""}`),o),method:c.GET})),getLogs:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/logs`),a),method:c.GET})),submit:t(({params:{key:t,problemKey:a,organizationKey:o},body:r})=>({url:ae(e("contest",`/${t}/problem/${a}/submit`),o),method:c.POST,body:JSON.stringify(r)})),recalculateScoreboard:t(({params:{key:t,organizationKey:a,official:o}})=>({url:ae(e("contest",`/${t}/recalculate-scoreboard${o?"?official=true":""}`),a),method:c.POST})),recalculatePrerequisites:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/recalculate-prerequisites`),a),method:c.POST})),problem:{rejudge:t(({params:{key:t,problemKey:a,organizationKey:o}})=>({url:ae(e("contest",`/${t}/problem/${a}/rejudge`),o),method:c.POST})),retrieve:t(({params:{key:t,problemKey:a,organizationKey:o}})=>({url:ae(e("contest",`/${t}/problem/${a}/retrieve`),o),method:c.POST}))},retrieve:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/retrieve`),a),method:c.POST})),editGlobal:t(({params:{key:t,organizationKey:a},body:o})=>({url:ae(e("contest",`/${t}/global`),a),method:c.PUT,body:JSON.stringify(o)})),createGlobal:t(({params:{organizationKey:t},body:a})=>({url:ae(e("contest","/global"),t),method:c.POST,body:JSON.stringify(a)})),unlinkSubmissions:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("contest",`/${t}/unlink-submissions`),a),method:c.POST}))},submission:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("submission","/summary-list"),t,a),o),r),method:c.GET})),getSystemList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("submission","/system-list"),t,a),o),r),method:c.GET})),getExportSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r,withSourceCodes:i}})=>({url:ee(te(Z(e("submission","/summary-list-export"+(i?"?withSourceCodes=true":"")),t,a),o),r),method:c.GET})),getData:t(({params:{id:t}})=>({url:e("submission",`/${t}/data`),method:c.GET})),getLogs:t(({params:{id:t}})=>({url:e("submission",`/${t}/logs`),method:c.GET})),rejudge:t(({params:{id:t}})=>({url:e("submission",`/${t}/rejudge`),method:c.POST})),retrieve:t(({params:{id:t}})=>({url:e("submission",`/${t}/retrieve`),method:c.POST})),judge:t(({params:{id:t},body:a})=>({url:e("submission",`/${t}/judge`),method:c.POST,body:JSON.stringify(a)})),archive:t(({params:{id:t}})=>({url:e("submission",`/${t}/archive`),method:c.POST})),release:t(({params:{id:t}})=>({url:e("submission",`/${t}/release`),method:c.POST}))},image:{getPublicList:t(()=>({url:e("image","/public-list"),method:c.GET})),publish:t(({body:t})=>({url:e("image","/publish"),method:c.POST,body:JSON.stringify(t)}))},file:{publish:t(({body:t})=>({url:e("file","/publish"),method:c.POST,body:JSON.stringify(t)}))},note:{publish:t(({body:t})=>({url:e("note","/publish"),method:c.POST,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})),getPdf:t(({params:{sourceUrl:t}})=>({url:e("note",`/pdf?sourceUrl=${t}`),method:c.GET})),createPdf:t(({body:t})=>({url:e("note","/pdf"),method:c.POST,body:JSON.stringify(t)}))},code:{run:t(({body:t})=>({url:e("code","/run"),method:c.POST,body:JSON.stringify(t)}))},ia:{chatCompletions:t(({body:t})=>({url:e("ia","/chat/completions"),method:c.POST,body:JSON.stringify(t)}))},organization:{get:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization",""),t),method:c.GET})),getPermissionList:t(()=>({url:e("organization","/permission-list"),method:c.GET})),getJudgeList:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/judge-list"),t),method:c.GET})),getTrustedCompaniesList:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/trusted-organizations-list"),t),method:c.GET})),getResourceSpecifications:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/resource-specifications"),t),method:c.GET})),getEmailData:t(({params:{organizationKey:t}={organizationKey:""}}={})=>({url:ae(e("organization","/email-data"),t),method:c.GET})),updateImage:t(({params:{organizationKey:t}={organizationKey:""},body:a})=>({url:ae(e("organization","/image"),t),method:c.PUT,body:JSON.stringify(a)})),updateData:t(({params:{organizationKey:t}={organizationKey:""},body:a})=>({url:ae(e("organization",""),t),method:c.PATCH,body:JSON.stringify(a)})),updateSensitiveData:t(({params:{organizationKey:t}={organizationKey:""},body:a})=>({url:ae(e("organization","/sensitive-data"),t),method:c.PATCH,body:JSON.stringify(a)}))},locale:{get:t(({params:{locale:t,namespace:a}})=>({url:e("locale",`/${t}/${a}`),method:c.GET}))},judge:{getData:t(({params:{key:t}})=>({url:e("judge",`/${t}/data`),method:c.GET})),getSummaryList:t(({params:{filterUrl:t,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:ee(te(e("judge","/summary-list"),t),a),method:c.GET})),getSystemList:t(({params:{filterUrl:t,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:ee(te(e("judge","/system-list"),t),a),method:c.GET})),crawlLanguages:t(({params:{key:t}})=>({url:e("judge",`/${t}/crawl-languages`),method:c.POST})),patch:t(({params:{key:t},body:{languages:a,name:o,problemTags:r,isExternal:i,isSubmitSupported:l,url:n,logo:s,logoSize:m}})=>{const d={};return a&&(d.languages=a),"string"==typeof o&&(d.name=o),r&&(d.problemTags=r),"boolean"==typeof i&&(d.isExternal=i),"boolean"==typeof l&&(d.isSubmitSupported=l),"string"==typeof n&&(d.url=n),"string"==typeof s&&(d.logo=s),m&&(d.logoSize=m),{url:e("judge",`/${t}`),method:c.PATCH,body:JSON.stringify(d)}})},worksheet:{getData:t(({params:{key:t,organizationKey:a}})=>({url:ae(e("worksheet",`/${t}/data`),a),method:c.GET})),update:t(({params:{key:t},body:a})=>({url:e("worksheet",`/${t}`),method:c.PUT,body:JSON.stringify(a)})),getList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("worksheet","/list"),t,a),o),r),method:c.GET})),getSubmissionsUser:t(({params:{key:t,userKey:a,secondaryKey:o}})=>({url:e("worksheet",`/${t}/submissions/user/${a}${o?`?secondaryKey=${o}`:""}`),method:c.GET})),submitJkMd:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/jk-md${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)})),submitCodeEditor:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/code-editor${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)})),submitQuizProblem:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/quiz-problem${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)})),submitQuizOptions:t(({params:{worksheetKey:t,secondaryKey:a},body:o})=>({url:e("worksheet",`/${t}/submit/quiz-options${a?`?secondaryKey=${a}`:""}`),method:c.POST,body:JSON.stringify(o)}))},system:{services:{checkAndStart:t(()=>({url:e("sys","/services/check-and-start"),method:c.POST})),check:t(()=>({url:e("sys","/services/check"),method:c.POST})),clean:t(()=>({url:e("sys","/services/clean"),method:c.POST}))}},comment:{get:t(({params:{key:t}})=>({url:e("comment",`/${t}`),method:c.GET})),post:t(({params:{key:t},body:a})=>({url:e("comment",`/${t}`),method:c.POST,body:JSON.stringify(a)})),reply:t(({params:{key:t,id:a},body:o})=>({url:e("comment",`/${t}/${a}/reply`),method:c.POST,body:JSON.stringify(o)})),react:t(({params:{key:t,id:a},body:o})=>({url:e("comment",`/${t}/${a}/react`),method:c.POST,body:JSON.stringify(o)})),hide:t(({params:{key:t,id:a}})=>({url:e("comment",`/${t}/${a}/hide`),method:c.POST})),unhide:t(({params:{key:t,id:a}})=>({url:e("comment",`/${t}/${a}/unhide`),method:c.POST}))},class:{viewAssignmentMyWorksheetSubmitCodeEditor:t(({params:{classKey:t,cycleId:a,sessionId:o,assignmentId:r},body:i})=>({url:e("class",`/${t}/cycle/${a}/session/${o}/assignment/${r}/worksheet/submit-code-editor`),method:c.POST,body:JSON.stringify(i)}))},documentTemplate:{create:t(({body:t})=>({url:e("document-template",""),method:c.POST,body:JSON.stringify(t)})),getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("document-template","/summary-list"),t,a),o),r),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("document-template",`/${t}/data`),method:c.GET})),updateData:t(({params:{key:t,organizationKey:a},body:o})=>({url:ae(e("document-template",`/${t}`),a),method:c.PUT,body:JSON.stringify(o)}))},statistics:{getorganizationStats:t(({params:{organizationKey:t,startTimestamp:a,endTimestamp:o,groupBy:r}})=>({url:ae(e("statistics",`/organization?startTimestamp=${a}&endTimestamp=${o}&groupBy=${r.join(",")}`),t),method:c.GET})),getProblemStats:t(({params:{organizationKey:t,problemKey:a,startTimestamp:o,endTimestamp:r}})=>({url:ae(e("statistics",`/problem/${a}?startTimestamp=${o}&endTimestamp=${r}`),t),method:c.GET})),getUsersTracksStats:t(({params:{organizationKeys:t,startTimestamp:a,endTimestamp:o,groupBy:r}})=>({url:e("statistics",`/users-tracks?startTimestamp=${a}&endTimestamp=${o}&groupBy=${r.join(",")}${t?`&organizationKeys=${t}`:""}`),method:c.GET}))},excalidraw:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("excalidraw","/summary-list"),t,a),o),r),method:c.GET})),create:t(({body:t})=>({url:e("excalidraw",""),method:c.POST,body:JSON.stringify(t)})),updateData:t(({params:{key:t},body:a})=>({url:e("excalidraw",`/${t}/data`),method:c.PUT,body:JSON.stringify(a)})),getMetadata:t(({params:{key:t}})=>({url:e("excalidraw",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("excalidraw",`/${t}/data`),method:c.GET}))},mermaid:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("mermaid","/summary-list"),t,a),o),r),method:c.GET})),create:t(({body:t})=>({url:e("mermaid",""),method:c.POST,body:JSON.stringify(t)})),updateData:t(({params:{key:t},body:a})=>({url:e("mermaid",`/${t}/data`),method:c.PUT,body:JSON.stringify(a)})),getMetadata:t(({params:{key:t}})=>({url:e("mermaid",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("mermaid",`/${t}/data`),method:c.GET}))},markdown:{getSummaryList:t(({params:{page:t,pageSize:a,filterUrl:o,sortUrl:r}})=>({url:ee(te(Z(e("markdown","/summary-list"),t,a),o),r),method:c.GET})),create:t(({body:t})=>({url:e("markdown",""),method:c.POST,body:JSON.stringify(t)})),updateData:t(({params:{key:t},body:a})=>({url:e("markdown",`/${t}/data`),method:c.PUT,body:JSON.stringify(a)})),getMetadata:t(({params:{key:t}})=>({url:e("markdown",`/${t}/metadata`),method:c.GET})),getData:t(({params:{key:t}})=>({url:e("markdown",`/${t}/data`),method:c.GET}))},export:{websiteToPdf:t(({params:{url:t,headerTemplate:a,footerTemplate:o,margin:r,format:i}})=>({url:e("export","/website-to-pdf"),method:c.POST,body:JSON.stringify({url:t,headerTemplate:a,footerTemplate:o,margin:r,format:i})})),problem:{statementToPdf:t(({params:{key:t,language:a}})=>({url:e("export","/problem/statement-to-pdf"),method:c.POST,body:JSON.stringify({key:t,language:a})})),statementToPng:t(({params:{key:t,token:a,language:o}})=>({url:e("export","/problem/statement-to-png"),method:c.POST,body:JSON.stringify({key:t,token:a,language:o})}))},contest:{problems:{statementsToPdf:t(({params:{key:t,language:a}})=>({url:e("export","/contest/problems/statements-to-pdf"),method:c.POST,body:JSON.stringify({key:t,language:a})}))}}},webScraping:{codeforces:{problemStatement:t(({params:{contestId:t,index:a}})=>({url:e("web-scraping","/codeforces/problem-statement"),method:c.POST,body:JSON.stringify({contestId:t,index:a})}))},patito:{problemStatement:t(({params:{id:t}})=>({url:e("web-scraping","/patito/problem-statement"),method:c.POST,body:JSON.stringify({id:t})}))}},websocket:{auth:t(()=>({url:e("websocket","/auth"),method:c.POST}))}}}},se=new class{JUDGE(e){const t=e??"";return{home:()=>le("/"),profiles:{view:({nickname:e,organizationKey:a,tab:o=m.OVERVIEW})=>oe(t,le(`/profiles/${v(e,a)}${o?`?tab=${o}`:""}`))},problems:{list:()=>oe(t,le("/problems")),view:({key:e,tab:a=s.STATEMENT})=>oe(t,le(`/problems/${e}${a?`?tab=${a}`:""}`)),edit:({key:e,tab:a=s.STATEMENT})=>oe(t,le(`/problems/${e}/edit${a?`?tab=${a}`:""}`)),new:({judge:e,tab:a})=>oe(t,le(`/problems/new?judge=${e}${a?`&tab=${a}`:""}`))},contests:{list:({tab:e})=>oe(t,le("/contests"+(e?`?tab=${e}`:""))),view:({key:e,tab:a=n.OVERVIEW,subTab:o})=>oe(t,le(`/contests/${e}${a?`?tab=${a}`:""}${o?`${a?"&":"?"}subTab=${o}`:""}`)),edit:({key:e,tab:a=n.OVERVIEW})=>oe(t,le(`/contests/${e}/edit${a?`?tab=${a}`:""}`)),new:({tab:e}={tab:void 0})=>oe(t,le("/contests/new"+(e?`?tab=${e}`:"")))},submissions:{view:({id:e})=>oe(t,le(`/submissions/${e}`))},boards:{page:()=>oe(t,le("/boards"))},ide:{page:()=>oe(t,le("/ide"))}}}COACH(e){const t=e??"";return{home:()=>le("/"),worksheets:{list:()=>oe(t,le("/worksheets")),view:({key:e,page:a=1})=>oe(t,le(`/worksheets/${e}${a?`?page=${a}`:""}`)),edit:({key:e,tab:a,from:o})=>oe(t,le(`/worksheets/${e}/edit?tab=${a}${o?`&from=${o}`:""}`)),new:({tab:e})=>oe(t,le(`/worksheets/new?tab=${e}`))},classes:{list:()=>oe(t,le("/classes")),view:({key:e})=>oe(t,le(`/classes/${e}`)),cycleView:({key:e,cycleId:a})=>oe(t,le(`/classes/${e}/cycle/${a}`)),edit:({key:e})=>oe(t,le(`/classes/${e}/edit`)),new:()=>oe(t,le("/classes/new"))},courses:{list:()=>oe(t,le("/courses")),view:({key:e})=>oe(t,le(`/courses/${e}`)),lessonView:({key:e,lessonIndex:a,page:o=1})=>oe(t,le(`/courses/${e}/lessons/${a}${o?`?page=${o}`:""}`)),edit:({key:e})=>oe(t,le(`/courses/${e}/edit`)),new:()=>oe(t,le("/courses/new"))},profiles:{view:({nickname:e,tab:a=m.OVERVIEW})=>oe(t,le(`/profiles/${e}${a?`?tab=${a}`:""}`))}}}};export{T as A,$ as B,O as C,b as D,w as E,se as F,C as G,c as H,_ as P,P as S,x as a,re as b,B as c,D as d,A as e,U as f,v as g,M as h,G as i,ne as j,j as k,J as l,z as m,Y as n,R as o,V as p,X as q,W as r,ie as s,L as t,I as u,H as v,K as w,F as x,k as y,S as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{r,c as a,M as o,d as s}from"./SubmissionDateField-D3AvKusK.js";import"react";import"./settings-DgLs6IK_.js";const i=({color:r})=>l("path",{d:"M6 22q-.825 0-1.412-.587Q4 20.825 4 20V4q0-.825.588-1.413Q5.175 2 6 2h8l6 6v12q0 .825-.587 1.413Q18.825 22 18 22Zm7-13V4H6v16h12V9ZM6 4v5-5 16V4Z",fill:r}),t=l=>r(l,i,"draft"),e=({color:r})=>l("path",{d:"M4 20q-.825 0-1.412-.587Q2 18.825 2 18V6q0-.825.588-1.412Q3.175 4 4 4h6l2 2h8q.825 0 1.413.588Q22 7.175 22 8v10q0 .825-.587 1.413Q20.825 20 20 20ZM4 6v12h16V8h-8.825l-2-2H4Zm0 0v12Z",fill:r}),m=l=>r(l,e,"folder"),h=({color:r})=>l("path",{d:"M4 20q-.825 0-1.412-.587Q2 18.825 2 18V6q0-.825.588-1.412Q3.175 4 4 4h6l2 2h8q.825 0 1.413.588Q22 7.175 22 8H11.175l-2-2H4v12l2.4-8h17.1l-2.575 8.575q-.2.65-.737 1.038Q19.65 20 19 20Zm2.1-2H19l1.8-6H7.9Zm0 0 1.8-6-1.8 6ZM4 8V6v2Z",fill:r}),q=l=>r(l,h,"folder-open"),Z=({color:r})=>l("path",{d:"M8 19V5l11 7Zm2-7Zm0 3.35L15.25 12 10 8.65Z",fill:r}),c=l=>r(l,Z,"play-arrow"),d=l=>a(l,l.circle||l.square||l.filledCircle||l.filledSquare?o:s);export{t as D,m as F,d as M,c as P,q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as t,Fragment as o}from"react/jsx-runtime";import{r as l}from"./SubmissionDateField-D3AvKusK.js";import"react";import"./settings-DgLs6IK_.js";const i=({color:t})=>r("path",{d:"M11 20V7.825l-5.6 5.6L4 12l8-8 8 8-1.4 1.425-5.6-5.6V20Z",fill:t}),a=r=>l(r,i,"arrow-upward"),p=({up:i,down:a,...p})=>l({...p,viewBox:"0 -960 960 960"},(({up:l,down:i})=>({color:a})=>t(o,{children:[r("path",{fill:l?a:"var(--cr-ht-lt)",d:"M305.87-438.87v-257.61l-90 90-75.09-74.09 218.09-218.65 218.09 218.65-75.09 74.09-90-90v257.61h-106Z"}),r("path",{fill:i?a:"var(--cr-ht-lt)",d:"M601.13-60.78 383.04-279.43l75.09-74.09 90 90v-257.61h106v257.61l90-90 75.09 74.09L601.13-60.78Z"})]}))({up:i,down:a}),"pending");export{a as A,p as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r}from"./mermaid-parser.core-DanmL-Td.js";export{I as InfoModule}from"./mermaid-parser.core-DanmL-Td.js";import"./map-BvlAjF4J.js";import"./_baseIteratee-DJNkOVK7.js";import"./memoize-CPUrcYQl.js";import"./isSymbol-CATEdeai.js";import"./_baseUniq-BJKKUJ6e.js";import"./min-Dc9VrJ6M.js";import"./mermaid.core-BHSaFUkv.js";import"./index-CDfJgeHe.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./SubmissionDateField-D3AvKusK.js";import"./index-CH9DJEEq.js";import"./enums.js";import"./date-DabTuCYQ.js";import"./time-BPMFfIa-.js";import"./websocket-DCvEZ5Ma.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";export{r as createInfoServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as r,l as t,K as e,e as i}from"./mermaid.core-BHSaFUkv.js";import{p as s}from"./mermaid-parser.core-DanmL-Td.js";import"./index-CDfJgeHe.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./SubmissionDateField-D3AvKusK.js";import"./index-CH9DJEEq.js";import"./enums.js";import"./date-DabTuCYQ.js";import"./time-BPMFfIa-.js";import"./websocket-DCvEZ5Ma.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 o="11.14.0",m={parser:{parse:r(async r=>{const e=await s("info",r);t.debug(e)},"parse")},db:{getVersion:r(()=>o,"getVersion")},renderer:{draw:r((r,s,o)=>{t.debug("rendering info diagram\n"+r);const m=e(s);i(m,100,400,!0);m.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw")}};export{m as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,c as i,P as e,K as n,ab as s,z as a,k as r,q as o,a as h,b as l,g as c,s as u,t as d,e as p}from"./mermaid.core-BHSaFUkv.js";import"./index-CDfJgeHe.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./SubmissionDateField-D3AvKusK.js";import"./index-CH9DJEEq.js";import"./enums.js";import"./date-DabTuCYQ.js";import"./time-BPMFfIa-.js";import"./websocket-DCvEZ5Ma.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";var y=function(){var i=t(function(t,i,e,n){for(e=e||{},n=t.length;n--;e[t[n]]=i);return e},"o"),e=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],o=[1,20],h=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],y=[1,6,7,11,13,14],g={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(t,i,e,n,s,a,r){var o=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[o-1].length,a[o].trim());break;case 16:n.addNode(0,a[o].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:s,14:a},i(r,[2,3]),{1:[2,2]},i(r,[2,4]),i(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:o,7:h,10:17,11:l},i(c,[2,18],{14:[1,21]}),i(c,[2,16]),i(c,[2,17]),{6:o,7:h,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},i(u,[2,14],{7:d,11:p}),i(y,[2,8]),i(y,[2,9]),i(y,[2,10]),i(c,[2,15]),i(u,[2,13],{7:d,11:p}),i(y,[2,11]),i(y,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:t(function(i){var e=this,n=[0],s=[],a=[null],r=[],o=this.table,h="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(i,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),t(m,"lex");for(var k,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==k&&(k=m()),x=o[w]&&o[w][k]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],o[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[k]||k,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+k);switch(x[0]){case 1:n.push(k),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),k=null,c=d.yyleng,h=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[h,c,l,p.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:t(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:t(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:t(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:t(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 n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(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:t(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:t(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:t(function(t,i){var e,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,i,e,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((e=this._input.match(this.rules[s[a]]))&&(!i||e[0].length>i[0].length)){if(i=e,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,i,e,n){switch(e){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function m(){this.yy={}}return g.lexer=f,t(m,"Parser"),m.prototype=g,g.Parser=m,new m}();y.parser=y;var g=y,f=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{t(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,a()}getRoot(){return this.root}addNode(t,e){const n=r.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return h()}setAccTitle(t){l(t)}getAccDescription(){return c()}setAccDescription(t){u(t)}getDiagramTitle(){return d()}setDiagramTitle(t){o(t)}},m=250,k=82*Math.PI/180,w=Math.cos(k),x=Math.sin(k),b=t((t,i,e)=>{const n=t.node().getBBox(),s=n.width+2*i,a=n.height+2*i;p(t,a,s,e),t.attr("viewBox",`${n.x-i} ${n.y-i} ${s} ${a}`)},"applyPaddedViewBox"),_=t((t,a,r,o)=>{const h=o.db.getRoot();if(!h)return;const l=i(),{look:c,handDrawnSeed:u,themeVariables:d}=l,p=e(l.fontSize)[0]??14,y="handDrawn"===c,g=h.children??[],f=l.ishikawa?.diagramPadding??20,k=l.ishikawa?.useMaxWidth??!1,w=n(a),x=w.append("g").attr("class","ishikawa"),_=y?s.svg(w.node()):void 0,$=_?{roughSvg:_,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${a}`;y||x.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let E=0,C=m;const j=y?void 0:P(x,E,C,E,C,"ishikawa-spine");if(S(x,E,C,h.text,p,$),!g.length)return y&&P(x,E,C,E,C,"ishikawa-spine",$),void b(w,f,k);E-=20;const L=g.filter((t,i)=>i%2==0),M=g.filter((t,i)=>i%2==1),T=v(L),B=v(M),N=T.total+B.total;let D=m,O=m;if(N>0){const t=500,i=75;D=Math.max(i,t*(T.total/N)),O=Math.max(i,t*(B.total/N))}const z=2*p;D=Math.max(D,T.max*z),O=Math.max(O,B.max*z),C=Math.max(D,m),j&&j.attr("y1",C).attr("y2",C),x.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const W=Math.ceil(g.length/2);for(let t=0;t<W;t++){const i=x.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[g[2*t],-1,D],[g[2*t+1],1,O]])e&&A(i,e,E,C,n,s,p,$);E=i.selectAll("text").nodes().reduce((t,i)=>Math.min(t,i.getBBox().x),1/0)}if(y)P(x,E,C,0,C,"ishikawa-spine",$);else{j.attr("x1",E);const t=`url(#${I})`;x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}b(w,f,k)},"draw"),v=t(i=>{const e=t(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return i.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),S=t((t,i,e,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),o=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${i},${e})`),h=L(o,j(n,r),0,0,"ishikawa-head-label","start",s),l=h.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);h.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),$=t((i,e)=>{const n=[],s=[],a=t((t,i,r)=>{const o=-1===e?[...t].reverse():t;for(const t of o){const e=n.length,o=t.children??[];n.push({depth:r,text:j(t.text,15),parentIndex:i,childCount:o.length}),r%2==0?(s.push(e),o.length&&a(o,e,r+1)):(o.length&&a(o,e,r+1),s.push(e))}},"walk");return a(i,-1,2),{entries:n,yOrder:s}},"flattenTree"),I=t((t,i,e,n,s,a,r)=>{const o=t.append("g").attr("class","ishikawa-label-group"),h=L(o,i,e,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});o.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),E=t((t,i,e,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const o=n/r,h=s/r,l=6*-h,c=6*o,u=`M ${i} ${e} L ${i-6*o*2+l} ${e-6*h*2+c} L ${i-6*o*2-l} ${e-6*h*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),A=t((t,i,e,n,s,a,r,o)=>{const h=i.children??[],l=a*(h.length?1:.2),c=x*l*s,u=e+-w*l,d=n+c;if(P(t,e,n,u,d,"ishikawa-branch",o),o&&E(t,e,n,e-u,n-d,o),I(t,i.text,u,d,s,r,o),!h.length)return;const{entries:p,yOrder:y}=$(h,s),g=p.length,f=new Array(g);for(const[t,i]of y.entries())f[i]=n+c*((t+1)/(g+1));const m=new Map;m.set(-1,{x0:e,y0:n,x1:u,y1:d,childCount:h.length,childrenDrawn:0});const k=-w,b=x*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[i,e]of p.entries()){const n=f[i],s=m.get(e.parentIndex),a=t.append("g").attr("class","ishikawa-sub-group");let h=0,l=0,c=0;if(e.depth%2==0){const t=s.y1-s.y0;h=M(s.x0,s.x1,t?(n-s.y0)/t:.5),l=n,c=h-(e.childCount>0?60+5*e.childCount:30),P(a,h,n,c,n,"ishikawa-sub-branch",o),o&&E(a,h,n,1,0,o),L(a,e.text,c,n,"ishikawa-label align","end",r)}else{const t=s.childrenDrawn++;h=M(s.x0,s.x1,(s.childCount-t)/(s.childCount+1)),l=s.y0,c=h+k*((n-l)/b),P(a,h,l,c,n,"ishikawa-sub-branch",o),o&&E(a,h,l,h-c,l-n,o),L(a,e.text,c,n,_,"end",r)}e.childCount>0&&m.set(i,{x0:h,y0:l,x1:c,y1:n,childCount:e.childCount,childrenDrawn:0})}},"drawBranch"),C=t(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),j=t((t,i)=>{if(t.length<=i)return t;const e=[];for(const n of t.split(/\s+/)){const t=e.length-1;t>=0&&e[t].length+1+n.length<=i?e[t]+=" "+n:e.push(n)}return e.join("\n")},"wrapText"),L=t((t,i,e,n,s,a,r)=>{const o=C(i),h=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",e).attr("y",n-(o.length-1)*h/2);for(const[t,i]of o.entries())l.append("tspan").attr("x",e).attr("dy",0===t?0:h).text(i);return l},"drawMultilineText"),M=t((t,i,e)=>t+(i-t)*e,"lerp"),P=t((t,i,e,n,s,a,r)=>{if(r){const o=r.roughSvg.line(i,e,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>o).attr("class",a)}return t.append("line").attr("class",a).attr("x1",i).attr("y1",e).attr("x2",n).attr("y2",s)},"drawLine"),T={draw:_},B=t(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),N={parser:g,get db(){return new f},renderer:T,styles:B};export{N as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./chunk-FMBD7UC4-yfeFLPr5.js";import{a as e,g as n,h as i,d as s}from"./chunk-YZCP3GAM-BleOO0o9.js";import{g as r,s as a,a as o,b as l,t as c,q as h,_ as u,c as p,d as y,e as d,z as f}from"./mermaid.core-BHSaFUkv.js";import{d as g}from"./arc-CpSlG_nw.js";import"./index-CDfJgeHe.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./SubmissionDateField-D3AvKusK.js";import"./index-CH9DJEEq.js";import"./enums.js";import"./date-DabTuCYQ.js";import"./time-BPMFfIa-.js";import"./websocket-DCvEZ5Ma.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";var m=function(){var t=u(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:u(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:u(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:u(function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),u(m,"lex");for(var x,k,b,_,w,v,$,M,T={};;){if(k=n[n.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==x&&(x=m()),b=a[k]&&a[k][x]),void 0===b||!b.length||!b[0]){var j="";for(w in M=[],a[k])this.terminals_[w]&&w>2&&M.push("'"+this.terminals_[w]+"'");j=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(j,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:M})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(b[0]){case 1:n.push(x),s.push(p.yytext),r.push(p.yylloc),n.push(b[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[b[1]][1],T.$=s[s.length-v],T._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},g&&(T._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(_=this.performAction.apply(T,[o,c,l,y.yy,b[1],s,r].concat(h))))return _;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[b[1]][0]),s.push(T.$),r.push(T._$),$=a[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},c=function(){return{EOF:1,parseError:u(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:u(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(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:u(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(t){this.unput(this.match.slice(t))},"less"),pastInput:u(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:u(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:u(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:u(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var t=this.next();return t||this.lex()},"lex"),begin:u(function(t){this.conditionStack.push(t)},"begin"),popState:u(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(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:u(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:u(function(t){this.begin(t)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function h(){this.yy={}}return l.lexer=c,u(h,"Parser"),h.prototype=l,l.Parser=h,new h}();m.parser=m;var x=m,k="",b=[],_=[],w=[],v=u(function(){b.length=0,_.length=0,k="",w.length=0,f()},"clear"),$=u(function(t){k=t,b.push(t)},"addSection"),M=u(function(){return b},"getSections"),T=u(function(){let t=E();let e=0;for(;!t&&e<100;)t=E(),e++;return _.push(...w),_},"getTasks"),j=u(function(){const t=[];_.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),S=u(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),C=u(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};_.push(e)},"addTaskOrg"),E=u(function(){const t=u(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),A=u(function(){return j()},"getActors"),P={getConfig:u(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:c,setAccTitle:l,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:$,getSections:M,getTasks:T,addTask:S,addTaskOrg:C,getActors:A},I=u(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),F=u(function(t,e){return s(t,e)},"drawRect"),B=u(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){const i=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),u(r,"smile"),u(a,"sad"),u(o,"ambivalent"),e.score>3?r(s):e.score<3?a(s):o(s),i},"drawFace"),V=u(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),L=u(function(t,e){return i(t,e)},"drawText"),R=u(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}u(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,L(t,e)},"drawLabel"),D=u(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,F(s,r),Y(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),O=-1,N=u(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");O++;a.append("line").attr("id",s+"-task"+O).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,F(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};V(a,i),l+=10}),Y(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=u(function(t,n){e(t,n)},"drawBackgroundRect"),Y=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){const l=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",n+r/2).attr("dy",l).text(p[t]),y.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return u(t,"byText"),u(e,"byTspan"),u(n,"byFo"),u(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),q={drawRect:F,drawCircle:V,drawSection:D,drawText:L,drawLabel:R,drawTask:N,drawBackgroundRect:z,initGraphics:u(function(t,e){O=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},W=u(function(t){Object.keys(t).forEach(function(e){Z[e]=t[e]})},"setConf"),G={},X=0;function U(t){const e=p().journey,n=e.maxLabelWidth;X=0;let i=60;Object.keys(G).forEach(s=>{const r=G[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:G[s].position};q.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=q.drawText(t,r).node().getBoundingClientRect().width;a>X&&a>e.leftMargin-a&&(X=a)}),i+=Math.max(20,20*c.length)})}u(U,"drawActorLegend");var Z=p().journey,H=0,J=u(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");K.init();const u=h.select("#"+e);q.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const t in G)delete G[t];let x=0;m.forEach(t=>{G[t]={color:Z.actorColours[x%Z.actorColours.length],position:x},x++}),U(u),H=Z.leftMargin+X,K.insert(0,0,H,50*Object.keys(G).length),et(u,f,0,e);const k=K.getBounds();g&&u.append("text").text(g).attr("x",H).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const b=k.stopy-k.starty+2*Z.diagramMarginY,_=H+k.stopx+2*Z.diagramMarginX;d(u,b,_,Z.useMaxWidth),u.append("line").attr("x1",H).attr("y1",4*Z.height).attr("x2",_-H-4).attr("y2",4*Z.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${_} ${b+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",b+w+25)},"draw"),K={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:u(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:u(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:u(function(t,e,n,i){const s=p().journey,r=this;let a=0;function o(o){return u(function(l){a++;const c=r.sequenceItems.length-a+1;r.updateVal(l,"starty",e-c*s.boxMargin,Math.min),r.updateVal(l,"stopy",i+c*s.boxMargin,Math.max),r.updateVal(K.data,"startx",t-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==o&&(r.updateVal(l,"startx",t-c*s.boxMargin,Math.min),r.updateVal(l,"stopx",n+c*s.boxMargin,Math.max),r.updateVal(K.data,"starty",e-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}u(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:u(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(K.data,"startx",s,Math.min),this.updateVal(K.data,"starty",a,Math.min),this.updateVal(K.data,"stopx",r,Math.max),this.updateVal(K.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:u(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:u(function(){return this.verticalPos},"getVerticalPos"),getBounds:u(function(){return this.data},"getBounds")},Q=Z.sectionFills,tt=Z.sectionColours,et=u(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[n,u]of e.entries()){if(r!==u.section){l=Q[o%Q.length],h=o%Q.length,c=tt[o%tt.length];let i=0;const a=u.section;for(let t=n;t<e.length&&e[t].section==a;t++)i+=1;const p={x:n*s.taskMargin+n*s.width+H,y:50,text:u.section,fill:l,num:h,colour:c,taskCount:i};q.drawSection(t,p,s),r=u.section,o++}const p=u.people.reduce((t,e)=>(G[e]&&(t[e]=G[e]),t),{});u.x=n*s.taskMargin+n*s.width+H,u.y=a,u.width=s.diagramMarginX,u.height=s.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=p,q.drawTask(t,u,s,i),K.insert(u.x,u.y,u.x+u.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:J},it={parser:x,db:P,renderer:nt,styles:I,init:u(t=>{nt.setConf(t.journey),P.clear()},"init")};export{it as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,l as e,c as n,K as i,a0 as s,a1 as r,a2 as o,Y as a,H as c,i as l,v as h,J as u,V as g,W as d,X as p}from"./mermaid.core-BHSaFUkv.js";import{g as y}from"./chunk-FMBD7UC4-yfeFLPr5.js";import"./index-CDfJgeHe.js";import"react/jsx-runtime";import"react";import"./settings-DgLs6IK_.js";import"./SubmissionDateField-D3AvKusK.js";import"./index-CH9DJEEq.js";import"./enums.js";import"./date-DabTuCYQ.js";import"./time-BPMFfIa-.js";import"./websocket-DCvEZ5Ma.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";var m=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],m=[1,6,13,16,17,20,23],f=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(m,[2,14],{7:f,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:f,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);g.setInput(e,d.yy),d.yy.lexer=g,d.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;o.push(y);var m=g.options&&g.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(f,"lex");for(var b,_,k,E,S,N,x,D,L={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=f()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var I="";for(S in D=[],a[_])this.terminals_[S]&&S>2&&D.push("'"+this.terminals_[S]+"'");I=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(g.yytext),o.push(g.yylloc),i.push(k[1]),b=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(N=this.productions_[k[1]][1],L.$=r[r.length-N],L._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},m&&(L._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(L,[c,h,l,d.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(L.$),o.push(L._$),x=a[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(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:t(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(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:t(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:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();m.parser=m;var f=m,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let t=b.length-1;t>=0;t--)if(b[t].level!==e||n||(n=b[t]),b[t].level<e)throw new Error('Items without section detected, found section ("'+b[t].label+'")');return t===n?.level?null:n},"getSection"),x=t(function(){return _},"getSections"),D=t(function(){const t=[],e=x(),i=n();for(const n of e){const e={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const e of s){const s={id:e.id,parentId:n.id,label:l(e.label??"",i),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),L=t((t,e,i,s,r)=>{const o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case I.ROUNDED_RECT:case I.RECT:case I.HEXAGON:a*=2}const g={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(g.shape=e?.shape),e?.label&&(g.label=e?.label),e?.icon&&(g.icon=e?.icon.toString()),e?.assigned&&(g.assigned=e?.assigned.toString()),e?.ticket&&(g.ticket=e?.ticket.toString()),e?.priority&&(g.priority=e?.priority)}const d=N(t);d?g.parentId=d.id||"kbn"+k++:_.push(g),b.push(g)},"addNode"),I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C={clear:S,addNode:L,getSections:x,getData:D,nodeType:I,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return I.RECT;case"(":return")"===n?I.ROUNDED_RECT:I.CLOUD;case"((":return I.CIRCLE;case")":return I.CLOUD;case"))":return I.BANG;case"{{":return I.HEXAGON;default:return I.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=l(t.icon,e)),t.class&&(i.cssClasses=l(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case I.DEFAULT:return"no-border";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded-rect";case I.CIRCLE:return"circle";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},O={draw:t(async(t,l,h,u)=>{e.debug("Rendering kanban diagram\n"+t);const g=u.db.getData(),d=n();d.htmlLabels=!1;const p=i(l);for(const t of g.nodes)t.domId=`${l}-${t.id}`;const y=p.append("g");y.attr("class","sections");const m=p.append("g");m.attr("class","items");const f=g.nodes.filter(t=>t.isGroup);let b=0;const _=[];let k=25;for(const t of f){const e=d?.kanban?.sectionWidth||200;b+=1,t.x=e*b+10*(b-1)/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+b;const n=await s(y,t);k=Math.max(k,n?.labelBBox?.height),_.push(n)}let E=0;for(const t of f){const e=_[E];E+=1;const n=d?.kanban?.sectionWidth||200,i=3*-n/2+k;let s=i;const a=g.nodes.filter(e=>e.parentId===t.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=n-15;const i=(await r(m,e,{config:d})).node().getBBox();e.y=s+i.height/2,await o(e),s=e.y+i.height/2+5}const c=e.cluster.select("rect"),l=Math.max(s-i+30,50)+(k-25);c.attr("height",l)}a(void 0,p,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},"draw")},v=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],g(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):d(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:C,renderer:O,parser:f,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${v(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,G as n,v as r}from"./graph-Bh_6Hxf_.js";import{a as t,k as o,n as i,o as a,p as u,q as d,t as c,r as s,c as f,u as h,v as g,m as v}from"./_baseIteratee-DJNkOVK7.js";import{f as l,b as p,a as w,m}from"./min-Dc9VrJ6M.js";import{b,m as y}from"./map-BvlAjF4J.js";import{i as x}from"./isUndefined-DgmxjSXK.js";import{J as k,K as E,x as O,L as N,k as _,E as I,a as j,D as P,N as R,e as M,d as T,I as L,w as C,c as S,o as G,z as F,O as V}from"./memoize-CPUrcYQl.js";import{t as q}from"./toNumber-Bh_HTlSx.js";import{c as B,b as Y,f as z,r as D}from"./_baseUniq-BJKKUJ6e.js";import{i as A}from"./isSymbol-CATEdeai.js";var J=1/0;function U(e){return e?(e=q(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function K(n){return e(n,5)}var Z=Object.prototype,$=Z.hasOwnProperty,H=O(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&N(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],a=_(i),u=-1,d=a.length;++u<d;){var c=a[u],s=e[c];(void 0===s||I(s,Z[c])&&!$.call(e,c))&&(e[c]=i[c])}return e});function Q(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}var W=Math.max;var X,ee=(X=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i,a,u=null==r?0:(i=U(r),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=W(o+u,0)),B(e,t(n),u)},function(e,n,r){var i=Object(e);if(!j(e)){var a=t(n);e=o(e),n=function(e){return a(i[e],e,i)}}var u=X(e,n,r);return u>-1?i[a?e[u]:u]:void 0});function ne(e,n){return e>n}var re=Object.prototype.hasOwnProperty;function te(e,n){return null!=e&&re.call(e,n)}function oe(e,n){return null!=e&&u(e,n,te)}function ie(e,n){var r={};return n=t(n),a(e,function(e,t,o){R(r,t,n(e,t,o))}),r}function ae(e){return e&&e.length?p(e,M,ne):void 0}function ue(e,n){return e&&e.length?p(e,t(n),w):void 0}function de(e,n,r,t){if(!T(e))return e;for(var o=-1,i=(n=d(n,e)).length,a=i-1,u=e;null!=u&&++o<i;){var s=c(n[o]),f=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=a){var h=u[s];void 0===(f=void 0)&&(f=T(h)?h:L(n[o+1])?[]:{})}C(u,s,f),u=u[s]}return e}function ce(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=A(e),a=void 0!==n,u=null===n,d=n==n,c=A(n);if(!u&&!c&&!i&&e>n||i&&a&&d&&!u&&!c||t&&a&&d||!r&&d||!o)return 1;if(!t&&!i&&!c&&e<n||c&&r&&o&&!t&&!i||u&&r&&o||!a&&o||!d)return-1}return 0}function se(e,n,r){n=n.length?f(n,function(e){return S(e)?function(n){return s(n,1===e.length?e[0]:e)}:e}):[M];var o=-1;return n=f(n,G(t)),function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}(b(e,function(e,r,t){return{criteria:f(n,function(n){return n(e)}),index:++o,value:e}}),function(e,n){return function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,a=o.length,u=r.length;++t<a;){var d=ce(o[t],i[t]);if(d)return t>=u?d:d*("desc"==r[t]?-1:1)}return e.index-n.index}(e,n,r)})}function fe(e,n){return function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var a=n[t],u=s(e,a);r(u,a)&&de(i,d(a,e),u)}return i}(e,n,function(n,r){return h(e,r)})}var he,ge=k(E(he=function(e,n){return null==e?{}:fe(e,n)},void 0,l),he+""),ve=Math.ceil,le=Math.max;var pe=function(e,n,r){return r&&"number"!=typeof r&&N(e,n,r)&&(n=r=void 0),e=U(e),void 0===n?(n=e,e=0):n=U(n),function(e,n,r){for(var t=-1,o=le(ve((n-e)/(r||1)),0),i=Array(o);o--;)i[++t]=e,e+=r;return i}(e,n,r=void 0===r?e<n?1:-1:U(r))},we=O(function(e,n){if(null==e)return[];var r=n.length;return r>1&&N(e,n[0],n[1])?n=[]:r>2&&N(n[0],n[1],n[2])&&(n=[n[0]]),se(e,Y(n),[])}),me=0;function be(e){var n=++me;return g(e)+n}class ye{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return xe(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&xe(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,ke)),r=r._prev;return"["+e.join(", ")+"]"}}function xe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ke(e,n){if("_next"!==e&&"_prev"!==e)return n}var Ee=F(1);function Oe(e,r){if(e.nodeCount()<=1)return[];var t=function(e,r){var t=new n,o=0,i=0;v(e.nodes(),function(e){t.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var n=t.edge(e.v,e.w)||0,a=r(e),u=n+a;t.setEdge(e.v,e.w,u),i=Math.max(i,t.node(e.v).out+=a),o=Math.max(o,t.node(e.w).in+=a)});var a=pe(i+o+3).map(function(){return new ye}),u=o+1;return v(t.nodes(),function(e){_e(a,u,t.node(e))}),{graph:t,buckets:a,zeroIdx:u}}(e,r||Ee),o=function(e,n,r){var t,o=[],i=n[n.length-1],a=n[0];for(;e.nodeCount();){for(;t=a.dequeue();)Ne(e,n,r,t);for(;t=i.dequeue();)Ne(e,n,r,t);if(e.nodeCount())for(var u=n.length-2;u>0;--u)if(t=n[u].dequeue()){o=o.concat(Ne(e,n,r,t,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return l(y(o,function(n){return e.outEdges(n.v,n.w)}))}function Ne(e,n,r,t,o){var i=o?[]:void 0;return v(e.inEdges(t.v),function(t){var a=e.edge(t),u=e.node(t.v);o&&i.push({v:t.v,w:t.w}),u.out-=a,_e(n,r,u)}),v(e.outEdges(t.v),function(t){var o=e.edge(t),i=t.w,a=e.node(i);a.in-=o,_e(n,r,a)}),e.removeNode(t.v),i}function _e(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Ie(e){var n="greedy"===e.graph().acyclicer?Oe(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},t={};function o(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,v(e.outEdges(i),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):o(e.w)}),delete r[i])}return v(e.nodes(),o),n}(e);v(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,be("rev"))})}function je(e,n,r,t){var o;do{o=be(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function Pe(e){var r=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||r.setNode(n,e.node(n))}),v(e.edges(),function(n){r.setEdge(n,e.edge(n))}),r}function Re(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,u=n.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,t=c):(a<0&&(d=-d),r=d,t=d*u/a),{x:o+r,y:i+t}}function Me(e){var n=y(pe(Le(e)+1),function(){return[]});return v(e.nodes(),function(r){var t=e.node(r),o=t.rank;x(o)||(n[o][t.order]=r)}),n}function Te(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),je(e,"border",o,n)}function Le(e){return ae(y(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ce(e,n){return n()}function Se(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},u=o[n][i-1],d=je(e,"border",a,r);o[n][i]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function Ge(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){v(e.nodes(),function(n){qe(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,qe),Object.prototype.hasOwnProperty.call(r,"y")&&qe(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){v(e.nodes(),function(n){Be(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,Be),Object.prototype.hasOwnProperty.call(r,"x")&&Be(r)})}(e),Fe(e))}function Fe(e){v(e.nodes(),function(n){Ve(e.node(n))}),v(e.edges(),function(n){Ve(e.edge(n))})}function Ve(e){var n=e.width;e.width=e.height,e.height=n}function qe(e){e.y=-e.y}function Be(e){var n=e.x;e.x=e.y,e.y=n}function Ye(e){e.graph().dummyChains=[],v(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(i===t+1)return;e.removeEdge(n);var c,s,f=void 0;for(s=0,++t;t<i;++s,++t)u.points=[],c=je(e,"edge",f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),0===s&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,o,{weight:u.weight},a)}(e,n)})}function ze(e){var n={};v(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=m(y(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function De(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ae(e){var r,t,o=new n({directed:!1}),i=e.nodes()[0],a=e.nodeCount();for(o.setNode(i,{});Je(o,e)<a;)r=Ue(o,e),t=o.hasNode(r.v)?De(e,r):-De(e,r),Ke(o,e,t);return o}function Je(e,n){return v(e.nodes(),function r(t){v(n.nodeEdges(t),function(o){var i=o.v,a=t===i?o.w:i;e.hasNode(a)||De(n,o)||(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}),e.nodeCount()}function Ue(e,n){return ue(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return De(n,r)})}function Ke(e,n,r){v(e.nodes(),function(e){n.node(e).rank+=r})}function Ze(e,n,r){S(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return v(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);$e(e,n,"post"===r,i,t,o)}),o}function $e(e,n,r,t,o,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),v(o(n),function(n){$e(e,n,r,t,o,i)}),r&&i.push(n))}function He(e){e=function(e){var r=(new n).setGraph(e.graph());return v(e.nodes(),function(n){r.setNode(n,e.node(n))}),v(e.edges(),function(n){var t=r.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);r.setEdge(n.v,n.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),r}(e),ze(e);var r,t=Ae(e);for(Xe(t),Qe(t,e);r=nn(t);)tn(t,e,r,rn(t,e,r))}function Qe(e,n){var r=function(e,n){return Ze(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),v(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=We(e,n,r)}(e,n,r)})}function We(e,n,r){var t=e.node(r).parent,o=!0,i=n.edge(r,t),a=0;return i||(o=!1,i=n.edge(t,r)),a=i.weight,v(n.nodeEdges(r),function(i){var u,d,c=i.v===r,s=c?i.w:i.v;if(s!==t){var f=c===o,h=n.edge(i).weight;if(a+=f?h:-h,u=r,d=s,e.hasEdge(u,d)){var g=e.edge(r,s).cutvalue;a+=f?-g:g}}}),a}function Xe(e,n){arguments.length<2&&(n=e.nodes()[0]),en(e,{},1,n)}function en(e,n,r,t,o){var i=r,a=e.node(t);return n[t]=!0,v(e.neighbors(t),function(o){Object.prototype.hasOwnProperty.call(n,o)||(r=en(e,n,r,o,t))}),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function nn(e){return ee(e.edges(),function(n){return e.edge(n).cutvalue<0})}function rn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),a=e.node(o),u=i,d=!1;i.lim>a.lim&&(u=a,d=!0);var c=z(n.edges(),function(n){return d===on(e,e.node(n.v),u)&&d!==on(e,e.node(n.w),u)});return ue(c,function(e){return De(n,e)})}function tn(e,n,r,t){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(t.v,t.w,{}),Xe(e),Qe(e,n),function(e,n){var r=ee(e.nodes(),function(e){return!n.node(e).parent}),t=function(e,n){return Ze(e,n,"pre")}(e,r);t=t.slice(1),v(t,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function on(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function an(e){switch(e.graph().ranker){case"network-simplex":default:dn(e);break;case"tight-tree":!function(e){ze(e),Ae(e)}(e);break;case"longest-path":un(e)}}new Error,He.initLowLimValues=Xe,He.initCutValues=Qe,He.calcCutValue=We,He.leaveEdge=nn,He.enterEdge=rn,He.exchangeEdges=tn;var un=ze;function dn(e){He(e)}function cn(e){var n=je(e,"root",{},"_root"),t=function(e){var n={};function r(t,o){var i=e.children(t);i&&i.length&&v(i,function(e){r(e,o+1)}),n[t]=o}return v(e.children(),function(e){r(e,1)}),n}(e),o=ae(r(t))-1,i=2*o+1;e.graph().nestingRoot=n,v(e.edges(),function(n){e.edge(n).minlen*=i});var a=function(e){return D(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;v(e.children(),function(r){sn(e,n,i,a,o,t,r)}),e.graph().nodeRankFactor=i}function sn(e,n,r,t,o,i,a){var u=e.children(a);if(u.length){var d=Te(e,"_bt"),c=Te(e,"_bb"),s=e.node(a);e.setParent(d,a),s.borderTop=d,e.setParent(c,a),s.borderBottom=c,v(u,function(u){sn(e,n,r,t,o,i,u);var s=e.node(u),f=s.borderTop?s.borderTop:u,h=s.borderBottom?s.borderBottom:u,g=s.borderTop?t:2*t,v=f!==h?1:o-i[a]+1;e.setEdge(d,f,{weight:g,minlen:v,nestingEdge:!0}),e.setEdge(h,c,{weight:g,minlen:v,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:o+i[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}function fn(e,r,t){var o=function(e){var n;for(;e.hasNode(n=be("_root")););return n}(e),i=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return v(e.nodes(),function(n){var a=e.node(n),u=e.parent(n);(a.rank===r||a.minRank<=r&&r<=a.maxRank)&&(i.setNode(n),i.setParent(n,u||o),v(e[t](n),function(r){var t=r.v===n?r.w:r.v,o=i.edge(t,n),a=x(o)?0:o.weight;i.setEdge(t,n,{weight:e.edge(r).weight+a})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(n,{borderLeft:a.borderLeft[r],borderRight:a.borderRight[r]}))}),i}function hn(e,n){for(var r=0,t=1;t<n.length;++t)r+=gn(e,n[t-1],n[t]);return r}function gn(e,n,r){for(var t=function(e,n){return function(e,n,r){for(var t=-1,o=e.length,i=n.length,a={};++t<o;){var u=t<i?n[t]:void 0;r(a,e[t],u)}return a}(e||[],n||[],C)}(r,y(r,function(e,n){return n})),o=l(y(n,function(n){return we(y(e.outEdges(n),function(n){return{pos:t[n.w],weight:e.edge(n).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var u=y(new Array(a),function(){return 0}),d=0;return v(o.forEach(function(e){var n=e.pos+i;u[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=u[n+1]),u[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function vn(e,n){var r={};return v(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};x(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(n.edges(),function(e){var n=r[e.v],t=r[e.w];x(n)||x(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(x(n.barycenter)||x(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function t(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();n.push(o),v(o.in.reverse(),r(o)),v(o.out,t(o))}return y(z(n,function(e){return!e.merged}),function(e){return ge(e,["vs","i","barycenter","weight"])})}(z(r,function(e){return!e.indegree}))}function ln(e,n){var r,t=function(e,n){var r={lhs:[],rhs:[]};return v(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),o=t.lhs,i=we(t.rhs,function(e){return-e.i}),a=[],u=0,d=0,c=0;o.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),c=pn(a,i,c),v(o,function(e){c+=e.vs.length,a.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,c=pn(a,i,c)});var s={vs:l(a)};return d&&(s.barycenter=u/d,s.weight=d),s}function pn(e,n,r){for(var t;n.length&&(t=Q(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function wn(e,n,r,t){var o=e.children(n),i=e.node(n),a=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};a&&(o=z(o,function(e){return e!==a&&e!==u}));var c=function(e,n){return y(n,function(n){var r=e.inEdges(n);if(r.length){var t=D(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,o);v(c,function(n){if(e.children(n.v).length){var o=wn(e,n.v,r,t);d[n.v]=o,Object.prototype.hasOwnProperty.call(o,"barycenter")&&(a=o,x((i=n).barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a});var s=vn(c,r);!function(e,n){v(e,function(e){e.vs=l(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(s,d);var f=ln(s,t);if(a&&(f.vs=l([a,f.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),g=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+g.order)/(f.weight+2),f.weight+=2}return f}function mn(e){var n=Le(e),r=bn(e,pe(1,n+1),"inEdges"),t=bn(e,pe(n-1,-1,-1),"outEdges"),o=function(e){var n={},r=z(e.nodes(),function(n){return!e.children(n).length}),t=ae(y(r,function(n){return e.node(n).rank})),o=y(pe(t+1),function(){return[]}),i=we(r,function(n){return e.node(n).rank});return v(i,function r(t){if(!oe(n,t)){n[t]=!0;var i=e.node(t);o[i.rank].push(t),v(e.successors(t),r)}}),o}(e);xn(e,o);for(var i,a=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){yn(u%2?r:t,u%4>=2);var c=hn(e,o=Me(e));c<a&&(d=0,i=K(o),a=c)}xn(e,i)}function bn(e,n,r){return y(n,function(n){return fn(e,n,r)})}function yn(e,r){var t=new n;v(e,function(e){var n=e.graph().root,o=wn(e,n,t,r);v(o.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var t,o={};v(r,function(r){for(var i,a,u=e.parent(r);u;){if((i=e.parent(u))?(a=o[i],o[i]=u):(a=t,t=u),a&&a!==u)return void n.setEdge(a,u);u=i}})}(e,t,o.vs)})}function xn(e,n){v(n,function(n){v(n,function(n,r){e.node(n).order=r})})}function kn(e){var n=function(e){var n={},r=0;function t(o){var i=r;v(e.children(o),t),n[o]={low:i,lim:r++}}return v(e.children(),t),n}(e);v(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,a=[],u=[],d=Math.min(n[r].low,n[t].low),c=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>d||c>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[d],s=!0;r!==o.w;){if(t=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<t.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=t.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}})}function En(e,n){var r={};return D(n,function(n,t){var o=0,i=0,a=n.length,u=Q(t);return v(t,function(n,d){var c=function(e,n){if(e.node(n).dummy)return ee(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=c?e.node(c).order:a;(c||n===u)&&(v(t.slice(i,d+1),function(n){v(e.predecessors(n),function(t){var i=e.node(t),a=i.order;!(a<o||s<a)||i.dummy&&e.node(n).dummy||On(r,t,n)})}),i=d+1,o=s)}),t}),r}function On(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Nn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function _n(e,r,t,o,i){var a={},u=function(e,r,t,o){var i=new n,a=e.graph(),u=function(e,n,r){return function(t,o,i){var a,u=t.node(o),d=t.node(i),c=0;if(c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=-u.width/2;break;case"r":a=u.width/2}if(a&&(c+=r?a:-a),a=0,c+=(u.dummy?n:e)/2,c+=(d.dummy?n:e)/2,c+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=d.width/2;break;case"r":a=-d.width/2}return a&&(c+=r?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return v(r,function(n){var r;v(n,function(n){var o=t[n];if(i.setNode(o),r){var a=t[r],d=i.edge(a,o);i.setEdge(a,o,Math.max(u(e,n,r),d||0))}r=n})}),i}(e,r,t,i),d=i?"borderLeft":"borderRight";function c(e,n){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return c(function(e){a[e]=u.inEdges(e).reduce(function(e,n){return Math.max(e,a[n.v]+u.edge(n))},0)},u.predecessors.bind(u)),c(function(n){var r=u.outEdges(n).reduce(function(e,n){return Math.min(e,a[n.w]-u.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==d&&(a[n]=Math.max(a[n],r))},u.successors.bind(u)),v(o,function(e){a[e]=a[t[e]]}),a}function In(e,n){return ue(r(n),function(n){var r,t,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return t=function(n,r){var t=function(e,n){return e.node(n).width}(e,r)/2;o=Math.max(n+t,o),a=Math.min(n-t,a)},null==(r=n)||P(r,i(t),_),o-a})}function jn(e){var n,t=Me(e),o=V(En(e,t),function(e,n){var r={};function t(n,t,o,i,a){var u;v(pe(t,o),function(t){u=n[t],e.node(u).dummy&&v(e.predecessors(u),function(n){var t=e.node(n);t.dummy&&(t.order<i||t.order>a)&&On(r,n,u)})})}return D(n,function(n,r){var o,i=-1,a=0;return v(r,function(u,d){if("border"===e.node(u).dummy){var c=e.predecessors(u);c.length&&(o=e.node(c[0]).order,t(r,a,d,i,o),a=d,i=o)}t(r,a,r.length,o,n.length)}),r}),r}(e,t)),i={};v(["u","d"],function(a){n="u"===a?t:r(t).reverse(),v(["l","r"],function(t){"r"===t&&(n=y(n,function(e){return r(e).reverse()}));var u=("u"===a?e.predecessors:e.successors).bind(e),d=function(e,n,r,t){var o={},i={},a={};return v(n,function(e){v(e,function(e,n){o[e]=e,i[e]=e,a[e]=n})}),v(n,function(e){var n=-1;v(e,function(e){var u=t(e);if(u.length){u=we(u,function(e){return a[e]});for(var d=(u.length-1)/2,c=Math.floor(d),s=Math.ceil(d);c<=s;++c){var f=u[c];i[e]===e&&n<a[f]&&!Nn(r,e,f)&&(i[f]=e,i[e]=o[e]=o[f],n=a[f])}}})}),{root:o,align:i}}(0,n,o,u),c=_n(e,n,d.root,d.align,"r"===t);"r"===t&&(c=ie(c,function(e){return-e})),i[a+t]=c})});var a=In(e,i);return function(e,n){var t=r(n),o=m(t),i=ae(t);v(["u","d"],function(t){v(["l","r"],function(a){var u,d=t+a,c=e[d];if(c!==n){var s=r(c);(u="l"===a?o-m(s):i-ae(s))&&(e[d]=ie(c,function(e){return e+u}))}})})}(i,a),function(e,n){return ie(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=we(y(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function Pn(e){var n,r;(function(e){var n=Me(e),r=e.graph().ranksep,t=0;v(n,function(n){var o=ae(y(n,function(n){return e.node(n).height}));v(n,function(n){e.node(n).y=t+o/2}),t+=o+r})})(e=Pe(e)),n=jn(e),r=function(n,r){e.node(r).x=n},n&&a(n,i(r))}function Rn(e,r){var t=Ce;t("layout",()=>{var r=t(" buildLayoutGraph",()=>function(e){var r=new n({multigraph:!0,compound:!0}),t=Bn(e.graph());return r.setGraph(V({},Tn,qn(t,Mn),ge(t,Ln))),v(e.nodes(),function(n){var t=Bn(e.node(n));r.setNode(n,H(qn(t,Cn),Sn)),r.setParent(n,e.parent(n))}),v(e.edges(),function(n){var t=Bn(e.edge(n));r.setEdge(n,V({},Fn,qn(t,Gn),ge(t,Vn)))}),r}(e));t(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,v(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){v(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>Ie(e)),n(" nestingGraph.run",()=>cn(e)),n(" rank",()=>an(Pe(e))),n(" injectEdgeLabelProxies",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};je(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank})),r=[];v(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var t=0,o=e.graph().nodeRankFactor;v(r,function(n,r){x(n)&&r%o!==0?--t:t&&v(n,function(n){e.node(n).rank+=t})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,v(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank}));v(e.nodes(),function(r){var t=e.node(r);oe(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;v(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=ae(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>Ye(e)),n(" parentDummyChains",()=>kn(e)),n(" addBorderSegments",()=>function(e){v(e.children(),function n(r){var t=e.children(r),o=e.node(r);if(t.length&&v(t,n),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)Se(e,"borderLeft","_bl",r,o,i),Se(e,"borderRight","_br",r,o,i)}})}(e)),n(" order",()=>mn(e)),n(" insertSelfEdges",()=>function(e){var n=Me(e);v(n,function(n){var r=0;v(n,function(n,t){var o=e.node(n);o.order=t+r,v(o.selfEdges,function(n){je(e,"selfedge",{width:n.label.width,height:n.label.height,rank:o.rank,order:t+ ++r,e:n.e,label:n.label},"_se")}),delete o.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||Fe(e)}(e)),n(" position",()=>Pn(e)),n(" positionSelfEdges",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,a=r.x-o,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){v(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Q(r.borderLeft)),a=e.node(Q(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),v(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){v(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>Ge(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function d(e){var i=e.x,a=e.y,u=e.width,d=e.height;n=Math.min(n,i-u/2),r=Math.max(r,i+u/2),t=Math.min(t,a-d/2),o=Math.max(o,a+d/2)}v(e.nodes(),function(n){d(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=a,t-=u,v(e.nodes(),function(r){var o=e.node(r);o.x-=n,o.y-=t}),v(e.edges(),function(r){var o=e.edge(r);v(o.points,function(e){e.x-=n,e.y-=t}),Object.prototype.hasOwnProperty.call(o,"x")&&(o.x-=n),Object.prototype.hasOwnProperty.call(o,"y")&&(o.y-=t)}),i.width=r-n+a,i.height=o-t+u}(e)),n(" assignNodeIntersects",()=>function(e){v(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),a=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=a,t=i),o.points.unshift(Re(i,r)),o.points.push(Re(a,t))})}(e)),n(" reversePoints",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(r,t)),t(" updateInputGraph",()=>function(e,n){v(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),v(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,r))})}var Mn=["nodesep","edgesep","ranksep","marginx","marginy"],Tn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ln=["acyclicer","ranker","rankdir","align"],Cn=["width","height"],Sn={width:0,height:0},Gn=["minlen","weight","width","height","labeloffset"],Fn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Vn=["labelpos"];function qn(e,n){return ie(ge(e,n),Number)}function Bn(e){var n={};return v(e,function(e,r){n[r.toLowerCase()]=e}),n}export{Rn as l};
|
|
1
|
+
import{b as e,G as n,v as r}from"./graph-Da_w8zjC.js";import{a as t,k as o,n as i,o as a,p as u,q as d,t as c,r as s,c as f,u as h,v as g,m as v}from"./_baseIteratee-DJNkOVK7.js";import{f as l,b as p,a as w,m}from"./min-Dc9VrJ6M.js";import{b,m as y}from"./map-BvlAjF4J.js";import{i as x}from"./isUndefined-DgmxjSXK.js";import{J as k,K as E,x as O,L as N,k as _,E as I,a as j,D as P,N as R,e as M,d as T,I as L,w as C,c as S,o as G,z as F,O as V}from"./memoize-CPUrcYQl.js";import{t as q}from"./toNumber-Bh_HTlSx.js";import{c as B,b as Y,f as z,r as D}from"./_baseUniq-BJKKUJ6e.js";import{i as A}from"./isSymbol-CATEdeai.js";var J=1/0;function U(e){return e?(e=q(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function K(n){return e(n,5)}var Z=Object.prototype,$=Z.hasOwnProperty,H=O(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&N(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],a=_(i),u=-1,d=a.length;++u<d;){var c=a[u],s=e[c];(void 0===s||I(s,Z[c])&&!$.call(e,c))&&(e[c]=i[c])}return e});function Q(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}var W=Math.max;var X,ee=(X=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i,a,u=null==r?0:(i=U(r),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=W(o+u,0)),B(e,t(n),u)},function(e,n,r){var i=Object(e);if(!j(e)){var a=t(n);e=o(e),n=function(e){return a(i[e],e,i)}}var u=X(e,n,r);return u>-1?i[a?e[u]:u]:void 0});function ne(e,n){return e>n}var re=Object.prototype.hasOwnProperty;function te(e,n){return null!=e&&re.call(e,n)}function oe(e,n){return null!=e&&u(e,n,te)}function ie(e,n){var r={};return n=t(n),a(e,function(e,t,o){R(r,t,n(e,t,o))}),r}function ae(e){return e&&e.length?p(e,M,ne):void 0}function ue(e,n){return e&&e.length?p(e,t(n),w):void 0}function de(e,n,r,t){if(!T(e))return e;for(var o=-1,i=(n=d(n,e)).length,a=i-1,u=e;null!=u&&++o<i;){var s=c(n[o]),f=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=a){var h=u[s];void 0===(f=void 0)&&(f=T(h)?h:L(n[o+1])?[]:{})}C(u,s,f),u=u[s]}return e}function ce(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=A(e),a=void 0!==n,u=null===n,d=n==n,c=A(n);if(!u&&!c&&!i&&e>n||i&&a&&d&&!u&&!c||t&&a&&d||!r&&d||!o)return 1;if(!t&&!i&&!c&&e<n||c&&r&&o&&!t&&!i||u&&r&&o||!a&&o||!d)return-1}return 0}function se(e,n,r){n=n.length?f(n,function(e){return S(e)?function(n){return s(n,1===e.length?e[0]:e)}:e}):[M];var o=-1;return n=f(n,G(t)),function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}(b(e,function(e,r,t){return{criteria:f(n,function(n){return n(e)}),index:++o,value:e}}),function(e,n){return function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,a=o.length,u=r.length;++t<a;){var d=ce(o[t],i[t]);if(d)return t>=u?d:d*("desc"==r[t]?-1:1)}return e.index-n.index}(e,n,r)})}function fe(e,n){return function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var a=n[t],u=s(e,a);r(u,a)&&de(i,d(a,e),u)}return i}(e,n,function(n,r){return h(e,r)})}var he,ge=k(E(he=function(e,n){return null==e?{}:fe(e,n)},void 0,l),he+""),ve=Math.ceil,le=Math.max;var pe=function(e,n,r){return r&&"number"!=typeof r&&N(e,n,r)&&(n=r=void 0),e=U(e),void 0===n?(n=e,e=0):n=U(n),function(e,n,r){for(var t=-1,o=le(ve((n-e)/(r||1)),0),i=Array(o);o--;)i[++t]=e,e+=r;return i}(e,n,r=void 0===r?e<n?1:-1:U(r))},we=O(function(e,n){if(null==e)return[];var r=n.length;return r>1&&N(e,n[0],n[1])?n=[]:r>2&&N(n[0],n[1],n[2])&&(n=[n[0]]),se(e,Y(n),[])}),me=0;function be(e){var n=++me;return g(e)+n}class ye{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return xe(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&xe(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,ke)),r=r._prev;return"["+e.join(", ")+"]"}}function xe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ke(e,n){if("_next"!==e&&"_prev"!==e)return n}var Ee=F(1);function Oe(e,r){if(e.nodeCount()<=1)return[];var t=function(e,r){var t=new n,o=0,i=0;v(e.nodes(),function(e){t.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var n=t.edge(e.v,e.w)||0,a=r(e),u=n+a;t.setEdge(e.v,e.w,u),i=Math.max(i,t.node(e.v).out+=a),o=Math.max(o,t.node(e.w).in+=a)});var a=pe(i+o+3).map(function(){return new ye}),u=o+1;return v(t.nodes(),function(e){_e(a,u,t.node(e))}),{graph:t,buckets:a,zeroIdx:u}}(e,r||Ee),o=function(e,n,r){var t,o=[],i=n[n.length-1],a=n[0];for(;e.nodeCount();){for(;t=a.dequeue();)Ne(e,n,r,t);for(;t=i.dequeue();)Ne(e,n,r,t);if(e.nodeCount())for(var u=n.length-2;u>0;--u)if(t=n[u].dequeue()){o=o.concat(Ne(e,n,r,t,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return l(y(o,function(n){return e.outEdges(n.v,n.w)}))}function Ne(e,n,r,t,o){var i=o?[]:void 0;return v(e.inEdges(t.v),function(t){var a=e.edge(t),u=e.node(t.v);o&&i.push({v:t.v,w:t.w}),u.out-=a,_e(n,r,u)}),v(e.outEdges(t.v),function(t){var o=e.edge(t),i=t.w,a=e.node(i);a.in-=o,_e(n,r,a)}),e.removeNode(t.v),i}function _e(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Ie(e){var n="greedy"===e.graph().acyclicer?Oe(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},t={};function o(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,v(e.outEdges(i),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):o(e.w)}),delete r[i])}return v(e.nodes(),o),n}(e);v(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,be("rev"))})}function je(e,n,r,t){var o;do{o=be(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function Pe(e){var r=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||r.setNode(n,e.node(n))}),v(e.edges(),function(n){r.setEdge(n,e.edge(n))}),r}function Re(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,u=n.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,t=c):(a<0&&(d=-d),r=d,t=d*u/a),{x:o+r,y:i+t}}function Me(e){var n=y(pe(Le(e)+1),function(){return[]});return v(e.nodes(),function(r){var t=e.node(r),o=t.rank;x(o)||(n[o][t.order]=r)}),n}function Te(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),je(e,"border",o,n)}function Le(e){return ae(y(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ce(e,n){return n()}function Se(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},u=o[n][i-1],d=je(e,"border",a,r);o[n][i]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function Ge(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){v(e.nodes(),function(n){qe(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,qe),Object.prototype.hasOwnProperty.call(r,"y")&&qe(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){v(e.nodes(),function(n){Be(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,Be),Object.prototype.hasOwnProperty.call(r,"x")&&Be(r)})}(e),Fe(e))}function Fe(e){v(e.nodes(),function(n){Ve(e.node(n))}),v(e.edges(),function(n){Ve(e.edge(n))})}function Ve(e){var n=e.width;e.width=e.height,e.height=n}function qe(e){e.y=-e.y}function Be(e){var n=e.x;e.x=e.y,e.y=n}function Ye(e){e.graph().dummyChains=[],v(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(i===t+1)return;e.removeEdge(n);var c,s,f=void 0;for(s=0,++t;t<i;++s,++t)u.points=[],c=je(e,"edge",f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),0===s&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,o,{weight:u.weight},a)}(e,n)})}function ze(e){var n={};v(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=m(y(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function De(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ae(e){var r,t,o=new n({directed:!1}),i=e.nodes()[0],a=e.nodeCount();for(o.setNode(i,{});Je(o,e)<a;)r=Ue(o,e),t=o.hasNode(r.v)?De(e,r):-De(e,r),Ke(o,e,t);return o}function Je(e,n){return v(e.nodes(),function r(t){v(n.nodeEdges(t),function(o){var i=o.v,a=t===i?o.w:i;e.hasNode(a)||De(n,o)||(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}),e.nodeCount()}function Ue(e,n){return ue(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return De(n,r)})}function Ke(e,n,r){v(e.nodes(),function(e){n.node(e).rank+=r})}function Ze(e,n,r){S(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return v(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);$e(e,n,"post"===r,i,t,o)}),o}function $e(e,n,r,t,o,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),v(o(n),function(n){$e(e,n,r,t,o,i)}),r&&i.push(n))}function He(e){e=function(e){var r=(new n).setGraph(e.graph());return v(e.nodes(),function(n){r.setNode(n,e.node(n))}),v(e.edges(),function(n){var t=r.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);r.setEdge(n.v,n.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),r}(e),ze(e);var r,t=Ae(e);for(Xe(t),Qe(t,e);r=nn(t);)tn(t,e,r,rn(t,e,r))}function Qe(e,n){var r=function(e,n){return Ze(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),v(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=We(e,n,r)}(e,n,r)})}function We(e,n,r){var t=e.node(r).parent,o=!0,i=n.edge(r,t),a=0;return i||(o=!1,i=n.edge(t,r)),a=i.weight,v(n.nodeEdges(r),function(i){var u,d,c=i.v===r,s=c?i.w:i.v;if(s!==t){var f=c===o,h=n.edge(i).weight;if(a+=f?h:-h,u=r,d=s,e.hasEdge(u,d)){var g=e.edge(r,s).cutvalue;a+=f?-g:g}}}),a}function Xe(e,n){arguments.length<2&&(n=e.nodes()[0]),en(e,{},1,n)}function en(e,n,r,t,o){var i=r,a=e.node(t);return n[t]=!0,v(e.neighbors(t),function(o){Object.prototype.hasOwnProperty.call(n,o)||(r=en(e,n,r,o,t))}),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function nn(e){return ee(e.edges(),function(n){return e.edge(n).cutvalue<0})}function rn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),a=e.node(o),u=i,d=!1;i.lim>a.lim&&(u=a,d=!0);var c=z(n.edges(),function(n){return d===on(e,e.node(n.v),u)&&d!==on(e,e.node(n.w),u)});return ue(c,function(e){return De(n,e)})}function tn(e,n,r,t){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(t.v,t.w,{}),Xe(e),Qe(e,n),function(e,n){var r=ee(e.nodes(),function(e){return!n.node(e).parent}),t=function(e,n){return Ze(e,n,"pre")}(e,r);t=t.slice(1),v(t,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function on(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function an(e){switch(e.graph().ranker){case"network-simplex":default:dn(e);break;case"tight-tree":!function(e){ze(e),Ae(e)}(e);break;case"longest-path":un(e)}}new Error,He.initLowLimValues=Xe,He.initCutValues=Qe,He.calcCutValue=We,He.leaveEdge=nn,He.enterEdge=rn,He.exchangeEdges=tn;var un=ze;function dn(e){He(e)}function cn(e){var n=je(e,"root",{},"_root"),t=function(e){var n={};function r(t,o){var i=e.children(t);i&&i.length&&v(i,function(e){r(e,o+1)}),n[t]=o}return v(e.children(),function(e){r(e,1)}),n}(e),o=ae(r(t))-1,i=2*o+1;e.graph().nestingRoot=n,v(e.edges(),function(n){e.edge(n).minlen*=i});var a=function(e){return D(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;v(e.children(),function(r){sn(e,n,i,a,o,t,r)}),e.graph().nodeRankFactor=i}function sn(e,n,r,t,o,i,a){var u=e.children(a);if(u.length){var d=Te(e,"_bt"),c=Te(e,"_bb"),s=e.node(a);e.setParent(d,a),s.borderTop=d,e.setParent(c,a),s.borderBottom=c,v(u,function(u){sn(e,n,r,t,o,i,u);var s=e.node(u),f=s.borderTop?s.borderTop:u,h=s.borderBottom?s.borderBottom:u,g=s.borderTop?t:2*t,v=f!==h?1:o-i[a]+1;e.setEdge(d,f,{weight:g,minlen:v,nestingEdge:!0}),e.setEdge(h,c,{weight:g,minlen:v,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:o+i[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}function fn(e,r,t){var o=function(e){var n;for(;e.hasNode(n=be("_root")););return n}(e),i=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return v(e.nodes(),function(n){var a=e.node(n),u=e.parent(n);(a.rank===r||a.minRank<=r&&r<=a.maxRank)&&(i.setNode(n),i.setParent(n,u||o),v(e[t](n),function(r){var t=r.v===n?r.w:r.v,o=i.edge(t,n),a=x(o)?0:o.weight;i.setEdge(t,n,{weight:e.edge(r).weight+a})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(n,{borderLeft:a.borderLeft[r],borderRight:a.borderRight[r]}))}),i}function hn(e,n){for(var r=0,t=1;t<n.length;++t)r+=gn(e,n[t-1],n[t]);return r}function gn(e,n,r){for(var t=function(e,n){return function(e,n,r){for(var t=-1,o=e.length,i=n.length,a={};++t<o;){var u=t<i?n[t]:void 0;r(a,e[t],u)}return a}(e||[],n||[],C)}(r,y(r,function(e,n){return n})),o=l(y(n,function(n){return we(y(e.outEdges(n),function(n){return{pos:t[n.w],weight:e.edge(n).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var u=y(new Array(a),function(){return 0}),d=0;return v(o.forEach(function(e){var n=e.pos+i;u[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=u[n+1]),u[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function vn(e,n){var r={};return v(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};x(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(n.edges(),function(e){var n=r[e.v],t=r[e.w];x(n)||x(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(x(n.barycenter)||x(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function t(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();n.push(o),v(o.in.reverse(),r(o)),v(o.out,t(o))}return y(z(n,function(e){return!e.merged}),function(e){return ge(e,["vs","i","barycenter","weight"])})}(z(r,function(e){return!e.indegree}))}function ln(e,n){var r,t=function(e,n){var r={lhs:[],rhs:[]};return v(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),o=t.lhs,i=we(t.rhs,function(e){return-e.i}),a=[],u=0,d=0,c=0;o.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),c=pn(a,i,c),v(o,function(e){c+=e.vs.length,a.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,c=pn(a,i,c)});var s={vs:l(a)};return d&&(s.barycenter=u/d,s.weight=d),s}function pn(e,n,r){for(var t;n.length&&(t=Q(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function wn(e,n,r,t){var o=e.children(n),i=e.node(n),a=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};a&&(o=z(o,function(e){return e!==a&&e!==u}));var c=function(e,n){return y(n,function(n){var r=e.inEdges(n);if(r.length){var t=D(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,o);v(c,function(n){if(e.children(n.v).length){var o=wn(e,n.v,r,t);d[n.v]=o,Object.prototype.hasOwnProperty.call(o,"barycenter")&&(a=o,x((i=n).barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a});var s=vn(c,r);!function(e,n){v(e,function(e){e.vs=l(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(s,d);var f=ln(s,t);if(a&&(f.vs=l([a,f.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),g=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+g.order)/(f.weight+2),f.weight+=2}return f}function mn(e){var n=Le(e),r=bn(e,pe(1,n+1),"inEdges"),t=bn(e,pe(n-1,-1,-1),"outEdges"),o=function(e){var n={},r=z(e.nodes(),function(n){return!e.children(n).length}),t=ae(y(r,function(n){return e.node(n).rank})),o=y(pe(t+1),function(){return[]}),i=we(r,function(n){return e.node(n).rank});return v(i,function r(t){if(!oe(n,t)){n[t]=!0;var i=e.node(t);o[i.rank].push(t),v(e.successors(t),r)}}),o}(e);xn(e,o);for(var i,a=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){yn(u%2?r:t,u%4>=2);var c=hn(e,o=Me(e));c<a&&(d=0,i=K(o),a=c)}xn(e,i)}function bn(e,n,r){return y(n,function(n){return fn(e,n,r)})}function yn(e,r){var t=new n;v(e,function(e){var n=e.graph().root,o=wn(e,n,t,r);v(o.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var t,o={};v(r,function(r){for(var i,a,u=e.parent(r);u;){if((i=e.parent(u))?(a=o[i],o[i]=u):(a=t,t=u),a&&a!==u)return void n.setEdge(a,u);u=i}})}(e,t,o.vs)})}function xn(e,n){v(n,function(n){v(n,function(n,r){e.node(n).order=r})})}function kn(e){var n=function(e){var n={},r=0;function t(o){var i=r;v(e.children(o),t),n[o]={low:i,lim:r++}}return v(e.children(),t),n}(e);v(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,a=[],u=[],d=Math.min(n[r].low,n[t].low),c=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>d||c>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[d],s=!0;r!==o.w;){if(t=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<t.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=t.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}})}function En(e,n){var r={};return D(n,function(n,t){var o=0,i=0,a=n.length,u=Q(t);return v(t,function(n,d){var c=function(e,n){if(e.node(n).dummy)return ee(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=c?e.node(c).order:a;(c||n===u)&&(v(t.slice(i,d+1),function(n){v(e.predecessors(n),function(t){var i=e.node(t),a=i.order;!(a<o||s<a)||i.dummy&&e.node(n).dummy||On(r,t,n)})}),i=d+1,o=s)}),t}),r}function On(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Nn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function _n(e,r,t,o,i){var a={},u=function(e,r,t,o){var i=new n,a=e.graph(),u=function(e,n,r){return function(t,o,i){var a,u=t.node(o),d=t.node(i),c=0;if(c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=-u.width/2;break;case"r":a=u.width/2}if(a&&(c+=r?a:-a),a=0,c+=(u.dummy?n:e)/2,c+=(d.dummy?n:e)/2,c+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=d.width/2;break;case"r":a=-d.width/2}return a&&(c+=r?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return v(r,function(n){var r;v(n,function(n){var o=t[n];if(i.setNode(o),r){var a=t[r],d=i.edge(a,o);i.setEdge(a,o,Math.max(u(e,n,r),d||0))}r=n})}),i}(e,r,t,i),d=i?"borderLeft":"borderRight";function c(e,n){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return c(function(e){a[e]=u.inEdges(e).reduce(function(e,n){return Math.max(e,a[n.v]+u.edge(n))},0)},u.predecessors.bind(u)),c(function(n){var r=u.outEdges(n).reduce(function(e,n){return Math.min(e,a[n.w]-u.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==d&&(a[n]=Math.max(a[n],r))},u.successors.bind(u)),v(o,function(e){a[e]=a[t[e]]}),a}function In(e,n){return ue(r(n),function(n){var r,t,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return t=function(n,r){var t=function(e,n){return e.node(n).width}(e,r)/2;o=Math.max(n+t,o),a=Math.min(n-t,a)},null==(r=n)||P(r,i(t),_),o-a})}function jn(e){var n,t=Me(e),o=V(En(e,t),function(e,n){var r={};function t(n,t,o,i,a){var u;v(pe(t,o),function(t){u=n[t],e.node(u).dummy&&v(e.predecessors(u),function(n){var t=e.node(n);t.dummy&&(t.order<i||t.order>a)&&On(r,n,u)})})}return D(n,function(n,r){var o,i=-1,a=0;return v(r,function(u,d){if("border"===e.node(u).dummy){var c=e.predecessors(u);c.length&&(o=e.node(c[0]).order,t(r,a,d,i,o),a=d,i=o)}t(r,a,r.length,o,n.length)}),r}),r}(e,t)),i={};v(["u","d"],function(a){n="u"===a?t:r(t).reverse(),v(["l","r"],function(t){"r"===t&&(n=y(n,function(e){return r(e).reverse()}));var u=("u"===a?e.predecessors:e.successors).bind(e),d=function(e,n,r,t){var o={},i={},a={};return v(n,function(e){v(e,function(e,n){o[e]=e,i[e]=e,a[e]=n})}),v(n,function(e){var n=-1;v(e,function(e){var u=t(e);if(u.length){u=we(u,function(e){return a[e]});for(var d=(u.length-1)/2,c=Math.floor(d),s=Math.ceil(d);c<=s;++c){var f=u[c];i[e]===e&&n<a[f]&&!Nn(r,e,f)&&(i[f]=e,i[e]=o[e]=o[f],n=a[f])}}})}),{root:o,align:i}}(0,n,o,u),c=_n(e,n,d.root,d.align,"r"===t);"r"===t&&(c=ie(c,function(e){return-e})),i[a+t]=c})});var a=In(e,i);return function(e,n){var t=r(n),o=m(t),i=ae(t);v(["u","d"],function(t){v(["l","r"],function(a){var u,d=t+a,c=e[d];if(c!==n){var s=r(c);(u="l"===a?o-m(s):i-ae(s))&&(e[d]=ie(c,function(e){return e+u}))}})})}(i,a),function(e,n){return ie(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=we(y(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function Pn(e){var n,r;(function(e){var n=Me(e),r=e.graph().ranksep,t=0;v(n,function(n){var o=ae(y(n,function(n){return e.node(n).height}));v(n,function(n){e.node(n).y=t+o/2}),t+=o+r})})(e=Pe(e)),n=jn(e),r=function(n,r){e.node(r).x=n},n&&a(n,i(r))}function Rn(e,r){var t=Ce;t("layout",()=>{var r=t(" buildLayoutGraph",()=>function(e){var r=new n({multigraph:!0,compound:!0}),t=Bn(e.graph());return r.setGraph(V({},Tn,qn(t,Mn),ge(t,Ln))),v(e.nodes(),function(n){var t=Bn(e.node(n));r.setNode(n,H(qn(t,Cn),Sn)),r.setParent(n,e.parent(n))}),v(e.edges(),function(n){var t=Bn(e.edge(n));r.setEdge(n,V({},Fn,qn(t,Gn),ge(t,Vn)))}),r}(e));t(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,v(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){v(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>Ie(e)),n(" nestingGraph.run",()=>cn(e)),n(" rank",()=>an(Pe(e))),n(" injectEdgeLabelProxies",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};je(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank})),r=[];v(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var t=0,o=e.graph().nodeRankFactor;v(r,function(n,r){x(n)&&r%o!==0?--t:t&&v(n,function(n){e.node(n).rank+=t})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,v(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank}));v(e.nodes(),function(r){var t=e.node(r);oe(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;v(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=ae(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>Ye(e)),n(" parentDummyChains",()=>kn(e)),n(" addBorderSegments",()=>function(e){v(e.children(),function n(r){var t=e.children(r),o=e.node(r);if(t.length&&v(t,n),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)Se(e,"borderLeft","_bl",r,o,i),Se(e,"borderRight","_br",r,o,i)}})}(e)),n(" order",()=>mn(e)),n(" insertSelfEdges",()=>function(e){var n=Me(e);v(n,function(n){var r=0;v(n,function(n,t){var o=e.node(n);o.order=t+r,v(o.selfEdges,function(n){je(e,"selfedge",{width:n.label.width,height:n.label.height,rank:o.rank,order:t+ ++r,e:n.e,label:n.label},"_se")}),delete o.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||Fe(e)}(e)),n(" position",()=>Pn(e)),n(" positionSelfEdges",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,a=r.x-o,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){v(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(Q(r.borderLeft)),a=e.node(Q(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),v(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){v(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>Ge(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function d(e){var i=e.x,a=e.y,u=e.width,d=e.height;n=Math.min(n,i-u/2),r=Math.max(r,i+u/2),t=Math.min(t,a-d/2),o=Math.max(o,a+d/2)}v(e.nodes(),function(n){d(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=a,t-=u,v(e.nodes(),function(r){var o=e.node(r);o.x-=n,o.y-=t}),v(e.edges(),function(r){var o=e.edge(r);v(o.points,function(e){e.x-=n,e.y-=t}),Object.prototype.hasOwnProperty.call(o,"x")&&(o.x-=n),Object.prototype.hasOwnProperty.call(o,"y")&&(o.y-=t)}),i.width=r-n+a,i.height=o-t+u}(e)),n(" assignNodeIntersects",()=>function(e){v(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),a=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=a,t=i),o.points.unshift(Re(i,r)),o.points.push(Re(a,t))})}(e)),n(" reversePoints",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(r,t)),t(" updateInputGraph",()=>function(e,n){v(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),v(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,r))})}var Mn=["nodesep","edgesep","ranksep","marginx","marginy"],Tn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ln=["acyclicer","ranker","rankdir","align"],Cn=["width","height"],Sn={width:0,height:0},Gn=["minlen","weight","width","height","labeloffset"],Fn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Vn=["labelpos"];function qn(e,n){return ie(ge(e,n),Number)}function Bn(e){var n={};return v(e,function(e,r){n[r.toLowerCase()]=e}),n}export{Rn as l};
|