mind-elixir 4.2.3 → 4.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MindElixir.iife.js +11 -5
- package/dist/MindElixir.js +138 -130
- package/dist/MindElixirLite.iife.js +11 -5
- package/dist/MindElixirLite.js +95 -87
- package/dist/types/types/index.d.ts +3 -2
- package/package.json +1 -1
- package/readme.md +2 -2
package/dist/MindElixir.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--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;position:relative;-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}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;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 .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;transition:transform .3s;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}.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{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.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{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-right:10px}.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:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .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}.mind-elixir .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}.mind-elixir .context-menu .menu-list li span{line-height:20px}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none}.mind-elixir .context-menu .menu-list li:hover{filter:brightness(.95)}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.mind-elixir .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(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
(function(e) {
|
|
3
3
|
var t, 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>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
4
4
|
if (l && !e.__iconfont__svg__cssinject__) {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
s.readyState == "complete" && (s.onreadystatechange = null, h());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
|
-
const
|
|
32
|
+
const T = 0, R = 1, ce = 2, D = 30, ue = {
|
|
33
33
|
name: "Latte",
|
|
34
34
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
35
35
|
cssVar: {
|
|
@@ -69,15 +69,15 @@ const se = function(e, t) {
|
|
|
69
69
|
return null;
|
|
70
70
|
} else
|
|
71
71
|
return null;
|
|
72
|
-
},
|
|
72
|
+
}, $ = (e, t) => {
|
|
73
73
|
if (e.parent = t, e.children)
|
|
74
74
|
for (let n = 0; n < e.children.length; n++)
|
|
75
|
-
|
|
75
|
+
$(e.children[n], e);
|
|
76
76
|
};
|
|
77
|
-
function
|
|
77
|
+
function fe(e) {
|
|
78
78
|
if (e.id = G(), e.children)
|
|
79
79
|
for (let t = 0; t < e.children.length; t++)
|
|
80
|
-
|
|
80
|
+
fe(e.children[t]);
|
|
81
81
|
}
|
|
82
82
|
const nt = (e, t) => {
|
|
83
83
|
let n = Date.now();
|
|
@@ -107,7 +107,7 @@ const ot = function() {
|
|
|
107
107
|
id: e
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function pe(e) {
|
|
111
111
|
return JSON.parse(
|
|
112
112
|
JSON.stringify(e, (n, o) => {
|
|
113
113
|
if (n !== "parent")
|
|
@@ -115,7 +115,7 @@ function fe(e) {
|
|
|
115
115
|
})
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const O = (e, t) => {
|
|
119
119
|
let n = 0, o = 0;
|
|
120
120
|
for (; t && t !== e; )
|
|
121
121
|
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
@@ -131,7 +131,7 @@ const $ = (e, t) => {
|
|
|
131
131
|
return !1;
|
|
132
132
|
}
|
|
133
133
|
return !0;
|
|
134
|
-
}),
|
|
134
|
+
}), k = {
|
|
135
135
|
moved: !1,
|
|
136
136
|
// diffrentiate click and move
|
|
137
137
|
mousedown: !1,
|
|
@@ -159,8 +159,8 @@ function st(e) {
|
|
|
159
159
|
e.helper2.clear();
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
if (
|
|
163
|
-
|
|
162
|
+
if (k.moved) {
|
|
163
|
+
k.clear();
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
e.clearSelection();
|
|
@@ -179,16 +179,16 @@ function st(e) {
|
|
|
179
179
|
const n = t.target;
|
|
180
180
|
ae(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
181
181
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
182
|
-
t.target.contentEditable !== "true" &&
|
|
182
|
+
t.target.contentEditable !== "true" && k.onMove(t, e.container);
|
|
183
183
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
184
184
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
185
|
-
t.button === n && t.target.contentEditable !== "true" && (
|
|
185
|
+
t.button === n && t.target.contentEditable !== "true" && (k.moved = !1, k.mousedown = !0);
|
|
186
186
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
187
187
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
188
|
-
t.button === n &&
|
|
188
|
+
t.button === n && k.clear();
|
|
189
189
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
190
190
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
191
|
-
t.button === n &&
|
|
191
|
+
t.button === n && k.clear();
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
const it = {
|
|
@@ -222,14 +222,14 @@ const it = {
|
|
|
222
222
|
}, ie = document, rt = function() {
|
|
223
223
|
this.nodes.innerHTML = "";
|
|
224
224
|
const e = this.createTopic(this.nodeData);
|
|
225
|
-
|
|
225
|
+
me(e, this.nodeData), e.draggable = !1;
|
|
226
226
|
const t = ie.createElement("me-root");
|
|
227
227
|
t.appendChild(e);
|
|
228
228
|
const n = this.nodeData.children || [];
|
|
229
229
|
if (this.direction === ce) {
|
|
230
230
|
let o = 0, s = 0;
|
|
231
231
|
n.map((i) => {
|
|
232
|
-
i.direction ===
|
|
232
|
+
i.direction === T ? o += 1 : i.direction === R ? s += 1 : o <= s ? (i.direction = T, o += 1) : (i.direction = R, s += 1);
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
ct(this, n, t);
|
|
@@ -240,7 +240,7 @@ const it = {
|
|
|
240
240
|
s.className = "rhs";
|
|
241
241
|
for (let i = 0; i < t.length; i++) {
|
|
242
242
|
const r = t[i], { grp: c } = e.createWrapper(r);
|
|
243
|
-
e.direction === ce ? r.direction ===
|
|
243
|
+
e.direction === ce ? r.direction === T ? o.appendChild(c) : s.appendChild(c) : e.direction === T ? o.appendChild(c) : s.appendChild(c);
|
|
244
244
|
}
|
|
245
245
|
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
246
246
|
}, lt = function(e, t) {
|
|
@@ -255,7 +255,7 @@ const it = {
|
|
|
255
255
|
if (!o)
|
|
256
256
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
257
257
|
return o;
|
|
258
|
-
},
|
|
258
|
+
}, me = function(e, t) {
|
|
259
259
|
if (e.innerHTML = "", t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.dangerouslySetInnerHTML) {
|
|
260
260
|
e.innerHTML = t.dangerouslySetInnerHTML;
|
|
261
261
|
return;
|
|
@@ -290,7 +290,7 @@ const it = {
|
|
|
290
290
|
}, at = function(e, t) {
|
|
291
291
|
const n = _.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
292
292
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
293
|
-
const i =
|
|
293
|
+
const i = ge(e.expanded);
|
|
294
294
|
if (o.appendChild(i), e.expanded !== !1) {
|
|
295
295
|
const r = lt(this, e.children);
|
|
296
296
|
n.appendChild(r);
|
|
@@ -299,7 +299,7 @@ const it = {
|
|
|
299
299
|
return { grp: n, top: o, tpc: s };
|
|
300
300
|
}, dt = function(e) {
|
|
301
301
|
const t = _.createElement("me-parent"), n = this.createTopic(e);
|
|
302
|
-
return
|
|
302
|
+
return me(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
303
303
|
}, ht = function(e) {
|
|
304
304
|
const t = _.createElement("me-children");
|
|
305
305
|
return t.append(...e), t;
|
|
@@ -317,29 +317,37 @@ const ft = function(e) {
|
|
|
317
317
|
if (!e)
|
|
318
318
|
return;
|
|
319
319
|
const t = _.createElement("div"), n = e.text.textContent;
|
|
320
|
-
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1
|
|
320
|
+
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1;
|
|
321
|
+
const o = getComputedStyle(e);
|
|
322
|
+
t.style.cssText = `min-width:${e.offsetWidth - 8}px;
|
|
323
|
+
color:${o.color};
|
|
324
|
+
padding:${o.padding};
|
|
325
|
+
margin:${o.margin};
|
|
326
|
+
font:${o.font};
|
|
327
|
+
background-color:${o.backgroundColor !== "rgba(0, 0, 0, 0)" && o.backgroundColor};
|
|
328
|
+
border-radius:${o.borderRadius};`, this.direction === T && (t.style.right = "0"), t.focus(), Be(t), this.bus.fire("operation", {
|
|
321
329
|
name: "beginEdit",
|
|
322
330
|
obj: e.nodeObj
|
|
323
|
-
}), t.addEventListener("keydown", (
|
|
324
|
-
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
327
|
-
if (
|
|
331
|
+
}), t.addEventListener("keydown", (s) => {
|
|
332
|
+
s.stopPropagation();
|
|
333
|
+
const i = s.key;
|
|
334
|
+
if (i === "Enter" || i === "Tab") {
|
|
335
|
+
if (s.shiftKey)
|
|
328
336
|
return;
|
|
329
|
-
|
|
337
|
+
s.preventDefault(), t == null || t.blur(), this.map.focus();
|
|
330
338
|
}
|
|
331
339
|
}), t.addEventListener("blur", () => {
|
|
332
|
-
var
|
|
340
|
+
var r;
|
|
333
341
|
if (!t)
|
|
334
342
|
return;
|
|
335
|
-
const
|
|
336
|
-
|
|
343
|
+
const s = e.nodeObj, i = ((r = t.textContent) == null ? void 0 : r.trim()) || "";
|
|
344
|
+
i === "" ? s.topic = n : s.topic = i, t.remove(), i !== n && (e.text.textContent = s.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
337
345
|
name: "finishEdit",
|
|
338
|
-
obj:
|
|
346
|
+
obj: s,
|
|
339
347
|
origin: n
|
|
340
348
|
}));
|
|
341
349
|
});
|
|
342
|
-
},
|
|
350
|
+
}, ge = function(e) {
|
|
343
351
|
const t = _.createElement("me-epd");
|
|
344
352
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
345
353
|
}, K = document, V = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
|
|
@@ -353,7 +361,7 @@ const ft = function(e) {
|
|
|
353
361
|
}, X = function(e) {
|
|
354
362
|
const t = K.createElementNS(V, "svg");
|
|
355
363
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
356
|
-
},
|
|
364
|
+
}, xe = function() {
|
|
357
365
|
const e = K.createElementNS(V, "line");
|
|
358
366
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
359
367
|
}, pt = function(e, t) {
|
|
@@ -398,7 +406,7 @@ const ft = function(e) {
|
|
|
398
406
|
const r = this.map.querySelectorAll("me-main > me-wrapper");
|
|
399
407
|
this.lines.innerHTML = "";
|
|
400
408
|
for (let c = 0; c < r.length; c++) {
|
|
401
|
-
const l = r[c], h = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: a } =
|
|
409
|
+
const l = r[c], h = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: a } = O(this.nodes, h), f = h.offsetWidth, g = h.offsetHeight, p = l.parentNode.className, m = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: a, cL: d, cW: f, cH: g, direction: p, containerHeight: this.nodes.offsetHeight }), u = this.theme.palette, v = h.nodeObj.branchColor || u[c % u.length];
|
|
402
410
|
h.style.borderColor = v, this.lines.appendChild(ze(m, v, "3"));
|
|
403
411
|
const y = l.children[0].children[1];
|
|
404
412
|
if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", p === "lhs" ? y.style.left = "-10px" : y.style.right = "-10px"), e && e !== l)
|
|
@@ -423,7 +431,7 @@ const ft = function(e) {
|
|
|
423
431
|
continue;
|
|
424
432
|
Fe(e, t, b, g, s);
|
|
425
433
|
}
|
|
426
|
-
},
|
|
434
|
+
}, we = {
|
|
427
435
|
addChild: "插入子节点",
|
|
428
436
|
addParent: "插入父节点",
|
|
429
437
|
addSibling: "插入同级节点",
|
|
@@ -435,9 +443,9 @@ const ft = function(e) {
|
|
|
435
443
|
link: "连接",
|
|
436
444
|
clickTips: "请点击目标节点",
|
|
437
445
|
summary: "摘要"
|
|
438
|
-
},
|
|
439
|
-
cn:
|
|
440
|
-
zh_CN:
|
|
446
|
+
}, Ee = {
|
|
447
|
+
cn: we,
|
|
448
|
+
zh_CN: we,
|
|
441
449
|
zh_TW: {
|
|
442
450
|
addChild: "插入子節點",
|
|
443
451
|
addParent: "插入父節點",
|
|
@@ -563,7 +571,7 @@ function gt(e, t) {
|
|
|
563
571
|
}, o = (b, x, w) => {
|
|
564
572
|
const S = document.createElement("li");
|
|
565
573
|
return S.id = b, S.innerHTML = `<span>${oe(x)}</span><span ${w ? 'class="key"' : ""}>${oe(w)}</span>`, S;
|
|
566
|
-
}, s =
|
|
574
|
+
}, s = Ee[e.locale] ? e.locale : "en", i = Ee[s], r = o("cm-add_child", i.addChild, "Tab"), c = o("cm-add_parent", i.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", i.addSibling, "Enter"), h = o("cm-remove_child", i.removeNode, "Delete"), d = o("cm-fucus", i.focus, ""), a = o("cm-unfucus", i.cancelFocus, ""), f = o("cm-up", i.moveUp, "PgUp"), g = o("cm-down", i.moveDown, "Pgdn"), p = o("cm-link", i.link, ""), m = o("cm-summary", i.summary, ""), u = document.createElement("ul");
|
|
567
575
|
if (u.className = "menu-list", u.appendChild(r), u.appendChild(c), u.appendChild(l), u.appendChild(h), (!t || t.focus) && (u.appendChild(d), u.appendChild(a)), u.appendChild(f), u.appendChild(g), u.appendChild(m), (!t || t.link) && u.appendChild(p), t && t.extend)
|
|
568
576
|
for (let b = 0; b < t.extend.length; b++) {
|
|
569
577
|
const x = t.extend[b], w = o(x.name, x.name, x.key || "");
|
|
@@ -579,7 +587,7 @@ function gt(e, t) {
|
|
|
579
587
|
return;
|
|
580
588
|
const x = b.target;
|
|
581
589
|
if (ae(x)) {
|
|
582
|
-
x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", f.className = "disabled", g.className = "disabled", c.className = "disabled", l.className = "disabled", h.className = "disabled") : (d.className = "", f.className = "", g.className = "", c.className = "", l.className = "", h.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1,
|
|
590
|
+
x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", f.className = "disabled", g.className = "disabled", c.className = "disabled", l.className = "disabled", h.className = "disabled") : (d.className = "", f.className = "", g.className = "", c.className = "", l.className = "", h.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, k.mousedown && (k.mousedown = !1), u.style.top = "", u.style.bottom = "", u.style.left = "", u.style.right = "";
|
|
583
591
|
const w = u.getBoundingClientRect(), S = u.offsetHeight, P = u.offsetWidth, U = b.clientY - w.top, H = b.clientX - w.left;
|
|
584
592
|
S + U > window.innerHeight ? (u.style.top = "", u.style.bottom = "0px") : (u.style.bottom = "", u.style.top = U + 15 + "px"), P + H > window.innerWidth ? (u.style.left = "", u.style.right = "0px") : (u.style.right = "", u.style.left = H + 10 + "px");
|
|
585
593
|
}
|
|
@@ -641,14 +649,14 @@ const vt = (e) => {
|
|
|
641
649
|
const o = n.firstChild.firstChild.firstChild;
|
|
642
650
|
e.selectNode(o);
|
|
643
651
|
}
|
|
644
|
-
},
|
|
652
|
+
}, Ne = function(e, t) {
|
|
645
653
|
var i, r;
|
|
646
654
|
const n = e.currentNode || ((i = e.currentNodes) == null ? void 0 : i[0]);
|
|
647
655
|
if (!n)
|
|
648
656
|
return;
|
|
649
657
|
const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
|
|
650
658
|
o.parent ? s.className === t ? wt(e, n) : (r = o.parent) != null && r.parent ? xt(e, n) : bt(e) : t === "lhs" ? vt(e) : yt(e);
|
|
651
|
-
},
|
|
659
|
+
}, Ce = function(e, t) {
|
|
652
660
|
var r;
|
|
653
661
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
654
662
|
if (!n || !n.nodeObj.parent)
|
|
@@ -690,21 +698,21 @@ function Et(e) {
|
|
|
690
698
|
else {
|
|
691
699
|
if (o.metaKey || o.ctrlKey)
|
|
692
700
|
return e.initSide();
|
|
693
|
-
|
|
701
|
+
Ce(e, "previous");
|
|
694
702
|
}
|
|
695
703
|
},
|
|
696
704
|
ArrowDown: (o) => {
|
|
697
|
-
o.altKey ? e.moveDownNode() :
|
|
705
|
+
o.altKey ? e.moveDownNode() : Ce(e, "next");
|
|
698
706
|
},
|
|
699
707
|
ArrowLeft: (o) => {
|
|
700
708
|
if (o.metaKey || o.ctrlKey)
|
|
701
709
|
return e.initLeft();
|
|
702
|
-
|
|
710
|
+
Ne(e, "lhs");
|
|
703
711
|
},
|
|
704
712
|
ArrowRight: (o) => {
|
|
705
713
|
if (o.metaKey || o.ctrlKey)
|
|
706
714
|
return e.initRight();
|
|
707
|
-
|
|
715
|
+
Ne(e, "rhs");
|
|
708
716
|
},
|
|
709
717
|
PageUp: () => e.moveUpNode(),
|
|
710
718
|
PageDown: () => {
|
|
@@ -756,7 +764,7 @@ const de = document, Nt = function(e, t) {
|
|
|
756
764
|
const t = e.querySelectorAll(".insert-preview");
|
|
757
765
|
for (const n of t || [])
|
|
758
766
|
n.remove();
|
|
759
|
-
},
|
|
767
|
+
}, Se = function(e, t) {
|
|
760
768
|
for (const n of t) {
|
|
761
769
|
const o = n.parentElement.parentElement.contains(e);
|
|
762
770
|
if (!(e && e.tagName === "ME-TPC" && e !== n && !o && e.nodeObj.parent))
|
|
@@ -780,7 +788,7 @@ function St(e) {
|
|
|
780
788
|
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes, s.innerHTML = e.currentNodes.length + " nodes") : (t = [c], s.innerHTML = c.innerHTML);
|
|
781
789
|
for (const d of t)
|
|
782
790
|
d.parentElement.parentElement.style.opacity = "0.5";
|
|
783
|
-
(h = r.dataTransfer) == null || h.setDragImage(s, 0, 0),
|
|
791
|
+
(h = r.dataTransfer) == null || h.setDragImage(s, 0, 0), k.clear();
|
|
784
792
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
785
793
|
if (!t)
|
|
786
794
|
return;
|
|
@@ -795,13 +803,13 @@ function St(e) {
|
|
|
795
803
|
return;
|
|
796
804
|
he(o);
|
|
797
805
|
const c = de.elementFromPoint(r.clientX, r.clientY - i);
|
|
798
|
-
if (
|
|
806
|
+
if (Se(c, t)) {
|
|
799
807
|
o = c;
|
|
800
808
|
const l = c.getBoundingClientRect().y;
|
|
801
809
|
r.clientY > l + c.clientHeight ? n = "after" : n = "in";
|
|
802
810
|
} else {
|
|
803
811
|
const l = de.elementFromPoint(r.clientX, r.clientY + i);
|
|
804
|
-
if (
|
|
812
|
+
if (Se(l, t)) {
|
|
805
813
|
o = l;
|
|
806
814
|
const h = l.getBoundingClientRect().y;
|
|
807
815
|
r.clientY < h ? n = "before" : n = "in";
|
|
@@ -862,7 +870,7 @@ const F = (e, t) => {
|
|
|
862
870
|
<use xlink:href="#icon-${t}"></use>
|
|
863
871
|
</svg>`, n;
|
|
864
872
|
};
|
|
865
|
-
function
|
|
873
|
+
function kt(e) {
|
|
866
874
|
const t = document.createElement("div"), n = F("fullscreen", "full"), o = F("toCenter", "living"), s = F("zoomout", "move"), i = F("zoomin", "add"), r = document.createElement("span");
|
|
867
875
|
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
868
876
|
e.mindElixirBox.requestFullscreen();
|
|
@@ -874,7 +882,7 @@ function Tt(e) {
|
|
|
874
882
|
e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
|
|
875
883
|
}, t;
|
|
876
884
|
}
|
|
877
|
-
function
|
|
885
|
+
function Tt(e) {
|
|
878
886
|
const t = document.createElement("div"), n = F("tbltl", "left"), o = F("tbltr", "right"), s = F("tblts", "side");
|
|
879
887
|
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
880
888
|
e.initLeft();
|
|
@@ -884,8 +892,8 @@ function Lt(e) {
|
|
|
884
892
|
e.initSide();
|
|
885
893
|
}, t;
|
|
886
894
|
}
|
|
887
|
-
function
|
|
888
|
-
e.container.append(
|
|
895
|
+
function Lt(e) {
|
|
896
|
+
e.container.append(kt(e)), e.container.append(Tt(e));
|
|
889
897
|
}
|
|
890
898
|
/*! @viselect/vanilla v3.6.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
891
899
|
var At = Object.defineProperty, jt = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => jt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
@@ -911,13 +919,13 @@ class Dt {
|
|
|
911
919
|
this._listeners.clear();
|
|
912
920
|
}
|
|
913
921
|
}
|
|
914
|
-
const
|
|
922
|
+
const _e = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
915
923
|
function j({ style: e }, t, n) {
|
|
916
924
|
if (typeof t == "object")
|
|
917
925
|
for (const [o, s] of Object.entries(t))
|
|
918
|
-
s !== void 0 && (e[o] =
|
|
926
|
+
s !== void 0 && (e[o] = _e(s));
|
|
919
927
|
else
|
|
920
|
-
n !== void 0 && (e[t] =
|
|
928
|
+
n !== void 0 && (e[t] = _e(n));
|
|
921
929
|
}
|
|
922
930
|
const qe = (e) => (t, n, o, s = {}) => {
|
|
923
931
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
@@ -926,12 +934,12 @@ const qe = (e) => (t, n, o, s = {}) => {
|
|
|
926
934
|
for (const r of n)
|
|
927
935
|
i[e](r, o, { capture: !1, ...s });
|
|
928
936
|
return [t, n, o, s];
|
|
929
|
-
}, B = qe("addEventListener"),
|
|
937
|
+
}, B = qe("addEventListener"), L = qe("removeEventListener"), ee = (e) => {
|
|
930
938
|
var t;
|
|
931
939
|
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
932
940
|
return { x: n, y: o, target: s };
|
|
933
941
|
};
|
|
934
|
-
function
|
|
942
|
+
function Me(e, t, n = "touch") {
|
|
935
943
|
switch (n) {
|
|
936
944
|
case "center": {
|
|
937
945
|
const o = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
@@ -952,7 +960,7 @@ function q(e, t = document) {
|
|
|
952
960
|
}
|
|
953
961
|
return o;
|
|
954
962
|
}
|
|
955
|
-
const
|
|
963
|
+
const $t = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = () => "safari" in window, Pt = (e) => {
|
|
956
964
|
let t, n = -1, o = !1;
|
|
957
965
|
return {
|
|
958
966
|
next(...s) {
|
|
@@ -985,7 +993,7 @@ function Ht(e, t) {
|
|
|
985
993
|
}
|
|
986
994
|
return !1;
|
|
987
995
|
}
|
|
988
|
-
const { abs: z, max:
|
|
996
|
+
const { abs: z, max: ke, min: Te, ceil: Le } = Math, Ae = (e = []) => ({
|
|
989
997
|
stored: e,
|
|
990
998
|
selected: [],
|
|
991
999
|
touched: [],
|
|
@@ -994,7 +1002,7 @@ const { abs: z, max: Me, min: Te, ceil: Le } = Math, ke = (e = []) => ({
|
|
|
994
1002
|
class Ie extends Dt {
|
|
995
1003
|
constructor(t) {
|
|
996
1004
|
var n, o, s, i, r;
|
|
997
|
-
super(), E(this, "_options"), E(this, "_selection",
|
|
1005
|
+
super(), E(this, "_options"), E(this, "_selection", Ae()), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetBoundary"), E(this, "_targetBoundaryScrolled", !0), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_areaRect", new DOMRect()), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._toggleStartEvents.bind(this, !1)), E(this, "enable", this._toggleStartEvents), this._options = {
|
|
998
1006
|
selectionAreaClass: "selection-area",
|
|
999
1007
|
selectionContainerClass: void 0,
|
|
1000
1008
|
selectables: [],
|
|
@@ -1052,7 +1060,7 @@ class Ie extends Dt {
|
|
|
1052
1060
|
}), this.enable();
|
|
1053
1061
|
}
|
|
1054
1062
|
_toggleStartEvents(t = !0) {
|
|
1055
|
-
const { document: n, features: o } = this._options, s = t ? B :
|
|
1063
|
+
const { document: n, features: o } = this._options, s = t ? B : L;
|
|
1056
1064
|
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, { passive: !1 });
|
|
1057
1065
|
}
|
|
1058
1066
|
_onTapStart(t, n = !1) {
|
|
@@ -1061,7 +1069,7 @@ class Ie extends Dt {
|
|
|
1061
1069
|
return;
|
|
1062
1070
|
const f = q(c, r), g = q(l, r);
|
|
1063
1071
|
this._targetElement = g.find(
|
|
1064
|
-
(v) =>
|
|
1072
|
+
(v) => Me(v.getBoundingClientRect(), a)
|
|
1065
1073
|
);
|
|
1066
1074
|
const p = t.composedPath(), m = f.find((v) => p.includes(v));
|
|
1067
1075
|
if (this._targetBoundary = g.find((v) => p.includes(v)), !this._targetElement || !m || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
|
|
@@ -1108,8 +1116,8 @@ class Ie extends Dt {
|
|
|
1108
1116
|
typeof s == "number" && z(c + l - (i + r)) >= s || // Different x and y threshold
|
|
1109
1117
|
typeof s == "object" && z(c - i) >= s.x || z(l - r) >= s.y
|
|
1110
1118
|
) {
|
|
1111
|
-
if (
|
|
1112
|
-
|
|
1119
|
+
if (L(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1120
|
+
L(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1113
1121
|
return;
|
|
1114
1122
|
}
|
|
1115
1123
|
B(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), q(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 && (B(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((h) => this._targetElement.contains(h))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
@@ -1155,14 +1163,14 @@ class Ie extends Dt {
|
|
|
1155
1163
|
}
|
|
1156
1164
|
_handleMoveEvent(t) {
|
|
1157
1165
|
const { features: n } = this._options;
|
|
1158
|
-
(n.touch &&
|
|
1166
|
+
(n.touch && $t() || this._scrollAvailable && Ot()) && t.preventDefault();
|
|
1159
1167
|
}
|
|
1160
1168
|
_onScroll() {
|
|
1161
1169
|
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
1162
1170
|
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1163
1171
|
}
|
|
1164
1172
|
_onStartAreaScroll() {
|
|
1165
|
-
this._targetBoundaryScrolled = !0,
|
|
1173
|
+
this._targetBoundaryScrolled = !0, L(this._targetElement, "scroll", this._onStartAreaScroll);
|
|
1166
1174
|
}
|
|
1167
1175
|
_manualScroll(t) {
|
|
1168
1176
|
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;
|
|
@@ -1173,7 +1181,7 @@ class Ie extends Dt {
|
|
|
1173
1181
|
let { x2: p, y2: m } = n;
|
|
1174
1182
|
const { behaviour: { scrolling: { startScrollMargins: u } } } = s;
|
|
1175
1183
|
p < a.left + u.x ? (t.x = l ? -z(a.left - p + u.x) : 0, p = p < a.left ? a.left : p) : p > a.right - u.x ? (t.x = h - l - d ? z(a.left + a.width - p - u.x) : 0, p = p > a.right ? a.right : p) : t.x = 0, m < a.top + u.y ? (t.y = i ? -z(a.top - m + u.y) : 0, m = m < a.top ? a.top : m) : m > a.bottom - u.y ? (t.y = r - i - c ? z(a.top + a.height - m - u.y) : 0, m = m > a.bottom ? a.bottom : m) : t.y = 0;
|
|
1176
|
-
const v = Te(f, p), y = Te(g, m), b =
|
|
1184
|
+
const v = Te(f, p), y = Te(g, m), b = ke(f, p), x = ke(g, m);
|
|
1177
1185
|
this._areaRect = new DOMRect(v, y, b - v, x - y);
|
|
1178
1186
|
}
|
|
1179
1187
|
_redrawSelectionArea() {
|
|
@@ -1183,13 +1191,13 @@ class Ie extends Dt {
|
|
|
1183
1191
|
_onTapStop(t, n) {
|
|
1184
1192
|
var o;
|
|
1185
1193
|
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
1186
|
-
|
|
1194
|
+
L(this._targetElement, "scroll", this._onStartAreaScroll), L(s, ["mousemove", "touchmove"], this._delayedTapMove), L(s, ["touchmove", "mousemove"], this._onTapMove), L(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), L(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, L(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), j(this._area, "display", "none");
|
|
1187
1195
|
}
|
|
1188
1196
|
_updateElementSelection() {
|
|
1189
1197
|
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: h } = n.behaviour, d = h === "invert", a = [], f = [], g = [];
|
|
1190
1198
|
for (let m = 0; m < t.length; m++) {
|
|
1191
1199
|
const u = t[m];
|
|
1192
|
-
if (
|
|
1200
|
+
if (Me(s, u.getBoundingClientRect(), l)) {
|
|
1193
1201
|
if (r.includes(u))
|
|
1194
1202
|
i.includes(u) && !c.includes(u) && c.push(u);
|
|
1195
1203
|
else if (d && i.includes(u)) {
|
|
@@ -1271,7 +1279,7 @@ class Ie extends Dt {
|
|
|
1271
1279
|
i.added = [], i.removed.push(
|
|
1272
1280
|
...o,
|
|
1273
1281
|
...t ? s : []
|
|
1274
|
-
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection =
|
|
1282
|
+
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Ae(t ? [] : s);
|
|
1275
1283
|
}
|
|
1276
1284
|
/**
|
|
1277
1285
|
* @returns {Array} Selected elements
|
|
@@ -1358,7 +1366,7 @@ function Bt(e) {
|
|
|
1358
1366
|
changed: { added: o, removed: s }
|
|
1359
1367
|
}
|
|
1360
1368
|
}) => {
|
|
1361
|
-
|
|
1369
|
+
k.moved = !0;
|
|
1362
1370
|
for (const i of o)
|
|
1363
1371
|
i.classList.add("selected");
|
|
1364
1372
|
for (const i of s)
|
|
@@ -1370,7 +1378,7 @@ function Bt(e) {
|
|
|
1370
1378
|
e.selection = n;
|
|
1371
1379
|
}
|
|
1372
1380
|
const zt = function(e, t = !0) {
|
|
1373
|
-
this.theme = e;
|
|
1381
|
+
e.cssVar = { ...ue.cssVar, ...e.cssVar }, this.theme = e;
|
|
1374
1382
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1375
1383
|
for (let s = 0; s < o.length; s++) {
|
|
1376
1384
|
const i = o[s];
|
|
@@ -1396,7 +1404,7 @@ function Ft(e) {
|
|
|
1396
1404
|
const o = t[n];
|
|
1397
1405
|
n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
|
|
1398
1406
|
}
|
|
1399
|
-
function
|
|
1407
|
+
function ve(e) {
|
|
1400
1408
|
const { siblings: t, index: n } = W(e);
|
|
1401
1409
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1402
1410
|
}
|
|
@@ -1409,7 +1417,7 @@ function It(e, t) {
|
|
|
1409
1417
|
n !== void 0 && (n[o] = t, t.children = [e]);
|
|
1410
1418
|
}
|
|
1411
1419
|
function Ke(e, t, n) {
|
|
1412
|
-
if (
|
|
1420
|
+
if (ve(t), e === "in")
|
|
1413
1421
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1414
1422
|
else {
|
|
1415
1423
|
t.direction !== void 0 && (t.direction = n.direction);
|
|
@@ -1421,13 +1429,13 @@ function Ke(e, t, n) {
|
|
|
1421
1429
|
}
|
|
1422
1430
|
const Kt = function(e, t) {
|
|
1423
1431
|
var n, o;
|
|
1424
|
-
if (e ===
|
|
1425
|
-
return
|
|
1432
|
+
if (e === T)
|
|
1433
|
+
return T;
|
|
1426
1434
|
if (e === R)
|
|
1427
1435
|
return R;
|
|
1428
1436
|
if (e === ce) {
|
|
1429
1437
|
const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, i = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1430
|
-
return s <= i ? (t.direction =
|
|
1438
|
+
return s <= i ? (t.direction = T, T) : (t.direction = R, R);
|
|
1431
1439
|
}
|
|
1432
1440
|
}, Ve = function(e, t, n) {
|
|
1433
1441
|
var i, r;
|
|
@@ -1437,11 +1445,11 @@ const Kt = function(e, t) {
|
|
|
1437
1445
|
s.nextSibling.appendChild(n);
|
|
1438
1446
|
else {
|
|
1439
1447
|
const c = e.createChildren([n]);
|
|
1440
|
-
s.appendChild(
|
|
1448
|
+
s.appendChild(ge(!0)), s.insertAdjacentElement("afterend", c);
|
|
1441
1449
|
}
|
|
1442
1450
|
e.linkDiv(n.offsetParent);
|
|
1443
1451
|
} else
|
|
1444
|
-
s.tagName === "ME-ROOT" && (Kt(e.direction, o.nodeObj) ===
|
|
1452
|
+
s.tagName === "ME-ROOT" && (Kt(e.direction, o.nodeObj) === T ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1445
1453
|
}, We = function(e, t) {
|
|
1446
1454
|
const n = e.parentNode;
|
|
1447
1455
|
if (t === 0) {
|
|
@@ -1456,21 +1464,21 @@ const Kt = function(e, t) {
|
|
|
1456
1464
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1457
1465
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1458
1466
|
}, Vt = function(e, t) {
|
|
1459
|
-
const n = e.nodeObj, o =
|
|
1467
|
+
const n = e.nodeObj, o = pe(n);
|
|
1460
1468
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1461
1469
|
const s = Object.assign(n, t);
|
|
1462
|
-
|
|
1470
|
+
me(e, s), this.linkDiv(), this.bus.fire("operation", {
|
|
1463
1471
|
name: "reshapeNode",
|
|
1464
1472
|
obj: s,
|
|
1465
1473
|
origin: o
|
|
1466
1474
|
});
|
|
1467
|
-
},
|
|
1475
|
+
}, ye = function(e, t, n) {
|
|
1468
1476
|
if (!t)
|
|
1469
1477
|
return null;
|
|
1470
1478
|
const o = t.nodeObj;
|
|
1471
1479
|
o.expanded === !1 && (e.expandNode(t, !0), t = C(o.id));
|
|
1472
1480
|
const s = n || e.generateNewObj();
|
|
1473
|
-
o.children ? o.children.push(s) : o.children = [s],
|
|
1481
|
+
o.children ? o.children.push(s) : o.children = [s], $(e.nodeData);
|
|
1474
1482
|
const { grp: i, top: r } = e.createWrapper(s);
|
|
1475
1483
|
return Ve(e, t, i), { newTop: r, newNodeObj: s };
|
|
1476
1484
|
}, Wt = function(e, t, n) {
|
|
@@ -1489,7 +1497,7 @@ const Kt = function(e, t) {
|
|
|
1489
1497
|
return;
|
|
1490
1498
|
}
|
|
1491
1499
|
const i = n || this.generateNewObj();
|
|
1492
|
-
qt(i, e, s),
|
|
1500
|
+
qt(i, e, s), $(this.nodeData);
|
|
1493
1501
|
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(i);
|
|
1494
1502
|
r.parentElement.insertAdjacentElement(Ue[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1495
1503
|
name: "insertSibling",
|
|
@@ -1505,9 +1513,9 @@ const Kt = function(e, t) {
|
|
|
1505
1513
|
if (!o.parent)
|
|
1506
1514
|
return;
|
|
1507
1515
|
const s = t || this.generateNewObj();
|
|
1508
|
-
It(o, s),
|
|
1516
|
+
It(o, s), $(this.nodeData);
|
|
1509
1517
|
const i = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(s, !0);
|
|
1510
|
-
c.appendChild(
|
|
1518
|
+
c.appendChild(ge(!0)), i.insertAdjacentElement("afterend", r);
|
|
1511
1519
|
const l = this.createChildren([i]);
|
|
1512
1520
|
c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
|
|
1513
1521
|
name: "insertParent",
|
|
@@ -1517,7 +1525,7 @@ const Kt = function(e, t) {
|
|
|
1517
1525
|
const n = e || this.currentNode;
|
|
1518
1526
|
if (!n)
|
|
1519
1527
|
return;
|
|
1520
|
-
const o =
|
|
1528
|
+
const o = ye(this, n, t);
|
|
1521
1529
|
if (!o)
|
|
1522
1530
|
return;
|
|
1523
1531
|
const { newTop: s, newNodeObj: i } = o;
|
|
@@ -1526,9 +1534,9 @@ const Kt = function(e, t) {
|
|
|
1526
1534
|
obj: i
|
|
1527
1535
|
}), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
|
|
1528
1536
|
}, Xt = function(e, t) {
|
|
1529
|
-
const n =
|
|
1530
|
-
|
|
1531
|
-
const o =
|
|
1537
|
+
const n = pe(e.nodeObj);
|
|
1538
|
+
fe(n);
|
|
1539
|
+
const o = ye(this, t, n);
|
|
1532
1540
|
if (!o)
|
|
1533
1541
|
return;
|
|
1534
1542
|
const { newNodeObj: s } = o;
|
|
@@ -1540,9 +1548,9 @@ const Kt = function(e, t) {
|
|
|
1540
1548
|
e = le(e);
|
|
1541
1549
|
const n = [];
|
|
1542
1550
|
for (let o = 0; o < e.length; o++) {
|
|
1543
|
-
const s = e[o], i =
|
|
1544
|
-
|
|
1545
|
-
const r =
|
|
1551
|
+
const s = e[o], i = pe(s.nodeObj);
|
|
1552
|
+
fe(i);
|
|
1553
|
+
const r = ye(this, t, i);
|
|
1546
1554
|
if (!r)
|
|
1547
1555
|
return;
|
|
1548
1556
|
const { newNodeObj: c } = r;
|
|
@@ -1582,7 +1590,7 @@ const Kt = function(e, t) {
|
|
|
1582
1590
|
const n = t.nodeObj;
|
|
1583
1591
|
if (!n.parent)
|
|
1584
1592
|
throw new Error("Can not remove root node");
|
|
1585
|
-
const o = n.parent.children, s = o.findIndex((c) => c === n), i =
|
|
1593
|
+
const o = n.parent.children, s = o.findIndex((c) => c === n), i = ve(n);
|
|
1586
1594
|
if (We(t, i), o.length !== 0) {
|
|
1587
1595
|
const c = o[s] || o[s - 1];
|
|
1588
1596
|
this.selectNode(C(c.id));
|
|
@@ -1600,7 +1608,7 @@ const Kt = function(e, t) {
|
|
|
1600
1608
|
const n = t.nodeObj;
|
|
1601
1609
|
if (!n.parent)
|
|
1602
1610
|
continue;
|
|
1603
|
-
const o =
|
|
1611
|
+
const o = ve(n);
|
|
1604
1612
|
We(t, o);
|
|
1605
1613
|
}
|
|
1606
1614
|
this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1613,7 +1621,7 @@ const Kt = function(e, t) {
|
|
|
1613
1621
|
n.expanded === !1 && (this.expandNode(t, !0), t = C(n.id));
|
|
1614
1622
|
for (const o of e) {
|
|
1615
1623
|
const s = o.nodeObj;
|
|
1616
|
-
Ke("in", s, n),
|
|
1624
|
+
Ke("in", s, n), $(this.nodeData);
|
|
1617
1625
|
const i = o.parentElement;
|
|
1618
1626
|
Ve(this, t, i.parentElement);
|
|
1619
1627
|
}
|
|
@@ -1627,7 +1635,7 @@ const Kt = function(e, t) {
|
|
|
1627
1635
|
const s = n.nodeObj;
|
|
1628
1636
|
for (const i of e) {
|
|
1629
1637
|
const r = i.nodeObj;
|
|
1630
|
-
Ke(t, r, s),
|
|
1638
|
+
Ke(t, r, s), $(o.nodeData), J(i);
|
|
1631
1639
|
const c = i.parentElement.parentNode;
|
|
1632
1640
|
n.parentElement.parentNode.insertAdjacentElement(Ue[t], c);
|
|
1633
1641
|
}
|
|
@@ -1754,8 +1762,8 @@ const cn = function(e, t, n) {
|
|
|
1754
1762
|
o.parentNode.children[1].remove();
|
|
1755
1763
|
this.linkDiv(), this.bus.fire("expandNode", n);
|
|
1756
1764
|
}, Mn = function(e) {
|
|
1757
|
-
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []),
|
|
1758
|
-
},
|
|
1765
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), $(this.nodeData), this.layout(), this.linkDiv();
|
|
1766
|
+
}, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1759
1767
|
__proto__: null,
|
|
1760
1768
|
cancelFocus: wn,
|
|
1761
1769
|
clearSelection: hn,
|
|
@@ -1778,7 +1786,7 @@ const cn = function(e, t, n) {
|
|
|
1778
1786
|
toCenter: yn,
|
|
1779
1787
|
unselectNode: ln,
|
|
1780
1788
|
unselectNodes: dn
|
|
1781
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1789
|
+
}, Symbol.toStringTag, { value: "Module" })), Tn = function(e) {
|
|
1782
1790
|
return {
|
|
1783
1791
|
dom: e,
|
|
1784
1792
|
moved: !1,
|
|
@@ -1804,11 +1812,11 @@ const cn = function(e, t, n) {
|
|
|
1804
1812
|
this.moved = !1, this.mousedown = !1;
|
|
1805
1813
|
}
|
|
1806
1814
|
};
|
|
1807
|
-
},
|
|
1808
|
-
create:
|
|
1815
|
+
}, je = {
|
|
1816
|
+
create: Tn
|
|
1809
1817
|
};
|
|
1810
1818
|
function re(e, t, n) {
|
|
1811
|
-
const { offsetLeft: o, offsetTop: s } =
|
|
1819
|
+
const { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, c = o + i / 2, l = s + r / 2, h = c + n.x, d = l + n.y;
|
|
1812
1820
|
return {
|
|
1813
1821
|
w: i,
|
|
1814
1822
|
h: r,
|
|
@@ -1826,7 +1834,7 @@ function I(e) {
|
|
|
1826
1834
|
y: n
|
|
1827
1835
|
};
|
|
1828
1836
|
}
|
|
1829
|
-
const
|
|
1837
|
+
const Ln = function(e, t, n, o) {
|
|
1830
1838
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1831
1839
|
return N(s, {
|
|
1832
1840
|
"text-anchor": "middle",
|
|
@@ -1841,7 +1849,7 @@ const kn = function(e, t, n, o) {
|
|
|
1841
1849
|
const i = re(e, t, o.delta1), r = re(e, n, o.delta2), { x: c, y: l } = I(i), { ctrlX: h, ctrlY: d } = i, { ctrlX: a, ctrlY: f } = r, { x: g, y: p } = I(r), m = He(a, f, g, p), u = pt(
|
|
1842
1850
|
`M ${c} ${l} C ${h} ${d} ${a} ${f} ${g} ${p}`,
|
|
1843
1851
|
`M ${m.x1} ${m.y1} L ${g} ${p} L ${m.x2} ${m.y2}`
|
|
1844
|
-
), v = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, y = l / 8 + d * 3 / 8 + f * 3 / 8 + p / 8, b =
|
|
1852
|
+
), v = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, y = l / 8 + d * 3 / 8 + f * 3 / 8 + p / 8, b = Ln(o.label, v, y, e.theme.cssVar["--color"]);
|
|
1845
1853
|
u.appendChild(b), u.arrowObj = o, u.dataset.linkid = o.id, e.linkSvgGroup.appendChild(u), s || (e.arrows.push(o), e.currentArrow = u, Qe(e, o, i, r)), performance.now();
|
|
1846
1854
|
}, An = function(e, t) {
|
|
1847
1855
|
const n = {
|
|
@@ -1878,7 +1886,7 @@ const kn = function(e, t, n, o) {
|
|
|
1878
1886
|
this.currentArrow = e;
|
|
1879
1887
|
const t = e.arrowObj, n = C(t.from), o = C(t.to), s = re(this, n, t.delta1), i = re(this, o, t.delta2);
|
|
1880
1888
|
Qe(this, t, s, i);
|
|
1881
|
-
},
|
|
1889
|
+
}, $n = function() {
|
|
1882
1890
|
this.currentArrow = null, Ze(this);
|
|
1883
1891
|
}, Ze = function(e) {
|
|
1884
1892
|
e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
@@ -1896,7 +1904,7 @@ const kn = function(e, t, n, o) {
|
|
|
1896
1904
|
y1: h + "",
|
|
1897
1905
|
x2: d + "",
|
|
1898
1906
|
y2: a + ""
|
|
1899
|
-
}), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 =
|
|
1907
|
+
}), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 = je.create(e.P2), e.helper2 = je.create(e.P3), e.helper1.init(e.map, (g, p) => {
|
|
1900
1908
|
var y;
|
|
1901
1909
|
r = r + g / e.scaleVal, c = c + p / e.scaleVal;
|
|
1902
1910
|
const m = I({ ...n, ctrlX: r, ctrlY: c });
|
|
@@ -1928,7 +1936,7 @@ const kn = function(e, t, n, o) {
|
|
|
1928
1936
|
}), t.delta2.x = l - o.cx, t.delta2.y = h - o.cy;
|
|
1929
1937
|
});
|
|
1930
1938
|
};
|
|
1931
|
-
function
|
|
1939
|
+
function On() {
|
|
1932
1940
|
this.linkSvgGroup.innerHTML = "";
|
|
1933
1941
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1934
1942
|
const t = this.arrows[e];
|
|
@@ -1960,10 +1968,10 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1960
1968
|
createArrow: An,
|
|
1961
1969
|
editArrowLabel: Pn,
|
|
1962
1970
|
removeArrow: jn,
|
|
1963
|
-
renderArrow:
|
|
1971
|
+
renderArrow: On,
|
|
1964
1972
|
selectArrow: Dn,
|
|
1965
1973
|
tidyArrow: Hn,
|
|
1966
|
-
unselectArrow:
|
|
1974
|
+
unselectArrow: $n
|
|
1967
1975
|
}, Symbol.toStringTag, { value: "Module" })), zn = function(e) {
|
|
1968
1976
|
var l, h;
|
|
1969
1977
|
if (e.length === 0)
|
|
@@ -2010,7 +2018,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2010
2018
|
}, Rn = function(e) {
|
|
2011
2019
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2012
2020
|
return t.setAttribute("id", e), t;
|
|
2013
|
-
},
|
|
2021
|
+
}, De = function(e, t) {
|
|
2014
2022
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2015
2023
|
return N(n, {
|
|
2016
2024
|
d: e,
|
|
@@ -2019,7 +2027,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2019
2027
|
"stroke-linecap": "round",
|
|
2020
2028
|
"stroke-width": "2"
|
|
2021
2029
|
}), n;
|
|
2022
|
-
},
|
|
2030
|
+
}, $e = function(e, t, n, o, s) {
|
|
2023
2031
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2024
2032
|
return N(i, {
|
|
2025
2033
|
"text-anchor": o,
|
|
@@ -2040,12 +2048,12 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2040
2048
|
const U = (S = h.children) == null ? void 0 : S[P];
|
|
2041
2049
|
if (!U)
|
|
2042
2050
|
return e.removeSummary(n), null;
|
|
2043
|
-
const H = Fn(U.id), { offsetLeft: Z, offsetTop:
|
|
2044
|
-
P === i && (g =
|
|
2051
|
+
const H = Fn(U.id), { offsetLeft: Z, offsetTop: be } = O(c, H);
|
|
2052
|
+
P === i && (g = be + 20), P === r && (p = be + H.offsetHeight - 20), Z < a && (a = Z), H.offsetWidth + Z > f && (f = H.offsetWidth + Z);
|
|
2045
2053
|
}
|
|
2046
2054
|
let m, u;
|
|
2047
2055
|
const v = g + 10, y = p + 10, b = (v + y) / 2, x = e.theme.cssVar["--color"];
|
|
2048
|
-
d === "lhs" ? (m =
|
|
2056
|
+
d === "lhs" ? (m = De(`M ${a + 10} ${v} c -5 0 -10 5 -10 10 L ${a} ${y - 10} c 0 5 5 10 10 10 M ${a} ${b} h -10`, x), u = $e(o, a - 20, b + 6, "end", x)) : (m = De(`M ${f - 10} ${v} c 5 0 10 5 10 10 L ${f} ${y - 10} c 0 5 -5 10 -10 10 M ${f} ${b} h 10`, x), u = $e(o, f + 20, b + 6, "start", x));
|
|
2049
2057
|
const w = Rn("s-" + n);
|
|
2050
2058
|
return w.appendChild(m), w.appendChild(u), w.summaryObj = t, e.summarySvg.appendChild(w), w;
|
|
2051
2059
|
}, In = function() {
|
|
@@ -2153,7 +2161,7 @@ function Qn(e, t, n, o) {
|
|
|
2153
2161
|
}), r.innerHTML = s, i.appendChild(r), i;
|
|
2154
2162
|
}
|
|
2155
2163
|
function eo(e, t) {
|
|
2156
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2164
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(M, "rect");
|
|
2157
2165
|
return N(i, {
|
|
2158
2166
|
x: o + "",
|
|
2159
2167
|
y: s + "",
|
|
@@ -2167,7 +2175,7 @@ function eo(e, t) {
|
|
|
2167
2175
|
}), i;
|
|
2168
2176
|
}
|
|
2169
2177
|
function te(e, t, n = !1) {
|
|
2170
|
-
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } =
|
|
2178
|
+
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = O(e.nodes, t), r = document.createElementNS(M, "rect");
|
|
2171
2179
|
N(r, {
|
|
2172
2180
|
x: s + "",
|
|
2173
2181
|
y: i + "",
|
|
@@ -2185,7 +2193,7 @@ function te(e, t, n = !1) {
|
|
|
2185
2193
|
return n ? l = Qn(t, o, s, i) : l = Zn(t, o, s, i), c.appendChild(l), c;
|
|
2186
2194
|
}
|
|
2187
2195
|
function to(e, t) {
|
|
2188
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2196
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(M, "a"), r = document.createElementNS(M, "text");
|
|
2189
2197
|
return N(r, {
|
|
2190
2198
|
x: o + "",
|
|
2191
2199
|
y: s + parseInt(n.fontSize) + "",
|
|
@@ -2197,7 +2205,7 @@ function to(e, t) {
|
|
|
2197
2205
|
}), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
|
|
2198
2206
|
}
|
|
2199
2207
|
function no(e, t) {
|
|
2200
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2208
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS(M, "image");
|
|
2201
2209
|
return N(i, {
|
|
2202
2210
|
x: o + "",
|
|
2203
2211
|
y: s + "",
|
|
@@ -2216,7 +2224,7 @@ const ne = 100, oo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
|
|
|
2216
2224
|
height: `${o}`,
|
|
2217
2225
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2218
2226
|
}), i.appendChild(c), n.querySelectorAll(".subLines").forEach((p) => {
|
|
2219
|
-
const m = p.cloneNode(!0), { offsetLeft: u, offsetTop: v } =
|
|
2227
|
+
const m = p.cloneNode(!0), { offsetLeft: u, offsetTop: v } = O(n, p.parentElement);
|
|
2220
2228
|
m.setAttribute("x", `${u}`), m.setAttribute("y", `${v}`), r.appendChild(m);
|
|
2221
2229
|
});
|
|
2222
2230
|
const l = (a = n.querySelector(".lines")) == null ? void 0 : a.cloneNode(!0);
|
|
@@ -2290,7 +2298,7 @@ const uo = {
|
|
|
2290
2298
|
createTopic: ut,
|
|
2291
2299
|
findEle: C,
|
|
2292
2300
|
changeTheme: zt,
|
|
2293
|
-
...
|
|
2301
|
+
...kn,
|
|
2294
2302
|
...tt,
|
|
2295
2303
|
...Bn,
|
|
2296
2304
|
...Xn,
|
|
@@ -2298,7 +2306,7 @@ const uo = {
|
|
|
2298
2306
|
init(e) {
|
|
2299
2307
|
if (!e || !e.nodeData)
|
|
2300
2308
|
return new Error("MindElixir: `data` is required");
|
|
2301
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
2309
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, $(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Lt(this), this.keypress && Et(this), this.editable && Bt(this), this.contextMenu && this.disposable.push(gt(this, this.contextMenuOption)), this.draggable && St(this), this.allowUndo && Mt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2302
2310
|
},
|
|
2303
2311
|
destroy() {
|
|
2304
2312
|
var e, t;
|
|
@@ -2321,7 +2329,7 @@ function po({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction:
|
|
|
2321
2329
|
const u = Math.abs(d - f) / 300 * D;
|
|
2322
2330
|
return l === "lhs" ? (m = t, g = m + D, p = m - D, a = i + D, `M ${g} ${d} C ${m} ${d} ${m + u} ${f} ${p} ${f} H ${a}`) : (m = t + n, g = m - D, p = m + D, a = i + r - D, `M ${g} ${d} C ${m} ${d} ${m - u} ${f} ${p} ${f} H ${a}`);
|
|
2323
2331
|
}
|
|
2324
|
-
const mo = "4.2.
|
|
2332
|
+
const mo = "4.2.5", Y = document;
|
|
2325
2333
|
function A({
|
|
2326
2334
|
el: e,
|
|
2327
2335
|
direction: t,
|
|
@@ -2348,15 +2356,15 @@ function A({
|
|
|
2348
2356
|
throw new Error("MindElixir: el is not a valid element");
|
|
2349
2357
|
y.className += " mind-elixir", y.innerHTML = "", y.style.setProperty("--gap", D + "px"), this.mindElixirBox = y, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = h || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = f || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = g === void 0 ? !1 : g, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = p || fo, this.generateSubBranch = m || po, this.overflowHidden = u || !1, this.bus = it.create(), this.container = Y.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
|
|
2350
2358
|
const x = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2351
|
-
this.theme = v || (x.matches ? Pe :
|
|
2359
|
+
this.theme = v || (x.matches ? Pe : ue);
|
|
2352
2360
|
const w = Y.createElement("div");
|
|
2353
|
-
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 =
|
|
2361
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = xe(), this.line2 = xe(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : st(this);
|
|
2354
2362
|
}
|
|
2355
2363
|
A.prototype = uo;
|
|
2356
|
-
A.LEFT =
|
|
2364
|
+
A.LEFT = T;
|
|
2357
2365
|
A.RIGHT = R;
|
|
2358
2366
|
A.SIDE = ce;
|
|
2359
|
-
A.THEME =
|
|
2367
|
+
A.THEME = ue;
|
|
2360
2368
|
A.DARK_THEME = Pe;
|
|
2361
2369
|
A.version = mo;
|
|
2362
2370
|
A.E = C;
|