mind-elixir 4.3.4 → 4.3.6
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 +6 -6
- package/dist/MindElixir.js +580 -573
- package/dist/MindElixirLite.iife.js +6 -6
- package/dist/MindElixirLite.js +356 -349
- package/dist/types/index.d.ts +8 -0
- package/dist/types/linkDiv.d.ts +1 -1
- package/dist/types/nodeOperation.d.ts +1 -1
- package/dist/types/plugin/contextMenu.d.ts +2 -3
- package/dist/types/types/index.d.ts +8 -3
- package/dist/types/utils/generateBranch.d.ts +7 -6
- package/dist/types/utils/layout.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +21 -4
- package/readme.cn.md +0 -207
package/dist/MindElixir.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
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-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:#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
|
-
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 (
|
|
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
|
+
if (l && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
7
7
|
document.write(
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
t = function() {
|
|
17
17
|
var d, a, f, g;
|
|
18
|
-
(g = document.createElement("div")).innerHTML =
|
|
18
|
+
(g = document.createElement("div")).innerHTML = c, c = null, (f = g.getElementsByTagName("svg")[0]) && (f.setAttribute("aria-hidden", "true"), f.style.position = "absolute", f.style.width = 0, f.style.height = 0, f.style.overflow = "hidden", d = f, (a = document.body).firstChild ? (g = d, (f = a.firstChild).parentNode.insertBefore(g, f)) : a.appendChild(d));
|
|
19
19
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
20
20
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
21
21
|
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
s.readyState == "complete" && (s.onreadystatechange = null, u());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
|
-
const
|
|
32
|
+
const L = 0, $ = 1, re = 2, Pe = {
|
|
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 M = 0, D = 1, ie = 2, Oe = {
|
|
|
43
43
|
"--panel-bgcolor": "#ffffff",
|
|
44
44
|
"--panel-border-color": "#eaeaea"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, He = {
|
|
47
47
|
name: "Dark",
|
|
48
48
|
type: "dark",
|
|
49
49
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
@@ -57,32 +57,32 @@ const M = 0, D = 1, ie = 2, Oe = {
|
|
|
57
57
|
"--panel-border-color": "#696969"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function ne(e) {
|
|
61
61
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const oe = function(e, t) {
|
|
64
64
|
if (t.id === e)
|
|
65
65
|
return t;
|
|
66
66
|
if (t.children && t.children.length) {
|
|
67
67
|
for (let n = 0; n < t.children.length; n++) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = oe(e, t.children[n]);
|
|
69
69
|
if (o)
|
|
70
70
|
return o;
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
} else
|
|
74
74
|
return null;
|
|
75
|
-
},
|
|
75
|
+
}, O = (e, t) => {
|
|
76
76
|
if (e.parent = t, e.children)
|
|
77
77
|
for (let n = 0; n < e.children.length; n++)
|
|
78
|
-
|
|
78
|
+
O(e.children[n], e);
|
|
79
79
|
};
|
|
80
|
-
function
|
|
81
|
-
if (e.id =
|
|
80
|
+
function he(e) {
|
|
81
|
+
if (e.id = X(), e.children)
|
|
82
82
|
for (let t = 0; t < e.children.length; t++)
|
|
83
|
-
|
|
83
|
+
he(e.children[t]);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const ot = (e, t) => {
|
|
86
86
|
let n = Date.now();
|
|
87
87
|
return function(...o) {
|
|
88
88
|
Date.now() - n < t || (e(...o), n = Date.now());
|
|
@@ -92,25 +92,25 @@ function Be(e, t, n, o) {
|
|
|
92
92
|
const s = o - t, i = e - n;
|
|
93
93
|
let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
|
|
94
94
|
i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
|
|
95
|
-
const
|
|
95
|
+
const c = 15, l = 30, u = r + l, d = r - l;
|
|
96
96
|
return {
|
|
97
|
-
x1: n + Math.cos(Math.PI * u / 180) *
|
|
98
|
-
y1: o - Math.sin(Math.PI * u / 180) *
|
|
99
|
-
x2: n + Math.cos(Math.PI * d / 180) *
|
|
100
|
-
y2: o - Math.sin(Math.PI * d / 180) *
|
|
97
|
+
x1: n + Math.cos(Math.PI * u / 180) * c,
|
|
98
|
+
y1: o - Math.sin(Math.PI * u / 180) * c,
|
|
99
|
+
x2: n + Math.cos(Math.PI * d / 180) * c,
|
|
100
|
+
y2: o - Math.sin(Math.PI * d / 180) * c
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function X() {
|
|
104
104
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
const e =
|
|
106
|
+
const st = function() {
|
|
107
|
+
const e = X();
|
|
108
108
|
return {
|
|
109
109
|
topic: this.newTopicName,
|
|
110
110
|
id: e
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
function
|
|
113
|
+
function ue(e) {
|
|
114
114
|
return JSON.parse(
|
|
115
115
|
JSON.stringify(e, (n, o) => {
|
|
116
116
|
if (n !== "parent")
|
|
@@ -118,7 +118,7 @@ function he(e) {
|
|
|
118
118
|
})
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const P = (e, t) => {
|
|
122
122
|
let n = 0, o = 0;
|
|
123
123
|
for (; t && t !== e; )
|
|
124
124
|
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
@@ -126,7 +126,7 @@ const O = (e, t) => {
|
|
|
126
126
|
}, E = (e, t) => {
|
|
127
127
|
for (const n in t)
|
|
128
128
|
e.setAttribute(n, t[n]);
|
|
129
|
-
}, le = (e) => e ? e.tagName === "ME-TPC" : !1,
|
|
129
|
+
}, le = (e) => e ? e.tagName === "ME-TPC" : !1, ce = (e) => e.filter((t) => {
|
|
130
130
|
for (let n = 0; n < e.length; n++) {
|
|
131
131
|
if (t === e[n])
|
|
132
132
|
continue;
|
|
@@ -134,7 +134,7 @@ const O = (e, t) => {
|
|
|
134
134
|
return !1;
|
|
135
135
|
}
|
|
136
136
|
return !0;
|
|
137
|
-
}),
|
|
137
|
+
}), _ = {
|
|
138
138
|
moved: !1,
|
|
139
139
|
// diffrentiate click and move
|
|
140
140
|
mousedown: !1,
|
|
@@ -146,10 +146,12 @@ const O = (e, t) => {
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
clear() {
|
|
149
|
-
|
|
149
|
+
setTimeout(() => {
|
|
150
|
+
this.moved = !1, this.mousedown = !1;
|
|
151
|
+
}, 0);
|
|
150
152
|
}
|
|
151
153
|
};
|
|
152
|
-
function
|
|
154
|
+
function it(e) {
|
|
153
155
|
e.map.addEventListener("click", (t) => {
|
|
154
156
|
var o, s;
|
|
155
157
|
if (t.button !== 0)
|
|
@@ -162,8 +164,8 @@ function st(e) {
|
|
|
162
164
|
e.helper2.clear();
|
|
163
165
|
return;
|
|
164
166
|
}
|
|
165
|
-
if (
|
|
166
|
-
|
|
167
|
+
if (_.moved) {
|
|
168
|
+
_.clear();
|
|
167
169
|
return;
|
|
168
170
|
}
|
|
169
171
|
e.clearSelection();
|
|
@@ -182,19 +184,19 @@ function st(e) {
|
|
|
182
184
|
const n = t.target;
|
|
183
185
|
le(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
184
186
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
185
|
-
t.target.contentEditable !== "true" &&
|
|
187
|
+
t.target.contentEditable !== "true" && _.onMove(t, e.container);
|
|
186
188
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
187
189
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
188
|
-
t.button === n && t.target.contentEditable !== "true" && (
|
|
190
|
+
t.button === n && t.target.contentEditable !== "true" && (_.moved = !1, _.mousedown = !0);
|
|
189
191
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
190
192
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
191
|
-
t.button === n &&
|
|
193
|
+
t.button === n && _.clear();
|
|
192
194
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
193
195
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
194
|
-
t.button === n &&
|
|
196
|
+
t.button === n && _.clear();
|
|
195
197
|
});
|
|
196
198
|
}
|
|
197
|
-
const
|
|
199
|
+
const rt = {
|
|
198
200
|
create() {
|
|
199
201
|
return {
|
|
200
202
|
handlers: {},
|
|
@@ -222,43 +224,45 @@ const it = {
|
|
|
222
224
|
}
|
|
223
225
|
};
|
|
224
226
|
}
|
|
225
|
-
}
|
|
227
|
+
};
|
|
228
|
+
var C = /* @__PURE__ */ ((e) => (e.LHS = "lhs", e.RHS = "rhs", e))(C || {});
|
|
229
|
+
const se = document, ct = function() {
|
|
226
230
|
this.nodes.innerHTML = "";
|
|
227
231
|
const e = this.createTopic(this.nodeData);
|
|
228
|
-
|
|
229
|
-
const t =
|
|
232
|
+
fe(e, this.nodeData), e.draggable = !1;
|
|
233
|
+
const t = se.createElement("me-root");
|
|
230
234
|
t.appendChild(e);
|
|
231
235
|
const n = this.nodeData.children || [];
|
|
232
|
-
if (this.direction ===
|
|
236
|
+
if (this.direction === re) {
|
|
233
237
|
let o = 0, s = 0;
|
|
234
238
|
n.map((i) => {
|
|
235
|
-
i.direction ===
|
|
239
|
+
i.direction === L ? o += 1 : i.direction === $ ? s += 1 : o <= s ? (i.direction = L, o += 1) : (i.direction = $, s += 1);
|
|
236
240
|
});
|
|
237
241
|
}
|
|
238
242
|
lt(this, n, t);
|
|
239
243
|
}, lt = function(e, t, n) {
|
|
240
|
-
const o =
|
|
241
|
-
o.className =
|
|
242
|
-
const s =
|
|
243
|
-
s.className =
|
|
244
|
+
const o = se.createElement("me-main");
|
|
245
|
+
o.className = C.LHS;
|
|
246
|
+
const s = se.createElement("me-main");
|
|
247
|
+
s.className = C.RHS;
|
|
244
248
|
for (let i = 0; i < t.length; i++) {
|
|
245
|
-
const r = t[i], { grp:
|
|
246
|
-
e.direction ===
|
|
249
|
+
const r = t[i], { grp: c } = e.createWrapper(r);
|
|
250
|
+
e.direction === re ? r.direction === L ? o.appendChild(c) : s.appendChild(c) : e.direction === L ? o.appendChild(c) : s.appendChild(c);
|
|
247
251
|
}
|
|
248
252
|
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
249
|
-
},
|
|
250
|
-
const n =
|
|
253
|
+
}, at = function(e, t) {
|
|
254
|
+
const n = se.createElement("me-children");
|
|
251
255
|
for (let o = 0; o < t.length; o++) {
|
|
252
256
|
const s = t[o], { grp: i } = e.createWrapper(s);
|
|
253
257
|
n.appendChild(i);
|
|
254
258
|
}
|
|
255
259
|
return n;
|
|
256
|
-
},
|
|
257
|
-
const o = (t ? t.mindElixirBox :
|
|
260
|
+
}, M = document, N = (e, t) => {
|
|
261
|
+
const o = (t ? t.mindElixirBox : M).querySelector(`[data-nodeid=me${e}]`);
|
|
258
262
|
if (!o)
|
|
259
263
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
260
264
|
return o;
|
|
261
|
-
},
|
|
265
|
+
}, fe = function(e, t) {
|
|
262
266
|
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) {
|
|
263
267
|
e.innerHTML = t.dangerouslySetInnerHTML;
|
|
264
268
|
return;
|
|
@@ -266,60 +270,60 @@ const it = {
|
|
|
266
270
|
if (t.image) {
|
|
267
271
|
const n = t.image;
|
|
268
272
|
if (n.url && n.width && n.height) {
|
|
269
|
-
const o =
|
|
273
|
+
const o = M.createElement("img");
|
|
270
274
|
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", n.fit && (o.style.objectFit = n.fit), e.appendChild(o), e.image = o;
|
|
271
275
|
}
|
|
272
276
|
} else
|
|
273
277
|
e.image && (e.image = void 0);
|
|
274
278
|
{
|
|
275
|
-
const n =
|
|
279
|
+
const n = M.createElement("span");
|
|
276
280
|
n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
|
|
277
281
|
}
|
|
278
282
|
if (t.hyperLink) {
|
|
279
|
-
const n =
|
|
283
|
+
const n = M.createElement("a");
|
|
280
284
|
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.link = n;
|
|
281
285
|
} else
|
|
282
286
|
e.link && (e.link = void 0);
|
|
283
287
|
if (t.icons && t.icons.length) {
|
|
284
|
-
const n =
|
|
285
|
-
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${
|
|
288
|
+
const n = M.createElement("span");
|
|
289
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
286
290
|
} else
|
|
287
291
|
e.icons && (e.icons = void 0);
|
|
288
292
|
if (t.tags && t.tags.length) {
|
|
289
|
-
const n =
|
|
290
|
-
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${
|
|
293
|
+
const n = M.createElement("div");
|
|
294
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
291
295
|
} else
|
|
292
296
|
e.tags && (e.tags = void 0);
|
|
293
|
-
},
|
|
294
|
-
const n =
|
|
297
|
+
}, dt = function(e, t) {
|
|
298
|
+
const n = M.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
295
299
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
296
|
-
const i =
|
|
300
|
+
const i = pe(e.expanded);
|
|
297
301
|
if (o.appendChild(i), e.expanded !== !1) {
|
|
298
|
-
const r =
|
|
302
|
+
const r = at(this, e.children);
|
|
299
303
|
n.appendChild(r);
|
|
300
304
|
}
|
|
301
305
|
}
|
|
302
306
|
return { grp: n, top: o, tpc: s };
|
|
303
|
-
}, dt = function(e) {
|
|
304
|
-
const t = S.createElement("me-parent"), n = this.createTopic(e);
|
|
305
|
-
return ue(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
306
307
|
}, ht = function(e) {
|
|
307
|
-
const t =
|
|
308
|
-
return t.
|
|
308
|
+
const t = M.createElement("me-parent"), n = this.createTopic(e);
|
|
309
|
+
return fe(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
309
310
|
}, ut = function(e) {
|
|
310
|
-
const t =
|
|
311
|
+
const t = M.createElement("me-children");
|
|
312
|
+
return t.append(...e), t;
|
|
313
|
+
}, ft = function(e) {
|
|
314
|
+
const t = M.createElement("me-tpc");
|
|
311
315
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
312
316
|
};
|
|
313
|
-
function
|
|
314
|
-
const t =
|
|
317
|
+
function Re(e) {
|
|
318
|
+
const t = M.createRange();
|
|
315
319
|
t.selectNodeContents(e);
|
|
316
320
|
const n = window.getSelection();
|
|
317
321
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
318
322
|
}
|
|
319
|
-
const
|
|
323
|
+
const pt = function(e) {
|
|
320
324
|
if (!e)
|
|
321
325
|
return;
|
|
322
|
-
const t =
|
|
326
|
+
const t = M.createElement("div"), n = e.text.textContent;
|
|
323
327
|
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1;
|
|
324
328
|
const o = getComputedStyle(e);
|
|
325
329
|
t.style.cssText = `min-width:${e.offsetWidth - 8}px;
|
|
@@ -328,7 +332,7 @@ const ft = function(e) {
|
|
|
328
332
|
margin:${o.margin};
|
|
329
333
|
font:${o.font};
|
|
330
334
|
background-color:${o.backgroundColor !== "rgba(0, 0, 0, 0)" && o.backgroundColor};
|
|
331
|
-
border-radius:${o.borderRadius};`, this.direction ===
|
|
335
|
+
border-radius:${o.borderRadius};`, this.direction === L && (t.style.right = "0"), t.focus(), Re(t), this.bus.fire("operation", {
|
|
332
336
|
name: "beginEdit",
|
|
333
337
|
obj: e.nodeObj
|
|
334
338
|
}), t.addEventListener("keydown", (s) => {
|
|
@@ -350,30 +354,30 @@ const ft = function(e) {
|
|
|
350
354
|
origin: n
|
|
351
355
|
}));
|
|
352
356
|
});
|
|
353
|
-
},
|
|
354
|
-
const t =
|
|
357
|
+
}, pe = function(e) {
|
|
358
|
+
const t = M.createElement("me-epd");
|
|
355
359
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
356
|
-
},
|
|
357
|
-
const o =
|
|
360
|
+
}, I = document, V = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
|
|
361
|
+
const o = I.createElementNS(V, "path");
|
|
358
362
|
return E(o, {
|
|
359
363
|
d: e,
|
|
360
364
|
stroke: t || "#666",
|
|
361
365
|
fill: "none",
|
|
362
366
|
"stroke-width": n
|
|
363
367
|
}), o;
|
|
364
|
-
},
|
|
365
|
-
const t =
|
|
368
|
+
}, Y = function(e) {
|
|
369
|
+
const t = I.createElementNS(V, "svg");
|
|
366
370
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
367
|
-
},
|
|
368
|
-
const e =
|
|
371
|
+
}, be = function() {
|
|
372
|
+
const e = I.createElementNS(V, "line");
|
|
369
373
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
370
|
-
},
|
|
374
|
+
}, mt = function(e, t) {
|
|
371
375
|
const n = {
|
|
372
376
|
stroke: "rgb(235, 95, 82)",
|
|
373
377
|
fill: "none",
|
|
374
378
|
"stroke-linecap": "cap",
|
|
375
379
|
"stroke-width": "2"
|
|
376
|
-
}, o =
|
|
380
|
+
}, o = I.createElementNS(V, "g"), s = I.createElementNS(V, "path"), i = I.createElementNS(V, "path");
|
|
377
381
|
return E(i, {
|
|
378
382
|
d: t,
|
|
379
383
|
...n
|
|
@@ -382,7 +386,7 @@ const ft = function(e) {
|
|
|
382
386
|
...n,
|
|
383
387
|
"stroke-dasharray": "8,2"
|
|
384
388
|
}), o.appendChild(s), o.appendChild(i), o;
|
|
385
|
-
},
|
|
389
|
+
}, Fe = function(e, t, n) {
|
|
386
390
|
if (!t)
|
|
387
391
|
return;
|
|
388
392
|
const o = document.createElement("div");
|
|
@@ -397,10 +401,10 @@ const ft = function(e) {
|
|
|
397
401
|
top:${i.y}px;
|
|
398
402
|
padding: 2px 4px;
|
|
399
403
|
margin: -2px -4px;
|
|
400
|
-
`, o.focus(),
|
|
404
|
+
`, o.focus(), Re(o), o.addEventListener("keydown", (r) => {
|
|
401
405
|
r.stopPropagation();
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
406
|
+
const c = r.key;
|
|
407
|
+
if (c === "Enter" || c === "Tab") {
|
|
404
408
|
if (r.shiftKey)
|
|
405
409
|
return;
|
|
406
410
|
r.preventDefault(), o.blur(), e.map.focus();
|
|
@@ -408,38 +412,38 @@ const ft = function(e) {
|
|
|
408
412
|
}), o.addEventListener("blur", () => {
|
|
409
413
|
o && n(o);
|
|
410
414
|
});
|
|
411
|
-
},
|
|
415
|
+
}, gt = function(e) {
|
|
412
416
|
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight;
|
|
413
417
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o - s / 2}px`;
|
|
414
418
|
const r = this.map.querySelectorAll("me-main > me-wrapper");
|
|
415
419
|
this.lines.innerHTML = "";
|
|
416
|
-
for (let
|
|
417
|
-
const
|
|
420
|
+
for (let c = 0; c < r.length; c++) {
|
|
421
|
+
const l = r[c], u = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: a } = P(this.nodes, u), f = u.offsetWidth, g = u.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 }), h = this.theme.palette, v = u.nodeObj.branchColor || h[c % h.length];
|
|
418
422
|
u.style.borderColor = v, this.lines.appendChild(ze(m, v, "3"));
|
|
419
|
-
const y =
|
|
420
|
-
if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", p ===
|
|
423
|
+
const y = l.children[0].children[1];
|
|
424
|
+
if (y && (y.style.top = (y.parentNode.offsetHeight - y.offsetHeight) / 2 + "px", p === C.LHS ? y.style.left = "-10px" : y.style.right = "-10px"), e && e !== l)
|
|
421
425
|
continue;
|
|
422
|
-
const b =
|
|
423
|
-
x.tagName === "svg" && x.remove(),
|
|
426
|
+
const b = Y("subLines"), x = l.lastChild;
|
|
427
|
+
x.tagName === "svg" && x.remove(), l.appendChild(b), qe(this, b, v, l, p, !0);
|
|
424
428
|
}
|
|
425
429
|
this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
426
|
-
},
|
|
427
|
-
const r = o.firstChild,
|
|
428
|
-
if (
|
|
430
|
+
}, qe = function(e, t, n, o, s, i) {
|
|
431
|
+
const r = o.firstChild, c = o.children[1].children;
|
|
432
|
+
if (c.length === 0)
|
|
429
433
|
return;
|
|
430
|
-
const
|
|
431
|
-
for (let f = 0; f <
|
|
432
|
-
const g =
|
|
434
|
+
const l = r.offsetTop, u = r.offsetLeft, d = r.offsetWidth, a = r.offsetHeight;
|
|
435
|
+
for (let f = 0; f < c.length; f++) {
|
|
436
|
+
const g = c[f], p = g.firstChild, m = p.offsetTop, h = p.offsetLeft, v = p.offsetWidth, y = p.offsetHeight, b = p.firstChild.nodeObj.branchColor || n, x = e.generateSubBranch({ pT: l, pL: u, pW: d, pH: a, cT: m, cL: h, cW: v, cH: y, direction: s, isFirst: i });
|
|
433
437
|
t.appendChild(ze(x, b, "2"));
|
|
434
438
|
const w = p.children[1];
|
|
435
439
|
if (w) {
|
|
436
|
-
if (w.style.bottom = -(w.offsetHeight / 2) + "px", s ===
|
|
440
|
+
if (w.style.bottom = -(w.offsetHeight / 2) + "px", s === C.LHS ? w.style.left = "10px" : s === C.RHS && (w.style.right = "10px"), !w.expanded)
|
|
437
441
|
continue;
|
|
438
442
|
} else
|
|
439
443
|
continue;
|
|
440
|
-
|
|
444
|
+
qe(e, t, b, g, s);
|
|
441
445
|
}
|
|
442
|
-
},
|
|
446
|
+
}, xe = {
|
|
443
447
|
addChild: "插入子节点",
|
|
444
448
|
addParent: "插入父节点",
|
|
445
449
|
addSibling: "插入同级节点",
|
|
@@ -451,9 +455,9 @@ const ft = function(e) {
|
|
|
451
455
|
link: "连接",
|
|
452
456
|
clickTips: "请点击目标节点",
|
|
453
457
|
summary: "摘要"
|
|
454
|
-
},
|
|
455
|
-
cn:
|
|
456
|
-
zh_CN:
|
|
458
|
+
}, we = {
|
|
459
|
+
cn: xe,
|
|
460
|
+
zh_CN: xe,
|
|
457
461
|
zh_TW: {
|
|
458
462
|
addChild: "插入子節點",
|
|
459
463
|
addParent: "插入父節點",
|
|
@@ -572,40 +576,40 @@ const ft = function(e) {
|
|
|
572
576
|
summary: "요약"
|
|
573
577
|
}
|
|
574
578
|
};
|
|
575
|
-
function
|
|
579
|
+
function vt(e, t) {
|
|
576
580
|
const n = (b) => {
|
|
577
581
|
const x = document.createElement("div");
|
|
578
582
|
return x.innerText = b, x.className = "tips", x;
|
|
579
583
|
}, o = (b, x, w) => {
|
|
580
|
-
const
|
|
581
|
-
return
|
|
582
|
-
}, s =
|
|
583
|
-
if (h.className = "menu-list", h.appendChild(r), h.appendChild(
|
|
584
|
+
const S = document.createElement("li");
|
|
585
|
+
return S.id = b, S.innerHTML = `<span>${ne(x)}</span><span ${w ? 'class="key"' : ""}>${ne(w)}</span>`, S;
|
|
586
|
+
}, s = we[e.locale] ? e.locale : "en", i = we[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"), u = 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, ""), h = document.createElement("ul");
|
|
587
|
+
if (h.className = "menu-list", h.appendChild(r), h.appendChild(c), h.appendChild(l), h.appendChild(u), (!t || t.focus) && (h.appendChild(d), h.appendChild(a)), h.appendChild(f), h.appendChild(g), h.appendChild(m), (!t || t.link) && h.appendChild(p), t && t.extend)
|
|
584
588
|
for (let b = 0; b < t.extend.length; b++) {
|
|
585
589
|
const x = t.extend[b], w = o(x.name, x.name, x.key || "");
|
|
586
|
-
h.appendChild(w), w.onclick = (
|
|
587
|
-
x.onclick(
|
|
590
|
+
h.appendChild(w), w.onclick = (S) => {
|
|
591
|
+
x.onclick(S);
|
|
588
592
|
};
|
|
589
593
|
}
|
|
590
594
|
const v = document.createElement("div");
|
|
591
595
|
v.className = "context-menu", v.appendChild(h), v.hidden = !0, e.container.append(v);
|
|
592
596
|
let y = !0;
|
|
593
597
|
return e.container.oncontextmenu = function(b) {
|
|
594
|
-
if (b.preventDefault(), !e.editable)
|
|
598
|
+
if (b.preventDefault(), !e.editable || _.moved)
|
|
595
599
|
return;
|
|
596
600
|
const x = b.target;
|
|
597
601
|
if (le(x)) {
|
|
598
|
-
x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (d.className = "disabled", f.className = "disabled", g.className = "disabled",
|
|
599
|
-
const w = h.getBoundingClientRect(),
|
|
600
|
-
|
|
602
|
+
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", u.className = "disabled") : (d.className = "", f.className = "", g.className = "", c.className = "", l.className = "", u.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, _.mousedown && (_.mousedown = !1), h.style.top = "", h.style.bottom = "", h.style.left = "", h.style.right = "";
|
|
603
|
+
const w = h.getBoundingClientRect(), S = h.offsetHeight, H = h.offsetWidth, W = b.clientY - w.top, B = b.clientX - w.left;
|
|
604
|
+
S + W > window.innerHeight ? (h.style.top = "", h.style.bottom = "0px") : (h.style.bottom = "", h.style.top = W + 15 + "px"), H + B > window.innerWidth ? (h.style.left = "", h.style.right = "0px") : (h.style.right = "", h.style.left = B + 10 + "px");
|
|
601
605
|
}
|
|
602
606
|
}, v.onclick = (b) => {
|
|
603
607
|
b.target === v && (v.hidden = !0);
|
|
604
608
|
}, r.onclick = () => {
|
|
605
609
|
e.addChild(), v.hidden = !0;
|
|
606
|
-
}, l.onclick = () => {
|
|
607
|
-
e.insertParent(), v.hidden = !0;
|
|
608
610
|
}, c.onclick = () => {
|
|
611
|
+
e.insertParent(), v.hidden = !0;
|
|
612
|
+
}, l.onclick = () => {
|
|
609
613
|
y || (e.insertSibling("after"), v.hidden = !0);
|
|
610
614
|
}, u.onclick = () => {
|
|
611
615
|
y || (e.removeNode(), v.hidden = !0);
|
|
@@ -624,8 +628,8 @@ function gt(e, t) {
|
|
|
624
628
|
"click",
|
|
625
629
|
(w) => {
|
|
626
630
|
w.preventDefault(), x.remove();
|
|
627
|
-
const
|
|
628
|
-
(
|
|
631
|
+
const S = w.target;
|
|
632
|
+
(S.parentElement.tagName === "ME-PARENT" || S.parentElement.tagName === "ME-ROOT") && e.createArrow(b, S);
|
|
629
633
|
},
|
|
630
634
|
{
|
|
631
635
|
once: !0
|
|
@@ -634,44 +638,44 @@ function gt(e, t) {
|
|
|
634
638
|
}, m.onclick = () => {
|
|
635
639
|
v.hidden = !0, e.createSummary(), e.unselectNodes();
|
|
636
640
|
}, () => {
|
|
637
|
-
r.onclick = null,
|
|
641
|
+
r.onclick = null, c.onclick = null, l.onclick = null, u.onclick = null, d.onclick = null, a.onclick = null, f.onclick = null, g.onclick = null, p.onclick = null, m.onclick = null, v.onclick = null, e.container.oncontextmenu = null;
|
|
638
642
|
};
|
|
639
643
|
}
|
|
640
|
-
const
|
|
644
|
+
const yt = (e) => {
|
|
641
645
|
const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
|
|
642
646
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
643
|
-
},
|
|
647
|
+
}, bt = (e) => {
|
|
644
648
|
const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
|
|
645
649
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
646
|
-
},
|
|
650
|
+
}, xt = (e) => {
|
|
647
651
|
e.selectNode(e.map.querySelector("me-root>me-tpc"));
|
|
648
|
-
},
|
|
652
|
+
}, wt = function(e, t) {
|
|
649
653
|
const n = t.parentElement.parentElement.parentElement.previousSibling;
|
|
650
654
|
if (n) {
|
|
651
655
|
const o = n.firstChild;
|
|
652
656
|
e.selectNode(o);
|
|
653
657
|
}
|
|
654
|
-
},
|
|
658
|
+
}, Et = function(e, t) {
|
|
655
659
|
const n = t.parentElement.nextSibling;
|
|
656
660
|
if (n && n.firstChild) {
|
|
657
661
|
const o = n.firstChild.firstChild.firstChild;
|
|
658
662
|
e.selectNode(o);
|
|
659
663
|
}
|
|
660
|
-
},
|
|
664
|
+
}, Ee = function(e, t) {
|
|
661
665
|
var i, r;
|
|
662
666
|
const n = e.currentNode || ((i = e.currentNodes) == null ? void 0 : i[0]);
|
|
663
667
|
if (!n)
|
|
664
668
|
return;
|
|
665
669
|
const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
|
|
666
|
-
o.parent ? s.className === t ?
|
|
667
|
-
},
|
|
670
|
+
o.parent ? s.className === t ? Et(e, n) : (r = o.parent) != null && r.parent ? wt(e, n) : xt(e) : t === C.LHS ? yt(e) : bt(e);
|
|
671
|
+
}, Ne = function(e, t) {
|
|
668
672
|
var r;
|
|
669
673
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
670
674
|
if (!n || !n.nodeObj.parent)
|
|
671
675
|
return;
|
|
672
676
|
const s = t + "Sibling", i = n.parentElement.parentElement[s];
|
|
673
677
|
i && e.selectNode(i.firstChild.firstChild);
|
|
674
|
-
},
|
|
678
|
+
}, Z = function(e, t, n = 1) {
|
|
675
679
|
switch (t) {
|
|
676
680
|
case "in":
|
|
677
681
|
if (e.scaleVal * n > 1.6)
|
|
@@ -684,7 +688,7 @@ const vt = (e) => {
|
|
|
684
688
|
e.scale(e.scaleVal -= 0.2);
|
|
685
689
|
}
|
|
686
690
|
};
|
|
687
|
-
function
|
|
691
|
+
function Nt(e) {
|
|
688
692
|
const t = () => {
|
|
689
693
|
e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNode ? e.removeNode() : e.currentNodes && e.removeNodes(e.currentNodes);
|
|
690
694
|
}, n = {
|
|
@@ -706,21 +710,21 @@ function Et(e) {
|
|
|
706
710
|
else {
|
|
707
711
|
if (o.metaKey || o.ctrlKey)
|
|
708
712
|
return e.initSide();
|
|
709
|
-
|
|
713
|
+
Ne(e, "previous");
|
|
710
714
|
}
|
|
711
715
|
},
|
|
712
716
|
ArrowDown: (o) => {
|
|
713
|
-
o.altKey ? e.moveDownNode() :
|
|
717
|
+
o.altKey ? e.moveDownNode() : Ne(e, "next");
|
|
714
718
|
},
|
|
715
719
|
ArrowLeft: (o) => {
|
|
716
720
|
if (o.metaKey || o.ctrlKey)
|
|
717
721
|
return e.initLeft();
|
|
718
|
-
|
|
722
|
+
Ee(e, C.LHS);
|
|
719
723
|
},
|
|
720
724
|
ArrowRight: (o) => {
|
|
721
725
|
if (o.metaKey || o.ctrlKey)
|
|
722
726
|
return e.initRight();
|
|
723
|
-
|
|
727
|
+
Ee(e, C.RHS);
|
|
724
728
|
},
|
|
725
729
|
PageUp: () => e.moveUpNode(),
|
|
726
730
|
PageDown: () => {
|
|
@@ -736,10 +740,10 @@ function Et(e) {
|
|
|
736
740
|
!e.waitCopy || !e.currentNode || (o.metaKey || o.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
|
|
737
741
|
},
|
|
738
742
|
"+": (o) => {
|
|
739
|
-
(o.metaKey || o.ctrlKey) &&
|
|
743
|
+
(o.metaKey || o.ctrlKey) && Z(e, "in");
|
|
740
744
|
},
|
|
741
745
|
"-": (o) => {
|
|
742
|
-
(o.metaKey || o.ctrlKey) &&
|
|
746
|
+
(o.metaKey || o.ctrlKey) && Z(e, "out");
|
|
743
747
|
},
|
|
744
748
|
0: (o) => {
|
|
745
749
|
(o.metaKey || o.ctrlKey) && e.scale(1);
|
|
@@ -756,23 +760,23 @@ function Et(e) {
|
|
|
756
760
|
if (o.ctrlKey || o.metaKey) {
|
|
757
761
|
o.preventDefault();
|
|
758
762
|
const s = Math.abs(o.deltaY / 100);
|
|
759
|
-
o.deltaY < 0 ?
|
|
763
|
+
o.deltaY < 0 ? Z(e, "in", s) : e.scaleVal - 0.2 > 0 && Z(e, "out", s), o.stopPropagation();
|
|
760
764
|
}
|
|
761
765
|
};
|
|
762
766
|
}
|
|
763
|
-
const
|
|
767
|
+
const ae = document, St = function(e, t) {
|
|
764
768
|
if (!t)
|
|
765
|
-
return
|
|
769
|
+
return de(e), e;
|
|
766
770
|
let n = e.querySelector(".insert-preview");
|
|
767
771
|
const o = `insert-preview ${t} show`;
|
|
768
|
-
return n || (n =
|
|
769
|
-
},
|
|
772
|
+
return n || (n = ae.createElement("div"), e.appendChild(n)), n.className = o, e;
|
|
773
|
+
}, de = function(e) {
|
|
770
774
|
if (!e)
|
|
771
775
|
return;
|
|
772
776
|
const t = e.querySelectorAll(".insert-preview");
|
|
773
777
|
for (const n of t || [])
|
|
774
778
|
n.remove();
|
|
775
|
-
},
|
|
779
|
+
}, Se = function(e, t) {
|
|
776
780
|
for (const n of t) {
|
|
777
781
|
const o = n.parentElement.parentElement.contains(e);
|
|
778
782
|
if (!(e && e.tagName === "ME-TPC" && e !== n && !o && e.nodeObj.parent))
|
|
@@ -783,52 +787,52 @@ const ce = document, Nt = function(e, t) {
|
|
|
783
787
|
const t = document.createElement("div");
|
|
784
788
|
return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
|
|
785
789
|
};
|
|
786
|
-
function
|
|
790
|
+
function _t(e) {
|
|
787
791
|
let t = null, n = null, o = null;
|
|
788
792
|
const s = Ct(e), i = 12;
|
|
789
793
|
e.map.addEventListener("dragstart", (r) => {
|
|
790
|
-
var
|
|
791
|
-
const
|
|
792
|
-
if ((
|
|
794
|
+
var l, u;
|
|
795
|
+
const c = r.target;
|
|
796
|
+
if ((c == null ? void 0 : c.tagName) !== "ME-TPC") {
|
|
793
797
|
r.preventDefault();
|
|
794
798
|
return;
|
|
795
799
|
}
|
|
796
|
-
(
|
|
800
|
+
(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);
|
|
797
801
|
for (const d of t)
|
|
798
802
|
d.parentElement.parentElement.style.opacity = "0.5";
|
|
799
|
-
(u = r.dataTransfer) == null || u.setDragImage(s, 0, 0),
|
|
803
|
+
(u = r.dataTransfer) == null || u.setDragImage(s, 0, 0), _.clear();
|
|
800
804
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
801
805
|
if (!t)
|
|
802
806
|
return;
|
|
803
|
-
for (const
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
+
for (const l of t)
|
|
808
|
+
l.parentElement.parentElement.style.opacity = "1";
|
|
809
|
+
const c = r.target;
|
|
810
|
+
c.style.opacity = "", o && (de(o), n === "before" ? e.moveNodeBefore(t, o) : n === "after" ? e.moveNodeAfter(t, o) : n === "in" && e.moveNodeIn(t, o), t = null);
|
|
807
811
|
}), e.map.addEventListener(
|
|
808
812
|
"dragover",
|
|
809
|
-
|
|
813
|
+
ot(function(r) {
|
|
810
814
|
if (!t)
|
|
811
815
|
return;
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
if (
|
|
815
|
-
o =
|
|
816
|
-
const
|
|
817
|
-
r.clientY >
|
|
816
|
+
de(o);
|
|
817
|
+
const c = ae.elementFromPoint(r.clientX, r.clientY - i);
|
|
818
|
+
if (Se(c, t)) {
|
|
819
|
+
o = c;
|
|
820
|
+
const l = c.getBoundingClientRect().y;
|
|
821
|
+
r.clientY > l + c.clientHeight ? n = "after" : n = "in";
|
|
818
822
|
} else {
|
|
819
|
-
const
|
|
820
|
-
if (
|
|
821
|
-
o =
|
|
822
|
-
const u =
|
|
823
|
+
const l = ae.elementFromPoint(r.clientX, r.clientY + i);
|
|
824
|
+
if (Se(l, t)) {
|
|
825
|
+
o = l;
|
|
826
|
+
const u = l.getBoundingClientRect().y;
|
|
823
827
|
r.clientY < u ? n = "before" : n = "in";
|
|
824
828
|
} else
|
|
825
829
|
n = o = null;
|
|
826
830
|
}
|
|
827
|
-
o &&
|
|
831
|
+
o && St(o, n);
|
|
828
832
|
}, 100)
|
|
829
833
|
);
|
|
830
834
|
}
|
|
831
|
-
const
|
|
835
|
+
const Mt = function(e) {
|
|
832
836
|
return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
|
|
833
837
|
type: "summary",
|
|
834
838
|
value: e.obj.id
|
|
@@ -843,14 +847,14 @@ const _t = function(e) {
|
|
|
843
847
|
value: e.obj.id
|
|
844
848
|
};
|
|
845
849
|
};
|
|
846
|
-
function
|
|
850
|
+
function kt(e) {
|
|
847
851
|
let t = [], n = -1, o = e.getData();
|
|
848
852
|
e.bus.addListener("operation", (s) => {
|
|
849
853
|
if (s.name === "beginEdit")
|
|
850
854
|
return;
|
|
851
855
|
t = t.slice(0, n + 1);
|
|
852
856
|
const i = e.getData();
|
|
853
|
-
t.push({ prev: o, currentObject:
|
|
857
|
+
t.push({ prev: o, currentObject: Mt(s), next: i }), o = i, n = t.length - 1;
|
|
854
858
|
}), e.undo = function() {
|
|
855
859
|
if (n > -1) {
|
|
856
860
|
const s = t[n];
|
|
@@ -878,7 +882,7 @@ const z = (e, t) => {
|
|
|
878
882
|
<use xlink:href="#icon-${t}"></use>
|
|
879
883
|
</svg>`, n;
|
|
880
884
|
};
|
|
881
|
-
function
|
|
885
|
+
function Lt(e) {
|
|
882
886
|
const t = document.createElement("div"), n = z("fullscreen", "full"), o = z("toCenter", "living"), s = z("zoomout", "move"), i = z("zoomin", "add"), r = document.createElement("span");
|
|
883
887
|
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
884
888
|
e.mindElixirBox.requestFullscreen();
|
|
@@ -890,7 +894,7 @@ function kt(e) {
|
|
|
890
894
|
e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
|
|
891
895
|
}, t;
|
|
892
896
|
}
|
|
893
|
-
function
|
|
897
|
+
function Tt(e) {
|
|
894
898
|
const t = document.createElement("div"), n = z("tbltl", "left"), o = z("tbltr", "right"), s = z("tblts", "side");
|
|
895
899
|
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
896
900
|
e.initLeft();
|
|
@@ -900,11 +904,11 @@ function Lt(e) {
|
|
|
900
904
|
e.initSide();
|
|
901
905
|
}, t;
|
|
902
906
|
}
|
|
903
|
-
function
|
|
904
|
-
e.container.append(
|
|
907
|
+
function At(e) {
|
|
908
|
+
e.container.append(Lt(e)), e.container.append(Tt(e));
|
|
905
909
|
}
|
|
906
910
|
/*! @viselect/vanilla v3.7.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
907
|
-
class
|
|
911
|
+
class jt {
|
|
908
912
|
constructor() {
|
|
909
913
|
this._listeners = /* @__PURE__ */ new Map(), this.on = this.addEventListener, this.off = this.removeEventListener, this.emit = this.dispatchEvent;
|
|
910
914
|
}
|
|
@@ -926,16 +930,16 @@ class At {
|
|
|
926
930
|
this._listeners.clear();
|
|
927
931
|
}
|
|
928
932
|
}
|
|
929
|
-
const Ce = (e, t = "px") => typeof e == "number" ? e + t : e,
|
|
933
|
+
const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e }, t, n) => {
|
|
930
934
|
if (typeof t == "object")
|
|
931
935
|
for (const [o, s] of Object.entries(t))
|
|
932
936
|
s !== void 0 && (e[o] = Ce(s));
|
|
933
937
|
else
|
|
934
938
|
n !== void 0 && (e[t] = Ce(n));
|
|
935
|
-
},
|
|
939
|
+
}, _e = (e = 0, t = 0, n = 0, o = 0) => {
|
|
936
940
|
const s = { x: e, y: t, width: n, height: o, top: t, left: e, right: e + n, bottom: t + o };
|
|
937
941
|
return { ...s, toJSON: () => JSON.stringify(s) };
|
|
938
|
-
},
|
|
942
|
+
}, Dt = (e) => {
|
|
939
943
|
let t, n = -1, o = !1;
|
|
940
944
|
return {
|
|
941
945
|
next: (...s) => {
|
|
@@ -947,7 +951,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
947
951
|
cancelAnimationFrame(n), o = !1;
|
|
948
952
|
}
|
|
949
953
|
};
|
|
950
|
-
},
|
|
954
|
+
}, Me = (e, t, n = "touch") => {
|
|
951
955
|
switch (n) {
|
|
952
956
|
case "center": {
|
|
953
957
|
const o = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
@@ -958,18 +962,18 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
958
962
|
case "touch":
|
|
959
963
|
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
960
964
|
}
|
|
961
|
-
},
|
|
965
|
+
}, $t = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = () => "safari" in window, Ie = (e) => (t, n, o, s = {}) => {
|
|
962
966
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
963
967
|
for (const i of t)
|
|
964
968
|
if (i)
|
|
965
969
|
for (const r of n)
|
|
966
970
|
i[e](r, o, { capture: !1, ...s });
|
|
967
971
|
return [t, n, o, s];
|
|
968
|
-
},
|
|
972
|
+
}, D = Ie("addEventListener"), T = Ie("removeEventListener"), Q = (e) => {
|
|
969
973
|
var t;
|
|
970
974
|
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
971
975
|
return { x: n, y: o, target: s };
|
|
972
|
-
},
|
|
976
|
+
}, F = (e, t = document) => {
|
|
973
977
|
const n = Array.isArray(e) ? e : [e];
|
|
974
978
|
let o = [];
|
|
975
979
|
for (let s = 0, i = n.length; s < i; s++) {
|
|
@@ -977,7 +981,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
977
981
|
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
978
982
|
}
|
|
979
983
|
return o;
|
|
980
|
-
},
|
|
984
|
+
}, Pt = (e, t) => {
|
|
981
985
|
for (const n of t) {
|
|
982
986
|
if (typeof n == "number")
|
|
983
987
|
return e.button === n;
|
|
@@ -996,15 +1000,15 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
996
1000
|
}
|
|
997
1001
|
}
|
|
998
1002
|
return !1;
|
|
999
|
-
}, { abs:
|
|
1003
|
+
}, { abs: R, max: ke, min: Le, ceil: Te } = Math, Ae = (e = []) => ({
|
|
1000
1004
|
stored: e,
|
|
1001
1005
|
selected: [],
|
|
1002
1006
|
touched: [],
|
|
1003
1007
|
changed: { added: [], removed: [] }
|
|
1004
|
-
}),
|
|
1008
|
+
}), Ve = class extends jt {
|
|
1005
1009
|
constructor(t) {
|
|
1006
1010
|
var n, o, s, i, r;
|
|
1007
|
-
super(), this._selection =
|
|
1011
|
+
super(), this._selection = Ae(), this._targetBoundaryScrolled = !0, this._selectables = [], this._areaLocation = { y1: 0, x2: 0, y2: 0, x1: 0 }, this._areaRect = _e(), this._singleClick = !0, this._scrollAvailable = !0, this._scrollingActive = !1, this._scrollSpeed = { x: 0, y: 0 }, this._scrollDelta = { x: 0, y: 0 }, this._lastMousePosition = { x: 0, y: 0 }, this.disable = this._toggleStartEvents.bind(this, !1), this.enable = this._toggleStartEvents, this._options = {
|
|
1008
1012
|
selectionAreaClass: "selection-area",
|
|
1009
1013
|
selectionContainerClass: void 0,
|
|
1010
1014
|
selectables: [],
|
|
@@ -1044,53 +1048,53 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1044
1048
|
};
|
|
1045
1049
|
for (const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
1046
1050
|
typeof this[d] == "function" && (this[d] = this[d].bind(this));
|
|
1047
|
-
const { document:
|
|
1048
|
-
this._area =
|
|
1051
|
+
const { document: c, selectionAreaClass: l, selectionContainerClass: u } = this._options;
|
|
1052
|
+
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), u && this._clippingElement.classList.add(u), j(this._area, {
|
|
1049
1053
|
willChange: "top, left, bottom, right, width, height",
|
|
1050
1054
|
top: 0,
|
|
1051
1055
|
left: 0,
|
|
1052
1056
|
position: "fixed"
|
|
1053
|
-
}),
|
|
1057
|
+
}), j(this._clippingElement, {
|
|
1054
1058
|
overflow: "hidden",
|
|
1055
1059
|
position: "fixed",
|
|
1056
1060
|
transform: "translate3d(0, 0, 0)",
|
|
1057
1061
|
// https://stackoverflow.com/a/38268846
|
|
1058
1062
|
pointerEvents: "none",
|
|
1059
1063
|
zIndex: "1"
|
|
1060
|
-
}), this._frame =
|
|
1064
|
+
}), this._frame = Dt((d) => {
|
|
1061
1065
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", d), this._redrawSelectionArea();
|
|
1062
1066
|
}), this.enable();
|
|
1063
1067
|
}
|
|
1064
1068
|
_toggleStartEvents(t = !0) {
|
|
1065
|
-
const { document: n, features: o } = this._options, s = t ?
|
|
1069
|
+
const { document: n, features: o } = this._options, s = t ? D : T;
|
|
1066
1070
|
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, { passive: !1 });
|
|
1067
1071
|
}
|
|
1068
1072
|
_onTapStart(t, n = !1) {
|
|
1069
|
-
const { x: o, y: s, target: i } =
|
|
1070
|
-
if (t instanceof MouseEvent && !
|
|
1073
|
+
const { x: o, y: s, target: i } = Q(t), { document: r, startAreas: c, boundaries: l, features: u, behaviour: d } = this._options, a = i.getBoundingClientRect();
|
|
1074
|
+
if (t instanceof MouseEvent && !Pt(t, d.triggers))
|
|
1071
1075
|
return;
|
|
1072
|
-
const f =
|
|
1076
|
+
const f = F(c, r), g = F(l, r);
|
|
1073
1077
|
this._targetElement = g.find(
|
|
1074
|
-
(v) =>
|
|
1078
|
+
(v) => Me(v.getBoundingClientRect(), a)
|
|
1075
1079
|
);
|
|
1076
1080
|
const p = t.composedPath(), m = f.find((v) => p.includes(v));
|
|
1077
1081
|
if (this._targetBoundary = g.find((v) => p.includes(v)), !this._targetElement || !m || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
|
|
1078
1082
|
return;
|
|
1079
1083
|
this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
|
|
1080
1084
|
const h = r.scrollingElement ?? r.body;
|
|
1081
|
-
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0),
|
|
1085
|
+
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), D(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), D(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), D(r, "scroll", this._onScroll), u.deselectOnBlur && (this._targetBoundaryScrolled = !1, D(this._targetBoundary, "scroll", this._onStartAreaScroll));
|
|
1082
1086
|
}
|
|
1083
1087
|
_onSingleTap(t) {
|
|
1084
|
-
const { singleTap: { intersect: n }, range: o } = this._options.features, s =
|
|
1088
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, s = Q(t);
|
|
1085
1089
|
let i;
|
|
1086
1090
|
if (n === "native")
|
|
1087
1091
|
i = s.target;
|
|
1088
1092
|
else if (n === "touch") {
|
|
1089
1093
|
this.resolveSelectables();
|
|
1090
|
-
const { x:
|
|
1094
|
+
const { x: c, y: l } = s;
|
|
1091
1095
|
i = this._selectables.find((u) => {
|
|
1092
1096
|
const { right: d, left: a, top: f, bottom: g } = u.getBoundingClientRect();
|
|
1093
|
-
return
|
|
1097
|
+
return c < d && c > a && l < g && l > f;
|
|
1094
1098
|
});
|
|
1095
1099
|
}
|
|
1096
1100
|
if (!i)
|
|
@@ -1104,59 +1108,59 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1104
1108
|
}
|
|
1105
1109
|
const { stored: r } = this._selection;
|
|
1106
1110
|
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1107
|
-
const
|
|
1108
|
-
(a) => a.compareDocumentPosition(
|
|
1109
|
-
),
|
|
1110
|
-
this.select(d), this._latestElement =
|
|
1111
|
+
const c = this._latestElement, [l, u] = c.compareDocumentPosition(i) & 4 ? [i, c] : [c, i], d = [...this._selectables.filter(
|
|
1112
|
+
(a) => a.compareDocumentPosition(l) & 4 && a.compareDocumentPosition(u) & 2
|
|
1113
|
+
), l, u];
|
|
1114
|
+
this.select(d), this._latestElement = c;
|
|
1111
1115
|
} else
|
|
1112
|
-
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((
|
|
1116
|
+
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
|
|
1113
1117
|
}
|
|
1114
1118
|
_delayedTapMove(t) {
|
|
1115
|
-
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x:
|
|
1119
|
+
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: l } = Q(t);
|
|
1116
1120
|
if (
|
|
1117
1121
|
// Single number for both coordinates
|
|
1118
|
-
typeof s == "number" &&
|
|
1119
|
-
typeof s == "object" &&
|
|
1122
|
+
typeof s == "number" && R(c + l - (i + r)) >= s || // Different x and y threshold
|
|
1123
|
+
typeof s == "object" && R(c - i) >= s.x || R(l - r) >= s.y
|
|
1120
1124
|
) {
|
|
1121
|
-
if (
|
|
1122
|
-
|
|
1125
|
+
if (T(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1126
|
+
T(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1123
1127
|
return;
|
|
1124
1128
|
}
|
|
1125
|
-
|
|
1129
|
+
D(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), F(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 && (D(this._targetElement, "wheel", this._wheelScroll, { passive: !1 }), D(this._options.document, "keydown", this._keyboardScroll, { passive: !1 }), this._selectables = this._selectables.filter((u) => this._targetElement.contains(u))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1126
1130
|
}
|
|
1127
1131
|
this._handleMoveEvent(t);
|
|
1128
1132
|
}
|
|
1129
1133
|
_setupSelectionArea() {
|
|
1130
1134
|
const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
1131
|
-
this._scrollAvailable ? (
|
|
1135
|
+
this._scrollAvailable ? (j(t, {
|
|
1132
1136
|
top: s.top,
|
|
1133
1137
|
left: s.left,
|
|
1134
1138
|
width: s.width,
|
|
1135
1139
|
height: s.height
|
|
1136
|
-
}),
|
|
1140
|
+
}), j(o, {
|
|
1137
1141
|
marginTop: -s.top,
|
|
1138
1142
|
marginLeft: -s.left
|
|
1139
|
-
})) : (
|
|
1143
|
+
})) : (j(t, {
|
|
1140
1144
|
top: 0,
|
|
1141
1145
|
left: 0,
|
|
1142
1146
|
width: "100%",
|
|
1143
1147
|
height: "100%"
|
|
1144
|
-
}),
|
|
1148
|
+
}), j(o, {
|
|
1145
1149
|
marginTop: 0,
|
|
1146
1150
|
marginLeft: 0
|
|
1147
1151
|
}));
|
|
1148
1152
|
}
|
|
1149
1153
|
_onTapMove(t) {
|
|
1150
|
-
const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling,
|
|
1151
|
-
if (o.x2 =
|
|
1154
|
+
const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling, c = this._targetElement, { x: l, y: u } = Q(t);
|
|
1155
|
+
if (o.x2 = l, o.y2 = u, this._lastMousePosition.x = l, this._lastMousePosition.y = u, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
|
|
1152
1156
|
this._scrollingActive = !0;
|
|
1153
1157
|
const d = () => {
|
|
1154
1158
|
if (!n.x && !n.y) {
|
|
1155
1159
|
this._scrollingActive = !1;
|
|
1156
1160
|
return;
|
|
1157
1161
|
}
|
|
1158
|
-
const { scrollTop: a, scrollLeft: f } =
|
|
1159
|
-
n.y && (
|
|
1162
|
+
const { scrollTop: a, scrollLeft: f } = c;
|
|
1163
|
+
n.y && (c.scrollTop += Te(n.y / r), o.y1 -= c.scrollTop - a), n.x && (c.scrollLeft += Te(n.x / r), o.x1 -= c.scrollLeft - f), i.next(t), requestAnimationFrame(d);
|
|
1160
1164
|
};
|
|
1161
1165
|
requestAnimationFrame(d);
|
|
1162
1166
|
} else
|
|
@@ -1165,14 +1169,14 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1165
1169
|
}
|
|
1166
1170
|
_handleMoveEvent(t) {
|
|
1167
1171
|
const { features: n } = this._options;
|
|
1168
|
-
(n.touch &&
|
|
1172
|
+
(n.touch && $t() || this._scrollAvailable && Ot()) && t.preventDefault();
|
|
1169
1173
|
}
|
|
1170
1174
|
_onScroll() {
|
|
1171
1175
|
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
1172
1176
|
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1173
1177
|
}
|
|
1174
1178
|
_onStartAreaScroll() {
|
|
1175
|
-
this._targetBoundaryScrolled = !0,
|
|
1179
|
+
this._targetBoundaryScrolled = !0, T(this._targetElement, "scroll", this._onStartAreaScroll);
|
|
1176
1180
|
}
|
|
1177
1181
|
_wheelScroll(t) {
|
|
1178
1182
|
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;
|
|
@@ -1188,12 +1192,12 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1188
1192
|
});
|
|
1189
1193
|
}
|
|
1190
1194
|
_recalculateSelectionAreaRect() {
|
|
1191
|
-
const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight:
|
|
1195
|
+
const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight: c, scrollLeft: l, scrollWidth: u, clientWidth: d } = o, a = this._targetRect, { x1: f, y1: g } = n;
|
|
1192
1196
|
let { x2: p, y2: m } = n;
|
|
1193
1197
|
const { behaviour: { scrolling: { startScrollMargins: h } } } = s;
|
|
1194
|
-
p < a.left + h.x ? (t.x =
|
|
1195
|
-
const v =
|
|
1196
|
-
this._areaRect =
|
|
1198
|
+
p < a.left + h.x ? (t.x = l ? -R(a.left - p + h.x) : 0, p = p < a.left ? a.left : p) : p > a.right - h.x ? (t.x = u - l - d ? R(a.left + a.width - p - h.x) : 0, p = p > a.right ? a.right : p) : t.x = 0, m < a.top + h.y ? (t.y = i ? -R(a.top - m + h.y) : 0, m = m < a.top ? a.top : m) : m > a.bottom - h.y ? (t.y = r - i - c ? R(a.top + a.height - m - h.y) : 0, m = m > a.bottom ? a.bottom : m) : t.y = 0;
|
|
1199
|
+
const v = Le(f, p), y = Le(g, m), b = ke(f, p), x = ke(g, m);
|
|
1200
|
+
this._areaRect = _e(v, y, b - v, x - y);
|
|
1197
1201
|
}
|
|
1198
1202
|
_redrawSelectionArea() {
|
|
1199
1203
|
const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
|
|
@@ -1202,15 +1206,15 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1202
1206
|
_onTapStop(t, n) {
|
|
1203
1207
|
var o;
|
|
1204
1208
|
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
1205
|
-
|
|
1209
|
+
T(this._targetElement, "scroll", this._onStartAreaScroll), T(s, ["mousemove", "touchmove"], this._delayedTapMove), T(s, ["touchmove", "mousemove"], this._onTapMove), T(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), T(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, T(this._targetElement, "wheel", this._wheelScroll, { passive: !0 }), T(this._options.document, "keydown", this._keyboardScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), j(this._area, "display", "none");
|
|
1206
1210
|
}
|
|
1207
1211
|
_updateElementSelection() {
|
|
1208
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched:
|
|
1212
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: u } = n.behaviour, d = u === "invert", a = [], f = [], g = [];
|
|
1209
1213
|
for (let m = 0; m < t.length; m++) {
|
|
1210
1214
|
const h = t[m];
|
|
1211
|
-
if (
|
|
1215
|
+
if (Me(s, h.getBoundingClientRect(), l)) {
|
|
1212
1216
|
if (r.includes(h))
|
|
1213
|
-
i.includes(h) && !
|
|
1217
|
+
i.includes(h) && !c.includes(h) && c.push(h);
|
|
1214
1218
|
else if (d && i.includes(h)) {
|
|
1215
1219
|
g.push(h);
|
|
1216
1220
|
continue;
|
|
@@ -1237,20 +1241,20 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1237
1241
|
});
|
|
1238
1242
|
}
|
|
1239
1243
|
_keepSelection() {
|
|
1240
|
-
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n,
|
|
1244
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n, c = o.filter((l) => !r.includes(l));
|
|
1241
1245
|
switch (t.behaviour.overlap) {
|
|
1242
1246
|
case "drop": {
|
|
1243
1247
|
n.stored = [
|
|
1244
|
-
...
|
|
1245
|
-
...r.filter((
|
|
1248
|
+
...c,
|
|
1249
|
+
...r.filter((l) => !i.includes(l))
|
|
1246
1250
|
// Elements not touched
|
|
1247
1251
|
];
|
|
1248
1252
|
break;
|
|
1249
1253
|
}
|
|
1250
1254
|
case "invert": {
|
|
1251
1255
|
n.stored = [
|
|
1252
|
-
...
|
|
1253
|
-
...r.filter((
|
|
1256
|
+
...c,
|
|
1257
|
+
...r.filter((l) => !s.removed.includes(l))
|
|
1254
1258
|
// Elements not removed from selection
|
|
1255
1259
|
];
|
|
1256
1260
|
break;
|
|
@@ -1258,7 +1262,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1258
1262
|
case "keep": {
|
|
1259
1263
|
n.stored = [
|
|
1260
1264
|
...r,
|
|
1261
|
-
...o.filter((
|
|
1265
|
+
...o.filter((l) => !r.includes(l))
|
|
1262
1266
|
// Newly added
|
|
1263
1267
|
];
|
|
1264
1268
|
break;
|
|
@@ -1278,7 +1282,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1278
1282
|
* Will update everything that can be selected.
|
|
1279
1283
|
*/
|
|
1280
1284
|
resolveSelectables() {
|
|
1281
|
-
this._selectables =
|
|
1285
|
+
this._selectables = F(this._options.selectables, this._options.document);
|
|
1282
1286
|
}
|
|
1283
1287
|
/**
|
|
1284
1288
|
* Same as deselecting, but for all elements currently selected.
|
|
@@ -1290,7 +1294,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1290
1294
|
i.added = [], i.removed.push(
|
|
1291
1295
|
...o,
|
|
1292
1296
|
...t ? s : []
|
|
1293
|
-
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection =
|
|
1297
|
+
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Ae(t ? [] : s);
|
|
1294
1298
|
}
|
|
1295
1299
|
/**
|
|
1296
1300
|
* @returns {Array} Selected elements
|
|
@@ -1322,8 +1326,8 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1322
1326
|
* @param quiet - If this should not trigger the move event
|
|
1323
1327
|
*/
|
|
1324
1328
|
select(t, n = !1) {
|
|
1325
|
-
const { changed: o, selected: s, stored: i } = this._selection, r =
|
|
1326
|
-
(
|
|
1329
|
+
const { changed: o, selected: s, stored: i } = this._selection, r = F(t, this._options.document).filter(
|
|
1330
|
+
(c) => !s.includes(c) && !i.includes(c)
|
|
1327
1331
|
);
|
|
1328
1332
|
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;
|
|
1329
1333
|
}
|
|
@@ -1333,18 +1337,18 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, A = ({ style: e },
|
|
|
1333
1337
|
* @param quiet - If this should not trigger the move event
|
|
1334
1338
|
*/
|
|
1335
1339
|
deselect(t, n = !1) {
|
|
1336
|
-
const { selected: o, stored: s, changed: i } = this._selection, r =
|
|
1337
|
-
(
|
|
1340
|
+
const { selected: o, stored: s, changed: i } = this._selection, r = F(t, this._options.document).filter(
|
|
1341
|
+
(c) => o.includes(c) || s.includes(c)
|
|
1338
1342
|
);
|
|
1339
|
-
this._selection.stored = s.filter((
|
|
1340
|
-
...r.filter((
|
|
1343
|
+
this._selection.stored = s.filter((c) => !r.includes(c)), this._selection.selected = o.filter((c) => !r.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
1344
|
+
...r.filter((c) => !i.removed.includes(c))
|
|
1341
1345
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null));
|
|
1342
1346
|
}
|
|
1343
1347
|
};
|
|
1344
|
-
|
|
1345
|
-
let
|
|
1348
|
+
Ve.version = "3.7.1";
|
|
1349
|
+
let Ht = Ve;
|
|
1346
1350
|
function Bt(e) {
|
|
1347
|
-
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new
|
|
1351
|
+
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new Ht({
|
|
1348
1352
|
selectables: [".map-container me-tpc"],
|
|
1349
1353
|
boundaries: [e.container],
|
|
1350
1354
|
container: e.selectionContainer,
|
|
@@ -1378,7 +1382,7 @@ function Bt(e) {
|
|
|
1378
1382
|
changed: { added: o, removed: s }
|
|
1379
1383
|
}
|
|
1380
1384
|
}) => {
|
|
1381
|
-
|
|
1385
|
+
_.moved = !0;
|
|
1382
1386
|
for (const i of o)
|
|
1383
1387
|
i.classList.add("selected");
|
|
1384
1388
|
for (const i of s)
|
|
@@ -1389,7 +1393,7 @@ function Bt(e) {
|
|
|
1389
1393
|
});
|
|
1390
1394
|
e.selection = n;
|
|
1391
1395
|
}
|
|
1392
|
-
const
|
|
1396
|
+
const Rt = function(e, t = !0) {
|
|
1393
1397
|
this.theme = e;
|
|
1394
1398
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1395
1399
|
this.mindElixirBox.style.cssText = "";
|
|
@@ -1410,27 +1414,27 @@ function zt(e) {
|
|
|
1410
1414
|
const o = t[n];
|
|
1411
1415
|
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
|
|
1412
1416
|
}
|
|
1413
|
-
function
|
|
1417
|
+
function Ft(e) {
|
|
1414
1418
|
const { siblings: t, index: n } = K(e);
|
|
1415
1419
|
if (t === void 0)
|
|
1416
1420
|
return;
|
|
1417
1421
|
const o = t[n];
|
|
1418
1422
|
n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
|
|
1419
1423
|
}
|
|
1420
|
-
function
|
|
1424
|
+
function me(e) {
|
|
1421
1425
|
const { siblings: t, index: n } = K(e);
|
|
1422
1426
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1423
1427
|
}
|
|
1424
|
-
function
|
|
1428
|
+
function qt(e, t, n) {
|
|
1425
1429
|
const { siblings: o, index: s } = K(n);
|
|
1426
1430
|
o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
|
|
1427
1431
|
}
|
|
1428
|
-
function
|
|
1432
|
+
function It(e, t) {
|
|
1429
1433
|
const { siblings: n, index: o } = K(e);
|
|
1430
1434
|
n !== void 0 && (n[o] = t, t.children = [e]);
|
|
1431
1435
|
}
|
|
1432
1436
|
function Ke(e, t, n) {
|
|
1433
|
-
if (
|
|
1437
|
+
if (me(t), e === "in")
|
|
1434
1438
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1435
1439
|
else {
|
|
1436
1440
|
t.direction !== void 0 && (t.direction = n.direction);
|
|
@@ -1440,61 +1444,61 @@ function Ke(e, t, n) {
|
|
|
1440
1444
|
e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
|
|
1441
1445
|
}
|
|
1442
1446
|
}
|
|
1443
|
-
const
|
|
1447
|
+
const Vt = function(e, t) {
|
|
1444
1448
|
var n, o;
|
|
1445
|
-
if (e ===
|
|
1446
|
-
return
|
|
1447
|
-
if (e ===
|
|
1448
|
-
return
|
|
1449
|
-
if (e ===
|
|
1449
|
+
if (e === L)
|
|
1450
|
+
return L;
|
|
1451
|
+
if (e === $)
|
|
1452
|
+
return $;
|
|
1453
|
+
if (e === re) {
|
|
1450
1454
|
const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, i = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1451
|
-
return s <= i ? (t.direction =
|
|
1455
|
+
return s <= i ? (t.direction = L, L) : (t.direction = $, $);
|
|
1452
1456
|
}
|
|
1453
|
-
},
|
|
1457
|
+
}, We = function(e, t, n) {
|
|
1454
1458
|
var i, r;
|
|
1455
1459
|
const o = n.children[0].children[0], s = t.parentElement;
|
|
1456
1460
|
if (s.tagName === "ME-PARENT") {
|
|
1457
|
-
if (
|
|
1461
|
+
if (G(o), s.children[1])
|
|
1458
1462
|
s.nextSibling.appendChild(n);
|
|
1459
1463
|
else {
|
|
1460
|
-
const
|
|
1461
|
-
s.appendChild(
|
|
1464
|
+
const c = e.createChildren([n]);
|
|
1465
|
+
s.appendChild(pe(!0)), s.insertAdjacentElement("afterend", c);
|
|
1462
1466
|
}
|
|
1463
1467
|
e.linkDiv(n.offsetParent);
|
|
1464
1468
|
} else
|
|
1465
|
-
s.tagName === "ME-ROOT" && (
|
|
1466
|
-
},
|
|
1469
|
+
s.tagName === "ME-ROOT" && (Vt(e.direction, o.nodeObj) === L ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1470
|
+
}, Ue = function(e, t) {
|
|
1467
1471
|
const n = e.parentNode;
|
|
1468
1472
|
if (t === 0) {
|
|
1469
1473
|
const o = n.parentNode.parentNode;
|
|
1470
1474
|
o.tagName !== "ME-MAIN" && o.previousSibling.children[1].remove();
|
|
1471
1475
|
}
|
|
1472
1476
|
n.parentNode.remove();
|
|
1473
|
-
},
|
|
1477
|
+
}, Ye = {
|
|
1474
1478
|
before: "beforebegin",
|
|
1475
1479
|
after: "afterend"
|
|
1476
|
-
},
|
|
1480
|
+
}, G = function(e) {
|
|
1477
1481
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1478
1482
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1479
1483
|
}, Kt = function(e, t) {
|
|
1480
|
-
const n = e.nodeObj, o =
|
|
1484
|
+
const n = e.nodeObj, o = ue(n);
|
|
1481
1485
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1482
1486
|
const s = Object.assign(n, t);
|
|
1483
|
-
|
|
1487
|
+
fe(e, s), this.linkDiv(), this.bus.fire("operation", {
|
|
1484
1488
|
name: "reshapeNode",
|
|
1485
1489
|
obj: s,
|
|
1486
1490
|
origin: o
|
|
1487
1491
|
});
|
|
1488
|
-
},
|
|
1492
|
+
}, ge = function(e, t, n) {
|
|
1489
1493
|
if (!t)
|
|
1490
1494
|
return null;
|
|
1491
1495
|
const o = t.nodeObj;
|
|
1492
1496
|
o.expanded === !1 && (e.expandNode(t, !0), t = N(o.id));
|
|
1493
1497
|
const s = n || e.generateNewObj();
|
|
1494
|
-
o.children ? o.children.push(s) : o.children = [s],
|
|
1498
|
+
o.children ? o.children.push(s) : o.children = [s], O(e.nodeData);
|
|
1495
1499
|
const { grp: i, top: r } = e.createWrapper(s);
|
|
1496
|
-
return
|
|
1497
|
-
},
|
|
1500
|
+
return We(e, t, i), { newTop: r, newNodeObj: s };
|
|
1501
|
+
}, Wt = function(e, t, n) {
|
|
1498
1502
|
var u, d, a, f;
|
|
1499
1503
|
const o = t || this.currentNode;
|
|
1500
1504
|
if (!o)
|
|
@@ -1511,38 +1515,38 @@ const It = function(e, t) {
|
|
|
1511
1515
|
}
|
|
1512
1516
|
const i = n || this.generateNewObj();
|
|
1513
1517
|
if (!((f = s.parent) != null && f.parent)) {
|
|
1514
|
-
const g = o.
|
|
1518
|
+
const g = o.closest("me-main").className === C.LHS ? L : $;
|
|
1515
1519
|
i.direction = g;
|
|
1516
1520
|
}
|
|
1517
|
-
|
|
1518
|
-
const r = o.parentElement, { grp:
|
|
1519
|
-
r.parentElement.insertAdjacentElement(
|
|
1521
|
+
qt(i, e, s), O(this.nodeData);
|
|
1522
|
+
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(i);
|
|
1523
|
+
r.parentElement.insertAdjacentElement(Ye[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1520
1524
|
name: "insertSibling",
|
|
1521
1525
|
type: e,
|
|
1522
1526
|
obj: i
|
|
1523
1527
|
});
|
|
1524
|
-
},
|
|
1528
|
+
}, Ut = function(e, t) {
|
|
1525
1529
|
const n = e || this.currentNode;
|
|
1526
1530
|
if (!n)
|
|
1527
1531
|
return;
|
|
1528
|
-
|
|
1532
|
+
G(n);
|
|
1529
1533
|
const o = n.nodeObj;
|
|
1530
1534
|
if (!o.parent)
|
|
1531
1535
|
return;
|
|
1532
1536
|
const s = t || this.generateNewObj();
|
|
1533
|
-
|
|
1534
|
-
const i = n.parentElement.parentElement, { grp: r, top:
|
|
1535
|
-
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1537
|
+
It(o, s), O(this.nodeData);
|
|
1538
|
+
const i = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(s, !0);
|
|
1539
|
+
c.appendChild(pe(!0)), i.insertAdjacentElement("afterend", r);
|
|
1540
|
+
const l = this.createChildren([i]);
|
|
1541
|
+
c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
|
|
1538
1542
|
name: "insertParent",
|
|
1539
1543
|
obj: s
|
|
1540
1544
|
});
|
|
1541
|
-
},
|
|
1545
|
+
}, Yt = function(e, t) {
|
|
1542
1546
|
const n = e || this.currentNode;
|
|
1543
1547
|
if (!n)
|
|
1544
1548
|
return;
|
|
1545
|
-
const o =
|
|
1549
|
+
const o = ge(this, n, t);
|
|
1546
1550
|
if (!o)
|
|
1547
1551
|
return;
|
|
1548
1552
|
const { newTop: s, newNodeObj: i } = o;
|
|
@@ -1550,10 +1554,10 @@ const It = function(e, t) {
|
|
|
1550
1554
|
name: "addChild",
|
|
1551
1555
|
obj: i
|
|
1552
1556
|
}), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
|
|
1553
|
-
},
|
|
1554
|
-
const n =
|
|
1555
|
-
|
|
1556
|
-
const o =
|
|
1557
|
+
}, Xt = function(e, t) {
|
|
1558
|
+
const n = ue(e.nodeObj);
|
|
1559
|
+
he(n);
|
|
1560
|
+
const o = ge(this, t, n);
|
|
1557
1561
|
if (!o)
|
|
1558
1562
|
return;
|
|
1559
1563
|
const { newNodeObj: s } = o;
|
|
@@ -1561,23 +1565,23 @@ const It = function(e, t) {
|
|
|
1561
1565
|
name: "copyNode",
|
|
1562
1566
|
obj: s
|
|
1563
1567
|
});
|
|
1564
|
-
},
|
|
1565
|
-
e =
|
|
1568
|
+
}, Gt = function(e, t) {
|
|
1569
|
+
e = ce(e);
|
|
1566
1570
|
const n = [];
|
|
1567
1571
|
for (let o = 0; o < e.length; o++) {
|
|
1568
|
-
const s = e[o], i =
|
|
1569
|
-
|
|
1570
|
-
const r =
|
|
1572
|
+
const s = e[o], i = ue(s.nodeObj);
|
|
1573
|
+
he(i);
|
|
1574
|
+
const r = ge(this, t, i);
|
|
1571
1575
|
if (!r)
|
|
1572
1576
|
return;
|
|
1573
|
-
const { newNodeObj:
|
|
1574
|
-
n.push(
|
|
1577
|
+
const { newNodeObj: c } = r;
|
|
1578
|
+
n.push(c);
|
|
1575
1579
|
}
|
|
1576
1580
|
this.selectNodes(n.map((o) => N(o.id))), this.bus.fire("operation", {
|
|
1577
1581
|
name: "copyNodes",
|
|
1578
1582
|
objs: n
|
|
1579
1583
|
});
|
|
1580
|
-
},
|
|
1584
|
+
}, Jt = function(e) {
|
|
1581
1585
|
const t = e || this.currentNode;
|
|
1582
1586
|
if (!t)
|
|
1583
1587
|
return;
|
|
@@ -1588,18 +1592,18 @@ const It = function(e, t) {
|
|
|
1588
1592
|
name: "moveUpNode",
|
|
1589
1593
|
obj: n
|
|
1590
1594
|
});
|
|
1591
|
-
},
|
|
1595
|
+
}, Zt = function(e) {
|
|
1592
1596
|
const t = e || this.currentNode;
|
|
1593
1597
|
if (!t)
|
|
1594
1598
|
return;
|
|
1595
1599
|
const n = t.nodeObj;
|
|
1596
|
-
|
|
1600
|
+
Ft(n);
|
|
1597
1601
|
const o = t.parentNode.parentNode;
|
|
1598
1602
|
o.nextSibling ? o.nextSibling.insertAdjacentElement("afterend", o) : o.parentNode.prepend(o), this.linkDiv(), this.bus.fire("operation", {
|
|
1599
1603
|
name: "moveDownNode",
|
|
1600
1604
|
obj: n
|
|
1601
1605
|
});
|
|
1602
|
-
},
|
|
1606
|
+
}, Qt = function(e) {
|
|
1603
1607
|
var r;
|
|
1604
1608
|
const t = e || this.currentNode;
|
|
1605
1609
|
if (!t)
|
|
@@ -1607,10 +1611,10 @@ const It = function(e, t) {
|
|
|
1607
1611
|
const n = t.nodeObj;
|
|
1608
1612
|
if (!n.parent)
|
|
1609
1613
|
throw new Error("Can not remove root node");
|
|
1610
|
-
const o = n.parent.children, s = o.findIndex((
|
|
1611
|
-
if (
|
|
1612
|
-
const
|
|
1613
|
-
this.selectNode(N(
|
|
1614
|
+
const o = n.parent.children, s = o.findIndex((c) => c === n), i = me(n);
|
|
1615
|
+
if (Ue(t, i), o.length !== 0) {
|
|
1616
|
+
const c = o[s] || o[s - 1];
|
|
1617
|
+
this.selectNode(N(c.id));
|
|
1614
1618
|
} else
|
|
1615
1619
|
this.selectNode(N(n.parent.id));
|
|
1616
1620
|
this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1619,77 +1623,77 @@ const It = function(e, t) {
|
|
|
1619
1623
|
originIndex: s,
|
|
1620
1624
|
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1621
1625
|
});
|
|
1622
|
-
},
|
|
1623
|
-
e =
|
|
1626
|
+
}, en = function(e) {
|
|
1627
|
+
e = ce(e);
|
|
1624
1628
|
for (const t of e) {
|
|
1625
1629
|
const n = t.nodeObj;
|
|
1626
1630
|
if (!n.parent)
|
|
1627
1631
|
continue;
|
|
1628
|
-
const o =
|
|
1629
|
-
|
|
1632
|
+
const o = me(n);
|
|
1633
|
+
Ue(t, o);
|
|
1630
1634
|
}
|
|
1631
1635
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1632
1636
|
name: "removeNodes",
|
|
1633
1637
|
objs: e.map((t) => t.nodeObj)
|
|
1634
1638
|
});
|
|
1635
|
-
},
|
|
1636
|
-
e =
|
|
1639
|
+
}, tn = function(e, t) {
|
|
1640
|
+
e = ce(e);
|
|
1637
1641
|
const n = t.nodeObj;
|
|
1638
1642
|
n.expanded === !1 && (this.expandNode(t, !0), t = N(n.id));
|
|
1639
1643
|
for (const o of e) {
|
|
1640
1644
|
const s = o.nodeObj;
|
|
1641
|
-
Ke("in", s, n),
|
|
1645
|
+
Ke("in", s, n), O(this.nodeData);
|
|
1642
1646
|
const i = o.parentElement;
|
|
1643
|
-
|
|
1647
|
+
We(this, t, i.parentElement);
|
|
1644
1648
|
}
|
|
1645
1649
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1646
1650
|
name: "moveNodeIn",
|
|
1647
1651
|
objs: e.map((o) => o.nodeObj),
|
|
1648
1652
|
toObj: n
|
|
1649
1653
|
});
|
|
1650
|
-
},
|
|
1651
|
-
e =
|
|
1654
|
+
}, Xe = (e, t, n, o) => {
|
|
1655
|
+
e = ce(e), t === "after" && (e = e.reverse());
|
|
1652
1656
|
const s = n.nodeObj;
|
|
1653
1657
|
for (const i of e) {
|
|
1654
1658
|
const r = i.nodeObj;
|
|
1655
|
-
Ke(t, r, s),
|
|
1656
|
-
const
|
|
1657
|
-
n.parentElement.parentNode.insertAdjacentElement(
|
|
1659
|
+
Ke(t, r, s), O(o.nodeData), G(i);
|
|
1660
|
+
const c = i.parentElement.parentNode;
|
|
1661
|
+
n.parentElement.parentNode.insertAdjacentElement(Ye[t], c);
|
|
1658
1662
|
}
|
|
1659
1663
|
o.linkDiv(), o.bus.fire("operation", {
|
|
1660
1664
|
name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
|
|
1661
1665
|
objs: e.map((i) => i.nodeObj),
|
|
1662
1666
|
toObj: s
|
|
1663
1667
|
});
|
|
1664
|
-
}, tn = function(e, t) {
|
|
1665
|
-
Ye(e, "before", t, this);
|
|
1666
1668
|
}, nn = function(e, t) {
|
|
1667
|
-
|
|
1668
|
-
}, on = function(e) {
|
|
1669
|
+
Xe(e, "before", t, this);
|
|
1670
|
+
}, on = function(e, t) {
|
|
1671
|
+
Xe(e, "after", t, this);
|
|
1672
|
+
}, sn = function(e) {
|
|
1669
1673
|
const t = e || this.currentNode;
|
|
1670
1674
|
t && (t.nodeObj.dangerouslySetInnerHTML || this.editTopic(t));
|
|
1671
|
-
},
|
|
1675
|
+
}, rn = function(e, t) {
|
|
1672
1676
|
e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
|
|
1673
|
-
},
|
|
1677
|
+
}, Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1674
1678
|
__proto__: null,
|
|
1675
|
-
addChild:
|
|
1676
|
-
beginEdit:
|
|
1677
|
-
copyNode:
|
|
1678
|
-
copyNodes:
|
|
1679
|
-
insertParent:
|
|
1680
|
-
insertSibling:
|
|
1681
|
-
moveDownNode:
|
|
1682
|
-
moveNodeAfter:
|
|
1683
|
-
moveNodeBefore:
|
|
1684
|
-
moveNodeIn:
|
|
1685
|
-
moveUpNode:
|
|
1686
|
-
removeNode:
|
|
1687
|
-
removeNodes:
|
|
1679
|
+
addChild: Yt,
|
|
1680
|
+
beginEdit: sn,
|
|
1681
|
+
copyNode: Xt,
|
|
1682
|
+
copyNodes: Gt,
|
|
1683
|
+
insertParent: Ut,
|
|
1684
|
+
insertSibling: Wt,
|
|
1685
|
+
moveDownNode: Zt,
|
|
1686
|
+
moveNodeAfter: on,
|
|
1687
|
+
moveNodeBefore: nn,
|
|
1688
|
+
moveNodeIn: tn,
|
|
1689
|
+
moveUpNode: Jt,
|
|
1690
|
+
removeNode: Qt,
|
|
1691
|
+
removeNodes: en,
|
|
1688
1692
|
reshapeNode: Kt,
|
|
1689
|
-
rmSubline:
|
|
1690
|
-
setNodeTopic:
|
|
1693
|
+
rmSubline: G,
|
|
1694
|
+
setNodeTopic: rn
|
|
1691
1695
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1692
|
-
function
|
|
1696
|
+
function Je(e) {
|
|
1693
1697
|
return {
|
|
1694
1698
|
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
1695
1699
|
arrows: e.arrows,
|
|
@@ -1698,7 +1702,7 @@ function Ge(e) {
|
|
|
1698
1702
|
theme: e.theme
|
|
1699
1703
|
};
|
|
1700
1704
|
}
|
|
1701
|
-
const
|
|
1705
|
+
const cn = function(e, t, n) {
|
|
1702
1706
|
if (e) {
|
|
1703
1707
|
if (this.clearSelection(), typeof e == "string") {
|
|
1704
1708
|
const o = N(e);
|
|
@@ -1708,7 +1712,7 @@ const rn = function(e, t, n) {
|
|
|
1708
1712
|
}
|
|
1709
1713
|
}, ln = function() {
|
|
1710
1714
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
1711
|
-
},
|
|
1715
|
+
}, an = function(e) {
|
|
1712
1716
|
this.clearSelection();
|
|
1713
1717
|
for (const t of e)
|
|
1714
1718
|
t.className = "selected";
|
|
@@ -1716,23 +1720,23 @@ const rn = function(e, t, n) {
|
|
|
1716
1720
|
"selectNodes",
|
|
1717
1721
|
e.map((t) => t.nodeObj)
|
|
1718
1722
|
);
|
|
1719
|
-
},
|
|
1723
|
+
}, dn = function() {
|
|
1720
1724
|
if (this.currentNodes)
|
|
1721
1725
|
for (const e of this.currentNodes)
|
|
1722
1726
|
e.classList.remove("selected");
|
|
1723
1727
|
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
1724
|
-
}, dn = function() {
|
|
1725
|
-
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
1726
1728
|
}, hn = function() {
|
|
1727
|
-
|
|
1729
|
+
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
1730
|
+
}, un = function() {
|
|
1731
|
+
const e = Je(this);
|
|
1728
1732
|
return JSON.stringify(e, (t, n) => {
|
|
1729
1733
|
if (!(t === "parent" && typeof n != "string"))
|
|
1730
1734
|
return n;
|
|
1731
1735
|
});
|
|
1732
|
-
}, un = function() {
|
|
1733
|
-
return JSON.parse(this.getDataString());
|
|
1734
1736
|
}, fn = function() {
|
|
1735
|
-
|
|
1737
|
+
return JSON.parse(this.getDataString());
|
|
1738
|
+
}, pn = function() {
|
|
1739
|
+
const e = Je(this).nodeData;
|
|
1736
1740
|
let t = "# " + e.topic + `
|
|
1737
1741
|
|
|
1738
1742
|
`;
|
|
@@ -1744,66 +1748,68 @@ const rn = function(e, t, n) {
|
|
|
1744
1748
|
`, o[i].children && n(o[i].children || [], s + 1);
|
|
1745
1749
|
}
|
|
1746
1750
|
return n(e.children || [], 2), t;
|
|
1747
|
-
}, pn = function() {
|
|
1748
|
-
this.editable = !0;
|
|
1749
1751
|
}, mn = function() {
|
|
1752
|
+
this.editable = !0;
|
|
1753
|
+
}, gn = function() {
|
|
1750
1754
|
this.editable = !1;
|
|
1751
|
-
},
|
|
1755
|
+
}, vn = function(e) {
|
|
1752
1756
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")", this.bus.fire("scale", e);
|
|
1753
|
-
},
|
|
1757
|
+
}, yn = function() {
|
|
1754
1758
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1755
|
-
}, yn = function(e) {
|
|
1756
|
-
e(this);
|
|
1757
1759
|
}, bn = function(e) {
|
|
1760
|
+
e(this);
|
|
1761
|
+
}, xn = function(e) {
|
|
1758
1762
|
e.nodeObj.parent && (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.initRight(), this.toCenter());
|
|
1759
|
-
}, xn = function() {
|
|
1760
|
-
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1761
1763
|
}, wn = function() {
|
|
1762
|
-
this.direction =
|
|
1764
|
+
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1763
1765
|
}, En = function() {
|
|
1764
|
-
this.direction =
|
|
1766
|
+
this.direction = 0, this.refresh();
|
|
1765
1767
|
}, Nn = function() {
|
|
1768
|
+
this.direction = 1, this.refresh();
|
|
1769
|
+
}, Sn = function() {
|
|
1766
1770
|
this.direction = 2, this.refresh();
|
|
1767
1771
|
}, Cn = function(e) {
|
|
1768
1772
|
this.locale = e, this.refresh();
|
|
1769
|
-
},
|
|
1773
|
+
}, _n = function(e, t) {
|
|
1770
1774
|
const n = e.nodeObj;
|
|
1771
1775
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1772
1776
|
const o = e.parentNode, s = o.children[1];
|
|
1773
|
-
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "",
|
|
1774
|
-
const
|
|
1775
|
-
n.children.map((
|
|
1777
|
+
if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", G(e), n.expanded) {
|
|
1778
|
+
const l = this.createChildren(
|
|
1779
|
+
n.children.map((u) => this.createWrapper(u).grp)
|
|
1776
1780
|
);
|
|
1777
|
-
o.parentNode.appendChild(
|
|
1781
|
+
o.parentNode.appendChild(l);
|
|
1778
1782
|
} else
|
|
1779
1783
|
o.parentNode.children[1].remove();
|
|
1780
|
-
this.linkDiv(
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
}, Mn =
|
|
1784
|
+
this.linkDiv(e.closest("me-main > me-wrapper"));
|
|
1785
|
+
const i = e.getBoundingClientRect(), r = this.container.getBoundingClientRect();
|
|
1786
|
+
(i.bottom > r.bottom || i.top < r.top || i.right > r.right || i.left < r.left) && e.scrollIntoView({ block: "center", inline: "center" }), this.bus.fire("expandNode", n);
|
|
1787
|
+
}, Mn = function(e) {
|
|
1788
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), O(this.nodeData), this.layout(), this.linkDiv();
|
|
1789
|
+
}, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1784
1790
|
__proto__: null,
|
|
1785
|
-
cancelFocus:
|
|
1786
|
-
clearSelection:
|
|
1787
|
-
disableEdit:
|
|
1788
|
-
enableEdit:
|
|
1789
|
-
expandNode:
|
|
1790
|
-
focusNode:
|
|
1791
|
-
getData:
|
|
1792
|
-
getDataMd:
|
|
1793
|
-
getDataString:
|
|
1794
|
-
initLeft:
|
|
1795
|
-
initRight:
|
|
1796
|
-
initSide:
|
|
1797
|
-
install:
|
|
1798
|
-
refresh:
|
|
1799
|
-
scale:
|
|
1800
|
-
selectNode:
|
|
1801
|
-
selectNodes:
|
|
1791
|
+
cancelFocus: wn,
|
|
1792
|
+
clearSelection: hn,
|
|
1793
|
+
disableEdit: gn,
|
|
1794
|
+
enableEdit: mn,
|
|
1795
|
+
expandNode: _n,
|
|
1796
|
+
focusNode: xn,
|
|
1797
|
+
getData: fn,
|
|
1798
|
+
getDataMd: pn,
|
|
1799
|
+
getDataString: un,
|
|
1800
|
+
initLeft: En,
|
|
1801
|
+
initRight: Nn,
|
|
1802
|
+
initSide: Sn,
|
|
1803
|
+
install: bn,
|
|
1804
|
+
refresh: Mn,
|
|
1805
|
+
scale: vn,
|
|
1806
|
+
selectNode: cn,
|
|
1807
|
+
selectNodes: an,
|
|
1802
1808
|
setLocale: Cn,
|
|
1803
|
-
toCenter:
|
|
1809
|
+
toCenter: yn,
|
|
1804
1810
|
unselectNode: ln,
|
|
1805
|
-
unselectNodes:
|
|
1806
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1811
|
+
unselectNodes: dn
|
|
1812
|
+
}, Symbol.toStringTag, { value: "Module" })), Ln = function(e) {
|
|
1807
1813
|
return {
|
|
1808
1814
|
dom: e,
|
|
1809
1815
|
moved: !1,
|
|
@@ -1829,21 +1835,21 @@ const rn = function(e, t, n) {
|
|
|
1829
1835
|
this.moved = !1, this.mousedown = !1;
|
|
1830
1836
|
}
|
|
1831
1837
|
};
|
|
1832
|
-
},
|
|
1833
|
-
create:
|
|
1838
|
+
}, je = {
|
|
1839
|
+
create: Ln
|
|
1834
1840
|
};
|
|
1835
|
-
function
|
|
1836
|
-
const { offsetLeft: o, offsetTop: s } =
|
|
1841
|
+
function ie(e, t, n) {
|
|
1842
|
+
const { offsetLeft: o, offsetTop: s } = P(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, c = o + i / 2, l = s + r / 2, u = c + n.x, d = l + n.y;
|
|
1837
1843
|
return {
|
|
1838
1844
|
w: i,
|
|
1839
1845
|
h: r,
|
|
1840
|
-
cx:
|
|
1841
|
-
cy:
|
|
1846
|
+
cx: c,
|
|
1847
|
+
cy: l,
|
|
1842
1848
|
ctrlX: u,
|
|
1843
1849
|
ctrlY: d
|
|
1844
1850
|
};
|
|
1845
1851
|
}
|
|
1846
|
-
function
|
|
1852
|
+
function q(e) {
|
|
1847
1853
|
let t, n;
|
|
1848
1854
|
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1849
1855
|
return o > e.h / e.w || o < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
|
|
@@ -1851,7 +1857,7 @@ function F(e) {
|
|
|
1851
1857
|
y: n
|
|
1852
1858
|
};
|
|
1853
1859
|
}
|
|
1854
|
-
const
|
|
1860
|
+
const Tn = function(e, t, n, o) {
|
|
1855
1861
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1856
1862
|
return E(s, {
|
|
1857
1863
|
"text-anchor": "middle",
|
|
@@ -1859,18 +1865,18 @@ const Ln = function(e, t, n, o) {
|
|
|
1859
1865
|
y: n + "",
|
|
1860
1866
|
fill: o || "#666"
|
|
1861
1867
|
}), s.dataset.type = "custom-link", s.innerHTML = e, s;
|
|
1862
|
-
},
|
|
1868
|
+
}, Ze = function(e, t, n, o, s) {
|
|
1863
1869
|
if (!t || !n)
|
|
1864
1870
|
return;
|
|
1865
1871
|
performance.now();
|
|
1866
|
-
const i =
|
|
1867
|
-
`M ${
|
|
1872
|
+
const i = ie(e, t, o.delta1), r = ie(e, n, o.delta2), { x: c, y: l } = q(i), { ctrlX: u, ctrlY: d } = i, { ctrlX: a, ctrlY: f } = r, { x: g, y: p } = q(r), m = Be(a, f, g, p), h = mt(
|
|
1873
|
+
`M ${c} ${l} C ${u} ${d} ${a} ${f} ${g} ${p}`,
|
|
1868
1874
|
`M ${m.x1} ${m.y1} L ${g} ${p} L ${m.x2} ${m.y2}`
|
|
1869
|
-
), v =
|
|
1870
|
-
h.appendChild(b), h.arrowObj = o, h.dataset.linkid = o.id, e.linkSvgGroup.appendChild(h), s || (e.arrows.push(o), e.currentArrow = h,
|
|
1871
|
-
},
|
|
1875
|
+
), v = c / 8 + u * 3 / 8 + a * 3 / 8 + g / 8, y = l / 8 + d * 3 / 8 + f * 3 / 8 + p / 8, b = Tn(o.label, v, y, e.theme.cssVar["--color"]);
|
|
1876
|
+
h.appendChild(b), h.arrowObj = o, h.dataset.linkid = o.id, e.linkSvgGroup.appendChild(h), s || (e.arrows.push(o), e.currentArrow = h, et(e, o, i, r)), performance.now();
|
|
1877
|
+
}, An = function(e, t) {
|
|
1872
1878
|
const n = {
|
|
1873
|
-
id:
|
|
1879
|
+
id: X(),
|
|
1874
1880
|
label: "Custom Link",
|
|
1875
1881
|
from: e.nodeObj.id,
|
|
1876
1882
|
to: t.nodeObj.id,
|
|
@@ -1883,15 +1889,15 @@ const Ln = function(e, t, n, o) {
|
|
|
1883
1889
|
y: -200
|
|
1884
1890
|
}
|
|
1885
1891
|
};
|
|
1886
|
-
|
|
1892
|
+
Ze(this, e, t, n), this.bus.fire("operation", {
|
|
1887
1893
|
name: "createArrow",
|
|
1888
1894
|
obj: n
|
|
1889
1895
|
});
|
|
1890
|
-
},
|
|
1896
|
+
}, jn = function(e) {
|
|
1891
1897
|
let t;
|
|
1892
1898
|
if (e ? t = e : t = this.currentArrow, !t)
|
|
1893
1899
|
return;
|
|
1894
|
-
|
|
1900
|
+
Qe(this);
|
|
1895
1901
|
const n = t.arrowObj.id;
|
|
1896
1902
|
this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
|
|
1897
1903
|
name: "removeArrow",
|
|
@@ -1899,76 +1905,76 @@ const Ln = function(e, t, n, o) {
|
|
|
1899
1905
|
id: n
|
|
1900
1906
|
}
|
|
1901
1907
|
});
|
|
1902
|
-
},
|
|
1908
|
+
}, Dn = function(e) {
|
|
1903
1909
|
this.currentArrow = e;
|
|
1904
|
-
const t = e.arrowObj, n = N(t.from), o = N(t.to), s =
|
|
1905
|
-
|
|
1906
|
-
},
|
|
1907
|
-
this.currentArrow = null,
|
|
1908
|
-
},
|
|
1910
|
+
const t = e.arrowObj, n = N(t.from), o = N(t.to), s = ie(this, n, t.delta1), i = ie(this, o, t.delta2);
|
|
1911
|
+
et(this, t, s, i);
|
|
1912
|
+
}, $n = function() {
|
|
1913
|
+
this.currentArrow = null, Qe(this);
|
|
1914
|
+
}, Qe = function(e) {
|
|
1909
1915
|
e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1910
|
-
},
|
|
1916
|
+
}, et = function(e, t, n, o) {
|
|
1911
1917
|
var f;
|
|
1912
1918
|
e.linkController.style.display = "initial", e.P2.style.display = "initial", e.P3.style.display = "initial", e.nodes.appendChild(e.linkController), e.nodes.appendChild(e.P2), e.nodes.appendChild(e.P3);
|
|
1913
|
-
let { x: s, y: i } =
|
|
1914
|
-
e.P2.style.cssText = `top:${
|
|
1919
|
+
let { x: s, y: i } = q(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: u } = o, { x: d, y: a } = q(o);
|
|
1920
|
+
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${u}px;left:${l}px;`, E(e.line1, {
|
|
1915
1921
|
x1: s + "",
|
|
1916
1922
|
y1: i + "",
|
|
1917
1923
|
x2: r + "",
|
|
1918
|
-
y2:
|
|
1924
|
+
y2: c + ""
|
|
1919
1925
|
}), E(e.line2, {
|
|
1920
|
-
x1:
|
|
1926
|
+
x1: l + "",
|
|
1921
1927
|
y1: u + "",
|
|
1922
1928
|
x2: d + "",
|
|
1923
1929
|
y2: a + ""
|
|
1924
|
-
}), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 =
|
|
1930
|
+
}), 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) => {
|
|
1925
1931
|
var y;
|
|
1926
|
-
r = r + g / e.scaleVal,
|
|
1927
|
-
const m =
|
|
1932
|
+
r = r + g / e.scaleVal, c = c + p / e.scaleVal;
|
|
1933
|
+
const m = q({ ...n, ctrlX: r, ctrlY: c });
|
|
1928
1934
|
s = m.x, i = m.y;
|
|
1929
|
-
const h = s / 8 + r * 3 / 8 +
|
|
1930
|
-
e.P2.style.top =
|
|
1935
|
+
const h = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8, v = i / 8 + c * 3 / 8 + u * 3 / 8 + a / 8;
|
|
1936
|
+
e.P2.style.top = c + "px", e.P2.style.left = r + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${u} ${d} ${a}`), E(e.currentArrow.children[2], {
|
|
1931
1937
|
x: h + "",
|
|
1932
1938
|
y: v + ""
|
|
1933
1939
|
}), E(e.line1, {
|
|
1934
1940
|
x1: s + "",
|
|
1935
1941
|
y1: i + "",
|
|
1936
1942
|
x2: r + "",
|
|
1937
|
-
y2:
|
|
1938
|
-
}), t.delta1.x = r - n.cx, t.delta1.y =
|
|
1943
|
+
y2: c + ""
|
|
1944
|
+
}), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy;
|
|
1939
1945
|
}), e.helper2.init(e.map, (g, p) => {
|
|
1940
1946
|
var b, x;
|
|
1941
|
-
|
|
1942
|
-
const m =
|
|
1947
|
+
l = l + g / e.scaleVal, u = u + p / e.scaleVal;
|
|
1948
|
+
const m = q({ ...o, ctrlX: l, ctrlY: u });
|
|
1943
1949
|
d = m.x, a = m.y;
|
|
1944
|
-
const h = s / 8 + r * 3 / 8 +
|
|
1945
|
-
e.P3.style.top = u + "px", e.P3.style.left =
|
|
1950
|
+
const h = s / 8 + r * 3 / 8 + l * 3 / 8 + d / 8, v = i / 8 + c * 3 / 8 + u * 3 / 8 + a / 8, y = Be(l, u, d, a);
|
|
1951
|
+
e.P3.style.top = u + "px", e.P3.style.left = l + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${u} ${d} ${a}`), (x = e.currentArrow) == null || x.children[1].setAttribute("d", `M ${y.x1} ${y.y1} L ${d} ${a} L ${y.x2} ${y.y2}`), E(e.currentArrow.children[2], {
|
|
1946
1952
|
x: h + "",
|
|
1947
1953
|
y: v + ""
|
|
1948
1954
|
}), E(e.line2, {
|
|
1949
|
-
x1:
|
|
1955
|
+
x1: l + "",
|
|
1950
1956
|
y1: u + "",
|
|
1951
1957
|
x2: d + "",
|
|
1952
1958
|
y2: a + ""
|
|
1953
|
-
}), t.delta2.x =
|
|
1959
|
+
}), t.delta2.x = l - o.cx, t.delta2.y = u - o.cy;
|
|
1954
1960
|
});
|
|
1955
1961
|
};
|
|
1956
|
-
function
|
|
1962
|
+
function On() {
|
|
1957
1963
|
this.linkSvgGroup.innerHTML = "";
|
|
1958
1964
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1959
1965
|
const t = this.arrows[e];
|
|
1960
1966
|
try {
|
|
1961
|
-
|
|
1967
|
+
Ze(this, N(t.from), N(t.to), t, !0);
|
|
1962
1968
|
} catch {
|
|
1963
1969
|
}
|
|
1964
1970
|
}
|
|
1965
1971
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1966
1972
|
}
|
|
1967
|
-
function
|
|
1973
|
+
function Pn(e) {
|
|
1968
1974
|
if (!e)
|
|
1969
1975
|
return;
|
|
1970
1976
|
const t = e.children[2];
|
|
1971
|
-
|
|
1977
|
+
Fe(this, t, (n) => {
|
|
1972
1978
|
var i;
|
|
1973
1979
|
const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1974
1980
|
s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1977,20 +1983,20 @@ function On(e) {
|
|
|
1977
1983
|
}));
|
|
1978
1984
|
});
|
|
1979
1985
|
}
|
|
1980
|
-
function
|
|
1981
|
-
this.arrows = this.arrows.filter((e) =>
|
|
1986
|
+
function Hn() {
|
|
1987
|
+
this.arrows = this.arrows.filter((e) => oe(e.from, this.nodeData) && oe(e.to, this.nodeData));
|
|
1982
1988
|
}
|
|
1983
1989
|
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1984
1990
|
__proto__: null,
|
|
1985
|
-
createArrow:
|
|
1986
|
-
editArrowLabel:
|
|
1987
|
-
removeArrow:
|
|
1988
|
-
renderArrow:
|
|
1989
|
-
selectArrow:
|
|
1990
|
-
tidyArrow:
|
|
1991
|
-
unselectArrow:
|
|
1992
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1993
|
-
var
|
|
1991
|
+
createArrow: An,
|
|
1992
|
+
editArrowLabel: Pn,
|
|
1993
|
+
removeArrow: jn,
|
|
1994
|
+
renderArrow: On,
|
|
1995
|
+
selectArrow: Dn,
|
|
1996
|
+
tidyArrow: Hn,
|
|
1997
|
+
unselectArrow: $n
|
|
1998
|
+
}, Symbol.toStringTag, { value: "Module" })), Rn = function(e) {
|
|
1999
|
+
var l, u;
|
|
1994
2000
|
if (e.length === 0)
|
|
1995
2001
|
throw new Error("No selected node.");
|
|
1996
2002
|
if (e.length === 1) {
|
|
@@ -2017,25 +2023,25 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2017
2023
|
let o = 0;
|
|
2018
2024
|
e:
|
|
2019
2025
|
for (; o < t; o++) {
|
|
2020
|
-
const d = (
|
|
2026
|
+
const d = (l = n[0][o]) == null ? void 0 : l.node;
|
|
2021
2027
|
for (let a = 1; a < n.length; a++)
|
|
2022
2028
|
if (((u = n[a][o]) == null ? void 0 : u.node) !== d)
|
|
2023
2029
|
break e;
|
|
2024
2030
|
}
|
|
2025
2031
|
if (!o)
|
|
2026
2032
|
throw new Error("Can not select root node.");
|
|
2027
|
-
const s = n.map((d) => d[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0,
|
|
2028
|
-
if (!
|
|
2033
|
+
const s = n.map((d) => d[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, c = n[0][o - 1].node;
|
|
2034
|
+
if (!c.parent)
|
|
2029
2035
|
throw new Error("Please select nodes in the same main topic.");
|
|
2030
2036
|
return {
|
|
2031
|
-
parent:
|
|
2037
|
+
parent: c.id,
|
|
2032
2038
|
start: i,
|
|
2033
2039
|
end: r
|
|
2034
2040
|
};
|
|
2035
2041
|
}, zn = function(e) {
|
|
2036
2042
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2037
2043
|
return t.setAttribute("id", e), t;
|
|
2038
|
-
},
|
|
2044
|
+
}, De = function(e, t) {
|
|
2039
2045
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2040
2046
|
return E(n, {
|
|
2041
2047
|
d: e,
|
|
@@ -2044,7 +2050,7 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2044
2050
|
"stroke-linecap": "round",
|
|
2045
2051
|
"stroke-width": "2"
|
|
2046
2052
|
}), n;
|
|
2047
|
-
},
|
|
2053
|
+
}, $e = function(e, t, n, o, s) {
|
|
2048
2054
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2049
2055
|
return E(i, {
|
|
2050
2056
|
"text-anchor": o,
|
|
@@ -2052,36 +2058,35 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2052
2058
|
y: n + "",
|
|
2053
2059
|
fill: s || "#666"
|
|
2054
2060
|
}), i.innerHTML = e, i;
|
|
2055
|
-
},
|
|
2056
|
-
var i, r;
|
|
2061
|
+
}, Fn = (e) => N(e).parentElement.parentElement, qn = function({ parent: e, start: t }) {
|
|
2057
2062
|
const n = N(e), o = n.nodeObj;
|
|
2058
2063
|
let s;
|
|
2059
|
-
return o.parent ? s =
|
|
2060
|
-
},
|
|
2061
|
-
var
|
|
2062
|
-
const { id: n, text: o, parent: s, start: i, end: r } = t,
|
|
2064
|
+
return o.parent ? s = n.closest("me-main").className : s = N(o.children[t].id).closest("me-main").className, s;
|
|
2065
|
+
}, tt = function(e, t) {
|
|
2066
|
+
var S;
|
|
2067
|
+
const { id: n, text: o, parent: s, start: i, end: r } = t, c = e.nodes, u = N(s).nodeObj, d = qn(t);
|
|
2063
2068
|
let a = 1 / 0, f = 0, g = 0, p = 0;
|
|
2064
|
-
for (let
|
|
2065
|
-
const
|
|
2066
|
-
if (!
|
|
2069
|
+
for (let H = i; H <= r; H++) {
|
|
2070
|
+
const W = (S = u.children) == null ? void 0 : S[H];
|
|
2071
|
+
if (!W)
|
|
2067
2072
|
return e.removeSummary(n), null;
|
|
2068
|
-
const B =
|
|
2069
|
-
|
|
2073
|
+
const B = Fn(W.id), { offsetLeft: J, offsetTop: ve } = P(c, B), ye = i === r ? 10 : 20;
|
|
2074
|
+
H === i && (g = ve + ye), H === r && (p = ve + B.offsetHeight - ye), J < a && (a = J), B.offsetWidth + J > f && (f = B.offsetWidth + J);
|
|
2070
2075
|
}
|
|
2071
2076
|
let m, h;
|
|
2072
2077
|
const v = g + 10, y = p + 10, b = (v + y) / 2, x = e.theme.cssVar["--color"];
|
|
2073
|
-
d ===
|
|
2078
|
+
d === C.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), h = $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), h = $e(o, f + 20, b + 6, "start", x));
|
|
2074
2079
|
const w = zn("s-" + n);
|
|
2075
2080
|
return w.appendChild(m), w.appendChild(h), w.summaryObj = t, e.summarySvg.appendChild(w), w;
|
|
2076
|
-
},
|
|
2081
|
+
}, In = function() {
|
|
2077
2082
|
let e = [];
|
|
2078
2083
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2079
|
-
const { parent: t, start: n, end: o } =
|
|
2084
|
+
const { parent: t, start: n, end: o } = Rn(e), s = { id: X(), parent: t, start: n, end: o, text: "summary" }, i = tt(this, s);
|
|
2080
2085
|
this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
|
|
2081
2086
|
name: "createSummary",
|
|
2082
2087
|
obj: s
|
|
2083
2088
|
});
|
|
2084
|
-
},
|
|
2089
|
+
}, Vn = function(e) {
|
|
2085
2090
|
var n;
|
|
2086
2091
|
const t = this.summaries.findIndex((o) => o.id === e);
|
|
2087
2092
|
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
|
|
@@ -2100,21 +2105,21 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2100
2105
|
"stroke-width": "2",
|
|
2101
2106
|
fill: "none"
|
|
2102
2107
|
}), e.appendChild(s), this.currentSummary = e;
|
|
2103
|
-
},
|
|
2108
|
+
}, Wn = function() {
|
|
2104
2109
|
var e, t;
|
|
2105
2110
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2106
|
-
},
|
|
2111
|
+
}, Un = function() {
|
|
2107
2112
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2108
2113
|
try {
|
|
2109
|
-
|
|
2114
|
+
tt(this, e);
|
|
2110
2115
|
} catch {
|
|
2111
2116
|
}
|
|
2112
2117
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
2113
|
-
},
|
|
2118
|
+
}, Yn = function(e) {
|
|
2114
2119
|
if (!e)
|
|
2115
2120
|
return;
|
|
2116
2121
|
const t = e.childNodes[1];
|
|
2117
|
-
|
|
2122
|
+
Fe(this, t, (n) => {
|
|
2118
2123
|
var i;
|
|
2119
2124
|
const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
2120
2125
|
s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -2122,49 +2127,49 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2122
2127
|
obj: o
|
|
2123
2128
|
}));
|
|
2124
2129
|
});
|
|
2125
|
-
},
|
|
2130
|
+
}, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2126
2131
|
__proto__: null,
|
|
2127
|
-
createSummary:
|
|
2128
|
-
editSummary:
|
|
2129
|
-
removeSummary:
|
|
2130
|
-
renderSummary:
|
|
2132
|
+
createSummary: In,
|
|
2133
|
+
editSummary: Yn,
|
|
2134
|
+
removeSummary: Vn,
|
|
2135
|
+
renderSummary: Un,
|
|
2131
2136
|
selectSummary: Kn,
|
|
2132
|
-
unselectSummary:
|
|
2133
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2134
|
-
function
|
|
2135
|
-
const n = document.createElementNS(
|
|
2137
|
+
unselectSummary: Wn
|
|
2138
|
+
}, Symbol.toStringTag, { value: "Module" })), k = "http://www.w3.org/2000/svg";
|
|
2139
|
+
function Gn(e, t) {
|
|
2140
|
+
const n = document.createElementNS(k, "svg");
|
|
2136
2141
|
return E(n, {
|
|
2137
2142
|
version: "1.1",
|
|
2138
|
-
xmlns:
|
|
2143
|
+
xmlns: k,
|
|
2139
2144
|
height: e,
|
|
2140
2145
|
width: t
|
|
2141
2146
|
}), n;
|
|
2142
2147
|
}
|
|
2143
|
-
function
|
|
2148
|
+
function Jn(e, t) {
|
|
2144
2149
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2145
2150
|
}
|
|
2146
|
-
function
|
|
2147
|
-
const s = document.createElementNS(
|
|
2151
|
+
function Zn(e, t, n, o) {
|
|
2152
|
+
const s = document.createElementNS(k, "g");
|
|
2148
2153
|
let i = "";
|
|
2149
2154
|
return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
|
|
2150
|
-
`).forEach((
|
|
2151
|
-
const u = document.createElementNS(
|
|
2155
|
+
`).forEach((c, l) => {
|
|
2156
|
+
const u = document.createElementNS(k, "text");
|
|
2152
2157
|
E(u, {
|
|
2153
2158
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2154
|
-
y: o + parseInt(t.paddingTop) +
|
|
2159
|
+
y: o + parseInt(t.paddingTop) + Jn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
|
|
2155
2160
|
"text-anchor": "start",
|
|
2156
2161
|
"font-family": t.fontFamily,
|
|
2157
2162
|
"font-size": `${t.fontSize}`,
|
|
2158
2163
|
"font-weight": `${t.fontWeight}`,
|
|
2159
2164
|
fill: `${t.color}`
|
|
2160
|
-
}), u.innerHTML =
|
|
2165
|
+
}), u.innerHTML = c, s.appendChild(u);
|
|
2161
2166
|
}), s;
|
|
2162
2167
|
}
|
|
2163
|
-
function
|
|
2164
|
-
var
|
|
2168
|
+
function Qn(e, t, n, o) {
|
|
2169
|
+
var c;
|
|
2165
2170
|
let s = "";
|
|
2166
|
-
(
|
|
2167
|
-
const i = document.createElementNS(
|
|
2171
|
+
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
|
|
2172
|
+
const i = document.createElementNS(k, "foreignObject");
|
|
2168
2173
|
E(i, {
|
|
2169
2174
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2170
2175
|
y: o + parseInt(t.paddingTop) + "",
|
|
@@ -2177,8 +2182,8 @@ function Zn(e, t, n, o) {
|
|
|
2177
2182
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2178
2183
|
}), r.innerHTML = s, i.appendChild(r), i;
|
|
2179
2184
|
}
|
|
2180
|
-
function
|
|
2181
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2185
|
+
function eo(e, t) {
|
|
2186
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = P(e.nodes, t), i = document.createElementNS(k, "rect");
|
|
2182
2187
|
return E(i, {
|
|
2183
2188
|
x: o + "",
|
|
2184
2189
|
y: s + "",
|
|
@@ -2191,8 +2196,8 @@ function Qn(e, t) {
|
|
|
2191
2196
|
"stroke-width": n.borderWidth
|
|
2192
2197
|
}), i;
|
|
2193
2198
|
}
|
|
2194
|
-
function
|
|
2195
|
-
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } =
|
|
2199
|
+
function ee(e, t, n = !1) {
|
|
2200
|
+
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = P(e.nodes, t), r = document.createElementNS(k, "rect");
|
|
2196
2201
|
E(r, {
|
|
2197
2202
|
x: s + "",
|
|
2198
2203
|
y: i + "",
|
|
@@ -2204,13 +2209,13 @@ function Q(e, t, n = !1) {
|
|
|
2204
2209
|
stroke: o.borderColor,
|
|
2205
2210
|
"stroke-width": o.borderWidth
|
|
2206
2211
|
});
|
|
2207
|
-
const
|
|
2208
|
-
|
|
2209
|
-
let
|
|
2210
|
-
return n ?
|
|
2212
|
+
const c = document.createElementNS(k, "g");
|
|
2213
|
+
c.appendChild(r);
|
|
2214
|
+
let l;
|
|
2215
|
+
return n ? l = Qn(t, o, s, i) : l = Zn(t, o, s, i), c.appendChild(l), c;
|
|
2211
2216
|
}
|
|
2212
|
-
function
|
|
2213
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2217
|
+
function to(e, t) {
|
|
2218
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = P(e.nodes, t), i = document.createElementNS(k, "a"), r = document.createElementNS(k, "text");
|
|
2214
2219
|
return E(r, {
|
|
2215
2220
|
x: o + "",
|
|
2216
2221
|
y: s + parseInt(n.fontSize) + "",
|
|
@@ -2221,8 +2226,8 @@ function eo(e, t) {
|
|
|
2221
2226
|
fill: `${n.color}`
|
|
2222
2227
|
}), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
|
|
2223
2228
|
}
|
|
2224
|
-
function
|
|
2225
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2229
|
+
function no(e, t) {
|
|
2230
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = P(e.nodes, t), i = document.createElementNS(k, "image");
|
|
2226
2231
|
return E(i, {
|
|
2227
2232
|
x: o + "",
|
|
2228
2233
|
y: s + "",
|
|
@@ -2231,41 +2236,41 @@ function to(e, t) {
|
|
|
2231
2236
|
href: t.src
|
|
2232
2237
|
}), i;
|
|
2233
2238
|
}
|
|
2234
|
-
const
|
|
2239
|
+
const te = 100, oo = '<?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">', so = (e, t = !1) => {
|
|
2235
2240
|
var a, f, g;
|
|
2236
|
-
const n = e.nodes, o = n.offsetHeight +
|
|
2237
|
-
E(
|
|
2241
|
+
const n = e.nodes, o = n.offsetHeight + te * 2, s = n.offsetWidth + te * 2, i = Gn(o + "px", s + "px"), r = document.createElementNS(k, "svg"), c = document.createElementNS(k, "rect");
|
|
2242
|
+
E(c, {
|
|
2238
2243
|
x: "0",
|
|
2239
2244
|
y: "0",
|
|
2240
2245
|
width: `${s}`,
|
|
2241
2246
|
height: `${o}`,
|
|
2242
2247
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2243
|
-
}), i.appendChild(
|
|
2244
|
-
const m = p.cloneNode(!0), { offsetLeft: h, offsetTop: v } =
|
|
2248
|
+
}), i.appendChild(c), n.querySelectorAll(".subLines").forEach((p) => {
|
|
2249
|
+
const m = p.cloneNode(!0), { offsetLeft: h, offsetTop: v } = P(n, p.parentElement);
|
|
2245
2250
|
m.setAttribute("x", `${h}`), m.setAttribute("y", `${v}`), r.appendChild(m);
|
|
2246
2251
|
});
|
|
2247
|
-
const
|
|
2248
|
-
|
|
2252
|
+
const l = (a = n.querySelector(".lines")) == null ? void 0 : a.cloneNode(!0);
|
|
2253
|
+
l && r.appendChild(l);
|
|
2249
2254
|
const u = (f = n.querySelector(".topiclinks")) == null ? void 0 : f.cloneNode(!0);
|
|
2250
2255
|
u && r.appendChild(u);
|
|
2251
2256
|
const d = (g = n.querySelector(".summary")) == null ? void 0 : g.cloneNode(!0);
|
|
2252
2257
|
return d && r.appendChild(d), n.querySelectorAll("me-tpc").forEach((p) => {
|
|
2253
|
-
p.nodeObj.dangerouslySetInnerHTML ? r.appendChild(
|
|
2258
|
+
p.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ee(e, p, !t)) : (r.appendChild(eo(e, p)), r.appendChild(ee(e, p.text, !t)));
|
|
2254
2259
|
}), n.querySelectorAll(".tags > span").forEach((p) => {
|
|
2255
|
-
r.appendChild(
|
|
2260
|
+
r.appendChild(ee(e, p));
|
|
2256
2261
|
}), n.querySelectorAll(".icons > span").forEach((p) => {
|
|
2257
|
-
r.appendChild(
|
|
2262
|
+
r.appendChild(ee(e, p));
|
|
2258
2263
|
}), n.querySelectorAll(".hyper-link").forEach((p) => {
|
|
2259
|
-
r.appendChild(eo(e, p));
|
|
2260
|
-
}), n.querySelectorAll("img").forEach((p) => {
|
|
2261
2264
|
r.appendChild(to(e, p));
|
|
2265
|
+
}), n.querySelectorAll("img").forEach((p) => {
|
|
2266
|
+
r.appendChild(no(e, p));
|
|
2262
2267
|
}), E(r, {
|
|
2263
|
-
x:
|
|
2264
|
-
y:
|
|
2268
|
+
x: te + "",
|
|
2269
|
+
y: te + "",
|
|
2265
2270
|
overflow: "visible"
|
|
2266
2271
|
}), i.appendChild(r), i;
|
|
2267
|
-
},
|
|
2268
|
-
function
|
|
2272
|
+
}, io = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), oo + e.outerHTML);
|
|
2273
|
+
function ro(e) {
|
|
2269
2274
|
return new Promise((t, n) => {
|
|
2270
2275
|
const o = new FileReader();
|
|
2271
2276
|
o.onload = (s) => {
|
|
@@ -2275,80 +2280,80 @@ function io(e) {
|
|
|
2275
2280
|
}, o.readAsDataURL(e);
|
|
2276
2281
|
});
|
|
2277
2282
|
}
|
|
2278
|
-
const
|
|
2279
|
-
const n =
|
|
2283
|
+
const co = function(e = !1, t) {
|
|
2284
|
+
const n = so(this, e), o = io(n, t);
|
|
2280
2285
|
return new Blob([o], { type: "image/svg+xml" });
|
|
2281
2286
|
}, lo = async function(e = !1, t) {
|
|
2282
|
-
const n = this.exportSvg(e, t), o = await
|
|
2287
|
+
const n = this.exportSvg(e, t), o = await ro(n);
|
|
2283
2288
|
return new Promise((s, i) => {
|
|
2284
2289
|
const r = new Image();
|
|
2285
2290
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2291
|
+
const c = document.createElement("canvas");
|
|
2292
|
+
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(s, "image/png", 1);
|
|
2288
2293
|
}, r.src = o, r.onerror = i;
|
|
2289
2294
|
});
|
|
2290
|
-
},
|
|
2295
|
+
}, ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2291
2296
|
__proto__: null,
|
|
2292
2297
|
exportPng: lo,
|
|
2293
|
-
exportSvg:
|
|
2298
|
+
exportSvg: co
|
|
2294
2299
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2295
|
-
function
|
|
2300
|
+
function ho(e, t) {
|
|
2296
2301
|
return async function(...n) {
|
|
2297
2302
|
const o = this.before[t];
|
|
2298
2303
|
o && !await o.apply(this, n) || e.apply(this, n);
|
|
2299
2304
|
};
|
|
2300
2305
|
}
|
|
2301
|
-
const
|
|
2302
|
-
for (let e = 0; e <
|
|
2303
|
-
const t =
|
|
2304
|
-
|
|
2306
|
+
const Oe = Object.keys(Ge), nt = {};
|
|
2307
|
+
for (let e = 0; e < Oe.length; e++) {
|
|
2308
|
+
const t = Oe[e];
|
|
2309
|
+
nt[t] = ho(Ge[t], t);
|
|
2305
2310
|
}
|
|
2306
|
-
const
|
|
2307
|
-
getObjById:
|
|
2308
|
-
generateNewObj:
|
|
2309
|
-
layout:
|
|
2310
|
-
linkDiv:
|
|
2311
|
-
editTopic:
|
|
2312
|
-
createWrapper:
|
|
2313
|
-
createParent:
|
|
2314
|
-
createChildren:
|
|
2315
|
-
createTopic:
|
|
2311
|
+
const uo = {
|
|
2312
|
+
getObjById: oe,
|
|
2313
|
+
generateNewObj: st,
|
|
2314
|
+
layout: ct,
|
|
2315
|
+
linkDiv: gt,
|
|
2316
|
+
editTopic: pt,
|
|
2317
|
+
createWrapper: dt,
|
|
2318
|
+
createParent: ht,
|
|
2319
|
+
createChildren: ut,
|
|
2320
|
+
createTopic: ft,
|
|
2316
2321
|
findEle: N,
|
|
2317
|
-
changeTheme:
|
|
2318
|
-
...
|
|
2319
|
-
...
|
|
2322
|
+
changeTheme: Rt,
|
|
2323
|
+
...kn,
|
|
2324
|
+
...nt,
|
|
2320
2325
|
...Bn,
|
|
2321
|
-
...
|
|
2322
|
-
...
|
|
2326
|
+
...Xn,
|
|
2327
|
+
...ao,
|
|
2323
2328
|
init(e) {
|
|
2324
2329
|
if (!e || !e.nodeData)
|
|
2325
2330
|
return new Error("MindElixir: `data` is required");
|
|
2326
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
2331
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, O(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && At(this), this.keypress && Nt(this), this.editable && Bt(this), this.contextMenu && this.disposable.push(vt(this, this.contextMenuOption)), this.draggable && _t(this), this.allowUndo && kt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2327
2332
|
},
|
|
2328
2333
|
destroy() {
|
|
2329
2334
|
var e;
|
|
2330
2335
|
this.disposable.forEach((t) => t()), 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.currentNode = 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, (e = this.selection) == null || e.destroy(), this.selection = void 0;
|
|
2331
2336
|
}
|
|
2332
2337
|
};
|
|
2333
|
-
function
|
|
2338
|
+
function fo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: u }) {
|
|
2334
2339
|
let d = t + n / 2;
|
|
2335
2340
|
const a = e + o / 2;
|
|
2336
2341
|
let f;
|
|
2337
|
-
|
|
2338
|
-
const g = s +
|
|
2339
|
-
return
|
|
2342
|
+
l === C.LHS ? f = i + r : f = i;
|
|
2343
|
+
const g = s + c / 2, m = (1 - Math.abs(g - a) / u) * 0.25 * (n / 2);
|
|
2344
|
+
return l === C.LHS ? d = d - n / 10 - m : d = d + n / 10 + m, `M ${d} ${a} Q ${d} ${g} ${f} ${g}`;
|
|
2340
2345
|
}
|
|
2341
|
-
function
|
|
2346
|
+
function po({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: u }) {
|
|
2342
2347
|
const d = parseInt(this.mindElixirBox.style.getPropertyValue("--gap"));
|
|
2343
2348
|
let a = 0, f = 0;
|
|
2344
2349
|
u ? a = e + o / 2 : a = e + o;
|
|
2345
|
-
const g = s +
|
|
2350
|
+
const g = s + c;
|
|
2346
2351
|
let p = 0, m = 0, h = 0;
|
|
2347
2352
|
const v = Math.abs(a - g) / 300 * d;
|
|
2348
|
-
return
|
|
2353
|
+
return l === C.LHS ? (h = t, p = h + d, m = h - d, f = i + d, `M ${p} ${a} C ${h} ${a} ${h + v} ${g} ${m} ${g} H ${f}`) : (h = t + n, p = h - d, m = h + d, f = i + r - d, `M ${p} ${a} C ${h} ${a} ${h - v} ${g} ${m} ${g} H ${f}`);
|
|
2349
2354
|
}
|
|
2350
|
-
const
|
|
2351
|
-
function
|
|
2355
|
+
const mo = "4.3.6", U = document;
|
|
2356
|
+
function A({
|
|
2352
2357
|
el: e,
|
|
2353
2358
|
direction: t,
|
|
2354
2359
|
locale: n,
|
|
@@ -2356,8 +2361,8 @@ function T({
|
|
|
2356
2361
|
editable: s,
|
|
2357
2362
|
contextMenu: i,
|
|
2358
2363
|
contextMenuOption: r,
|
|
2359
|
-
toolBar:
|
|
2360
|
-
keypress:
|
|
2364
|
+
toolBar: c,
|
|
2365
|
+
keypress: l,
|
|
2361
2366
|
mouseSelectionButton: u,
|
|
2362
2367
|
selectionContainer: d,
|
|
2363
2368
|
before: a,
|
|
@@ -2372,27 +2377,29 @@ function T({
|
|
|
2372
2377
|
const b = Object.prototype.toString.call(e);
|
|
2373
2378
|
if (b === "[object HTMLDivElement]" ? y = e : b === "[object String]" && (y = document.querySelector(e)), !y)
|
|
2374
2379
|
throw new Error("MindElixir: el is not a valid element");
|
|
2375
|
-
y.className += " mind-elixir", y.innerHTML = "", this.mindElixirBox = y, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar =
|
|
2380
|
+
y.className += " mind-elixir", y.innerHTML = "", 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 = u || 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 = h || !1, this.bus = rt.create(), this.container = U.createElement("div"), this.selectionContainer = d || this.container, this.container.className = "map-container";
|
|
2376
2381
|
const x = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2377
|
-
this.theme = v || (x.matches ?
|
|
2378
|
-
const w =
|
|
2379
|
-
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes =
|
|
2382
|
+
this.theme = v || (x.matches ? He : Pe);
|
|
2383
|
+
const w = U.createElement("div");
|
|
2384
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = U.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = Y("lines"), this.summarySvg = Y("summary"), this.linkController = Y("linkcontroller"), this.P2 = U.createElement("div"), this.P3 = U.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = be(), this.line2 = be(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = Y("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : it(this);
|
|
2380
2385
|
}
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2386
|
+
A.prototype = uo;
|
|
2387
|
+
A.LEFT = L;
|
|
2388
|
+
A.RIGHT = $;
|
|
2389
|
+
A.SIDE = re;
|
|
2390
|
+
A.THEME = Pe;
|
|
2391
|
+
A.DARK_THEME = He;
|
|
2392
|
+
A.version = mo;
|
|
2393
|
+
A.E = N;
|
|
2394
|
+
A.new = (e) => ({
|
|
2390
2395
|
nodeData: {
|
|
2391
|
-
id:
|
|
2396
|
+
id: X(),
|
|
2392
2397
|
topic: e || "new topic",
|
|
2393
2398
|
children: []
|
|
2394
2399
|
}
|
|
2395
2400
|
});
|
|
2401
|
+
A.dragMoveHelper = _;
|
|
2396
2402
|
export {
|
|
2397
|
-
|
|
2403
|
+
C as DirectionClass,
|
|
2404
|
+
A as default
|
|
2398
2405
|
};
|