mind-elixir 3.3.2 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/MindElixir.iife.js +9 -9
- package/dist/MindElixir.js +899 -944
- package/dist/MindElixirLite.iife.js +8 -8
- package/dist/MindElixirLite.js +923 -940
- package/dist/example.iife.js +3 -2
- package/dist/example.js +171 -36
- package/dist/types/arrow.d.ts +31 -0
- package/dist/types/const.d.ts +0 -1
- package/dist/types/docs.d.ts +3 -3
- package/dist/types/exampleData/1.cn.d.ts +1 -1
- package/dist/types/exampleData/htmlText.d.ts +3 -0
- package/dist/types/index.d.ts +17 -18
- package/dist/types/interact.d.ts +1 -8
- package/dist/types/methods.d.ts +16 -18
- package/dist/types/nodeOperation.d.ts +6 -144
- package/dist/types/plugin/exportImage.d.ts +2 -2
- package/dist/types/types/dom.d.ts +3 -3
- package/dist/types/types/index.d.ts +14 -10
- package/dist/types/utils/domManipulation.d.ts +3 -2
- package/dist/types/utils/generateBranch.d.ts +22 -0
- package/dist/types/utils/objectManipulation.d.ts +2 -5
- package/dist/types/utils/pubsub.d.ts +20 -13
- package/dist/types/utils/svg.d.ts +1 -2
- package/package.json +1 -1
- package/readme.md +2 -1
- package/dist/types/customLink.d.ts +0 -34
package/dist/MindElixirLite.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--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::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.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;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);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 var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.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);line-height:1.2em}.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;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>div,.map-container me-tpc>span,.map-container me-tpc>img{pointer-events:none}.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 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block}.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;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.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(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
(function(
|
|
3
|
-
var e, n, i, s, o, 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 (c && !
|
|
5
|
-
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--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::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.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);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.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-main>me-wrapper>me-parent>me-tpc #input-box{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;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>div,.map-container me-tpc>span,.map-container me-tpc>img{pointer-events:none}.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 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.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(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
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 (c && !e.__iconfont__svg__cssinject__) {
|
|
5
|
+
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
7
7
|
document.write(
|
|
8
8
|
"<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>"
|
|
@@ -11,26 +11,26 @@
|
|
|
11
11
|
console && console.log(h);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
14
|
+
function d() {
|
|
15
|
+
i || (i = !0, o());
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
var h,
|
|
19
|
-
(
|
|
20
|
-
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(
|
|
21
|
-
document.removeEventListener("DOMContentLoaded", n, !1),
|
|
22
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (
|
|
17
|
+
t = function() {
|
|
18
|
+
var h, u, a, p;
|
|
19
|
+
(p = document.createElement("div")).innerHTML = l, l = null, (a = p.getElementsByTagName("svg")[0]) && (a.setAttribute("aria-hidden", "true"), a.style.position = "absolute", a.style.width = 0, a.style.height = 0, a.style.overflow = "hidden", h = a, (u = document.body).firstChild ? (p = h, (a = u.firstChild).parentNode.insertBefore(p, a)) : u.appendChild(h));
|
|
20
|
+
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
21
|
+
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
22
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
|
|
23
23
|
try {
|
|
24
24
|
s.documentElement.doScroll("left");
|
|
25
25
|
} catch {
|
|
26
26
|
return void setTimeout(r, 50);
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
d();
|
|
29
29
|
})(), s.onreadystatechange = function() {
|
|
30
|
-
s.readyState == "complete" && (s.onreadystatechange = null,
|
|
30
|
+
s.readyState == "complete" && (s.onreadystatechange = null, d());
|
|
31
31
|
});
|
|
32
32
|
})(window);
|
|
33
|
-
const j = 0,
|
|
33
|
+
const j = 0, Q = 1, Z = 2, N = 30, me = {
|
|
34
34
|
name: "Latte",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
36
36
|
cssVar: {
|
|
@@ -42,7 +42,7 @@ const j = 0, ee = 1, Q = 2, k = 30, S = 8, ge = {
|
|
|
42
42
|
"--panel-bgcolor": "#ffffff",
|
|
43
43
|
"--panel-border-color": "#eaeaea"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, ge = {
|
|
46
46
|
name: "Dark",
|
|
47
47
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
48
48
|
cssVar: {
|
|
@@ -55,498 +55,471 @@ const j = 0, ee = 1, Q = 2, k = 30, S = 8, ge = {
|
|
|
55
55
|
"--panel-border-color": "#696969"
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
function
|
|
59
|
-
return
|
|
58
|
+
function se(e) {
|
|
59
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
return
|
|
64
|
-
if (
|
|
65
|
-
for (let n = 0; n <
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
61
|
+
const X = function(e, t) {
|
|
62
|
+
if (t.id === e)
|
|
63
|
+
return t;
|
|
64
|
+
if (t.children && t.children.length) {
|
|
65
|
+
for (let n = 0; n < t.children.length; n++) {
|
|
66
|
+
const o = X(e, t.children[n]);
|
|
67
|
+
if (o)
|
|
68
|
+
return o;
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
} else
|
|
72
72
|
return null;
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
75
|
-
for (let n = 0; n <
|
|
76
|
-
|
|
73
|
+
}, ee = (e, t) => {
|
|
74
|
+
if (e.parent = t, e.children)
|
|
75
|
+
for (let n = 0; n < e.children.length; n++)
|
|
76
|
+
ee(e.children[n], e);
|
|
77
77
|
};
|
|
78
|
-
function
|
|
79
|
-
const s =
|
|
80
|
-
let r = Math.atan(Math.abs(s) / Math.abs(
|
|
81
|
-
|
|
82
|
-
const l = 15, c = 30,
|
|
78
|
+
function ve(e, t, n, o) {
|
|
79
|
+
const s = o - t, i = e - n;
|
|
80
|
+
let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
|
|
81
|
+
i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
|
|
82
|
+
const l = 15, c = 30, d = r + c, h = r - c;
|
|
83
83
|
return {
|
|
84
|
-
x1: n + Math.cos(Math.PI *
|
|
85
|
-
y1:
|
|
84
|
+
x1: n + Math.cos(Math.PI * d / 180) * l,
|
|
85
|
+
y1: o - Math.sin(Math.PI * d / 180) * l,
|
|
86
86
|
x2: n + Math.cos(Math.PI * h / 180) * l,
|
|
87
|
-
y2:
|
|
87
|
+
y2: o - Math.sin(Math.PI * h / 180) * l
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function te() {
|
|
91
91
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
const
|
|
93
|
+
const Ne = function() {
|
|
94
|
+
const e = te();
|
|
95
95
|
return {
|
|
96
96
|
topic: this.newTopicName,
|
|
97
|
-
id:
|
|
97
|
+
id: e
|
|
98
98
|
};
|
|
99
|
-
},
|
|
100
|
-
let n = 0,
|
|
101
|
-
for (;
|
|
102
|
-
n +=
|
|
103
|
-
return { offsetLeft: n, offsetTop:
|
|
104
|
-
},
|
|
105
|
-
for (const n in
|
|
106
|
-
|
|
107
|
-
},
|
|
99
|
+
}, O = (e, t) => {
|
|
100
|
+
let n = 0, o = 0;
|
|
101
|
+
for (; t && t !== e; )
|
|
102
|
+
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
103
|
+
return { offsetLeft: n, offsetTop: o };
|
|
104
|
+
}, _ = (e, t) => {
|
|
105
|
+
for (const n in t)
|
|
106
|
+
e.setAttribute(n, t[n]);
|
|
107
|
+
}, ie = (e) => e ? e.tagName === "ME-TPC" : !1, $ = {
|
|
108
108
|
moved: !1,
|
|
109
109
|
// diffrentiate click and move
|
|
110
110
|
mousedown: !1,
|
|
111
|
-
onMove(
|
|
111
|
+
onMove(e, t) {
|
|
112
112
|
if (this.mousedown) {
|
|
113
113
|
this.moved = !0;
|
|
114
|
-
const n =
|
|
115
|
-
|
|
114
|
+
const n = e.movementX, o = e.movementY;
|
|
115
|
+
t.scrollTo(t.scrollLeft - n, t.scrollTop - o);
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
118
|
clear() {
|
|
119
119
|
this.moved = !1, this.mousedown = !1;
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
var
|
|
125
|
-
if (
|
|
122
|
+
function $e(e) {
|
|
123
|
+
e.map.addEventListener("click", (t) => {
|
|
124
|
+
var o, s;
|
|
125
|
+
if (t.button !== 0)
|
|
126
126
|
return;
|
|
127
|
-
if ((
|
|
128
|
-
|
|
127
|
+
if ((o = e.helper1) != null && o.moved) {
|
|
128
|
+
e.helper1.clear();
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
if ((s =
|
|
132
|
-
|
|
131
|
+
if ((s = e.helper2) != null && s.moved) {
|
|
132
|
+
e.helper2.clear();
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
if (
|
|
136
|
-
|
|
135
|
+
if ($.moved) {
|
|
136
|
+
$.clear();
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
|
-
|
|
140
|
-
const n =
|
|
139
|
+
e.clearSelection();
|
|
140
|
+
const n = t.target;
|
|
141
141
|
if (n.tagName === "ME-EPD")
|
|
142
|
-
|
|
143
|
-
else if (
|
|
144
|
-
|
|
142
|
+
e.expandNode(n.previousSibling);
|
|
143
|
+
else if (e.editable)
|
|
144
|
+
ie(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectArrow(n.parentElement) : e.selectSummary(n.parentElement) : n.className;
|
|
145
145
|
else
|
|
146
146
|
return;
|
|
147
|
-
}),
|
|
148
|
-
if (
|
|
147
|
+
}), e.map.addEventListener("dblclick", (t) => {
|
|
148
|
+
if (t.preventDefault(), !e.editable)
|
|
149
149
|
return;
|
|
150
|
-
const n =
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
|
|
154
|
-
}),
|
|
155
|
-
const n =
|
|
156
|
-
|
|
157
|
-
}),
|
|
158
|
-
const n =
|
|
159
|
-
|
|
160
|
-
}),
|
|
161
|
-
const n =
|
|
162
|
-
|
|
163
|
-
}),
|
|
164
|
-
|
|
150
|
+
const n = t.target;
|
|
151
|
+
ie(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
152
|
+
}), e.map.addEventListener("mousemove", (t) => {
|
|
153
|
+
t.target.contentEditable !== "true" && $.onMove(t, e.container);
|
|
154
|
+
}), e.map.addEventListener("mousedown", (t) => {
|
|
155
|
+
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
156
|
+
t.button === n && t.target.contentEditable !== "true" && ($.moved = !1, $.mousedown = !0);
|
|
157
|
+
}), e.map.addEventListener("mouseleave", (t) => {
|
|
158
|
+
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
159
|
+
t.button === n && $.clear();
|
|
160
|
+
}), e.map.addEventListener("mouseup", (t) => {
|
|
161
|
+
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
162
|
+
t.button === n && $.clear();
|
|
163
|
+
}), e.map.addEventListener("contextmenu", (t) => {
|
|
164
|
+
t.preventDefault();
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const Ae = {
|
|
168
168
|
create() {
|
|
169
169
|
return {
|
|
170
170
|
handlers: {},
|
|
171
171
|
showHandler: function() {
|
|
172
172
|
console.log(this.handlers);
|
|
173
173
|
},
|
|
174
|
-
addListener: function(
|
|
175
|
-
this.handlers[
|
|
174
|
+
addListener: function(e, t) {
|
|
175
|
+
this.handlers[e] === void 0 && (this.handlers[e] = []), this.handlers[e].push(t);
|
|
176
176
|
},
|
|
177
|
-
fire: function(
|
|
178
|
-
if (this.handlers[
|
|
179
|
-
const n = this.handlers[
|
|
180
|
-
for (let
|
|
181
|
-
n[
|
|
177
|
+
fire: function(e, ...t) {
|
|
178
|
+
if (this.handlers[e] instanceof Array) {
|
|
179
|
+
const n = this.handlers[e];
|
|
180
|
+
for (let o = 0; o < n.length; o++)
|
|
181
|
+
n[o](...t);
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
|
-
removeListener: function(
|
|
185
|
-
if (!this.handlers[
|
|
184
|
+
removeListener: function(e, t) {
|
|
185
|
+
if (!this.handlers[e])
|
|
186
186
|
return;
|
|
187
|
-
const n = this.handlers[
|
|
188
|
-
if (!
|
|
187
|
+
const n = this.handlers[e];
|
|
188
|
+
if (!t)
|
|
189
189
|
n.length = 0;
|
|
190
190
|
else if (n.length)
|
|
191
|
-
for (let
|
|
192
|
-
n[
|
|
191
|
+
for (let o = 0; o < n.length; o++)
|
|
192
|
+
n[o] === t && this.handlers[e].splice(o, 1);
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
},
|
|
196
|
+
}, G = document, ke = function() {
|
|
197
197
|
console.time("layout"), this.nodes.innerHTML = "";
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
|
|
198
|
+
const e = this.createTopic(this.nodeData);
|
|
199
|
+
ye(e, this.nodeData), e.draggable = !1;
|
|
200
|
+
const t = G.createElement("me-root");
|
|
201
|
+
t.appendChild(e);
|
|
202
202
|
const n = this.nodeData.children || [];
|
|
203
|
-
if (this.direction ===
|
|
204
|
-
let
|
|
205
|
-
n.map((
|
|
206
|
-
|
|
203
|
+
if (this.direction === Z) {
|
|
204
|
+
let o = 0, s = 0;
|
|
205
|
+
n.map((i) => {
|
|
206
|
+
i.direction === j ? o += 1 : i.direction === Q ? s += 1 : o <= s ? (i.direction = j, o += 1) : (i.direction = Q, s += 1);
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
const s =
|
|
209
|
+
De(this, n, t), console.timeEnd("layout");
|
|
210
|
+
}, De = function(e, t, n) {
|
|
211
|
+
const o = G.createElement("me-main");
|
|
212
|
+
o.className = "lhs";
|
|
213
|
+
const s = G.createElement("me-main");
|
|
214
214
|
s.className = "rhs";
|
|
215
|
-
for (let
|
|
216
|
-
const r =
|
|
217
|
-
|
|
215
|
+
for (let i = 0; i < t.length; i++) {
|
|
216
|
+
const r = t[i], { grp: l } = e.createWrapper(r);
|
|
217
|
+
e.direction === Z ? r.direction === j ? o.appendChild(l) : s.appendChild(l) : e.direction === j ? o.appendChild(l) : s.appendChild(l);
|
|
218
218
|
}
|
|
219
|
-
|
|
220
|
-
}, He = function(
|
|
221
|
-
const n =
|
|
222
|
-
for (let
|
|
223
|
-
const s =
|
|
224
|
-
n.appendChild(
|
|
219
|
+
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
220
|
+
}, He = function(e, t) {
|
|
221
|
+
const n = G.createElement("me-children");
|
|
222
|
+
for (let o = 0; o < t.length; o++) {
|
|
223
|
+
const s = t[o], { grp: i } = e.createWrapper(s);
|
|
224
|
+
n.appendChild(i);
|
|
225
225
|
}
|
|
226
226
|
return n;
|
|
227
|
-
},
|
|
228
|
-
const
|
|
229
|
-
if (!
|
|
230
|
-
throw new Error(`FindEle: Node ${
|
|
231
|
-
return
|
|
232
|
-
},
|
|
233
|
-
if (
|
|
234
|
-
|
|
227
|
+
}, C = document, S = (e, t) => {
|
|
228
|
+
const o = (t ? t.mindElixirBox : C).querySelector(`[data-nodeid=me${e}]`);
|
|
229
|
+
if (!o)
|
|
230
|
+
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
231
|
+
return o;
|
|
232
|
+
}, ye = function(e, t) {
|
|
233
|
+
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) {
|
|
234
|
+
e.innerHTML = t.dangerouslySetInnerHTML;
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (t.image) {
|
|
238
|
+
const n = t.image;
|
|
235
239
|
if (n.url && n.width && n.height) {
|
|
236
|
-
const
|
|
237
|
-
|
|
240
|
+
const o = C.createElement("img");
|
|
241
|
+
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", e.appendChild(o), e.image = o;
|
|
238
242
|
} else
|
|
239
243
|
console.warn("image url/width/height are required");
|
|
240
244
|
} else
|
|
241
|
-
|
|
245
|
+
e.image && (e.image = void 0);
|
|
242
246
|
{
|
|
243
|
-
const n =
|
|
244
|
-
n.className = "text", n.textContent =
|
|
247
|
+
const n = C.createElement("span");
|
|
248
|
+
n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
|
|
245
249
|
}
|
|
246
|
-
if (
|
|
247
|
-
const n =
|
|
248
|
-
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href =
|
|
250
|
+
if (t.hyperLink) {
|
|
251
|
+
const n = C.createElement("a");
|
|
252
|
+
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n;
|
|
249
253
|
} else
|
|
250
|
-
|
|
251
|
-
if (
|
|
252
|
-
const n =
|
|
253
|
-
n.className = "icons", n.innerHTML =
|
|
254
|
+
e.linkContainer && (e.linkContainer = void 0);
|
|
255
|
+
if (t.icons && t.icons.length) {
|
|
256
|
+
const n = C.createElement("span");
|
|
257
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${se(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
254
258
|
} else
|
|
255
|
-
|
|
256
|
-
if (
|
|
257
|
-
const n =
|
|
258
|
-
n.className = "tags", n.innerHTML =
|
|
259
|
+
e.icons && (e.icons = void 0);
|
|
260
|
+
if (t.tags && t.tags.length) {
|
|
261
|
+
const n = C.createElement("div");
|
|
262
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${se(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
259
263
|
} else
|
|
260
|
-
|
|
261
|
-
}, Pe = function(
|
|
262
|
-
const n =
|
|
263
|
-
if (n.appendChild(
|
|
264
|
-
const
|
|
265
|
-
if (
|
|
266
|
-
const r = He(this,
|
|
264
|
+
e.tags && (e.tags = void 0);
|
|
265
|
+
}, Pe = function(e, t) {
|
|
266
|
+
const n = C.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
267
|
+
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
268
|
+
const i = qe(e.expanded);
|
|
269
|
+
if (o.appendChild(i), e.expanded !== !1) {
|
|
270
|
+
const r = He(this, e.children);
|
|
267
271
|
n.appendChild(r);
|
|
268
272
|
}
|
|
269
273
|
}
|
|
270
|
-
return { grp: n, top:
|
|
271
|
-
}, Be = function(
|
|
272
|
-
const
|
|
273
|
-
return
|
|
274
|
-
}, ze = function(
|
|
275
|
-
const
|
|
276
|
-
return
|
|
277
|
-
},
|
|
278
|
-
const
|
|
279
|
-
return
|
|
274
|
+
return { grp: n, top: o, tpc: s };
|
|
275
|
+
}, Be = function(e) {
|
|
276
|
+
const t = C.createElement("me-parent"), n = this.createTopic(e);
|
|
277
|
+
return ye(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
278
|
+
}, ze = function(e) {
|
|
279
|
+
const t = C.createElement("me-children");
|
|
280
|
+
return t.append(...e), t;
|
|
281
|
+
}, je = function(e) {
|
|
282
|
+
const t = C.createElement("me-tpc");
|
|
283
|
+
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
280
284
|
};
|
|
281
|
-
function
|
|
282
|
-
const
|
|
283
|
-
|
|
285
|
+
function be(e) {
|
|
286
|
+
const t = C.createRange();
|
|
287
|
+
t.selectNodeContents(e);
|
|
284
288
|
const n = window.getSelection();
|
|
285
|
-
n && (n.removeAllRanges(), n.addRange(
|
|
289
|
+
n && (n.removeAllRanges(), n.addRange(t));
|
|
286
290
|
}
|
|
287
|
-
const
|
|
288
|
-
if (console.time("editTopic"), !
|
|
291
|
+
const Oe = function(e) {
|
|
292
|
+
if (console.time("editTopic"), !e)
|
|
289
293
|
return;
|
|
290
|
-
const
|
|
291
|
-
|
|
294
|
+
const t = C.createElement("div"), n = e.text.textContent;
|
|
295
|
+
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === j && (t.style.right = "0"), t.focus(), be(t), this.bus.fire("operation", {
|
|
292
296
|
name: "beginEdit",
|
|
293
|
-
obj:
|
|
294
|
-
}),
|
|
295
|
-
|
|
296
|
-
const s =
|
|
297
|
+
obj: e.nodeObj
|
|
298
|
+
}), t.addEventListener("keydown", (o) => {
|
|
299
|
+
o.stopPropagation();
|
|
300
|
+
const s = o.key;
|
|
297
301
|
if (s === "Enter" || s === "Tab") {
|
|
298
|
-
if (
|
|
302
|
+
if (o.shiftKey)
|
|
299
303
|
return;
|
|
300
|
-
|
|
304
|
+
o.preventDefault(), t == null || t.blur(), this.map.focus();
|
|
301
305
|
}
|
|
302
|
-
}),
|
|
303
|
-
var
|
|
304
|
-
if (!
|
|
306
|
+
}), t.addEventListener("blur", () => {
|
|
307
|
+
var i;
|
|
308
|
+
if (!t)
|
|
305
309
|
return;
|
|
306
|
-
const
|
|
307
|
-
console.log(s), s === "" ?
|
|
310
|
+
const o = e.nodeObj, s = ((i = t.textContent) == null ? void 0 : i.trim()) || "";
|
|
311
|
+
console.log(s), s === "" ? o.topic = n : o.topic = s, t.remove(), s !== n && (e.text.textContent = o.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
308
312
|
name: "finishEdit",
|
|
309
|
-
obj:
|
|
313
|
+
obj: o,
|
|
310
314
|
origin: n
|
|
311
315
|
}));
|
|
312
316
|
}), console.timeEnd("editTopic");
|
|
313
|
-
}, qe = function(
|
|
314
|
-
const
|
|
315
|
-
return
|
|
316
|
-
},
|
|
317
|
-
const
|
|
318
|
-
return
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
317
|
+
}, qe = function(e) {
|
|
318
|
+
const t = C.createElement("me-epd");
|
|
319
|
+
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
320
|
+
}, B = document, z = "http://www.w3.org/2000/svg", xe = function(e, t, n) {
|
|
321
|
+
const o = B.createElementNS(z, "path");
|
|
322
|
+
return _(o, {
|
|
323
|
+
d: e,
|
|
324
|
+
stroke: t || "#666",
|
|
325
|
+
fill: "none",
|
|
326
|
+
"stroke-width": n
|
|
327
|
+
}), o;
|
|
328
|
+
}, V = function(e) {
|
|
329
|
+
const t = B.createElementNS(z, "svg");
|
|
330
|
+
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
331
|
+
}, re = function() {
|
|
332
|
+
const e = B.createElementNS(z, "line");
|
|
333
|
+
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
334
|
+
}, Re = function(e, t) {
|
|
329
335
|
const n = {
|
|
330
336
|
stroke: "rgb(235, 95, 82)",
|
|
331
337
|
fill: "none",
|
|
332
338
|
"stroke-linecap": "cap",
|
|
333
339
|
"stroke-width": "2"
|
|
334
|
-
},
|
|
335
|
-
return
|
|
336
|
-
d: e,
|
|
337
|
-
...n
|
|
338
|
-
}), w(s, {
|
|
340
|
+
}, o = B.createElementNS(z, "g"), s = B.createElementNS(z, "path"), i = B.createElementNS(z, "path");
|
|
341
|
+
return _(i, {
|
|
339
342
|
d: t,
|
|
343
|
+
...n
|
|
344
|
+
}), _(s, {
|
|
345
|
+
d: e,
|
|
340
346
|
...n,
|
|
341
347
|
"stroke-dasharray": "8,2"
|
|
342
|
-
}),
|
|
343
|
-
}, we = function(
|
|
344
|
-
if (console.time("editSummary"), !
|
|
348
|
+
}), o.appendChild(s), o.appendChild(i), o;
|
|
349
|
+
}, we = function(e, t, n) {
|
|
350
|
+
if (console.time("editSummary"), !t)
|
|
345
351
|
return;
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
const s =
|
|
349
|
-
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
const l =
|
|
353
|
-
l === "end" ?
|
|
352
|
+
const o = document.createElement("div");
|
|
353
|
+
e.nodes.appendChild(o);
|
|
354
|
+
const s = t.innerHTML;
|
|
355
|
+
o.id = "input-box", o.textContent = s, o.contentEditable = "true", o.spellcheck = !1;
|
|
356
|
+
const i = t.getAttribute("x") + "px", r = t.getAttribute("y") + "px";
|
|
357
|
+
o.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${i};top:${r};`;
|
|
358
|
+
const l = t.getAttribute("text-anchor");
|
|
359
|
+
l === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : l === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(), be(o), o.addEventListener("keydown", (c) => {
|
|
354
360
|
c.stopPropagation();
|
|
355
|
-
const
|
|
356
|
-
if (
|
|
361
|
+
const d = c.key;
|
|
362
|
+
if (d === "Enter" || d === "Tab") {
|
|
357
363
|
if (c.shiftKey)
|
|
358
364
|
return;
|
|
359
|
-
c.preventDefault(),
|
|
365
|
+
c.preventDefault(), o.blur(), e.map.focus();
|
|
360
366
|
}
|
|
361
|
-
}),
|
|
362
|
-
|
|
367
|
+
}), o.addEventListener("blur", () => {
|
|
368
|
+
o && n(o);
|
|
363
369
|
}), console.timeEnd("editSummary");
|
|
364
|
-
}
|
|
365
|
-
let _e = Ce;
|
|
366
|
-
const Fe = function(t) {
|
|
370
|
+
}, Ve = function(e) {
|
|
367
371
|
console.time("linkDiv");
|
|
368
|
-
const
|
|
369
|
-
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 -
|
|
372
|
+
const t = this.map.querySelector("me-root");
|
|
373
|
+
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
|
|
370
374
|
const n = this.map.querySelectorAll("me-main > me-wrapper");
|
|
371
|
-
this.lines.innerHTML = ""
|
|
372
|
-
for (let
|
|
373
|
-
const s = n[
|
|
374
|
-
let c =
|
|
375
|
-
const
|
|
375
|
+
this.lines.innerHTML = "";
|
|
376
|
+
for (let o = 0; o < n.length; o++) {
|
|
377
|
+
const s = n[o], i = s.querySelector("me-tpc"), r = s.firstChild, l = s.parentNode.className;
|
|
378
|
+
let c = t.offsetLeft + t.offsetWidth / 2;
|
|
379
|
+
const d = t.offsetTop + t.offsetHeight / 2;
|
|
376
380
|
let h;
|
|
377
|
-
const
|
|
378
|
-
l === "lhs" ? h =
|
|
379
|
-
const p =
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
this.lines.appendChild(Ve(m, a));
|
|
388
|
-
const v = s.children[0].children[1];
|
|
389
|
-
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(t && t !== s) && s.childElementCount) {
|
|
390
|
-
const y = W("subLines"), x = s.lastChild;
|
|
391
|
-
x.tagName === "svg" && x.remove(), s.appendChild(y);
|
|
392
|
-
const E = s.firstChild, C = s.children[1].children, F = Ee(C, E, l, !0);
|
|
393
|
-
y.appendChild(Re(F, a));
|
|
381
|
+
const { offsetLeft: u, offsetTop: a } = O(this.nodes, r);
|
|
382
|
+
l === "lhs" ? h = u + r.offsetWidth : h = u;
|
|
383
|
+
const p = a + r.offsetHeight / 2, f = (1 - Math.abs(p - s.parentElement.offsetTop - s.parentElement.offsetHeight / 2) / s.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
|
|
384
|
+
l === "lhs" ? c = c - t.offsetWidth / 10 - f : c = c + t.offsetWidth / 10 + f;
|
|
385
|
+
const m = this.generateMainBranch({ x1: c, y1: d, x2: h, y2: p, direction: l }), v = this.theme.palette, y = i.nodeObj.branchColor || v[o % v.length];
|
|
386
|
+
i.style.borderColor = y, this.lines.appendChild(xe(m, y, "3"));
|
|
387
|
+
const b = s.children[0].children[1];
|
|
388
|
+
if (b && (b.style.top = (b.parentNode.offsetHeight - b.offsetHeight) / 2 + "px", l === "lhs" ? b.style.left = "-10px" : b.style.right = "-10px"), !(e && e !== s) && s.childElementCount) {
|
|
389
|
+
const E = V("subLines"), w = s.lastChild;
|
|
390
|
+
w.tagName === "svg" && w.remove(), s.appendChild(E), _e(this, E, y, s, l, !0);
|
|
394
391
|
}
|
|
395
392
|
}
|
|
396
|
-
this.
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
if (m.style.bottom = -(m.offsetHeight / 2) + "px", n === "lhs" ? m.style.left = "10px" : n === "rhs" && (m.style.right = "10px"), !m.expanded)
|
|
393
|
+
this.renderArrow(), this.renderSummary(), console.timeEnd("linkDiv");
|
|
394
|
+
}, _e = function(e, t, n, o, s, i) {
|
|
395
|
+
const r = o.firstChild, l = o.children[1].children, c = r.offsetTop, d = r.offsetLeft, h = r.offsetWidth, u = r.offsetHeight;
|
|
396
|
+
for (let a = 0; a < l.length; a++) {
|
|
397
|
+
const p = l[a], g = p.firstChild, f = g.offsetTop, m = g.offsetLeft, v = g.offsetWidth, y = g.offsetHeight, b = g.firstChild.nodeObj.branchColor || n, E = e.generateSubBranch({ pT: c, pL: d, pW: h, pH: u, cT: f, cL: m, cW: v, cH: y, direction: s, isFirst: i });
|
|
398
|
+
t.appendChild(xe(E, b, "2"));
|
|
399
|
+
const w = g.children[1];
|
|
400
|
+
if (w) {
|
|
401
|
+
if (w.style.bottom = -(w.offsetHeight / 2) + "px", s === "lhs" ? w.style.left = "10px" : s === "rhs" && (w.style.right = "10px"), !w.expanded)
|
|
406
402
|
continue;
|
|
407
403
|
} else
|
|
408
404
|
continue;
|
|
409
|
-
|
|
410
|
-
v.length > 0 && (s += Ee(v, d, n));
|
|
405
|
+
p.children[1].children.length > 0 && _e(e, t, b, p, s);
|
|
411
406
|
}
|
|
412
|
-
return s;
|
|
413
407
|
};
|
|
414
|
-
|
|
415
|
-
return `M ${t} ${e} V ${i > e ? i - 20 : i + 20} C ${t} ${i} ${t} ${i} ${n > t ? t + 20 : t - 20} ${i} H ${n}`;
|
|
416
|
-
}
|
|
417
|
-
function Ye({ x1: t, y1: e, x2: n, y2: i }) {
|
|
418
|
-
return `M ${t} ${e} Q ${t} ${i} ${n} ${i}`;
|
|
419
|
-
}
|
|
420
|
-
function Xe({ pT: t, pL: e, pW: n, pH: i, cT: s, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
|
|
421
|
-
let h;
|
|
422
|
-
u ? h = t + i / 2 : h = t + i;
|
|
423
|
-
const d = s + l;
|
|
424
|
-
let a = 0, f = 0, g = 0;
|
|
425
|
-
return c === "lhs" ? (a = e + k, f = o, g = o + r) : c === "rhs" && (a = e + n - k, f = o + r, g = o), d < h + 50 && d > h - 50 ? `M ${a} ${h} H ${g} V ${d} H ${f}` : d >= h ? `M ${a} ${h} H ${g} V ${d - S} A ${S} ${S} 0 0 ${a > f ? 1 : 0} ${a > f ? g - S : g + S} ${d} H ${f}` : `M ${a} ${h} H ${g} V ${d + S} A ${S} ${S} 0 0 ${a > f ? 0 : 1} ${a > f ? g - S : g + S} ${d} H ${f}`;
|
|
426
|
-
}
|
|
427
|
-
function Ce({ pT: t, pL: e, pW: n, pH: i, cT: s, cL: o, cW: r, cH: l, direction: c, isFirst: u }) {
|
|
428
|
-
let h = 0, d = 0;
|
|
429
|
-
u ? h = t + i / 2 : h = t + i;
|
|
430
|
-
const a = s + l;
|
|
431
|
-
let f = 0, g = 0, p = 0;
|
|
432
|
-
const m = Math.min(Math.abs(h - a) / 800, 1.2) * k;
|
|
433
|
-
return c === "lhs" ? (p = e, f = p + k, g = p - k, d = o + k, `M ${f} ${h} C ${p} ${h} ${p + m} ${a} ${g} ${a} H ${d}`) : (p = e + n, f = p - k, g = p + k, d = o + r - k, `M ${f} ${h} C ${p} ${h} ${p - m} ${a} ${g} ${a} H ${d}`);
|
|
434
|
-
}
|
|
435
|
-
const A = (t, e) => {
|
|
408
|
+
const k = (e, t) => {
|
|
436
409
|
const n = document.createElement("span");
|
|
437
|
-
return n.id =
|
|
438
|
-
<use xlink:href="#icon-${
|
|
410
|
+
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
411
|
+
<use xlink:href="#icon-${t}"></use>
|
|
439
412
|
</svg>`, n;
|
|
440
413
|
};
|
|
441
|
-
function
|
|
442
|
-
const
|
|
443
|
-
return r.innerText = "100%",
|
|
444
|
-
|
|
445
|
-
}, i.onclick = () => {
|
|
446
|
-
t.toCenter();
|
|
447
|
-
}, s.onclick = () => {
|
|
448
|
-
t.scaleVal < 0.6 || t.scale(t.scaleVal -= 0.2);
|
|
414
|
+
function We(e) {
|
|
415
|
+
const t = document.createElement("div"), n = k("fullscreen", "full"), o = k("toCenter", "living"), s = k("zoomout", "move"), i = k("zoomin", "add"), r = document.createElement("span");
|
|
416
|
+
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
417
|
+
e.container.requestFullscreen();
|
|
449
418
|
}, o.onclick = () => {
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
|
|
453
|
-
function Ue(t) {
|
|
454
|
-
const e = document.createElement("div"), n = A("tbltl", "left"), i = A("tbltr", "right"), s = A("tblts", "side");
|
|
455
|
-
return e.appendChild(n), e.appendChild(i), e.appendChild(s), e.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
456
|
-
t.initLeft();
|
|
419
|
+
e.toCenter();
|
|
420
|
+
}, s.onclick = () => {
|
|
421
|
+
e.scaleVal < 0.6 || e.scale(e.scaleVal -= 0.2);
|
|
457
422
|
}, i.onclick = () => {
|
|
458
|
-
|
|
423
|
+
e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
|
|
424
|
+
}, t;
|
|
425
|
+
}
|
|
426
|
+
function Fe(e) {
|
|
427
|
+
const t = document.createElement("div"), n = k("tbltl", "left"), o = k("tbltr", "right"), s = k("tblts", "side");
|
|
428
|
+
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
429
|
+
e.initLeft();
|
|
430
|
+
}, o.onclick = () => {
|
|
431
|
+
e.initRight();
|
|
459
432
|
}, s.onclick = () => {
|
|
460
|
-
|
|
461
|
-
},
|
|
433
|
+
e.initSide();
|
|
434
|
+
}, t;
|
|
462
435
|
}
|
|
463
|
-
function
|
|
464
|
-
|
|
436
|
+
function Ie(e) {
|
|
437
|
+
e.container.append(We(e)), e.container.append(Fe(e));
|
|
465
438
|
}
|
|
466
439
|
/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
467
|
-
var
|
|
468
|
-
class
|
|
440
|
+
var Ye = Object.defineProperty, Xe = (e, t, n) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x = (e, t, n) => (Xe(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
441
|
+
class Ge {
|
|
469
442
|
constructor() {
|
|
470
|
-
|
|
443
|
+
x(this, "_listeners", /* @__PURE__ */ new Map()), x(this, "on", this.addEventListener), x(this, "off", this.removeEventListener), x(this, "emit", this.dispatchEvent);
|
|
471
444
|
}
|
|
472
|
-
addEventListener(
|
|
473
|
-
const
|
|
474
|
-
return this._listeners.set(
|
|
445
|
+
addEventListener(t, n) {
|
|
446
|
+
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
447
|
+
return this._listeners.set(t, o), o.add(n), this;
|
|
475
448
|
}
|
|
476
|
-
removeEventListener(
|
|
477
|
-
var
|
|
478
|
-
return (
|
|
449
|
+
removeEventListener(t, n) {
|
|
450
|
+
var o;
|
|
451
|
+
return (o = this._listeners.get(t)) == null || o.delete(n), this;
|
|
479
452
|
}
|
|
480
|
-
dispatchEvent(
|
|
481
|
-
let
|
|
482
|
-
for (const s of this._listeners.get(
|
|
483
|
-
|
|
484
|
-
return
|
|
453
|
+
dispatchEvent(t, ...n) {
|
|
454
|
+
let o = !0;
|
|
455
|
+
for (const s of this._listeners.get(t) ?? [])
|
|
456
|
+
o = s(...n) !== !1 && o;
|
|
457
|
+
return o;
|
|
485
458
|
}
|
|
486
459
|
unbindAllListeners() {
|
|
487
460
|
this._listeners.clear();
|
|
488
461
|
}
|
|
489
462
|
}
|
|
490
|
-
const
|
|
491
|
-
function
|
|
492
|
-
if (typeof
|
|
493
|
-
for (const [
|
|
494
|
-
s !== void 0 && (
|
|
463
|
+
const le = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
464
|
+
function M({ style: e }, t, n) {
|
|
465
|
+
if (typeof t == "object")
|
|
466
|
+
for (const [o, s] of Object.entries(t))
|
|
467
|
+
s !== void 0 && (e[o] = le(s));
|
|
495
468
|
else
|
|
496
|
-
n !== void 0 && (t
|
|
469
|
+
n !== void 0 && (e[t] = le(n));
|
|
497
470
|
}
|
|
498
|
-
function
|
|
499
|
-
return (
|
|
500
|
-
|
|
501
|
-
for (const
|
|
471
|
+
function Ee(e) {
|
|
472
|
+
return (t, n, o, s = {}) => {
|
|
473
|
+
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
474
|
+
for (const i of t)
|
|
502
475
|
for (const r of n)
|
|
503
|
-
|
|
504
|
-
return [
|
|
476
|
+
i[e](r, o, { capture: !1, ...s });
|
|
477
|
+
return [t, n, o, s];
|
|
505
478
|
};
|
|
506
479
|
}
|
|
507
|
-
const
|
|
508
|
-
var
|
|
509
|
-
const { clientX: n, clientY:
|
|
510
|
-
return { x: n, y:
|
|
480
|
+
const D = Ee("addEventListener"), T = Ee("removeEventListener"), I = (e) => {
|
|
481
|
+
var t;
|
|
482
|
+
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
483
|
+
return { x: n, y: o, target: s };
|
|
511
484
|
};
|
|
512
|
-
function
|
|
485
|
+
function ce(e, t, n = "touch") {
|
|
513
486
|
switch (n) {
|
|
514
487
|
case "center": {
|
|
515
|
-
const
|
|
516
|
-
return
|
|
488
|
+
const o = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
489
|
+
return o >= e.left && o <= e.right && s >= e.top && s <= e.bottom;
|
|
517
490
|
}
|
|
518
491
|
case "cover":
|
|
519
|
-
return
|
|
492
|
+
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
520
493
|
case "touch":
|
|
521
|
-
return
|
|
494
|
+
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
522
495
|
}
|
|
523
496
|
}
|
|
524
|
-
function
|
|
525
|
-
const n = Array.isArray(
|
|
526
|
-
let
|
|
527
|
-
for (let s = 0,
|
|
497
|
+
function H(e, t = document) {
|
|
498
|
+
const n = Array.isArray(e) ? e : [e];
|
|
499
|
+
let o = [];
|
|
500
|
+
for (let s = 0, i = n.length; s < i; s++) {
|
|
528
501
|
const r = n[s];
|
|
529
|
-
typeof r == "string" ?
|
|
502
|
+
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
530
503
|
}
|
|
531
|
-
return
|
|
504
|
+
return o;
|
|
532
505
|
}
|
|
533
|
-
const
|
|
534
|
-
let
|
|
506
|
+
const Ke = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ue = () => "safari" in window, Je = (e) => {
|
|
507
|
+
let t, n = -1, o = !1;
|
|
535
508
|
return {
|
|
536
509
|
next(...s) {
|
|
537
|
-
|
|
538
|
-
|
|
510
|
+
t = s, o || (o = !0, n = requestAnimationFrame(() => {
|
|
511
|
+
e(...t), o = !1;
|
|
539
512
|
}));
|
|
540
513
|
},
|
|
541
514
|
cancel() {
|
|
542
|
-
cancelAnimationFrame(n),
|
|
515
|
+
cancelAnimationFrame(n), o = !1;
|
|
543
516
|
}
|
|
544
517
|
};
|
|
545
|
-
}, { abs:
|
|
546
|
-
class
|
|
547
|
-
constructor(
|
|
548
|
-
var n,
|
|
549
|
-
super(),
|
|
518
|
+
}, { abs: A, max: ae, min: he, ceil: de } = Math;
|
|
519
|
+
class Qe extends Ge {
|
|
520
|
+
constructor(t) {
|
|
521
|
+
var n, o, s, i, r;
|
|
522
|
+
super(), x(this, "_options"), x(this, "_selection", {
|
|
550
523
|
stored: [],
|
|
551
524
|
selected: [],
|
|
552
525
|
touched: [],
|
|
@@ -556,7 +529,7 @@ class it extends Ze {
|
|
|
556
529
|
removed: []
|
|
557
530
|
// Removed elements since last selection
|
|
558
531
|
}
|
|
559
|
-
}),
|
|
532
|
+
}), x(this, "_area"), x(this, "_clippingElement"), x(this, "_targetElement"), x(this, "_targetRect"), x(this, "_selectables", []), x(this, "_latestElement"), x(this, "_areaRect", new DOMRect()), x(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), x(this, "_singleClick", !0), x(this, "_frame"), x(this, "_scrollAvailable", !0), x(this, "_scrollingActive", !1), x(this, "_scrollSpeed", { x: 0, y: 0 }), x(this, "_scrollDelta", { x: 0, y: 0 }), x(this, "disable", this._bindStartEvents.bind(this, !1)), x(this, "enable", this._bindStartEvents), this._options = {
|
|
560
533
|
selectionAreaClass: "selection-area",
|
|
561
534
|
selectionContainerClass: void 0,
|
|
562
535
|
selectables: [],
|
|
@@ -564,221 +537,221 @@ class it extends Ze {
|
|
|
564
537
|
startAreas: ["html"],
|
|
565
538
|
boundaries: ["html"],
|
|
566
539
|
container: "body",
|
|
567
|
-
...
|
|
540
|
+
...t,
|
|
568
541
|
behaviour: {
|
|
569
542
|
overlap: "invert",
|
|
570
543
|
intersect: "touch",
|
|
571
|
-
...
|
|
572
|
-
startThreshold: (n =
|
|
544
|
+
...t.behaviour,
|
|
545
|
+
startThreshold: (n = t.behaviour) != null && n.startThreshold ? typeof t.behaviour.startThreshold == "number" ? t.behaviour.startThreshold : { x: 10, y: 10, ...t.behaviour.startThreshold } : { x: 10, y: 10 },
|
|
573
546
|
scrolling: {
|
|
574
547
|
speedDivider: 10,
|
|
575
548
|
manualSpeed: 750,
|
|
576
|
-
...(
|
|
549
|
+
...(o = t.behaviour) == null ? void 0 : o.scrolling,
|
|
577
550
|
startScrollMargins: {
|
|
578
551
|
x: 0,
|
|
579
552
|
y: 0,
|
|
580
|
-
...(
|
|
553
|
+
...(i = (s = t.behaviour) == null ? void 0 : s.scrolling) == null ? void 0 : i.startScrollMargins
|
|
581
554
|
}
|
|
582
555
|
}
|
|
583
556
|
},
|
|
584
557
|
features: {
|
|
585
558
|
range: !0,
|
|
586
559
|
touch: !0,
|
|
587
|
-
...
|
|
560
|
+
...t.features,
|
|
588
561
|
singleTap: {
|
|
589
562
|
allow: !0,
|
|
590
563
|
intersect: "native",
|
|
591
|
-
...(r =
|
|
564
|
+
...(r = t.features) == null ? void 0 : r.singleTap
|
|
592
565
|
}
|
|
593
566
|
}
|
|
594
567
|
};
|
|
595
568
|
for (const h of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
596
569
|
typeof this[h] == "function" && (this[h] = this[h].bind(this));
|
|
597
|
-
const { document: l, selectionAreaClass: c, selectionContainerClass:
|
|
598
|
-
this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c),
|
|
570
|
+
const { document: l, selectionAreaClass: c, selectionContainerClass: d } = this._options;
|
|
571
|
+
this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), d && this._clippingElement.classList.add(d), M(this._area, {
|
|
599
572
|
willChange: "top, left, bottom, right, width, height",
|
|
600
573
|
top: 0,
|
|
601
574
|
left: 0,
|
|
602
575
|
position: "fixed"
|
|
603
|
-
}),
|
|
576
|
+
}), M(this._clippingElement, {
|
|
604
577
|
overflow: "hidden",
|
|
605
578
|
position: "fixed",
|
|
606
579
|
transform: "translate3d(0, 0, 0)",
|
|
607
580
|
// https://stackoverflow.com/a/38268846
|
|
608
581
|
pointerEvents: "none",
|
|
609
582
|
zIndex: "1"
|
|
610
|
-
}), this._frame =
|
|
583
|
+
}), this._frame = Je((h) => {
|
|
611
584
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
|
|
612
585
|
}), this.enable();
|
|
613
586
|
}
|
|
614
|
-
_bindStartEvents(
|
|
615
|
-
const { document: n, features:
|
|
616
|
-
s(n, "mousedown", this._onTapStart),
|
|
587
|
+
_bindStartEvents(t = !0) {
|
|
588
|
+
const { document: n, features: o } = this._options, s = t ? D : T;
|
|
589
|
+
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, {
|
|
617
590
|
passive: !1
|
|
618
591
|
});
|
|
619
592
|
}
|
|
620
|
-
_onTapStart(
|
|
621
|
-
const { x:
|
|
593
|
+
_onTapStart(t, n = !1) {
|
|
594
|
+
const { x: o, y: s, target: i } = I(t), { _options: r } = this, { document: l } = this._options, c = i.getBoundingClientRect(), d = H(r.startAreas, r.document), h = H(r.boundaries, r.document);
|
|
622
595
|
this._targetElement = h.find(
|
|
623
|
-
(
|
|
596
|
+
(p) => ce(p.getBoundingClientRect(), c)
|
|
624
597
|
);
|
|
625
|
-
const
|
|
626
|
-
if (!this._targetElement || !
|
|
598
|
+
const u = t.composedPath();
|
|
599
|
+
if (!this._targetElement || !d.find((p) => u.includes(p)) || !h.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
627
600
|
return;
|
|
628
|
-
this._areaLocation = { x1:
|
|
601
|
+
this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
|
|
629
602
|
const a = l.scrollingElement ?? l.body;
|
|
630
|
-
this._scrollDelta = { x: a.scrollLeft, y: a.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0),
|
|
603
|
+
this._scrollDelta = { x: a.scrollLeft, y: a.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), D(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), D(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), D(l, "scroll", this._onScroll);
|
|
631
604
|
}
|
|
632
|
-
_onSingleTap(
|
|
633
|
-
const { singleTap: { intersect: n }, range:
|
|
634
|
-
let
|
|
605
|
+
_onSingleTap(t) {
|
|
606
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, s = I(t);
|
|
607
|
+
let i;
|
|
635
608
|
if (n === "native")
|
|
636
|
-
|
|
609
|
+
i = s.target;
|
|
637
610
|
else if (n === "touch") {
|
|
638
611
|
this.resolveSelectables();
|
|
639
612
|
const { x: l, y: c } = s;
|
|
640
|
-
|
|
641
|
-
const { right: h, left:
|
|
642
|
-
return l < h && l >
|
|
613
|
+
i = this._selectables.find((d) => {
|
|
614
|
+
const { right: h, left: u, top: a, bottom: p } = d.getBoundingClientRect();
|
|
615
|
+
return l < h && l > u && c < p && c > a;
|
|
643
616
|
});
|
|
644
617
|
}
|
|
645
|
-
if (!
|
|
618
|
+
if (!i)
|
|
646
619
|
return;
|
|
647
|
-
for (this.resolveSelectables(); !this._selectables.includes(
|
|
648
|
-
if (!
|
|
620
|
+
for (this.resolveSelectables(); !this._selectables.includes(i); ) {
|
|
621
|
+
if (!i.parentElement)
|
|
649
622
|
return;
|
|
650
|
-
|
|
623
|
+
i = i.parentElement;
|
|
651
624
|
}
|
|
652
625
|
const { stored: r } = this._selection;
|
|
653
|
-
if (this._emitEvent("start",
|
|
654
|
-
const l = this._latestElement, [c,
|
|
655
|
-
(
|
|
656
|
-
), c,
|
|
626
|
+
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
627
|
+
const l = this._latestElement, [c, d] = l.compareDocumentPosition(i) & 4 ? [i, l] : [l, i], h = [...this._selectables.filter(
|
|
628
|
+
(u) => u.compareDocumentPosition(c) & 4 && u.compareDocumentPosition(d) & 2
|
|
629
|
+
), c, d];
|
|
657
630
|
this.select(h), this._latestElement = l;
|
|
658
631
|
} else
|
|
659
|
-
r.includes(
|
|
660
|
-
this._emitEvent("stop",
|
|
632
|
+
r.includes(i) && (r.length === 1 || t.ctrlKey || r.every((l) => this._selection.stored.includes(l))) ? this.deselect(i) : (this.select(i), this._latestElement = i);
|
|
633
|
+
this._emitEvent("stop", t);
|
|
661
634
|
}
|
|
662
|
-
_delayedTapMove(
|
|
663
|
-
const { container: n, document:
|
|
635
|
+
_delayedTapMove(t) {
|
|
636
|
+
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: l, y: c } = I(t);
|
|
664
637
|
if (
|
|
665
638
|
// Single number for both coordinates
|
|
666
|
-
typeof s == "number" &&
|
|
667
|
-
typeof s == "object" &&
|
|
639
|
+
typeof s == "number" && A(l + c - (i + r)) >= s || // Different x and y threshold
|
|
640
|
+
typeof s == "object" && A(l - i) >= s.x || A(c - r) >= s.y
|
|
668
641
|
) {
|
|
669
|
-
if (T(
|
|
670
|
-
T(
|
|
642
|
+
if (T(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
643
|
+
T(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
671
644
|
return;
|
|
672
645
|
}
|
|
673
|
-
|
|
646
|
+
D(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), M(this._area, "display", "block"), H(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(o, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
674
647
|
}
|
|
675
|
-
this._handleMoveEvent(
|
|
648
|
+
this._handleMoveEvent(t);
|
|
676
649
|
}
|
|
677
650
|
_setupSelectionArea() {
|
|
678
|
-
const { _clippingElement:
|
|
679
|
-
this._scrollAvailable ? (
|
|
651
|
+
const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
652
|
+
this._scrollAvailable ? (M(t, {
|
|
680
653
|
top: s.top,
|
|
681
654
|
left: s.left,
|
|
682
655
|
width: s.width,
|
|
683
656
|
height: s.height
|
|
684
|
-
}),
|
|
657
|
+
}), M(o, {
|
|
685
658
|
marginTop: -s.top,
|
|
686
659
|
marginLeft: -s.left
|
|
687
|
-
})) : (
|
|
660
|
+
})) : (M(t, {
|
|
688
661
|
top: 0,
|
|
689
662
|
left: 0,
|
|
690
663
|
width: "100%",
|
|
691
664
|
height: "100%"
|
|
692
|
-
}),
|
|
665
|
+
}), M(o, {
|
|
693
666
|
marginTop: 0,
|
|
694
667
|
marginLeft: 0
|
|
695
668
|
}));
|
|
696
669
|
}
|
|
697
|
-
_onTapMove(
|
|
698
|
-
const { x: n, y:
|
|
699
|
-
if (
|
|
670
|
+
_onTapMove(t) {
|
|
671
|
+
const { x: n, y: o } = I(t), { _scrollSpeed: s, _areaLocation: i, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, d = this._targetElement;
|
|
672
|
+
if (i.x2 = n, i.y2 = o, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
|
|
700
673
|
this._scrollingActive = !0;
|
|
701
674
|
const h = () => {
|
|
702
675
|
if (!s.x && !s.y) {
|
|
703
676
|
this._scrollingActive = !1;
|
|
704
677
|
return;
|
|
705
678
|
}
|
|
706
|
-
const { scrollTop:
|
|
707
|
-
s.y && (
|
|
679
|
+
const { scrollTop: u, scrollLeft: a } = d;
|
|
680
|
+
s.y && (d.scrollTop += de(s.y / c), i.y1 -= d.scrollTop - u), s.x && (d.scrollLeft += de(s.x / c), i.x1 -= d.scrollLeft - a), l.next(t), requestAnimationFrame(h);
|
|
708
681
|
};
|
|
709
682
|
requestAnimationFrame(h);
|
|
710
683
|
} else
|
|
711
|
-
l.next(
|
|
712
|
-
this._handleMoveEvent(
|
|
684
|
+
l.next(t);
|
|
685
|
+
this._handleMoveEvent(t);
|
|
713
686
|
}
|
|
714
|
-
_handleMoveEvent(
|
|
687
|
+
_handleMoveEvent(t) {
|
|
715
688
|
const { features: n } = this._options;
|
|
716
|
-
(n.touch &&
|
|
689
|
+
(n.touch && Ke() || this._scrollAvailable && Ue()) && t.preventDefault();
|
|
717
690
|
}
|
|
718
691
|
_onScroll() {
|
|
719
|
-
const { _scrollDelta:
|
|
720
|
-
this._areaLocation.x1 +=
|
|
692
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
693
|
+
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
721
694
|
}
|
|
722
|
-
_manualScroll(
|
|
723
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling,
|
|
724
|
-
this._scrollSpeed.y +=
|
|
695
|
+
_manualScroll(t) {
|
|
696
|
+
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;
|
|
697
|
+
this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
725
698
|
}
|
|
726
699
|
_recalculateSelectionAreaRect() {
|
|
727
|
-
const { _scrollSpeed:
|
|
728
|
-
let { x2:
|
|
729
|
-
const { behaviour: { scrolling: { startScrollMargins: v } } } =
|
|
730
|
-
|
|
731
|
-
const y =
|
|
732
|
-
|
|
700
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: s, _options: i } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: d, scrollWidth: h, clientWidth: u } = s, a = this._targetRect, { x1: p, y1: g } = n;
|
|
701
|
+
let { x2: f, y2: m } = n;
|
|
702
|
+
const { behaviour: { scrolling: { startScrollMargins: v } } } = i;
|
|
703
|
+
f < a.left + v.x ? (t.x = d ? -A(a.left - f + v.x) : 0, f = f < a.left ? a.left : f) : f > a.right - v.x ? (t.x = h - d - u ? A(a.left + a.width - f - v.x) : 0, f = f > a.right ? a.right : f) : t.x = 0, m < a.top + v.y ? (t.y = r ? -A(a.top - m + v.y) : 0, m = m < a.top ? a.top : m) : m > a.bottom - v.y ? (t.y = l - r - c ? A(a.top + a.height - m - v.y) : 0, m = m > a.bottom ? a.bottom : m) : t.y = 0;
|
|
704
|
+
const y = he(p, f), b = he(g, m), E = ae(p, f), w = ae(g, m);
|
|
705
|
+
o.x = y, o.y = b, o.width = E - y, o.height = w - b;
|
|
733
706
|
}
|
|
734
707
|
_redrawSelectionArea() {
|
|
735
|
-
const { x:
|
|
736
|
-
|
|
708
|
+
const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
|
|
709
|
+
i.left = `${t}px`, i.top = `${n}px`, i.width = `${o}px`, i.height = `${s}px`;
|
|
737
710
|
}
|
|
738
|
-
_onTapStop(
|
|
739
|
-
var
|
|
740
|
-
const { document: s, features:
|
|
741
|
-
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(),
|
|
711
|
+
_onTapStop(t, n) {
|
|
712
|
+
var o;
|
|
713
|
+
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
714
|
+
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, this._scrollAvailable && T(s, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), M(this._area, "display", "none");
|
|
742
715
|
}
|
|
743
716
|
_updateElementSelection() {
|
|
744
|
-
const { _selectables:
|
|
745
|
-
for (let
|
|
746
|
-
const m =
|
|
747
|
-
if (
|
|
717
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: l } = o, { intersect: c, overlap: d } = n.behaviour, h = d === "invert", u = [], a = [], p = [];
|
|
718
|
+
for (let f = 0; f < t.length; f++) {
|
|
719
|
+
const m = t[f];
|
|
720
|
+
if (ce(s, m.getBoundingClientRect(), c)) {
|
|
748
721
|
if (r.includes(m))
|
|
749
|
-
|
|
750
|
-
else if (h &&
|
|
751
|
-
|
|
722
|
+
i.includes(m) && !l.includes(m) && l.push(m);
|
|
723
|
+
else if (h && i.includes(m)) {
|
|
724
|
+
p.push(m);
|
|
752
725
|
continue;
|
|
753
726
|
} else
|
|
754
727
|
a.push(m);
|
|
755
|
-
|
|
728
|
+
u.push(m);
|
|
756
729
|
}
|
|
757
730
|
}
|
|
758
|
-
h && a.push(...
|
|
759
|
-
const g =
|
|
760
|
-
for (let
|
|
761
|
-
const m = r[
|
|
762
|
-
!
|
|
731
|
+
h && a.push(...i.filter((f) => !r.includes(f)));
|
|
732
|
+
const g = d === "keep";
|
|
733
|
+
for (let f = 0; f < r.length; f++) {
|
|
734
|
+
const m = r[f];
|
|
735
|
+
!u.includes(m) && !// Check if user wants to keep previously selected elements, e.g.
|
|
763
736
|
// not make them part of the current selection as soon as they're touched.
|
|
764
|
-
(g &&
|
|
737
|
+
(g && i.includes(m)) && p.push(m);
|
|
765
738
|
}
|
|
766
|
-
|
|
739
|
+
o.selected = u, o.changed = { added: a, removed: p }, this._latestElement = void 0;
|
|
767
740
|
}
|
|
768
|
-
_emitEvent(
|
|
769
|
-
return this.emit(
|
|
741
|
+
_emitEvent(t, n) {
|
|
742
|
+
return this.emit(t, {
|
|
770
743
|
event: n,
|
|
771
744
|
store: this._selection,
|
|
772
745
|
selection: this
|
|
773
746
|
});
|
|
774
747
|
}
|
|
775
748
|
_keepSelection() {
|
|
776
|
-
const { _options:
|
|
777
|
-
switch (
|
|
749
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: s, touched: i, stored: r } = n, l = o.filter((c) => !r.includes(c));
|
|
750
|
+
switch (t.behaviour.overlap) {
|
|
778
751
|
case "drop": {
|
|
779
752
|
n.stored = [
|
|
780
753
|
...l,
|
|
781
|
-
...r.filter((c) => !
|
|
754
|
+
...r.filter((c) => !i.includes(c))
|
|
782
755
|
// Elements not touched
|
|
783
756
|
];
|
|
784
757
|
break;
|
|
@@ -794,7 +767,7 @@ class it extends Ze {
|
|
|
794
767
|
case "keep": {
|
|
795
768
|
n.stored = [
|
|
796
769
|
...r,
|
|
797
|
-
...
|
|
770
|
+
...o.filter((c) => !r.includes(c))
|
|
798
771
|
// Newly added
|
|
799
772
|
];
|
|
800
773
|
break;
|
|
@@ -806,28 +779,28 @@ class it extends Ze {
|
|
|
806
779
|
* @param evt A MouseEvent / TouchEvent -like object
|
|
807
780
|
* @param silent If beforestart should be fired,
|
|
808
781
|
*/
|
|
809
|
-
trigger(
|
|
810
|
-
this._onTapStart(
|
|
782
|
+
trigger(t, n = !0) {
|
|
783
|
+
this._onTapStart(t, n);
|
|
811
784
|
}
|
|
812
785
|
/**
|
|
813
786
|
* Can be used if during a selection elements have been added.
|
|
814
787
|
* Will update everything which can be selected.
|
|
815
788
|
*/
|
|
816
789
|
resolveSelectables() {
|
|
817
|
-
this._selectables =
|
|
790
|
+
this._selectables = H(this._options.selectables, this._options.document);
|
|
818
791
|
}
|
|
819
792
|
/**
|
|
820
793
|
* Same as deselect, but for all elements currently selected.
|
|
821
794
|
* @param includeStored If the store should also get cleared
|
|
822
795
|
* @param quiet If move / stop events should be fired
|
|
823
796
|
*/
|
|
824
|
-
clearSelection(
|
|
825
|
-
const { selected:
|
|
826
|
-
|
|
827
|
-
...
|
|
828
|
-
...
|
|
797
|
+
clearSelection(t = !0, n = !1) {
|
|
798
|
+
const { selected: o, stored: s, changed: i } = this._selection;
|
|
799
|
+
i.added = [], i.removed.push(
|
|
800
|
+
...o,
|
|
801
|
+
...t ? s : []
|
|
829
802
|
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
830
|
-
stored:
|
|
803
|
+
stored: t ? [] : s,
|
|
831
804
|
selected: [],
|
|
832
805
|
touched: [],
|
|
833
806
|
changed: { added: [], removed: [] }
|
|
@@ -849,8 +822,8 @@ class it extends Ze {
|
|
|
849
822
|
* Cancel the current selection process.
|
|
850
823
|
* @param keepEvent {boolean} true to fire a stop event after cancel.
|
|
851
824
|
*/
|
|
852
|
-
cancel(
|
|
853
|
-
this._onTapStop(null, !
|
|
825
|
+
cancel(t = !1) {
|
|
826
|
+
this._onTapStop(null, !t);
|
|
854
827
|
}
|
|
855
828
|
/**
|
|
856
829
|
* Unbinds all events and removes the area-element.
|
|
@@ -863,252 +836,255 @@ class it extends Ze {
|
|
|
863
836
|
* @param query - CSS Query, can be an array of queries
|
|
864
837
|
* @param quiet - If this should not trigger the move event
|
|
865
838
|
*/
|
|
866
|
-
select(
|
|
867
|
-
const { changed:
|
|
868
|
-
(l) => !s.includes(l) && !
|
|
839
|
+
select(t, n = !1) {
|
|
840
|
+
const { changed: o, selected: s, stored: i } = this._selection, r = H(t, this._options.document).filter(
|
|
841
|
+
(l) => !s.includes(l) && !i.includes(l)
|
|
869
842
|
);
|
|
870
|
-
return
|
|
843
|
+
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;
|
|
871
844
|
}
|
|
872
845
|
/**
|
|
873
846
|
* Removes a particular element from the selection.
|
|
874
847
|
* @param query - CSS Query, can be an array of queries
|
|
875
848
|
* @param quiet - If this should not trigger the move event
|
|
876
849
|
*/
|
|
877
|
-
deselect(
|
|
878
|
-
const { selected:
|
|
879
|
-
(l) =>
|
|
850
|
+
deselect(t, n = !1) {
|
|
851
|
+
const { selected: o, stored: s, changed: i } = this._selection, r = H(t, this._options.document).filter(
|
|
852
|
+
(l) => o.includes(l) || s.includes(l)
|
|
880
853
|
);
|
|
881
|
-
r.length && (this._selection.stored = s.filter((l) => !r.includes(l)), this._selection.selected =
|
|
882
|
-
...r.filter((l) => !
|
|
854
|
+
r.length && (this._selection.stored = s.filter((l) => !r.includes(l)), this._selection.selected = o.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
855
|
+
...r.filter((l) => !i.removed.includes(l))
|
|
883
856
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
884
857
|
}
|
|
885
858
|
}
|
|
886
|
-
|
|
887
|
-
const
|
|
888
|
-
this.theme =
|
|
889
|
-
const n = this.theme.cssVar,
|
|
890
|
-
for (let s = 0; s <
|
|
891
|
-
const
|
|
892
|
-
this.mindElixirBox.style.setProperty(
|
|
859
|
+
x(Qe, "version", "3.3.1");
|
|
860
|
+
const Ze = function(e, t = !0) {
|
|
861
|
+
this.theme = e;
|
|
862
|
+
const n = this.theme.cssVar, o = Object.keys(n);
|
|
863
|
+
for (let s = 0; s < o.length; s++) {
|
|
864
|
+
const i = o[s];
|
|
865
|
+
this.mindElixirBox.style.setProperty(i, n[i]);
|
|
893
866
|
}
|
|
894
|
-
|
|
867
|
+
t && this.refresh();
|
|
895
868
|
};
|
|
896
|
-
function
|
|
869
|
+
function Ce(e) {
|
|
897
870
|
return {
|
|
898
|
-
nodeData:
|
|
899
|
-
|
|
900
|
-
summaries:
|
|
901
|
-
direction:
|
|
902
|
-
theme:
|
|
871
|
+
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
872
|
+
arrows: e.arrows,
|
|
873
|
+
summaries: e.summaries,
|
|
874
|
+
direction: e.direction,
|
|
875
|
+
theme: e.theme
|
|
903
876
|
};
|
|
904
877
|
}
|
|
905
|
-
const
|
|
906
|
-
if (
|
|
907
|
-
if (console.time("selectNode"), typeof
|
|
908
|
-
const
|
|
909
|
-
return
|
|
878
|
+
const et = function(e, t, n) {
|
|
879
|
+
if (e) {
|
|
880
|
+
if (console.time("selectNode"), this.clearSelection(), typeof e == "string") {
|
|
881
|
+
const o = S(e);
|
|
882
|
+
return o ? this.selectNode(o) : void 0;
|
|
910
883
|
}
|
|
911
|
-
|
|
884
|
+
e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n), console.timeEnd("selectNode");
|
|
912
885
|
}
|
|
913
|
-
},
|
|
886
|
+
}, tt = function() {
|
|
914
887
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
915
|
-
},
|
|
916
|
-
if (
|
|
888
|
+
}, nt = function(e) {
|
|
889
|
+
if (e) {
|
|
917
890
|
console.time("selectNodes");
|
|
918
|
-
for (const
|
|
919
|
-
|
|
920
|
-
this.currentNodes =
|
|
891
|
+
for (const t of e)
|
|
892
|
+
t.className = "selected";
|
|
893
|
+
this.currentNodes = e, this.bus.fire(
|
|
921
894
|
"selectNodes",
|
|
922
|
-
|
|
895
|
+
e.map((t) => t.nodeObj)
|
|
923
896
|
), console.timeEnd("selectNodes");
|
|
924
897
|
}
|
|
925
|
-
},
|
|
898
|
+
}, ot = function() {
|
|
926
899
|
if (this.currentNodes)
|
|
927
|
-
for (const
|
|
928
|
-
|
|
900
|
+
for (const e of this.currentNodes)
|
|
901
|
+
e.classList.remove("selected");
|
|
929
902
|
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
930
|
-
},
|
|
903
|
+
}, st = function() {
|
|
904
|
+
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
905
|
+
}, it = function() {
|
|
931
906
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
932
907
|
return !1;
|
|
933
|
-
const
|
|
934
|
-
let
|
|
935
|
-
if (
|
|
936
|
-
|
|
908
|
+
const e = this.currentNode.parentElement.parentElement.nextSibling;
|
|
909
|
+
let t;
|
|
910
|
+
if (e)
|
|
911
|
+
t = e.firstChild.firstChild;
|
|
937
912
|
else
|
|
938
913
|
return !1;
|
|
939
|
-
return this.selectNode(
|
|
940
|
-
},
|
|
914
|
+
return this.selectNode(t), !0;
|
|
915
|
+
}, rt = function() {
|
|
941
916
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
942
917
|
return !1;
|
|
943
|
-
const
|
|
944
|
-
let
|
|
945
|
-
if (
|
|
946
|
-
|
|
918
|
+
const e = this.currentNode.parentElement.parentElement.previousSibling;
|
|
919
|
+
let t;
|
|
920
|
+
if (e)
|
|
921
|
+
t = e.firstChild.firstChild;
|
|
947
922
|
else
|
|
948
923
|
return !1;
|
|
949
|
-
return this.selectNode(
|
|
950
|
-
},
|
|
924
|
+
return this.selectNode(t), !0;
|
|
925
|
+
}, lt = function() {
|
|
951
926
|
if (!this.currentNode)
|
|
952
927
|
return;
|
|
953
|
-
const
|
|
954
|
-
if (
|
|
955
|
-
const
|
|
956
|
-
this.selectNode(
|
|
928
|
+
const e = this.currentNode.parentElement.nextSibling;
|
|
929
|
+
if (e && e.firstChild) {
|
|
930
|
+
const t = e.firstChild.firstChild.firstChild;
|
|
931
|
+
this.selectNode(t);
|
|
957
932
|
}
|
|
958
|
-
},
|
|
933
|
+
}, ct = function() {
|
|
959
934
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
960
935
|
return;
|
|
961
|
-
const
|
|
962
|
-
if (
|
|
963
|
-
const
|
|
964
|
-
this.selectNode(
|
|
936
|
+
const e = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
|
|
937
|
+
if (e) {
|
|
938
|
+
const t = e.firstChild;
|
|
939
|
+
this.selectNode(t);
|
|
965
940
|
}
|
|
966
|
-
},
|
|
967
|
-
const
|
|
968
|
-
return JSON.stringify(
|
|
969
|
-
if (!(
|
|
941
|
+
}, at = function() {
|
|
942
|
+
const e = Ce(this);
|
|
943
|
+
return JSON.stringify(e, (t, n) => {
|
|
944
|
+
if (!(t === "parent" && typeof n != "string"))
|
|
970
945
|
return n;
|
|
971
946
|
});
|
|
972
|
-
},
|
|
947
|
+
}, ht = function() {
|
|
973
948
|
return JSON.parse(this.getDataString());
|
|
974
|
-
},
|
|
975
|
-
const
|
|
976
|
-
let
|
|
949
|
+
}, dt = function() {
|
|
950
|
+
const e = Ce(this).nodeData;
|
|
951
|
+
let t = "# " + e.topic + `
|
|
977
952
|
|
|
978
953
|
`;
|
|
979
|
-
function n(
|
|
980
|
-
for (let
|
|
981
|
-
s <= 6 ?
|
|
954
|
+
function n(o, s) {
|
|
955
|
+
for (let i = 0; i < o.length; i++)
|
|
956
|
+
s <= 6 ? t += "".padStart(s, "#") + " " + o[i].topic + `
|
|
982
957
|
|
|
983
|
-
` :
|
|
984
|
-
`, i
|
|
958
|
+
` : t += "".padStart(s - 7, " ") + "- " + o[i].topic + `
|
|
959
|
+
`, o[i].children && n(o[i].children || [], s + 1);
|
|
985
960
|
}
|
|
986
|
-
return n(
|
|
987
|
-
},
|
|
961
|
+
return n(e.children || [], 2), t;
|
|
962
|
+
}, ut = function() {
|
|
988
963
|
this.editable = !0;
|
|
989
|
-
},
|
|
964
|
+
}, ft = function() {
|
|
990
965
|
this.editable = !1;
|
|
991
|
-
},
|
|
992
|
-
this.scaleVal =
|
|
993
|
-
},
|
|
966
|
+
}, pt = function(e) {
|
|
967
|
+
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
|
|
968
|
+
}, mt = function() {
|
|
994
969
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
995
|
-
},
|
|
996
|
-
|
|
997
|
-
},
|
|
998
|
-
|
|
999
|
-
},
|
|
970
|
+
}, gt = function(e) {
|
|
971
|
+
e(this);
|
|
972
|
+
}, vt = function(e) {
|
|
973
|
+
e.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
|
|
974
|
+
}, yt = function() {
|
|
1000
975
|
this.isFocusMode = !1, this.tempDirection !== null && (delete this.nodeData.root, this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1001
|
-
},
|
|
976
|
+
}, bt = function() {
|
|
1002
977
|
this.direction = 0, this.refresh();
|
|
1003
|
-
},
|
|
978
|
+
}, xt = function() {
|
|
1004
979
|
this.direction = 1, this.refresh();
|
|
1005
|
-
},
|
|
980
|
+
}, wt = function() {
|
|
1006
981
|
this.direction = 2, this.refresh();
|
|
1007
|
-
},
|
|
1008
|
-
this.locale =
|
|
1009
|
-
},
|
|
1010
|
-
const n =
|
|
1011
|
-
typeof
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
},
|
|
982
|
+
}, _t = function(e) {
|
|
983
|
+
this.locale = e, this.refresh();
|
|
984
|
+
}, Et = function(e, t) {
|
|
985
|
+
const n = e.nodeObj;
|
|
986
|
+
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
|
|
987
|
+
}, Ct = function(e) {
|
|
988
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), ee(this.nodeData), this.layout(), this.linkDiv();
|
|
989
|
+
}, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1015
990
|
__proto__: null,
|
|
1016
|
-
cancelFocus:
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
991
|
+
cancelFocus: yt,
|
|
992
|
+
clearSelection: st,
|
|
993
|
+
disableEdit: ft,
|
|
994
|
+
enableEdit: ut,
|
|
995
|
+
expandNode: Et,
|
|
996
|
+
focusNode: vt,
|
|
997
|
+
getData: ht,
|
|
998
|
+
getDataMd: dt,
|
|
999
|
+
getDataString: at,
|
|
1000
|
+
initLeft: bt,
|
|
1001
|
+
initRight: xt,
|
|
1002
|
+
initSide: wt,
|
|
1003
|
+
install: gt,
|
|
1004
|
+
refresh: Ct,
|
|
1005
|
+
scale: pt,
|
|
1006
|
+
selectFirstChild: lt,
|
|
1007
|
+
selectNextSibling: it,
|
|
1008
|
+
selectNode: et,
|
|
1009
|
+
selectNodes: nt,
|
|
1010
|
+
selectParent: ct,
|
|
1011
|
+
selectPrevSibling: rt,
|
|
1012
|
+
setLocale: _t,
|
|
1013
|
+
toCenter: mt,
|
|
1014
|
+
unselectNode: tt,
|
|
1015
|
+
unselectNodes: ot
|
|
1016
|
+
}, Symbol.toStringTag, { value: "Module" })), Lt = function(e) {
|
|
1041
1017
|
return {
|
|
1042
|
-
dom:
|
|
1018
|
+
dom: e,
|
|
1043
1019
|
moved: !1,
|
|
1044
1020
|
// diffrentiate click and move
|
|
1045
1021
|
mousedown: !1,
|
|
1046
|
-
handleMouseMove(
|
|
1047
|
-
this.mousedown && (this.moved = !0, this.cb && this.cb(
|
|
1022
|
+
handleMouseMove(t) {
|
|
1023
|
+
this.mousedown && (this.moved = !0, this.cb && this.cb(t.movementX, t.movementY));
|
|
1048
1024
|
},
|
|
1049
|
-
handleMouseDown(
|
|
1050
|
-
|
|
1025
|
+
handleMouseDown(t) {
|
|
1026
|
+
t.button === 0 && (this.mousedown = !0);
|
|
1051
1027
|
},
|
|
1052
|
-
handleClear(
|
|
1028
|
+
handleClear(t) {
|
|
1053
1029
|
this.mousedown = !1;
|
|
1054
1030
|
},
|
|
1055
1031
|
cb: null,
|
|
1056
|
-
init(
|
|
1057
|
-
this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this),
|
|
1032
|
+
init(t, n) {
|
|
1033
|
+
this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this), t.addEventListener("mousemove", this.handleMouseMove), t.addEventListener("mouseleave", this.handleClear), t.addEventListener("mouseup", this.handleClear), this.dom.addEventListener("mousedown", this.handleMouseDown);
|
|
1058
1034
|
},
|
|
1059
|
-
destory(
|
|
1060
|
-
|
|
1035
|
+
destory(t) {
|
|
1036
|
+
t.removeEventListener("mousemove", this.handleMouseMove), t.removeEventListener("mouseleave", this.handleClear), t.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
|
|
1061
1037
|
},
|
|
1062
1038
|
clear() {
|
|
1063
1039
|
this.moved = !1, this.mousedown = !1;
|
|
1064
1040
|
}
|
|
1065
1041
|
};
|
|
1066
|
-
},
|
|
1067
|
-
create:
|
|
1042
|
+
}, ue = {
|
|
1043
|
+
create: Lt
|
|
1068
1044
|
};
|
|
1069
|
-
function
|
|
1070
|
-
const { offsetLeft:
|
|
1045
|
+
function K(e, t, n) {
|
|
1046
|
+
const { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, l = o + i / 2, c = s + r / 2, d = l + n.x, h = c + n.y;
|
|
1071
1047
|
return {
|
|
1072
|
-
w:
|
|
1048
|
+
w: i,
|
|
1073
1049
|
h: r,
|
|
1074
1050
|
cx: l,
|
|
1075
1051
|
cy: c,
|
|
1076
|
-
ctrlX:
|
|
1052
|
+
ctrlX: d,
|
|
1077
1053
|
ctrlY: h
|
|
1078
1054
|
};
|
|
1079
1055
|
}
|
|
1080
|
-
function
|
|
1081
|
-
let
|
|
1082
|
-
const
|
|
1083
|
-
return
|
|
1084
|
-
x:
|
|
1056
|
+
function P(e) {
|
|
1057
|
+
let t, n;
|
|
1058
|
+
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1059
|
+
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), {
|
|
1060
|
+
x: t,
|
|
1085
1061
|
y: n
|
|
1086
1062
|
};
|
|
1087
1063
|
}
|
|
1088
|
-
const
|
|
1064
|
+
const Mt = function(e, t, n, o) {
|
|
1089
1065
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1090
|
-
return
|
|
1066
|
+
return _(s, {
|
|
1091
1067
|
"text-anchor": "middle",
|
|
1092
|
-
x:
|
|
1068
|
+
x: t + "",
|
|
1093
1069
|
y: n + "",
|
|
1094
|
-
fill:
|
|
1095
|
-
}), s.dataset.type = "custom-link", s.innerHTML =
|
|
1096
|
-
},
|
|
1097
|
-
if (!t || !
|
|
1070
|
+
fill: o || "#666"
|
|
1071
|
+
}), s.dataset.type = "custom-link", s.innerHTML = e, s;
|
|
1072
|
+
}, Se = function(e, t, n, o, s) {
|
|
1073
|
+
if (!t || !n)
|
|
1098
1074
|
return;
|
|
1099
|
-
const
|
|
1100
|
-
`M ${
|
|
1101
|
-
`M ${
|
|
1102
|
-
),
|
|
1103
|
-
|
|
1104
|
-
const
|
|
1105
|
-
console.log(`
|
|
1106
|
-
},
|
|
1075
|
+
const i = performance.now(), r = K(e, t, o.delta1), l = K(e, n, o.delta2), { x: c, y: d } = P(r), { ctrlX: h, ctrlY: u } = r, { ctrlX: a, ctrlY: p } = l, { x: g, y: f } = P(l), m = ve(a, p, g, f), v = Re(
|
|
1076
|
+
`M ${c} ${d} C ${h} ${u} ${a} ${p} ${g} ${f}`,
|
|
1077
|
+
`M ${m.x1} ${m.y1} L ${g} ${f} L ${m.x2} ${m.y2}`
|
|
1078
|
+
), y = c / 8 + h * 3 / 8 + a * 3 / 8 + g / 8, b = d / 8 + u * 3 / 8 + p * 3 / 8 + f / 8, E = Mt(o.label, y, b, e.theme.cssVar["--color"]);
|
|
1079
|
+
v.appendChild(E), v.arrowObj = o, v.dataset.linkid = o.id, e.linkSvgGroup.appendChild(v), s || (e.arrows.push(o), e.currentArrow = v, Me(e, o, r, l));
|
|
1080
|
+
const w = performance.now();
|
|
1081
|
+
console.log(`DrawArrow Execution time: ${w - i} ms`);
|
|
1082
|
+
}, Tt = function(e, t) {
|
|
1107
1083
|
const n = {
|
|
1108
|
-
id:
|
|
1084
|
+
id: te(),
|
|
1109
1085
|
label: "Custom Link",
|
|
1110
|
-
from:
|
|
1111
|
-
to:
|
|
1086
|
+
from: e.nodeObj.id,
|
|
1087
|
+
to: t.nodeObj.id,
|
|
1112
1088
|
delta1: {
|
|
1113
1089
|
x: 0,
|
|
1114
1090
|
y: -200
|
|
@@ -1118,457 +1094,464 @@ const Nt = function(t, e, n, i) {
|
|
|
1118
1094
|
y: -200
|
|
1119
1095
|
}
|
|
1120
1096
|
};
|
|
1121
|
-
this
|
|
1122
|
-
name: "
|
|
1097
|
+
Se(this, e, t, n), this.bus.fire("operation", {
|
|
1098
|
+
name: "createArrow",
|
|
1123
1099
|
obj: n
|
|
1124
1100
|
});
|
|
1125
|
-
},
|
|
1126
|
-
let
|
|
1127
|
-
if (
|
|
1101
|
+
}, Nt = function(e) {
|
|
1102
|
+
let t;
|
|
1103
|
+
if (e ? t = e : t = this.currentArrow, !t)
|
|
1128
1104
|
return;
|
|
1129
|
-
this
|
|
1130
|
-
const n =
|
|
1131
|
-
|
|
1132
|
-
name: "
|
|
1105
|
+
Le(this);
|
|
1106
|
+
const n = t.arrowObj.id;
|
|
1107
|
+
this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
|
|
1108
|
+
name: "removeArrow",
|
|
1133
1109
|
obj: {
|
|
1134
1110
|
id: n
|
|
1135
1111
|
}
|
|
1136
1112
|
});
|
|
1137
|
-
},
|
|
1138
|
-
this.
|
|
1139
|
-
const
|
|
1140
|
-
this
|
|
1141
|
-
},
|
|
1142
|
-
this.
|
|
1143
|
-
},
|
|
1144
|
-
|
|
1145
|
-
},
|
|
1146
|
-
var
|
|
1147
|
-
|
|
1148
|
-
let { x:
|
|
1149
|
-
|
|
1150
|
-
x1:
|
|
1151
|
-
y1:
|
|
1152
|
-
x2:
|
|
1153
|
-
y2:
|
|
1154
|
-
}),
|
|
1155
|
-
x1:
|
|
1156
|
-
y1:
|
|
1157
|
-
x2:
|
|
1158
|
-
y2:
|
|
1159
|
-
}),
|
|
1160
|
-
var
|
|
1161
|
-
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1166
|
-
x:
|
|
1167
|
-
y:
|
|
1168
|
-
}),
|
|
1169
|
-
x1:
|
|
1170
|
-
y1:
|
|
1171
|
-
x2:
|
|
1172
|
-
y2:
|
|
1173
|
-
}), t.delta1.x =
|
|
1174
|
-
}),
|
|
1175
|
-
var
|
|
1176
|
-
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1181
|
-
x:
|
|
1182
|
-
y:
|
|
1183
|
-
}),
|
|
1184
|
-
x1:
|
|
1185
|
-
y1:
|
|
1186
|
-
x2:
|
|
1187
|
-
y2:
|
|
1188
|
-
}), t.delta2.x =
|
|
1113
|
+
}, $t = function(e) {
|
|
1114
|
+
this.currentArrow = e;
|
|
1115
|
+
const t = e.arrowObj, n = S(t.from), o = S(t.to), s = K(this, n, t.delta1), i = K(this, o, t.delta2);
|
|
1116
|
+
Me(this, t, s, i);
|
|
1117
|
+
}, At = function() {
|
|
1118
|
+
this.currentArrow = null, Le(this);
|
|
1119
|
+
}, Le = function(e) {
|
|
1120
|
+
e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1121
|
+
}, Me = function(e, t, n, o) {
|
|
1122
|
+
var a;
|
|
1123
|
+
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);
|
|
1124
|
+
let { x: s, y: i } = P(n), { ctrlX: r, ctrlY: l } = n, { ctrlX: c, ctrlY: d } = o, { x: h, y: u } = P(o);
|
|
1125
|
+
e.P2.style.cssText = `top:${l}px;left:${r}px;`, e.P3.style.cssText = `top:${d}px;left:${c}px;`, _(e.line1, {
|
|
1126
|
+
x1: s + "",
|
|
1127
|
+
y1: i + "",
|
|
1128
|
+
x2: r + "",
|
|
1129
|
+
y2: l + ""
|
|
1130
|
+
}), _(e.line2, {
|
|
1131
|
+
x1: c + "",
|
|
1132
|
+
y1: d + "",
|
|
1133
|
+
x2: h + "",
|
|
1134
|
+
y2: u + ""
|
|
1135
|
+
}), e.helper1 && (e.helper1.destory(e.map), (a = e.helper2) == null || a.destory(e.map)), e.helper1 = ue.create(e.P2), e.helper2 = ue.create(e.P3), e.helper1.init(e.map, (p, g) => {
|
|
1136
|
+
var y;
|
|
1137
|
+
r = r + p / e.scaleVal, l = l + g / e.scaleVal;
|
|
1138
|
+
const f = P({ ...n, ctrlX: r, ctrlY: l });
|
|
1139
|
+
s = f.x, i = f.y;
|
|
1140
|
+
const m = s / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, v = i / 8 + l * 3 / 8 + d * 3 / 8 + u / 8;
|
|
1141
|
+
e.P2.style.top = l + "px", e.P2.style.left = r + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${d} ${h} ${u}`), _(e.currentArrow.children[2], {
|
|
1142
|
+
x: m + "",
|
|
1143
|
+
y: v + ""
|
|
1144
|
+
}), _(e.line1, {
|
|
1145
|
+
x1: s + "",
|
|
1146
|
+
y1: i + "",
|
|
1147
|
+
x2: r + "",
|
|
1148
|
+
y2: l + ""
|
|
1149
|
+
}), t.delta1.x = r - n.cx, t.delta1.y = l - n.cy;
|
|
1150
|
+
}), e.helper2.init(e.map, (p, g) => {
|
|
1151
|
+
var b, E;
|
|
1152
|
+
c = c + p / e.scaleVal, d = d + g / e.scaleVal;
|
|
1153
|
+
const f = P({ ...o, ctrlX: c, ctrlY: d });
|
|
1154
|
+
h = f.x, u = f.y;
|
|
1155
|
+
const m = s / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, v = i / 8 + l * 3 / 8 + d * 3 / 8 + u / 8, y = ve(c, d, h, u);
|
|
1156
|
+
e.P3.style.top = d + "px", e.P3.style.left = c + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${d} ${h} ${u}`), (E = e.currentArrow) == null || E.children[1].setAttribute("d", `M ${y.x1} ${y.y1} L ${h} ${u} L ${y.x2} ${y.y2}`), _(e.currentArrow.children[2], {
|
|
1157
|
+
x: m + "",
|
|
1158
|
+
y: v + ""
|
|
1159
|
+
}), _(e.line2, {
|
|
1160
|
+
x1: c + "",
|
|
1161
|
+
y1: d + "",
|
|
1162
|
+
x2: h + "",
|
|
1163
|
+
y2: u + ""
|
|
1164
|
+
}), t.delta2.x = c - o.cx, t.delta2.y = d - o.cy;
|
|
1189
1165
|
});
|
|
1190
1166
|
};
|
|
1191
|
-
function
|
|
1167
|
+
function kt() {
|
|
1192
1168
|
this.linkSvgGroup.innerHTML = "";
|
|
1193
|
-
for (
|
|
1194
|
-
const
|
|
1169
|
+
for (let e = 0; e < this.arrows.length; e++) {
|
|
1170
|
+
const t = this.arrows[e];
|
|
1195
1171
|
try {
|
|
1196
|
-
this
|
|
1172
|
+
Se(this, S(t.from), S(t.to), t, !0);
|
|
1197
1173
|
} catch {
|
|
1198
1174
|
console.warn("Node may not be expanded");
|
|
1199
1175
|
}
|
|
1200
1176
|
}
|
|
1201
1177
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1202
1178
|
}
|
|
1203
|
-
function
|
|
1204
|
-
if (console.time("editSummary"), !
|
|
1179
|
+
function Dt(e) {
|
|
1180
|
+
if (console.time("editSummary"), !e)
|
|
1205
1181
|
return;
|
|
1206
|
-
const
|
|
1207
|
-
console.log(
|
|
1208
|
-
var
|
|
1209
|
-
const
|
|
1210
|
-
s === "" ?
|
|
1211
|
-
name: "
|
|
1212
|
-
obj:
|
|
1182
|
+
const t = e.children[2];
|
|
1183
|
+
console.log(t, e), we(this, t, (n) => {
|
|
1184
|
+
var i;
|
|
1185
|
+
const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1186
|
+
s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
1187
|
+
name: "finishEditArrowLabel",
|
|
1188
|
+
obj: o
|
|
1213
1189
|
}));
|
|
1214
1190
|
}), console.timeEnd("editSummary");
|
|
1215
1191
|
}
|
|
1216
|
-
function
|
|
1217
|
-
|
|
1218
|
-
const e = this.linkData[t];
|
|
1219
|
-
(!U(e.from, this.nodeData) || !U(e.to, this.nodeData)) && delete this.linkData[e.id];
|
|
1220
|
-
}
|
|
1192
|
+
function Ht() {
|
|
1193
|
+
this.arrows = this.arrows.filter((e) => X(e.from, this.nodeData) && X(e.to, this.nodeData));
|
|
1221
1194
|
}
|
|
1222
|
-
const
|
|
1195
|
+
const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1223
1196
|
__proto__: null,
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
}, Symbol.toStringTag, { value: "Module" })), Wt = function(t) {
|
|
1235
|
-
var c, u;
|
|
1236
|
-
if (t.length === 0)
|
|
1197
|
+
createArrow: Tt,
|
|
1198
|
+
editArrowLabel: Dt,
|
|
1199
|
+
removeArrow: Nt,
|
|
1200
|
+
renderArrow: kt,
|
|
1201
|
+
selectArrow: $t,
|
|
1202
|
+
tidyArrow: Ht,
|
|
1203
|
+
unselectArrow: At
|
|
1204
|
+
}, Symbol.toStringTag, { value: "Module" })), Bt = function(e) {
|
|
1205
|
+
var c, d;
|
|
1206
|
+
if (e.length === 0)
|
|
1237
1207
|
throw new Error("No selected node.");
|
|
1238
|
-
if (
|
|
1239
|
-
const h =
|
|
1240
|
-
if (!
|
|
1208
|
+
if (e.length === 1) {
|
|
1209
|
+
const h = e[0].nodeObj, u = e[0].nodeObj.parent;
|
|
1210
|
+
if (!u)
|
|
1241
1211
|
throw new Error("Can not select root node.");
|
|
1242
|
-
const a =
|
|
1212
|
+
const a = u.children.findIndex((p) => h === p);
|
|
1243
1213
|
return {
|
|
1244
|
-
parent:
|
|
1214
|
+
parent: u.id,
|
|
1245
1215
|
start: a,
|
|
1246
1216
|
end: a
|
|
1247
1217
|
};
|
|
1248
1218
|
}
|
|
1249
|
-
let
|
|
1250
|
-
const n =
|
|
1251
|
-
let
|
|
1219
|
+
let t = 0;
|
|
1220
|
+
const n = e.map((h) => {
|
|
1221
|
+
let u = h.nodeObj;
|
|
1252
1222
|
const a = [];
|
|
1253
|
-
for (;
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1223
|
+
for (; u.parent; ) {
|
|
1224
|
+
const p = u.parent, g = p.children, f = g == null ? void 0 : g.indexOf(u);
|
|
1225
|
+
u = p, a.unshift({ node: u, index: f });
|
|
1256
1226
|
}
|
|
1257
|
-
return a.length >
|
|
1227
|
+
return a.length > t && (t = a.length), a;
|
|
1258
1228
|
});
|
|
1259
|
-
let
|
|
1229
|
+
let o = 0;
|
|
1260
1230
|
e:
|
|
1261
|
-
for (;
|
|
1262
|
-
const h = (c = n[0][
|
|
1263
|
-
for (let
|
|
1264
|
-
if (((
|
|
1231
|
+
for (; o < t; o++) {
|
|
1232
|
+
const h = (c = n[0][o]) == null ? void 0 : c.node;
|
|
1233
|
+
for (let u = 1; u < n.length; u++)
|
|
1234
|
+
if (((d = n[u][o]) == null ? void 0 : d.node) !== h)
|
|
1265
1235
|
break e;
|
|
1266
1236
|
}
|
|
1267
|
-
if (!
|
|
1237
|
+
if (!o)
|
|
1268
1238
|
throw new Error("Can not select root node.");
|
|
1269
|
-
const s = n.map((h) => h[
|
|
1239
|
+
const s = n.map((h) => h[o - 1].index).sort(), i = s[0] || 0, r = s[s.length - 1] || 0, l = n[0][o - 1].node;
|
|
1270
1240
|
if (l.root)
|
|
1271
1241
|
throw new Error("Please select nodes in the same main topic.");
|
|
1272
1242
|
return {
|
|
1273
1243
|
parent: l.id,
|
|
1274
|
-
start:
|
|
1244
|
+
start: i,
|
|
1275
1245
|
end: r
|
|
1276
1246
|
};
|
|
1277
|
-
},
|
|
1278
|
-
const
|
|
1279
|
-
return
|
|
1280
|
-
},
|
|
1247
|
+
}, zt = function(e) {
|
|
1248
|
+
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1249
|
+
return t.setAttribute("id", e), t;
|
|
1250
|
+
}, fe = function(e, t) {
|
|
1281
1251
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1282
|
-
return
|
|
1283
|
-
d:
|
|
1284
|
-
stroke:
|
|
1252
|
+
return _(n, {
|
|
1253
|
+
d: e,
|
|
1254
|
+
stroke: t || "#666",
|
|
1285
1255
|
fill: "none",
|
|
1286
1256
|
"stroke-linecap": "round",
|
|
1287
1257
|
"stroke-width": "2"
|
|
1288
1258
|
}), n;
|
|
1289
|
-
},
|
|
1290
|
-
const
|
|
1291
|
-
return
|
|
1292
|
-
"text-anchor":
|
|
1293
|
-
x:
|
|
1259
|
+
}, pe = function(e, t, n, o, s) {
|
|
1260
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1261
|
+
return _(i, {
|
|
1262
|
+
"text-anchor": o,
|
|
1263
|
+
x: t + "",
|
|
1294
1264
|
y: n + "",
|
|
1295
1265
|
fill: s || "#666"
|
|
1296
|
-
}),
|
|
1297
|
-
},
|
|
1298
|
-
var
|
|
1299
|
-
const n =
|
|
1266
|
+
}), i.innerHTML = e, i;
|
|
1267
|
+
}, jt = (e) => S(e).parentElement.parentElement, Ot = function({ parent: e, start: t }) {
|
|
1268
|
+
var i, r;
|
|
1269
|
+
const n = S(e), o = n.nodeObj;
|
|
1300
1270
|
let s;
|
|
1301
|
-
return
|
|
1302
|
-
},
|
|
1303
|
-
var
|
|
1304
|
-
const { id: n, text:
|
|
1305
|
-
let
|
|
1306
|
-
for (let
|
|
1307
|
-
const
|
|
1308
|
-
if (!
|
|
1309
|
-
return console.warn("Child not found"),
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1271
|
+
return o.root === !0 ? s = (i = S(o.children[t].id).closest("me-main")) == null ? void 0 : i.className : s = (r = n.closest("me-main")) == null ? void 0 : r.className, s;
|
|
1272
|
+
}, Te = function(e, t) {
|
|
1273
|
+
var U;
|
|
1274
|
+
const { id: n, text: o, parent: s, start: i, end: r } = t, l = e.nodes, d = S(s).nodeObj, h = Ot(t);
|
|
1275
|
+
let u = 1 / 0, a = 0, p = 0, g = 0;
|
|
1276
|
+
for (let q = i; q <= r; q++) {
|
|
1277
|
+
const ne = (U = d.children) == null ? void 0 : U[q];
|
|
1278
|
+
if (!ne)
|
|
1279
|
+
return console.warn("Child not found"), e.removeSummary(n), null;
|
|
1280
|
+
const W = jt(ne.id), { offsetLeft: F, offsetTop: oe } = O(l, W);
|
|
1281
|
+
q === i && (p = oe), q === r && (g = oe + W.offsetHeight), F < u && (u = F), W.offsetWidth + F > a && (a = W.offsetWidth + F);
|
|
1312
1282
|
}
|
|
1313
|
-
let
|
|
1314
|
-
const v =
|
|
1315
|
-
h === "lhs" ? (
|
|
1316
|
-
const
|
|
1317
|
-
return
|
|
1318
|
-
},
|
|
1319
|
-
let
|
|
1320
|
-
this.currentNode ?
|
|
1321
|
-
const { parent:
|
|
1322
|
-
this.summaries.push(s), this.editSummary(
|
|
1283
|
+
let f, m;
|
|
1284
|
+
const v = p + 10, y = g + 10, b = (v + y) / 2, E = e.theme.cssVar["--color"];
|
|
1285
|
+
h === "lhs" ? (f = fe(`M ${u + 10} ${v} c -5 0 -10 5 -10 10 L ${u} ${y - 10} c 0 5 5 10 10 10 M ${u} ${b} h -10`, E), m = pe(o, u - 20, b + 6, "end", E)) : (f = fe(`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`, E), m = pe(o, a + 20, b + 6, "start", E));
|
|
1286
|
+
const w = zt("s-" + n);
|
|
1287
|
+
return w.appendChild(f), w.appendChild(m), w.summaryObj = t, e.summarySvg.appendChild(w), w;
|
|
1288
|
+
}, qt = function() {
|
|
1289
|
+
let e = [];
|
|
1290
|
+
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
1291
|
+
const { parent: t, start: n, end: o } = Bt(e), s = { id: te(), parent: t, start: n, end: o, text: "summary" }, i = Te(this, s);
|
|
1292
|
+
this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
|
|
1323
1293
|
name: "createSummary",
|
|
1324
1294
|
obj: s
|
|
1325
1295
|
});
|
|
1326
|
-
},
|
|
1296
|
+
}, Rt = function(e) {
|
|
1327
1297
|
var n;
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1298
|
+
const t = this.summaries.findIndex((o) => o.id === e);
|
|
1299
|
+
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
|
|
1330
1300
|
name: "removeSummary",
|
|
1331
|
-
obj: { id:
|
|
1301
|
+
obj: { id: e }
|
|
1332
1302
|
});
|
|
1333
|
-
},
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1336
|
-
x:
|
|
1337
|
-
y:
|
|
1338
|
-
width:
|
|
1339
|
-
height:
|
|
1340
|
-
rx:
|
|
1303
|
+
}, Vt = function(e) {
|
|
1304
|
+
const t = e.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1305
|
+
_(s, {
|
|
1306
|
+
x: t.x - n + "",
|
|
1307
|
+
y: t.y - n + "",
|
|
1308
|
+
width: t.width + n * 2 + "",
|
|
1309
|
+
height: t.height + n * 2 + "",
|
|
1310
|
+
rx: o + "",
|
|
1341
1311
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
1342
1312
|
"stroke-width": "2",
|
|
1343
1313
|
fill: "none"
|
|
1344
|
-
}), s.classList.add("selected"),
|
|
1345
|
-
},
|
|
1346
|
-
var
|
|
1347
|
-
(
|
|
1348
|
-
},
|
|
1349
|
-
this.summarySvg.innerHTML = "", this.summaries.forEach((
|
|
1314
|
+
}), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
|
|
1315
|
+
}, Wt = function() {
|
|
1316
|
+
var e, t;
|
|
1317
|
+
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
1318
|
+
}, Ft = function() {
|
|
1319
|
+
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
1350
1320
|
try {
|
|
1351
|
-
|
|
1321
|
+
Te(this, e);
|
|
1352
1322
|
} catch {
|
|
1353
1323
|
console.warn("Node may not be expanded");
|
|
1354
1324
|
}
|
|
1355
1325
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
1356
|
-
},
|
|
1357
|
-
if (console.time("editSummary"), !
|
|
1326
|
+
}, It = function(e) {
|
|
1327
|
+
if (console.time("editSummary"), !e)
|
|
1358
1328
|
return;
|
|
1359
|
-
const
|
|
1360
|
-
we(this,
|
|
1361
|
-
var
|
|
1362
|
-
const
|
|
1363
|
-
s === "" ?
|
|
1329
|
+
const t = e.childNodes[1];
|
|
1330
|
+
we(this, t, (n) => {
|
|
1331
|
+
var i;
|
|
1332
|
+
const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1333
|
+
s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
1364
1334
|
name: "finishEditSummary",
|
|
1365
|
-
obj:
|
|
1335
|
+
obj: o
|
|
1366
1336
|
}));
|
|
1367
1337
|
}), console.timeEnd("editSummary");
|
|
1368
|
-
},
|
|
1338
|
+
}, Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1369
1339
|
__proto__: null,
|
|
1370
|
-
createSummary:
|
|
1371
|
-
editSummary:
|
|
1372
|
-
removeSummary:
|
|
1373
|
-
renderSummary:
|
|
1374
|
-
selectSummary:
|
|
1375
|
-
unselectSummary:
|
|
1340
|
+
createSummary: qt,
|
|
1341
|
+
editSummary: It,
|
|
1342
|
+
removeSummary: Rt,
|
|
1343
|
+
renderSummary: Ft,
|
|
1344
|
+
selectSummary: Vt,
|
|
1345
|
+
unselectSummary: Wt
|
|
1376
1346
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1377
|
-
function
|
|
1347
|
+
function Xt(e, t) {
|
|
1378
1348
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1379
|
-
return
|
|
1349
|
+
return _(n, {
|
|
1380
1350
|
version: "1.1",
|
|
1381
1351
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1382
|
-
height:
|
|
1383
|
-
width:
|
|
1352
|
+
height: e,
|
|
1353
|
+
width: t
|
|
1384
1354
|
}), n;
|
|
1385
1355
|
}
|
|
1386
|
-
function
|
|
1387
|
-
return (parseInt(
|
|
1356
|
+
function Gt(e, t) {
|
|
1357
|
+
return (parseInt(e) - parseInt(t)) / 2;
|
|
1388
1358
|
}
|
|
1389
|
-
function
|
|
1359
|
+
function Kt(e, t, n, o) {
|
|
1390
1360
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1391
|
-
let
|
|
1392
|
-
return
|
|
1361
|
+
let i = "";
|
|
1362
|
+
return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
|
|
1393
1363
|
`).forEach((l, c) => {
|
|
1394
|
-
const
|
|
1395
|
-
|
|
1396
|
-
x: n + parseInt(
|
|
1397
|
-
y:
|
|
1364
|
+
const d = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1365
|
+
_(d, {
|
|
1366
|
+
x: n + parseInt(t.paddingLeft) + "",
|
|
1367
|
+
y: o + parseInt(t.paddingTop) + Gt(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
1398
1368
|
"text-anchor": "start",
|
|
1399
|
-
"font-family":
|
|
1400
|
-
"font-size": `${
|
|
1401
|
-
"font-weight": `${
|
|
1402
|
-
fill: `${
|
|
1403
|
-
}),
|
|
1369
|
+
"font-family": t.fontFamily,
|
|
1370
|
+
"font-size": `${t.fontSize}`,
|
|
1371
|
+
"font-weight": `${t.fontWeight}`,
|
|
1372
|
+
fill: `${t.color}`
|
|
1373
|
+
}), d.innerHTML = l, s.appendChild(d);
|
|
1404
1374
|
}), s;
|
|
1405
1375
|
}
|
|
1406
|
-
function
|
|
1376
|
+
function Ut(e, t, n, o) {
|
|
1377
|
+
var l;
|
|
1407
1378
|
let s = "";
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
x: n + parseInt(
|
|
1412
|
-
y:
|
|
1413
|
-
width:
|
|
1414
|
-
height:
|
|
1379
|
+
(l = e.nodeObj) != null && l.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
|
|
1380
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
1381
|
+
_(i, {
|
|
1382
|
+
x: n + parseInt(t.paddingLeft) + "",
|
|
1383
|
+
y: o + parseInt(t.paddingTop) + "",
|
|
1384
|
+
width: t.width,
|
|
1385
|
+
height: t.height
|
|
1415
1386
|
});
|
|
1416
1387
|
const r = document.createElement("div");
|
|
1417
|
-
return
|
|
1388
|
+
return _(r, {
|
|
1418
1389
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1419
|
-
style: `font-family: ${
|
|
1420
|
-
}), r.innerHTML = s,
|
|
1390
|
+
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
1391
|
+
}), r.innerHTML = s, i.appendChild(r), i;
|
|
1421
1392
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1393
|
+
function J(e, t, n = !1) {
|
|
1394
|
+
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = O(e.nodes, t), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1395
|
+
_(r, {
|
|
1425
1396
|
x: s + "",
|
|
1426
|
-
y:
|
|
1427
|
-
rx:
|
|
1428
|
-
ry:
|
|
1429
|
-
width:
|
|
1430
|
-
height:
|
|
1431
|
-
fill:
|
|
1432
|
-
stroke:
|
|
1433
|
-
"stroke-width":
|
|
1397
|
+
y: i + "",
|
|
1398
|
+
rx: o.borderRadius,
|
|
1399
|
+
ry: o.borderRadius,
|
|
1400
|
+
width: o.width,
|
|
1401
|
+
height: o.height,
|
|
1402
|
+
fill: o.backgroundColor,
|
|
1403
|
+
stroke: o.borderColor,
|
|
1404
|
+
"stroke-width": o.borderWidth
|
|
1434
1405
|
});
|
|
1435
1406
|
const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1436
1407
|
l.appendChild(r);
|
|
1437
1408
|
let c;
|
|
1438
|
-
return n ? c =
|
|
1409
|
+
return n ? c = Ut(t, o, s, i) : c = Kt(t, o, s, i), l.appendChild(c), l;
|
|
1439
1410
|
}
|
|
1440
|
-
function
|
|
1441
|
-
const n = getComputedStyle(
|
|
1442
|
-
return
|
|
1443
|
-
x:
|
|
1411
|
+
function Jt(e, t) {
|
|
1412
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = O(e.nodes, t), i = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1413
|
+
return _(r, {
|
|
1414
|
+
x: o + "",
|
|
1444
1415
|
y: s + parseInt(n.fontSize) + "",
|
|
1445
1416
|
"text-anchor": "start",
|
|
1446
1417
|
"font-family": n.fontFamily,
|
|
1447
1418
|
"font-size": `${n.fontSize}`,
|
|
1448
1419
|
"font-weight": `${n.fontWeight}`,
|
|
1449
1420
|
fill: `${n.color}`
|
|
1450
|
-
}), r.innerHTML =
|
|
1421
|
+
}), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
|
|
1451
1422
|
}
|
|
1452
|
-
const
|
|
1453
|
-
var
|
|
1454
|
-
const n =
|
|
1455
|
-
|
|
1423
|
+
const Y = 100, Qt = '<?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">', Zt = (e, t = !1) => {
|
|
1424
|
+
var u, a, p;
|
|
1425
|
+
const n = e.nodes, o = n.offsetHeight + Y * 2, s = n.offsetWidth + Y * 2, i = Xt(o + "px", s + "px"), r = document.createElementNS("http://www.w3.org/2000/svg", "svg"), l = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1426
|
+
_(l, {
|
|
1456
1427
|
x: "0",
|
|
1457
1428
|
y: "0",
|
|
1458
1429
|
width: `${s}`,
|
|
1459
|
-
height: `${
|
|
1460
|
-
fill:
|
|
1461
|
-
}),
|
|
1462
|
-
const
|
|
1463
|
-
|
|
1430
|
+
height: `${o}`,
|
|
1431
|
+
fill: e.theme.cssVar["--bgcolor"]
|
|
1432
|
+
}), i.appendChild(l), n.querySelectorAll(".subLines").forEach((g) => {
|
|
1433
|
+
const f = g.cloneNode(!0), { offsetLeft: m, offsetTop: v } = O(n, g.parentElement);
|
|
1434
|
+
f.setAttribute("x", `${m}`), f.setAttribute("y", `${v}`), r.appendChild(f);
|
|
1464
1435
|
});
|
|
1465
|
-
const c = (
|
|
1436
|
+
const c = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
|
|
1466
1437
|
c && r.appendChild(c);
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
const h = (
|
|
1438
|
+
const d = (a = n.querySelector(".topiclinks")) == null ? void 0 : a.cloneNode(!0);
|
|
1439
|
+
d && r.appendChild(d);
|
|
1440
|
+
const h = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
1470
1441
|
return h && r.appendChild(h), n.querySelectorAll("me-tpc").forEach((g) => {
|
|
1471
|
-
r.appendChild(
|
|
1442
|
+
r.appendChild(J(e, g, !t));
|
|
1472
1443
|
}), n.querySelectorAll(".tags > span").forEach((g) => {
|
|
1473
|
-
r.appendChild(
|
|
1444
|
+
r.appendChild(J(e, g));
|
|
1474
1445
|
}), n.querySelectorAll(".icons > span").forEach((g) => {
|
|
1475
|
-
r.appendChild(
|
|
1446
|
+
r.appendChild(J(e, g));
|
|
1476
1447
|
}), n.querySelectorAll(".hyper-link").forEach((g) => {
|
|
1477
|
-
r.appendChild(
|
|
1478
|
-
}),
|
|
1479
|
-
x:
|
|
1480
|
-
y:
|
|
1448
|
+
r.appendChild(Jt(e, g));
|
|
1449
|
+
}), _(r, {
|
|
1450
|
+
x: Y + "",
|
|
1451
|
+
y: Y + "",
|
|
1481
1452
|
overflow: "visible"
|
|
1482
|
-
}),
|
|
1483
|
-
};
|
|
1484
|
-
function
|
|
1485
|
-
return new Promise((
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
},
|
|
1453
|
+
}), i.appendChild(r), i;
|
|
1454
|
+
}, en = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Qt + e.outerHTML);
|
|
1455
|
+
function tn(e) {
|
|
1456
|
+
return new Promise((t, n) => {
|
|
1457
|
+
const o = new FileReader();
|
|
1458
|
+
o.onload = (s) => {
|
|
1459
|
+
t(s.target.result);
|
|
1460
|
+
}, o.onerror = (s) => {
|
|
1490
1461
|
n(s);
|
|
1491
|
-
},
|
|
1462
|
+
}, o.readAsDataURL(e);
|
|
1492
1463
|
});
|
|
1493
1464
|
}
|
|
1494
|
-
const
|
|
1495
|
-
const
|
|
1496
|
-
return new Blob([
|
|
1497
|
-
},
|
|
1498
|
-
const
|
|
1499
|
-
return new Promise((s,
|
|
1465
|
+
const nn = function(e = !1, t) {
|
|
1466
|
+
const n = Zt(this, e), o = en(n, t);
|
|
1467
|
+
return new Blob([o], { type: "image/svg+xml" });
|
|
1468
|
+
}, on = async function(e = !1, t) {
|
|
1469
|
+
const n = this.exportSvg(e, t), o = await tn(n);
|
|
1470
|
+
return new Promise((s, i) => {
|
|
1500
1471
|
const r = new Image();
|
|
1501
1472
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
1502
1473
|
const l = document.createElement("canvas");
|
|
1503
1474
|
l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(s, "image/png", 1);
|
|
1504
|
-
}, r.src =
|
|
1475
|
+
}, r.src = o, r.onerror = i;
|
|
1505
1476
|
});
|
|
1506
|
-
},
|
|
1477
|
+
}, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1507
1478
|
__proto__: null,
|
|
1508
|
-
exportPng:
|
|
1509
|
-
exportSvg:
|
|
1510
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1511
|
-
getObjById:
|
|
1512
|
-
generateNewObj:
|
|
1513
|
-
layout:
|
|
1514
|
-
linkDiv:
|
|
1515
|
-
editTopic:
|
|
1479
|
+
exportPng: on,
|
|
1480
|
+
exportSvg: nn
|
|
1481
|
+
}, Symbol.toStringTag, { value: "Module" })), rn = {}, ln = {
|
|
1482
|
+
getObjById: X,
|
|
1483
|
+
generateNewObj: Ne,
|
|
1484
|
+
layout: ke,
|
|
1485
|
+
linkDiv: Ve,
|
|
1486
|
+
editTopic: Oe,
|
|
1516
1487
|
createWrapper: Pe,
|
|
1517
1488
|
createParent: Be,
|
|
1518
1489
|
createChildren: ze,
|
|
1519
|
-
createTopic:
|
|
1520
|
-
findEle:
|
|
1521
|
-
changeTheme:
|
|
1522
|
-
|
|
1523
|
-
...
|
|
1524
|
-
...
|
|
1525
|
-
...
|
|
1526
|
-
...
|
|
1527
|
-
init(
|
|
1528
|
-
if (!
|
|
1490
|
+
createTopic: je,
|
|
1491
|
+
findEle: S,
|
|
1492
|
+
changeTheme: Ze,
|
|
1493
|
+
...St,
|
|
1494
|
+
...rn,
|
|
1495
|
+
...Pt,
|
|
1496
|
+
...Yt,
|
|
1497
|
+
...sn,
|
|
1498
|
+
init(e) {
|
|
1499
|
+
if (!e || !e.nodeData)
|
|
1529
1500
|
return new Error("MindElixir: `data` is required");
|
|
1530
|
-
|
|
1501
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, ee(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Ie(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
1531
1502
|
}
|
|
1532
|
-
}
|
|
1533
|
-
function
|
|
1534
|
-
|
|
1535
|
-
|
|
1503
|
+
};
|
|
1504
|
+
function cn({ x1: e, y1: t, x2: n, y2: o }) {
|
|
1505
|
+
return `M ${e} ${t} Q ${e} ${o} ${n} ${o}`;
|
|
1506
|
+
}
|
|
1507
|
+
function an({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, isFirst: d }) {
|
|
1508
|
+
let h = 0, u = 0;
|
|
1509
|
+
d ? h = e + o / 2 : h = e + o;
|
|
1510
|
+
const a = s + l;
|
|
1511
|
+
let p = 0, g = 0, f = 0;
|
|
1512
|
+
const m = Math.abs(h - a) / 300 * N;
|
|
1513
|
+
return c === "lhs" ? (f = t, p = f + N, g = f - N, u = i + N, `M ${p} ${h} C ${f} ${h} ${f + m} ${a} ${g} ${a} H ${u}`) : (f = t + n, p = f - N, g = f + N, u = i + r - N, `M ${p} ${h} C ${f} ${h} ${f - m} ${a} ${g} ${a} H ${u}`);
|
|
1514
|
+
}
|
|
1515
|
+
const R = document;
|
|
1516
|
+
function L({
|
|
1517
|
+
el: e,
|
|
1518
|
+
direction: t,
|
|
1536
1519
|
locale: n,
|
|
1537
|
-
draggable:
|
|
1520
|
+
draggable: o,
|
|
1538
1521
|
editable: s,
|
|
1539
|
-
contextMenu:
|
|
1522
|
+
contextMenu: i,
|
|
1540
1523
|
contextMenuOption: r,
|
|
1541
1524
|
toolBar: l,
|
|
1542
1525
|
keypress: c,
|
|
1543
|
-
mouseSelectionButton:
|
|
1526
|
+
mouseSelectionButton: d,
|
|
1544
1527
|
before: h,
|
|
1545
|
-
newTopicName:
|
|
1528
|
+
newTopicName: u,
|
|
1546
1529
|
allowUndo: a,
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
overflowHidden:
|
|
1530
|
+
generateMainBranch: p,
|
|
1531
|
+
generateSubBranch: g,
|
|
1532
|
+
overflowHidden: f,
|
|
1550
1533
|
mobileMenu: m,
|
|
1551
1534
|
theme: v
|
|
1552
1535
|
}) {
|
|
1553
|
-
console.log("ME_version " +
|
|
1536
|
+
console.log("ME_version " + L.version, this);
|
|
1554
1537
|
let y = null;
|
|
1555
|
-
const
|
|
1556
|
-
if (
|
|
1538
|
+
const b = Object.prototype.toString.call(e);
|
|
1539
|
+
if (b === "[object HTMLDivElement]" ? y = e : b === "[object String]" && (y = document.querySelector(e)), !y)
|
|
1557
1540
|
throw new Error("MindElixir: el is not a valid element");
|
|
1558
|
-
y.className += " mind-elixir", y.innerHTML = "", y.style.setProperty("--gap",
|
|
1541
|
+
y.className += " mind-elixir", y.innerHTML = "", y.style.setProperty("--gap", N + "px"), this.mindElixirBox = y, this.before = h || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = d || 0, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = u || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = a === void 0 ? !1 : a, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = p || cn, this.generateSubBranch = g || an, this.overflowHidden = f || !1, this.bus = Ae.create(), this.container = R.createElement("div"), this.container.className = "map-container";
|
|
1559
1542
|
const E = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1560
|
-
this.theme = v || (E.matches ?
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1543
|
+
this.theme = v || (E.matches ? ge : me);
|
|
1544
|
+
const w = R.createElement("div");
|
|
1545
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = R.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = V("lines"), this.summarySvg = V("summary"), this.linkController = V("linkcontroller"), this.P2 = R.createElement("div"), this.P3 = R.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = re(), this.line2 = re(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = V("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : $e(this);
|
|
1563
1546
|
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1547
|
+
L.prototype = ln;
|
|
1548
|
+
L.LEFT = j;
|
|
1549
|
+
L.RIGHT = Q;
|
|
1550
|
+
L.SIDE = Z;
|
|
1551
|
+
L.THEME = me;
|
|
1552
|
+
L.DARK_THEME = ge;
|
|
1553
|
+
L.version = "3.3.2";
|
|
1554
|
+
L.E = S;
|
|
1572
1555
|
export {
|
|
1573
|
-
|
|
1556
|
+
L as default
|
|
1574
1557
|
};
|