mind-elixir 4.5.2 → 5.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/MindElixir.iife.js +9 -14
- package/dist/MindElixir.js +1253 -1177
- package/dist/MindElixirLite.iife.js +7 -12
- package/dist/MindElixirLite.js +778 -1208
- package/dist/example.iife.js +1 -1
- package/dist/example.js +14 -13
- package/dist/types/arrow.d.ts +1 -0
- package/dist/types/index.d.ts +17 -24
- package/dist/types/interact.d.ts +10 -13
- package/dist/types/methods.d.ts +16 -14
- package/dist/types/nodeOperation.d.ts +1 -2
- package/dist/types/summary.d.ts +2 -2
- package/dist/types/types/dom.d.ts +4 -1
- package/dist/types/types/index.d.ts +8 -6
- package/dist/types/utils/dragMoveHelper.d.ts +4 -3
- package/dist/types/utils/index.d.ts +5 -1
- package/dist/types/utils/pubsub.d.ts +12 -16
- package/dist/types/utils/svg.d.ts +3 -1
- package/dist/types/vanilla/src/EventEmitter.d.ts +13 -0
- package/dist/types/vanilla/src/index.d.ts +112 -0
- package/dist/types/vanilla/src/types.d.ts +84 -0
- package/dist/types/vanilla/src/utils/arrayify.d.ts +1 -0
- package/dist/types/vanilla/src/utils/browser.d.ts +2 -0
- package/dist/types/vanilla/src/utils/css.d.ts +10 -0
- package/dist/types/vanilla/src/utils/domRect.d.ts +1 -0
- package/dist/types/vanilla/src/utils/events.d.ts +29 -0
- package/dist/types/vanilla/src/utils/frames.d.ts +7 -0
- package/dist/types/vanilla/src/utils/intersects.d.ts +9 -0
- package/dist/types/vanilla/src/utils/matchesTrigger.d.ts +16 -0
- package/dist/types/vanilla/src/utils/selectAll.d.ts +8 -0
- package/package.json +3 -3
- package/readme.md +12 -1
package/dist/MindElixirLite.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:
|
|
2
|
-
(function(
|
|
3
|
-
var t, n, o, s, i, r, l = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
|
|
4
|
-
if (
|
|
5
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:hidden;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7;border-radius:3px}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary,.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
(function(t) {
|
|
3
|
+
var e, n, o, s, i, r, c = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', a = (a = document.getElementsByTagName("script"))[a.length - 1].getAttribute("data-injectcss");
|
|
4
|
+
if (a && !t.__iconfont__svg__cssinject__) {
|
|
5
|
+
t.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
7
7
|
document.write(
|
|
8
8
|
"<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>"
|
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function f() {
|
|
14
14
|
i || (i = !0, o());
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
(
|
|
19
|
-
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(
|
|
20
|
-
document.removeEventListener("DOMContentLoaded", n, !1),
|
|
21
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o =
|
|
16
|
+
e = function() {
|
|
17
|
+
var l, h, d, p;
|
|
18
|
+
(p = document.createElement("div")).innerHTML = c, c = null, (d = p.getElementsByTagName("svg")[0]) && (d.setAttribute("aria-hidden", "true"), d.style.position = "absolute", d.style.width = 0, d.style.height = 0, d.style.overflow = "hidden", l = d, (h = document.body).firstChild ? (p = l, (d = h.firstChild).parentNode.insertBefore(p, d)) : h.appendChild(l));
|
|
19
|
+
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(e, 0) : (n = function() {
|
|
20
|
+
document.removeEventListener("DOMContentLoaded", n, !1), e();
|
|
21
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = e, s = t.document, i = !1, (r = function() {
|
|
22
22
|
try {
|
|
23
23
|
s.documentElement.doScroll("left");
|
|
24
24
|
} catch {
|
|
25
25
|
return void setTimeout(r, 50);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
f();
|
|
28
28
|
})(), s.onreadystatechange = function() {
|
|
29
|
-
s.readyState == "complete" && (s.onreadystatechange = null,
|
|
29
|
+
s.readyState == "complete" && (s.onreadystatechange = null, f());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
|
-
const
|
|
32
|
+
const B = 0, X = 1, G = 2, ct = {
|
|
33
33
|
name: "Latte",
|
|
34
34
|
type: "light",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
@@ -43,7 +43,7 @@ const j = 0, te = 1, ne = 2, xe = {
|
|
|
43
43
|
"--panel-bgcolor": "#ffffff",
|
|
44
44
|
"--panel-border-color": "#eaeaea"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, lt = {
|
|
47
47
|
name: "Dark",
|
|
48
48
|
type: "dark",
|
|
49
49
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
@@ -57,319 +57,319 @@ const j = 0, te = 1, ne = 2, xe = {
|
|
|
57
57
|
"--panel-border-color": "#696969"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
61
|
-
return
|
|
60
|
+
function nt(t) {
|
|
61
|
+
return t.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
if (
|
|
67
|
-
for (let n = 0; n <
|
|
68
|
-
const o =
|
|
63
|
+
const R = function(t, e) {
|
|
64
|
+
if (e.id === t)
|
|
65
|
+
return e;
|
|
66
|
+
if (e.children && e.children.length) {
|
|
67
|
+
for (let n = 0; n < e.children.length; n++) {
|
|
68
|
+
const o = R(t, e.children[n]);
|
|
69
69
|
if (o)
|
|
70
70
|
return o;
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
} else
|
|
74
74
|
return null;
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
for (let n = 0; n <
|
|
78
|
-
|
|
75
|
+
}, J = (t, e) => {
|
|
76
|
+
if (t.parent = e, t.children)
|
|
77
|
+
for (let n = 0; n < t.children.length; n++)
|
|
78
|
+
J(t.children[n], t);
|
|
79
79
|
};
|
|
80
|
-
function
|
|
81
|
-
const s = o -
|
|
80
|
+
function W(t, e, n, o) {
|
|
81
|
+
const s = o - e, i = t - n;
|
|
82
82
|
let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
|
|
83
|
+
if (isNaN(r))
|
|
84
|
+
return;
|
|
83
85
|
i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
|
|
84
|
-
const
|
|
86
|
+
const c = 12, a = 30, f = r + a, l = r - a;
|
|
85
87
|
return {
|
|
86
|
-
x1: n + Math.cos(Math.PI *
|
|
87
|
-
y1: o - Math.sin(Math.PI *
|
|
88
|
-
x2: n + Math.cos(Math.PI *
|
|
89
|
-
y2: o - Math.sin(Math.PI *
|
|
88
|
+
x1: n + Math.cos(Math.PI * f / 180) * c,
|
|
89
|
+
y1: o - Math.sin(Math.PI * f / 180) * c,
|
|
90
|
+
x2: n + Math.cos(Math.PI * l / 180) * c,
|
|
91
|
+
y2: o - Math.sin(Math.PI * l / 180) * c
|
|
90
92
|
};
|
|
91
93
|
}
|
|
92
|
-
function
|
|
94
|
+
function V() {
|
|
93
95
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
94
96
|
}
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
+
const gt = function() {
|
|
98
|
+
const t = V();
|
|
97
99
|
return {
|
|
98
100
|
topic: this.newTopicName,
|
|
99
|
-
id:
|
|
101
|
+
id: t
|
|
100
102
|
};
|
|
101
|
-
},
|
|
103
|
+
}, N = (t, e) => {
|
|
102
104
|
let n = 0, o = 0;
|
|
103
|
-
for (;
|
|
104
|
-
n +=
|
|
105
|
+
for (; e && e !== t; )
|
|
106
|
+
n += e.offsetLeft, o += e.offsetTop, e = e.offsetParent;
|
|
105
107
|
return { offsetLeft: n, offsetTop: o };
|
|
106
|
-
}, x = (
|
|
107
|
-
for (const n in
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
mousedown: !1,
|
|
113
|
-
onMove(e, t) {
|
|
114
|
-
if (this.mousedown) {
|
|
115
|
-
this.moved = !0;
|
|
116
|
-
const n = e.movementX, o = e.movementY, { container: s, map: i, scaleVal: r } = t;
|
|
117
|
-
let l = s.scrollLeft - n, c = s.scrollTop - o;
|
|
118
|
-
if (r < 1) {
|
|
119
|
-
const d = (s.scrollWidth - i.clientWidth * r) / 2, a = (s.scrollHeight - i.clientHeight * r) / 2;
|
|
120
|
-
l = Math.max(d, Math.min(s.scrollWidth - d - s.clientWidth, l)), c = Math.max(a, Math.min(s.scrollHeight - a - s.clientHeight, c));
|
|
121
|
-
}
|
|
122
|
-
s.scrollTo(l, c);
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
clear() {
|
|
126
|
-
setTimeout(() => {
|
|
127
|
-
this.moved = !1, this.mousedown = !1;
|
|
128
|
-
}, 0);
|
|
129
|
-
}
|
|
108
|
+
}, x = (t, e) => {
|
|
109
|
+
for (const n in e)
|
|
110
|
+
t.setAttribute(n, e[n]);
|
|
111
|
+
}, yt = (t) => t ? t.tagName === "ME-TPC" : !1, at = (t) => {
|
|
112
|
+
const e = /translate\(([^,]+),\s*([^)]+)\)/, n = t.match(e);
|
|
113
|
+
return n ? { x: parseFloat(n[1]), y: parseFloat(n[2]) } : { x: 0, y: 0 };
|
|
130
114
|
};
|
|
131
|
-
function
|
|
132
|
-
e
|
|
133
|
-
|
|
134
|
-
|
|
115
|
+
function xt(t) {
|
|
116
|
+
const { dragMoveHelper: e } = t;
|
|
117
|
+
t.map.addEventListener("click", (n) => {
|
|
118
|
+
var i, r, c;
|
|
119
|
+
if (n.button !== 0)
|
|
135
120
|
return;
|
|
136
|
-
if ((
|
|
137
|
-
|
|
121
|
+
if ((i = t.helper1) != null && i.moved) {
|
|
122
|
+
t.helper1.clear();
|
|
138
123
|
return;
|
|
139
124
|
}
|
|
140
|
-
if ((
|
|
141
|
-
|
|
125
|
+
if ((r = t.helper2) != null && r.moved) {
|
|
126
|
+
t.helper2.clear();
|
|
142
127
|
return;
|
|
143
128
|
}
|
|
144
|
-
if (
|
|
145
|
-
|
|
129
|
+
if (e.moved) {
|
|
130
|
+
e.clear();
|
|
146
131
|
return;
|
|
147
132
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
else if (he(n))
|
|
153
|
-
e.selectNode(n, !1, t);
|
|
154
|
-
else if (e.editable)
|
|
155
|
-
n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectArrow(n.parentElement) : e.selectSummary(n.parentElement) : n.className;
|
|
156
|
-
else
|
|
133
|
+
const o = n.target;
|
|
134
|
+
if (o.tagName === "ME-EPD")
|
|
135
|
+
t.expandNode(o.previousSibling);
|
|
136
|
+
else if (!t.editable)
|
|
157
137
|
return;
|
|
158
|
-
|
|
159
|
-
|
|
138
|
+
const s = (c = o.parentElement) == null ? void 0 : c.parentElement;
|
|
139
|
+
s.getAttribute("class") === "topiclinks" ? t.selectArrow(o.parentElement) : s.getAttribute("class") === "summary" && t.selectSummary(o.parentElement);
|
|
140
|
+
}), t.map.addEventListener("dblclick", (n) => {
|
|
141
|
+
var i;
|
|
142
|
+
if (!t.editable)
|
|
160
143
|
return;
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
t.
|
|
165
|
-
}),
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
}),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
144
|
+
const o = n.target;
|
|
145
|
+
yt(o) && t.beginEdit(o);
|
|
146
|
+
const s = (i = o.parentElement) == null ? void 0 : i.parentElement;
|
|
147
|
+
s.getAttribute("class") === "topiclinks" ? t.editArrowLabel(o.parentElement) : s.getAttribute("class") === "summary" && t.editSummary(o.parentElement);
|
|
148
|
+
}), t.map.addEventListener("mousedown", (n) => {
|
|
149
|
+
const o = t.mouseSelectionButton === 0 ? 2 : 0;
|
|
150
|
+
n.button === o && n.target.contentEditable === "inherit" && (e.moved = !1, e.mousedown = !0, t.map.style.transition = "none");
|
|
151
|
+
}), document.addEventListener("mousemove", (n) => {
|
|
152
|
+
n.target.contentEditable === "inherit" && e.onMove(n), e.x = n.clientX, e.y = n.clientY;
|
|
153
|
+
}), document.addEventListener("mouseup", (n) => {
|
|
154
|
+
const o = t.mouseSelectionButton === 0 ? 2 : 0;
|
|
155
|
+
n.button === o && e.clear();
|
|
156
|
+
}), document.addEventListener("contextmenu", (n) => {
|
|
157
|
+
e.moved && n.preventDefault();
|
|
174
158
|
});
|
|
175
159
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
n[o](...t);
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
removeListener: function(e, t) {
|
|
193
|
-
if (!this.handlers[e])
|
|
194
|
-
return;
|
|
195
|
-
const n = this.handlers[e];
|
|
196
|
-
if (!t)
|
|
197
|
-
n.length = 0;
|
|
198
|
-
else if (n.length)
|
|
199
|
-
for (let o = 0; o < n.length; o++)
|
|
200
|
-
n[o] === t && this.handlers[e].splice(o, 1);
|
|
160
|
+
function vt() {
|
|
161
|
+
return {
|
|
162
|
+
handlers: {},
|
|
163
|
+
showHandler: function() {
|
|
164
|
+
},
|
|
165
|
+
addListener: function(t, e) {
|
|
166
|
+
this.handlers[t] === void 0 && (this.handlers[t] = []), this.handlers[t].push(e);
|
|
167
|
+
},
|
|
168
|
+
fire: function(t, ...e) {
|
|
169
|
+
if (this.handlers[t] instanceof Array) {
|
|
170
|
+
const n = this.handlers[t];
|
|
171
|
+
for (let o = 0; o < n.length; o++)
|
|
172
|
+
n[o](...e);
|
|
201
173
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const
|
|
174
|
+
},
|
|
175
|
+
removeListener: function(t, e) {
|
|
176
|
+
if (!this.handlers[t])
|
|
177
|
+
return;
|
|
178
|
+
const n = this.handlers[t];
|
|
179
|
+
if (!e)
|
|
180
|
+
n.length = 0;
|
|
181
|
+
else if (n.length)
|
|
182
|
+
for (let o = 0; o < n.length; o++)
|
|
183
|
+
n[o] === e && this.handlers[t].splice(o, 1);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
var $ = /* @__PURE__ */ ((t) => (t.LHS = "lhs", t.RHS = "rhs", t))($ || {});
|
|
188
|
+
const I = document, bt = function() {
|
|
207
189
|
this.nodes.innerHTML = "";
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
const
|
|
211
|
-
|
|
190
|
+
const t = this.createTopic(this.nodeData);
|
|
191
|
+
ht(t, this.nodeData), t.draggable = !1;
|
|
192
|
+
const e = I.createElement("me-root");
|
|
193
|
+
e.appendChild(t);
|
|
212
194
|
const n = this.nodeData.children || [];
|
|
213
|
-
if (this.direction ===
|
|
195
|
+
if (this.direction === G) {
|
|
214
196
|
let o = 0, s = 0;
|
|
215
197
|
n.map((i) => {
|
|
216
|
-
i.direction ===
|
|
198
|
+
i.direction === B ? o += 1 : i.direction === X ? s += 1 : o <= s ? (i.direction = B, o += 1) : (i.direction = X, s += 1);
|
|
217
199
|
});
|
|
218
200
|
}
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
const o =
|
|
222
|
-
o.className =
|
|
223
|
-
const s =
|
|
224
|
-
s.className =
|
|
225
|
-
for (let i = 0; i <
|
|
226
|
-
const r =
|
|
227
|
-
|
|
201
|
+
wt(this, n, e);
|
|
202
|
+
}, wt = function(t, e, n) {
|
|
203
|
+
const o = I.createElement("me-main");
|
|
204
|
+
o.className = $.LHS;
|
|
205
|
+
const s = I.createElement("me-main");
|
|
206
|
+
s.className = $.RHS;
|
|
207
|
+
for (let i = 0; i < e.length; i++) {
|
|
208
|
+
const r = e[i], { grp: c } = t.createWrapper(r);
|
|
209
|
+
t.direction === G ? r.direction === B ? o.appendChild(c) : s.appendChild(c) : t.direction === B ? o.appendChild(c) : s.appendChild(c);
|
|
228
210
|
}
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
const n =
|
|
232
|
-
for (let o = 0; o <
|
|
233
|
-
const s =
|
|
211
|
+
t.nodes.appendChild(o), t.nodes.appendChild(n), t.nodes.appendChild(s), t.nodes.appendChild(t.lines);
|
|
212
|
+
}, Ct = function(t, e) {
|
|
213
|
+
const n = I.createElement("me-children");
|
|
214
|
+
for (let o = 0; o < e.length; o++) {
|
|
215
|
+
const s = e[o], { grp: i } = t.createWrapper(s);
|
|
234
216
|
n.appendChild(i);
|
|
235
217
|
}
|
|
236
218
|
return n;
|
|
237
|
-
},
|
|
238
|
-
const o = (
|
|
219
|
+
}, S = document, M = (t, e) => {
|
|
220
|
+
const o = (e ? e.mindElixirBox : S).querySelector(`[data-nodeid=me${t}]`);
|
|
239
221
|
if (!o)
|
|
240
|
-
throw new Error(`FindEle: Node ${
|
|
222
|
+
throw new Error(`FindEle: Node ${t} not found, maybe it's collapsed.`);
|
|
241
223
|
return o;
|
|
242
|
-
},
|
|
243
|
-
if (
|
|
244
|
-
|
|
224
|
+
}, ht = function(t, e) {
|
|
225
|
+
if (t.innerHTML = "", e.style && (t.style.color = e.style.color || "", t.style.background = e.style.background || "", t.style.fontSize = e.style.fontSize + "px", t.style.fontWeight = e.style.fontWeight || "normal"), e.dangerouslySetInnerHTML) {
|
|
226
|
+
t.innerHTML = e.dangerouslySetInnerHTML;
|
|
245
227
|
return;
|
|
246
228
|
}
|
|
247
|
-
if (
|
|
248
|
-
const n =
|
|
229
|
+
if (e.image) {
|
|
230
|
+
const n = e.image;
|
|
249
231
|
if (n.url && n.width && n.height) {
|
|
250
|
-
const o =
|
|
251
|
-
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", n.fit && (o.style.objectFit = n.fit),
|
|
232
|
+
const o = S.createElement("img");
|
|
233
|
+
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", n.fit && (o.style.objectFit = n.fit), t.appendChild(o), t.image = o;
|
|
252
234
|
}
|
|
253
235
|
} else
|
|
254
|
-
|
|
236
|
+
t.image && (t.image = void 0);
|
|
255
237
|
{
|
|
256
|
-
const n =
|
|
257
|
-
n.className = "text", n.textContent =
|
|
238
|
+
const n = S.createElement("span");
|
|
239
|
+
n.className = "text", n.textContent = e.topic, t.appendChild(n), t.text = n;
|
|
258
240
|
}
|
|
259
|
-
if (
|
|
260
|
-
const n =
|
|
261
|
-
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href =
|
|
241
|
+
if (e.hyperLink) {
|
|
242
|
+
const n = S.createElement("a");
|
|
243
|
+
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = e.hyperLink, t.appendChild(n), t.link = n;
|
|
262
244
|
} else
|
|
263
|
-
|
|
264
|
-
if (
|
|
265
|
-
const n =
|
|
266
|
-
n.className = "icons", n.innerHTML =
|
|
245
|
+
t.link && (t.link = void 0);
|
|
246
|
+
if (e.icons && e.icons.length) {
|
|
247
|
+
const n = S.createElement("span");
|
|
248
|
+
n.className = "icons", n.innerHTML = e.icons.map((o) => `<span>${nt(o)}</span>`).join(""), t.appendChild(n), t.icons = n;
|
|
267
249
|
} else
|
|
268
|
-
|
|
269
|
-
if (
|
|
270
|
-
const n =
|
|
271
|
-
n.className = "tags", n.innerHTML =
|
|
250
|
+
t.icons && (t.icons = void 0);
|
|
251
|
+
if (e.tags && e.tags.length) {
|
|
252
|
+
const n = S.createElement("div");
|
|
253
|
+
n.className = "tags", n.innerHTML = e.tags.map((o) => `<span>${nt(o)}</span>`).join(""), t.appendChild(n), t.tags = n;
|
|
272
254
|
} else
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
const n =
|
|
276
|
-
if (n.appendChild(o), !
|
|
277
|
-
const i =
|
|
278
|
-
if (o.appendChild(i),
|
|
279
|
-
const r =
|
|
255
|
+
t.tags && (t.tags = void 0);
|
|
256
|
+
}, Et = function(t, e) {
|
|
257
|
+
const n = S.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(t);
|
|
258
|
+
if (n.appendChild(o), !e && t.children && t.children.length > 0) {
|
|
259
|
+
const i = Tt(t.expanded);
|
|
260
|
+
if (o.appendChild(i), t.expanded !== !1) {
|
|
261
|
+
const r = Ct(this, t.children);
|
|
280
262
|
n.appendChild(r);
|
|
281
263
|
}
|
|
282
264
|
}
|
|
283
265
|
return { grp: n, top: o, tpc: s };
|
|
284
|
-
},
|
|
285
|
-
const
|
|
286
|
-
return
|
|
287
|
-
},
|
|
288
|
-
const
|
|
289
|
-
return
|
|
290
|
-
},
|
|
291
|
-
const
|
|
292
|
-
return
|
|
266
|
+
}, St = function(t) {
|
|
267
|
+
const e = S.createElement("me-parent"), n = this.createTopic(t);
|
|
268
|
+
return ht(n, t), e.appendChild(n), { p: e, tpc: n };
|
|
269
|
+
}, Lt = function(t) {
|
|
270
|
+
const e = S.createElement("me-children");
|
|
271
|
+
return e.append(...t), e;
|
|
272
|
+
}, Mt = function(t) {
|
|
273
|
+
const e = S.createElement("me-tpc");
|
|
274
|
+
return e.nodeObj = t, e.dataset.nodeid = "me" + t.id, e.draggable = this.draggable, e;
|
|
293
275
|
};
|
|
294
|
-
function
|
|
295
|
-
const
|
|
296
|
-
|
|
276
|
+
function dt(t) {
|
|
277
|
+
const e = S.createRange();
|
|
278
|
+
e.selectNodeContents(t);
|
|
297
279
|
const n = window.getSelection();
|
|
298
|
-
n && (n.removeAllRanges(), n.addRange(
|
|
280
|
+
n && (n.removeAllRanges(), n.addRange(e));
|
|
299
281
|
}
|
|
300
|
-
const
|
|
301
|
-
if (!
|
|
282
|
+
const $t = function(t) {
|
|
283
|
+
if (!t)
|
|
302
284
|
return;
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
const o = getComputedStyle(
|
|
306
|
-
|
|
285
|
+
const e = S.createElement("div"), n = t.text.textContent;
|
|
286
|
+
t.appendChild(e), e.id = "input-box", e.textContent = n, e.contentEditable = "plaintext-only", e.spellcheck = !1;
|
|
287
|
+
const o = getComputedStyle(t);
|
|
288
|
+
e.style.cssText = `min-width:${t.offsetWidth - 8}px;
|
|
307
289
|
color:${o.color};
|
|
308
290
|
padding:${o.padding};
|
|
309
291
|
margin:${o.margin};
|
|
310
292
|
font:${o.font};
|
|
311
293
|
background-color:${o.backgroundColor !== "rgba(0, 0, 0, 0)" && o.backgroundColor};
|
|
312
|
-
border-radius:${o.borderRadius};`, this.direction ===
|
|
294
|
+
border-radius:${o.borderRadius};`, this.direction === B && (e.style.right = "0"), e.focus(), dt(e), this.bus.fire("operation", {
|
|
313
295
|
name: "beginEdit",
|
|
314
|
-
obj:
|
|
315
|
-
}),
|
|
296
|
+
obj: t.nodeObj
|
|
297
|
+
}), e.addEventListener("keydown", (s) => {
|
|
316
298
|
s.stopPropagation();
|
|
317
299
|
const i = s.key;
|
|
318
300
|
if (i === "Enter" || i === "Tab") {
|
|
319
301
|
if (s.shiftKey)
|
|
320
302
|
return;
|
|
321
|
-
s.preventDefault(),
|
|
303
|
+
s.preventDefault(), e.blur(), this.map.focus();
|
|
322
304
|
}
|
|
323
|
-
}),
|
|
305
|
+
}), e.addEventListener("blur", () => {
|
|
324
306
|
var r;
|
|
325
|
-
if (!
|
|
307
|
+
if (!e)
|
|
326
308
|
return;
|
|
327
|
-
const s =
|
|
328
|
-
i === "" ? s.topic = n : s.topic = i,
|
|
309
|
+
const s = t.nodeObj, i = ((r = e.textContent) == null ? void 0 : r.trim()) || "";
|
|
310
|
+
i === "" ? s.topic = n : s.topic = i, e.remove(), i !== n && (t.text.textContent = s.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
329
311
|
name: "finishEdit",
|
|
330
312
|
obj: s,
|
|
331
313
|
origin: n
|
|
332
314
|
}));
|
|
333
315
|
});
|
|
334
|
-
},
|
|
335
|
-
const
|
|
336
|
-
return
|
|
337
|
-
},
|
|
338
|
-
const o =
|
|
316
|
+
}, Tt = function(t) {
|
|
317
|
+
const e = S.createElement("me-epd");
|
|
318
|
+
return e.expanded = t !== !1, e.className = t !== !1 ? "minus" : "", e;
|
|
319
|
+
}, H = document, D = "http://www.w3.org/2000/svg", ft = function(t, e, n) {
|
|
320
|
+
const o = H.createElementNS(D, "path");
|
|
339
321
|
return x(o, {
|
|
340
|
-
d:
|
|
341
|
-
stroke:
|
|
322
|
+
d: t,
|
|
323
|
+
stroke: e || "#666",
|
|
342
324
|
fill: "none",
|
|
343
325
|
"stroke-width": n
|
|
344
326
|
}), o;
|
|
345
|
-
},
|
|
346
|
-
const
|
|
347
|
-
return
|
|
348
|
-
},
|
|
349
|
-
const
|
|
350
|
-
return
|
|
351
|
-
},
|
|
352
|
-
const o =
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
d:
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
|
|
327
|
+
}, O = function(t) {
|
|
328
|
+
const e = H.createElementNS(D, "svg");
|
|
329
|
+
return e.setAttribute("class", t), e.setAttribute("overflow", "visible"), e;
|
|
330
|
+
}, ot = function() {
|
|
331
|
+
const t = H.createElementNS(D, "line");
|
|
332
|
+
return t.setAttribute("stroke", "#bbb"), t.setAttribute("fill", "none"), t.setAttribute("stroke-width", "2"), t;
|
|
333
|
+
}, Nt = function(t, e, n) {
|
|
334
|
+
const o = H.createElementNS(D, "g");
|
|
335
|
+
return [
|
|
336
|
+
{
|
|
337
|
+
name: "line",
|
|
338
|
+
d: t
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: "arrow1",
|
|
342
|
+
d: e
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: "arrow2",
|
|
346
|
+
d: n
|
|
347
|
+
}
|
|
348
|
+
].forEach((i, r) => {
|
|
349
|
+
const c = i.d, a = H.createElementNS(D, "path");
|
|
350
|
+
x(a, {
|
|
351
|
+
d: c,
|
|
352
|
+
stroke: "rgb(235, 95, 82)",
|
|
353
|
+
fill: "none",
|
|
354
|
+
"stroke-linecap": "cap",
|
|
355
|
+
"stroke-width": "2"
|
|
356
|
+
}), r === 0 && a.setAttribute("stroke-dasharray", "8,2");
|
|
357
|
+
const l = H.createElementNS(D, "path");
|
|
358
|
+
x(l, {
|
|
359
|
+
d: c,
|
|
360
|
+
stroke: "transparent",
|
|
361
|
+
fill: "none",
|
|
362
|
+
"stroke-width": "15"
|
|
363
|
+
}), o.appendChild(l), o.appendChild(a), o[i.name] = a;
|
|
364
|
+
}), o;
|
|
365
|
+
}, ut = function(t, e, n) {
|
|
366
|
+
if (!e)
|
|
367
367
|
return;
|
|
368
|
-
const o =
|
|
369
|
-
|
|
370
|
-
const s =
|
|
368
|
+
const o = H.createElement("div");
|
|
369
|
+
t.nodes.appendChild(o);
|
|
370
|
+
const s = e.innerHTML;
|
|
371
371
|
o.id = "input-box", o.textContent = s, o.contentEditable = "plaintext-only", o.spellcheck = !1;
|
|
372
|
-
const i =
|
|
372
|
+
const i = e.getBBox();
|
|
373
373
|
o.style.cssText = `
|
|
374
374
|
min-width:${Math.max(88, i.width)}px;
|
|
375
375
|
position:absolute;
|
|
@@ -377,1048 +377,589 @@ const qe = function(e) {
|
|
|
377
377
|
top:${i.y}px;
|
|
378
378
|
padding: 2px 4px;
|
|
379
379
|
margin: -2px -4px;
|
|
380
|
-
`, o.focus(),
|
|
380
|
+
`, o.focus(), dt(o), o.addEventListener("keydown", (r) => {
|
|
381
381
|
r.stopPropagation();
|
|
382
|
-
const
|
|
383
|
-
if (
|
|
382
|
+
const c = r.key;
|
|
383
|
+
if (c === "Enter" || c === "Tab") {
|
|
384
384
|
if (r.shiftKey)
|
|
385
385
|
return;
|
|
386
|
-
r.preventDefault(), o.blur(),
|
|
386
|
+
r.preventDefault(), o.blur(), t.map.focus();
|
|
387
387
|
}
|
|
388
388
|
}), o.addEventListener("blur", () => {
|
|
389
|
-
|
|
389
|
+
var c;
|
|
390
|
+
if (!o)
|
|
391
|
+
return;
|
|
392
|
+
const r = ((c = o.textContent) == null ? void 0 : c.trim()) || "";
|
|
393
|
+
r === "" ? n.label = s : n.label = r, o.remove(), r !== s && (e.innerHTML = n.label, t.linkDiv(), "parent" in n ? t.bus.fire("operation", {
|
|
394
|
+
name: "finishEditSummary",
|
|
395
|
+
obj: n
|
|
396
|
+
}) : t.bus.fire("operation", {
|
|
397
|
+
name: "finishEditArrowLabel",
|
|
398
|
+
obj: n
|
|
399
|
+
}));
|
|
390
400
|
});
|
|
391
|
-
},
|
|
392
|
-
const
|
|
393
|
-
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.alignment === "root" ? this.nodes.style.left = `${1e4 - o - s / 2}px` : this.nodes.style.left = `${1e4 -
|
|
394
|
-
const
|
|
401
|
+
}, kt = function(t) {
|
|
402
|
+
const e = this.map.querySelector("me-root"), n = e.offsetTop, o = e.offsetLeft, s = e.offsetWidth, i = e.offsetHeight, c = this.map.querySelector("me-nodes").offsetWidth;
|
|
403
|
+
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.alignment === "root" ? this.nodes.style.left = `${1e4 - o - s / 2}px` : this.nodes.style.left = `${1e4 - c / 2}px`;
|
|
404
|
+
const a = this.map.querySelectorAll("me-main > me-wrapper");
|
|
395
405
|
this.lines.innerHTML = "";
|
|
396
|
-
for (let
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
406
|
+
for (let f = 0; f < a.length; f++) {
|
|
407
|
+
const l = a[f], h = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: p } = N(this.nodes, h), u = h.offsetWidth, m = h.offsetHeight, g = l.parentNode.className, y = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: p, cL: d, cW: u, cH: m, direction: g, containerHeight: this.nodes.offsetHeight }), C = this.theme.palette, v = h.nodeObj.branchColor || C[f % C.length];
|
|
408
|
+
h.style.borderColor = v, this.lines.appendChild(ft(y, v, "3"));
|
|
409
|
+
const w = l.children[0].children[1];
|
|
410
|
+
if (w && (w.style.top = (w.parentNode.offsetHeight - w.offsetHeight) / 2 + "px", g === $.LHS ? w.style.left = "-10px" : w.style.right = "-10px"), t && t !== l)
|
|
401
411
|
continue;
|
|
402
|
-
const
|
|
403
|
-
|
|
412
|
+
const b = O("subLines"), E = l.lastChild;
|
|
413
|
+
E.tagName === "svg" && E.remove(), l.appendChild(b), pt(this, b, v, l, g, !0);
|
|
404
414
|
}
|
|
405
415
|
this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
406
|
-
},
|
|
407
|
-
const r = o.firstChild,
|
|
408
|
-
if (
|
|
416
|
+
}, pt = function(t, e, n, o, s, i) {
|
|
417
|
+
const r = o.firstChild, c = o.children[1].children;
|
|
418
|
+
if (c.length === 0)
|
|
409
419
|
return;
|
|
410
|
-
const
|
|
411
|
-
for (let
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
const
|
|
415
|
-
if (
|
|
416
|
-
if (
|
|
420
|
+
const a = r.offsetTop, f = r.offsetLeft, l = r.offsetWidth, h = r.offsetHeight;
|
|
421
|
+
for (let d = 0; d < c.length; d++) {
|
|
422
|
+
const p = c[d], u = p.firstChild, m = u.offsetTop, g = u.offsetLeft, y = u.offsetWidth, C = u.offsetHeight, v = u.firstChild.nodeObj.branchColor || n, w = t.generateSubBranch({ pT: a, pL: f, pW: l, pH: h, cT: m, cL: g, cW: y, cH: C, direction: s, isFirst: i });
|
|
423
|
+
e.appendChild(ft(w, v, "2"));
|
|
424
|
+
const b = u.children[1];
|
|
425
|
+
if (b) {
|
|
426
|
+
if (b.style.bottom = -(b.offsetHeight / 2) + "px", s === $.LHS ? b.style.left = "10px" : s === $.RHS && (b.style.right = "10px"), !b.expanded)
|
|
417
427
|
continue;
|
|
418
428
|
} else
|
|
419
429
|
continue;
|
|
420
|
-
|
|
430
|
+
pt(t, e, v, p, s);
|
|
421
431
|
}
|
|
422
432
|
};
|
|
423
|
-
const
|
|
433
|
+
const k = (t, e) => {
|
|
424
434
|
const n = document.createElement("span");
|
|
425
|
-
return n.id =
|
|
426
|
-
<use xlink:href="#icon-${
|
|
435
|
+
return n.id = t, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
436
|
+
<use xlink:href="#icon-${e}"></use>
|
|
427
437
|
</svg>`, n;
|
|
428
438
|
};
|
|
429
|
-
function
|
|
430
|
-
const
|
|
431
|
-
return r.innerText = "100%",
|
|
432
|
-
|
|
439
|
+
function Ht(t) {
|
|
440
|
+
const e = document.createElement("div"), n = k("fullscreen", "full"), o = k("toCenter", "living"), s = k("zoomout", "move"), i = k("zoomin", "add"), r = document.createElement("span");
|
|
441
|
+
return r.innerText = "100%", e.appendChild(n), e.appendChild(o), e.appendChild(s), e.appendChild(i), e.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
442
|
+
t.mindElixirBox.requestFullscreen();
|
|
433
443
|
}, o.onclick = () => {
|
|
434
|
-
|
|
444
|
+
t.toCenter();
|
|
435
445
|
}, s.onclick = () => {
|
|
436
|
-
|
|
446
|
+
t.scaleVal < 0.6 || t.scale(t.scaleVal - 0.2);
|
|
437
447
|
}, i.onclick = () => {
|
|
438
|
-
|
|
439
|
-
},
|
|
448
|
+
t.scaleVal > 1.6 || t.scale(t.scaleVal + 0.2);
|
|
449
|
+
}, e;
|
|
440
450
|
}
|
|
441
|
-
function
|
|
442
|
-
const
|
|
443
|
-
return
|
|
444
|
-
|
|
451
|
+
function At(t) {
|
|
452
|
+
const e = document.createElement("div"), n = k("tbltl", "left"), o = k("tbltr", "right"), s = k("tblts", "side");
|
|
453
|
+
return e.appendChild(n), e.appendChild(o), e.appendChild(s), e.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
454
|
+
t.initLeft();
|
|
445
455
|
}, o.onclick = () => {
|
|
446
|
-
|
|
456
|
+
t.initRight();
|
|
447
457
|
}, s.onclick = () => {
|
|
448
|
-
|
|
449
|
-
},
|
|
450
|
-
}
|
|
451
|
-
function Ye(e) {
|
|
452
|
-
e.container.append(Ie(e)), e.container.append(Xe(e));
|
|
453
|
-
}
|
|
454
|
-
/*! @viselect/vanilla v3.5.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
455
|
-
var Ge = Object.defineProperty, Ke = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b = (e, t, n) => (Ke(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
456
|
-
class Je {
|
|
457
|
-
constructor() {
|
|
458
|
-
b(this, "_listeners", /* @__PURE__ */ new Map()), b(this, "on", this.addEventListener), b(this, "off", this.removeEventListener), b(this, "emit", this.dispatchEvent);
|
|
459
|
-
}
|
|
460
|
-
addEventListener(t, n) {
|
|
461
|
-
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
462
|
-
return this._listeners.set(t, o), o.add(n), this;
|
|
463
|
-
}
|
|
464
|
-
removeEventListener(t, n) {
|
|
465
|
-
var o;
|
|
466
|
-
return (o = this._listeners.get(t)) == null || o.delete(n), this;
|
|
467
|
-
}
|
|
468
|
-
dispatchEvent(t, ...n) {
|
|
469
|
-
let o = !0;
|
|
470
|
-
for (const s of this._listeners.get(t) ?? [])
|
|
471
|
-
o = s(...n) !== !1 && o;
|
|
472
|
-
return o;
|
|
473
|
-
}
|
|
474
|
-
unbindAllListeners() {
|
|
475
|
-
this._listeners.clear();
|
|
476
|
-
}
|
|
458
|
+
t.initSide();
|
|
459
|
+
}, e;
|
|
477
460
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
if (typeof t == "object")
|
|
481
|
-
for (const [o, s] of Object.entries(t))
|
|
482
|
-
s !== void 0 && (e[o] = ue(s));
|
|
483
|
-
else
|
|
484
|
-
n !== void 0 && (e[t] = ue(n));
|
|
485
|
-
}
|
|
486
|
-
const Me = (e) => (t, n, o, s = {}) => {
|
|
487
|
-
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
488
|
-
for (const i of t)
|
|
489
|
-
if (i)
|
|
490
|
-
for (const r of n)
|
|
491
|
-
i[e](r, o, { capture: !1, ...s });
|
|
492
|
-
return [t, n, o, s];
|
|
493
|
-
}, P = Me("addEventListener"), N = Me("removeEventListener"), Y = (e) => {
|
|
494
|
-
var t;
|
|
495
|
-
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
496
|
-
return { x: n, y: o, target: s };
|
|
497
|
-
};
|
|
498
|
-
function fe(e, t, n = "touch") {
|
|
499
|
-
switch (n) {
|
|
500
|
-
case "center": {
|
|
501
|
-
const o = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
502
|
-
return o >= e.left && o <= e.right && s >= e.top && s <= e.bottom;
|
|
503
|
-
}
|
|
504
|
-
case "cover":
|
|
505
|
-
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
506
|
-
case "touch":
|
|
507
|
-
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
function z(e, t = document) {
|
|
511
|
-
const n = Array.isArray(e) ? e : [e];
|
|
512
|
-
let o = [];
|
|
513
|
-
for (let s = 0, i = n.length; s < i; s++) {
|
|
514
|
-
const r = n[s];
|
|
515
|
-
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
516
|
-
}
|
|
517
|
-
return o;
|
|
518
|
-
}
|
|
519
|
-
const Ue = () => matchMedia("(hover: none), (pointer: coarse)").matches, Qe = () => "safari" in window, Ze = (e) => {
|
|
520
|
-
let t, n = -1, o = !1;
|
|
521
|
-
return {
|
|
522
|
-
next(...s) {
|
|
523
|
-
t = s, o || (o = !0, n = requestAnimationFrame(() => {
|
|
524
|
-
e(...t), o = !1;
|
|
525
|
-
}));
|
|
526
|
-
},
|
|
527
|
-
cancel() {
|
|
528
|
-
cancelAnimationFrame(n), o = !1;
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
};
|
|
532
|
-
function et(e, t) {
|
|
533
|
-
for (const n of t) {
|
|
534
|
-
if (typeof n == "number")
|
|
535
|
-
return e.button === n;
|
|
536
|
-
if (typeof n == "object") {
|
|
537
|
-
const o = n.button === e.button, s = n.modifiers.every((i) => {
|
|
538
|
-
switch (i) {
|
|
539
|
-
case "alt":
|
|
540
|
-
return e.altKey;
|
|
541
|
-
case "ctrl":
|
|
542
|
-
return e.ctrlKey || e.metaKey;
|
|
543
|
-
case "shift":
|
|
544
|
-
return e.shiftKey;
|
|
545
|
-
}
|
|
546
|
-
});
|
|
547
|
-
return o && s;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
return !1;
|
|
461
|
+
function Dt(t) {
|
|
462
|
+
t.container.append(Ht(t)), t.container.append(At(t));
|
|
551
463
|
}
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
constructor(t) {
|
|
555
|
-
var n, o, s, i, r;
|
|
556
|
-
super(), b(this, "_options"), b(this, "_selection", {
|
|
557
|
-
stored: [],
|
|
558
|
-
selected: [],
|
|
559
|
-
touched: [],
|
|
560
|
-
changed: {
|
|
561
|
-
added: [],
|
|
562
|
-
// Added elements since last selection
|
|
563
|
-
removed: []
|
|
564
|
-
// Removed elements since last selection
|
|
565
|
-
}
|
|
566
|
-
}), b(this, "_area"), b(this, "_clippingElement"), b(this, "_targetElement"), b(this, "_targetRect"), b(this, "_selectables", []), b(this, "_latestElement"), b(this, "_areaRect", new DOMRect()), b(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), b(this, "_singleClick", !0), b(this, "_frame"), b(this, "_scrollAvailable", !0), b(this, "_scrollingActive", !1), b(this, "_scrollSpeed", { x: 0, y: 0 }), b(this, "_scrollDelta", { x: 0, y: 0 }), b(this, "disable", this._bindStartEvents.bind(this, !1)), b(this, "enable", this._bindStartEvents), this._options = {
|
|
567
|
-
selectionAreaClass: "selection-area",
|
|
568
|
-
selectionContainerClass: void 0,
|
|
569
|
-
selectables: [],
|
|
570
|
-
document: window.document,
|
|
571
|
-
startAreas: ["html"],
|
|
572
|
-
boundaries: ["html"],
|
|
573
|
-
container: "body",
|
|
574
|
-
...t,
|
|
575
|
-
behaviour: {
|
|
576
|
-
overlap: "invert",
|
|
577
|
-
intersect: "touch",
|
|
578
|
-
triggers: [0],
|
|
579
|
-
...t.behaviour,
|
|
580
|
-
startThreshold: (n = t.behaviour) != null && n.startThreshold ? typeof t.behaviour.startThreshold == "number" ? t.behaviour.startThreshold : { x: 10, y: 10, ...t.behaviour.startThreshold } : { x: 10, y: 10 },
|
|
581
|
-
scrolling: {
|
|
582
|
-
speedDivider: 10,
|
|
583
|
-
manualSpeed: 750,
|
|
584
|
-
...(o = t.behaviour) == null ? void 0 : o.scrolling,
|
|
585
|
-
startScrollMargins: {
|
|
586
|
-
x: 0,
|
|
587
|
-
y: 0,
|
|
588
|
-
...(i = (s = t.behaviour) == null ? void 0 : s.scrolling) == null ? void 0 : i.startScrollMargins
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
},
|
|
592
|
-
features: {
|
|
593
|
-
range: !0,
|
|
594
|
-
touch: !0,
|
|
595
|
-
...t.features,
|
|
596
|
-
singleTap: {
|
|
597
|
-
allow: !0,
|
|
598
|
-
intersect: "native",
|
|
599
|
-
...(r = t.features) == null ? void 0 : r.singleTap
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
for (const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
604
|
-
typeof this[a] == "function" && (this[a] = this[a].bind(this));
|
|
605
|
-
const { document: l, selectionAreaClass: c, selectionContainerClass: d } = this._options;
|
|
606
|
-
this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), d && this._clippingElement.classList.add(d), A(this._area, {
|
|
607
|
-
willChange: "top, left, bottom, right, width, height",
|
|
608
|
-
top: 0,
|
|
609
|
-
left: 0,
|
|
610
|
-
position: "fixed"
|
|
611
|
-
}), A(this._clippingElement, {
|
|
612
|
-
overflow: "hidden",
|
|
613
|
-
position: "fixed",
|
|
614
|
-
transform: "translate3d(0, 0, 0)",
|
|
615
|
-
// https://stackoverflow.com/a/38268846
|
|
616
|
-
pointerEvents: "none",
|
|
617
|
-
zIndex: "1"
|
|
618
|
-
}), this._frame = Ze((a) => {
|
|
619
|
-
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", a), this._redrawSelectionArea();
|
|
620
|
-
}), this.enable();
|
|
621
|
-
}
|
|
622
|
-
_bindStartEvents(t = !0) {
|
|
623
|
-
const { document: n, features: o } = this._options, s = t ? P : N;
|
|
624
|
-
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, {
|
|
625
|
-
passive: !1
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
_onTapStart(t, n = !1) {
|
|
629
|
-
const { x: o, y: s, target: i } = Y(t), { _options: r } = this, { document: l } = this._options, c = i.getBoundingClientRect();
|
|
630
|
-
if (t instanceof MouseEvent && !et(t, r.behaviour.triggers))
|
|
631
|
-
return;
|
|
632
|
-
const d = z(r.startAreas, r.document), a = z(r.boundaries, r.document);
|
|
633
|
-
this._targetElement = a.find(
|
|
634
|
-
(f) => fe(f.getBoundingClientRect(), c)
|
|
635
|
-
);
|
|
636
|
-
const u = t.composedPath();
|
|
637
|
-
if (!this._targetElement || !d.find((f) => u.includes(f)) || !a.find((f) => u.includes(f)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
638
|
-
return;
|
|
639
|
-
this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
|
|
640
|
-
const h = l.scrollingElement ?? l.body;
|
|
641
|
-
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), P(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), P(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), P(l, "scroll", this._onScroll);
|
|
642
|
-
}
|
|
643
|
-
_onSingleTap(t) {
|
|
644
|
-
const { singleTap: { intersect: n }, range: o } = this._options.features, s = Y(t);
|
|
645
|
-
let i;
|
|
646
|
-
if (n === "native")
|
|
647
|
-
i = s.target;
|
|
648
|
-
else if (n === "touch") {
|
|
649
|
-
this.resolveSelectables();
|
|
650
|
-
const { x: l, y: c } = s;
|
|
651
|
-
i = this._selectables.find((d) => {
|
|
652
|
-
const { right: a, left: u, top: h, bottom: f } = d.getBoundingClientRect();
|
|
653
|
-
return l < a && l > u && c < f && c > h;
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
if (!i)
|
|
657
|
-
return;
|
|
658
|
-
for (this.resolveSelectables(); !this._selectables.includes(i); ) {
|
|
659
|
-
if (!i.parentElement)
|
|
660
|
-
return;
|
|
661
|
-
i = i.parentElement;
|
|
662
|
-
}
|
|
663
|
-
const { stored: r } = this._selection;
|
|
664
|
-
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
665
|
-
const l = this._latestElement, [c, d] = l.compareDocumentPosition(i) & 4 ? [i, l] : [l, i], a = [...this._selectables.filter(
|
|
666
|
-
(u) => u.compareDocumentPosition(c) & 4 && u.compareDocumentPosition(d) & 2
|
|
667
|
-
), c, d];
|
|
668
|
-
this.select(a), this._latestElement = l;
|
|
669
|
-
} else
|
|
670
|
-
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
|
|
671
|
-
}
|
|
672
|
-
_delayedTapMove(t) {
|
|
673
|
-
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: l, y: c } = Y(t);
|
|
674
|
-
if (
|
|
675
|
-
// Single number for both coordinates
|
|
676
|
-
typeof s == "number" && D(l + c - (i + r)) >= s || // Different x and y threshold
|
|
677
|
-
typeof s == "object" && D(l - i) >= s.x || D(c - r) >= s.y
|
|
678
|
-
) {
|
|
679
|
-
if (N(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
680
|
-
N(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
|
-
P(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), A(this._area, "display", "block"), z(n, o)[0].appendChild(this._clippingElement), this.resolveSelectables(), this._singleClick = !1, this._targetRect = this._targetElement.getBoundingClientRect(), this._scrollAvailable = this._targetElement.scrollHeight !== this._targetElement.clientHeight || this._targetElement.scrollWidth !== this._targetElement.clientWidth, this._scrollAvailable && (P(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
684
|
-
}
|
|
685
|
-
this._handleMoveEvent(t);
|
|
686
|
-
}
|
|
687
|
-
_setupSelectionArea() {
|
|
688
|
-
const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
689
|
-
this._scrollAvailable ? (A(t, {
|
|
690
|
-
top: s.top,
|
|
691
|
-
left: s.left,
|
|
692
|
-
width: s.width,
|
|
693
|
-
height: s.height
|
|
694
|
-
}), A(o, {
|
|
695
|
-
marginTop: -s.top,
|
|
696
|
-
marginLeft: -s.left
|
|
697
|
-
})) : (A(t, {
|
|
698
|
-
top: 0,
|
|
699
|
-
left: 0,
|
|
700
|
-
width: "100%",
|
|
701
|
-
height: "100%"
|
|
702
|
-
}), A(o, {
|
|
703
|
-
marginTop: 0,
|
|
704
|
-
marginLeft: 0
|
|
705
|
-
}));
|
|
706
|
-
}
|
|
707
|
-
_onTapMove(t) {
|
|
708
|
-
const { x: n, y: o } = Y(t), { _scrollSpeed: s, _areaLocation: i, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, d = this._targetElement;
|
|
709
|
-
if (i.x2 = n, i.y2 = o, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
|
|
710
|
-
this._scrollingActive = !0;
|
|
711
|
-
const a = () => {
|
|
712
|
-
if (!s.x && !s.y) {
|
|
713
|
-
this._scrollingActive = !1;
|
|
714
|
-
return;
|
|
715
|
-
}
|
|
716
|
-
const { scrollTop: u, scrollLeft: h } = d;
|
|
717
|
-
s.y && (d.scrollTop += ge(s.y / c), i.y1 -= d.scrollTop - u), s.x && (d.scrollLeft += ge(s.x / c), i.x1 -= d.scrollLeft - h), l.next(t), requestAnimationFrame(a);
|
|
718
|
-
};
|
|
719
|
-
requestAnimationFrame(a);
|
|
720
|
-
} else
|
|
721
|
-
l.next(t);
|
|
722
|
-
this._handleMoveEvent(t);
|
|
723
|
-
}
|
|
724
|
-
_handleMoveEvent(t) {
|
|
725
|
-
const { features: n } = this._options;
|
|
726
|
-
(n.touch && Ue() || this._scrollAvailable && Qe()) && t.preventDefault();
|
|
727
|
-
}
|
|
728
|
-
_onScroll() {
|
|
729
|
-
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
730
|
-
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
731
|
-
}
|
|
732
|
-
_manualScroll(t) {
|
|
733
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
734
|
-
this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
735
|
-
}
|
|
736
|
-
_recalculateSelectionAreaRect() {
|
|
737
|
-
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: s, _options: i } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: d, scrollWidth: a, clientWidth: u } = s, h = this._targetRect, { x1: f, y1: m } = n;
|
|
738
|
-
let { x2: g, y2: p } = n;
|
|
739
|
-
const { behaviour: { scrolling: { startScrollMargins: v } } } = i;
|
|
740
|
-
g < h.left + v.x ? (t.x = d ? -D(h.left - g + v.x) : 0, g = g < h.left ? h.left : g) : g > h.right - v.x ? (t.x = a - d - u ? D(h.left + h.width - g - v.x) : 0, g = g > h.right ? h.right : g) : t.x = 0, p < h.top + v.y ? (t.y = r ? -D(h.top - p + v.y) : 0, p = p < h.top ? h.top : p) : p > h.bottom - v.y ? (t.y = l - r - c ? D(h.top + h.height - p - v.y) : 0, p = p > h.bottom ? h.bottom : p) : t.y = 0;
|
|
741
|
-
const E = me(f, g), y = me(m, p), _ = pe(f, g), w = pe(m, p);
|
|
742
|
-
o.x = E, o.y = y, o.width = _ - E, o.height = w - y;
|
|
743
|
-
}
|
|
744
|
-
_redrawSelectionArea() {
|
|
745
|
-
const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
|
|
746
|
-
i.left = `${t}px`, i.top = `${n}px`, i.width = `${o}px`, i.height = `${s}px`;
|
|
747
|
-
}
|
|
748
|
-
_onTapStop(t, n) {
|
|
749
|
-
var o;
|
|
750
|
-
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
751
|
-
N(s, ["mousemove", "touchmove"], this._delayedTapMove), N(s, ["touchmove", "mousemove"], this._onTapMove), N(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), N(s, "scroll", this._onScroll), this._keepSelection(), t && r && i.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, N(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), A(this._area, "display", "none");
|
|
752
|
-
}
|
|
753
|
-
_updateElementSelection() {
|
|
754
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: l } = o, { intersect: c, overlap: d } = n.behaviour, a = d === "invert", u = [], h = [], f = [];
|
|
755
|
-
for (let g = 0; g < t.length; g++) {
|
|
756
|
-
const p = t[g];
|
|
757
|
-
if (fe(s, p.getBoundingClientRect(), c)) {
|
|
758
|
-
if (r.includes(p))
|
|
759
|
-
i.includes(p) && !l.includes(p) && l.push(p);
|
|
760
|
-
else if (a && i.includes(p)) {
|
|
761
|
-
f.push(p);
|
|
762
|
-
continue;
|
|
763
|
-
} else
|
|
764
|
-
h.push(p);
|
|
765
|
-
u.push(p);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
a && h.push(...i.filter((g) => !r.includes(g)));
|
|
769
|
-
const m = d === "keep";
|
|
770
|
-
for (let g = 0; g < r.length; g++) {
|
|
771
|
-
const p = r[g];
|
|
772
|
-
!u.includes(p) && !// Check if user wants to keep previously selected elements, e.g.
|
|
773
|
-
// not make them part of the current selection as soon as they're touched.
|
|
774
|
-
(m && i.includes(p)) && f.push(p);
|
|
775
|
-
}
|
|
776
|
-
o.selected = u, o.changed = { added: h, removed: f }, this._latestElement = void 0;
|
|
777
|
-
}
|
|
778
|
-
_emitEvent(t, n) {
|
|
779
|
-
return this.emit(t, {
|
|
780
|
-
event: n,
|
|
781
|
-
store: this._selection,
|
|
782
|
-
selection: this
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
_keepSelection() {
|
|
786
|
-
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n, l = o.filter((c) => !r.includes(c));
|
|
787
|
-
switch (t.behaviour.overlap) {
|
|
788
|
-
case "drop": {
|
|
789
|
-
n.stored = [
|
|
790
|
-
...l,
|
|
791
|
-
...r.filter((c) => !i.includes(c))
|
|
792
|
-
// Elements not touched
|
|
793
|
-
];
|
|
794
|
-
break;
|
|
795
|
-
}
|
|
796
|
-
case "invert": {
|
|
797
|
-
n.stored = [
|
|
798
|
-
...l,
|
|
799
|
-
...r.filter((c) => !s.removed.includes(c))
|
|
800
|
-
// Elements not removed from selection
|
|
801
|
-
];
|
|
802
|
-
break;
|
|
803
|
-
}
|
|
804
|
-
case "keep": {
|
|
805
|
-
n.stored = [
|
|
806
|
-
...r,
|
|
807
|
-
...o.filter((c) => !r.includes(c))
|
|
808
|
-
// Newly added
|
|
809
|
-
];
|
|
810
|
-
break;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
/**
|
|
815
|
-
* Manually triggers the start of a selection
|
|
816
|
-
* @param evt A MouseEvent / TouchEvent -like object
|
|
817
|
-
* @param silent If beforestart should be fired,
|
|
818
|
-
*/
|
|
819
|
-
trigger(t, n = !0) {
|
|
820
|
-
this._onTapStart(t, n);
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
* Can be used if during a selection elements have been added.
|
|
824
|
-
* Will update everything which can be selected.
|
|
825
|
-
*/
|
|
826
|
-
resolveSelectables() {
|
|
827
|
-
this._selectables = z(this._options.selectables, this._options.document);
|
|
828
|
-
}
|
|
829
|
-
/**
|
|
830
|
-
* Same as deselect, but for all elements currently selected.
|
|
831
|
-
* @param includeStored If the store should also get cleared
|
|
832
|
-
* @param quiet If move / stop events should be fired
|
|
833
|
-
*/
|
|
834
|
-
clearSelection(t = !0, n = !1) {
|
|
835
|
-
const { selected: o, stored: s, changed: i } = this._selection;
|
|
836
|
-
i.added = [], i.removed.push(
|
|
837
|
-
...o,
|
|
838
|
-
...t ? s : []
|
|
839
|
-
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
840
|
-
stored: t ? [] : s,
|
|
841
|
-
selected: [],
|
|
842
|
-
touched: [],
|
|
843
|
-
changed: { added: [], removed: [] }
|
|
844
|
-
};
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* @returns {Array} Selected elements
|
|
848
|
-
*/
|
|
849
|
-
getSelection() {
|
|
850
|
-
return this._selection.stored;
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* @returns {HTMLElement} The selection area element
|
|
854
|
-
*/
|
|
855
|
-
getSelectionArea() {
|
|
856
|
-
return this._area;
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* Cancel the current selection process.
|
|
860
|
-
* @param keepEvent {boolean} true to fire a stop event after cancel.
|
|
861
|
-
*/
|
|
862
|
-
cancel(t = !1) {
|
|
863
|
-
this._onTapStop(null, !t);
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* Unbinds all events and removes the area-element.
|
|
867
|
-
*/
|
|
868
|
-
destroy() {
|
|
869
|
-
this.cancel(), this.disable(), this._clippingElement.remove(), super.unbindAllListeners();
|
|
870
|
-
}
|
|
871
|
-
/**
|
|
872
|
-
* Adds elements to the selection
|
|
873
|
-
* @param query - CSS Query, can be an array of queries
|
|
874
|
-
* @param quiet - If this should not trigger the move event
|
|
875
|
-
*/
|
|
876
|
-
select(t, n = !1) {
|
|
877
|
-
const { changed: o, selected: s, stored: i } = this._selection, r = z(t, this._options.document).filter(
|
|
878
|
-
(l) => !s.includes(l) && !i.includes(l)
|
|
879
|
-
);
|
|
880
|
-
return i.push(...r), s.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
|
|
881
|
-
}
|
|
882
|
-
/**
|
|
883
|
-
* Removes a particular element from the selection.
|
|
884
|
-
* @param query - CSS Query, can be an array of queries
|
|
885
|
-
* @param quiet - If this should not trigger the move event
|
|
886
|
-
*/
|
|
887
|
-
deselect(t, n = !1) {
|
|
888
|
-
const { selected: o, stored: s, changed: i } = this._selection, r = z(t, this._options.document).filter(
|
|
889
|
-
(l) => o.includes(l) || s.includes(l)
|
|
890
|
-
);
|
|
891
|
-
r.length && (this._selection.stored = s.filter((l) => !r.includes(l)), this._selection.selected = o.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
892
|
-
...r.filter((l) => !i.removed.includes(l))
|
|
893
|
-
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
b(tt, "version", "3.5.1");
|
|
897
|
-
const nt = function(e, t = !0) {
|
|
898
|
-
this.theme = e;
|
|
464
|
+
const Bt = function(t, e = !0) {
|
|
465
|
+
this.theme = t;
|
|
899
466
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
900
467
|
this.container.style.cssText = "";
|
|
901
468
|
for (let s = 0; s < o.length; s++) {
|
|
902
469
|
const i = o[s];
|
|
903
470
|
this.container.style.setProperty(i, n[i]);
|
|
904
471
|
}
|
|
905
|
-
|
|
906
|
-
},
|
|
907
|
-
const n =
|
|
472
|
+
t.cssVar["--gap"] || this.container.style.setProperty("--gap", "30px"), e && this.refresh();
|
|
473
|
+
}, Pt = function(t) {
|
|
474
|
+
const n = t.parentElement.parentElement.lastElementChild;
|
|
908
475
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
909
476
|
};
|
|
910
|
-
function
|
|
477
|
+
function zt(t) {
|
|
911
478
|
return {
|
|
912
|
-
nodeData:
|
|
913
|
-
arrows:
|
|
914
|
-
summaries:
|
|
915
|
-
direction:
|
|
916
|
-
theme:
|
|
479
|
+
nodeData: t.isFocusMode ? t.nodeDataBackup : t.nodeData,
|
|
480
|
+
arrows: t.arrows,
|
|
481
|
+
summaries: t.summaries,
|
|
482
|
+
direction: t.direction,
|
|
483
|
+
theme: t.theme
|
|
917
484
|
};
|
|
918
485
|
}
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
for (const t of e)
|
|
932
|
-
t.className = "selected";
|
|
933
|
-
this.currentNodes = e, this.bus.fire(
|
|
934
|
-
"selectNodes",
|
|
935
|
-
e.map((t) => t.nodeObj)
|
|
936
|
-
);
|
|
937
|
-
}, lt = function() {
|
|
938
|
-
if (this.currentNodes)
|
|
939
|
-
for (const e of this.currentNodes)
|
|
940
|
-
e.classList.remove("selected");
|
|
941
|
-
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
942
|
-
}, ct = function() {
|
|
943
|
-
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
944
|
-
}, at = function() {
|
|
945
|
-
const e = Te(this);
|
|
946
|
-
return JSON.stringify(e, (t, n) => {
|
|
947
|
-
if (!(t === "parent" && typeof n != "string"))
|
|
486
|
+
const Ot = function(t, e, n) {
|
|
487
|
+
this.clearSelection(), t.scrollIntoView({ block: "nearest", inline: "nearest" }), this.selection.select(t), e && this.bus.fire("selectNewNode", t.nodeObj);
|
|
488
|
+
}, Vt = function(t) {
|
|
489
|
+
this.selection.select(t);
|
|
490
|
+
}, jt = function(t) {
|
|
491
|
+
this.selection.deselect(t);
|
|
492
|
+
}, qt = function() {
|
|
493
|
+
this.unselectNodes(this.currentNodes), this.unselectSummary(), this.unselectArrow();
|
|
494
|
+
}, _t = function() {
|
|
495
|
+
const t = zt(this);
|
|
496
|
+
return JSON.stringify(t, (e, n) => {
|
|
497
|
+
if (!(e === "parent" && typeof n != "string"))
|
|
948
498
|
return n;
|
|
949
499
|
});
|
|
950
|
-
},
|
|
500
|
+
}, Ft = function() {
|
|
951
501
|
return JSON.parse(this.getDataString());
|
|
952
|
-
},
|
|
953
|
-
const e = Te(this).nodeData;
|
|
954
|
-
let t = "# " + e.topic + `
|
|
955
|
-
|
|
956
|
-
`;
|
|
957
|
-
function n(o, s) {
|
|
958
|
-
for (let i = 0; i < o.length; i++)
|
|
959
|
-
s <= 6 ? t += "".padStart(s, "#") + " " + o[i].topic + `
|
|
960
|
-
|
|
961
|
-
` : t += "".padStart(s - 7, " ") + "- " + o[i].topic + `
|
|
962
|
-
`, o[i].children && n(o[i].children || [], s + 1);
|
|
963
|
-
}
|
|
964
|
-
return n(e.children || [], 2), t;
|
|
965
|
-
}, ut = function() {
|
|
502
|
+
}, Rt = function() {
|
|
966
503
|
this.editable = !0;
|
|
967
|
-
},
|
|
504
|
+
}, Wt = function() {
|
|
968
505
|
this.editable = !1;
|
|
969
|
-
},
|
|
970
|
-
this.
|
|
971
|
-
},
|
|
972
|
-
|
|
506
|
+
}, It = function(t, e = { x: 0, y: 0 }) {
|
|
507
|
+
const n = this.container.getBoundingClientRect(), o = n.width / 2 - 1e4, s = n.height / 2 - 1e4, i = this.scaleVal, r = this.map.style.transform, { x: c, y: a } = at(r), f = c - (e.x - n.left - n.width / 2), l = a - (e.y - n.top - n.height / 2), h = (o - f) * (1 - t / i), d = (s - l) * (1 - t / i);
|
|
508
|
+
this.map.style.transform = `translate(${c + h}px, ${a + d}px) scale(${t})`, this.scaleVal = t, this.bus.fire("scale", t);
|
|
509
|
+
}, Yt = function() {
|
|
510
|
+
const t = this.nodes.offsetHeight / this.container.offsetHeight, e = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(t, e));
|
|
973
511
|
this.scaleVal = n, this.map.style.transform = "scale(" + n + ")", this.bus.fire("scale", n);
|
|
974
|
-
},
|
|
975
|
-
this.
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
},
|
|
512
|
+
}, Xt = function(t, e) {
|
|
513
|
+
const { map: n, scaleVal: o, container: s, bus: i } = this, r = n.style.transform, { x: c, y: a } = at(r), f = c + t, l = a + e, h = (1 - o) * 1e4, d = 0 - h, p = -2e4 + s.offsetWidth + h, u = -2e4 + s.offsetHeight + h, m = Math.min(d, Math.max(p, f)), g = Math.min(d, Math.max(u, l));
|
|
514
|
+
n.style.transform = `translate(${m}px, ${g}px) scale(${o})`, i.fire("move", { dx: t, dy: e });
|
|
515
|
+
}, Gt = function() {
|
|
516
|
+
const t = this.container.getBoundingClientRect(), e = t.width / 2 - 1e4, n = t.height / 2 - 1e4;
|
|
517
|
+
this.map.style.transform = `translate(${e}px, ${n}px) scale(${this.scaleVal})`;
|
|
518
|
+
}, Jt = function(t) {
|
|
519
|
+
t(this);
|
|
520
|
+
}, Ut = function(t) {
|
|
521
|
+
t.nodeObj.parent && (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = t.nodeObj, this.initRight(), this.toCenter());
|
|
522
|
+
}, Kt = function() {
|
|
981
523
|
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
982
|
-
},
|
|
524
|
+
}, Qt = function() {
|
|
983
525
|
this.direction = 0, this.refresh();
|
|
984
|
-
},
|
|
526
|
+
}, Zt = function() {
|
|
985
527
|
this.direction = 1, this.refresh();
|
|
986
|
-
},
|
|
528
|
+
}, te = function() {
|
|
987
529
|
this.direction = 2, this.refresh();
|
|
988
|
-
},
|
|
989
|
-
this.locale =
|
|
990
|
-
},
|
|
991
|
-
const n =
|
|
992
|
-
typeof
|
|
993
|
-
const o =
|
|
994
|
-
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "",
|
|
995
|
-
const
|
|
996
|
-
n.children.map((
|
|
530
|
+
}, ee = function(t) {
|
|
531
|
+
this.locale = t, this.refresh();
|
|
532
|
+
}, ne = function(t, e) {
|
|
533
|
+
const n = t.nodeObj;
|
|
534
|
+
typeof e == "boolean" ? n.expanded = e : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
535
|
+
const o = t.parentNode, s = o.children[1];
|
|
536
|
+
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", Pt(t), n.expanded) {
|
|
537
|
+
const a = this.createChildren(
|
|
538
|
+
n.children.map((f) => this.createWrapper(f).grp)
|
|
997
539
|
);
|
|
998
|
-
o.parentNode.appendChild(
|
|
540
|
+
o.parentNode.appendChild(a);
|
|
999
541
|
} else
|
|
1000
542
|
o.parentNode.children[1].remove();
|
|
1001
|
-
this.linkDiv(
|
|
1002
|
-
const i =
|
|
1003
|
-
(i.bottom > r.bottom || i.top < r.top || i.right > r.right || i.left < r.left) &&
|
|
1004
|
-
},
|
|
1005
|
-
|
|
1006
|
-
},
|
|
543
|
+
this.linkDiv(t.closest("me-main > me-wrapper"));
|
|
544
|
+
const i = t.getBoundingClientRect(), r = this.container.getBoundingClientRect();
|
|
545
|
+
(i.bottom > r.bottom || i.top < r.top || i.right > r.right || i.left < r.left) && t.scrollIntoView({ block: "center", inline: "center" }), this.bus.fire("expandNode", n);
|
|
546
|
+
}, oe = function(t) {
|
|
547
|
+
t && (t = JSON.parse(JSON.stringify(t)), this.nodeData = t.nodeData, this.arrows = t.arrows || [], this.summaries = t.summaries || []), J(this.nodeData), this.layout(), this.linkDiv();
|
|
548
|
+
}, se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1007
549
|
__proto__: null,
|
|
1008
|
-
cancelFocus:
|
|
1009
|
-
clearSelection:
|
|
1010
|
-
disableEdit:
|
|
1011
|
-
enableEdit:
|
|
1012
|
-
expandNode:
|
|
1013
|
-
focusNode:
|
|
1014
|
-
getData:
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
refresh:
|
|
1022
|
-
scale:
|
|
1023
|
-
scaleFit:
|
|
1024
|
-
selectNode:
|
|
1025
|
-
selectNodes:
|
|
1026
|
-
setLocale:
|
|
1027
|
-
toCenter:
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
}, Symbol.toStringTag, { value: "Module" })), Mt = function(e) {
|
|
550
|
+
cancelFocus: Kt,
|
|
551
|
+
clearSelection: qt,
|
|
552
|
+
disableEdit: Wt,
|
|
553
|
+
enableEdit: Rt,
|
|
554
|
+
expandNode: ne,
|
|
555
|
+
focusNode: Ut,
|
|
556
|
+
getData: Ft,
|
|
557
|
+
getDataString: _t,
|
|
558
|
+
initLeft: Qt,
|
|
559
|
+
initRight: Zt,
|
|
560
|
+
initSide: te,
|
|
561
|
+
install: Jt,
|
|
562
|
+
move: Xt,
|
|
563
|
+
refresh: oe,
|
|
564
|
+
scale: It,
|
|
565
|
+
scaleFit: Yt,
|
|
566
|
+
selectNode: Ot,
|
|
567
|
+
selectNodes: Vt,
|
|
568
|
+
setLocale: ee,
|
|
569
|
+
toCenter: Gt,
|
|
570
|
+
unselectNodes: jt
|
|
571
|
+
}, Symbol.toStringTag, { value: "Module" })), ie = function(t) {
|
|
1031
572
|
return {
|
|
1032
|
-
dom:
|
|
573
|
+
dom: t,
|
|
1033
574
|
moved: !1,
|
|
1034
575
|
// diffrentiate click and move
|
|
1035
576
|
mousedown: !1,
|
|
1036
|
-
handleMouseMove(
|
|
1037
|
-
this.mousedown && (this.moved = !0, this.cb && this.cb(
|
|
577
|
+
handleMouseMove(e) {
|
|
578
|
+
this.mousedown && (this.moved = !0, this.cb && this.cb(e.movementX, e.movementY));
|
|
1038
579
|
},
|
|
1039
|
-
handleMouseDown(
|
|
1040
|
-
|
|
580
|
+
handleMouseDown(e) {
|
|
581
|
+
e.button === 0 && (this.mousedown = !0);
|
|
1041
582
|
},
|
|
1042
|
-
handleClear(
|
|
583
|
+
handleClear(e) {
|
|
1043
584
|
this.mousedown = !1;
|
|
1044
585
|
},
|
|
1045
586
|
cb: null,
|
|
1046
|
-
init(
|
|
1047
|
-
this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this),
|
|
587
|
+
init(e, n) {
|
|
588
|
+
this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this), e.addEventListener("mousemove", this.handleMouseMove), e.addEventListener("mouseleave", this.handleClear), e.addEventListener("mouseup", this.handleClear), this.dom.addEventListener("mousedown", this.handleMouseDown);
|
|
1048
589
|
},
|
|
1049
|
-
destory(
|
|
1050
|
-
|
|
590
|
+
destory(e) {
|
|
591
|
+
e.removeEventListener("mousemove", this.handleMouseMove), e.removeEventListener("mouseleave", this.handleClear), e.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
|
|
1051
592
|
},
|
|
1052
593
|
clear() {
|
|
1053
594
|
this.moved = !1, this.mousedown = !1;
|
|
1054
595
|
}
|
|
1055
596
|
};
|
|
1056
|
-
},
|
|
1057
|
-
create:
|
|
597
|
+
}, st = {
|
|
598
|
+
create: ie
|
|
1058
599
|
};
|
|
1059
|
-
function
|
|
1060
|
-
const { offsetLeft: o, offsetTop: s } =
|
|
600
|
+
function Y(t, e, n) {
|
|
601
|
+
const { offsetLeft: o, offsetTop: s } = N(t.nodes, e), i = e.offsetWidth, r = e.offsetHeight, c = o + i / 2, a = s + r / 2, f = c + n.x, l = a + n.y;
|
|
1061
602
|
return {
|
|
1062
603
|
w: i,
|
|
1063
604
|
h: r,
|
|
1064
|
-
cx:
|
|
1065
|
-
cy:
|
|
1066
|
-
ctrlX:
|
|
1067
|
-
ctrlY:
|
|
605
|
+
cx: c,
|
|
606
|
+
cy: a,
|
|
607
|
+
ctrlX: f,
|
|
608
|
+
ctrlY: l
|
|
1068
609
|
};
|
|
1069
610
|
}
|
|
1070
|
-
function
|
|
1071
|
-
let
|
|
1072
|
-
const o = (
|
|
1073
|
-
return o >
|
|
1074
|
-
x:
|
|
611
|
+
function A(t) {
|
|
612
|
+
let e, n;
|
|
613
|
+
const o = (t.cy - t.ctrlY) / (t.ctrlX - t.cx);
|
|
614
|
+
return o > t.h / t.w || o < -t.h / t.w ? t.cy - t.ctrlY < 0 ? (e = t.cx - t.h / 2 / o, n = t.cy + t.h / 2) : (e = t.cx + t.h / 2 / o, n = t.cy - t.h / 2) : t.cx - t.ctrlX < 0 ? (e = t.cx + t.w / 2, n = t.cy - t.w * o / 2) : (e = t.cx - t.w / 2, n = t.cy + t.w * o / 2), {
|
|
615
|
+
x: e,
|
|
1075
616
|
y: n
|
|
1076
617
|
};
|
|
1077
618
|
}
|
|
1078
|
-
const
|
|
619
|
+
const re = function(t, e, n, o) {
|
|
1079
620
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1080
621
|
return x(s, {
|
|
1081
622
|
"text-anchor": "middle",
|
|
1082
|
-
x:
|
|
623
|
+
x: e + "",
|
|
1083
624
|
y: n + "",
|
|
1084
625
|
fill: o || "#666"
|
|
1085
|
-
}), s.dataset.type = "custom-link", s.innerHTML =
|
|
1086
|
-
},
|
|
1087
|
-
if (!
|
|
626
|
+
}), s.dataset.type = "custom-link", s.innerHTML = t, s;
|
|
627
|
+
}, U = function(t, e, n, o, s) {
|
|
628
|
+
if (!e || !n)
|
|
1088
629
|
return;
|
|
1089
630
|
performance.now();
|
|
1090
|
-
const i =
|
|
1091
|
-
|
|
631
|
+
const i = Y(t, e, o.delta1), r = Y(t, n, o.delta2), { x: c, y: a } = A(i), { ctrlX: f, ctrlY: l } = i, { ctrlX: h, ctrlY: d } = r, { x: p, y: u } = A(r), m = W(h, d, p, u);
|
|
632
|
+
if (!m)
|
|
633
|
+
return;
|
|
634
|
+
const g = `M ${m.x1} ${m.y1} L ${p} ${u} L ${m.x2} ${m.y2}`;
|
|
635
|
+
let y = "";
|
|
1092
636
|
if (o.bidirectional) {
|
|
1093
|
-
const
|
|
1094
|
-
|
|
637
|
+
const E = W(f, l, c, a);
|
|
638
|
+
if (!E)
|
|
639
|
+
return;
|
|
640
|
+
y = `M ${E.x1} ${E.y1} L ${c} ${a} L ${E.x2} ${E.y2}`;
|
|
1095
641
|
}
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1098
|
-
},
|
|
642
|
+
const C = Nt(`M ${c} ${a} C ${f} ${l} ${h} ${d} ${p} ${u}`, g, y), v = c / 8 + f * 3 / 8 + h * 3 / 8 + p / 8, w = a / 8 + l * 3 / 8 + d * 3 / 8 + u / 8, b = re(o.label, v, w, t.theme.cssVar["--color"]);
|
|
643
|
+
C.appendChild(b), C.label = b, C.arrowObj = o, C.dataset.linkid = o.id, t.linkSvgGroup.appendChild(C), s || (t.arrows.push(o), t.currentArrow = C, mt(t, o, i, r)), performance.now();
|
|
644
|
+
}, ce = function(t, e, n = {}) {
|
|
1099
645
|
const o = {
|
|
1100
|
-
id:
|
|
646
|
+
id: V(),
|
|
1101
647
|
label: "Custom Link",
|
|
1102
|
-
from:
|
|
1103
|
-
to:
|
|
648
|
+
from: t.nodeObj.id,
|
|
649
|
+
to: e.nodeObj.id,
|
|
1104
650
|
delta1: {
|
|
1105
|
-
x:
|
|
1106
|
-
y:
|
|
651
|
+
x: t.offsetWidth / 2 + 100,
|
|
652
|
+
y: 0
|
|
1107
653
|
},
|
|
1108
654
|
delta2: {
|
|
1109
|
-
x:
|
|
1110
|
-
y:
|
|
655
|
+
x: e.offsetWidth / 2 + 100,
|
|
656
|
+
y: 0
|
|
1111
657
|
},
|
|
1112
658
|
...n
|
|
1113
659
|
};
|
|
1114
|
-
|
|
660
|
+
U(this, t, e, o), this.bus.fire("operation", {
|
|
1115
661
|
name: "createArrow",
|
|
1116
662
|
obj: o
|
|
1117
663
|
});
|
|
1118
|
-
},
|
|
1119
|
-
|
|
1120
|
-
|
|
664
|
+
}, le = function(t) {
|
|
665
|
+
const e = { ...t, id: V() };
|
|
666
|
+
U(this, M(e.from), M(e.to), e), this.bus.fire("operation", {
|
|
667
|
+
name: "createArrow",
|
|
668
|
+
obj: e
|
|
669
|
+
});
|
|
670
|
+
}, ae = function(t) {
|
|
671
|
+
let e;
|
|
672
|
+
if (t ? e = t : e = this.currentArrow, !e)
|
|
1121
673
|
return;
|
|
1122
|
-
|
|
1123
|
-
const n =
|
|
1124
|
-
this.arrows = this.arrows.filter((o) => o.id !== n),
|
|
674
|
+
K(this);
|
|
675
|
+
const n = e.arrowObj.id;
|
|
676
|
+
this.arrows = this.arrows.filter((o) => o.id !== n), e.remove(), this.bus.fire("operation", {
|
|
1125
677
|
name: "removeArrow",
|
|
1126
678
|
obj: {
|
|
1127
679
|
id: n
|
|
1128
680
|
}
|
|
1129
681
|
});
|
|
1130
|
-
},
|
|
1131
|
-
this.currentArrow =
|
|
1132
|
-
const
|
|
1133
|
-
|
|
1134
|
-
},
|
|
1135
|
-
this.currentArrow = null,
|
|
1136
|
-
},
|
|
1137
|
-
var
|
|
1138
|
-
(
|
|
1139
|
-
},
|
|
1140
|
-
|
|
1141
|
-
let { x: s, y: i } =
|
|
1142
|
-
|
|
682
|
+
}, he = function(t) {
|
|
683
|
+
this.currentArrow = t;
|
|
684
|
+
const e = t.arrowObj, n = M(e.from), o = M(e.to), s = Y(this, n, e.delta1), i = Y(this, o, e.delta2);
|
|
685
|
+
mt(this, e, s, i);
|
|
686
|
+
}, de = function() {
|
|
687
|
+
this.currentArrow = null, K(this);
|
|
688
|
+
}, K = function(t) {
|
|
689
|
+
var e, n;
|
|
690
|
+
(e = t.helper1) == null || e.destory(t.map), (n = t.helper2) == null || n.destory(t.map), t.linkController.style.display = "none", t.P2.style.display = "none", t.P3.style.display = "none";
|
|
691
|
+
}, mt = function(t, e, n, o) {
|
|
692
|
+
t.linkController.style.display = "initial", t.P2.style.display = "initial", t.P3.style.display = "initial", t.nodes.appendChild(t.linkController), t.nodes.appendChild(t.P2), t.nodes.appendChild(t.P3);
|
|
693
|
+
let { x: s, y: i } = A(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: a, ctrlY: f } = o, { x: l, y: h } = A(o);
|
|
694
|
+
t.P2.style.cssText = `top:${c}px;left:${r}px;`, t.P3.style.cssText = `top:${f}px;left:${a}px;`, x(t.line1, {
|
|
1143
695
|
x1: s + "",
|
|
1144
696
|
y1: i + "",
|
|
1145
697
|
x2: r + "",
|
|
1146
|
-
y2:
|
|
1147
|
-
}), x(
|
|
1148
|
-
x1:
|
|
1149
|
-
y1:
|
|
1150
|
-
x2:
|
|
1151
|
-
y2:
|
|
1152
|
-
}),
|
|
1153
|
-
if (!
|
|
698
|
+
y2: c + ""
|
|
699
|
+
}), x(t.line2, {
|
|
700
|
+
x1: a + "",
|
|
701
|
+
y1: f + "",
|
|
702
|
+
x2: l + "",
|
|
703
|
+
y2: h + ""
|
|
704
|
+
}), t.helper1 = st.create(t.P2), t.helper2 = st.create(t.P3), t.helper1.init(t.map, (d, p) => {
|
|
705
|
+
if (!t.currentArrow)
|
|
1154
706
|
return;
|
|
1155
|
-
r = r +
|
|
1156
|
-
const
|
|
1157
|
-
s =
|
|
1158
|
-
const
|
|
1159
|
-
if (
|
|
1160
|
-
const
|
|
1161
|
-
|
|
707
|
+
r = r + d / t.scaleVal, c = c + p / t.scaleVal;
|
|
708
|
+
const u = A({ ...n, ctrlX: r, ctrlY: c });
|
|
709
|
+
s = u.x, i = u.y;
|
|
710
|
+
const m = s / 8 + r * 3 / 8 + a * 3 / 8 + l / 8, g = i / 8 + c * 3 / 8 + f * 3 / 8 + h / 8;
|
|
711
|
+
if (t.P2.style.top = c + "px", t.P2.style.left = r + "px", t.currentArrow.line.setAttribute("d", `M ${s} ${i} C ${r} ${c} ${a} ${f} ${l} ${h}`), e.bidirectional) {
|
|
712
|
+
const y = W(r, c, s, i);
|
|
713
|
+
if (!y)
|
|
714
|
+
return;
|
|
715
|
+
t.currentArrow.arrow2.setAttribute("d", `M ${y.x1} ${y.y1} L ${s} ${i} L ${y.x2} ${y.y2}`);
|
|
1162
716
|
}
|
|
1163
|
-
x(
|
|
1164
|
-
x:
|
|
1165
|
-
y:
|
|
1166
|
-
}), x(
|
|
717
|
+
x(t.currentArrow.label, {
|
|
718
|
+
x: m + "",
|
|
719
|
+
y: g + ""
|
|
720
|
+
}), x(t.line1, {
|
|
1167
721
|
x1: s + "",
|
|
1168
722
|
y1: i + "",
|
|
1169
723
|
x2: r + "",
|
|
1170
|
-
y2:
|
|
1171
|
-
}),
|
|
1172
|
-
}),
|
|
1173
|
-
if (!
|
|
724
|
+
y2: c + ""
|
|
725
|
+
}), e.delta1.x = r - n.cx, e.delta1.y = c - n.cy, t.bus.fire("updateArrowDelta", e);
|
|
726
|
+
}), t.helper2.init(t.map, (d, p) => {
|
|
727
|
+
if (!t.currentArrow)
|
|
1174
728
|
return;
|
|
1175
|
-
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
x:
|
|
1181
|
-
y:
|
|
1182
|
-
}), x(
|
|
1183
|
-
x1:
|
|
1184
|
-
y1:
|
|
1185
|
-
x2:
|
|
1186
|
-
y2:
|
|
1187
|
-
}),
|
|
729
|
+
a = a + d / t.scaleVal, f = f + p / t.scaleVal;
|
|
730
|
+
const u = A({ ...o, ctrlX: a, ctrlY: f });
|
|
731
|
+
l = u.x, h = u.y;
|
|
732
|
+
const m = s / 8 + r * 3 / 8 + a * 3 / 8 + l / 8, g = i / 8 + c * 3 / 8 + f * 3 / 8 + h / 8, y = W(a, f, l, h);
|
|
733
|
+
y && (t.P3.style.top = f + "px", t.P3.style.left = a + "px", t.currentArrow.line.setAttribute("d", `M ${s} ${i} C ${r} ${c} ${a} ${f} ${l} ${h}`), t.currentArrow.arrow1.setAttribute("d", `M ${y.x1} ${y.y1} L ${l} ${h} L ${y.x2} ${y.y2}`), x(t.currentArrow.label, {
|
|
734
|
+
x: m + "",
|
|
735
|
+
y: g + ""
|
|
736
|
+
}), x(t.line2, {
|
|
737
|
+
x1: a + "",
|
|
738
|
+
y1: f + "",
|
|
739
|
+
x2: l + "",
|
|
740
|
+
y2: h + ""
|
|
741
|
+
}), e.delta2.x = a - o.cx, e.delta2.y = f - o.cy, t.bus.fire("updateArrowDelta", e));
|
|
1188
742
|
});
|
|
1189
743
|
};
|
|
1190
|
-
function
|
|
744
|
+
function fe() {
|
|
1191
745
|
this.linkSvgGroup.innerHTML = "";
|
|
1192
|
-
for (let
|
|
1193
|
-
const
|
|
746
|
+
for (let t = 0; t < this.arrows.length; t++) {
|
|
747
|
+
const e = this.arrows[t];
|
|
1194
748
|
try {
|
|
1195
|
-
|
|
749
|
+
U(this, M(e.from), M(e.to), e, !0);
|
|
1196
750
|
} catch {
|
|
1197
751
|
}
|
|
1198
752
|
}
|
|
1199
753
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1200
754
|
}
|
|
1201
|
-
function
|
|
1202
|
-
if (
|
|
755
|
+
function ue(t) {
|
|
756
|
+
if (K(this), !t)
|
|
1203
757
|
return;
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1206
|
-
var i;
|
|
1207
|
-
const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1208
|
-
s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
1209
|
-
name: "finishEditArrowLabel",
|
|
1210
|
-
obj: o
|
|
1211
|
-
}));
|
|
1212
|
-
});
|
|
758
|
+
const e = t.label;
|
|
759
|
+
ut(this, e, t.arrowObj);
|
|
1213
760
|
}
|
|
1214
|
-
function
|
|
1215
|
-
this.arrows = this.arrows.filter((
|
|
761
|
+
function pe() {
|
|
762
|
+
this.arrows = this.arrows.filter((t) => R(t.from, this.nodeData) && R(t.to, this.nodeData));
|
|
1216
763
|
}
|
|
1217
|
-
const
|
|
764
|
+
const me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1218
765
|
__proto__: null,
|
|
1219
|
-
createArrow:
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
766
|
+
createArrow: ce,
|
|
767
|
+
createArrowFrom: le,
|
|
768
|
+
editArrowLabel: ue,
|
|
769
|
+
removeArrow: ae,
|
|
770
|
+
renderArrow: fe,
|
|
771
|
+
selectArrow: he,
|
|
772
|
+
tidyArrow: pe,
|
|
773
|
+
unselectArrow: de
|
|
774
|
+
}, Symbol.toStringTag, { value: "Module" })), ge = function(t) {
|
|
775
|
+
var a, f;
|
|
776
|
+
if (t.length === 0)
|
|
1229
777
|
throw new Error("No selected node.");
|
|
1230
|
-
if (
|
|
1231
|
-
const
|
|
1232
|
-
if (!
|
|
778
|
+
if (t.length === 1) {
|
|
779
|
+
const l = t[0].nodeObj, h = t[0].nodeObj.parent;
|
|
780
|
+
if (!h)
|
|
1233
781
|
throw new Error("Can not select root node.");
|
|
1234
|
-
const
|
|
782
|
+
const d = h.children.findIndex((p) => l === p);
|
|
1235
783
|
return {
|
|
1236
|
-
parent:
|
|
1237
|
-
start:
|
|
1238
|
-
end:
|
|
784
|
+
parent: h.id,
|
|
785
|
+
start: d,
|
|
786
|
+
end: d
|
|
1239
787
|
};
|
|
1240
788
|
}
|
|
1241
|
-
let
|
|
1242
|
-
const n =
|
|
1243
|
-
let
|
|
1244
|
-
const
|
|
1245
|
-
for (;
|
|
1246
|
-
const
|
|
1247
|
-
|
|
789
|
+
let e = 0;
|
|
790
|
+
const n = t.map((l) => {
|
|
791
|
+
let h = l.nodeObj;
|
|
792
|
+
const d = [];
|
|
793
|
+
for (; h.parent; ) {
|
|
794
|
+
const p = h.parent, u = p.children, m = u == null ? void 0 : u.indexOf(h);
|
|
795
|
+
h = p, d.unshift({ node: h, index: m });
|
|
1248
796
|
}
|
|
1249
|
-
return
|
|
797
|
+
return d.length > e && (e = d.length), d;
|
|
1250
798
|
});
|
|
1251
799
|
let o = 0;
|
|
1252
|
-
|
|
1253
|
-
for (; o <
|
|
1254
|
-
const
|
|
1255
|
-
for (let
|
|
1256
|
-
if (((
|
|
1257
|
-
break
|
|
800
|
+
t:
|
|
801
|
+
for (; o < e; o++) {
|
|
802
|
+
const l = (a = n[0][o]) == null ? void 0 : a.node;
|
|
803
|
+
for (let h = 1; h < n.length; h++)
|
|
804
|
+
if (((f = n[h][o]) == null ? void 0 : f.node) !== l)
|
|
805
|
+
break t;
|
|
1258
806
|
}
|
|
1259
807
|
if (!o)
|
|
1260
808
|
throw new Error("Can not select root node.");
|
|
1261
|
-
const s = n.map((
|
|
1262
|
-
if (!
|
|
809
|
+
const s = n.map((l) => l[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, c = n[0][o - 1].node;
|
|
810
|
+
if (!c.parent)
|
|
1263
811
|
throw new Error("Please select nodes in the same main topic.");
|
|
1264
812
|
return {
|
|
1265
|
-
parent:
|
|
813
|
+
parent: c.id,
|
|
1266
814
|
start: i,
|
|
1267
815
|
end: r
|
|
1268
816
|
};
|
|
1269
|
-
},
|
|
1270
|
-
const
|
|
1271
|
-
return
|
|
1272
|
-
},
|
|
817
|
+
}, ye = function(t) {
|
|
818
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
819
|
+
return e.setAttribute("id", t), e;
|
|
820
|
+
}, it = function(t, e) {
|
|
1273
821
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1274
822
|
return x(n, {
|
|
1275
|
-
d:
|
|
1276
|
-
stroke:
|
|
823
|
+
d: t,
|
|
824
|
+
stroke: e || "#666",
|
|
1277
825
|
fill: "none",
|
|
1278
826
|
"stroke-linecap": "round",
|
|
1279
827
|
"stroke-width": "2"
|
|
1280
828
|
}), n;
|
|
1281
|
-
},
|
|
829
|
+
}, rt = function(t, e, n, o, s) {
|
|
1282
830
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1283
831
|
return x(i, {
|
|
1284
832
|
"text-anchor": o,
|
|
1285
|
-
x:
|
|
833
|
+
x: e + "",
|
|
1286
834
|
y: n + "",
|
|
1287
835
|
fill: s || "#666"
|
|
1288
|
-
}), i.innerHTML =
|
|
1289
|
-
},
|
|
1290
|
-
const n = M(
|
|
836
|
+
}), i.innerHTML = t, i;
|
|
837
|
+
}, xe = (t) => M(t).parentElement.parentElement, ve = function({ parent: t, start: e }) {
|
|
838
|
+
const n = M(t), o = n.nodeObj;
|
|
1291
839
|
let s;
|
|
1292
|
-
return o.parent ? s = n.closest("me-main").className : s = M(o.children[
|
|
1293
|
-
},
|
|
1294
|
-
var
|
|
1295
|
-
const { id: n,
|
|
1296
|
-
let
|
|
1297
|
-
for (let
|
|
1298
|
-
const
|
|
1299
|
-
if (!
|
|
1300
|
-
return
|
|
1301
|
-
const
|
|
1302
|
-
|
|
840
|
+
return o.parent ? s = n.closest("me-main").className : s = M(o.children[e].id).closest("me-main").className, s;
|
|
841
|
+
}, Q = function(t, e) {
|
|
842
|
+
var E;
|
|
843
|
+
const { id: n, label: o, parent: s, start: i, end: r } = e, c = t.nodes, f = M(s).nodeObj, l = ve(e);
|
|
844
|
+
let h = 1 / 0, d = 0, p = 0, u = 0;
|
|
845
|
+
for (let P = i; P <= r; P++) {
|
|
846
|
+
const Z = (E = f.children) == null ? void 0 : E[P];
|
|
847
|
+
if (!Z)
|
|
848
|
+
return t.removeSummary(n), null;
|
|
849
|
+
const j = xe(Z.id), { offsetLeft: q, offsetTop: tt } = N(c, j), et = i === r ? 10 : 20;
|
|
850
|
+
P === i && (p = tt + et), P === r && (u = tt + j.offsetHeight - et), q < h && (h = q), j.offsetWidth + q > d && (d = j.offsetWidth + q);
|
|
1303
851
|
}
|
|
1304
|
-
let
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
const
|
|
1308
|
-
return
|
|
1309
|
-
},
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
const { parent:
|
|
852
|
+
let m, g;
|
|
853
|
+
const y = p + 10, C = u + 10, v = (y + C) / 2, w = t.theme.cssVar["--color"];
|
|
854
|
+
l === $.LHS ? (m = it(`M ${h + 10} ${y} c -5 0 -10 5 -10 10 L ${h} ${C - 10} c 0 5 5 10 10 10 M ${h} ${v} h -10`, w), g = rt(o, h - 20, v + 6, "end", w)) : (m = it(`M ${d - 10} ${y} c 5 0 10 5 10 10 L ${d} ${C - 10} c 0 5 -5 10 -10 10 M ${d} ${v} h 10`, w), g = rt(o, d + 20, v + 6, "start", w));
|
|
855
|
+
const b = ye("s-" + n);
|
|
856
|
+
return b.appendChild(m), b.appendChild(g), b.summaryObj = e, t.summarySvg.appendChild(b), b;
|
|
857
|
+
}, be = function() {
|
|
858
|
+
if (!this.currentNodes)
|
|
859
|
+
return;
|
|
860
|
+
const t = this.currentNodes, { parent: e, start: n, end: o } = ge(t), s = { id: V(), parent: e, start: n, end: o, label: "summary" }, i = Q(this, s);
|
|
1313
861
|
this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
|
|
1314
862
|
name: "createSummary",
|
|
1315
863
|
obj: s
|
|
1316
864
|
});
|
|
1317
|
-
},
|
|
1318
|
-
const
|
|
1319
|
-
|
|
865
|
+
}, we = function(t) {
|
|
866
|
+
const e = V(), n = { ...t, id: e };
|
|
867
|
+
Q(this, n), this.summaries.push(n), this.bus.fire("operation", {
|
|
1320
868
|
name: "createSummary",
|
|
1321
869
|
obj: n
|
|
1322
870
|
});
|
|
1323
|
-
},
|
|
871
|
+
}, Ce = function(t) {
|
|
1324
872
|
var n;
|
|
1325
|
-
const
|
|
1326
|
-
|
|
873
|
+
const e = this.summaries.findIndex((o) => o.id === t);
|
|
874
|
+
e > -1 && (this.summaries.splice(e, 1), (n = document.querySelector("#s-" + t)) == null || n.remove()), this.bus.fire("operation", {
|
|
1327
875
|
name: "removeSummary",
|
|
1328
|
-
obj: { id:
|
|
876
|
+
obj: { id: t }
|
|
1329
877
|
});
|
|
1330
|
-
},
|
|
1331
|
-
const
|
|
878
|
+
}, Ee = function(t) {
|
|
879
|
+
const e = t.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1332
880
|
x(s, {
|
|
1333
|
-
x:
|
|
1334
|
-
y:
|
|
1335
|
-
width:
|
|
1336
|
-
height:
|
|
881
|
+
x: e.x - n + "",
|
|
882
|
+
y: e.y - n + "",
|
|
883
|
+
width: e.width + n * 2 + "",
|
|
884
|
+
height: e.height + n * 2 + "",
|
|
1337
885
|
rx: o + "",
|
|
1338
886
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
1339
887
|
"stroke-width": "2",
|
|
1340
888
|
fill: "none"
|
|
1341
|
-
}),
|
|
1342
|
-
},
|
|
1343
|
-
var
|
|
1344
|
-
(
|
|
1345
|
-
},
|
|
1346
|
-
this.summarySvg.innerHTML = "", this.summaries.forEach((
|
|
889
|
+
}), t.appendChild(s), this.currentSummary = t;
|
|
890
|
+
}, Se = function() {
|
|
891
|
+
var t, e;
|
|
892
|
+
(e = (t = this.currentSummary) == null ? void 0 : t.querySelector("rect")) == null || e.remove(), this.currentSummary = null;
|
|
893
|
+
}, Le = function() {
|
|
894
|
+
this.summarySvg.innerHTML = "", this.summaries.forEach((t) => {
|
|
1347
895
|
try {
|
|
1348
|
-
|
|
896
|
+
Q(this, t);
|
|
1349
897
|
} catch {
|
|
1350
898
|
}
|
|
1351
899
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
1352
|
-
},
|
|
1353
|
-
if (!
|
|
900
|
+
}, Me = function(t) {
|
|
901
|
+
if (!t)
|
|
1354
902
|
return;
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1359
|
-
s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
1360
|
-
name: "finishEditSummary",
|
|
1361
|
-
obj: o
|
|
1362
|
-
}));
|
|
1363
|
-
});
|
|
1364
|
-
}, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
903
|
+
const e = t.childNodes[1];
|
|
904
|
+
ut(this, e, t.summaryObj);
|
|
905
|
+
}, $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1365
906
|
__proto__: null,
|
|
1366
|
-
createSummary:
|
|
1367
|
-
createSummaryFrom:
|
|
1368
|
-
editSummary:
|
|
1369
|
-
removeSummary:
|
|
1370
|
-
renderSummary:
|
|
1371
|
-
selectSummary:
|
|
1372
|
-
unselectSummary:
|
|
907
|
+
createSummary: be,
|
|
908
|
+
createSummaryFrom: we,
|
|
909
|
+
editSummary: Me,
|
|
910
|
+
removeSummary: Ce,
|
|
911
|
+
renderSummary: Le,
|
|
912
|
+
selectSummary: Ee,
|
|
913
|
+
unselectSummary: Se
|
|
1373
914
|
}, Symbol.toStringTag, { value: "Module" })), L = "http://www.w3.org/2000/svg";
|
|
1374
|
-
function
|
|
915
|
+
function Te(t, e) {
|
|
1375
916
|
const n = document.createElementNS(L, "svg");
|
|
1376
917
|
return x(n, {
|
|
1377
918
|
version: "1.1",
|
|
1378
919
|
xmlns: L,
|
|
1379
|
-
height:
|
|
1380
|
-
width:
|
|
920
|
+
height: t,
|
|
921
|
+
width: e
|
|
1381
922
|
}), n;
|
|
1382
923
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return (parseInt(
|
|
924
|
+
function Ne(t, e) {
|
|
925
|
+
return (parseInt(t) - parseInt(e)) / 2;
|
|
1385
926
|
}
|
|
1386
|
-
function
|
|
927
|
+
function ke(t, e, n, o) {
|
|
1387
928
|
const s = document.createElementNS(L, "g");
|
|
1388
929
|
let i = "";
|
|
1389
|
-
return
|
|
1390
|
-
`).forEach((
|
|
1391
|
-
const
|
|
1392
|
-
x(
|
|
1393
|
-
x: n + parseInt(
|
|
1394
|
-
y: o + parseInt(
|
|
930
|
+
return t.text ? i = t.text.textContent : i = t.childNodes[0].textContent, i.split(`
|
|
931
|
+
`).forEach((c, a) => {
|
|
932
|
+
const f = document.createElementNS(L, "text");
|
|
933
|
+
x(f, {
|
|
934
|
+
x: n + parseInt(e.paddingLeft) + "",
|
|
935
|
+
y: o + parseInt(e.paddingTop) + Ne(e.lineHeight, e.fontSize) * (a + 1) + parseFloat(e.fontSize) * (a + 1) + "",
|
|
1395
936
|
"text-anchor": "start",
|
|
1396
|
-
"font-family":
|
|
1397
|
-
"font-size": `${
|
|
1398
|
-
"font-weight": `${
|
|
1399
|
-
fill: `${
|
|
1400
|
-
}),
|
|
937
|
+
"font-family": e.fontFamily,
|
|
938
|
+
"font-size": `${e.fontSize}`,
|
|
939
|
+
"font-weight": `${e.fontWeight}`,
|
|
940
|
+
fill: `${e.color}`
|
|
941
|
+
}), f.innerHTML = c, s.appendChild(f);
|
|
1401
942
|
}), s;
|
|
1402
943
|
}
|
|
1403
|
-
function
|
|
1404
|
-
var
|
|
944
|
+
function He(t, e, n, o) {
|
|
945
|
+
var c;
|
|
1405
946
|
let s = "";
|
|
1406
|
-
(
|
|
947
|
+
(c = t.nodeObj) != null && c.dangerouslySetInnerHTML ? s = t.nodeObj.dangerouslySetInnerHTML : t.text ? s = t.text.textContent : s = t.childNodes[0].textContent;
|
|
1407
948
|
const i = document.createElementNS(L, "foreignObject");
|
|
1408
949
|
x(i, {
|
|
1409
|
-
x: n + parseInt(
|
|
1410
|
-
y: o + parseInt(
|
|
1411
|
-
width:
|
|
1412
|
-
height:
|
|
950
|
+
x: n + parseInt(e.paddingLeft) + "",
|
|
951
|
+
y: o + parseInt(e.paddingTop) + "",
|
|
952
|
+
width: e.width,
|
|
953
|
+
height: e.height
|
|
1413
954
|
});
|
|
1414
955
|
const r = document.createElement("div");
|
|
1415
956
|
return x(r, {
|
|
1416
957
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1417
|
-
style: `font-family: ${
|
|
958
|
+
style: `font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`
|
|
1418
959
|
}), r.innerHTML = s, i.appendChild(r), i;
|
|
1419
960
|
}
|
|
1420
|
-
function
|
|
1421
|
-
const n = getComputedStyle(
|
|
961
|
+
function Ae(t, e) {
|
|
962
|
+
const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = N(t.nodes, e), i = document.createElementNS(L, "rect");
|
|
1422
963
|
return x(i, {
|
|
1423
964
|
x: o + "",
|
|
1424
965
|
y: s + "",
|
|
@@ -1431,8 +972,8 @@ function Zt(e, t) {
|
|
|
1431
972
|
"stroke-width": n.borderWidth
|
|
1432
973
|
}), i;
|
|
1433
974
|
}
|
|
1434
|
-
function
|
|
1435
|
-
const o = getComputedStyle(
|
|
975
|
+
function _(t, e, n = !1) {
|
|
976
|
+
const o = getComputedStyle(e), { offsetLeft: s, offsetTop: i } = N(t.nodes, e), r = document.createElementNS(L, "rect");
|
|
1436
977
|
x(r, {
|
|
1437
978
|
x: s + "",
|
|
1438
979
|
y: i + "",
|
|
@@ -1444,13 +985,13 @@ function G(e, t, n = !1) {
|
|
|
1444
985
|
stroke: o.borderColor,
|
|
1445
986
|
"stroke-width": o.borderWidth
|
|
1446
987
|
});
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
let
|
|
1450
|
-
return n ?
|
|
988
|
+
const c = document.createElementNS(L, "g");
|
|
989
|
+
c.appendChild(r);
|
|
990
|
+
let a;
|
|
991
|
+
return n ? a = He(e, o, s, i) : a = ke(e, o, s, i), c.appendChild(a), c;
|
|
1451
992
|
}
|
|
1452
|
-
function
|
|
1453
|
-
const n = getComputedStyle(
|
|
993
|
+
function De(t, e) {
|
|
994
|
+
const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = N(t.nodes, e), i = document.createElementNS(L, "a"), r = document.createElementNS(L, "text");
|
|
1454
995
|
return x(r, {
|
|
1455
996
|
x: o + "",
|
|
1456
997
|
y: s + parseInt(n.fontSize) + "",
|
|
@@ -1459,163 +1000,192 @@ function en(e, t) {
|
|
|
1459
1000
|
"font-size": `${n.fontSize}`,
|
|
1460
1001
|
"font-weight": `${n.fontWeight}`,
|
|
1461
1002
|
fill: `${n.color}`
|
|
1462
|
-
}), r.innerHTML =
|
|
1003
|
+
}), r.innerHTML = e.textContent, i.appendChild(r), i.setAttribute("href", e.href), i;
|
|
1463
1004
|
}
|
|
1464
|
-
function
|
|
1465
|
-
const n = getComputedStyle(
|
|
1005
|
+
function Be(t, e) {
|
|
1006
|
+
const n = getComputedStyle(e), { offsetLeft: o, offsetTop: s } = N(t.nodes, e), i = document.createElementNS(L, "image");
|
|
1466
1007
|
return x(i, {
|
|
1467
1008
|
x: o + "",
|
|
1468
1009
|
y: s + "",
|
|
1469
1010
|
width: n.width + "",
|
|
1470
1011
|
height: n.height + "",
|
|
1471
|
-
href:
|
|
1012
|
+
href: e.src
|
|
1472
1013
|
}), i;
|
|
1473
1014
|
}
|
|
1474
|
-
const
|
|
1475
|
-
var
|
|
1476
|
-
const n =
|
|
1477
|
-
x(
|
|
1015
|
+
const F = 100, Pe = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', ze = (t, e = !1) => {
|
|
1016
|
+
var h, d, p;
|
|
1017
|
+
const n = t.nodes, o = n.offsetHeight + F * 2, s = n.offsetWidth + F * 2, i = Te(o + "px", s + "px"), r = document.createElementNS(L, "svg"), c = document.createElementNS(L, "rect");
|
|
1018
|
+
x(c, {
|
|
1478
1019
|
x: "0",
|
|
1479
1020
|
y: "0",
|
|
1480
1021
|
width: `${s}`,
|
|
1481
1022
|
height: `${o}`,
|
|
1482
|
-
fill:
|
|
1483
|
-
}), i.appendChild(
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1023
|
+
fill: t.theme.cssVar["--bgcolor"]
|
|
1024
|
+
}), i.appendChild(c), n.querySelectorAll(".subLines").forEach((u) => {
|
|
1025
|
+
const m = u.cloneNode(!0), { offsetLeft: g, offsetTop: y } = N(n, u.parentElement);
|
|
1026
|
+
m.setAttribute("x", `${g}`), m.setAttribute("y", `${y}`), r.appendChild(m);
|
|
1486
1027
|
});
|
|
1487
|
-
const
|
|
1488
|
-
|
|
1489
|
-
const
|
|
1490
|
-
|
|
1491
|
-
const
|
|
1492
|
-
return
|
|
1493
|
-
|
|
1494
|
-
}), n.querySelectorAll(".tags > span").forEach((
|
|
1495
|
-
r.appendChild(
|
|
1496
|
-
}), n.querySelectorAll(".icons > span").forEach((
|
|
1497
|
-
r.appendChild(
|
|
1498
|
-
}), n.querySelectorAll(".hyper-link").forEach((
|
|
1499
|
-
r.appendChild(
|
|
1500
|
-
}), n.querySelectorAll("img").forEach((
|
|
1501
|
-
r.appendChild(
|
|
1028
|
+
const a = (h = n.querySelector(".lines")) == null ? void 0 : h.cloneNode(!0);
|
|
1029
|
+
a && r.appendChild(a);
|
|
1030
|
+
const f = (d = n.querySelector(".topiclinks")) == null ? void 0 : d.cloneNode(!0);
|
|
1031
|
+
f && r.appendChild(f);
|
|
1032
|
+
const l = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
1033
|
+
return l && r.appendChild(l), n.querySelectorAll("me-tpc").forEach((u) => {
|
|
1034
|
+
u.nodeObj.dangerouslySetInnerHTML ? r.appendChild(_(t, u, !e)) : (r.appendChild(Ae(t, u)), r.appendChild(_(t, u.text, !e)));
|
|
1035
|
+
}), n.querySelectorAll(".tags > span").forEach((u) => {
|
|
1036
|
+
r.appendChild(_(t, u));
|
|
1037
|
+
}), n.querySelectorAll(".icons > span").forEach((u) => {
|
|
1038
|
+
r.appendChild(_(t, u));
|
|
1039
|
+
}), n.querySelectorAll(".hyper-link").forEach((u) => {
|
|
1040
|
+
r.appendChild(De(t, u));
|
|
1041
|
+
}), n.querySelectorAll("img").forEach((u) => {
|
|
1042
|
+
r.appendChild(Be(t, u));
|
|
1502
1043
|
}), x(r, {
|
|
1503
|
-
x:
|
|
1504
|
-
y:
|
|
1044
|
+
x: F + "",
|
|
1045
|
+
y: F + "",
|
|
1505
1046
|
overflow: "visible"
|
|
1506
1047
|
}), i.appendChild(r), i;
|
|
1507
|
-
},
|
|
1508
|
-
function
|
|
1509
|
-
return new Promise((
|
|
1048
|
+
}, Oe = (t, e) => (e && t.insertAdjacentHTML("afterbegin", "<style>" + e + "</style>"), Pe + t.outerHTML);
|
|
1049
|
+
function Ve(t) {
|
|
1050
|
+
return new Promise((e, n) => {
|
|
1510
1051
|
const o = new FileReader();
|
|
1511
1052
|
o.onload = (s) => {
|
|
1512
|
-
|
|
1053
|
+
e(s.target.result);
|
|
1513
1054
|
}, o.onerror = (s) => {
|
|
1514
1055
|
n(s);
|
|
1515
|
-
}, o.readAsDataURL(
|
|
1056
|
+
}, o.readAsDataURL(t);
|
|
1516
1057
|
});
|
|
1517
1058
|
}
|
|
1518
|
-
const
|
|
1519
|
-
const n =
|
|
1059
|
+
const je = function(t = !1, e) {
|
|
1060
|
+
const n = ze(this, t), o = Oe(n, e);
|
|
1520
1061
|
return new Blob([o], { type: "image/svg+xml" });
|
|
1521
|
-
},
|
|
1522
|
-
const n = this.exportSvg(
|
|
1062
|
+
}, qe = async function(t = !1, e) {
|
|
1063
|
+
const n = this.exportSvg(t, e), o = await Ve(n);
|
|
1523
1064
|
return new Promise((s, i) => {
|
|
1524
1065
|
const r = new Image();
|
|
1525
1066
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
1526
|
-
const
|
|
1527
|
-
|
|
1067
|
+
const c = document.createElement("canvas");
|
|
1068
|
+
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(s, "image/png", 1);
|
|
1528
1069
|
}, r.src = o, r.onerror = i;
|
|
1529
1070
|
});
|
|
1530
|
-
},
|
|
1071
|
+
}, _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1531
1072
|
__proto__: null,
|
|
1532
|
-
exportPng:
|
|
1533
|
-
exportSvg:
|
|
1534
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1535
|
-
getObjById:
|
|
1536
|
-
generateNewObj:
|
|
1537
|
-
layout:
|
|
1538
|
-
linkDiv:
|
|
1539
|
-
editTopic:
|
|
1540
|
-
createWrapper:
|
|
1541
|
-
createParent:
|
|
1542
|
-
createChildren:
|
|
1543
|
-
createTopic:
|
|
1073
|
+
exportPng: qe,
|
|
1074
|
+
exportSvg: je
|
|
1075
|
+
}, Symbol.toStringTag, { value: "Module" })), Fe = {}, Re = {
|
|
1076
|
+
getObjById: R,
|
|
1077
|
+
generateNewObj: gt,
|
|
1078
|
+
layout: bt,
|
|
1079
|
+
linkDiv: kt,
|
|
1080
|
+
editTopic: $t,
|
|
1081
|
+
createWrapper: Et,
|
|
1082
|
+
createParent: St,
|
|
1083
|
+
createChildren: Lt,
|
|
1084
|
+
createTopic: Mt,
|
|
1544
1085
|
findEle: M,
|
|
1545
|
-
changeTheme:
|
|
1546
|
-
...
|
|
1547
|
-
...
|
|
1548
|
-
...
|
|
1549
|
-
|
|
1550
|
-
...
|
|
1551
|
-
init(
|
|
1552
|
-
if (
|
|
1086
|
+
changeTheme: Bt,
|
|
1087
|
+
...se,
|
|
1088
|
+
...Fe,
|
|
1089
|
+
...me,
|
|
1090
|
+
...$e,
|
|
1091
|
+
..._e,
|
|
1092
|
+
init(t) {
|
|
1093
|
+
if (t = JSON.parse(JSON.stringify(t)), !t || !t.nodeData)
|
|
1553
1094
|
return new Error("MindElixir: `data` is required");
|
|
1554
|
-
|
|
1095
|
+
t.direction !== void 0 && (this.direction = t.direction), this.changeTheme(t.theme || this.theme, !1), this.nodeData = t.nodeData, J(this.nodeData), this.arrows = t.arrows || [], this.summaries = t.summaries || [], this.tidyArrow(), this.toolBar && Dt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
1555
1096
|
},
|
|
1556
1097
|
destroy() {
|
|
1557
|
-
var
|
|
1558
|
-
this.disposable.forEach((
|
|
1098
|
+
var t;
|
|
1099
|
+
this.disposable.forEach((e) => e()), this.mindElixirBox && (this.mindElixirBox.innerHTML = ""), this.mindElixirBox = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.waitCopy = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.linkSvgGroup = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, (t = this.selection) == null || t.destroy(), this.selection = void 0;
|
|
1559
1100
|
}
|
|
1560
1101
|
};
|
|
1561
|
-
function
|
|
1562
|
-
let
|
|
1563
|
-
const
|
|
1564
|
-
let
|
|
1565
|
-
|
|
1566
|
-
const
|
|
1567
|
-
return
|
|
1102
|
+
function We({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: a, containerHeight: f }) {
|
|
1103
|
+
let l = e + n / 2;
|
|
1104
|
+
const h = t + o / 2;
|
|
1105
|
+
let d;
|
|
1106
|
+
a === $.LHS ? d = i + r : d = i;
|
|
1107
|
+
const p = s + c / 2, m = (1 - Math.abs(p - h) / f) * 0.25 * (n / 2);
|
|
1108
|
+
return a === $.LHS ? l = l - n / 10 - m : l = l + n / 10 + m, `M ${l} ${h} Q ${l} ${p} ${d} ${p}`;
|
|
1568
1109
|
}
|
|
1569
|
-
function
|
|
1570
|
-
const
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1573
|
-
const
|
|
1574
|
-
let
|
|
1575
|
-
const
|
|
1576
|
-
return
|
|
1110
|
+
function Ie({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: a, isFirst: f }) {
|
|
1111
|
+
const l = parseInt(this.container.style.getPropertyValue("--gap"));
|
|
1112
|
+
let h = 0, d = 0;
|
|
1113
|
+
f ? h = t + o / 2 : h = t + o;
|
|
1114
|
+
const p = s + c;
|
|
1115
|
+
let u = 0, m = 0, g = 0;
|
|
1116
|
+
const y = Math.abs(h - p) / 300 * l;
|
|
1117
|
+
return a === $.LHS ? (g = e, u = g + l, m = g - l, d = i + l, `M ${u} ${h} C ${g} ${h} ${g + y} ${p} ${m} ${p} H ${d}`) : (g = e + n, u = g - l, m = g + l, d = i + r - l, `M ${u} ${h} C ${g} ${h} ${g - y} ${p} ${m} ${p} H ${d}`);
|
|
1118
|
+
}
|
|
1119
|
+
const Ye = "5.0.0-beta.10";
|
|
1120
|
+
function Xe(t) {
|
|
1121
|
+
return {
|
|
1122
|
+
x: 0,
|
|
1123
|
+
y: 0,
|
|
1124
|
+
moved: !1,
|
|
1125
|
+
// diffrentiate click and move
|
|
1126
|
+
mousedown: !1,
|
|
1127
|
+
onMove(e) {
|
|
1128
|
+
if (this.mousedown) {
|
|
1129
|
+
this.moved = !0;
|
|
1130
|
+
const n = e.movementX, o = e.movementY;
|
|
1131
|
+
t.move(n, o);
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
clear() {
|
|
1135
|
+
setTimeout(() => {
|
|
1136
|
+
this.moved = !1, this.mousedown = !1, t.map.style.transition = "transform 0.3s";
|
|
1137
|
+
}, 0);
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1577
1140
|
}
|
|
1578
|
-
const
|
|
1579
|
-
function
|
|
1580
|
-
el:
|
|
1581
|
-
direction:
|
|
1141
|
+
const z = document;
|
|
1142
|
+
function T({
|
|
1143
|
+
el: t,
|
|
1144
|
+
direction: e,
|
|
1582
1145
|
locale: n,
|
|
1583
1146
|
draggable: o,
|
|
1584
1147
|
editable: s,
|
|
1585
1148
|
contextMenu: i,
|
|
1586
1149
|
contextMenuOption: r,
|
|
1587
|
-
toolBar:
|
|
1588
|
-
keypress:
|
|
1589
|
-
mouseSelectionButton:
|
|
1590
|
-
selectionContainer:
|
|
1591
|
-
before:
|
|
1592
|
-
newTopicName:
|
|
1593
|
-
allowUndo:
|
|
1594
|
-
generateMainBranch:
|
|
1595
|
-
generateSubBranch:
|
|
1596
|
-
overflowHidden:
|
|
1597
|
-
theme:
|
|
1598
|
-
alignment:
|
|
1150
|
+
toolBar: c,
|
|
1151
|
+
keypress: a,
|
|
1152
|
+
mouseSelectionButton: f,
|
|
1153
|
+
selectionContainer: l,
|
|
1154
|
+
before: h,
|
|
1155
|
+
newTopicName: d,
|
|
1156
|
+
allowUndo: p,
|
|
1157
|
+
generateMainBranch: u,
|
|
1158
|
+
generateSubBranch: m,
|
|
1159
|
+
overflowHidden: g,
|
|
1160
|
+
theme: y,
|
|
1161
|
+
alignment: C
|
|
1599
1162
|
}) {
|
|
1600
|
-
let
|
|
1601
|
-
const
|
|
1602
|
-
if (
|
|
1163
|
+
let v = null;
|
|
1164
|
+
const w = Object.prototype.toString.call(t);
|
|
1165
|
+
if (w === "[object HTMLDivElement]" ? v = t : w === "[object String]" && (v = document.querySelector(t)), !v)
|
|
1603
1166
|
throw new Error("MindElixir: el is not a valid element");
|
|
1604
|
-
|
|
1605
|
-
const
|
|
1606
|
-
this.theme =
|
|
1607
|
-
const
|
|
1608
|
-
|
|
1167
|
+
v.style.position = "relative", v.innerHTML = "", this.mindElixirBox = v, this.disposable = [], this.before = h || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = a === void 0 ? !0 : a, this.mouseSelectionButton = f || 0, this.direction = typeof e == "number" ? e : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = d || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = p === void 0 ? !1 : p, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = u || We, this.generateSubBranch = m || Ie, this.overflowHidden = g || !1, this.dragMoveHelper = Xe(this), this.bus = vt(), this.container = z.createElement("div"), this.selectionContainer = l || this.container, this.container.className = "map-container";
|
|
1168
|
+
const b = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1169
|
+
this.theme = y || (b.matches ? lt : ct);
|
|
1170
|
+
const E = z.createElement("div");
|
|
1171
|
+
E.className = "map-canvas", setTimeout(() => {
|
|
1172
|
+
E.style.transition = "all 0.3s";
|
|
1173
|
+
}, 300), this.map = E, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = z.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = O("lines"), this.summarySvg = O("summary"), this.linkController = O("linkcontroller"), this.P2 = z.createElement("div"), this.P3 = z.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = ot(), this.line2 = ot(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = O("topiclinks"), this.alignment = C ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : xt(this);
|
|
1609
1174
|
}
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1175
|
+
T.prototype = Re;
|
|
1176
|
+
Object.defineProperty(T.prototype, "currentNode", {
|
|
1177
|
+
get() {
|
|
1178
|
+
return this.currentNodes.at(-1);
|
|
1179
|
+
},
|
|
1180
|
+
enumerable: !0
|
|
1181
|
+
});
|
|
1182
|
+
T.LEFT = B;
|
|
1183
|
+
T.RIGHT = X;
|
|
1184
|
+
T.SIDE = G;
|
|
1185
|
+
T.THEME = ct;
|
|
1186
|
+
T.DARK_THEME = lt;
|
|
1187
|
+
T.version = Ye;
|
|
1188
|
+
T.E = M;
|
|
1619
1189
|
export {
|
|
1620
|
-
|
|
1190
|
+
T as default
|
|
1621
1191
|
};
|