research-copilot 0.1.0
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/LICENSE +21 -0
- package/README.md +190 -0
- package/app/build/icon.icns +0 -0
- package/app/build/icon.ico +0 -0
- package/app/build/icon.png +0 -0
- package/app/out/main/index.mjs +6719 -0
- package/app/out/preload/index.js +141 -0
- package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
- package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
- package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
- package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
- package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
- package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
- package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
- package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
- package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
- package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
- package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
- package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
- package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
- package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
- package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
- package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
- package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
- package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
- package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
- package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
- package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
- package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
- package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
- package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
- package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
- package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
- package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
- package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
- package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
- package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
- package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
- package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
- package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
- package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
- package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
- package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
- package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
- package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
- package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
- package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
- package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
- package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
- package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
- package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
- package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
- package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
- package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
- package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
- package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
- package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
- package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
- package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
- package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
- package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
- package/app/out/renderer/assets/http-BqypyemW.js +79 -0
- package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
- package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
- package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
- package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
- package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
- package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
- package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
- package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
- package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
- package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
- package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
- package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
- package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
- package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
- package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
- package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
- package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
- package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
- package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
- package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
- package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
- package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
- package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
- package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
- package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
- package/app/out/renderer/assets/index-fx307_f1.js +643 -0
- package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
- package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
- package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
- package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
- package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
- package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
- package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
- package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
- package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
- package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
- package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
- package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
- package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
- package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
- package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
- package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
- package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
- package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
- package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
- package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
- package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
- package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
- package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
- package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
- package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
- package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
- package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
- package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
- package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
- package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
- package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
- package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
- package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
- package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
- package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
- package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
- package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
- package/app/out/renderer/assets/r-V7nswm59.js +170 -0
- package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
- package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
- package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
- package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
- package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
- package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
- package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
- package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
- package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
- package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
- package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
- package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
- package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
- package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
- package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
- package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
- package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
- package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
- package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
- package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
- package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
- package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
- package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
- package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
- package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
- package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
- package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
- package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
- package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
- package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
- package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
- package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
- package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
- package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
- package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
- package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
- package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
- package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
- package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
- package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
- package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
- package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
- package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
- package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
- package/app/out/renderer/index.html +13 -0
- package/app/out/skills/community-builtin/README.md +29 -0
- package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
- package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
- package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
- package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
- package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
- package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
- package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
- package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
- package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
- package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
- package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
- package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
- package/app/package.json +77 -0
- package/bin/cli.mjs +56 -0
- package/lib/README.md +145 -0
- package/lib/skills/_generated.ts +13 -0
- package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
- package/lib/skills/builtin/coding/SKILL.md +114 -0
- package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
- package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
- package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
- package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
- package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
- package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
- package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
- package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
- package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
- package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
- package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
- package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
- package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
- package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
- package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
- package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
- package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
- package/lib/skills/builtin/research-grants/SKILL.md +958 -0
- package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
- package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
- package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
- package/lib/skills/builtin/research-grants/references/README.md +285 -0
- package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
- package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
- package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
- package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
- package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
- package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
- package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
- package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
- package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
- package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
- package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
- package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
- package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
- package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
- package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
- package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
- package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
- package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
- package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
- package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
- package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
- package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
- package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
- package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
- package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
- package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
- package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
- package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
- package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
- package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
- package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
- package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
- package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
- package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
- package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
- package/lib/skills/builtin/seaborn/SKILL.md +674 -0
- package/lib/skills/builtin/seaborn/references/examples.md +822 -0
- package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
- package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
- package/lib/skills/data-analysis/SKILL.md +285 -0
- package/lib/skills/generate-skill-content.mjs +58 -0
- package/lib/skills/index.ts +34 -0
- package/lib/skills/loader.ts +452 -0
- package/package.json +62 -0
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
import { a3 as tau, n as getAccDescription, m as setAccDescription, o as getAccTitle, q as setAccTitle, H as getDiagramTitle, J as setDiagramTitle, v as log$1, r as getConfig$1, aM as cleanAndMerge, Z as selectSvgElement, af as parseFontSize, w as configureSvgSize, z as sanitizeText$2, M as clear$1, ab as defaultConfig$2 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
|
|
2
|
+
import { a as arc } from "./arc-J47ePHZ2.js";
|
|
3
|
+
import { o as ordinal } from "./ordinal-DSZU4PqD.js";
|
|
4
|
+
import { a as array } from "./array-DgktLKBx.js";
|
|
5
|
+
import { c as constant } from "./path-Cp2qmpkd.js";
|
|
6
|
+
import "./index-BqDyyRCx.js";
|
|
7
|
+
import "./init-ZxktEp_H.js";
|
|
8
|
+
function descending(a, b) {
|
|
9
|
+
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
10
|
+
}
|
|
11
|
+
function identity(d) {
|
|
12
|
+
return d;
|
|
13
|
+
}
|
|
14
|
+
function pie() {
|
|
15
|
+
var value = identity, sortValues = descending, sort = null, startAngle = constant(0), endAngle = constant(tau), padAngle = constant(0);
|
|
16
|
+
function pie2(data) {
|
|
17
|
+
var i, n = (data = array(data)).length, j, k, sum = 0, index = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), pa = p * (da < 0 ? -1 : 1), v;
|
|
18
|
+
for (i = 0; i < n; ++i) {
|
|
19
|
+
if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
|
|
20
|
+
sum += v;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (sortValues != null) index.sort(function(i2, j2) {
|
|
24
|
+
return sortValues(arcs[i2], arcs[j2]);
|
|
25
|
+
});
|
|
26
|
+
else if (sort != null) index.sort(function(i2, j2) {
|
|
27
|
+
return sort(data[i2], data[j2]);
|
|
28
|
+
});
|
|
29
|
+
for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
|
|
30
|
+
j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
|
|
31
|
+
data: data[j],
|
|
32
|
+
index: i,
|
|
33
|
+
value: v,
|
|
34
|
+
startAngle: a0,
|
|
35
|
+
endAngle: a1,
|
|
36
|
+
padAngle: p
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return arcs;
|
|
40
|
+
}
|
|
41
|
+
pie2.value = function(_) {
|
|
42
|
+
return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie2) : value;
|
|
43
|
+
};
|
|
44
|
+
pie2.sortValues = function(_) {
|
|
45
|
+
return arguments.length ? (sortValues = _, sort = null, pie2) : sortValues;
|
|
46
|
+
};
|
|
47
|
+
pie2.sort = function(_) {
|
|
48
|
+
return arguments.length ? (sort = _, sortValues = null, pie2) : sort;
|
|
49
|
+
};
|
|
50
|
+
pie2.startAngle = function(_) {
|
|
51
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie2) : startAngle;
|
|
52
|
+
};
|
|
53
|
+
pie2.endAngle = function(_) {
|
|
54
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie2) : endAngle;
|
|
55
|
+
};
|
|
56
|
+
pie2.padAngle = function(_) {
|
|
57
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie2) : padAngle;
|
|
58
|
+
};
|
|
59
|
+
return pie2;
|
|
60
|
+
}
|
|
61
|
+
var parser = function() {
|
|
62
|
+
var o = function(k, v, o2, l) {
|
|
63
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
|
64
|
+
;
|
|
65
|
+
return o2;
|
|
66
|
+
}, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V5 = [2, 4], $V6 = [1, 5, 10, 12, 14, 16, 18, 19, 20, 21, 22], $V7 = [20, 21, 22], $V8 = [2, 7], $V9 = [1, 12], $Va = [1, 13], $Vb = [1, 14], $Vc = [1, 15], $Vd = [1, 16], $Ve = [1, 17];
|
|
67
|
+
var parser2 = {
|
|
68
|
+
trace: function trace() {
|
|
69
|
+
},
|
|
70
|
+
yy: {},
|
|
71
|
+
symbols_: { "error": 2, "start": 3, "eol": 4, "PIE": 5, "document": 6, "showData": 7, "line": 8, "statement": 9, "txt": 10, "value": 11, "title": 12, "title_value": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "section": 19, "NEWLINE": 20, ";": 21, "EOF": 22, "$accept": 0, "$end": 1 },
|
|
72
|
+
terminals_: { 2: "error", 5: "PIE", 7: "showData", 10: "txt", 11: "value", 12: "title", 13: "title_value", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "section", 20: "NEWLINE", 21: ";", 22: "EOF" },
|
|
73
|
+
productions_: [0, [3, 2], [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [4, 1], [4, 1], [4, 1]],
|
|
74
|
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
75
|
+
var $0 = $$.length - 1;
|
|
76
|
+
switch (yystate) {
|
|
77
|
+
case 3:
|
|
78
|
+
yy.setShowData(true);
|
|
79
|
+
break;
|
|
80
|
+
case 6:
|
|
81
|
+
this.$ = $$[$0 - 1];
|
|
82
|
+
break;
|
|
83
|
+
case 8:
|
|
84
|
+
yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0]));
|
|
85
|
+
break;
|
|
86
|
+
case 9:
|
|
87
|
+
this.$ = $$[$0].trim();
|
|
88
|
+
yy.setDiagramTitle(this.$);
|
|
89
|
+
break;
|
|
90
|
+
case 10:
|
|
91
|
+
this.$ = $$[$0].trim();
|
|
92
|
+
yy.setAccTitle(this.$);
|
|
93
|
+
break;
|
|
94
|
+
case 11:
|
|
95
|
+
case 12:
|
|
96
|
+
this.$ = $$[$0].trim();
|
|
97
|
+
yy.setAccDescription(this.$);
|
|
98
|
+
break;
|
|
99
|
+
case 13:
|
|
100
|
+
yy.addSection($$[$0].substr(8));
|
|
101
|
+
this.$ = $$[$0].substr(8);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
table: [{ 3: 1, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, { 1: [3] }, { 3: 7, 4: 2, 5: $V0, 20: $V1, 21: $V2, 22: $V3 }, o($V4, $V5, { 6: 8, 7: [1, 9] }), o($V6, [2, 14]), o($V6, [2, 15]), o($V6, [2, 16]), { 1: [2, 1] }, o($V7, $V8, { 8: 10, 9: 11, 1: [2, 2], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, $V5, { 6: 18 }), o($V4, [2, 5]), { 4: 19, 20: $V1, 21: $V2, 22: $V3 }, { 11: [1, 20] }, { 13: [1, 21] }, { 15: [1, 22] }, { 17: [1, 23] }, o($V7, [2, 12]), o($V7, [2, 13]), o($V7, $V8, { 8: 10, 9: 11, 1: [2, 3], 10: $V9, 12: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 19: $Ve }), o($V4, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11])],
|
|
106
|
+
defaultActions: { 7: [2, 1] },
|
|
107
|
+
parseError: function parseError(str, hash) {
|
|
108
|
+
if (hash.recoverable) {
|
|
109
|
+
this.trace(str);
|
|
110
|
+
} else {
|
|
111
|
+
var error = new Error(str);
|
|
112
|
+
error.hash = hash;
|
|
113
|
+
throw error;
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
parse: function parse(input) {
|
|
117
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
|
118
|
+
var args = lstack.slice.call(arguments, 1);
|
|
119
|
+
var lexer2 = Object.create(this.lexer);
|
|
120
|
+
var sharedState = { yy: {} };
|
|
121
|
+
for (var k in this.yy) {
|
|
122
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
123
|
+
sharedState.yy[k] = this.yy[k];
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
lexer2.setInput(input, sharedState.yy);
|
|
127
|
+
sharedState.yy.lexer = lexer2;
|
|
128
|
+
sharedState.yy.parser = this;
|
|
129
|
+
if (typeof lexer2.yylloc == "undefined") {
|
|
130
|
+
lexer2.yylloc = {};
|
|
131
|
+
}
|
|
132
|
+
var yyloc = lexer2.yylloc;
|
|
133
|
+
lstack.push(yyloc);
|
|
134
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
135
|
+
if (typeof sharedState.yy.parseError === "function") {
|
|
136
|
+
this.parseError = sharedState.yy.parseError;
|
|
137
|
+
} else {
|
|
138
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
139
|
+
}
|
|
140
|
+
function lex() {
|
|
141
|
+
var token;
|
|
142
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
|
143
|
+
if (typeof token !== "number") {
|
|
144
|
+
if (token instanceof Array) {
|
|
145
|
+
tstack = token;
|
|
146
|
+
token = tstack.pop();
|
|
147
|
+
}
|
|
148
|
+
token = self.symbols_[token] || token;
|
|
149
|
+
}
|
|
150
|
+
return token;
|
|
151
|
+
}
|
|
152
|
+
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
153
|
+
while (true) {
|
|
154
|
+
state = stack[stack.length - 1];
|
|
155
|
+
if (this.defaultActions[state]) {
|
|
156
|
+
action = this.defaultActions[state];
|
|
157
|
+
} else {
|
|
158
|
+
if (symbol === null || typeof symbol == "undefined") {
|
|
159
|
+
symbol = lex();
|
|
160
|
+
}
|
|
161
|
+
action = table[state] && table[state][symbol];
|
|
162
|
+
}
|
|
163
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
164
|
+
var errStr = "";
|
|
165
|
+
expected = [];
|
|
166
|
+
for (p in table[state]) {
|
|
167
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
168
|
+
expected.push("'" + this.terminals_[p] + "'");
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (lexer2.showPosition) {
|
|
172
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
173
|
+
} else {
|
|
174
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
175
|
+
}
|
|
176
|
+
this.parseError(errStr, {
|
|
177
|
+
text: lexer2.match,
|
|
178
|
+
token: this.terminals_[symbol] || symbol,
|
|
179
|
+
line: lexer2.yylineno,
|
|
180
|
+
loc: yyloc,
|
|
181
|
+
expected
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
185
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
186
|
+
}
|
|
187
|
+
switch (action[0]) {
|
|
188
|
+
case 1:
|
|
189
|
+
stack.push(symbol);
|
|
190
|
+
vstack.push(lexer2.yytext);
|
|
191
|
+
lstack.push(lexer2.yylloc);
|
|
192
|
+
stack.push(action[1]);
|
|
193
|
+
symbol = null;
|
|
194
|
+
{
|
|
195
|
+
yyleng = lexer2.yyleng;
|
|
196
|
+
yytext = lexer2.yytext;
|
|
197
|
+
yylineno = lexer2.yylineno;
|
|
198
|
+
yyloc = lexer2.yylloc;
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
case 2:
|
|
202
|
+
len = this.productions_[action[1]][1];
|
|
203
|
+
yyval.$ = vstack[vstack.length - len];
|
|
204
|
+
yyval._$ = {
|
|
205
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
206
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
207
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
208
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
209
|
+
};
|
|
210
|
+
if (ranges) {
|
|
211
|
+
yyval._$.range = [
|
|
212
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
213
|
+
lstack[lstack.length - 1].range[1]
|
|
214
|
+
];
|
|
215
|
+
}
|
|
216
|
+
r = this.performAction.apply(yyval, [
|
|
217
|
+
yytext,
|
|
218
|
+
yyleng,
|
|
219
|
+
yylineno,
|
|
220
|
+
sharedState.yy,
|
|
221
|
+
action[1],
|
|
222
|
+
vstack,
|
|
223
|
+
lstack
|
|
224
|
+
].concat(args));
|
|
225
|
+
if (typeof r !== "undefined") {
|
|
226
|
+
return r;
|
|
227
|
+
}
|
|
228
|
+
if (len) {
|
|
229
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
230
|
+
vstack = vstack.slice(0, -1 * len);
|
|
231
|
+
lstack = lstack.slice(0, -1 * len);
|
|
232
|
+
}
|
|
233
|
+
stack.push(this.productions_[action[1]][0]);
|
|
234
|
+
vstack.push(yyval.$);
|
|
235
|
+
lstack.push(yyval._$);
|
|
236
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
237
|
+
stack.push(newState);
|
|
238
|
+
break;
|
|
239
|
+
case 3:
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var lexer = /* @__PURE__ */ function() {
|
|
247
|
+
var lexer2 = {
|
|
248
|
+
EOF: 1,
|
|
249
|
+
parseError: function parseError(str, hash) {
|
|
250
|
+
if (this.yy.parser) {
|
|
251
|
+
this.yy.parser.parseError(str, hash);
|
|
252
|
+
} else {
|
|
253
|
+
throw new Error(str);
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
// resets the lexer, sets new input
|
|
257
|
+
setInput: function(input, yy) {
|
|
258
|
+
this.yy = yy || this.yy || {};
|
|
259
|
+
this._input = input;
|
|
260
|
+
this._more = this._backtrack = this.done = false;
|
|
261
|
+
this.yylineno = this.yyleng = 0;
|
|
262
|
+
this.yytext = this.matched = this.match = "";
|
|
263
|
+
this.conditionStack = ["INITIAL"];
|
|
264
|
+
this.yylloc = {
|
|
265
|
+
first_line: 1,
|
|
266
|
+
first_column: 0,
|
|
267
|
+
last_line: 1,
|
|
268
|
+
last_column: 0
|
|
269
|
+
};
|
|
270
|
+
if (this.options.ranges) {
|
|
271
|
+
this.yylloc.range = [0, 0];
|
|
272
|
+
}
|
|
273
|
+
this.offset = 0;
|
|
274
|
+
return this;
|
|
275
|
+
},
|
|
276
|
+
// consumes and returns one char from the input
|
|
277
|
+
input: function() {
|
|
278
|
+
var ch = this._input[0];
|
|
279
|
+
this.yytext += ch;
|
|
280
|
+
this.yyleng++;
|
|
281
|
+
this.offset++;
|
|
282
|
+
this.match += ch;
|
|
283
|
+
this.matched += ch;
|
|
284
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
285
|
+
if (lines) {
|
|
286
|
+
this.yylineno++;
|
|
287
|
+
this.yylloc.last_line++;
|
|
288
|
+
} else {
|
|
289
|
+
this.yylloc.last_column++;
|
|
290
|
+
}
|
|
291
|
+
if (this.options.ranges) {
|
|
292
|
+
this.yylloc.range[1]++;
|
|
293
|
+
}
|
|
294
|
+
this._input = this._input.slice(1);
|
|
295
|
+
return ch;
|
|
296
|
+
},
|
|
297
|
+
// unshifts one char (or a string) into the input
|
|
298
|
+
unput: function(ch) {
|
|
299
|
+
var len = ch.length;
|
|
300
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
301
|
+
this._input = ch + this._input;
|
|
302
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
303
|
+
this.offset -= len;
|
|
304
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
305
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
306
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
307
|
+
if (lines.length - 1) {
|
|
308
|
+
this.yylineno -= lines.length - 1;
|
|
309
|
+
}
|
|
310
|
+
var r = this.yylloc.range;
|
|
311
|
+
this.yylloc = {
|
|
312
|
+
first_line: this.yylloc.first_line,
|
|
313
|
+
last_line: this.yylineno + 1,
|
|
314
|
+
first_column: this.yylloc.first_column,
|
|
315
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
316
|
+
};
|
|
317
|
+
if (this.options.ranges) {
|
|
318
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
319
|
+
}
|
|
320
|
+
this.yyleng = this.yytext.length;
|
|
321
|
+
return this;
|
|
322
|
+
},
|
|
323
|
+
// When called from action, caches matched text and appends it on next action
|
|
324
|
+
more: function() {
|
|
325
|
+
this._more = true;
|
|
326
|
+
return this;
|
|
327
|
+
},
|
|
328
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
329
|
+
reject: function() {
|
|
330
|
+
if (this.options.backtrack_lexer) {
|
|
331
|
+
this._backtrack = true;
|
|
332
|
+
} else {
|
|
333
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
334
|
+
text: "",
|
|
335
|
+
token: null,
|
|
336
|
+
line: this.yylineno
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
return this;
|
|
340
|
+
},
|
|
341
|
+
// retain first n characters of the match
|
|
342
|
+
less: function(n) {
|
|
343
|
+
this.unput(this.match.slice(n));
|
|
344
|
+
},
|
|
345
|
+
// displays already matched input, i.e. for error messages
|
|
346
|
+
pastInput: function() {
|
|
347
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
348
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
349
|
+
},
|
|
350
|
+
// displays upcoming input, i.e. for error messages
|
|
351
|
+
upcomingInput: function() {
|
|
352
|
+
var next = this.match;
|
|
353
|
+
if (next.length < 20) {
|
|
354
|
+
next += this._input.substr(0, 20 - next.length);
|
|
355
|
+
}
|
|
356
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
357
|
+
},
|
|
358
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
359
|
+
showPosition: function() {
|
|
360
|
+
var pre = this.pastInput();
|
|
361
|
+
var c = new Array(pre.length + 1).join("-");
|
|
362
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
363
|
+
},
|
|
364
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
365
|
+
test_match: function(match, indexed_rule) {
|
|
366
|
+
var token, lines, backup;
|
|
367
|
+
if (this.options.backtrack_lexer) {
|
|
368
|
+
backup = {
|
|
369
|
+
yylineno: this.yylineno,
|
|
370
|
+
yylloc: {
|
|
371
|
+
first_line: this.yylloc.first_line,
|
|
372
|
+
last_line: this.last_line,
|
|
373
|
+
first_column: this.yylloc.first_column,
|
|
374
|
+
last_column: this.yylloc.last_column
|
|
375
|
+
},
|
|
376
|
+
yytext: this.yytext,
|
|
377
|
+
match: this.match,
|
|
378
|
+
matches: this.matches,
|
|
379
|
+
matched: this.matched,
|
|
380
|
+
yyleng: this.yyleng,
|
|
381
|
+
offset: this.offset,
|
|
382
|
+
_more: this._more,
|
|
383
|
+
_input: this._input,
|
|
384
|
+
yy: this.yy,
|
|
385
|
+
conditionStack: this.conditionStack.slice(0),
|
|
386
|
+
done: this.done
|
|
387
|
+
};
|
|
388
|
+
if (this.options.ranges) {
|
|
389
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
393
|
+
if (lines) {
|
|
394
|
+
this.yylineno += lines.length;
|
|
395
|
+
}
|
|
396
|
+
this.yylloc = {
|
|
397
|
+
first_line: this.yylloc.last_line,
|
|
398
|
+
last_line: this.yylineno + 1,
|
|
399
|
+
first_column: this.yylloc.last_column,
|
|
400
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
401
|
+
};
|
|
402
|
+
this.yytext += match[0];
|
|
403
|
+
this.match += match[0];
|
|
404
|
+
this.matches = match;
|
|
405
|
+
this.yyleng = this.yytext.length;
|
|
406
|
+
if (this.options.ranges) {
|
|
407
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
408
|
+
}
|
|
409
|
+
this._more = false;
|
|
410
|
+
this._backtrack = false;
|
|
411
|
+
this._input = this._input.slice(match[0].length);
|
|
412
|
+
this.matched += match[0];
|
|
413
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
414
|
+
if (this.done && this._input) {
|
|
415
|
+
this.done = false;
|
|
416
|
+
}
|
|
417
|
+
if (token) {
|
|
418
|
+
return token;
|
|
419
|
+
} else if (this._backtrack) {
|
|
420
|
+
for (var k in backup) {
|
|
421
|
+
this[k] = backup[k];
|
|
422
|
+
}
|
|
423
|
+
return false;
|
|
424
|
+
}
|
|
425
|
+
return false;
|
|
426
|
+
},
|
|
427
|
+
// return next match in input
|
|
428
|
+
next: function() {
|
|
429
|
+
if (this.done) {
|
|
430
|
+
return this.EOF;
|
|
431
|
+
}
|
|
432
|
+
if (!this._input) {
|
|
433
|
+
this.done = true;
|
|
434
|
+
}
|
|
435
|
+
var token, match, tempMatch, index;
|
|
436
|
+
if (!this._more) {
|
|
437
|
+
this.yytext = "";
|
|
438
|
+
this.match = "";
|
|
439
|
+
}
|
|
440
|
+
var rules = this._currentRules();
|
|
441
|
+
for (var i = 0; i < rules.length; i++) {
|
|
442
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
443
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
444
|
+
match = tempMatch;
|
|
445
|
+
index = i;
|
|
446
|
+
if (this.options.backtrack_lexer) {
|
|
447
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
448
|
+
if (token !== false) {
|
|
449
|
+
return token;
|
|
450
|
+
} else if (this._backtrack) {
|
|
451
|
+
match = false;
|
|
452
|
+
continue;
|
|
453
|
+
} else {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
} else if (!this.options.flex) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
if (match) {
|
|
462
|
+
token = this.test_match(match, rules[index]);
|
|
463
|
+
if (token !== false) {
|
|
464
|
+
return token;
|
|
465
|
+
}
|
|
466
|
+
return false;
|
|
467
|
+
}
|
|
468
|
+
if (this._input === "") {
|
|
469
|
+
return this.EOF;
|
|
470
|
+
} else {
|
|
471
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
472
|
+
text: "",
|
|
473
|
+
token: null,
|
|
474
|
+
line: this.yylineno
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
// return next match that has a token
|
|
479
|
+
lex: function lex() {
|
|
480
|
+
var r = this.next();
|
|
481
|
+
if (r) {
|
|
482
|
+
return r;
|
|
483
|
+
} else {
|
|
484
|
+
return this.lex();
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
488
|
+
begin: function begin(condition) {
|
|
489
|
+
this.conditionStack.push(condition);
|
|
490
|
+
},
|
|
491
|
+
// pop the previously active lexer condition state off the condition stack
|
|
492
|
+
popState: function popState() {
|
|
493
|
+
var n = this.conditionStack.length - 1;
|
|
494
|
+
if (n > 0) {
|
|
495
|
+
return this.conditionStack.pop();
|
|
496
|
+
} else {
|
|
497
|
+
return this.conditionStack[0];
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
501
|
+
_currentRules: function _currentRules() {
|
|
502
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
503
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
504
|
+
} else {
|
|
505
|
+
return this.conditions["INITIAL"].rules;
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
509
|
+
topState: function topState(n) {
|
|
510
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
511
|
+
if (n >= 0) {
|
|
512
|
+
return this.conditionStack[n];
|
|
513
|
+
} else {
|
|
514
|
+
return "INITIAL";
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
// alias for begin(condition)
|
|
518
|
+
pushState: function pushState(condition) {
|
|
519
|
+
this.begin(condition);
|
|
520
|
+
},
|
|
521
|
+
// return the number of states currently on the stack
|
|
522
|
+
stateStackSize: function stateStackSize() {
|
|
523
|
+
return this.conditionStack.length;
|
|
524
|
+
},
|
|
525
|
+
options: { "case-insensitive": true },
|
|
526
|
+
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
527
|
+
switch ($avoiding_name_collisions) {
|
|
528
|
+
case 0:
|
|
529
|
+
break;
|
|
530
|
+
case 1:
|
|
531
|
+
break;
|
|
532
|
+
case 2:
|
|
533
|
+
return 20;
|
|
534
|
+
case 3:
|
|
535
|
+
break;
|
|
536
|
+
case 4:
|
|
537
|
+
break;
|
|
538
|
+
case 5:
|
|
539
|
+
this.begin("title");
|
|
540
|
+
return 12;
|
|
541
|
+
case 6:
|
|
542
|
+
this.popState();
|
|
543
|
+
return "title_value";
|
|
544
|
+
case 7:
|
|
545
|
+
this.begin("acc_title");
|
|
546
|
+
return 14;
|
|
547
|
+
case 8:
|
|
548
|
+
this.popState();
|
|
549
|
+
return "acc_title_value";
|
|
550
|
+
case 9:
|
|
551
|
+
this.begin("acc_descr");
|
|
552
|
+
return 16;
|
|
553
|
+
case 10:
|
|
554
|
+
this.popState();
|
|
555
|
+
return "acc_descr_value";
|
|
556
|
+
case 11:
|
|
557
|
+
this.begin("acc_descr_multiline");
|
|
558
|
+
break;
|
|
559
|
+
case 12:
|
|
560
|
+
this.popState();
|
|
561
|
+
break;
|
|
562
|
+
case 13:
|
|
563
|
+
return "acc_descr_multiline_value";
|
|
564
|
+
case 14:
|
|
565
|
+
this.begin("string");
|
|
566
|
+
break;
|
|
567
|
+
case 15:
|
|
568
|
+
this.popState();
|
|
569
|
+
break;
|
|
570
|
+
case 16:
|
|
571
|
+
return "txt";
|
|
572
|
+
case 17:
|
|
573
|
+
return 5;
|
|
574
|
+
case 18:
|
|
575
|
+
return 7;
|
|
576
|
+
case 19:
|
|
577
|
+
return "value";
|
|
578
|
+
case 20:
|
|
579
|
+
return 22;
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:[\s]+)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:pie\b)/i, /^(?:showData\b)/i, /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i, /^(?:$)/i],
|
|
583
|
+
conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "title": { "rules": [6], "inclusive": false }, "string": { "rules": [15, 16], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 7, 9, 11, 14, 17, 18, 19, 20], "inclusive": true } }
|
|
584
|
+
};
|
|
585
|
+
return lexer2;
|
|
586
|
+
}();
|
|
587
|
+
parser2.lexer = lexer;
|
|
588
|
+
function Parser() {
|
|
589
|
+
this.yy = {};
|
|
590
|
+
}
|
|
591
|
+
Parser.prototype = parser2;
|
|
592
|
+
parser2.Parser = Parser;
|
|
593
|
+
return new Parser();
|
|
594
|
+
}();
|
|
595
|
+
parser.parser = parser;
|
|
596
|
+
const parser$1 = parser;
|
|
597
|
+
const DEFAULT_PIE_CONFIG = defaultConfig$2.pie;
|
|
598
|
+
const DEFAULT_PIE_DB = {
|
|
599
|
+
sections: {},
|
|
600
|
+
showData: false
|
|
601
|
+
};
|
|
602
|
+
let sections = DEFAULT_PIE_DB.sections;
|
|
603
|
+
let showData = DEFAULT_PIE_DB.showData;
|
|
604
|
+
const config = structuredClone(DEFAULT_PIE_CONFIG);
|
|
605
|
+
const getConfig = () => structuredClone(config);
|
|
606
|
+
const clear = () => {
|
|
607
|
+
sections = structuredClone(DEFAULT_PIE_DB.sections);
|
|
608
|
+
showData = DEFAULT_PIE_DB.showData;
|
|
609
|
+
clear$1();
|
|
610
|
+
};
|
|
611
|
+
const addSection = (label, value) => {
|
|
612
|
+
label = sanitizeText$2(label, getConfig$1());
|
|
613
|
+
if (sections[label] === void 0) {
|
|
614
|
+
sections[label] = value;
|
|
615
|
+
log$1.debug(`added new section: ${label}, with value: ${value}`);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
const getSections = () => sections;
|
|
619
|
+
const cleanupValue = (value) => {
|
|
620
|
+
if (value.substring(0, 1) === ":") {
|
|
621
|
+
value = value.substring(1).trim();
|
|
622
|
+
}
|
|
623
|
+
return Number(value.trim());
|
|
624
|
+
};
|
|
625
|
+
const setShowData = (toggle) => {
|
|
626
|
+
showData = toggle;
|
|
627
|
+
};
|
|
628
|
+
const getShowData = () => showData;
|
|
629
|
+
const db = {
|
|
630
|
+
getConfig,
|
|
631
|
+
clear,
|
|
632
|
+
setDiagramTitle,
|
|
633
|
+
getDiagramTitle,
|
|
634
|
+
setAccTitle,
|
|
635
|
+
getAccTitle,
|
|
636
|
+
setAccDescription,
|
|
637
|
+
getAccDescription,
|
|
638
|
+
addSection,
|
|
639
|
+
getSections,
|
|
640
|
+
cleanupValue,
|
|
641
|
+
setShowData,
|
|
642
|
+
getShowData
|
|
643
|
+
};
|
|
644
|
+
const getStyles = (options) => `
|
|
645
|
+
.pieCircle{
|
|
646
|
+
stroke: ${options.pieStrokeColor};
|
|
647
|
+
stroke-width : ${options.pieStrokeWidth};
|
|
648
|
+
opacity : ${options.pieOpacity};
|
|
649
|
+
}
|
|
650
|
+
.pieOuterCircle{
|
|
651
|
+
stroke: ${options.pieOuterStrokeColor};
|
|
652
|
+
stroke-width: ${options.pieOuterStrokeWidth};
|
|
653
|
+
fill: none;
|
|
654
|
+
}
|
|
655
|
+
.pieTitleText {
|
|
656
|
+
text-anchor: middle;
|
|
657
|
+
font-size: ${options.pieTitleTextSize};
|
|
658
|
+
fill: ${options.pieTitleTextColor};
|
|
659
|
+
font-family: ${options.fontFamily};
|
|
660
|
+
}
|
|
661
|
+
.slice {
|
|
662
|
+
font-family: ${options.fontFamily};
|
|
663
|
+
fill: ${options.pieSectionTextColor};
|
|
664
|
+
font-size:${options.pieSectionTextSize};
|
|
665
|
+
// fill: white;
|
|
666
|
+
}
|
|
667
|
+
.legend text {
|
|
668
|
+
fill: ${options.pieLegendTextColor};
|
|
669
|
+
font-family: ${options.fontFamily};
|
|
670
|
+
font-size: ${options.pieLegendTextSize};
|
|
671
|
+
}
|
|
672
|
+
`;
|
|
673
|
+
const styles = getStyles;
|
|
674
|
+
const createPieArcs = (sections2) => {
|
|
675
|
+
const pieData = Object.entries(sections2).map((element) => {
|
|
676
|
+
return {
|
|
677
|
+
label: element[0],
|
|
678
|
+
value: element[1]
|
|
679
|
+
};
|
|
680
|
+
}).sort((a, b) => {
|
|
681
|
+
return b.value - a.value;
|
|
682
|
+
});
|
|
683
|
+
const pie$1 = pie().value(
|
|
684
|
+
(d3Section) => d3Section.value
|
|
685
|
+
);
|
|
686
|
+
return pie$1(pieData);
|
|
687
|
+
};
|
|
688
|
+
const draw = (text, id, _version, diagObj) => {
|
|
689
|
+
log$1.debug("rendering pie chart\n" + text);
|
|
690
|
+
const db2 = diagObj.db;
|
|
691
|
+
const globalConfig = getConfig$1();
|
|
692
|
+
const pieConfig = cleanAndMerge(db2.getConfig(), globalConfig.pie);
|
|
693
|
+
const MARGIN = 40;
|
|
694
|
+
const LEGEND_RECT_SIZE = 18;
|
|
695
|
+
const LEGEND_SPACING = 4;
|
|
696
|
+
const height = 450;
|
|
697
|
+
const pieWidth = height;
|
|
698
|
+
const svg = selectSvgElement(id);
|
|
699
|
+
const group = svg.append("g");
|
|
700
|
+
const sections2 = db2.getSections();
|
|
701
|
+
group.attr("transform", "translate(" + pieWidth / 2 + "," + height / 2 + ")");
|
|
702
|
+
const { themeVariables } = globalConfig;
|
|
703
|
+
let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth);
|
|
704
|
+
outerStrokeWidth ?? (outerStrokeWidth = 2);
|
|
705
|
+
const textPosition = pieConfig.textPosition;
|
|
706
|
+
const radius = Math.min(pieWidth, height) / 2 - MARGIN;
|
|
707
|
+
const arcGenerator = arc().innerRadius(0).outerRadius(radius);
|
|
708
|
+
const labelArcGenerator = arc().innerRadius(radius * textPosition).outerRadius(radius * textPosition);
|
|
709
|
+
group.append("circle").attr("cx", 0).attr("cy", 0).attr("r", radius + outerStrokeWidth / 2).attr("class", "pieOuterCircle");
|
|
710
|
+
const arcs = createPieArcs(sections2);
|
|
711
|
+
const myGeneratedColors = [
|
|
712
|
+
themeVariables.pie1,
|
|
713
|
+
themeVariables.pie2,
|
|
714
|
+
themeVariables.pie3,
|
|
715
|
+
themeVariables.pie4,
|
|
716
|
+
themeVariables.pie5,
|
|
717
|
+
themeVariables.pie6,
|
|
718
|
+
themeVariables.pie7,
|
|
719
|
+
themeVariables.pie8,
|
|
720
|
+
themeVariables.pie9,
|
|
721
|
+
themeVariables.pie10,
|
|
722
|
+
themeVariables.pie11,
|
|
723
|
+
themeVariables.pie12
|
|
724
|
+
];
|
|
725
|
+
const color = ordinal(myGeneratedColors);
|
|
726
|
+
group.selectAll("mySlices").data(arcs).enter().append("path").attr("d", arcGenerator).attr("fill", (datum) => {
|
|
727
|
+
return color(datum.data.label);
|
|
728
|
+
}).attr("class", "pieCircle");
|
|
729
|
+
let sum = 0;
|
|
730
|
+
Object.keys(sections2).forEach((key) => {
|
|
731
|
+
sum += sections2[key];
|
|
732
|
+
});
|
|
733
|
+
group.selectAll("mySlices").data(arcs).enter().append("text").text((datum) => {
|
|
734
|
+
return (datum.data.value / sum * 100).toFixed(0) + "%";
|
|
735
|
+
}).attr("transform", (datum) => {
|
|
736
|
+
return "translate(" + labelArcGenerator.centroid(datum) + ")";
|
|
737
|
+
}).style("text-anchor", "middle").attr("class", "slice");
|
|
738
|
+
group.append("text").text(db2.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
|
739
|
+
const legend = group.selectAll(".legend").data(color.domain()).enter().append("g").attr("class", "legend").attr("transform", (_datum, index) => {
|
|
740
|
+
const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING;
|
|
741
|
+
const offset = height2 * color.domain().length / 2;
|
|
742
|
+
const horizontal = 12 * LEGEND_RECT_SIZE;
|
|
743
|
+
const vertical = index * height2 - offset;
|
|
744
|
+
return "translate(" + horizontal + "," + vertical + ")";
|
|
745
|
+
});
|
|
746
|
+
legend.append("rect").attr("width", LEGEND_RECT_SIZE).attr("height", LEGEND_RECT_SIZE).style("fill", color).style("stroke", color);
|
|
747
|
+
legend.data(arcs).append("text").attr("x", LEGEND_RECT_SIZE + LEGEND_SPACING).attr("y", LEGEND_RECT_SIZE - LEGEND_SPACING).text((datum) => {
|
|
748
|
+
const { label, value } = datum.data;
|
|
749
|
+
if (db2.getShowData()) {
|
|
750
|
+
return `${label} [${value}]`;
|
|
751
|
+
}
|
|
752
|
+
return label;
|
|
753
|
+
});
|
|
754
|
+
const longestTextWidth = Math.max(
|
|
755
|
+
...legend.selectAll("text").nodes().map((node) => (node == null ? void 0 : node.getBoundingClientRect().width) ?? 0)
|
|
756
|
+
);
|
|
757
|
+
const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth;
|
|
758
|
+
svg.attr("viewBox", `0 0 ${totalWidth} ${height}`);
|
|
759
|
+
configureSvgSize(svg, height, totalWidth, pieConfig.useMaxWidth);
|
|
760
|
+
};
|
|
761
|
+
const renderer = { draw };
|
|
762
|
+
const diagram = {
|
|
763
|
+
parser: parser$1,
|
|
764
|
+
db,
|
|
765
|
+
renderer,
|
|
766
|
+
styles
|
|
767
|
+
};
|
|
768
|
+
export {
|
|
769
|
+
diagram
|
|
770
|
+
};
|