@marimo-team/frontend 0.13.7-dev7 → 0.13.7-dev9
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/assets/ConnectedDataExplorerComponent-aTL16d4W.js +19 -0
- package/dist/assets/VegaLite-B8hQHAh-.js +189 -0
- package/dist/assets/_baseEach-fsZbP1N8.js +1 -0
- package/dist/assets/_baseMap-B8cT6cMO.js +1 -0
- package/dist/assets/_baseUniq-BNwwWocp.js +1 -0
- package/dist/assets/_createAggregator-uK9tvoQl.js +1 -0
- package/dist/assets/{any-language-editor-CzgTNb1K.js → any-language-editor-D3c0CEB2.js} +3 -1
- package/dist/assets/apl-CXdQSnD-.js +1 -1
- package/dist/assets/arc-Cuwikxov.js +1 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-BCA-d6pH.js +36 -0
- package/dist/assets/asciiarmor-D5V0T9Cu.js +1 -1
- package/dist/assets/asn1-DWPaVWf6.js +1 -1
- package/dist/assets/asterisk-B46aRdXb.js +1 -1
- package/dist/assets/blockDiagram-JOT3LUYC-Bl5OSgtT.js +121 -0
- package/dist/assets/brainfuck-CtZaYBKt.js +1 -1
- package/dist/assets/c4Diagram-VJAJSXHY-DHd9cbeI.js +10 -0
- package/dist/assets/channel-Cah-fknW.js +1 -0
- package/dist/assets/chunk-4BMEZGHF-B2bF-jyl.js +1 -0
- package/dist/assets/chunk-A2AXSNBT-CRhdQp4F.js +164 -0
- package/dist/assets/chunk-AEK57VVT-CRjefC9t.js +220 -0
- package/dist/assets/chunk-D6G4REZN-BeAK2ttI.js +1 -0
- package/dist/assets/chunk-RZ5BOZE2-ZaJw1JwS.js +1 -0
- package/dist/assets/chunk-XZIHB7SX-uSPpUSf_.js +1 -0
- package/dist/assets/{circle-play-DJJzVByn.js → circle-play-DNRu-ReT.js} +1 -2
- package/dist/assets/classDiagram-GIVACNV2-C-oJMCYG.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-C-oJMCYG.js +1 -0
- package/dist/assets/clike-BgBwzOhw.js +1 -1
- package/dist/assets/clojure-DR_hEDJv.js +1 -1
- package/dist/assets/clone-DXAqsvWp.js +1 -0
- package/dist/assets/cmake-DXn5xaP-.js +1 -1
- package/dist/assets/cobol-stawOqaz.js +1 -1
- package/dist/assets/coffeescript-BTDxI-eT.js +1 -1
- package/dist/assets/colors-bszWmPJw.js +1 -1
- package/dist/assets/commonlisp-vq6DHwts.js +1 -1
- package/dist/assets/compile-h-VmVS3n.js +10 -0
- package/dist/assets/crystal-CRzZ78HM.js +1 -1
- package/dist/assets/css-ZjFoif2m.js +1 -1
- package/dist/assets/cypher-gJDei3ni.js +1 -1
- package/dist/assets/cytoscape.esm-C5gjFiAL.js +10 -0
- package/dist/assets/d-BShv7fp-.js +1 -1
- package/dist/assets/dagre-OKDRZEBW-CzO1o7j7.js +4 -0
- package/dist/assets/data-editor-BPCz-RRC.js +142 -0
- package/dist/assets/diagram-SSKATNLV-Bu9tmr_l.js +43 -0
- package/dist/assets/diagram-VNBRO52H-B8zB54d2.js +24 -0
- package/dist/assets/diff-UJJ5BM9S.js +1 -1
- package/dist/assets/dockerfile-knGOOxt4.js +1 -1
- package/dist/assets/dtd-DI9Herc-.js +1 -1
- package/dist/assets/dylan-CHJ5qNM_.js +1 -1
- package/dist/assets/ebnf-B-Df8AvO.js +1 -1
- package/dist/assets/ecl-DPFc0Uaf.js +1 -1
- package/dist/assets/edit-page-l7M3mmCs.js +134 -0
- package/dist/assets/eiffel-DR5c0IrL.js +1 -1
- package/dist/assets/elm-D7xaZ7Da.js +1 -1
- package/dist/assets/erDiagram-Q7BY3M3F-GiSZ4Niy.js +60 -0
- package/dist/assets/erlang-BuqgqA5h.js +1 -1
- package/dist/assets/fcl-CVaBTCzQ.js +1 -1
- package/dist/assets/flowDiagram-4HSFHLVR-DBSiHd0m.js +161 -0
- package/dist/assets/forth-Dri_5nFc.js +1 -1
- package/dist/assets/fortran-DL7KluxX.js +1 -1
- package/dist/assets/ganttDiagram-APWFNJXF-bMNX-uB5.js +257 -0
- package/dist/assets/gas-5kEe4nk0.js +1 -1
- package/dist/assets/gherkin-B6X1vGSW.js +1 -1
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-BvuyR0TB.js +65 -0
- package/dist/assets/graph-B8G81lu0.js +1 -0
- package/dist/assets/groovy-DnIzCrpZ.js +1 -1
- package/dist/assets/haskell-CmdsSjFB.js +1 -1
- package/dist/assets/haxe-D25e-2l-.js +1 -1
- package/dist/assets/home-page-CAqsUULE.js +9 -0
- package/dist/assets/http-BKJkqRj4.js +1 -1
- package/dist/assets/idl-pcmmZuaN.js +1 -1
- package/dist/assets/index-2TL38hPv.js +1 -0
- package/dist/assets/index-B14EVG6L.js +1 -0
- package/dist/assets/index-B9Btdii4.js +1 -0
- package/dist/assets/index-B9k4MYlq.js +1 -0
- package/dist/assets/index-BDHXY3UE.js +1 -0
- package/dist/assets/index-BJsnjxpc.js +476 -0
- package/dist/assets/index-BXbzCGbn.js +1 -0
- package/dist/assets/index-BxkbDbzB.js +1 -0
- package/dist/assets/index-CP8gLM9c.js +7 -0
- package/dist/assets/index-CSziElQw.css +1 -0
- package/dist/assets/index-D1IdseC1.js +19 -0
- package/dist/assets/index-DFpzd1EA.js +1 -0
- package/dist/assets/index-DX1YAcio.js +1 -0
- package/dist/assets/index-FkBJMqtJ.js +1 -0
- package/dist/assets/index-REXxtYrd.js +1 -0
- package/dist/assets/index-Wzoc-_uT.js +1 -0
- package/dist/assets/index-_KobMnTy.js +1 -0
- package/dist/assets/index-j5SusyE5.js +1 -0
- package/dist/assets/index-pmR7FK6S.js +1 -0
- package/dist/assets/index-wqkTZ9mS.js +1 -0
- package/dist/assets/infoDiagram-PH2N3AL5-Dr_g5e_R.js +2 -0
- package/dist/assets/init-DLRA0X12.js +1 -1
- package/dist/assets/javascript-D48wDJXV.js +1 -1
- package/dist/assets/jinja2-DhgKlfW7.js +1 -1
- package/dist/assets/journeyDiagram-U35MCT3I-BKBrLjyX.js +138 -0
- package/dist/assets/julia-DjdwvFuI.js +1 -1
- package/dist/assets/kanban-definition-NDS4AKOZ-B6zYcWR2.js +88 -0
- package/dist/assets/katex-BsnJiHtx.js +261 -0
- package/dist/assets/layout-DOrZNmX_.js +1 -0
- package/dist/assets/linear-CCD4VqSh.js +1 -0
- package/dist/assets/livescript-HO6ttBFx.js +1 -1
- package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
- package/dist/assets/lua-8DXOpKDz.js +1 -1
- package/dist/assets/mathematica-IIbmv7SK.js +1 -1
- package/dist/assets/mbox-z_N2Mo3d.js +1 -0
- package/dist/assets/mermaid-CMGFQ7sl.js +152 -0
- package/dist/assets/mhchem-C_nT2J_7.js +1 -0
- package/dist/assets/min-C21FYuz2.js +1 -0
- package/dist/assets/mindmap-definition-ALO5MXBD-CR7IM-_J.js +95 -0
- package/dist/assets/mirc-DkvFAiy5.js +1 -1
- package/dist/assets/mllike-3c2dg9RT.js +1 -1
- package/dist/assets/modelica-DSrSSXCg.js +1 -1
- package/dist/assets/mscgen-B2igx18G.js +1 -1
- package/dist/assets/mumps-zvxmGV4l.js +1 -1
- package/dist/assets/nginx-B4hAVlXN.js +1 -1
- package/dist/assets/ntriples-FFvkTduk.js +1 -1
- package/dist/assets/octave-C4hdQ5Hf.js +1 -1
- package/dist/assets/ordinal-DDUp3AbE.js +1 -1
- package/dist/assets/oz-qQq7irPq.js +1 -1
- package/dist/assets/pascal-CafrKXZF.js +1 -1
- package/dist/assets/perl-tdMlh9QA.js +1 -1
- package/dist/assets/pieDiagram-IB7DONF6-C9jxnyRb.js +30 -0
- package/dist/assets/pig-CwGJVRC4.js +1 -1
- package/dist/assets/powershell-D1ly3AHC.js +1 -1
- package/dist/assets/properties-_nPj978X.js +1 -1
- package/dist/assets/protobuf-B4y9do6W.js +1 -1
- package/dist/assets/pug-_kJOm_E2.js +1 -1
- package/dist/assets/puppet-Bc-yJKzi.js +1 -1
- package/dist/assets/python-DD-Q2bae.js +1 -1
- package/dist/assets/q-B0kTJ4cI.js +1 -1
- package/dist/assets/quadrantDiagram-7GDLP6J5-eEYJI1dE.js +7 -0
- package/dist/assets/r-BA4EbLKE.js +1 -1
- package/dist/assets/radar-MK3ICKWK-8ZFTaZOH.js +126 -0
- package/dist/assets/range-CtcPcB_L.js +1 -1
- package/dist/assets/react-plotly-Dp2qjlur.js +4074 -0
- package/dist/assets/requirementDiagram-KVF5MWMF-CHvk2MiF.js +64 -0
- package/dist/assets/rpm-DI_rRufH.js +1 -1
- package/dist/assets/ruby-CR-u2WLS.js +1 -1
- package/dist/assets/run-page-Cm3oi86f.js +1 -0
- package/dist/assets/sankeyDiagram-QLVOVGJD-B1tF5GpG.js +10 -0
- package/dist/assets/sas-Bqaci40L.js +1 -1
- package/dist/assets/save-worker-Metbq5yy.js +1 -0
- package/dist/assets/scheme-qjP0V5Ag.js +1 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-BOpD8Emj.js +122 -0
- package/dist/assets/shell-BLav31RL.js +1 -1
- package/dist/assets/sieve-r025o_jW.js +1 -1
- package/dist/assets/simple-mode-C3vEBAcb.js +1 -1
- package/dist/assets/slides-component-BuPI2hHm.js +1 -0
- package/dist/assets/smalltalk-C7J3IyEP.js +1 -1
- package/dist/assets/solr-78MBEUkU.js +1 -1
- package/dist/assets/sortBy-CI3mVihg.js +1 -0
- package/dist/assets/sparql-BRLJFz69.js +1 -1
- package/dist/assets/spreadsheet-CGlWr0eM.js +1 -1
- package/dist/assets/sql-B3SPsWL6.js +1 -1
- package/dist/assets/stateDiagram-DGXRK772-IAT7mN_h.js +1 -0
- package/dist/assets/stateDiagram-v2-YXO3MK2T-BlMW5hXj.js +1 -0
- package/dist/assets/step-BwsUM5iJ.js +1 -1
- package/dist/assets/stylus-OdhglgkO.js +1 -1
- package/dist/assets/swift-B_XXVlXX.js +1 -1
- package/dist/assets/tcl-B2fODqDH.js +1 -1
- package/dist/assets/terminal-BvL9BCIG.js +9 -0
- package/dist/assets/terminal-WqMRJt5Z.css +1 -0
- package/dist/assets/textile-BuVhTOzU.js +1 -1
- package/dist/assets/tiddlywiki-BgR6AEZu.js +1 -1
- package/dist/assets/tiki-CI-ztowC.js +1 -1
- package/dist/assets/time-DDarjbSW.js +1 -0
- package/dist/assets/timeline-definition-BDJGKUSR-DNkQnSfP.js +61 -0
- package/dist/assets/timer-DFzT7np-.js +1 -1
- package/dist/assets/toml-BQXy8elZ.js +1 -1
- package/dist/assets/tracing-CgYwDdwx.js +2 -0
- package/dist/assets/transform-Cyp0GDF-.js +1 -0
- package/dist/assets/tree-D1EDUAby.js +17 -0
- package/dist/assets/troff-Ce85hlLp.js +1 -1
- package/dist/assets/ttcn-BxnYHtq8.js +1 -1
- package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -1
- package/dist/assets/turtle-BkSuIpt-.js +1 -1
- package/dist/assets/useMarimoWebSocket-ChrB5-Uc.js +27 -0
- package/dist/assets/vb-BHgjm0DN.js +1 -1
- package/dist/assets/vbscript-Dawdd5GZ.js +1 -1
- package/dist/assets/vega-component-ejPpu3Yp.js +1 -0
- package/dist/assets/velocity-BdD_26Jv.js +1 -1
- package/dist/assets/verilog-B4LBqg_1.js +1 -1
- package/dist/assets/vhdl-CWWH2SUo.js +1 -1
- package/dist/assets/web-vitals-Buym0gfC.js +1 -0
- package/dist/assets/webidl-CGwyPRYs.js +1 -1
- package/dist/assets/worker--c-Qm4dm.js +1 -0
- package/dist/assets/worker-kTJmA5be.js +1 -0
- package/dist/assets/xquery-CVDBqZPY.js +1 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-8Wbh5ytf.js +7 -0
- package/dist/assets/yacas-I8QjZlxf.js +1 -1
- package/dist/assets/z80-D8p3gKXp.js +1 -1
- package/dist/assets/zoom-COrs4lFh.js +1 -1
- package/dist/index.html +2 -2
- package/package.json +5 -4
- package/dist/assets/ConnectedDataExplorerComponent-CsepDyah.js +0 -22
- package/dist/assets/VegaLite-C1HXtrMV.js +0 -11
- package/dist/assets/_baseEach-DD_63bhv.js +0 -1
- package/dist/assets/_baseMap-B4VCibcY.js +0 -1
- package/dist/assets/_baseUniq-CYFxhDYw.js +0 -1
- package/dist/assets/_createAggregator-BzziiCHf.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-C-U-iPbK.js +0 -1
- package/dist/assets/blockDiagram-JOT3LUYC-wp_uDvyw.js +0 -1
- package/dist/assets/c4Diagram-VJAJSXHY-DVvpvjIh.js +0 -1
- package/dist/assets/channel-nBjz4H-G.js +0 -1
- package/dist/assets/chunk-4BMEZGHF-DTOzlx-M.js +0 -1
- package/dist/assets/chunk-A2AXSNBT-D0aB6LMu.js +0 -1
- package/dist/assets/chunk-AEK57VVT-BXKRbqgm.js +0 -1
- package/dist/assets/chunk-D6G4REZN-DJIklw-B.js +0 -1
- package/dist/assets/chunk-RZ5BOZE2-DbLPmled.js +0 -1
- package/dist/assets/chunk-XZIHB7SX-BPf8SbRg.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-D62d1n5s.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-D62d1n5s.js +0 -1
- package/dist/assets/clone-BpRHUGO-.js +0 -1
- package/dist/assets/compile-BrbPA1FV.js +0 -1
- package/dist/assets/cytoscape.esm-bH-fs5wT.js +0 -9
- package/dist/assets/dagre-OKDRZEBW-DMUTu875.js +0 -1
- package/dist/assets/data-editor-BAugqar1.js +0 -1
- package/dist/assets/diagram-SSKATNLV-CgktwEzE.js +0 -1
- package/dist/assets/diagram-VNBRO52H-DM157GSt.js +0 -1
- package/dist/assets/edit-page-D5MazIt2.js +0 -8
- package/dist/assets/erDiagram-Q7BY3M3F-CfYnS787.js +0 -1
- package/dist/assets/flowDiagram-4HSFHLVR-BE2xZTx5.js +0 -1
- package/dist/assets/ganttDiagram-APWFNJXF-LN8qz0YV.js +0 -1
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-BRJVT_zn.js +0 -1
- package/dist/assets/graph-UIDUJmse.js +0 -1
- package/dist/assets/home-page-CRQcruYX.js +0 -7
- package/dist/assets/index-2SONYAJm.js +0 -1
- package/dist/assets/index-5ldyqPzW.js +0 -1
- package/dist/assets/index-BJDDQR-b.js +0 -1
- package/dist/assets/index-BbEv2iVN.css +0 -1
- package/dist/assets/index-BcRkZK42.js +0 -1
- package/dist/assets/index-BeUu3ch_.js +0 -1
- package/dist/assets/index-Bsc9SEYH.js +0 -87
- package/dist/assets/index-Bul_n0Oy.js +0 -1
- package/dist/assets/index-BxZz8_b9.js +0 -1
- package/dist/assets/index-C4iGahsq.js +0 -1
- package/dist/assets/index-C8U61zo_.js +0 -1
- package/dist/assets/index-CE_UMLrN.js +0 -1
- package/dist/assets/index-CF6xeTk8.js +0 -1
- package/dist/assets/index-CPXRGKlr.js +0 -1
- package/dist/assets/index-Ce6UaJ0J.js +0 -1
- package/dist/assets/index-DYy6_SSS.js +0 -1
- package/dist/assets/index-DdDVFm9B.js +0 -1
- package/dist/assets/index-b_tRbrpS.js +0 -1
- package/dist/assets/index-bkSNWDvj.js +0 -1
- package/dist/assets/index-i7xW5_nS.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-HPC1FDCJ.js +0 -1
- package/dist/assets/journeyDiagram-U35MCT3I-C2DEy4EI.js +0 -1
- package/dist/assets/kanban-definition-NDS4AKOZ-B_EEiPWw.js +0 -1
- package/dist/assets/katex-Blph-pX_.js +0 -1
- package/dist/assets/layout-D_LRJAfC.js +0 -1
- package/dist/assets/linear-D5vU7l3E.js +0 -1
- package/dist/assets/mbox-DoeuZPxA.js +0 -1
- package/dist/assets/mermaid-R60l6R69.js +0 -7
- package/dist/assets/mhchem-9pkdwevO.js +0 -1
- package/dist/assets/min-C-OQ4NGo.js +0 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-D4QoDDy8.js +0 -1
- package/dist/assets/pieDiagram-IB7DONF6-SF9agpbB.js +0 -1
- package/dist/assets/quadrantDiagram-7GDLP6J5-BLMHLPC_.js +0 -1
- package/dist/assets/radar-MK3ICKWK-BHuNvtv1.js +0 -1
- package/dist/assets/react-plotly-BL5FdwhT.js +0 -71
- package/dist/assets/requirementDiagram-KVF5MWMF-DxjKoyr_.js +0 -1
- package/dist/assets/run-page-CmD3K-_E.js +0 -1
- package/dist/assets/sankeyDiagram-QLVOVGJD-CstUhZQp.js +0 -1
- package/dist/assets/save-worker-CQvBUha3.js +0 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-C0DUaj1h.js +0 -1
- package/dist/assets/slides-component-ciQA86ZI.js +0 -1
- package/dist/assets/sortBy-DtnQOB1o.js +0 -1
- package/dist/assets/stateDiagram-DGXRK772-DLwZeaFq.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-B0FkKF8G.js +0 -1
- package/dist/assets/terminal-DVzybcfs.css +0 -1
- package/dist/assets/terminal-th4WQMuZ.js +0 -1
- package/dist/assets/time-xufRr6_w.js +0 -1
- package/dist/assets/timeline-definition-BDJGKUSR-bfHyV-7E.js +0 -1
- package/dist/assets/tracing-DVLROVSe.js +0 -8
- package/dist/assets/transform-DjHZbYKP.js +0 -1
- package/dist/assets/tree-Bc56h0bS.js +0 -8
- package/dist/assets/useMarimoWebSocket-C5cupBS4.js +0 -15
- package/dist/assets/vega-component-BCCNIpr4.js +0 -1
- package/dist/assets/web-vitals-rCWRSGQR.js +0 -1
- package/dist/assets/worker-DMKWnagd.js +0 -1
- package/dist/assets/worker-DXe6aoib.js +0 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-DxMG0q6v.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as O,a as P,S as M}from"./chunk-AEK57VVT-CRjefC9t.js";import{_ as f,c as t,l as S,d as R,j as v,u as U}from"./mermaid-CMGFQ7sl.js";import{s as T}from"./transform-Cyp0GDF-.js";import{G as C}from"./graph-B8G81lu0.js";import{l as I}from"./layout-DOrZNmX_.js";import{l as W,k as j}from"./step-BwsUM5iJ.js";import"./chunk-RZ5BOZE2-ZaJw1JwS.js";import"./index-BJsnjxpc.js";import"./timer-DFzT7np-.js";import"./_baseUniq-BNwwWocp.js";import"./_baseEach-fsZbP1N8.js";import"./min-C21FYuz2.js";import"./_baseMap-B8cT6cMO.js";import"./sortBy-CI3mVihg.js";var m,z={},F=f((e,i)=>{z[e]=i},"set"),J=f(e=>z[e],"get"),D=f(()=>Object.keys(z),"keys"),Y=f(()=>D().length,"size"),$={get:J,set:F,keys:D,size:Y},X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),_=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",2*t().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),q=f((e,i)=>{const o=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),d=o.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",d.width+2*t().state.padding).attr("height",d.height+2*t().state.padding).attr("rx",t().state.radius),o},"drawSimpleState"),Z=f((e,i)=>{const o=f(function(g,y,b){const B=g.append("tspan").attr("x",2*t().state.padding).text(y);b||B.attr("dy",t().state.textHeight)},"addTspan"),d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),n=d.height,c=e.append("text").attr("x",t().state.padding).attr("y",n+.4*t().state.padding+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let l=!0,a=!0;i.descriptions.forEach(function(g){l||(o(c,g,a),a=!1),l=!1});const s=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+n+t().state.dividerMargin/2).attr("y2",t().state.padding+n+t().state.dividerMargin/2).attr("class","descr-divider"),x=c.node().getBBox(),h=Math.max(x.width,d.width);return s.attr("x2",h+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",h+2*t().state.padding).attr("height",x.height+n+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),K=f((e,i,o)=>{const d=t().state.padding,n=2*t().state.padding,c=e.node().getBBox(),l=c.width,a=c.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let h,g=Math.max(x,l);g===l&&(g+=n);const y=e.node().getBBox();i.doc,h=a-d,x>l&&(h=(l-g)/2+d),Math.abs(a-y.x)<d&&x>l&&(h=a-(x-l)/2);const b=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",h).attr("y",b).attr("class",o?"alt-composit":"composit").attr("width",g).attr("height",y.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",h+d),x<=l&&s.attr("x",a+(g-n)/2-x/2+d),e.insert("rect",":first-child").attr("x",h).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",3*t().state.textHeight).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",h).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",y.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),Q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),V=f((e,i)=>{let o=t().state.forkWidth,d=t().state.forkHeight;if(i.parentId){let n=o;o=d,d=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",o).attr("height",d).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),tt=f((e,i,o,d)=>{let n=0;const c=d.append("text");c.style("text-anchor","start"),c.attr("class","noteText");let l=e.replace(/\r\n/g,"<br/>");l=l.replace(/\n/g,"<br/>");const a=l.split(v.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const x of a){const h=x.trim();if(h.length>0){const g=c.append("tspan");g.text(h),s===0&&(s+=g.node().getBBox().height),n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",o+n+1.25*t().state.noteMargin)}}return{textWidth:c.node().getBBox().width,textHeight:n}},"_drawLongText"),et=f((e,i)=>{i.attr("class","state-note");const o=i.append("rect").attr("x",0).attr("y",t().state.padding),d=i.append("g"),{textWidth:n,textHeight:c}=tt(e,0,0,d);return o.attr("height",c+2*t().state.noteMargin),o.attr("width",n+2*t().state.noteMargin),o},"drawNote"),L=f(function(e,i){const o=i.id,d={id:o,label:i.id,width:0,height:0},n=e.append("g").attr("id",o).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&Q(n),i.type!=="fork"&&i.type!=="join"||V(n,i),i.type==="note"&&et(i.note.text,n),i.type==="divider"&&_(n),i.type==="default"&&i.descriptions.length===0&&q(n,i),i.type==="default"&&i.descriptions.length>0&&Z(n,i);const c=n.node().getBBox();return d.width=c.width+2*t().state.padding,d.height=c.height+2*t().state.padding,$.set(o,d),d},"drawState"),G=0,at=f(function(e,i,o){const d=f(function(s){switch(s){case M.relationType.AGGREGATION:return"aggregation";case M.relationType.EXTENSION:return"extension";case M.relationType.COMPOSITION:return"composition";case M.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,c=W().x(function(s){return s.x}).y(function(s){return s.y}).curve(j),l=e.append("path").attr("d",c(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),l.attr("marker-end","url("+a+"#"+d(M.relationType.DEPENDENCY)+"End)"),o.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x,y:h}=U.calcLabelPosition(i.points),g=v.getRows(o.title);let y=0;const b=[];let B=0,E=0;for(let u=0;u<=g.length;u++){const p=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",x).attr("y",h+y),w=p.node().getBBox();B=Math.max(B,w.width),E=Math.min(E,w.x),S.info(w.x,x,h+y),y===0&&(y=p.node().getBBox().height,S.info("Title height",y,h)),b.push(p)}let N=y*g.length;if(g.length>1){const u=(g.length-1)*y*.5;b.forEach((p,w)=>p.attr("y",h+w*y-u)),N=y*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",x-B/2-t().state.padding/2).attr("y",h-N/2-t().state.padding/2-3.5).attr("width",B+t().state.padding).attr("height",N+t().state.padding),S.info(r)}G++},"drawEdge"),H={},it=f(function(){},"setConf"),rt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),nt=f(function(e,i,o,d){m=t().state;const n=t().securityLevel;let c;n==="sandbox"&&(c=T("#i"+i));const l=T(n==="sandbox"?c.nodes()[0].contentDocument.body:"body"),a=n==="sandbox"?c.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=l.select(`[id='${i}']`);rt(s);const x=d.db.getRootDoc();A(x,s,void 0,!1,l,a,d);const h=m.padding,g=s.node().getBBox(),y=g.width+2*h,b=g.height+2*h;R(s,b,1.75*y,m.useMaxWidth),s.attr("viewBox",`${g.x-m.padding} ${g.y-m.padding} `+y+" "+b)},"draw"),dt=f(e=>e?e.length*m.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,o,d,n,c,l)=>{const a=new C({compound:!0,multigraph:!0});let s,x=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){x=!1;break}o?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:x?1:m.edgeLengthFactor,nodeSep:x?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:x?1:m.edgeLengthFactor,nodeSep:x?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const h=l.db.getStates(),g=l.db.getRelations(),y=Object.keys(h);for(const r of y){const u=h[r];let p;if(o&&(u.parentId=o),u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");p=A(u.doc,w,u.id,!d,n,c,l);{w=K(w,u,d);let k=w.node().getBBox();p.width=k.width,p.height=k.height+m.padding/2,H[u.id]={y:m.compositTitleSize}}}else p=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},k=L(i,w,a);u.note.position==="left of"?(a.setNode(p.id+"-note",k),a.setNode(p.id,p)):(a.setNode(p.id,p),a.setNode(p.id+"-note",k)),a.setParent(p.id,p.id+"-group"),a.setParent(p.id+"-note",p.id+"-group")}else a.setNode(p.id,p)}S.debug("Count=",a.nodeCount(),a);let b=0;g.forEach(function(r){b++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:m.labelHeight*v.getRows(r.title).length,labelpos:"c"},"id"+b)}),I(a),S.debug("Graph after layout",a.nodes());const B=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+B.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(H[r]?H[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+B.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),c.querySelectorAll("#"+B.id+" #"+r+" .divider").forEach(u=>{const p=u.parentElement;let w=0,k=0;p&&(p.parentElement&&(w=p.parentElement.getBBox().width),k=parseInt(p.getAttribute("data-x-shift"),10),Number.isNaN(k)&&(k=0)),u.setAttribute("x1",0-k+8),u.setAttribute("x2",w-k-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=B.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),at(i,a.edge(r),a.edge(r).relation))}),E=B.getBBox();const N={id:o||"root",label:o||"root",width:0,height:0};return N.width=E.width+2*m.padding,N.height=E.height+2*m.padding,S.debug("Doc rendered",N,a),N},"renderDoc"),st={setConf:it,draw:nt},ot={parser:P,get db(){return new M(1)},renderer:st,styles:O,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ot as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,b as a,a as e,S as s}from"./chunk-AEK57VVT-CRjefC9t.js";import{_ as o}from"./mermaid-CMGFQ7sl.js";import"./transform-Cyp0GDF-.js";import"./chunk-RZ5BOZE2-ZaJw1JwS.js";import"./index-BJsnjxpc.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var i={parser:e,get db(){return new s(2)},renderer:a,styles:t,init:o(r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{i as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t){return function(){return t}}const i=Math.abs,s=Math.atan2,n=Math.cos,_=Math.max,h=Math.min,e=Math.sin,o=Math.sqrt,a=1e-12,c=Math.PI,r=c/2,l=2*c;function x(t){return t>1?0:t<-1?c:Math.acos(t)}function u(t){return t>=1?r:t<=-1?-r:Math.asin(t)}const y=Math.PI,p=2*y,f=1e-6,d=p-f;function b(t){this._+=t[0];for(let i=1,s=t.length;i<s;++i)this._+=arguments[i]+t[i]}class w{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?b:function(t){let i=Math.floor(t);if(!(i>=0))throw new Error(`invalid digits: ${t}`);if(i>15)return b;const s=10**i;return function(t){this._+=t[0];for(let i=1,n=t.length;i<n;++i)this._+=Math.round(arguments[i]*s)/s+t[i]}}(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,s,n){this._append`Q${+t},${+i},${this._x1=+s},${this._y1=+n}`}bezierCurveTo(t,i,s,n,_,h){this._append`C${+t},${+i},${+s},${+n},${this._x1=+_},${this._y1=+h}`}arcTo(t,i,s,n,_){if(t=+t,i=+i,s=+s,n=+n,(_=+_)<0)throw new Error(`negative radius: ${_}`);let h=this._x1,e=this._y1,o=s-t,a=n-i,c=h-t,r=e-i,l=c*c+r*r;if(null===this._x1)this._append`M${this._x1=t},${this._y1=i}`;else if(l>f)if(Math.abs(r*o-a*c)>f&&_){let x=s-h,u=n-e,p=o*o+a*a,d=x*x+u*u,b=Math.sqrt(p),w=Math.sqrt(l),T=_*Math.tan((y-Math.acos((p+l-d)/(2*b*w)))/2),v=T/w,$=T/b;Math.abs(v-1)>f&&this._append`L${t+v*c},${i+v*r}`,this._append`A${_},${_},0,0,${+(r*x>c*u)},${this._x1=t+$*o},${this._y1=i+$*a}`}else this._append`L${this._x1=t},${this._y1=i}`;else;}arc(t,i,s,n,_,h){if(t=+t,i=+i,h=!!h,(s=+s)<0)throw new Error(`negative radius: ${s}`);let e=s*Math.cos(n),o=s*Math.sin(n),a=t+e,c=i+o,r=1^h,l=h?n-_:_-n;null===this._x1?this._append`M${a},${c}`:(Math.abs(this._x1-a)>f||Math.abs(this._y1-c)>f)&&this._append`L${a},${c}`,s&&(l<0&&(l=l%p+p),l>d?this._append`A${s},${s},0,1,${r},${t-e},${i-o}A${s},${s},0,1,${r},${this._x1=a},${this._y1=c}`:l>f&&this._append`A${s},${s},0,${+(l>=y)},${r},${this._x1=t+s*Math.cos(_)},${this._y1=i+s*Math.sin(_)}`)}rect(t,i,s,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${s=+s}v${+n}h${-s}Z`}toString(){return this._}}function T(){return new w}function v(t){let i=3;return t.digits=function(s){if(!arguments.length)return i;if(null==s)i=null;else{const t=Math.floor(s);if(!(t>=0))throw new RangeError(`invalid digits: ${s}`);i=t}return t},()=>new w(i)}function $(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function k(t){this._context=t}function N(t){return new k(t)}function M(t){return t[0]}function E(t){return t[1]}function S(i,s){var n=t(!0),_=null,h=N,e=null,o=v(a);function a(t){var a,c,r,l=(t=$(t)).length,x=!1;for(null==_&&(e=h(r=o())),a=0;a<=l;++a)!(a<l&&n(c=t[a],a,t))===x&&((x=!x)?e.lineStart():e.lineEnd()),x&&e.point(+i(c,a,t),+s(c,a,t));if(r)return e=null,r+""||null}return i="function"==typeof i?i:void 0===i?M:t(i),s="function"==typeof s?s:void 0===s?E:t(s),a.x=function(s){return arguments.length?(i="function"==typeof s?s:t(+s),a):i},a.y=function(i){return arguments.length?(s="function"==typeof i?i:t(+i),a):s},a.defined=function(i){return arguments.length?(n="function"==typeof i?i:t(!!i),a):n},a.curve=function(t){return arguments.length?(h=t,null!=_&&(e=h(_)),a):h},a.context=function(t){return arguments.length?(null==t?_=e=null:e=h(_=t),a):_},a}function m(){}function P(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function g(t){this._context=t}function C(t){return new g(t)}function z(t){this._context=t}function A(t){return new z(t)}function q(t){this._context=t}function L(t){return new q(t)}function j(t,i){this._basis=new g(t),this._beta=i}T.prototype=w.prototype,k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}},g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:P(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},z.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,n):this._context.moveTo(s,n);break;case 3:this._point=4;default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},j.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var n,_=t[0],h=i[0],e=t[s]-_,o=i[s]-h,a=-1;++a<=s;)n=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+n*e),this._beta*i[a]+(1-this._beta)*(h+n*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const I=function t(i){function s(t){return 1===i?new g(t):new j(t,i)}return s.beta=function(i){return t(+i)},s}(.85);function Z(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function B(t,i){this._context=t,this._k=(1-i)/6}B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const D=function t(i){function s(t){return new B(t,i)}return s.tension=function(i){return t(+i)},s}(0);function F(t,i){this._context=t,this._k=(1-i)/6}F.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const G=function t(i){function s(t){return new F(t,i)}return s.tension=function(i){return t(+i)},s}(0);function H(t,i){this._context=t,this._k=(1-i)/6}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const J=function t(i){function s(t){return new H(t,i)}return s.tension=function(i){return t(+i)},s}(0);function K(t,i,s){var n=t._x1,_=t._y1,h=t._x2,e=t._y2;if(t._l01_a>a){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,_=(_*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>a){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);h=(h*r+t._x1*t._l23_2a-i*t._l12_2a)/l,e=(e*r+t._y1*t._l23_2a-s*t._l12_2a)/l}t._context.bezierCurveTo(n,_,h,e,t._x2,t._y2)}function O(t,i){this._context=t,this._alpha=i}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Q=function t(i){function s(t){return i?new O(t,i):new B(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function R(t,i){this._context=t,this._alpha=i}R.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const U=function t(i){function s(t){return i?new R(t,i):new F(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function V(t,i){this._context=t,this._alpha=i}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const W=function t(i){function s(t){return i?new V(t,i):new H(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function X(t){this._context=t}function Y(t){return new X(t)}function tt(t){return t<0?-1:1}function it(t,i,s){var n=t._x1-t._x0,_=i-t._x1,h=(t._y1-t._y0)/(n||_<0&&-0),e=(s-t._y1)/(_||n<0&&-0),o=(h*_+e*n)/(n+_);return(tt(h)+tt(e))*Math.min(Math.abs(h),Math.abs(e),.5*Math.abs(o))||0}function st(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function nt(t,i,s){var n=t._x0,_=t._y0,h=t._x1,e=t._y1,o=(h-n)/3;t._context.bezierCurveTo(n+o,_+o*i,h-o,e-o*s,h,e)}function _t(t){this._context=t}function ht(t){this._context=new et(t)}function et(t){this._context=t}function ot(t){return new _t(t)}function at(t){return new ht(t)}function ct(t){this._context=t}function rt(t){var i,s,n=t.length-1,_=new Array(n),h=new Array(n),e=new Array(n);for(_[0]=0,h[0]=2,e[0]=t[0]+2*t[1],i=1;i<n-1;++i)_[i]=1,h[i]=4,e[i]=4*t[i]+2*t[i+1];for(_[n-1]=2,h[n-1]=7,e[n-1]=8*t[n-1]+t[n],i=1;i<n;++i)s=_[i]/h[i-1],h[i]-=s,e[i]-=s*e[i-1];for(_[n-1]=e[n-1]/h[n-1],i=n-2;i>=0;--i)_[i]=(e[i]-_[i+1])/h[i];for(h[n-1]=(t[n]+_[n-1])/2,i=0;i<n-1;++i)h[i]=2*t[i+1]-_[i+1];return[_,h]}function lt(t){return new ct(t)}function xt(t,i){this._context=t,this._t=i}function ut(t){return new xt(t,.5)}function yt(t){return new xt(t,0)}function pt(t){return new xt(t,1)}X.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},_t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nt(this,this._t0,st(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,nt(this,st(this,s=it(this,t,i)),s);break;default:nt(this,this._t0,s=it(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}},(ht.prototype=Object.create(_t.prototype)).point=function(t,i){_t.prototype.point.call(this,i,t)},et.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,n,_,h){this._context.bezierCurveTo(i,t,n,s,h,_)}},ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===s)this._context.lineTo(t[1],i[1]);else for(var n=rt(t),_=rt(i),h=0,e=1;e<s;++h,++e)this._context.bezierCurveTo(n[0][h],_[0][h],n[1][h],_[1][h],t[e],i[e]);(this._line||0!==this._line&&1===s)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}}this._x=t,this._y=i}};export{Q as A,W as B,U as C,D,J as E,G as F,I as G,L as H,A as I,M as J,E as K,T as L,t as a,o as b,n as c,i as d,a as e,s as f,u as g,r as h,_ as i,x as j,C as k,S as l,h as m,$ as n,yt as o,c as p,pt as q,ut as r,e as s,l as t,lt as u,at as v,v as w,ot as x,Y as y,N as z};
|
|
1
|
+
function p(t){return function(){return t}}const ct=Math.abs,rt=Math.atan2,lt=Math.cos,xt=Math.max,ut=Math.min,yt=Math.sin,pt=Math.sqrt,M=1e-12,d=Math.PI,E=d/2,ft=2*d;function dt(t){return t>1?0:t<-1?d:Math.acos(t)}function bt(t){return t>=1?E:t<=-1?-E:Math.asin(t)}const m=Math.PI,S=2*m,f=1e-6,wt=S-f;function F(t){this._+=t[0];for(let i=1,n=t.length;i<n;++i)this._+=arguments[i]+t[i]}class g{constructor(i){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=i==null?F:function(n){let s=Math.floor(n);if(!(s>=0))throw new Error(`invalid digits: ${n}`);if(s>15)return F;const h=10**s;return function(_){this._+=_[0];for(let e=1,a=_.length;e<a;++e)this._+=Math.round(arguments[e]*h)/h+_[e]}}(i)}moveTo(i,n){this._append`M${this._x0=this._x1=+i},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(i,n){this._append`L${this._x1=+i},${this._y1=+n}`}quadraticCurveTo(i,n,s,h){this._append`Q${+i},${+n},${this._x1=+s},${this._y1=+h}`}bezierCurveTo(i,n,s,h,_,e){this._append`C${+i},${+n},${+s},${+h},${this._x1=+_},${this._y1=+e}`}arcTo(i,n,s,h,_){if(i=+i,n=+n,s=+s,h=+h,(_=+_)<0)throw new Error(`negative radius: ${_}`);let e=this._x1,a=this._y1,o=s-i,c=h-n,r=e-i,l=a-n,x=r*r+l*l;if(this._x1===null)this._append`M${this._x1=i},${this._y1=n}`;else if(x>f)if(Math.abs(l*o-c*r)>f&&_){let u=s-e,k=h-a,L=o*o+c*c,at=u*u+k*k,j=Math.sqrt(L),I=Math.sqrt(x),Z=_*Math.tan((m-Math.acos((L+x-at)/(2*j*I)))/2),N=Z/I,B=Z/j;Math.abs(N-1)>f&&this._append`L${i+N*r},${n+N*l}`,this._append`A${_},${_},0,0,${+(l*u>r*k)},${this._x1=i+B*o},${this._y1=n+B*c}`}else this._append`L${this._x1=i},${this._y1=n}`}arc(i,n,s,h,_,e){if(i=+i,n=+n,e=!!e,(s=+s)<0)throw new Error(`negative radius: ${s}`);let a=s*Math.cos(h),o=s*Math.sin(h),c=i+a,r=n+o,l=1^e,x=e?h-_:_-h;this._x1===null?this._append`M${c},${r}`:(Math.abs(this._x1-c)>f||Math.abs(this._y1-r)>f)&&this._append`L${c},${r}`,s&&(x<0&&(x=x%S+S),x>wt?this._append`A${s},${s},0,1,${l},${i-a},${n-o}A${s},${s},0,1,${l},${this._x1=c},${this._y1=r}`:x>f&&this._append`A${s},${s},0,${+(x>=m)},${l},${this._x1=i+s*Math.cos(_)},${this._y1=n+s*Math.sin(_)}`)}rect(i,n,s,h){this._append`M${this._x0=this._x1=+i},${this._y0=this._y1=+n}h${s=+s}v${+h}h${-s}Z`}toString(){return this._}}function G(){return new g}function H(t){let i=3;return t.digits=function(n){if(!arguments.length)return i;if(n==null)i=null;else{const s=Math.floor(n);if(!(s>=0))throw new RangeError(`invalid digits: ${n}`);i=s}return t},()=>new g(i)}function J(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function K(t){this._context=t}function O(t){return new K(t)}function Q(t){return t[0]}function R(t){return t[1]}function Tt(t,i){var n=p(!0),s=null,h=O,_=null,e=H(a);function a(o){var c,r,l,x=(o=J(o)).length,u=!1;for(s==null&&(_=h(l=e())),c=0;c<=x;++c)!(c<x&&n(r=o[c],c,o))===u&&((u=!u)?_.lineStart():_.lineEnd()),u&&_.point(+t(r,c,o),+i(r,c,o));if(l)return _=null,l+""||null}return t=typeof t=="function"?t:t===void 0?Q:p(t),i=typeof i=="function"?i:i===void 0?R:p(i),a.x=function(o){return arguments.length?(t=typeof o=="function"?o:p(+o),a):t},a.y=function(o){return arguments.length?(i=typeof o=="function"?o:p(+o),a):i},a.defined=function(o){return arguments.length?(n=typeof o=="function"?o:p(!!o),a):n},a.curve=function(o){return arguments.length?(h=o,s!=null&&(_=h(s)),a):h},a.context=function(o){return arguments.length?(o==null?s=_=null:_=h(s=o),a):s},a}function y(){}function b(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}function w(t){this._context=t}function vt(t){return new w(t)}function D(t){this._context=t}function $t(t){return new D(t)}function U(t){this._context=t}function kt(t){return new U(t)}function V(t,i){this._basis=new w(t),this._beta=i}G.prototype=g.prototype,K.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}},w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:b(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:b(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},D.prototype={areaStart:y,areaEnd:y,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:b(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,s=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,s):this._context.moveTo(n,s);break;case 3:this._point=4;default:b(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},V.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var s,h=t[0],_=i[0],e=t[n]-h,a=i[n]-_,o=-1;++o<=n;)s=o/n,this._basis.point(this._beta*t[o]+(1-this._beta)*(h+s*e),this._beta*i[o]+(1-this._beta)*(_+s*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const Nt=function t(i){function n(s){return i===1?new w(s):new V(s,i)}return n.beta=function(s){return t(+s)},n}(.85);function T(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function P(t,i){this._context=t,this._k=(1-i)/6}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:T(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Mt=function t(i){function n(s){return new P(s,i)}return n.tension=function(s){return t(+s)},n}(0);function C(t,i){this._context=t,this._k=(1-i)/6}C.prototype={areaStart:y,areaEnd:y,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:T(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Et=function t(i){function n(s){return new C(s,i)}return n.tension=function(s){return t(+s)},n}(0);function z(t,i){this._context=t,this._k=(1-i)/6}z.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:T(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mt=function t(i){function n(s){return new z(s,i)}return n.tension=function(s){return t(+s)},n}(0);function A(t,i,n){var s=t._x1,h=t._y1,_=t._x2,e=t._y2;if(t._l01_a>M){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,o=3*t._l01_a*(t._l01_a+t._l12_a);s=(s*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/o,h=(h*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/o}if(t._l23_a>M){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,r=3*t._l23_a*(t._l23_a+t._l12_a);_=(_*c+t._x1*t._l23_2a-i*t._l12_2a)/r,e=(e*c+t._y1*t._l23_2a-n*t._l12_2a)/r}t._context.bezierCurveTo(s,h,_,e,t._x2,t._y2)}function W(t,i){this._context=t,this._alpha=i}W.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:A(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const St=function t(i){function n(s){return i?new W(s,i):new P(s,0)}return n.alpha=function(s){return t(+s)},n}(.5);function X(t,i){this._context=t,this._alpha=i}X.prototype={areaStart:y,areaEnd:y,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:A(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gt=function t(i){function n(s){return i?new X(s,i):new C(s,0)}return n.alpha=function(s){return t(+s)},n}(.5);function Y(t,i){this._context=t,this._alpha=i}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Pt=function t(i){function n(s){return i?new Y(s,i):new z(s,0)}return n.alpha=function(s){return t(+s)},n}(.5);function tt(t){this._context=t}function Ct(t){return new tt(t)}function it(t){return t<0?-1:1}function st(t,i,n){var s=t._x1-t._x0,h=i-t._x1,_=(t._y1-t._y0)/(s||h<0&&-0),e=(n-t._y1)/(h||s<0&&-0),a=(_*h+e*s)/(s+h);return(it(_)+it(e))*Math.min(Math.abs(_),Math.abs(e),.5*Math.abs(a))||0}function nt(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function q(t,i,n){var s=t._x0,h=t._y0,_=t._x1,e=t._y1,a=(_-s)/3;t._context.bezierCurveTo(s+a,h+a*i,_-a,e-a*n,_,e)}function v(t){this._context=t}function _t(t){this._context=new ht(t)}function ht(t){this._context=t}function zt(t){return new v(t)}function At(t){return new _t(t)}function et(t){this._context=t}function ot(t){var i,n,s=t.length-1,h=new Array(s),_=new Array(s),e=new Array(s);for(h[0]=0,_[0]=2,e[0]=t[0]+2*t[1],i=1;i<s-1;++i)h[i]=1,_[i]=4,e[i]=4*t[i]+2*t[i+1];for(h[s-1]=2,_[s-1]=7,e[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)n=h[i]/_[i-1],_[i]-=n,e[i]-=n*e[i-1];for(h[s-1]=e[s-1]/_[s-1],i=s-2;i>=0;--i)h[i]=(e[i]-h[i+1])/_[i];for(_[s-1]=(t[s]+h[s-1])/2,i=0;i<s-1;++i)_[i]=2*t[i+1]-h[i+1];return[h,_]}function qt(t){return new et(t)}function $(t,i){this._context=t,this._t=i}function Lt(t){return new $(t,.5)}function jt(t){return new $(t,0)}function It(t){return new $(t,1)}tt.prototype={areaStart:y,areaEnd:y,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:q(this,this._t0,nt(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var n=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,q(this,nt(this,n=st(this,t,i)),n);break;default:q(this,this._t0,n=st(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}}},(_t.prototype=Object.create(v.prototype)).point=function(t,i){v.prototype.point.call(this,i,t)},ht.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,n,s,h,_){this._context.bezierCurveTo(i,t,s,n,_,h)}},et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),n===2)this._context.lineTo(t[1],i[1]);else for(var s=ot(t),h=ot(i),_=0,e=1;e<n;++_,++e)this._context.bezierCurveTo(s[0][_],h[0][_],s[1][_],h[1][_],t[e],i[e]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i}};export{St as A,Pt as B,gt as C,Mt as D,mt as E,Et as F,Nt as G,kt as H,$t as I,Q as J,R as K,G as L,p as a,pt as b,lt as c,ct as d,M as e,rt as f,bt as g,E as h,xt as i,dt as j,vt as k,Tt as l,ut as m,J as n,jt as o,d as p,It as q,Lt as r,yt as s,ft as t,qt as u,At as v,H as w,zt as x,Ct as y,O as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],t=["domain","regexp","url-prefix","url"],r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],a=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],o=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],n=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],l=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],s=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],c=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],d=["for","if","else","unless","from","to"],u=["null","true","false","href","title","type","not-allowed","readonly","disabled"],m=e.concat(t,r,i,a,o,l,s,n,c,d,u,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function p(e){return e=e.sort((function(e,t){return t>e})),new RegExp("^(("+e.join(")|(")+"))\\b")}function h(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}var b,g,f,k,w=h(e),y=/^(a|b|i|s|col|em)$/i,v=h(a),x=h(o),z=h(s),q=h(l),$=h(t),j=p(t),B=h(i),N=h(r),L=h(n),P=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,C=p(c),_=h(d),U=new RegExp(/^\-(moz|ms|o|webkit)-/i),E=h(u),O="",W={};function A(e,t){if(O=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=O?O[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),b=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=R,R(e,t);if('"'==b||"'"==b)return e.next(),t.tokenize=S(b),t.tokenize(e,t);if("@"==b)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==b){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(U)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==b?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==b&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(j)?("("==e.peek()&&(t.tokenize=X),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variableName.special","reference"]):e.match(/^&{1}\s*$/)?["variableName.special","reference"]:e.match(C)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!F(e.current())?(e.match("."),["variable","variable-name"]):["variable","word"]:e.match(P)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(b)?(e.next(),[null,b]):(e.next(),[null,null])}function R(e,t){for(var r,i=!1;null!=(r=e.next());){if(i&&"/"==r){t.tokenize=null;break}i="*"==r}return["comment","comment"]}function S(e){return function(t,r){for(var i,a=!1;null!=(i=t.next());){if(i==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==i}return(i==e||!a&&")"!=e)&&(r.tokenize=null),["string","string"]}}function X(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=S(")"),[null,"("]}function Y(e,t,r,i){this.type=e,this.indent=t,this.prev=r,this.line=i||{firstWord:"",indent:0}}function Z(e,t,r,i){return i=i>=0?i:t.indentUnit,e.context=new Y(r,t.indentation()+i,e.context),r}function T(e,t,r){var i=e.context.indent-t.indentUnit;return r=r||!1,e.context=e.context.prev,r&&(e.context.indent=i),e.context.type}function D(e,t,r,i){for(var a=1;a>0;a--)r.context=r.context.prev;return function(e,t,r){return W[r.context.type](e,t,r)}(e,t,r)}function F(e){return e.toLowerCase()in w}function I(e){return(e=e.toLowerCase())in v||e in L}function G(e){return e.toLowerCase()in _}function H(e){return e.toLowerCase().match(U)}function J(e){var t=e.toLowerCase(),r="variable";return F(e)?r="tag":G(e)?r="block-keyword":I(e)?r="property":t in z||t in E?r="atom":"return"==t||t in q?r="keyword":e.match(/^[A-Z]/)&&(r="string"),r}function K(e,t){return ee(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function M(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function Q(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function V(e){return e.sol()||e.string.match(new RegExp("^\\s*"+e.current().replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")))}function ee(e){return e.eol()||e.match(/^\s*$/,!1)}function te(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r="string"==typeof e?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,""):""}W.block=function(e,t,r){if("comment"==e&&V(t)||","==e&&ee(t)||"mixin"==e)return Z(r,t,"block",0);if(M(e,t))return Z(r,t,"interpolation");if(ee(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!F(te(t)))return Z(r,t,"block",0);if(K(e,t))return Z(r,t,"block");if("}"==e&&ee(t))return Z(r,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||G(te(t))?Z(r,t,"variableName"):Z(r,t,"variableName",0);if("="==e)return ee(t)||G(te(t))?Z(r,t,"block"):Z(r,t,"block",0);if("*"==e&&(ee(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return k="tag",Z(r,t,"block");if(Q(e,t))return Z(r,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return Z(r,t,ee(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return Z(r,t,"keyframes");if(/@extends?/.test(e))return Z(r,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&I(t.current().slice(1))?(k="variable","block"):/(@import|@require|@charset)/.test(e)?Z(r,t,"block",0):Z(r,t,"block");if("reference"==e&&ee(t))return Z(r,t,"block");if("("==e)return Z(r,t,"parens");if("vendor-prefixes"==e)return Z(r,t,"vendorPrefixes");if("word"==e){var i=t.current();if("property"==(k=J(i)))return V(t)?Z(r,t,"block",0):(k="atom","block");if("tag"==k){if(/embed|menu|pre|progress|sub|table/.test(i)&&I(te(t)))return k="atom","block";if(t.string.match(new RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return k="atom","block";if(y.test(i)&&(V(t)&&t.string.match(/=/)||!V(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!F(te(t))))return k="variable",G(te(t))?"block":Z(r,t,"block",0);if(ee(t))return Z(r,t,"block")}if("block-keyword"==k)return k="keyword",t.current(/(if|unless)/)&&!V(t)?"block":Z(r,t,"block");if("return"==i)return Z(r,t,"block",0);if("variable"==k&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return Z(r,t,"block")}return r.context.type},W.parens=function(e,t,r){if("("==e)return Z(r,t,"parens");if(")"==e)return"parens"==r.context.prev.type?T(r,t):t.string.match(/^[a-z][\w-]*\(/i)&&ee(t)||G(te(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(te(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&F(te(t))?Z(r,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?Z(r,t,"block",0):ee(t)?Z(r,t,"block"):Z(r,t,"block",0);if(e&&"@"==e.charAt(0)&&I(t.current().slice(1))&&(k="variable"),"word"==e){var i=t.current();"tag"==(k=J(i))&&y.test(i)&&(k="variable"),"property"!=k&&"to"!=i||(k="atom")}return"variable-name"==e?Z(r,t,"variableName"):Q(e,t)?Z(r,t,"pseudo"):r.context.type},W.vendorPrefixes=function(e,t,r){return"word"==e?(k="property",Z(r,t,"block",0)):T(r,t)},W.pseudo=function(e,t,r){return I(te(t.string))?D(e,t,r):(t.match(/^[a-z-]+/),k="variableName.special",ee(t)?Z(r,t,"block"):T(r,t))},W.atBlock=function(e,t,r){if("("==e)return Z(r,t,"atBlock_parens");if(K(e,t))return Z(r,t,"block");if(M(e,t))return Z(r,t,"interpolation");if("word"==e){var i=t.current().toLowerCase();if("tag"==(k=/^(only|not|and|or)$/.test(i)?"keyword":$.hasOwnProperty(i)?"tag":N.hasOwnProperty(i)?"attribute":B.hasOwnProperty(i)?"property":x.hasOwnProperty(i)?"string.special":J(t.current()))&&ee(t))return Z(r,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(k="keyword"),r.context.type},W.atBlock_parens=function(e,t,r){if("{"==e||"}"==e)return r.context.type;if(")"==e)return ee(t)?Z(r,t,"block"):Z(r,t,"atBlock");if("word"==e){var i=t.current().toLowerCase();return k=J(i),/^(max|min)/.test(i)&&(k="property"),"tag"==k&&(k=y.test(i)?"variable":"atom"),r.context.type}return W.atBlock(e,t,r)},W.keyframes=function(e,t,r){return"0"==t.indentation()&&("}"==e&&V(t)||"]"==e||"hash"==e||"qualifier"==e||F(t.current()))?D(e,t,r):"{"==e?Z(r,t,"keyframes"):"}"==e?V(t)?T(r,t,!0):Z(r,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?Z(r,t,"keyframes"):"word"==e&&"block-keyword"==(k=J(t.current()))?(k="keyword",Z(r,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?Z(r,t,ee(t)?"block":"atBlock"):"mixin"==e?Z(r,t,"block",0):r.context.type},W.interpolation=function(e,t,r){return"{"==e&&T(r,t)&&Z(r,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&F(te(t))?Z(r,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?Z(r,t,"block",0):Z(r,t,"block"):"variable-name"==e?Z(r,t,"variableName",0):("word"==e&&"tag"==(k=J(t.current()))&&(k="atom"),r.context.type)},W.extend=function(e,t,r){return"["==e||"="==e?"extend":"]"==e?T(r,t):"word"==e?(k=J(t.current()),"extend"):T(r,t)},W.variableName=function(e,t,r){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(k="variable"),"variableName"):D(e,t,r)};const re={name:"stylus",startState:function(){return{tokenize:null,state:"block",context:new Y("block",0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:((g=(t.tokenize||A)(e,t))&&"object"==typeof g&&(f=g[1],g=g[0]),k=g,t.state=W[t.state](f,e,t),k)},indent:function(e,t,r){var i=e.context,a=t&&t.charAt(0),o=i.indent,n=te(t),l=i.line.indent,s=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:l;return i.prev&&("}"==a&&("block"==i.type||"atBlock"==i.type||"keyframes"==i.type)||")"==a&&("parens"==i.type||"atBlock_parens"==i.type)||"{"==a&&"at"==i.type)?o=i.indent-r.unit:/(\})/.test(a)||(/@|\$|\d/.test(a)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(s)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||G(n)?o=l:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(a)||F(n)?o=/\,\s*$/.test(s)?c:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(s)||F(s)?l<=c?c:c+r.unit:l:/,\s*$/.test(t)||!H(n)&&!I(n)||(o=G(s)?l<=c?c:c+r.unit:/^\{/.test(s)?l<=c?l:c+r.unit:H(s)||I(s)?l>=c?c:l:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(s)||/=\s*$/.test(s)||F(s)||/^\$[\w-\.\[\]\'\"]/.test(s)?c+r.unit:l)),o},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:m}};export{re as stylus};
|
|
1
|
+
var N=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],q=["domain","regexp","url-prefix","url"],L=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],P=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],C=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],_=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],U=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],O=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],W=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],A=["for","if","else","unless","from","to"],R=["null","true","false","href","title","type","not-allowed","readonly","disabled"],J=N.concat(q,L,P,C,_,E,O,U,W,A,R,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function S(t){return t=t.sort(function(e,r){return r>e}),new RegExp("^(("+t.join(")|(")+"))\\b")}function p(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=!0;return e}var h,z,X,o,K=p(N),$=/^(a|b|i|s|col|em)$/i,M=p(C),Q=p(_),V=p(O),ee=p(E),te=p(q),re=S(q),ae=p(P),ie=p(L),oe=p(U),ne=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,le=S(W),se=p(A),Y=new RegExp(/^\-(moz|ms|o|webkit)-/i),ce=p(R),j="",c={};function de(t,e){if(j=t.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),e.context.line.firstWord=j?j[0].replace(/^\s*/,""):"",e.context.line.indent=t.indentation(),h=t.peek(),t.match("//"))return t.skipToEnd(),["comment","comment"];if(t.match("/*"))return e.tokenize=Z,Z(t,e);if(h=='"'||h=="'")return t.next(),e.tokenize=T(h),e.tokenize(t,e);if(h=="@")return t.next(),t.eatWhile(/[\w\\-]/),["def",t.current()];if(h=="#"){if(t.next(),t.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(t.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return t.match(Y)?["meta","vendor-prefixes"]:t.match(/^-?[0-9]?\.?[0-9]/)?(t.eatWhile(/[a-z%]/i),["number","unit"]):h=="!"?(t.next(),[t.match(/^(important|optional)/i)?"keyword":"operator","important"]):h=="."&&t.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:t.match(re)?(t.peek()=="("&&(e.tokenize=ue),["property","word"]):t.match(/^[a-z][\w-]*\(/i)?(t.backUp(1),["keyword","mixin"]):t.match(/^(\+|-)[a-z][\w-]*\(/i)?(t.backUp(1),["keyword","block-mixin"]):t.string.match(/^\s*&/)&&t.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:t.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(t.backUp(1),["variableName.special","reference"]):t.match(/^&{1}\s*$/)?["variableName.special","reference"]:t.match(le)?["operator","operator"]:t.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?t.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!b(t.current())?(t.match("."),["variable","variable-name"]):["variable","word"]:t.match(ne)?["operator",t.current()]:/[:;,{}\[\]\(\)]/.test(h)?(t.next(),[null,h]):(t.next(),[null,null])}function Z(t,e){for(var r,i=!1;(r=t.next())!=null;){if(i&&r=="/"){e.tokenize=null;break}i=r=="*"}return["comment","comment"]}function T(t){return function(e,r){for(var i,l=!1;(i=e.next())!=null;){if(i==t&&!l){t==")"&&e.backUp(1);break}l=!l&&i=="\\"}return(i==t||!l&&t!=")")&&(r.tokenize=null),["string","string"]}}function ue(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=T(")"),[null,"("]}function D(t,e,r,i){this.type=t,this.indent=e,this.prev=r,this.line=i||{firstWord:"",indent:0}}function a(t,e,r,i){return i=i>=0?i:e.indentUnit,t.context=new D(r,e.indentation()+i,t.context),r}function f(t,e,r){var i=t.context.indent-e.indentUnit;return r=r||!1,t.context=t.context.prev,r&&(t.context.indent=i),t.context.type}function B(t,e,r,i){for(var l=1;l>0;l--)r.context=r.context.prev;return function(g,x,s){return c[s.context.type](g,x,s)}(t,e,r)}function b(t){return t.toLowerCase()in K}function k(t){return(t=t.toLowerCase())in M||t in oe}function w(t){return t.toLowerCase()in se}function F(t){return t.toLowerCase().match(Y)}function y(t){var e=t.toLowerCase(),r="variable";return b(t)?r="tag":w(t)?r="block-keyword":k(t)?r="property":e in V||e in ce?r="atom":e=="return"||e in ee?r="keyword":t.match(/^[A-Z]/)&&(r="string"),r}function I(t,e){return n(e)&&(t=="{"||t=="]"||t=="hash"||t=="qualifier")||t=="block-mixin"}function G(t,e){return t=="{"&&e.match(/^\s*\$?[\w-]+/i,!1)}function H(t,e){return t==":"&&e.match(/^[a-z-]+/,!1)}function v(t){return t.sol()||t.string.match(new RegExp("^\\s*"+t.current().replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")))}function n(t){return t.eol()||t.match(/^\s*$/,!1)}function m(t){var e=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r=typeof t=="string"?t.match(e):t.string.match(e);return r?r[0].replace(/^\s*/,""):""}c.block=function(t,e,r){if(t=="comment"&&v(e)||t==","&&n(e)||t=="mixin")return a(r,e,"block",0);if(G(t,e))return a(r,e,"interpolation");if(n(e)&&t=="]"&&!/^\s*(\.|#|:|\[|\*|&)/.test(e.string)&&!b(m(e)))return a(r,e,"block",0);if(I(t,e))return a(r,e,"block");if(t=="}"&&n(e))return a(r,e,"block",0);if(t=="variable-name")return e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||w(m(e))?a(r,e,"variableName"):a(r,e,"variableName",0);if(t=="=")return n(e)||w(m(e))?a(r,e,"block"):a(r,e,"block",0);if(t=="*"&&(n(e)||e.match(/\s*(,|\.|#|\[|:|{)/,!1)))return o="tag",a(r,e,"block");if(H(t,e))return a(r,e,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(t))return a(r,e,n(e)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return a(r,e,"keyframes");if(/@extends?/.test(t))return a(r,e,"extend",0);if(t&&t.charAt(0)=="@")return e.indentation()>0&&k(e.current().slice(1))?(o="variable","block"):/(@import|@require|@charset)/.test(t)?a(r,e,"block",0):a(r,e,"block");if(t=="reference"&&n(e))return a(r,e,"block");if(t=="(")return a(r,e,"parens");if(t=="vendor-prefixes")return a(r,e,"vendorPrefixes");if(t=="word"){var i=e.current();if((o=y(i))=="property")return v(e)?a(r,e,"block",0):(o="atom","block");if(o=="tag"){if(/embed|menu|pre|progress|sub|table/.test(i)&&k(m(e))||e.string.match(new RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return o="atom","block";if($.test(i)&&(v(e)&&e.string.match(/=/)||!v(e)&&!e.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!b(m(e))))return o="variable",w(m(e))?"block":a(r,e,"block",0);if(n(e))return a(r,e,"block")}if(o=="block-keyword")return o="keyword",e.current(/(if|unless)/)&&!v(e)?"block":a(r,e,"block");if(i=="return")return a(r,e,"block",0);if(o=="variable"&&e.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return a(r,e,"block")}return r.context.type},c.parens=function(t,e,r){if(t=="(")return a(r,e,"parens");if(t==")")return r.context.prev.type=="parens"?f(r,e):e.string.match(/^[a-z][\w-]*\(/i)&&n(e)||w(m(e))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(m(e))||!e.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&b(m(e))?a(r,e,"block"):e.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||e.string.match(/^\s*(\(|\)|[0-9])/)||e.string.match(/^\s+[a-z][\w-]*\(/i)||e.string.match(/^\s+[\$-]?[a-z]/i)?a(r,e,"block",0):n(e)?a(r,e,"block"):a(r,e,"block",0);if(t&&t.charAt(0)=="@"&&k(e.current().slice(1))&&(o="variable"),t=="word"){var i=e.current();(o=y(i))=="tag"&&$.test(i)&&(o="variable"),o!="property"&&i!="to"||(o="atom")}return t=="variable-name"?a(r,e,"variableName"):H(t,e)?a(r,e,"pseudo"):r.context.type},c.vendorPrefixes=function(t,e,r){return t=="word"?(o="property",a(r,e,"block",0)):f(r,e)},c.pseudo=function(t,e,r){return k(m(e.string))?B(t,e,r):(e.match(/^[a-z-]+/),o="variableName.special",n(e)?a(r,e,"block"):f(r,e))},c.atBlock=function(t,e,r){if(t=="(")return a(r,e,"atBlock_parens");if(I(t,e))return a(r,e,"block");if(G(t,e))return a(r,e,"interpolation");if(t=="word"){var i=e.current().toLowerCase();if((o=/^(only|not|and|or)$/.test(i)?"keyword":te.hasOwnProperty(i)?"tag":ie.hasOwnProperty(i)?"attribute":ae.hasOwnProperty(i)?"property":Q.hasOwnProperty(i)?"string.special":y(e.current()))=="tag"&&n(e))return a(r,e,"block")}return t=="operator"&&/^(not|and|or)$/.test(e.current())&&(o="keyword"),r.context.type},c.atBlock_parens=function(t,e,r){if(t=="{"||t=="}")return r.context.type;if(t==")")return n(e)?a(r,e,"block"):a(r,e,"atBlock");if(t=="word"){var i=e.current().toLowerCase();return o=y(i),/^(max|min)/.test(i)&&(o="property"),o=="tag"&&(o=$.test(i)?"variable":"atom"),r.context.type}return c.atBlock(t,e,r)},c.keyframes=function(t,e,r){return e.indentation()=="0"&&(t=="}"&&v(e)||t=="]"||t=="hash"||t=="qualifier"||b(e.current()))?B(t,e,r):t=="{"?a(r,e,"keyframes"):t=="}"?v(e)?f(r,e,!0):a(r,e,"keyframes"):t=="unit"&&/^[0-9]+\%$/.test(e.current())?a(r,e,"keyframes"):t=="word"&&(o=y(e.current()))=="block-keyword"?(o="keyword",a(r,e,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(t)?a(r,e,n(e)?"block":"atBlock"):t=="mixin"?a(r,e,"block",0):r.context.type},c.interpolation=function(t,e,r){return t=="{"&&f(r,e)&&a(r,e,"block"),t=="}"?e.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||e.string.match(/^\s*[a-z]/i)&&b(m(e))?a(r,e,"block"):!e.string.match(/^(\{|\s*\&)/)||e.match(/\s*[\w-]/,!1)?a(r,e,"block",0):a(r,e,"block"):t=="variable-name"?a(r,e,"variableName",0):(t=="word"&&(o=y(e.current()))=="tag"&&(o="atom"),r.context.type)},c.extend=function(t,e,r){return t=="["||t=="="?"extend":t=="]"?f(r,e):t=="word"?(o=y(e.current()),"extend"):f(r,e)},c.variableName=function(t,e,r){return t=="string"||t=="["||t=="]"||e.current().match(/^(\.|\$)/)?(e.current().match(/^\.[\w-]+/i)&&(o="variable"),"variableName"):B(t,e,r)};const me={name:"stylus",startState:function(){return{tokenize:null,state:"block",context:new D("block",0,null)}},token:function(t,e){return!e.tokenize&&t.eatSpace()?null:((z=(e.tokenize||de)(t,e))&&typeof z=="object"&&(X=z[1],z=z[0]),o=z,e.state=c[e.state](X,t,e),o)},indent:function(t,e,r){var i=t.context,l=e&&e.charAt(0),g=i.indent,x=m(e),s=i.line.indent,d=t.context.prev?t.context.prev.line.firstWord:"",u=t.context.prev?t.context.prev.line.indent:s;return i.prev&&(l=="}"&&(i.type=="block"||i.type=="atBlock"||i.type=="keyframes")||l==")"&&(i.type=="parens"||i.type=="atBlock_parens")||l=="{"&&i.type=="at")?g=i.indent-r.unit:/(\})/.test(l)||(/@|\$|\d/.test(l)||/^\{/.test(e)||/^\s*\/(\/|\*)/.test(e)||/^\s*\/\*/.test(d)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(e)||/^(\+|-)?[a-z][\w-]*\(/i.test(e)||/^return/.test(e)||w(x)?g=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(l)||b(x)?g=/\,\s*$/.test(d)?u:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(d)||b(d)?s<=u?u:u+r.unit:s:/,\s*$/.test(e)||!F(x)&&!k(x)||(g=w(d)?s<=u?u:u+r.unit:/^\{/.test(d)?s<=u?s:u+r.unit:F(d)||k(d)?s>=u?u:s:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(d)||/=\s*$/.test(d)||b(d)||/^\$[\w-\.\[\]\'\"]/.test(d)?u+r.unit:s)),g},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},autocomplete:J}};export{me as stylus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u(t){for(var n={},e=0;e<t.length;e++)n[t[e]]=!0;return n}var s=u(["_","var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super","convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is","break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while","defer","return","inout","mutating","nonmutating","isolated","nonisolated","catch","do","rethrows","throw","throws","async","await","try","didSet","get","set","willSet","assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right","Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]),l=u(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]),p=u(["true","false","nil","self","super","_"]),d=u(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String","UInt8","UInt16","UInt32","UInt64","Void"]),h=/^\-?0b[01][01_]*/,m=/^\-?0o[0-7][0-7_]*/,v=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,_=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,k=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,x=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,g=/^\#[A-Za-z]+/,w=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function f(t,n,e){if(t.sol()&&(n.indented=t.indentation()),t.eatSpace())return null;var r,i=t.peek();if(i=="/"){if(t.match("//"))return t.skipToEnd(),"comment";if(t.match("/*"))return n.tokenize.push(c),c(t,n)}if(t.match(g))return"builtin";if(t.match(w))return"attribute";if(t.match(h)||t.match(m)||t.match(v)||t.match(_))return"number";if(t.match(x))return"property";if("+-/*%=|&<>~^?!".indexOf(i)>-1)return t.next(),"operator";if(":;,.(){}[]".indexOf(i)>-1)return t.next(),t.match(".."),"punctuation";if(r=t.match(/("""|"|')/)){var a=z.bind(null,r[0]);return n.tokenize.push(a),a(t,n)}if(t.match(k)){var o=t.current();return d.hasOwnProperty(o)?"type":p.hasOwnProperty(o)?"atom":s.hasOwnProperty(o)?(l.hasOwnProperty(o)&&(n.prev="define"),"keyword"):e=="define"?"def":"variable"}return t.next(),null}function y(){var t=0;return function(n,e,r){var i=f(n,e,r);if(i=="punctuation"){if(n.current()=="(")++t;else if(n.current()==")"){if(t==0)return n.backUp(1),e.tokenize.pop(),e.tokenize[e.tokenize.length-1](n,e);--t}}return i}}function z(t,n,e){for(var r,i=t.length==1,a=!1;r=n.peek();)if(a){if(n.next(),r=="(")return e.tokenize.push(y()),"string";a=!1}else{if(n.match(t))return e.tokenize.pop(),"string";n.next(),a=r=="\\"}return i&&e.tokenize.pop(),"string"}function c(t,n){for(var e;e=t.next();)if(e==="/"&&t.eat("*"))n.tokenize.push(c);else if(e==="*"&&t.eat("/")){n.tokenize.pop();break}return"comment"}function b(t,n,e){this.prev=t,this.align=n,this.indented=e}function A(t,n){var e=n.match(/^\s*($|\/[\/\*]|[)}\]])/,!1)?null:n.column()+1;t.context=new b(t.context,e,t.indented)}function I(t){t.context&&(t.indented=t.context.indented,t.context=t.context.prev)}const O={name:"swift",startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(t,n){var e=n.prev;n.prev=null;var r=(n.tokenize[n.tokenize.length-1]||f)(t,n,e);if(r&&r!="comment"?n.prev||(n.prev=r):n.prev=e,r=="punctuation"){var i=/[\(\[\{]|([\]\)\}])/.exec(t.current());i&&(i[1]?I:A)(n,t)}return r},indent:function(t,n,e){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);return r.align!=null?r.align-(i?1:0):r.indented+(i?0:e.unit)},languageData:{indentOnInput:/^\s*[\)\}\]]$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}};export{O as swift};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function f(e){for(var r={},t=e.split(" "),a=0;a<t.length;++a)r[t[a]]=!0;return r}var m=f("Tcl safe after append array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd close concat continue dde eof encoding error eval exec exit expr fblocked fconfigure fcopy file fileevent filename filename flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lset lsort memory msgcat namespace open package parray pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp registry regsub rename resource return scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest tclvars tell time trace unknown unset update uplevel upvar variable vwait"),p=f("if elseif else and not or eq ne in ni for foreach while switch"),d=/[+\-*&%=<>!?^\/\|]/;function s(e,r,t){return r.tokenize=t,t(e,r)}function o(e,r){var t=r.beforeParams;r.beforeParams=!1;var a,n=e.next();if(n!='"'&&n!="'"||!r.inParams){if(/[\[\]{}\(\),;\.]/.test(n))return n=="("&&t?r.inParams=!0:n==")"&&(r.inParams=!1),null;if(/\d/.test(n))return e.eatWhile(/[\w\.]/),"number";if(n=="#")return e.eat("*")?s(e,r,g):n=="#"&&e.match(/ *\[ *\[/)?s(e,r,h):(e.skipToEnd(),"comment");if(n=='"')return e.skipTo(/"/),"comment";if(n=="$")return e.eatWhile(/[$_a-z0-9A-Z\.{:]/),e.eatWhile(/}/),r.beforeParams=!0,"builtin";if(d.test(n))return e.eatWhile(d),"comment";e.eatWhile(/[\w\$_{}\xa1-\uffff]/);var c=e.current().toLowerCase();return m&&m.propertyIsEnumerable(c)?"keyword":p&&p.propertyIsEnumerable(c)?(r.beforeParams=!0,"keyword"):null}return s(e,r,(a=n,function(k,b){for(var i,l=!1,u=!1;(i=k.next())!=null;){if(i==a&&!l){u=!0;break}l=!l&&i=="\\"}return u&&(b.tokenize=o),"string"}))}function g(e,r){for(var t,a=!1;t=e.next();){if(t=="#"&&a){r.tokenize=o;break}a=t=="*"}return"comment"}function h(e,r){for(var t,a=0;t=e.next();){if(t=="#"&&a==2){r.tokenize=o;break}t=="]"?a++:t!=" "&&(a=0)}return"meta"}const x={name:"tcl",startState:function(){return{tokenize:o,beforeParams:!1,inParams:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},languageData:{commentTokens:{line:"#"}}};export{x as tcl};
|