mind-elixir 4.3.6 → 4.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MindElixir.iife.js +12 -12
- package/dist/MindElixir.js +873 -859
- package/dist/MindElixirLite.iife.js +7 -7
- package/dist/MindElixirLite.js +904 -452
- package/dist/example.iife.js +2 -2
- package/dist/example.js +44 -8
- package/dist/types/arrow.d.ts +12 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/methods.d.ts +2 -1
- package/dist/types/types/dom.d.ts +1 -1
- package/dist/types/utils/svg.d.ts +1 -1
- package/package.json +3 -3
package/dist/MindElixir.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.mind-elixir .context-menu .menu-list li span{line-height:20px}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none}.mind-elixir .context-menu .menu-list li:hover{filter:brightness(.95)}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.mind-elixir .context-menu .menu-list li span{line-height:20px}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none}.mind-elixir .context-menu .menu-list li:hover{filter:brightness(.95)}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
(function(e) {
|
|
3
|
-
var t, n, o, s, i, r, c = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
3
|
+
var t, n, o, i, s, r, c = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
4
4
|
if (l && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
@@ -10,26 +10,26 @@
|
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function d() {
|
|
14
|
+
s || (s = !0, o());
|
|
15
15
|
}
|
|
16
16
|
t = function() {
|
|
17
|
-
var
|
|
18
|
-
(
|
|
17
|
+
var h, u, a, p;
|
|
18
|
+
(p = document.createElement("div")).innerHTML = c, c = 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));
|
|
19
19
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
20
20
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
21
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t,
|
|
21
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, i = e.document, s = !1, (r = function() {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
i.documentElement.doScroll("left");
|
|
24
24
|
} catch {
|
|
25
25
|
return void setTimeout(r, 50);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
})(),
|
|
29
|
-
|
|
27
|
+
d();
|
|
28
|
+
})(), i.onreadystatechange = function() {
|
|
29
|
+
i.readyState == "complete" && (i.onreadystatechange = null, d());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
|
-
const
|
|
32
|
+
const $ = 0, P = 1, ae = 2, Pe = {
|
|
33
33
|
name: "Latte",
|
|
34
34
|
type: "light",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
@@ -43,7 +43,7 @@ const L = 0, $ = 1, re = 2, Pe = {
|
|
|
43
43
|
"--panel-bgcolor": "#ffffff",
|
|
44
44
|
"--panel-border-color": "#eaeaea"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
46
|
+
}, Be = {
|
|
47
47
|
name: "Dark",
|
|
48
48
|
type: "dark",
|
|
49
49
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
@@ -57,60 +57,60 @@ const L = 0, $ = 1, re = 2, Pe = {
|
|
|
57
57
|
"--panel-border-color": "#696969"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function ie(e) {
|
|
61
61
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const se = function(e, t) {
|
|
64
64
|
if (t.id === e)
|
|
65
65
|
return t;
|
|
66
66
|
if (t.children && t.children.length) {
|
|
67
67
|
for (let n = 0; n < t.children.length; n++) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = se(e, t.children[n]);
|
|
69
69
|
if (o)
|
|
70
70
|
return o;
|
|
71
71
|
}
|
|
72
72
|
return null;
|
|
73
73
|
} else
|
|
74
74
|
return null;
|
|
75
|
-
},
|
|
75
|
+
}, B = (e, t) => {
|
|
76
76
|
if (e.parent = t, e.children)
|
|
77
77
|
for (let n = 0; n < e.children.length; n++)
|
|
78
|
-
|
|
78
|
+
B(e.children[n], e);
|
|
79
79
|
};
|
|
80
|
-
function
|
|
81
|
-
if (e.id =
|
|
80
|
+
function pe(e) {
|
|
81
|
+
if (e.id = Z(), e.children)
|
|
82
82
|
for (let t = 0; t < e.children.length; t++)
|
|
83
|
-
|
|
83
|
+
pe(e.children[t]);
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const nt = (e, t) => {
|
|
86
86
|
let n = Date.now();
|
|
87
87
|
return function(...o) {
|
|
88
88
|
Date.now() - n < t || (e(...o), n = Date.now());
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
let r = Math.atan(Math.abs(
|
|
94
|
-
|
|
95
|
-
const c =
|
|
91
|
+
function re(e, t, n, o) {
|
|
92
|
+
const i = o - t, s = e - n;
|
|
93
|
+
let r = Math.atan(Math.abs(i) / Math.abs(s)) / 3.14 * 180;
|
|
94
|
+
s < 0 && i > 0 && (r = 180 - r), s < 0 && i < 0 && (r = 180 + r), s > 0 && i < 0 && (r = 360 - r);
|
|
95
|
+
const c = 12, l = 30, d = r + l, h = r - l;
|
|
96
96
|
return {
|
|
97
|
-
x1: n + Math.cos(Math.PI *
|
|
98
|
-
y1: o - Math.sin(Math.PI *
|
|
99
|
-
x2: n + Math.cos(Math.PI *
|
|
100
|
-
y2: o - Math.sin(Math.PI *
|
|
97
|
+
x1: n + Math.cos(Math.PI * d / 180) * c,
|
|
98
|
+
y1: o - Math.sin(Math.PI * d / 180) * c,
|
|
99
|
+
x2: n + Math.cos(Math.PI * h / 180) * c,
|
|
100
|
+
y2: o - Math.sin(Math.PI * h / 180) * c
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Z() {
|
|
104
104
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
105
105
|
}
|
|
106
|
-
const
|
|
107
|
-
const e =
|
|
106
|
+
const ot = function() {
|
|
107
|
+
const e = Z();
|
|
108
108
|
return {
|
|
109
109
|
topic: this.newTopicName,
|
|
110
110
|
id: e
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
|
-
function
|
|
113
|
+
function me(e) {
|
|
114
114
|
return JSON.parse(
|
|
115
115
|
JSON.stringify(e, (n, o) => {
|
|
116
116
|
if (n !== "parent")
|
|
@@ -118,15 +118,15 @@ function ue(e) {
|
|
|
118
118
|
})
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const R = (e, t) => {
|
|
122
122
|
let n = 0, o = 0;
|
|
123
123
|
for (; t && t !== e; )
|
|
124
124
|
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
125
125
|
return { offsetLeft: n, offsetTop: o };
|
|
126
|
-
},
|
|
126
|
+
}, N = (e, t) => {
|
|
127
127
|
for (const n in t)
|
|
128
128
|
e.setAttribute(n, t[n]);
|
|
129
|
-
},
|
|
129
|
+
}, he = (e) => e ? e.tagName === "ME-TPC" : !1, de = (e) => e.filter((t) => {
|
|
130
130
|
for (let n = 0; n < e.length; n++) {
|
|
131
131
|
if (t === e[n])
|
|
132
132
|
continue;
|
|
@@ -134,7 +134,7 @@ const P = (e, t) => {
|
|
|
134
134
|
return !1;
|
|
135
135
|
}
|
|
136
136
|
return !0;
|
|
137
|
-
}),
|
|
137
|
+
}), k = {
|
|
138
138
|
moved: !1,
|
|
139
139
|
// diffrentiate click and move
|
|
140
140
|
mousedown: !1,
|
|
@@ -153,26 +153,26 @@ const P = (e, t) => {
|
|
|
153
153
|
};
|
|
154
154
|
function it(e) {
|
|
155
155
|
e.map.addEventListener("click", (t) => {
|
|
156
|
-
var o,
|
|
156
|
+
var o, i;
|
|
157
157
|
if (t.button !== 0)
|
|
158
158
|
return;
|
|
159
159
|
if ((o = e.helper1) != null && o.moved) {
|
|
160
160
|
e.helper1.clear();
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
if ((
|
|
163
|
+
if ((i = e.helper2) != null && i.moved) {
|
|
164
164
|
e.helper2.clear();
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
if (
|
|
168
|
-
|
|
167
|
+
if (k.moved) {
|
|
168
|
+
k.clear();
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
e.clearSelection();
|
|
172
172
|
const n = t.target;
|
|
173
173
|
if (n.tagName === "ME-EPD")
|
|
174
174
|
e.expandNode(n.previousSibling);
|
|
175
|
-
else if (
|
|
175
|
+
else if (he(n))
|
|
176
176
|
e.selectNode(n, !1, t);
|
|
177
177
|
else if (e.editable)
|
|
178
178
|
n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectArrow(n.parentElement) : e.selectSummary(n.parentElement) : n.className;
|
|
@@ -182,21 +182,21 @@ function it(e) {
|
|
|
182
182
|
if (!e.editable)
|
|
183
183
|
return;
|
|
184
184
|
const n = t.target;
|
|
185
|
-
|
|
185
|
+
he(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editArrowLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
186
186
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
187
|
-
t.target.contentEditable !== "true" &&
|
|
187
|
+
t.target.contentEditable !== "true" && k.onMove(t, e.container);
|
|
188
188
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
189
189
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
190
|
-
t.button === n && t.target.contentEditable !== "true" && (
|
|
190
|
+
t.button === n && t.target.contentEditable !== "true" && (k.moved = !1, k.mousedown = !0);
|
|
191
191
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
192
192
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
193
|
-
t.button === n &&
|
|
193
|
+
t.button === n && k.clear();
|
|
194
194
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
195
195
|
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
196
|
-
t.button === n &&
|
|
196
|
+
t.button === n && k.clear();
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const st = {
|
|
200
200
|
create() {
|
|
201
201
|
return {
|
|
202
202
|
handlers: {},
|
|
@@ -225,44 +225,44 @@ const rt = {
|
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
var
|
|
229
|
-
const
|
|
228
|
+
var L = /* @__PURE__ */ ((e) => (e.LHS = "lhs", e.RHS = "rhs", e))(L || {});
|
|
229
|
+
const ce = document, rt = function() {
|
|
230
230
|
this.nodes.innerHTML = "";
|
|
231
231
|
const e = this.createTopic(this.nodeData);
|
|
232
|
-
|
|
233
|
-
const t =
|
|
232
|
+
ge(e, this.nodeData), e.draggable = !1;
|
|
233
|
+
const t = ce.createElement("me-root");
|
|
234
234
|
t.appendChild(e);
|
|
235
235
|
const n = this.nodeData.children || [];
|
|
236
|
-
if (this.direction ===
|
|
237
|
-
let o = 0,
|
|
238
|
-
n.map((
|
|
239
|
-
|
|
236
|
+
if (this.direction === ae) {
|
|
237
|
+
let o = 0, i = 0;
|
|
238
|
+
n.map((s) => {
|
|
239
|
+
s.direction === $ ? o += 1 : s.direction === P ? i += 1 : o <= i ? (s.direction = $, o += 1) : (s.direction = P, i += 1);
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
const o =
|
|
245
|
-
o.className =
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
for (let
|
|
249
|
-
const r = t[
|
|
250
|
-
e.direction ===
|
|
251
|
-
}
|
|
252
|
-
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(
|
|
253
|
-
},
|
|
254
|
-
const n =
|
|
242
|
+
ct(this, n, t);
|
|
243
|
+
}, ct = function(e, t, n) {
|
|
244
|
+
const o = ce.createElement("me-main");
|
|
245
|
+
o.className = L.LHS;
|
|
246
|
+
const i = ce.createElement("me-main");
|
|
247
|
+
i.className = L.RHS;
|
|
248
|
+
for (let s = 0; s < t.length; s++) {
|
|
249
|
+
const r = t[s], { grp: c } = e.createWrapper(r);
|
|
250
|
+
e.direction === ae ? r.direction === $ ? o.appendChild(c) : i.appendChild(c) : e.direction === $ ? o.appendChild(c) : i.appendChild(c);
|
|
251
|
+
}
|
|
252
|
+
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
|
|
253
|
+
}, lt = function(e, t) {
|
|
254
|
+
const n = ce.createElement("me-children");
|
|
255
255
|
for (let o = 0; o < t.length; o++) {
|
|
256
|
-
const
|
|
257
|
-
n.appendChild(
|
|
256
|
+
const i = t[o], { grp: s } = e.createWrapper(i);
|
|
257
|
+
n.appendChild(s);
|
|
258
258
|
}
|
|
259
259
|
return n;
|
|
260
|
-
},
|
|
261
|
-
const o = (t ? t.mindElixirBox :
|
|
260
|
+
}, T = document, C = (e, t) => {
|
|
261
|
+
const o = (t ? t.mindElixirBox : T).querySelector(`[data-nodeid=me${e}]`);
|
|
262
262
|
if (!o)
|
|
263
263
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
264
264
|
return o;
|
|
265
|
-
},
|
|
265
|
+
}, ge = function(e, t) {
|
|
266
266
|
if (e.innerHTML = "", t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.dangerouslySetInnerHTML) {
|
|
267
267
|
e.innerHTML = t.dangerouslySetInnerHTML;
|
|
268
268
|
return;
|
|
@@ -270,60 +270,60 @@ const se = document, ct = function() {
|
|
|
270
270
|
if (t.image) {
|
|
271
271
|
const n = t.image;
|
|
272
272
|
if (n.url && n.width && n.height) {
|
|
273
|
-
const o =
|
|
273
|
+
const o = T.createElement("img");
|
|
274
274
|
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", n.fit && (o.style.objectFit = n.fit), e.appendChild(o), e.image = o;
|
|
275
275
|
}
|
|
276
276
|
} else
|
|
277
277
|
e.image && (e.image = void 0);
|
|
278
278
|
{
|
|
279
|
-
const n =
|
|
279
|
+
const n = T.createElement("span");
|
|
280
280
|
n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
|
|
281
281
|
}
|
|
282
282
|
if (t.hyperLink) {
|
|
283
|
-
const n =
|
|
283
|
+
const n = T.createElement("a");
|
|
284
284
|
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.link = n;
|
|
285
285
|
} else
|
|
286
286
|
e.link && (e.link = void 0);
|
|
287
287
|
if (t.icons && t.icons.length) {
|
|
288
|
-
const n =
|
|
289
|
-
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${
|
|
288
|
+
const n = T.createElement("span");
|
|
289
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ie(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
290
290
|
} else
|
|
291
291
|
e.icons && (e.icons = void 0);
|
|
292
292
|
if (t.tags && t.tags.length) {
|
|
293
|
-
const n =
|
|
294
|
-
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${
|
|
293
|
+
const n = T.createElement("div");
|
|
294
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ie(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
295
295
|
} else
|
|
296
296
|
e.tags && (e.tags = void 0);
|
|
297
|
-
},
|
|
298
|
-
const n =
|
|
297
|
+
}, at = function(e, t) {
|
|
298
|
+
const n = T.createElement("me-wrapper"), { p: o, tpc: i } = this.createParent(e);
|
|
299
299
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
300
|
-
const
|
|
301
|
-
if (o.appendChild(
|
|
302
|
-
const r =
|
|
300
|
+
const s = ve(e.expanded);
|
|
301
|
+
if (o.appendChild(s), e.expanded !== !1) {
|
|
302
|
+
const r = lt(this, e.children);
|
|
303
303
|
n.appendChild(r);
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
return { grp: n, top: o, tpc:
|
|
306
|
+
return { grp: n, top: o, tpc: i };
|
|
307
|
+
}, dt = function(e) {
|
|
308
|
+
const t = T.createElement("me-parent"), n = this.createTopic(e);
|
|
309
|
+
return ge(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
307
310
|
}, ht = function(e) {
|
|
308
|
-
const t =
|
|
309
|
-
return fe(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
310
|
-
}, ut = function(e) {
|
|
311
|
-
const t = M.createElement("me-children");
|
|
311
|
+
const t = T.createElement("me-children");
|
|
312
312
|
return t.append(...e), t;
|
|
313
|
-
},
|
|
314
|
-
const t =
|
|
313
|
+
}, ut = function(e) {
|
|
314
|
+
const t = T.createElement("me-tpc");
|
|
315
315
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
316
316
|
};
|
|
317
317
|
function Re(e) {
|
|
318
|
-
const t =
|
|
318
|
+
const t = T.createRange();
|
|
319
319
|
t.selectNodeContents(e);
|
|
320
320
|
const n = window.getSelection();
|
|
321
321
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
322
322
|
}
|
|
323
|
-
const
|
|
323
|
+
const ft = function(e) {
|
|
324
324
|
if (!e)
|
|
325
325
|
return;
|
|
326
|
-
const t =
|
|
326
|
+
const t = T.createElement("div"), n = e.text.textContent;
|
|
327
327
|
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1;
|
|
328
328
|
const o = getComputedStyle(e);
|
|
329
329
|
t.style.cssText = `min-width:${e.offsetWidth - 8}px;
|
|
@@ -332,73 +332,72 @@ const pt = function(e) {
|
|
|
332
332
|
margin:${o.margin};
|
|
333
333
|
font:${o.font};
|
|
334
334
|
background-color:${o.backgroundColor !== "rgba(0, 0, 0, 0)" && o.backgroundColor};
|
|
335
|
-
border-radius:${o.borderRadius};`, this.direction ===
|
|
335
|
+
border-radius:${o.borderRadius};`, this.direction === $ && (t.style.right = "0"), t.focus(), Re(t), this.bus.fire("operation", {
|
|
336
336
|
name: "beginEdit",
|
|
337
337
|
obj: e.nodeObj
|
|
338
|
-
}), t.addEventListener("keydown", (
|
|
339
|
-
|
|
340
|
-
const
|
|
341
|
-
if (
|
|
342
|
-
if (
|
|
338
|
+
}), t.addEventListener("keydown", (i) => {
|
|
339
|
+
i.stopPropagation();
|
|
340
|
+
const s = i.key;
|
|
341
|
+
if (s === "Enter" || s === "Tab") {
|
|
342
|
+
if (i.shiftKey)
|
|
343
343
|
return;
|
|
344
|
-
|
|
344
|
+
i.preventDefault(), t.blur(), this.map.focus();
|
|
345
345
|
}
|
|
346
346
|
}), t.addEventListener("blur", () => {
|
|
347
347
|
var r;
|
|
348
348
|
if (!t)
|
|
349
349
|
return;
|
|
350
|
-
const
|
|
351
|
-
|
|
350
|
+
const i = e.nodeObj, s = ((r = t.textContent) == null ? void 0 : r.trim()) || "";
|
|
351
|
+
s === "" ? i.topic = n : i.topic = s, t.remove(), s !== n && (e.text.textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
352
352
|
name: "finishEdit",
|
|
353
|
-
obj:
|
|
353
|
+
obj: i,
|
|
354
354
|
origin: n
|
|
355
355
|
}));
|
|
356
356
|
});
|
|
357
|
-
},
|
|
358
|
-
const t =
|
|
357
|
+
}, ve = function(e) {
|
|
358
|
+
const t = T.createElement("me-epd");
|
|
359
359
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
360
|
-
},
|
|
361
|
-
const o =
|
|
362
|
-
return
|
|
360
|
+
}, G = document, J = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
|
|
361
|
+
const o = G.createElementNS(J, "path");
|
|
362
|
+
return N(o, {
|
|
363
363
|
d: e,
|
|
364
364
|
stroke: t || "#666",
|
|
365
365
|
fill: "none",
|
|
366
366
|
"stroke-width": n
|
|
367
367
|
}), o;
|
|
368
|
-
},
|
|
369
|
-
const t =
|
|
368
|
+
}, X = function(e) {
|
|
369
|
+
const t = G.createElementNS(J, "svg");
|
|
370
370
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
371
|
-
},
|
|
372
|
-
const e =
|
|
371
|
+
}, Ee = function() {
|
|
372
|
+
const e = G.createElementNS(J, "line");
|
|
373
373
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
374
|
-
},
|
|
375
|
-
const
|
|
374
|
+
}, pt = function(e, t, n) {
|
|
375
|
+
const o = {
|
|
376
376
|
stroke: "rgb(235, 95, 82)",
|
|
377
377
|
fill: "none",
|
|
378
378
|
"stroke-linecap": "cap",
|
|
379
379
|
"stroke-width": "2"
|
|
380
|
-
},
|
|
381
|
-
return
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}), o.appendChild(s), o.appendChild(i), o;
|
|
380
|
+
}, i = G.createElementNS(J, "g");
|
|
381
|
+
return [e, t, n].forEach((s, r) => {
|
|
382
|
+
const c = G.createElementNS(J, "path"), l = {
|
|
383
|
+
d: s,
|
|
384
|
+
...o
|
|
385
|
+
};
|
|
386
|
+
N(c, l), r === 0 && c.setAttribute("stroke-dasharray", "8,2"), i.appendChild(c);
|
|
387
|
+
}), i;
|
|
389
388
|
}, Fe = function(e, t, n) {
|
|
390
389
|
if (!t)
|
|
391
390
|
return;
|
|
392
391
|
const o = document.createElement("div");
|
|
393
392
|
e.nodes.appendChild(o);
|
|
394
|
-
const
|
|
395
|
-
o.id = "input-box", o.textContent =
|
|
396
|
-
const
|
|
393
|
+
const i = t.innerHTML;
|
|
394
|
+
o.id = "input-box", o.textContent = i, o.contentEditable = "true", o.spellcheck = !1;
|
|
395
|
+
const s = t.getBBox();
|
|
397
396
|
o.style.cssText = `
|
|
398
|
-
min-width:${Math.max(88,
|
|
397
|
+
min-width:${Math.max(88, s.width)}px;
|
|
399
398
|
position:absolute;
|
|
400
|
-
left:${
|
|
401
|
-
top:${
|
|
399
|
+
left:${s.x}px;
|
|
400
|
+
top:${s.y}px;
|
|
402
401
|
padding: 2px 4px;
|
|
403
402
|
margin: -2px -4px;
|
|
404
403
|
`, o.focus(), Re(o), o.addEventListener("keydown", (r) => {
|
|
@@ -412,38 +411,38 @@ const pt = function(e) {
|
|
|
412
411
|
}), o.addEventListener("blur", () => {
|
|
413
412
|
o && n(o);
|
|
414
413
|
});
|
|
415
|
-
},
|
|
416
|
-
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft,
|
|
417
|
-
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o -
|
|
414
|
+
}, mt = function(e) {
|
|
415
|
+
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, i = t.offsetWidth, s = t.offsetHeight;
|
|
416
|
+
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o - i / 2}px`;
|
|
418
417
|
const r = this.map.querySelectorAll("me-main > me-wrapper");
|
|
419
418
|
this.lines.innerHTML = "";
|
|
420
419
|
for (let c = 0; c < r.length; c++) {
|
|
421
|
-
const l = r[c],
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
if (
|
|
420
|
+
const l = r[c], d = l.querySelector("me-tpc"), { offsetLeft: h, offsetTop: u } = R(this.nodes, d), a = d.offsetWidth, p = d.offsetHeight, m = l.parentNode.className, v = this.generateMainBranch({ pT: n, pL: o, pW: i, pH: s, cT: u, cL: h, cW: a, cH: p, direction: m, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, f = d.nodeObj.branchColor || g[c % g.length];
|
|
421
|
+
d.style.borderColor = f, this.lines.appendChild(ze(v, f, "3"));
|
|
422
|
+
const b = l.children[0].children[1];
|
|
423
|
+
if (b && (b.style.top = (b.parentNode.offsetHeight - b.offsetHeight) / 2 + "px", m === L.LHS ? b.style.left = "-10px" : b.style.right = "-10px"), e && e !== l)
|
|
425
424
|
continue;
|
|
426
|
-
const
|
|
427
|
-
|
|
425
|
+
const x = X("subLines"), S = l.lastChild;
|
|
426
|
+
S.tagName === "svg" && S.remove(), l.appendChild(x), qe(this, x, f, l, m, !0);
|
|
428
427
|
}
|
|
429
428
|
this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
430
|
-
}, qe = function(e, t, n, o,
|
|
429
|
+
}, qe = function(e, t, n, o, i, s) {
|
|
431
430
|
const r = o.firstChild, c = o.children[1].children;
|
|
432
431
|
if (c.length === 0)
|
|
433
432
|
return;
|
|
434
|
-
const l = r.offsetTop,
|
|
435
|
-
for (let
|
|
436
|
-
const
|
|
437
|
-
t.appendChild(ze(
|
|
438
|
-
const
|
|
439
|
-
if (
|
|
440
|
-
if (
|
|
433
|
+
const l = r.offsetTop, d = r.offsetLeft, h = r.offsetWidth, u = r.offsetHeight;
|
|
434
|
+
for (let a = 0; a < c.length; a++) {
|
|
435
|
+
const p = c[a], m = p.firstChild, v = m.offsetTop, g = m.offsetLeft, f = m.offsetWidth, b = m.offsetHeight, x = m.firstChild.nodeObj.branchColor || n, S = e.generateSubBranch({ pT: l, pL: d, pW: h, pH: u, cT: v, cL: g, cW: f, cH: b, direction: i, isFirst: s });
|
|
436
|
+
t.appendChild(ze(S, x, "2"));
|
|
437
|
+
const y = m.children[1];
|
|
438
|
+
if (y) {
|
|
439
|
+
if (y.style.bottom = -(y.offsetHeight / 2) + "px", i === L.LHS ? y.style.left = "10px" : i === L.RHS && (y.style.right = "10px"), !y.expanded)
|
|
441
440
|
continue;
|
|
442
441
|
} else
|
|
443
442
|
continue;
|
|
444
|
-
qe(e, t,
|
|
443
|
+
qe(e, t, x, p, i);
|
|
445
444
|
}
|
|
446
|
-
},
|
|
445
|
+
}, Ne = {
|
|
447
446
|
addChild: "插入子节点",
|
|
448
447
|
addParent: "插入父节点",
|
|
449
448
|
addSibling: "插入同级节点",
|
|
@@ -455,9 +454,9 @@ const pt = function(e) {
|
|
|
455
454
|
link: "连接",
|
|
456
455
|
clickTips: "请点击目标节点",
|
|
457
456
|
summary: "摘要"
|
|
458
|
-
},
|
|
459
|
-
cn:
|
|
460
|
-
zh_CN:
|
|
457
|
+
}, Ce = {
|
|
458
|
+
cn: Ne,
|
|
459
|
+
zh_CN: Ne,
|
|
461
460
|
zh_TW: {
|
|
462
461
|
addChild: "插入子節點",
|
|
463
462
|
addParent: "插入父節點",
|
|
@@ -576,106 +575,108 @@ const pt = function(e) {
|
|
|
576
575
|
summary: "요약"
|
|
577
576
|
}
|
|
578
577
|
};
|
|
579
|
-
function
|
|
580
|
-
const n = (
|
|
581
|
-
const
|
|
582
|
-
return
|
|
583
|
-
}, o = (
|
|
584
|
-
const
|
|
585
|
-
return
|
|
586
|
-
},
|
|
587
|
-
if (
|
|
588
|
-
for (let
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
|
|
578
|
+
function gt(e, t) {
|
|
579
|
+
const n = (y) => {
|
|
580
|
+
const w = document.createElement("div");
|
|
581
|
+
return w.innerText = y, w.className = "tips", w;
|
|
582
|
+
}, o = (y, w, _) => {
|
|
583
|
+
const M = document.createElement("li");
|
|
584
|
+
return M.id = y, M.innerHTML = `<span>${ie(w)}</span><span ${_ ? 'class="key"' : ""}>${ie(_)}</span>`, M;
|
|
585
|
+
}, i = Ce[e.locale] ? e.locale : "en", s = Ce[i], r = o("cm-add_child", s.addChild, "Tab"), c = o("cm-add_parent", s.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", s.addSibling, "Enter"), d = o("cm-remove_child", s.removeNode, "Delete"), h = o("cm-fucus", s.focus, ""), u = o("cm-unfucus", s.cancelFocus, ""), a = o("cm-up", s.moveUp, "PgUp"), p = o("cm-down", s.moveDown, "Pgdn"), m = o("cm-link", s.link, ""), v = o("cm-link-bidirectional", "Bidreactional Link", ""), g = o("cm-summary", s.summary, ""), f = document.createElement("ul");
|
|
586
|
+
if (f.className = "menu-list", f.appendChild(r), f.appendChild(c), f.appendChild(l), f.appendChild(d), (!t || t.focus) && (f.appendChild(h), f.appendChild(u)), f.appendChild(a), f.appendChild(p), f.appendChild(g), (!t || t.link) && (f.appendChild(m), f.appendChild(v)), t && t.extend)
|
|
587
|
+
for (let y = 0; y < t.extend.length; y++) {
|
|
588
|
+
const w = t.extend[y], _ = o(w.name, w.name, w.key || "");
|
|
589
|
+
f.appendChild(_), _.onclick = (M) => {
|
|
590
|
+
w.onclick(M);
|
|
592
591
|
};
|
|
593
592
|
}
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
let
|
|
597
|
-
|
|
598
|
-
if (
|
|
593
|
+
const b = document.createElement("div");
|
|
594
|
+
b.className = "context-menu", b.appendChild(f), b.hidden = !0, e.container.append(b);
|
|
595
|
+
let x = !0;
|
|
596
|
+
e.container.oncontextmenu = function(y) {
|
|
597
|
+
if (y.preventDefault(), !e.editable || k.moved)
|
|
599
598
|
return;
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
599
|
+
const w = y.target;
|
|
600
|
+
if (he(w)) {
|
|
601
|
+
w.parentElement.tagName === "ME-ROOT" ? x = !0 : x = !1, x ? (h.className = "disabled", a.className = "disabled", p.className = "disabled", c.className = "disabled", l.className = "disabled", d.className = "disabled") : (h.className = "", a.className = "", p.className = "", c.className = "", l.className = "", d.className = ""), e.currentNodes || e.selectNode(w), b.hidden = !1, k.mousedown && (k.mousedown = !1), f.style.top = "", f.style.bottom = "", f.style.left = "", f.style.right = "";
|
|
602
|
+
const _ = f.getBoundingClientRect(), M = f.offsetHeight, j = f.offsetWidth, z = y.clientY - _.top, U = y.clientX - _.left;
|
|
603
|
+
M + z > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = z + 15 + "px"), j + U > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = U + 10 + "px");
|
|
605
604
|
}
|
|
606
|
-
},
|
|
607
|
-
|
|
605
|
+
}, b.onclick = (y) => {
|
|
606
|
+
y.target === b && (b.hidden = !0);
|
|
608
607
|
}, r.onclick = () => {
|
|
609
|
-
e.addChild(),
|
|
608
|
+
e.addChild(), b.hidden = !0;
|
|
610
609
|
}, c.onclick = () => {
|
|
611
|
-
e.insertParent(),
|
|
610
|
+
e.insertParent(), b.hidden = !0;
|
|
612
611
|
}, l.onclick = () => {
|
|
613
|
-
|
|
614
|
-
}, u.onclick = () => {
|
|
615
|
-
y || (e.removeNode(), v.hidden = !0);
|
|
612
|
+
x || (e.insertSibling("after"), b.hidden = !0);
|
|
616
613
|
}, d.onclick = () => {
|
|
617
|
-
|
|
614
|
+
x || (e.removeNode(), b.hidden = !0);
|
|
615
|
+
}, h.onclick = () => {
|
|
616
|
+
x || (e.focusNode(e.currentNode), b.hidden = !0);
|
|
617
|
+
}, u.onclick = () => {
|
|
618
|
+
e.cancelFocus(), b.hidden = !0;
|
|
618
619
|
}, a.onclick = () => {
|
|
619
|
-
e.
|
|
620
|
-
}, f.onclick = () => {
|
|
621
|
-
y || (e.moveUpNode(), v.hidden = !0);
|
|
622
|
-
}, g.onclick = () => {
|
|
623
|
-
y || (e.moveDownNode(), v.hidden = !0);
|
|
620
|
+
x || (e.moveUpNode(), b.hidden = !0);
|
|
624
621
|
}, p.onclick = () => {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
622
|
+
x || (e.moveDownNode(), b.hidden = !0);
|
|
623
|
+
};
|
|
624
|
+
const S = (y) => {
|
|
625
|
+
b.hidden = !0;
|
|
626
|
+
const w = e.currentNode, _ = n(s.clickTips);
|
|
627
|
+
e.container.appendChild(_), e.map.addEventListener(
|
|
628
628
|
"click",
|
|
629
|
-
(
|
|
630
|
-
|
|
631
|
-
const
|
|
632
|
-
(
|
|
629
|
+
(M) => {
|
|
630
|
+
M.preventDefault(), _.remove();
|
|
631
|
+
const j = M.target;
|
|
632
|
+
(j.parentElement.tagName === "ME-PARENT" || j.parentElement.tagName === "ME-ROOT") && e.createArrow(w, j, y);
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
once: !0
|
|
636
636
|
}
|
|
637
637
|
);
|
|
638
|
-
}
|
|
639
|
-
|
|
638
|
+
};
|
|
639
|
+
return m.onclick = () => S(), v.onclick = () => S({ bidirectional: !0 }), g.onclick = () => {
|
|
640
|
+
b.hidden = !0, e.createSummary(), e.unselectNodes();
|
|
640
641
|
}, () => {
|
|
641
|
-
r.onclick = null, c.onclick = null, l.onclick = null,
|
|
642
|
+
r.onclick = null, c.onclick = null, l.onclick = null, d.onclick = null, h.onclick = null, u.onclick = null, a.onclick = null, p.onclick = null, m.onclick = null, g.onclick = null, b.onclick = null, e.container.oncontextmenu = null;
|
|
642
643
|
};
|
|
643
644
|
}
|
|
644
|
-
const
|
|
645
|
+
const vt = (e) => {
|
|
645
646
|
const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
|
|
646
647
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
647
648
|
}, bt = (e) => {
|
|
648
649
|
const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
|
|
649
650
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
650
|
-
},
|
|
651
|
+
}, yt = (e) => {
|
|
651
652
|
e.selectNode(e.map.querySelector("me-root>me-tpc"));
|
|
652
|
-
},
|
|
653
|
+
}, xt = function(e, t) {
|
|
653
654
|
const n = t.parentElement.parentElement.parentElement.previousSibling;
|
|
654
655
|
if (n) {
|
|
655
656
|
const o = n.firstChild;
|
|
656
657
|
e.selectNode(o);
|
|
657
658
|
}
|
|
658
|
-
},
|
|
659
|
+
}, wt = function(e, t) {
|
|
659
660
|
const n = t.parentElement.nextSibling;
|
|
660
661
|
if (n && n.firstChild) {
|
|
661
662
|
const o = n.firstChild.firstChild.firstChild;
|
|
662
663
|
e.selectNode(o);
|
|
663
664
|
}
|
|
664
|
-
},
|
|
665
|
-
var
|
|
666
|
-
const n = e.currentNode || ((
|
|
665
|
+
}, Se = function(e, t) {
|
|
666
|
+
var s, r;
|
|
667
|
+
const n = e.currentNode || ((s = e.currentNodes) == null ? void 0 : s[0]);
|
|
667
668
|
if (!n)
|
|
668
669
|
return;
|
|
669
|
-
const o = n.nodeObj,
|
|
670
|
-
o.parent ?
|
|
671
|
-
},
|
|
670
|
+
const o = n.nodeObj, i = n.offsetParent.offsetParent.parentElement;
|
|
671
|
+
o.parent ? i.className === t ? wt(e, n) : (r = o.parent) != null && r.parent ? xt(e, n) : yt(e) : t === L.LHS ? vt(e) : bt(e);
|
|
672
|
+
}, _e = function(e, t) {
|
|
672
673
|
var r;
|
|
673
674
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
674
675
|
if (!n || !n.nodeObj.parent)
|
|
675
676
|
return;
|
|
676
|
-
const
|
|
677
|
-
|
|
678
|
-
},
|
|
677
|
+
const i = t + "Sibling", s = n.parentElement.parentElement[i];
|
|
678
|
+
s && e.selectNode(s.firstChild.firstChild);
|
|
679
|
+
}, ee = function(e, t, n = 1) {
|
|
679
680
|
switch (t) {
|
|
680
681
|
case "in":
|
|
681
682
|
if (e.scaleVal * n > 1.6)
|
|
@@ -688,7 +689,7 @@ const yt = (e) => {
|
|
|
688
689
|
e.scale(e.scaleVal -= 0.2);
|
|
689
690
|
}
|
|
690
691
|
};
|
|
691
|
-
function
|
|
692
|
+
function Et(e) {
|
|
692
693
|
const t = () => {
|
|
693
694
|
e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNode ? e.removeNode() : e.currentNodes && e.removeNodes(e.currentNodes);
|
|
694
695
|
}, n = {
|
|
@@ -710,21 +711,21 @@ function Nt(e) {
|
|
|
710
711
|
else {
|
|
711
712
|
if (o.metaKey || o.ctrlKey)
|
|
712
713
|
return e.initSide();
|
|
713
|
-
|
|
714
|
+
_e(e, "previous");
|
|
714
715
|
}
|
|
715
716
|
},
|
|
716
717
|
ArrowDown: (o) => {
|
|
717
|
-
o.altKey ? e.moveDownNode() :
|
|
718
|
+
o.altKey ? e.moveDownNode() : _e(e, "next");
|
|
718
719
|
},
|
|
719
720
|
ArrowLeft: (o) => {
|
|
720
721
|
if (o.metaKey || o.ctrlKey)
|
|
721
722
|
return e.initLeft();
|
|
722
|
-
|
|
723
|
+
Se(e, L.LHS);
|
|
723
724
|
},
|
|
724
725
|
ArrowRight: (o) => {
|
|
725
726
|
if (o.metaKey || o.ctrlKey)
|
|
726
727
|
return e.initRight();
|
|
727
|
-
|
|
728
|
+
Se(e, L.RHS);
|
|
728
729
|
},
|
|
729
730
|
PageUp: () => e.moveUpNode(),
|
|
730
731
|
PageDown: () => {
|
|
@@ -740,10 +741,10 @@ function Nt(e) {
|
|
|
740
741
|
!e.waitCopy || !e.currentNode || (o.metaKey || o.ctrlKey) && (e.waitCopy.length === 1 ? e.copyNode(e.waitCopy[0], e.currentNode) : e.copyNodes(e.waitCopy, e.currentNode));
|
|
741
742
|
},
|
|
742
743
|
"+": (o) => {
|
|
743
|
-
(o.metaKey || o.ctrlKey) &&
|
|
744
|
+
(o.metaKey || o.ctrlKey) && ee(e, "in");
|
|
744
745
|
},
|
|
745
746
|
"-": (o) => {
|
|
746
|
-
(o.metaKey || o.ctrlKey) &&
|
|
747
|
+
(o.metaKey || o.ctrlKey) && ee(e, "out");
|
|
747
748
|
},
|
|
748
749
|
0: (o) => {
|
|
749
750
|
(o.metaKey || o.ctrlKey) && e.scale(1);
|
|
@@ -754,29 +755,29 @@ function Nt(e) {
|
|
|
754
755
|
e.map.onkeydown = (o) => {
|
|
755
756
|
if (o.preventDefault(), !e.editable || o.target !== o.currentTarget)
|
|
756
757
|
return;
|
|
757
|
-
const
|
|
758
|
-
|
|
758
|
+
const i = n[o.key];
|
|
759
|
+
i && i(o);
|
|
759
760
|
}, e.map.onwheel = (o) => {
|
|
760
761
|
if (o.ctrlKey || o.metaKey) {
|
|
761
762
|
o.preventDefault();
|
|
762
|
-
const
|
|
763
|
-
o.deltaY < 0 ?
|
|
763
|
+
const i = Math.abs(o.deltaY / 100);
|
|
764
|
+
o.deltaY < 0 ? ee(e, "in", i) : e.scaleVal - 0.2 > 0 && ee(e, "out", i), o.stopPropagation();
|
|
764
765
|
}
|
|
765
766
|
};
|
|
766
767
|
}
|
|
767
|
-
const
|
|
768
|
+
const ue = document, Nt = function(e, t) {
|
|
768
769
|
if (!t)
|
|
769
|
-
return
|
|
770
|
+
return fe(e), e;
|
|
770
771
|
let n = e.querySelector(".insert-preview");
|
|
771
772
|
const o = `insert-preview ${t} show`;
|
|
772
|
-
return n || (n =
|
|
773
|
-
},
|
|
773
|
+
return n || (n = ue.createElement("div"), e.appendChild(n)), n.className = o, e;
|
|
774
|
+
}, fe = function(e) {
|
|
774
775
|
if (!e)
|
|
775
776
|
return;
|
|
776
777
|
const t = e.querySelectorAll(".insert-preview");
|
|
777
778
|
for (const n of t || [])
|
|
778
779
|
n.remove();
|
|
779
|
-
},
|
|
780
|
+
}, Le = function(e, t) {
|
|
780
781
|
for (const n of t) {
|
|
781
782
|
const o = n.parentElement.parentElement.contains(e);
|
|
782
783
|
if (!(e && e.tagName === "ME-TPC" && e !== n && !o && e.nodeObj.parent))
|
|
@@ -787,52 +788,52 @@ const ae = document, St = function(e, t) {
|
|
|
787
788
|
const t = document.createElement("div");
|
|
788
789
|
return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
|
|
789
790
|
};
|
|
790
|
-
function
|
|
791
|
+
function St(e) {
|
|
791
792
|
let t = null, n = null, o = null;
|
|
792
|
-
const
|
|
793
|
+
const i = Ct(e), s = 12;
|
|
793
794
|
e.map.addEventListener("dragstart", (r) => {
|
|
794
|
-
var l,
|
|
795
|
+
var l, d;
|
|
795
796
|
const c = r.target;
|
|
796
797
|
if ((c == null ? void 0 : c.tagName) !== "ME-TPC") {
|
|
797
798
|
r.preventDefault();
|
|
798
799
|
return;
|
|
799
800
|
}
|
|
800
|
-
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes,
|
|
801
|
-
for (const
|
|
802
|
-
|
|
803
|
-
(
|
|
801
|
+
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes, i.innerHTML = e.currentNodes.length + " nodes") : (t = [c], i.innerHTML = c.innerHTML);
|
|
802
|
+
for (const h of t)
|
|
803
|
+
h.parentElement.parentElement.style.opacity = "0.5";
|
|
804
|
+
(d = r.dataTransfer) == null || d.setDragImage(i, 0, 0), k.clear();
|
|
804
805
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
805
806
|
if (!t)
|
|
806
807
|
return;
|
|
807
808
|
for (const l of t)
|
|
808
809
|
l.parentElement.parentElement.style.opacity = "1";
|
|
809
810
|
const c = r.target;
|
|
810
|
-
c.style.opacity = "", o && (
|
|
811
|
+
c.style.opacity = "", o && (fe(o), n === "before" ? e.moveNodeBefore(t, o) : n === "after" ? e.moveNodeAfter(t, o) : n === "in" && e.moveNodeIn(t, o), t = null);
|
|
811
812
|
}), e.map.addEventListener(
|
|
812
813
|
"dragover",
|
|
813
|
-
|
|
814
|
+
nt(function(r) {
|
|
814
815
|
if (!t)
|
|
815
816
|
return;
|
|
816
|
-
|
|
817
|
-
const c =
|
|
818
|
-
if (
|
|
817
|
+
fe(o);
|
|
818
|
+
const c = ue.elementFromPoint(r.clientX, r.clientY - s);
|
|
819
|
+
if (Le(c, t)) {
|
|
819
820
|
o = c;
|
|
820
821
|
const l = c.getBoundingClientRect().y;
|
|
821
822
|
r.clientY > l + c.clientHeight ? n = "after" : n = "in";
|
|
822
823
|
} else {
|
|
823
|
-
const l =
|
|
824
|
-
if (
|
|
824
|
+
const l = ue.elementFromPoint(r.clientX, r.clientY + s);
|
|
825
|
+
if (Le(l, t)) {
|
|
825
826
|
o = l;
|
|
826
|
-
const
|
|
827
|
-
r.clientY <
|
|
827
|
+
const d = l.getBoundingClientRect().y;
|
|
828
|
+
r.clientY < d ? n = "before" : n = "in";
|
|
828
829
|
} else
|
|
829
830
|
n = o = null;
|
|
830
831
|
}
|
|
831
|
-
o &&
|
|
832
|
+
o && Nt(o, n);
|
|
832
833
|
}, 100)
|
|
833
834
|
);
|
|
834
835
|
}
|
|
835
|
-
const
|
|
836
|
+
const _t = function(e) {
|
|
836
837
|
return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
|
|
837
838
|
type: "summary",
|
|
838
839
|
value: e.obj.id
|
|
@@ -847,20 +848,20 @@ const Mt = function(e) {
|
|
|
847
848
|
value: e.obj.id
|
|
848
849
|
};
|
|
849
850
|
};
|
|
850
|
-
function
|
|
851
|
+
function Lt(e) {
|
|
851
852
|
let t = [], n = -1, o = e.getData();
|
|
852
|
-
e.bus.addListener("operation", (
|
|
853
|
-
if (
|
|
853
|
+
e.bus.addListener("operation", (i) => {
|
|
854
|
+
if (i.name === "beginEdit")
|
|
854
855
|
return;
|
|
855
856
|
t = t.slice(0, n + 1);
|
|
856
|
-
const
|
|
857
|
-
t.push({ prev: o, currentObject:
|
|
857
|
+
const s = e.getData();
|
|
858
|
+
t.push({ prev: o, currentObject: _t(i), next: s }), o = s, n = t.length - 1;
|
|
858
859
|
}), e.undo = function() {
|
|
859
860
|
if (n > -1) {
|
|
860
|
-
const
|
|
861
|
-
o =
|
|
861
|
+
const i = t[n];
|
|
862
|
+
o = i.prev, e.refresh(i.prev);
|
|
862
863
|
try {
|
|
863
|
-
|
|
864
|
+
i.currentObject.type === "node" ? e.selectNode(C(i.currentObject.value)) : i.currentObject.type === "nodes" && e.selectNodes(i.currentObject.value.map((s) => C(s)));
|
|
864
865
|
} catch {
|
|
865
866
|
} finally {
|
|
866
867
|
n--;
|
|
@@ -869,48 +870,49 @@ function kt(e) {
|
|
|
869
870
|
}, e.redo = function() {
|
|
870
871
|
if (n < t.length - 1) {
|
|
871
872
|
n++;
|
|
872
|
-
const
|
|
873
|
-
o =
|
|
873
|
+
const i = t[n];
|
|
874
|
+
o = i.next, e.refresh(i.next), i.currentObject.type === "node" ? e.selectNode(C(i.currentObject.value)) : i.currentObject.type === "nodes" && e.selectNodes(i.currentObject.value.map((s) => C(s)));
|
|
874
875
|
}
|
|
875
|
-
}, e.map.addEventListener("keydown", (
|
|
876
|
-
(
|
|
876
|
+
}, e.map.addEventListener("keydown", (i) => {
|
|
877
|
+
(i.metaKey || i.ctrlKey) && i.shiftKey && i.key === "Z" ? e.redo() : (i.metaKey || i.ctrlKey) && i.key === "z" && e.undo();
|
|
877
878
|
});
|
|
878
879
|
}
|
|
879
|
-
const
|
|
880
|
+
const q = (e, t) => {
|
|
880
881
|
const n = document.createElement("span");
|
|
881
882
|
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
882
883
|
<use xlink:href="#icon-${t}"></use>
|
|
883
884
|
</svg>`, n;
|
|
884
885
|
};
|
|
885
|
-
function
|
|
886
|
-
const t = document.createElement("div"), n =
|
|
887
|
-
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(
|
|
886
|
+
function Mt(e) {
|
|
887
|
+
const t = document.createElement("div"), n = q("fullscreen", "full"), o = q("toCenter", "living"), i = q("zoomout", "move"), s = q("zoomin", "add"), r = document.createElement("span");
|
|
888
|
+
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
888
889
|
e.mindElixirBox.requestFullscreen();
|
|
889
890
|
}, o.onclick = () => {
|
|
890
891
|
e.toCenter();
|
|
891
|
-
}, s.onclick = () => {
|
|
892
|
-
e.scaleVal < 0.6 || e.scale(e.scaleVal - 0.2);
|
|
893
892
|
}, i.onclick = () => {
|
|
893
|
+
e.scaleVal < 0.6 || e.scale(e.scaleVal - 0.2);
|
|
894
|
+
}, s.onclick = () => {
|
|
894
895
|
e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
|
|
895
896
|
}, t;
|
|
896
897
|
}
|
|
897
|
-
function
|
|
898
|
-
const t = document.createElement("div"), n =
|
|
899
|
-
return t.appendChild(n), t.appendChild(o), t.appendChild(
|
|
898
|
+
function kt(e) {
|
|
899
|
+
const t = document.createElement("div"), n = q("tbltl", "left"), o = q("tbltr", "right"), i = q("tblts", "side");
|
|
900
|
+
return t.appendChild(n), t.appendChild(o), t.appendChild(i), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
900
901
|
e.initLeft();
|
|
901
902
|
}, o.onclick = () => {
|
|
902
903
|
e.initRight();
|
|
903
|
-
},
|
|
904
|
+
}, i.onclick = () => {
|
|
904
905
|
e.initSide();
|
|
905
906
|
}, t;
|
|
906
907
|
}
|
|
907
|
-
function
|
|
908
|
-
e.container.append(
|
|
908
|
+
function Tt(e) {
|
|
909
|
+
e.container.append(Mt(e)), e.container.append(kt(e));
|
|
909
910
|
}
|
|
910
|
-
/*! @viselect/vanilla v3.
|
|
911
|
+
/*! @viselect/vanilla v3.5.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
912
|
+
var At = Object.defineProperty, $t = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => ($t(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
911
913
|
class jt {
|
|
912
914
|
constructor() {
|
|
913
|
-
this
|
|
915
|
+
E(this, "_listeners", /* @__PURE__ */ new Map()), E(this, "on", this.addEventListener), E(this, "off", this.removeEventListener), E(this, "emit", this.dispatchEvent);
|
|
914
916
|
}
|
|
915
917
|
addEventListener(t, n) {
|
|
916
918
|
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
@@ -922,72 +924,75 @@ class jt {
|
|
|
922
924
|
}
|
|
923
925
|
dispatchEvent(t, ...n) {
|
|
924
926
|
let o = !0;
|
|
925
|
-
for (const
|
|
926
|
-
o =
|
|
927
|
+
for (const i of this._listeners.get(t) ?? [])
|
|
928
|
+
o = i(...n) !== !1 && o;
|
|
927
929
|
return o;
|
|
928
930
|
}
|
|
929
931
|
unbindAllListeners() {
|
|
930
932
|
this._listeners.clear();
|
|
931
933
|
}
|
|
932
934
|
}
|
|
933
|
-
const
|
|
935
|
+
const Me = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
936
|
+
function O({ style: e }, t, n) {
|
|
934
937
|
if (typeof t == "object")
|
|
935
|
-
for (const [o,
|
|
936
|
-
|
|
938
|
+
for (const [o, i] of Object.entries(t))
|
|
939
|
+
i !== void 0 && (e[o] = Me(i));
|
|
937
940
|
else
|
|
938
|
-
n !== void 0 && (e[t] =
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
};
|
|
954
|
-
}, Me = (e, t, n = "touch") => {
|
|
941
|
+
n !== void 0 && (e[t] = Me(n));
|
|
942
|
+
}
|
|
943
|
+
const Ie = (e) => (t, n, o, i = {}) => {
|
|
944
|
+
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
945
|
+
for (const s of t)
|
|
946
|
+
if (s)
|
|
947
|
+
for (const r of n)
|
|
948
|
+
s[e](r, o, { capture: !1, ...i });
|
|
949
|
+
return [t, n, o, i];
|
|
950
|
+
}, I = Ie("addEventListener"), H = Ie("removeEventListener"), te = (e) => {
|
|
951
|
+
var t;
|
|
952
|
+
const { clientX: n, clientY: o, target: i } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
953
|
+
return { x: n, y: o, target: i };
|
|
954
|
+
};
|
|
955
|
+
function ke(e, t, n = "touch") {
|
|
955
956
|
switch (n) {
|
|
956
957
|
case "center": {
|
|
957
|
-
const o = t.left + t.width / 2,
|
|
958
|
-
return o >= e.left && o <= e.right &&
|
|
958
|
+
const o = t.left + t.width / 2, i = t.top + t.height / 2;
|
|
959
|
+
return o >= e.left && o <= e.right && i >= e.top && i <= e.bottom;
|
|
959
960
|
}
|
|
960
961
|
case "cover":
|
|
961
962
|
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
962
963
|
case "touch":
|
|
963
964
|
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
964
965
|
}
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
for (const i of t)
|
|
968
|
-
if (i)
|
|
969
|
-
for (const r of n)
|
|
970
|
-
i[e](r, o, { capture: !1, ...s });
|
|
971
|
-
return [t, n, o, s];
|
|
972
|
-
}, D = Ie("addEventListener"), T = Ie("removeEventListener"), Q = (e) => {
|
|
973
|
-
var t;
|
|
974
|
-
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
975
|
-
return { x: n, y: o, target: s };
|
|
976
|
-
}, F = (e, t = document) => {
|
|
966
|
+
}
|
|
967
|
+
function V(e, t = document) {
|
|
977
968
|
const n = Array.isArray(e) ? e : [e];
|
|
978
969
|
let o = [];
|
|
979
|
-
for (let
|
|
980
|
-
const r = n[
|
|
970
|
+
for (let i = 0, s = n.length; i < s; i++) {
|
|
971
|
+
const r = n[i];
|
|
981
972
|
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
982
973
|
}
|
|
983
974
|
return o;
|
|
984
|
-
}
|
|
975
|
+
}
|
|
976
|
+
const Dt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = () => "safari" in window, Ht = (e) => {
|
|
977
|
+
let t, n = -1, o = !1;
|
|
978
|
+
return {
|
|
979
|
+
next(...i) {
|
|
980
|
+
t = i, o || (o = !0, n = requestAnimationFrame(() => {
|
|
981
|
+
e(...t), o = !1;
|
|
982
|
+
}));
|
|
983
|
+
},
|
|
984
|
+
cancel() {
|
|
985
|
+
cancelAnimationFrame(n), o = !1;
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
function Pt(e, t) {
|
|
985
990
|
for (const n of t) {
|
|
986
991
|
if (typeof n == "number")
|
|
987
992
|
return e.button === n;
|
|
988
993
|
if (typeof n == "object") {
|
|
989
|
-
const o = n.button === e.button,
|
|
990
|
-
switch (
|
|
994
|
+
const o = n.button === e.button, i = n.modifiers.every((s) => {
|
|
995
|
+
switch (s) {
|
|
991
996
|
case "alt":
|
|
992
997
|
return e.altKey;
|
|
993
998
|
case "ctrl":
|
|
@@ -996,19 +1001,26 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
996
1001
|
return e.shiftKey;
|
|
997
1002
|
}
|
|
998
1003
|
});
|
|
999
|
-
return o &&
|
|
1004
|
+
return o && i;
|
|
1000
1005
|
}
|
|
1001
1006
|
}
|
|
1002
1007
|
return !1;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
touched: [],
|
|
1007
|
-
changed: { added: [], removed: [] }
|
|
1008
|
-
}), Ve = class extends jt {
|
|
1008
|
+
}
|
|
1009
|
+
const { abs: F, max: Te, min: Ae, ceil: $e } = Math;
|
|
1010
|
+
class Ve extends jt {
|
|
1009
1011
|
constructor(t) {
|
|
1010
|
-
var n, o,
|
|
1011
|
-
super(),
|
|
1012
|
+
var n, o, i, s, r;
|
|
1013
|
+
super(), E(this, "_options"), E(this, "_selection", {
|
|
1014
|
+
stored: [],
|
|
1015
|
+
selected: [],
|
|
1016
|
+
touched: [],
|
|
1017
|
+
changed: {
|
|
1018
|
+
added: [],
|
|
1019
|
+
// Added elements since last selection
|
|
1020
|
+
removed: []
|
|
1021
|
+
// Removed elements since last selection
|
|
1022
|
+
}
|
|
1023
|
+
}), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaRect", new DOMRect()), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._bindStartEvents.bind(this, !1)), E(this, "enable", this._bindStartEvents), this._options = {
|
|
1012
1024
|
selectionAreaClass: "selection-area",
|
|
1013
1025
|
selectionContainerClass: void 0,
|
|
1014
1026
|
selectables: [],
|
|
@@ -1030,14 +1042,13 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1030
1042
|
startScrollMargins: {
|
|
1031
1043
|
x: 0,
|
|
1032
1044
|
y: 0,
|
|
1033
|
-
...(
|
|
1045
|
+
...(s = (i = t.behaviour) == null ? void 0 : i.scrolling) == null ? void 0 : s.startScrollMargins
|
|
1034
1046
|
}
|
|
1035
1047
|
}
|
|
1036
1048
|
},
|
|
1037
1049
|
features: {
|
|
1038
1050
|
range: !0,
|
|
1039
1051
|
touch: !0,
|
|
1040
|
-
deselectOnBlur: !1,
|
|
1041
1052
|
...t.features,
|
|
1042
1053
|
singleTap: {
|
|
1043
1054
|
allow: !0,
|
|
@@ -1046,192 +1057,180 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1046
1057
|
}
|
|
1047
1058
|
}
|
|
1048
1059
|
};
|
|
1049
|
-
for (const
|
|
1050
|
-
typeof this[
|
|
1051
|
-
const { document: c, selectionAreaClass: l, selectionContainerClass:
|
|
1052
|
-
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l),
|
|
1060
|
+
for (const h of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
1061
|
+
typeof this[h] == "function" && (this[h] = this[h].bind(this));
|
|
1062
|
+
const { document: c, selectionAreaClass: l, selectionContainerClass: d } = this._options;
|
|
1063
|
+
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), d && this._clippingElement.classList.add(d), O(this._area, {
|
|
1053
1064
|
willChange: "top, left, bottom, right, width, height",
|
|
1054
1065
|
top: 0,
|
|
1055
1066
|
left: 0,
|
|
1056
1067
|
position: "fixed"
|
|
1057
|
-
}),
|
|
1068
|
+
}), O(this._clippingElement, {
|
|
1058
1069
|
overflow: "hidden",
|
|
1059
1070
|
position: "fixed",
|
|
1060
1071
|
transform: "translate3d(0, 0, 0)",
|
|
1061
1072
|
// https://stackoverflow.com/a/38268846
|
|
1062
1073
|
pointerEvents: "none",
|
|
1063
1074
|
zIndex: "1"
|
|
1064
|
-
}), this._frame =
|
|
1065
|
-
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move",
|
|
1075
|
+
}), this._frame = Ht((h) => {
|
|
1076
|
+
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
|
|
1066
1077
|
}), this.enable();
|
|
1067
1078
|
}
|
|
1068
|
-
|
|
1069
|
-
const { document: n, features: o } = this._options,
|
|
1070
|
-
|
|
1079
|
+
_bindStartEvents(t = !0) {
|
|
1080
|
+
const { document: n, features: o } = this._options, i = t ? I : H;
|
|
1081
|
+
i(n, "mousedown", this._onTapStart), o.touch && i(n, "touchstart", this._onTapStart, {
|
|
1082
|
+
passive: !1
|
|
1083
|
+
});
|
|
1071
1084
|
}
|
|
1072
1085
|
_onTapStart(t, n = !1) {
|
|
1073
|
-
const { x: o, y:
|
|
1074
|
-
if (t instanceof MouseEvent && !Pt(t,
|
|
1086
|
+
const { x: o, y: i, target: s } = te(t), { _options: r } = this, { document: c } = this._options, l = s.getBoundingClientRect();
|
|
1087
|
+
if (t instanceof MouseEvent && !Pt(t, r.behaviour.triggers))
|
|
1075
1088
|
return;
|
|
1076
|
-
const
|
|
1077
|
-
this._targetElement =
|
|
1078
|
-
(
|
|
1089
|
+
const d = V(r.startAreas, r.document), h = V(r.boundaries, r.document);
|
|
1090
|
+
this._targetElement = h.find(
|
|
1091
|
+
(p) => ke(p.getBoundingClientRect(), l)
|
|
1079
1092
|
);
|
|
1080
|
-
const
|
|
1081
|
-
if (this.
|
|
1093
|
+
const u = t.composedPath();
|
|
1094
|
+
if (!this._targetElement || !d.find((p) => u.includes(p)) || !h.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
1082
1095
|
return;
|
|
1083
|
-
this._areaLocation = { x1: o, y1:
|
|
1084
|
-
const
|
|
1085
|
-
this._scrollDelta = { x:
|
|
1096
|
+
this._areaLocation = { x1: o, y1: i, x2: 0, y2: 0 };
|
|
1097
|
+
const a = c.scrollingElement ?? c.body;
|
|
1098
|
+
this._scrollDelta = { x: a.scrollLeft, y: a.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), I(c, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), I(c, ["mouseup", "touchcancel", "touchend"], this._onTapStop), I(c, "scroll", this._onScroll);
|
|
1086
1099
|
}
|
|
1087
1100
|
_onSingleTap(t) {
|
|
1088
|
-
const { singleTap: { intersect: n }, range: o } = this._options.features,
|
|
1089
|
-
let
|
|
1101
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, i = te(t);
|
|
1102
|
+
let s;
|
|
1090
1103
|
if (n === "native")
|
|
1091
|
-
|
|
1104
|
+
s = i.target;
|
|
1092
1105
|
else if (n === "touch") {
|
|
1093
1106
|
this.resolveSelectables();
|
|
1094
|
-
const { x: c, y: l } =
|
|
1095
|
-
|
|
1096
|
-
const { right:
|
|
1097
|
-
return c <
|
|
1107
|
+
const { x: c, y: l } = i;
|
|
1108
|
+
s = this._selectables.find((d) => {
|
|
1109
|
+
const { right: h, left: u, top: a, bottom: p } = d.getBoundingClientRect();
|
|
1110
|
+
return c < h && c > u && l < p && l > a;
|
|
1098
1111
|
});
|
|
1099
1112
|
}
|
|
1100
|
-
if (!
|
|
1113
|
+
if (!s)
|
|
1101
1114
|
return;
|
|
1102
|
-
for (this.resolveSelectables(); !this._selectables.includes(
|
|
1103
|
-
if (
|
|
1104
|
-
i = i.parentElement;
|
|
1105
|
-
else {
|
|
1106
|
-
this._targetBoundaryScrolled || this.clearSelection();
|
|
1115
|
+
for (this.resolveSelectables(); !this._selectables.includes(s); ) {
|
|
1116
|
+
if (!s.parentElement)
|
|
1107
1117
|
return;
|
|
1108
|
-
|
|
1118
|
+
s = s.parentElement;
|
|
1119
|
+
}
|
|
1109
1120
|
const { stored: r } = this._selection;
|
|
1110
1121
|
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1111
|
-
const c = this._latestElement, [l,
|
|
1112
|
-
(
|
|
1113
|
-
), l,
|
|
1114
|
-
this.select(
|
|
1122
|
+
const c = this._latestElement, [l, d] = c.compareDocumentPosition(s) & 4 ? [s, c] : [c, s], h = [...this._selectables.filter(
|
|
1123
|
+
(u) => u.compareDocumentPosition(l) & 4 && u.compareDocumentPosition(d) & 2
|
|
1124
|
+
), l, d];
|
|
1125
|
+
this.select(h), this._latestElement = c;
|
|
1115
1126
|
} else
|
|
1116
|
-
r.includes(
|
|
1127
|
+
r.includes(s) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(s) : (this.select(s), this._latestElement = s);
|
|
1117
1128
|
}
|
|
1118
1129
|
_delayedTapMove(t) {
|
|
1119
|
-
const { container: n, document: o, behaviour: { startThreshold:
|
|
1130
|
+
const { container: n, document: o, behaviour: { startThreshold: i } } = this._options, { x1: s, y1: r } = this._areaLocation, { x: c, y: l } = te(t);
|
|
1120
1131
|
if (
|
|
1121
1132
|
// Single number for both coordinates
|
|
1122
|
-
typeof
|
|
1123
|
-
typeof
|
|
1133
|
+
typeof i == "number" && F(c + l - (s + r)) >= i || // Different x and y threshold
|
|
1134
|
+
typeof i == "object" && F(c - s) >= i.x || F(l - r) >= i.y
|
|
1124
1135
|
) {
|
|
1125
|
-
if (
|
|
1126
|
-
|
|
1136
|
+
if (H(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1137
|
+
H(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1127
1138
|
return;
|
|
1128
1139
|
}
|
|
1129
|
-
|
|
1140
|
+
I(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), O(this._area, "display", "block"), V(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 && (I(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1130
1141
|
}
|
|
1131
1142
|
this._handleMoveEvent(t);
|
|
1132
1143
|
}
|
|
1133
1144
|
_setupSelectionArea() {
|
|
1134
|
-
const { _clippingElement: t, _targetElement: n, _area: o } = this,
|
|
1135
|
-
this._scrollAvailable ? (
|
|
1136
|
-
top:
|
|
1137
|
-
left:
|
|
1138
|
-
width:
|
|
1139
|
-
height:
|
|
1140
|
-
}),
|
|
1141
|
-
marginTop: -
|
|
1142
|
-
marginLeft: -
|
|
1143
|
-
})) : (
|
|
1145
|
+
const { _clippingElement: t, _targetElement: n, _area: o } = this, i = this._targetRect = n.getBoundingClientRect();
|
|
1146
|
+
this._scrollAvailable ? (O(t, {
|
|
1147
|
+
top: i.top,
|
|
1148
|
+
left: i.left,
|
|
1149
|
+
width: i.width,
|
|
1150
|
+
height: i.height
|
|
1151
|
+
}), O(o, {
|
|
1152
|
+
marginTop: -i.top,
|
|
1153
|
+
marginLeft: -i.left
|
|
1154
|
+
})) : (O(t, {
|
|
1144
1155
|
top: 0,
|
|
1145
1156
|
left: 0,
|
|
1146
1157
|
width: "100%",
|
|
1147
1158
|
height: "100%"
|
|
1148
|
-
}),
|
|
1159
|
+
}), O(o, {
|
|
1149
1160
|
marginTop: 0,
|
|
1150
1161
|
marginLeft: 0
|
|
1151
1162
|
}));
|
|
1152
1163
|
}
|
|
1153
1164
|
_onTapMove(t) {
|
|
1154
|
-
const {
|
|
1155
|
-
if (
|
|
1165
|
+
const { x: n, y: o } = te(t), { _scrollSpeed: i, _areaLocation: s, _options: r, _frame: c } = this, { speedDivider: l } = r.behaviour.scrolling, d = this._targetElement;
|
|
1166
|
+
if (s.x2 = n, s.y2 = o, this._scrollAvailable && !this._scrollingActive && (i.y || i.x)) {
|
|
1156
1167
|
this._scrollingActive = !0;
|
|
1157
|
-
const
|
|
1158
|
-
if (!
|
|
1168
|
+
const h = () => {
|
|
1169
|
+
if (!i.x && !i.y) {
|
|
1159
1170
|
this._scrollingActive = !1;
|
|
1160
1171
|
return;
|
|
1161
1172
|
}
|
|
1162
|
-
const { scrollTop:
|
|
1163
|
-
|
|
1173
|
+
const { scrollTop: u, scrollLeft: a } = d;
|
|
1174
|
+
i.y && (d.scrollTop += $e(i.y / l), s.y1 -= d.scrollTop - u), i.x && (d.scrollLeft += $e(i.x / l), s.x1 -= d.scrollLeft - a), c.next(t), requestAnimationFrame(h);
|
|
1164
1175
|
};
|
|
1165
|
-
requestAnimationFrame(
|
|
1176
|
+
requestAnimationFrame(h);
|
|
1166
1177
|
} else
|
|
1167
|
-
|
|
1178
|
+
c.next(t);
|
|
1168
1179
|
this._handleMoveEvent(t);
|
|
1169
1180
|
}
|
|
1170
1181
|
_handleMoveEvent(t) {
|
|
1171
1182
|
const { features: n } = this._options;
|
|
1172
|
-
(n.touch &&
|
|
1183
|
+
(n.touch && Dt() || this._scrollAvailable && Ot()) && t.preventDefault();
|
|
1173
1184
|
}
|
|
1174
1185
|
_onScroll() {
|
|
1175
|
-
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft:
|
|
1176
|
-
this._areaLocation.x1 += t.x -
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
this.
|
|
1180
|
-
|
|
1181
|
-
_wheelScroll(t) {
|
|
1182
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
1183
|
-
this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
1184
|
-
}
|
|
1185
|
-
_keyboardScroll(t) {
|
|
1186
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.key === "ArrowLeft" ? -1 : t.key === "ArrowRight" ? 1 : 0, s = t.key === "ArrowUp" ? -1 : t.key === "ArrowDown" ? 1 : 0;
|
|
1187
|
-
this._scrollSpeed.x += Math.sign(o) * n, this._scrollSpeed.y += Math.sign(s) * n, t.preventDefault(), this._onTapMove({
|
|
1188
|
-
clientX: this._lastMousePosition.x,
|
|
1189
|
-
clientY: this._lastMousePosition.y,
|
|
1190
|
-
preventDefault: () => {
|
|
1191
|
-
}
|
|
1192
|
-
});
|
|
1186
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: i } = n.scrollingElement ?? n.body;
|
|
1187
|
+
this._areaLocation.x1 += t.x - i, this._areaLocation.y1 += t.y - o, t.x = i, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1188
|
+
}
|
|
1189
|
+
_manualScroll(t) {
|
|
1190
|
+
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, i = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
1191
|
+
this._scrollSpeed.y += o * n, this._scrollSpeed.x += i * n, this._onTapMove(t), t.preventDefault();
|
|
1193
1192
|
}
|
|
1194
1193
|
_recalculateSelectionAreaRect() {
|
|
1195
|
-
const { _scrollSpeed: t, _areaLocation: n,
|
|
1196
|
-
let { x2:
|
|
1197
|
-
const { behaviour: { scrolling: { startScrollMargins:
|
|
1198
|
-
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1194
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: i, _options: s } = this, { scrollTop: r, scrollHeight: c, clientHeight: l, scrollLeft: d, scrollWidth: h, clientWidth: u } = i, a = this._targetRect, { x1: p, y1: m } = n;
|
|
1195
|
+
let { x2: v, y2: g } = n;
|
|
1196
|
+
const { behaviour: { scrolling: { startScrollMargins: f } } } = s;
|
|
1197
|
+
v < a.left + f.x ? (t.x = d ? -F(a.left - v + f.x) : 0, v = v < a.left ? a.left : v) : v > a.right - f.x ? (t.x = h - d - u ? F(a.left + a.width - v - f.x) : 0, v = v > a.right ? a.right : v) : t.x = 0, g < a.top + f.y ? (t.y = r ? -F(a.top - g + f.y) : 0, g = g < a.top ? a.top : g) : g > a.bottom - f.y ? (t.y = c - r - l ? F(a.top + a.height - g - f.y) : 0, g = g > a.bottom ? a.bottom : g) : t.y = 0;
|
|
1198
|
+
const b = Ae(p, v), x = Ae(m, g), S = Te(p, v), y = Te(m, g);
|
|
1199
|
+
o.x = b, o.y = x, o.width = S - b, o.height = y - x;
|
|
1201
1200
|
}
|
|
1202
1201
|
_redrawSelectionArea() {
|
|
1203
|
-
const { x: t, y: n, width: o, height:
|
|
1204
|
-
|
|
1202
|
+
const { x: t, y: n, width: o, height: i } = this._areaRect, { style: s } = this._area;
|
|
1203
|
+
s.left = `${t}px`, s.top = `${n}px`, s.width = `${o}px`, s.height = `${i}px`;
|
|
1205
1204
|
}
|
|
1206
1205
|
_onTapStop(t, n) {
|
|
1207
1206
|
var o;
|
|
1208
|
-
const { document:
|
|
1209
|
-
|
|
1207
|
+
const { document: i, features: s } = this._options, { _singleClick: r } = this;
|
|
1208
|
+
H(i, ["mousemove", "touchmove"], this._delayedTapMove), H(i, ["touchmove", "mousemove"], this._onTapMove), H(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop), H(i, "scroll", this._onScroll), this._keepSelection(), t && r && s.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, H(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), O(this._area, "display", "none");
|
|
1210
1209
|
}
|
|
1211
1210
|
_updateElementSelection() {
|
|
1212
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect:
|
|
1213
|
-
for (let
|
|
1214
|
-
const
|
|
1215
|
-
if (
|
|
1216
|
-
if (r.includes(
|
|
1217
|
-
|
|
1218
|
-
else if (
|
|
1219
|
-
|
|
1211
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: i } = this, { stored: s, selected: r, touched: c } = o, { intersect: l, overlap: d } = n.behaviour, h = d === "invert", u = [], a = [], p = [];
|
|
1212
|
+
for (let v = 0; v < t.length; v++) {
|
|
1213
|
+
const g = t[v];
|
|
1214
|
+
if (ke(i, g.getBoundingClientRect(), l)) {
|
|
1215
|
+
if (r.includes(g))
|
|
1216
|
+
s.includes(g) && !c.includes(g) && c.push(g);
|
|
1217
|
+
else if (h && s.includes(g)) {
|
|
1218
|
+
p.push(g);
|
|
1220
1219
|
continue;
|
|
1221
1220
|
} else
|
|
1222
|
-
|
|
1223
|
-
|
|
1221
|
+
a.push(g);
|
|
1222
|
+
u.push(g);
|
|
1224
1223
|
}
|
|
1225
1224
|
}
|
|
1226
|
-
|
|
1227
|
-
const
|
|
1228
|
-
for (let
|
|
1229
|
-
const
|
|
1230
|
-
!
|
|
1225
|
+
h && a.push(...s.filter((v) => !r.includes(v)));
|
|
1226
|
+
const m = d === "keep";
|
|
1227
|
+
for (let v = 0; v < r.length; v++) {
|
|
1228
|
+
const g = r[v];
|
|
1229
|
+
!u.includes(g) && !// Check if user wants to keep previously selected elements, e.g.
|
|
1231
1230
|
// not make them part of the current selection as soon as they're touched.
|
|
1232
|
-
(
|
|
1231
|
+
(m && s.includes(g)) && p.push(g);
|
|
1233
1232
|
}
|
|
1234
|
-
o.selected =
|
|
1233
|
+
o.selected = u, o.changed = { added: a, removed: p }, this._latestElement = void 0;
|
|
1235
1234
|
}
|
|
1236
1235
|
_emitEvent(t, n) {
|
|
1237
1236
|
return this.emit(t, {
|
|
@@ -1241,12 +1240,12 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1241
1240
|
});
|
|
1242
1241
|
}
|
|
1243
1242
|
_keepSelection() {
|
|
1244
|
-
const { _options: t, _selection: n } = this, { selected: o, changed:
|
|
1243
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: i, touched: s, stored: r } = n, c = o.filter((l) => !r.includes(l));
|
|
1245
1244
|
switch (t.behaviour.overlap) {
|
|
1246
1245
|
case "drop": {
|
|
1247
1246
|
n.stored = [
|
|
1248
1247
|
...c,
|
|
1249
|
-
...r.filter((l) => !
|
|
1248
|
+
...r.filter((l) => !s.includes(l))
|
|
1250
1249
|
// Elements not touched
|
|
1251
1250
|
];
|
|
1252
1251
|
break;
|
|
@@ -1254,7 +1253,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1254
1253
|
case "invert": {
|
|
1255
1254
|
n.stored = [
|
|
1256
1255
|
...c,
|
|
1257
|
-
...r.filter((l) => !
|
|
1256
|
+
...r.filter((l) => !i.removed.includes(l))
|
|
1258
1257
|
// Elements not removed from selection
|
|
1259
1258
|
];
|
|
1260
1259
|
break;
|
|
@@ -1271,7 +1270,7 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1271
1270
|
}
|
|
1272
1271
|
/**
|
|
1273
1272
|
* Manually triggers the start of a selection
|
|
1274
|
-
* @param evt A MouseEvent / TouchEvent-like object
|
|
1273
|
+
* @param evt A MouseEvent / TouchEvent -like object
|
|
1275
1274
|
* @param silent If beforestart should be fired,
|
|
1276
1275
|
*/
|
|
1277
1276
|
trigger(t, n = !0) {
|
|
@@ -1279,22 +1278,27 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1279
1278
|
}
|
|
1280
1279
|
/**
|
|
1281
1280
|
* Can be used if during a selection elements have been added.
|
|
1282
|
-
* Will update everything
|
|
1281
|
+
* Will update everything which can be selected.
|
|
1283
1282
|
*/
|
|
1284
1283
|
resolveSelectables() {
|
|
1285
|
-
this._selectables =
|
|
1284
|
+
this._selectables = V(this._options.selectables, this._options.document);
|
|
1286
1285
|
}
|
|
1287
1286
|
/**
|
|
1288
|
-
* Same as
|
|
1287
|
+
* Same as deselect, but for all elements currently selected.
|
|
1289
1288
|
* @param includeStored If the store should also get cleared
|
|
1290
1289
|
* @param quiet If move / stop events should be fired
|
|
1291
1290
|
*/
|
|
1292
1291
|
clearSelection(t = !0, n = !1) {
|
|
1293
|
-
const { selected: o, stored:
|
|
1294
|
-
|
|
1292
|
+
const { selected: o, stored: i, changed: s } = this._selection;
|
|
1293
|
+
s.added = [], s.removed.push(
|
|
1295
1294
|
...o,
|
|
1296
|
-
...t ?
|
|
1297
|
-
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection =
|
|
1295
|
+
...t ? i : []
|
|
1296
|
+
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
1297
|
+
stored: t ? [] : i,
|
|
1298
|
+
selected: [],
|
|
1299
|
+
touched: [],
|
|
1300
|
+
changed: { added: [], removed: [] }
|
|
1301
|
+
};
|
|
1298
1302
|
}
|
|
1299
1303
|
/**
|
|
1300
1304
|
* @returns {Array} Selected elements
|
|
@@ -1309,7 +1313,8 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1309
1313
|
return this._area;
|
|
1310
1314
|
}
|
|
1311
1315
|
/**
|
|
1312
|
-
* Cancel the current selection process
|
|
1316
|
+
* Cancel the current selection process.
|
|
1317
|
+
* @param keepEvent {boolean} true to fire a stop event after cancel.
|
|
1313
1318
|
*/
|
|
1314
1319
|
cancel(t = !1) {
|
|
1315
1320
|
this._onTapStop(null, !t);
|
|
@@ -1326,10 +1331,10 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1326
1331
|
* @param quiet - If this should not trigger the move event
|
|
1327
1332
|
*/
|
|
1328
1333
|
select(t, n = !1) {
|
|
1329
|
-
const { changed: o, selected:
|
|
1330
|
-
(c) => !
|
|
1334
|
+
const { changed: o, selected: i, stored: s } = this._selection, r = V(t, this._options.document).filter(
|
|
1335
|
+
(c) => !i.includes(c) && !s.includes(c)
|
|
1331
1336
|
);
|
|
1332
|
-
return
|
|
1337
|
+
return s.push(...r), i.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
|
|
1333
1338
|
}
|
|
1334
1339
|
/**
|
|
1335
1340
|
* Removes a particular element from the selection.
|
|
@@ -1337,18 +1342,17 @@ const Ce = (e, t = "px") => typeof e == "number" ? e + t : e, j = ({ style: e },
|
|
|
1337
1342
|
* @param quiet - If this should not trigger the move event
|
|
1338
1343
|
*/
|
|
1339
1344
|
deselect(t, n = !1) {
|
|
1340
|
-
const { selected: o, stored:
|
|
1341
|
-
(c) => o.includes(c) ||
|
|
1345
|
+
const { selected: o, stored: i, changed: s } = this._selection, r = V(t, this._options.document).filter(
|
|
1346
|
+
(c) => o.includes(c) || i.includes(c)
|
|
1342
1347
|
);
|
|
1343
|
-
this._selection.stored =
|
|
1344
|
-
...r.filter((c) => !
|
|
1345
|
-
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null));
|
|
1348
|
+
r.length && (this._selection.stored = i.filter((c) => !r.includes(c)), this._selection.selected = o.filter((c) => !r.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
1349
|
+
...r.filter((c) => !s.removed.includes(c))
|
|
1350
|
+
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
1346
1351
|
}
|
|
1347
|
-
}
|
|
1348
|
-
Ve
|
|
1349
|
-
let Ht = Ve;
|
|
1352
|
+
}
|
|
1353
|
+
E(Ve, "version", "3.5.1");
|
|
1350
1354
|
function Bt(e) {
|
|
1351
|
-
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new
|
|
1355
|
+
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new Ve({
|
|
1352
1356
|
selectables: [".map-container me-tpc"],
|
|
1353
1357
|
boundaries: [e.container],
|
|
1354
1358
|
container: e.selectionContainer,
|
|
@@ -1371,22 +1375,22 @@ function Bt(e) {
|
|
|
1371
1375
|
}).on("beforestart", ({ event: o }) => {
|
|
1372
1376
|
if (o.target.tagName === "ME-TPC" || o.target.id === "input-box" || o.target.className === "circle")
|
|
1373
1377
|
return !1;
|
|
1374
|
-
const
|
|
1375
|
-
return
|
|
1378
|
+
const i = n.getSelectionArea();
|
|
1379
|
+
return i.style.background = "#4f90f22d", i.style.border = "1px solid #4f90f2", i.parentElement && (i.parentElement.style.zIndex = "9999"), !0;
|
|
1376
1380
|
}).on("start", ({ event: o }) => {
|
|
1377
1381
|
!o.ctrlKey && !o.metaKey && (e.clearSelection(), n.clearSelection(!0, !0));
|
|
1378
1382
|
}).on(
|
|
1379
1383
|
"move",
|
|
1380
1384
|
({
|
|
1381
1385
|
store: {
|
|
1382
|
-
changed: { added: o, removed:
|
|
1386
|
+
changed: { added: o, removed: i }
|
|
1383
1387
|
}
|
|
1384
1388
|
}) => {
|
|
1385
|
-
|
|
1386
|
-
for (const
|
|
1387
|
-
|
|
1388
|
-
for (const
|
|
1389
|
-
|
|
1389
|
+
k.moved = !0;
|
|
1390
|
+
for (const s of o)
|
|
1391
|
+
s.classList.add("selected");
|
|
1392
|
+
for (const s of i)
|
|
1393
|
+
s.classList.remove("selected");
|
|
1390
1394
|
}
|
|
1391
1395
|
).on("stop", ({ store: { stored: o } }) => {
|
|
1392
1396
|
e.selectNodes(o);
|
|
@@ -1397,76 +1401,76 @@ const Rt = function(e, t = !0) {
|
|
|
1397
1401
|
this.theme = e;
|
|
1398
1402
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1399
1403
|
this.mindElixirBox.style.cssText = "";
|
|
1400
|
-
for (let
|
|
1401
|
-
const
|
|
1402
|
-
this.mindElixirBox.style.setProperty(
|
|
1404
|
+
for (let i = 0; i < o.length; i++) {
|
|
1405
|
+
const s = o[i];
|
|
1406
|
+
this.mindElixirBox.style.setProperty(s, n[s]);
|
|
1403
1407
|
}
|
|
1404
1408
|
e.cssVar["--gap"] || this.mindElixirBox.style.setProperty("--gap", "30px"), t && this.refresh();
|
|
1405
|
-
},
|
|
1409
|
+
}, W = (e) => {
|
|
1406
1410
|
var o;
|
|
1407
1411
|
const t = (o = e.parent) == null ? void 0 : o.children, n = (t == null ? void 0 : t.indexOf(e)) ?? 0;
|
|
1408
1412
|
return { siblings: t, index: n };
|
|
1409
1413
|
};
|
|
1410
1414
|
function zt(e) {
|
|
1411
|
-
const { siblings: t, index: n } =
|
|
1415
|
+
const { siblings: t, index: n } = W(e);
|
|
1412
1416
|
if (t === void 0)
|
|
1413
1417
|
return;
|
|
1414
1418
|
const o = t[n];
|
|
1415
1419
|
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
|
|
1416
1420
|
}
|
|
1417
1421
|
function Ft(e) {
|
|
1418
|
-
const { siblings: t, index: n } =
|
|
1422
|
+
const { siblings: t, index: n } = W(e);
|
|
1419
1423
|
if (t === void 0)
|
|
1420
1424
|
return;
|
|
1421
1425
|
const o = t[n];
|
|
1422
1426
|
n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
|
|
1423
1427
|
}
|
|
1424
|
-
function
|
|
1425
|
-
const { siblings: t, index: n } =
|
|
1428
|
+
function be(e) {
|
|
1429
|
+
const { siblings: t, index: n } = W(e);
|
|
1426
1430
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1427
1431
|
}
|
|
1428
1432
|
function qt(e, t, n) {
|
|
1429
|
-
const { siblings: o, index:
|
|
1430
|
-
o !== void 0 && (t === "before" ? o.splice(
|
|
1433
|
+
const { siblings: o, index: i } = W(n);
|
|
1434
|
+
o !== void 0 && (t === "before" ? o.splice(i, 0, e) : o.splice(i + 1, 0, e));
|
|
1431
1435
|
}
|
|
1432
1436
|
function It(e, t) {
|
|
1433
|
-
const { siblings: n, index: o } =
|
|
1437
|
+
const { siblings: n, index: o } = W(e);
|
|
1434
1438
|
n !== void 0 && (n[o] = t, t.children = [e]);
|
|
1435
1439
|
}
|
|
1436
1440
|
function Ke(e, t, n) {
|
|
1437
|
-
if (
|
|
1441
|
+
if (be(t), e === "in")
|
|
1438
1442
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1439
1443
|
else {
|
|
1440
1444
|
t.direction !== void 0 && (t.direction = n.direction);
|
|
1441
|
-
const { siblings: o, index:
|
|
1445
|
+
const { siblings: o, index: i } = W(n);
|
|
1442
1446
|
if (o === void 0)
|
|
1443
1447
|
return;
|
|
1444
|
-
e === "before" ? o.splice(
|
|
1448
|
+
e === "before" ? o.splice(i, 0, t) : o.splice(i + 1, 0, t);
|
|
1445
1449
|
}
|
|
1446
1450
|
}
|
|
1447
1451
|
const Vt = function(e, t) {
|
|
1448
1452
|
var n, o;
|
|
1449
|
-
if (e === L)
|
|
1450
|
-
return L;
|
|
1451
1453
|
if (e === $)
|
|
1452
1454
|
return $;
|
|
1453
|
-
if (e ===
|
|
1454
|
-
|
|
1455
|
-
|
|
1455
|
+
if (e === P)
|
|
1456
|
+
return P;
|
|
1457
|
+
if (e === ae) {
|
|
1458
|
+
const i = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, s = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1459
|
+
return i <= s ? (t.direction = $, $) : (t.direction = P, P);
|
|
1456
1460
|
}
|
|
1457
1461
|
}, We = function(e, t, n) {
|
|
1458
|
-
var
|
|
1459
|
-
const o = n.children[0].children[0],
|
|
1460
|
-
if (
|
|
1461
|
-
if (
|
|
1462
|
-
|
|
1462
|
+
var s, r;
|
|
1463
|
+
const o = n.children[0].children[0], i = t.parentElement;
|
|
1464
|
+
if (i.tagName === "ME-PARENT") {
|
|
1465
|
+
if (Q(o), i.children[1])
|
|
1466
|
+
i.nextSibling.appendChild(n);
|
|
1463
1467
|
else {
|
|
1464
1468
|
const c = e.createChildren([n]);
|
|
1465
|
-
|
|
1469
|
+
i.appendChild(ve(!0)), i.insertAdjacentElement("afterend", c);
|
|
1466
1470
|
}
|
|
1467
1471
|
e.linkDiv(n.offsetParent);
|
|
1468
1472
|
} else
|
|
1469
|
-
|
|
1473
|
+
i.tagName === "ME-ROOT" && (Vt(e.direction, o.nodeObj) === $ ? (s = e.container.querySelector(".lhs")) == null || s.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1470
1474
|
}, Ue = function(e, t) {
|
|
1471
1475
|
const n = e.parentNode;
|
|
1472
1476
|
if (t === 0) {
|
|
@@ -1477,107 +1481,107 @@ const Vt = function(e, t) {
|
|
|
1477
1481
|
}, Ye = {
|
|
1478
1482
|
before: "beforebegin",
|
|
1479
1483
|
after: "afterend"
|
|
1480
|
-
},
|
|
1484
|
+
}, Q = function(e) {
|
|
1481
1485
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1482
1486
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1483
1487
|
}, Kt = function(e, t) {
|
|
1484
|
-
const n = e.nodeObj, o =
|
|
1488
|
+
const n = e.nodeObj, o = me(n);
|
|
1485
1489
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1490
|
+
const i = Object.assign(n, t);
|
|
1491
|
+
ge(e, i), this.linkDiv(), this.bus.fire("operation", {
|
|
1488
1492
|
name: "reshapeNode",
|
|
1489
|
-
obj:
|
|
1493
|
+
obj: i,
|
|
1490
1494
|
origin: o
|
|
1491
1495
|
});
|
|
1492
|
-
},
|
|
1496
|
+
}, ye = function(e, t, n) {
|
|
1493
1497
|
if (!t)
|
|
1494
1498
|
return null;
|
|
1495
1499
|
const o = t.nodeObj;
|
|
1496
|
-
o.expanded === !1 && (e.expandNode(t, !0), t =
|
|
1497
|
-
const
|
|
1498
|
-
o.children ? o.children.push(
|
|
1499
|
-
const { grp:
|
|
1500
|
-
return We(e, t,
|
|
1500
|
+
o.expanded === !1 && (e.expandNode(t, !0), t = C(o.id));
|
|
1501
|
+
const i = n || e.generateNewObj();
|
|
1502
|
+
o.children ? o.children.push(i) : o.children = [i], B(e.nodeData);
|
|
1503
|
+
const { grp: s, top: r } = e.createWrapper(i);
|
|
1504
|
+
return We(e, t, s), { newTop: r, newNodeObj: i };
|
|
1501
1505
|
}, Wt = function(e, t, n) {
|
|
1502
|
-
var
|
|
1506
|
+
var d, h, u, a;
|
|
1503
1507
|
const o = t || this.currentNode;
|
|
1504
1508
|
if (!o)
|
|
1505
1509
|
return;
|
|
1506
|
-
const
|
|
1507
|
-
if (
|
|
1508
|
-
if (!((
|
|
1509
|
-
this.addChild(
|
|
1510
|
+
const i = o.nodeObj;
|
|
1511
|
+
if (i.parent) {
|
|
1512
|
+
if (!((d = i.parent) != null && d.parent) && ((u = (h = i.parent) == null ? void 0 : h.children) == null ? void 0 : u.length) === 1) {
|
|
1513
|
+
this.addChild(C(i.parent.id), n);
|
|
1510
1514
|
return;
|
|
1511
1515
|
}
|
|
1512
1516
|
} else {
|
|
1513
1517
|
this.addChild();
|
|
1514
1518
|
return;
|
|
1515
1519
|
}
|
|
1516
|
-
const
|
|
1517
|
-
if (!((
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
+
const s = n || this.generateNewObj();
|
|
1521
|
+
if (!((a = i.parent) != null && a.parent)) {
|
|
1522
|
+
const p = o.closest("me-main").className === L.LHS ? $ : P;
|
|
1523
|
+
s.direction = p;
|
|
1520
1524
|
}
|
|
1521
|
-
qt(
|
|
1522
|
-
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(
|
|
1525
|
+
qt(s, e, i), B(this.nodeData);
|
|
1526
|
+
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(s);
|
|
1523
1527
|
r.parentElement.insertAdjacentElement(Ye[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1524
1528
|
name: "insertSibling",
|
|
1525
1529
|
type: e,
|
|
1526
|
-
obj:
|
|
1530
|
+
obj: s
|
|
1527
1531
|
});
|
|
1528
1532
|
}, Ut = function(e, t) {
|
|
1529
1533
|
const n = e || this.currentNode;
|
|
1530
1534
|
if (!n)
|
|
1531
1535
|
return;
|
|
1532
|
-
|
|
1536
|
+
Q(n);
|
|
1533
1537
|
const o = n.nodeObj;
|
|
1534
1538
|
if (!o.parent)
|
|
1535
1539
|
return;
|
|
1536
|
-
const
|
|
1537
|
-
It(o,
|
|
1538
|
-
const
|
|
1539
|
-
c.appendChild(
|
|
1540
|
-
const l = this.createChildren([
|
|
1540
|
+
const i = t || this.generateNewObj();
|
|
1541
|
+
It(o, i), B(this.nodeData);
|
|
1542
|
+
const s = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(i, !0);
|
|
1543
|
+
c.appendChild(ve(!0)), s.insertAdjacentElement("afterend", r);
|
|
1544
|
+
const l = this.createChildren([s]);
|
|
1541
1545
|
c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
|
|
1542
1546
|
name: "insertParent",
|
|
1543
|
-
obj:
|
|
1547
|
+
obj: i
|
|
1544
1548
|
});
|
|
1545
1549
|
}, Yt = function(e, t) {
|
|
1546
1550
|
const n = e || this.currentNode;
|
|
1547
1551
|
if (!n)
|
|
1548
1552
|
return;
|
|
1549
|
-
const o =
|
|
1553
|
+
const o = ye(this, n, t);
|
|
1550
1554
|
if (!o)
|
|
1551
1555
|
return;
|
|
1552
|
-
const { newTop:
|
|
1556
|
+
const { newTop: i, newNodeObj: s } = o;
|
|
1553
1557
|
this.bus.fire("operation", {
|
|
1554
1558
|
name: "addChild",
|
|
1555
|
-
obj:
|
|
1556
|
-
}), t || this.editTopic(
|
|
1559
|
+
obj: s
|
|
1560
|
+
}), t || this.editTopic(i.firstChild), this.selectNode(i.firstChild, !0);
|
|
1557
1561
|
}, Xt = function(e, t) {
|
|
1558
|
-
const n =
|
|
1559
|
-
|
|
1560
|
-
const o =
|
|
1562
|
+
const n = me(e.nodeObj);
|
|
1563
|
+
pe(n);
|
|
1564
|
+
const o = ye(this, t, n);
|
|
1561
1565
|
if (!o)
|
|
1562
1566
|
return;
|
|
1563
|
-
const { newNodeObj:
|
|
1564
|
-
this.selectNode(
|
|
1567
|
+
const { newNodeObj: i } = o;
|
|
1568
|
+
this.selectNode(C(i.id)), this.bus.fire("operation", {
|
|
1565
1569
|
name: "copyNode",
|
|
1566
|
-
obj:
|
|
1570
|
+
obj: i
|
|
1567
1571
|
});
|
|
1568
1572
|
}, Gt = function(e, t) {
|
|
1569
|
-
e =
|
|
1573
|
+
e = de(e);
|
|
1570
1574
|
const n = [];
|
|
1571
1575
|
for (let o = 0; o < e.length; o++) {
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
const r =
|
|
1576
|
+
const i = e[o], s = me(i.nodeObj);
|
|
1577
|
+
pe(s);
|
|
1578
|
+
const r = ye(this, t, s);
|
|
1575
1579
|
if (!r)
|
|
1576
1580
|
return;
|
|
1577
1581
|
const { newNodeObj: c } = r;
|
|
1578
1582
|
n.push(c);
|
|
1579
1583
|
}
|
|
1580
|
-
this.selectNodes(n.map((o) =>
|
|
1584
|
+
this.selectNodes(n.map((o) => C(o.id))), this.bus.fire("operation", {
|
|
1581
1585
|
name: "copyNodes",
|
|
1582
1586
|
objs: n
|
|
1583
1587
|
});
|
|
@@ -1611,25 +1615,25 @@ const Vt = function(e, t) {
|
|
|
1611
1615
|
const n = t.nodeObj;
|
|
1612
1616
|
if (!n.parent)
|
|
1613
1617
|
throw new Error("Can not remove root node");
|
|
1614
|
-
const o = n.parent.children,
|
|
1615
|
-
if (Ue(t,
|
|
1616
|
-
const c = o[
|
|
1617
|
-
this.selectNode(
|
|
1618
|
+
const o = n.parent.children, i = o.findIndex((c) => c === n), s = be(n);
|
|
1619
|
+
if (Ue(t, s), o.length !== 0) {
|
|
1620
|
+
const c = o[i] || o[i - 1];
|
|
1621
|
+
this.selectNode(C(c.id));
|
|
1618
1622
|
} else
|
|
1619
|
-
this.selectNode(
|
|
1623
|
+
this.selectNode(C(n.parent.id));
|
|
1620
1624
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1621
1625
|
name: "removeNode",
|
|
1622
1626
|
obj: n,
|
|
1623
|
-
originIndex:
|
|
1627
|
+
originIndex: i,
|
|
1624
1628
|
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1625
1629
|
});
|
|
1626
1630
|
}, en = function(e) {
|
|
1627
|
-
e =
|
|
1631
|
+
e = de(e);
|
|
1628
1632
|
for (const t of e) {
|
|
1629
1633
|
const n = t.nodeObj;
|
|
1630
1634
|
if (!n.parent)
|
|
1631
1635
|
continue;
|
|
1632
|
-
const o =
|
|
1636
|
+
const o = be(n);
|
|
1633
1637
|
Ue(t, o);
|
|
1634
1638
|
}
|
|
1635
1639
|
this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1637,14 +1641,14 @@ const Vt = function(e, t) {
|
|
|
1637
1641
|
objs: e.map((t) => t.nodeObj)
|
|
1638
1642
|
});
|
|
1639
1643
|
}, tn = function(e, t) {
|
|
1640
|
-
e =
|
|
1644
|
+
e = de(e);
|
|
1641
1645
|
const n = t.nodeObj;
|
|
1642
|
-
n.expanded === !1 && (this.expandNode(t, !0), t =
|
|
1646
|
+
n.expanded === !1 && (this.expandNode(t, !0), t = C(n.id));
|
|
1643
1647
|
for (const o of e) {
|
|
1644
|
-
const
|
|
1645
|
-
Ke("in",
|
|
1646
|
-
const
|
|
1647
|
-
We(this, t,
|
|
1648
|
+
const i = o.nodeObj;
|
|
1649
|
+
Ke("in", i, n), B(this.nodeData);
|
|
1650
|
+
const s = o.parentElement;
|
|
1651
|
+
We(this, t, s.parentElement);
|
|
1648
1652
|
}
|
|
1649
1653
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1650
1654
|
name: "moveNodeIn",
|
|
@@ -1652,18 +1656,18 @@ const Vt = function(e, t) {
|
|
|
1652
1656
|
toObj: n
|
|
1653
1657
|
});
|
|
1654
1658
|
}, Xe = (e, t, n, o) => {
|
|
1655
|
-
e =
|
|
1656
|
-
const
|
|
1657
|
-
for (const
|
|
1658
|
-
const r =
|
|
1659
|
-
Ke(t, r,
|
|
1660
|
-
const c =
|
|
1659
|
+
e = de(e), t === "after" && (e = e.reverse());
|
|
1660
|
+
const i = n.nodeObj;
|
|
1661
|
+
for (const s of e) {
|
|
1662
|
+
const r = s.nodeObj;
|
|
1663
|
+
Ke(t, r, i), B(o.nodeData), Q(s);
|
|
1664
|
+
const c = s.parentElement.parentNode;
|
|
1661
1665
|
n.parentElement.parentNode.insertAdjacentElement(Ye[t], c);
|
|
1662
1666
|
}
|
|
1663
1667
|
o.linkDiv(), o.bus.fire("operation", {
|
|
1664
1668
|
name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
|
|
1665
|
-
objs: e.map((
|
|
1666
|
-
toObj:
|
|
1669
|
+
objs: e.map((s) => s.nodeObj),
|
|
1670
|
+
toObj: i
|
|
1667
1671
|
});
|
|
1668
1672
|
}, nn = function(e, t) {
|
|
1669
1673
|
Xe(e, "before", t, this);
|
|
@@ -1690,7 +1694,7 @@ const Vt = function(e, t) {
|
|
|
1690
1694
|
removeNode: Qt,
|
|
1691
1695
|
removeNodes: en,
|
|
1692
1696
|
reshapeNode: Kt,
|
|
1693
|
-
rmSubline:
|
|
1697
|
+
rmSubline: Q,
|
|
1694
1698
|
setNodeTopic: rn
|
|
1695
1699
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1696
1700
|
function Je(e) {
|
|
@@ -1705,7 +1709,7 @@ function Je(e) {
|
|
|
1705
1709
|
const cn = function(e, t, n) {
|
|
1706
1710
|
if (e) {
|
|
1707
1711
|
if (this.clearSelection(), typeof e == "string") {
|
|
1708
|
-
const o =
|
|
1712
|
+
const o = C(e);
|
|
1709
1713
|
return o ? this.selectNode(o) : void 0;
|
|
1710
1714
|
}
|
|
1711
1715
|
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);
|
|
@@ -1740,12 +1744,12 @@ const cn = function(e, t, n) {
|
|
|
1740
1744
|
let t = "# " + e.topic + `
|
|
1741
1745
|
|
|
1742
1746
|
`;
|
|
1743
|
-
function n(o,
|
|
1744
|
-
for (let
|
|
1745
|
-
|
|
1747
|
+
function n(o, i) {
|
|
1748
|
+
for (let s = 0; s < o.length; s++)
|
|
1749
|
+
i <= 6 ? t += "".padStart(i, "#") + " " + o[s].topic + `
|
|
1746
1750
|
|
|
1747
|
-
` : t += "".padStart(
|
|
1748
|
-
`, o[
|
|
1751
|
+
` : t += "".padStart(i - 7, " ") + "- " + o[s].topic + `
|
|
1752
|
+
`, o[s].children && n(o[s].children || [], i + 1);
|
|
1749
1753
|
}
|
|
1750
1754
|
return n(e.children || [], 2), t;
|
|
1751
1755
|
}, mn = function() {
|
|
@@ -1754,9 +1758,9 @@ const cn = function(e, t, n) {
|
|
|
1754
1758
|
this.editable = !1;
|
|
1755
1759
|
}, vn = function(e) {
|
|
1756
1760
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")", this.bus.fire("scale", e);
|
|
1757
|
-
},
|
|
1761
|
+
}, bn = function() {
|
|
1758
1762
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1759
|
-
},
|
|
1763
|
+
}, yn = function(e) {
|
|
1760
1764
|
e(this);
|
|
1761
1765
|
}, xn = function(e) {
|
|
1762
1766
|
e.nodeObj.parent && (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.initRight(), this.toCenter());
|
|
@@ -1766,27 +1770,27 @@ const cn = function(e, t, n) {
|
|
|
1766
1770
|
this.direction = 0, this.refresh();
|
|
1767
1771
|
}, Nn = function() {
|
|
1768
1772
|
this.direction = 1, this.refresh();
|
|
1769
|
-
},
|
|
1773
|
+
}, Cn = function() {
|
|
1770
1774
|
this.direction = 2, this.refresh();
|
|
1771
|
-
},
|
|
1775
|
+
}, Sn = function(e) {
|
|
1772
1776
|
this.locale = e, this.refresh();
|
|
1773
1777
|
}, _n = function(e, t) {
|
|
1774
1778
|
const n = e.nodeObj;
|
|
1775
1779
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1776
|
-
const o = e.parentNode,
|
|
1777
|
-
if (
|
|
1780
|
+
const o = e.parentNode, i = o.children[1];
|
|
1781
|
+
if (i.expanded = n.expanded, i.className = n.expanded ? "minus" : "", Q(e), n.expanded) {
|
|
1778
1782
|
const l = this.createChildren(
|
|
1779
|
-
n.children.map((
|
|
1783
|
+
n.children.map((d) => this.createWrapper(d).grp)
|
|
1780
1784
|
);
|
|
1781
1785
|
o.parentNode.appendChild(l);
|
|
1782
1786
|
} else
|
|
1783
1787
|
o.parentNode.children[1].remove();
|
|
1784
1788
|
this.linkDiv(e.closest("me-main > me-wrapper"));
|
|
1785
|
-
const
|
|
1786
|
-
(
|
|
1787
|
-
},
|
|
1788
|
-
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []),
|
|
1789
|
-
},
|
|
1789
|
+
const s = e.getBoundingClientRect(), r = this.container.getBoundingClientRect();
|
|
1790
|
+
(s.bottom > r.bottom || s.top < r.top || s.right > r.right || s.left < r.left) && e.scrollIntoView({ block: "center", inline: "center" }), this.bus.fire("expandNode", n);
|
|
1791
|
+
}, Ln = function(e) {
|
|
1792
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), B(this.nodeData), this.layout(), this.linkDiv();
|
|
1793
|
+
}, Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1790
1794
|
__proto__: null,
|
|
1791
1795
|
cancelFocus: wn,
|
|
1792
1796
|
clearSelection: hn,
|
|
@@ -1799,17 +1803,17 @@ const cn = function(e, t, n) {
|
|
|
1799
1803
|
getDataString: un,
|
|
1800
1804
|
initLeft: En,
|
|
1801
1805
|
initRight: Nn,
|
|
1802
|
-
initSide:
|
|
1803
|
-
install:
|
|
1804
|
-
refresh:
|
|
1806
|
+
initSide: Cn,
|
|
1807
|
+
install: yn,
|
|
1808
|
+
refresh: Ln,
|
|
1805
1809
|
scale: vn,
|
|
1806
1810
|
selectNode: cn,
|
|
1807
1811
|
selectNodes: an,
|
|
1808
|
-
setLocale:
|
|
1809
|
-
toCenter:
|
|
1812
|
+
setLocale: Sn,
|
|
1813
|
+
toCenter: bn,
|
|
1810
1814
|
unselectNode: ln,
|
|
1811
1815
|
unselectNodes: dn
|
|
1812
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1816
|
+
}, Symbol.toStringTag, { value: "Module" })), kn = function(e) {
|
|
1813
1817
|
return {
|
|
1814
1818
|
dom: e,
|
|
1815
1819
|
moved: !1,
|
|
@@ -1836,20 +1840,20 @@ const cn = function(e, t, n) {
|
|
|
1836
1840
|
}
|
|
1837
1841
|
};
|
|
1838
1842
|
}, je = {
|
|
1839
|
-
create:
|
|
1843
|
+
create: kn
|
|
1840
1844
|
};
|
|
1841
|
-
function
|
|
1842
|
-
const { offsetLeft: o, offsetTop:
|
|
1845
|
+
function le(e, t, n) {
|
|
1846
|
+
const { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = t.offsetWidth, r = t.offsetHeight, c = o + s / 2, l = i + r / 2, d = c + n.x, h = l + n.y;
|
|
1843
1847
|
return {
|
|
1844
|
-
w:
|
|
1848
|
+
w: s,
|
|
1845
1849
|
h: r,
|
|
1846
1850
|
cx: c,
|
|
1847
1851
|
cy: l,
|
|
1848
|
-
ctrlX:
|
|
1849
|
-
ctrlY:
|
|
1852
|
+
ctrlX: d,
|
|
1853
|
+
ctrlY: h
|
|
1850
1854
|
};
|
|
1851
1855
|
}
|
|
1852
|
-
function
|
|
1856
|
+
function K(e) {
|
|
1853
1857
|
let t, n;
|
|
1854
1858
|
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1855
1859
|
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), {
|
|
@@ -1858,25 +1862,28 @@ function q(e) {
|
|
|
1858
1862
|
};
|
|
1859
1863
|
}
|
|
1860
1864
|
const Tn = function(e, t, n, o) {
|
|
1861
|
-
const
|
|
1862
|
-
return
|
|
1865
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1866
|
+
return N(i, {
|
|
1863
1867
|
"text-anchor": "middle",
|
|
1864
1868
|
x: t + "",
|
|
1865
1869
|
y: n + "",
|
|
1866
1870
|
fill: o || "#666"
|
|
1867
|
-
}),
|
|
1868
|
-
}, Ze = function(e, t, n, o,
|
|
1871
|
+
}), i.dataset.type = "custom-link", i.innerHTML = e, i;
|
|
1872
|
+
}, Ze = function(e, t, n, o, i) {
|
|
1869
1873
|
if (!t || !n)
|
|
1870
1874
|
return;
|
|
1871
1875
|
performance.now();
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
}
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1876
|
+
const s = le(e, t, o.delta1), r = le(e, n, o.delta2), { x: c, y: l } = K(s), { ctrlX: d, ctrlY: h } = s, { ctrlX: u, ctrlY: a } = r, { x: p, y: m } = K(r), v = re(u, a, p, m), g = `M ${v.x1} ${v.y1} L ${p} ${m} L ${v.x2} ${v.y2}`;
|
|
1877
|
+
let f = "";
|
|
1878
|
+
if (o.bidirectional) {
|
|
1879
|
+
const w = re(d, h, c, l);
|
|
1880
|
+
f = `M ${w.x1} ${w.y1} L ${c} ${l} L ${w.x2} ${w.y2}`;
|
|
1881
|
+
}
|
|
1882
|
+
const b = pt(`M ${c} ${l} C ${d} ${h} ${u} ${a} ${p} ${m}`, g, f), x = c / 8 + d * 3 / 8 + u * 3 / 8 + p / 8, S = l / 8 + h * 3 / 8 + a * 3 / 8 + m / 8, y = Tn(o.label, x, S, e.theme.cssVar["--color"]);
|
|
1883
|
+
b.appendChild(y), b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b), i || (e.arrows.push(o), e.currentArrow = b, Qe(e, o, s, r)), performance.now();
|
|
1884
|
+
}, An = function(e, t, n = {}) {
|
|
1885
|
+
const o = {
|
|
1886
|
+
id: Z(),
|
|
1880
1887
|
label: "Custom Link",
|
|
1881
1888
|
from: e.nodeObj.id,
|
|
1882
1889
|
to: t.nodeObj.id,
|
|
@@ -1887,17 +1894,18 @@ const Tn = function(e, t, n, o) {
|
|
|
1887
1894
|
delta2: {
|
|
1888
1895
|
x: 0,
|
|
1889
1896
|
y: -200
|
|
1890
|
-
}
|
|
1897
|
+
},
|
|
1898
|
+
...n
|
|
1891
1899
|
};
|
|
1892
|
-
Ze(this, e, t,
|
|
1900
|
+
Ze(this, e, t, o), this.bus.fire("operation", {
|
|
1893
1901
|
name: "createArrow",
|
|
1894
|
-
obj:
|
|
1902
|
+
obj: o
|
|
1895
1903
|
});
|
|
1896
|
-
},
|
|
1904
|
+
}, $n = function(e) {
|
|
1897
1905
|
let t;
|
|
1898
1906
|
if (e ? t = e : t = this.currentArrow, !t)
|
|
1899
1907
|
return;
|
|
1900
|
-
|
|
1908
|
+
xe(this);
|
|
1901
1909
|
const n = t.arrowObj.id;
|
|
1902
1910
|
this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
|
|
1903
1911
|
name: "removeArrow",
|
|
@@ -1905,58 +1913,64 @@ const Tn = function(e, t, n, o) {
|
|
|
1905
1913
|
id: n
|
|
1906
1914
|
}
|
|
1907
1915
|
});
|
|
1908
|
-
},
|
|
1916
|
+
}, jn = function(e) {
|
|
1909
1917
|
this.currentArrow = e;
|
|
1910
|
-
const t = e.arrowObj, n =
|
|
1911
|
-
|
|
1912
|
-
},
|
|
1913
|
-
this.currentArrow = null,
|
|
1914
|
-
},
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
+
const t = e.arrowObj, n = C(t.from), o = C(t.to), i = le(this, n, t.delta1), s = le(this, o, t.delta2);
|
|
1919
|
+
Qe(this, t, i, s);
|
|
1920
|
+
}, Dn = function() {
|
|
1921
|
+
this.currentArrow = null, xe(this);
|
|
1922
|
+
}, xe = function(e) {
|
|
1923
|
+
var t, n;
|
|
1924
|
+
(t = e.helper1) == null || t.destory(e.map), (n = e.helper2) == null || n.destory(e.map), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1925
|
+
}, Qe = function(e, t, n, o) {
|
|
1918
1926
|
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);
|
|
1919
|
-
let { x:
|
|
1920
|
-
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${
|
|
1921
|
-
x1:
|
|
1922
|
-
y1:
|
|
1927
|
+
let { x: i, y: s } = K(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: d } = o, { x: h, y: u } = K(o);
|
|
1928
|
+
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${d}px;left:${l}px;`, N(e.line1, {
|
|
1929
|
+
x1: i + "",
|
|
1930
|
+
y1: s + "",
|
|
1923
1931
|
x2: r + "",
|
|
1924
1932
|
y2: c + ""
|
|
1925
|
-
}),
|
|
1933
|
+
}), N(e.line2, {
|
|
1926
1934
|
x1: l + "",
|
|
1927
|
-
y1:
|
|
1928
|
-
x2:
|
|
1929
|
-
y2:
|
|
1930
|
-
}), e.helper1
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1935
|
+
y1: d + "",
|
|
1936
|
+
x2: h + "",
|
|
1937
|
+
y2: u + ""
|
|
1938
|
+
}), e.helper1 = je.create(e.P2), e.helper2 = je.create(e.P3), e.helper1.init(e.map, (a, p) => {
|
|
1939
|
+
if (!e.currentArrow)
|
|
1940
|
+
return;
|
|
1941
|
+
r = r + a / e.scaleVal, c = c + p / e.scaleVal;
|
|
1942
|
+
const m = K({ ...n, ctrlX: r, ctrlY: c });
|
|
1943
|
+
i = m.x, s = m.y;
|
|
1944
|
+
const v = i / 8 + r * 3 / 8 + l * 3 / 8 + h / 8, g = s / 8 + c * 3 / 8 + d * 3 / 8 + u / 8;
|
|
1945
|
+
if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.children[0].setAttribute("d", `M ${i} ${s} C ${r} ${c} ${l} ${d} ${h} ${u}`), t.bidirectional) {
|
|
1946
|
+
const f = re(r, c, i, s);
|
|
1947
|
+
e.currentArrow.children[2].setAttribute("d", `M ${f.x1} ${f.y1} L ${i} ${s} L ${f.x2} ${f.y2}`);
|
|
1948
|
+
}
|
|
1949
|
+
N(e.currentArrow.children[3], {
|
|
1950
|
+
x: v + "",
|
|
1951
|
+
y: g + ""
|
|
1952
|
+
}), N(e.line1, {
|
|
1953
|
+
x1: i + "",
|
|
1954
|
+
y1: s + "",
|
|
1942
1955
|
x2: r + "",
|
|
1943
1956
|
y2: c + ""
|
|
1944
1957
|
}), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy;
|
|
1945
|
-
}), e.helper2.init(e.map, (
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1958
|
+
}), e.helper2.init(e.map, (a, p) => {
|
|
1959
|
+
if (!e.currentArrow)
|
|
1960
|
+
return;
|
|
1961
|
+
l = l + a / e.scaleVal, d = d + p / e.scaleVal;
|
|
1962
|
+
const m = K({ ...o, ctrlX: l, ctrlY: d });
|
|
1963
|
+
h = m.x, u = m.y;
|
|
1964
|
+
const v = i / 8 + r * 3 / 8 + l * 3 / 8 + h / 8, g = s / 8 + c * 3 / 8 + d * 3 / 8 + u / 8, f = re(l, d, h, u);
|
|
1965
|
+
e.P3.style.top = d + "px", e.P3.style.left = l + "px", e.currentArrow.children[0].setAttribute("d", `M ${i} ${s} C ${r} ${c} ${l} ${d} ${h} ${u}`), e.currentArrow.children[1].setAttribute("d", `M ${f.x1} ${f.y1} L ${h} ${u} L ${f.x2} ${f.y2}`), N(e.currentArrow.children[3], {
|
|
1966
|
+
x: v + "",
|
|
1967
|
+
y: g + ""
|
|
1968
|
+
}), N(e.line2, {
|
|
1955
1969
|
x1: l + "",
|
|
1956
|
-
y1:
|
|
1957
|
-
x2:
|
|
1958
|
-
y2:
|
|
1959
|
-
}), t.delta2.x = l - o.cx, t.delta2.y =
|
|
1970
|
+
y1: d + "",
|
|
1971
|
+
x2: h + "",
|
|
1972
|
+
y2: u + ""
|
|
1973
|
+
}), t.delta2.x = l - o.cx, t.delta2.y = d - o.cy;
|
|
1960
1974
|
});
|
|
1961
1975
|
};
|
|
1962
1976
|
function On() {
|
|
@@ -1964,78 +1978,78 @@ function On() {
|
|
|
1964
1978
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1965
1979
|
const t = this.arrows[e];
|
|
1966
1980
|
try {
|
|
1967
|
-
Ze(this,
|
|
1981
|
+
Ze(this, C(t.from), C(t.to), t, !0);
|
|
1968
1982
|
} catch {
|
|
1969
1983
|
}
|
|
1970
1984
|
}
|
|
1971
1985
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1972
1986
|
}
|
|
1973
|
-
function
|
|
1974
|
-
if (!e)
|
|
1987
|
+
function Hn(e) {
|
|
1988
|
+
if (xe(this), !e)
|
|
1975
1989
|
return;
|
|
1976
|
-
const t = e.children[
|
|
1990
|
+
const t = e.children[3];
|
|
1977
1991
|
Fe(this, t, (n) => {
|
|
1978
|
-
var
|
|
1979
|
-
const o = e.arrowObj,
|
|
1980
|
-
|
|
1992
|
+
var s;
|
|
1993
|
+
const o = e.arrowObj, i = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
|
|
1994
|
+
i === "" ? o.label = origin : o.label = i, n.remove(), i !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
1981
1995
|
name: "finishEditArrowLabel",
|
|
1982
1996
|
obj: o
|
|
1983
1997
|
}));
|
|
1984
1998
|
});
|
|
1985
1999
|
}
|
|
1986
|
-
function
|
|
1987
|
-
this.arrows = this.arrows.filter((e) =>
|
|
2000
|
+
function Pn() {
|
|
2001
|
+
this.arrows = this.arrows.filter((e) => se(e.from, this.nodeData) && se(e.to, this.nodeData));
|
|
1988
2002
|
}
|
|
1989
2003
|
const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1990
2004
|
__proto__: null,
|
|
1991
2005
|
createArrow: An,
|
|
1992
|
-
editArrowLabel:
|
|
1993
|
-
removeArrow:
|
|
2006
|
+
editArrowLabel: Hn,
|
|
2007
|
+
removeArrow: $n,
|
|
1994
2008
|
renderArrow: On,
|
|
1995
|
-
selectArrow:
|
|
1996
|
-
tidyArrow:
|
|
1997
|
-
unselectArrow:
|
|
2009
|
+
selectArrow: jn,
|
|
2010
|
+
tidyArrow: Pn,
|
|
2011
|
+
unselectArrow: Dn
|
|
1998
2012
|
}, Symbol.toStringTag, { value: "Module" })), Rn = function(e) {
|
|
1999
|
-
var l,
|
|
2013
|
+
var l, d;
|
|
2000
2014
|
if (e.length === 0)
|
|
2001
2015
|
throw new Error("No selected node.");
|
|
2002
2016
|
if (e.length === 1) {
|
|
2003
|
-
const
|
|
2004
|
-
if (!
|
|
2017
|
+
const h = e[0].nodeObj, u = e[0].nodeObj.parent;
|
|
2018
|
+
if (!u)
|
|
2005
2019
|
throw new Error("Can not select root node.");
|
|
2006
|
-
const
|
|
2020
|
+
const a = u.children.findIndex((p) => h === p);
|
|
2007
2021
|
return {
|
|
2008
|
-
parent:
|
|
2009
|
-
start:
|
|
2010
|
-
end:
|
|
2022
|
+
parent: u.id,
|
|
2023
|
+
start: a,
|
|
2024
|
+
end: a
|
|
2011
2025
|
};
|
|
2012
2026
|
}
|
|
2013
2027
|
let t = 0;
|
|
2014
|
-
const n = e.map((
|
|
2015
|
-
let
|
|
2016
|
-
const
|
|
2017
|
-
for (;
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2028
|
+
const n = e.map((h) => {
|
|
2029
|
+
let u = h.nodeObj;
|
|
2030
|
+
const a = [];
|
|
2031
|
+
for (; u.parent; ) {
|
|
2032
|
+
const p = u.parent, m = p.children, v = m == null ? void 0 : m.indexOf(u);
|
|
2033
|
+
u = p, a.unshift({ node: u, index: v });
|
|
2020
2034
|
}
|
|
2021
|
-
return
|
|
2035
|
+
return a.length > t && (t = a.length), a;
|
|
2022
2036
|
});
|
|
2023
2037
|
let o = 0;
|
|
2024
2038
|
e:
|
|
2025
2039
|
for (; o < t; o++) {
|
|
2026
|
-
const
|
|
2027
|
-
for (let
|
|
2028
|
-
if (((
|
|
2040
|
+
const h = (l = n[0][o]) == null ? void 0 : l.node;
|
|
2041
|
+
for (let u = 1; u < n.length; u++)
|
|
2042
|
+
if (((d = n[u][o]) == null ? void 0 : d.node) !== h)
|
|
2029
2043
|
break e;
|
|
2030
2044
|
}
|
|
2031
2045
|
if (!o)
|
|
2032
2046
|
throw new Error("Can not select root node.");
|
|
2033
|
-
const
|
|
2047
|
+
const i = n.map((h) => h[o - 1].index).sort(), s = i[0] || 0, r = i[i.length - 1] || 0, c = n[0][o - 1].node;
|
|
2034
2048
|
if (!c.parent)
|
|
2035
2049
|
throw new Error("Please select nodes in the same main topic.");
|
|
2036
2050
|
return {
|
|
2037
2051
|
parent: c.id,
|
|
2038
|
-
start:
|
|
2052
|
+
start: s,
|
|
2039
2053
|
end: r
|
|
2040
2054
|
};
|
|
2041
2055
|
}, zn = function(e) {
|
|
@@ -2043,48 +2057,48 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2043
2057
|
return t.setAttribute("id", e), t;
|
|
2044
2058
|
}, De = function(e, t) {
|
|
2045
2059
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2046
|
-
return
|
|
2060
|
+
return N(n, {
|
|
2047
2061
|
d: e,
|
|
2048
2062
|
stroke: t || "#666",
|
|
2049
2063
|
fill: "none",
|
|
2050
2064
|
"stroke-linecap": "round",
|
|
2051
2065
|
"stroke-width": "2"
|
|
2052
2066
|
}), n;
|
|
2053
|
-
},
|
|
2054
|
-
const
|
|
2055
|
-
return
|
|
2067
|
+
}, Oe = function(e, t, n, o, i) {
|
|
2068
|
+
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2069
|
+
return N(s, {
|
|
2056
2070
|
"text-anchor": o,
|
|
2057
2071
|
x: t + "",
|
|
2058
2072
|
y: n + "",
|
|
2059
|
-
fill:
|
|
2060
|
-
}),
|
|
2061
|
-
}, Fn = (e) =>
|
|
2062
|
-
const n =
|
|
2063
|
-
let
|
|
2064
|
-
return o.parent ?
|
|
2065
|
-
},
|
|
2066
|
-
var
|
|
2067
|
-
const { id: n, text: o, parent:
|
|
2068
|
-
let
|
|
2069
|
-
for (let
|
|
2070
|
-
const
|
|
2071
|
-
if (!
|
|
2073
|
+
fill: i || "#666"
|
|
2074
|
+
}), s.innerHTML = e, s;
|
|
2075
|
+
}, Fn = (e) => C(e).parentElement.parentElement, qn = function({ parent: e, start: t }) {
|
|
2076
|
+
const n = C(e), o = n.nodeObj;
|
|
2077
|
+
let i;
|
|
2078
|
+
return o.parent ? i = n.closest("me-main").className : i = C(o.children[t].id).closest("me-main").className, i;
|
|
2079
|
+
}, et = function(e, t) {
|
|
2080
|
+
var w;
|
|
2081
|
+
const { id: n, text: o, parent: i, start: s, end: r } = t, c = e.nodes, d = C(i).nodeObj, h = qn(t);
|
|
2082
|
+
let u = 1 / 0, a = 0, p = 0, m = 0;
|
|
2083
|
+
for (let _ = s; _ <= r; _++) {
|
|
2084
|
+
const M = (w = d.children) == null ? void 0 : w[_];
|
|
2085
|
+
if (!M)
|
|
2072
2086
|
return e.removeSummary(n), null;
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2075
|
-
}
|
|
2076
|
-
let
|
|
2077
|
-
const
|
|
2078
|
-
|
|
2079
|
-
const
|
|
2080
|
-
return
|
|
2087
|
+
const j = Fn(M.id), { offsetLeft: z, offsetTop: U } = R(c, j), we = s === r ? 10 : 20;
|
|
2088
|
+
_ === s && (p = U + we), _ === r && (m = U + j.offsetHeight - we), z < u && (u = z), j.offsetWidth + z > a && (a = j.offsetWidth + z);
|
|
2089
|
+
}
|
|
2090
|
+
let v, g;
|
|
2091
|
+
const f = p + 10, b = m + 10, x = (f + b) / 2, S = e.theme.cssVar["--color"];
|
|
2092
|
+
h === L.LHS ? (v = De(`M ${u + 10} ${f} c -5 0 -10 5 -10 10 L ${u} ${b - 10} c 0 5 5 10 10 10 M ${u} ${x} h -10`, S), g = Oe(o, u - 20, x + 6, "end", S)) : (v = De(`M ${a - 10} ${f} c 5 0 10 5 10 10 L ${a} ${b - 10} c 0 5 -5 10 -10 10 M ${a} ${x} h 10`, S), g = Oe(o, a + 20, x + 6, "start", S));
|
|
2093
|
+
const y = zn("s-" + n);
|
|
2094
|
+
return y.appendChild(v), y.appendChild(g), y.summaryObj = t, e.summarySvg.appendChild(y), y;
|
|
2081
2095
|
}, In = function() {
|
|
2082
2096
|
let e = [];
|
|
2083
2097
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2084
|
-
const { parent: t, start: n, end: o } = Rn(e),
|
|
2085
|
-
this.summaries.push(
|
|
2098
|
+
const { parent: t, start: n, end: o } = Rn(e), i = { id: Z(), parent: t, start: n, end: o, text: "summary" }, s = et(this, i);
|
|
2099
|
+
this.summaries.push(i), this.editSummary(s), this.bus.fire("operation", {
|
|
2086
2100
|
name: "createSummary",
|
|
2087
|
-
obj:
|
|
2101
|
+
obj: i
|
|
2088
2102
|
});
|
|
2089
2103
|
}, Vn = function(e) {
|
|
2090
2104
|
var n;
|
|
@@ -2094,8 +2108,8 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2094
2108
|
obj: { id: e }
|
|
2095
2109
|
});
|
|
2096
2110
|
}, Kn = function(e) {
|
|
2097
|
-
const t = e.children[1].getBBox(), n = 6, o = 3,
|
|
2098
|
-
|
|
2111
|
+
const t = e.children[1].getBBox(), n = 6, o = 3, i = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2112
|
+
N(i, {
|
|
2099
2113
|
x: t.x - n + "",
|
|
2100
2114
|
y: t.y - n + "",
|
|
2101
2115
|
width: t.width + n * 2 + "",
|
|
@@ -2104,14 +2118,14 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2104
2118
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
2105
2119
|
"stroke-width": "2",
|
|
2106
2120
|
fill: "none"
|
|
2107
|
-
}), e.appendChild(
|
|
2121
|
+
}), e.appendChild(i), this.currentSummary = e;
|
|
2108
2122
|
}, Wn = function() {
|
|
2109
2123
|
var e, t;
|
|
2110
2124
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2111
2125
|
}, Un = function() {
|
|
2112
2126
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2113
2127
|
try {
|
|
2114
|
-
|
|
2128
|
+
et(this, e);
|
|
2115
2129
|
} catch {
|
|
2116
2130
|
}
|
|
2117
2131
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
@@ -2120,9 +2134,9 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2120
2134
|
return;
|
|
2121
2135
|
const t = e.childNodes[1];
|
|
2122
2136
|
Fe(this, t, (n) => {
|
|
2123
|
-
var
|
|
2124
|
-
const o = e.summaryObj,
|
|
2125
|
-
|
|
2137
|
+
var s;
|
|
2138
|
+
const o = e.summaryObj, i = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
|
|
2139
|
+
i === "" ? o.text = origin : o.text = i, n.remove(), i !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
2126
2140
|
name: "finishEditSummary",
|
|
2127
2141
|
obj: o
|
|
2128
2142
|
}));
|
|
@@ -2135,12 +2149,12 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2135
2149
|
renderSummary: Un,
|
|
2136
2150
|
selectSummary: Kn,
|
|
2137
2151
|
unselectSummary: Wn
|
|
2138
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2152
|
+
}, Symbol.toStringTag, { value: "Module" })), A = "http://www.w3.org/2000/svg";
|
|
2139
2153
|
function Gn(e, t) {
|
|
2140
|
-
const n = document.createElementNS(
|
|
2141
|
-
return
|
|
2154
|
+
const n = document.createElementNS(A, "svg");
|
|
2155
|
+
return N(n, {
|
|
2142
2156
|
version: "1.1",
|
|
2143
|
-
xmlns:
|
|
2157
|
+
xmlns: A,
|
|
2144
2158
|
height: e,
|
|
2145
2159
|
width: t
|
|
2146
2160
|
}), n;
|
|
@@ -2149,12 +2163,12 @@ function Jn(e, t) {
|
|
|
2149
2163
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2150
2164
|
}
|
|
2151
2165
|
function Zn(e, t, n, o) {
|
|
2152
|
-
const
|
|
2153
|
-
let
|
|
2154
|
-
return e.text ?
|
|
2166
|
+
const i = document.createElementNS(A, "g");
|
|
2167
|
+
let s = "";
|
|
2168
|
+
return e.text ? s = e.text.textContent : s = e.childNodes[0].textContent, s.split(`
|
|
2155
2169
|
`).forEach((c, l) => {
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2170
|
+
const d = document.createElementNS(A, "text");
|
|
2171
|
+
N(d, {
|
|
2158
2172
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2159
2173
|
y: o + parseInt(t.paddingTop) + Jn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
|
|
2160
2174
|
"text-anchor": "start",
|
|
@@ -2162,31 +2176,31 @@ function Zn(e, t, n, o) {
|
|
|
2162
2176
|
"font-size": `${t.fontSize}`,
|
|
2163
2177
|
"font-weight": `${t.fontWeight}`,
|
|
2164
2178
|
fill: `${t.color}`
|
|
2165
|
-
}),
|
|
2166
|
-
}),
|
|
2179
|
+
}), d.innerHTML = c, i.appendChild(d);
|
|
2180
|
+
}), i;
|
|
2167
2181
|
}
|
|
2168
2182
|
function Qn(e, t, n, o) {
|
|
2169
2183
|
var c;
|
|
2170
|
-
let
|
|
2171
|
-
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ?
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2184
|
+
let i = "";
|
|
2185
|
+
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? i = e.nodeObj.dangerouslySetInnerHTML : e.text ? i = e.text.textContent : i = e.childNodes[0].textContent;
|
|
2186
|
+
const s = document.createElementNS(A, "foreignObject");
|
|
2187
|
+
N(s, {
|
|
2174
2188
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2175
2189
|
y: o + parseInt(t.paddingTop) + "",
|
|
2176
2190
|
width: t.width,
|
|
2177
2191
|
height: t.height
|
|
2178
2192
|
});
|
|
2179
2193
|
const r = document.createElement("div");
|
|
2180
|
-
return
|
|
2194
|
+
return N(r, {
|
|
2181
2195
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
2182
2196
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2183
|
-
}), r.innerHTML =
|
|
2197
|
+
}), r.innerHTML = i, s.appendChild(r), s;
|
|
2184
2198
|
}
|
|
2185
2199
|
function eo(e, t) {
|
|
2186
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2187
|
-
return
|
|
2200
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = document.createElementNS(A, "rect");
|
|
2201
|
+
return N(s, {
|
|
2188
2202
|
x: o + "",
|
|
2189
|
-
y:
|
|
2203
|
+
y: i + "",
|
|
2190
2204
|
rx: n.borderRadius,
|
|
2191
2205
|
ry: n.borderRadius,
|
|
2192
2206
|
width: n.width,
|
|
@@ -2194,13 +2208,13 @@ function eo(e, t) {
|
|
|
2194
2208
|
fill: n.backgroundColor,
|
|
2195
2209
|
stroke: n.borderColor,
|
|
2196
2210
|
"stroke-width": n.borderWidth
|
|
2197
|
-
}),
|
|
2211
|
+
}), s;
|
|
2198
2212
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const o = getComputedStyle(t), { offsetLeft:
|
|
2201
|
-
|
|
2202
|
-
x:
|
|
2203
|
-
y:
|
|
2213
|
+
function ne(e, t, n = !1) {
|
|
2214
|
+
const o = getComputedStyle(t), { offsetLeft: i, offsetTop: s } = R(e.nodes, t), r = document.createElementNS(A, "rect");
|
|
2215
|
+
N(r, {
|
|
2216
|
+
x: i + "",
|
|
2217
|
+
y: s + "",
|
|
2204
2218
|
rx: o.borderRadius,
|
|
2205
2219
|
ry: o.borderRadius,
|
|
2206
2220
|
width: o.width,
|
|
@@ -2209,88 +2223,88 @@ function ee(e, t, n = !1) {
|
|
|
2209
2223
|
stroke: o.borderColor,
|
|
2210
2224
|
"stroke-width": o.borderWidth
|
|
2211
2225
|
});
|
|
2212
|
-
const c = document.createElementNS(
|
|
2226
|
+
const c = document.createElementNS(A, "g");
|
|
2213
2227
|
c.appendChild(r);
|
|
2214
2228
|
let l;
|
|
2215
|
-
return n ? l = Qn(t, o,
|
|
2229
|
+
return n ? l = Qn(t, o, i, s) : l = Zn(t, o, i, s), c.appendChild(l), c;
|
|
2216
2230
|
}
|
|
2217
2231
|
function to(e, t) {
|
|
2218
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2219
|
-
return
|
|
2232
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = document.createElementNS(A, "a"), r = document.createElementNS(A, "text");
|
|
2233
|
+
return N(r, {
|
|
2220
2234
|
x: o + "",
|
|
2221
|
-
y:
|
|
2235
|
+
y: i + parseInt(n.fontSize) + "",
|
|
2222
2236
|
"text-anchor": "start",
|
|
2223
2237
|
"font-family": n.fontFamily,
|
|
2224
2238
|
"font-size": `${n.fontSize}`,
|
|
2225
2239
|
"font-weight": `${n.fontWeight}`,
|
|
2226
2240
|
fill: `${n.color}`
|
|
2227
|
-
}), r.innerHTML = t.textContent,
|
|
2241
|
+
}), r.innerHTML = t.textContent, s.appendChild(r), s.setAttribute("href", t.href), s;
|
|
2228
2242
|
}
|
|
2229
2243
|
function no(e, t) {
|
|
2230
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2231
|
-
return
|
|
2244
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = document.createElementNS(A, "image");
|
|
2245
|
+
return N(s, {
|
|
2232
2246
|
x: o + "",
|
|
2233
|
-
y:
|
|
2247
|
+
y: i + "",
|
|
2234
2248
|
width: n.width + "",
|
|
2235
2249
|
height: n.height + "",
|
|
2236
2250
|
href: t.src
|
|
2237
|
-
}),
|
|
2251
|
+
}), s;
|
|
2238
2252
|
}
|
|
2239
|
-
const
|
|
2240
|
-
var
|
|
2241
|
-
const n = e.nodes, o = n.offsetHeight +
|
|
2242
|
-
|
|
2253
|
+
const oe = 100, oo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', io = (e, t = !1) => {
|
|
2254
|
+
var u, a, p;
|
|
2255
|
+
const n = e.nodes, o = n.offsetHeight + oe * 2, i = n.offsetWidth + oe * 2, s = Gn(o + "px", i + "px"), r = document.createElementNS(A, "svg"), c = document.createElementNS(A, "rect");
|
|
2256
|
+
N(c, {
|
|
2243
2257
|
x: "0",
|
|
2244
2258
|
y: "0",
|
|
2245
|
-
width: `${
|
|
2259
|
+
width: `${i}`,
|
|
2246
2260
|
height: `${o}`,
|
|
2247
2261
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2248
|
-
}),
|
|
2249
|
-
const
|
|
2250
|
-
|
|
2262
|
+
}), s.appendChild(c), n.querySelectorAll(".subLines").forEach((m) => {
|
|
2263
|
+
const v = m.cloneNode(!0), { offsetLeft: g, offsetTop: f } = R(n, m.parentElement);
|
|
2264
|
+
v.setAttribute("x", `${g}`), v.setAttribute("y", `${f}`), r.appendChild(v);
|
|
2251
2265
|
});
|
|
2252
|
-
const l = (
|
|
2266
|
+
const l = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
|
|
2253
2267
|
l && r.appendChild(l);
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2256
|
-
const
|
|
2257
|
-
return
|
|
2258
|
-
|
|
2259
|
-
}), n.querySelectorAll(".tags > span").forEach((
|
|
2260
|
-
r.appendChild(
|
|
2261
|
-
}), n.querySelectorAll(".icons > span").forEach((
|
|
2262
|
-
r.appendChild(
|
|
2263
|
-
}), n.querySelectorAll(".hyper-link").forEach((
|
|
2264
|
-
r.appendChild(to(e,
|
|
2265
|
-
}), n.querySelectorAll("img").forEach((
|
|
2266
|
-
r.appendChild(no(e,
|
|
2267
|
-
}),
|
|
2268
|
-
x:
|
|
2269
|
-
y:
|
|
2268
|
+
const d = (a = n.querySelector(".topiclinks")) == null ? void 0 : a.cloneNode(!0);
|
|
2269
|
+
d && r.appendChild(d);
|
|
2270
|
+
const h = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
2271
|
+
return h && r.appendChild(h), n.querySelectorAll("me-tpc").forEach((m) => {
|
|
2272
|
+
m.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ne(e, m, !t)) : (r.appendChild(eo(e, m)), r.appendChild(ne(e, m.text, !t)));
|
|
2273
|
+
}), n.querySelectorAll(".tags > span").forEach((m) => {
|
|
2274
|
+
r.appendChild(ne(e, m));
|
|
2275
|
+
}), n.querySelectorAll(".icons > span").forEach((m) => {
|
|
2276
|
+
r.appendChild(ne(e, m));
|
|
2277
|
+
}), n.querySelectorAll(".hyper-link").forEach((m) => {
|
|
2278
|
+
r.appendChild(to(e, m));
|
|
2279
|
+
}), n.querySelectorAll("img").forEach((m) => {
|
|
2280
|
+
r.appendChild(no(e, m));
|
|
2281
|
+
}), N(r, {
|
|
2282
|
+
x: oe + "",
|
|
2283
|
+
y: oe + "",
|
|
2270
2284
|
overflow: "visible"
|
|
2271
|
-
}),
|
|
2272
|
-
},
|
|
2285
|
+
}), s.appendChild(r), s;
|
|
2286
|
+
}, so = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), oo + e.outerHTML);
|
|
2273
2287
|
function ro(e) {
|
|
2274
2288
|
return new Promise((t, n) => {
|
|
2275
2289
|
const o = new FileReader();
|
|
2276
|
-
o.onload = (
|
|
2277
|
-
t(
|
|
2278
|
-
}, o.onerror = (
|
|
2279
|
-
n(
|
|
2290
|
+
o.onload = (i) => {
|
|
2291
|
+
t(i.target.result);
|
|
2292
|
+
}, o.onerror = (i) => {
|
|
2293
|
+
n(i);
|
|
2280
2294
|
}, o.readAsDataURL(e);
|
|
2281
2295
|
});
|
|
2282
2296
|
}
|
|
2283
2297
|
const co = function(e = !1, t) {
|
|
2284
|
-
const n =
|
|
2298
|
+
const n = io(this, e), o = so(n, t);
|
|
2285
2299
|
return new Blob([o], { type: "image/svg+xml" });
|
|
2286
2300
|
}, lo = async function(e = !1, t) {
|
|
2287
2301
|
const n = this.exportSvg(e, t), o = await ro(n);
|
|
2288
|
-
return new Promise((
|
|
2302
|
+
return new Promise((i, s) => {
|
|
2289
2303
|
const r = new Image();
|
|
2290
2304
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2291
2305
|
const c = document.createElement("canvas");
|
|
2292
|
-
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(
|
|
2293
|
-
}, r.src = o, r.onerror =
|
|
2306
|
+
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(i, "image/png", 1);
|
|
2307
|
+
}, r.src = o, r.onerror = s;
|
|
2294
2308
|
});
|
|
2295
2309
|
}, ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2296
2310
|
__proto__: null,
|
|
@@ -2303,103 +2317,103 @@ function ho(e, t) {
|
|
|
2303
2317
|
o && !await o.apply(this, n) || e.apply(this, n);
|
|
2304
2318
|
};
|
|
2305
2319
|
}
|
|
2306
|
-
const
|
|
2307
|
-
for (let e = 0; e <
|
|
2308
|
-
const t =
|
|
2309
|
-
|
|
2320
|
+
const He = Object.keys(Ge), tt = {};
|
|
2321
|
+
for (let e = 0; e < He.length; e++) {
|
|
2322
|
+
const t = He[e];
|
|
2323
|
+
tt[t] = ho(Ge[t], t);
|
|
2310
2324
|
}
|
|
2311
2325
|
const uo = {
|
|
2312
|
-
getObjById:
|
|
2313
|
-
generateNewObj:
|
|
2314
|
-
layout:
|
|
2315
|
-
linkDiv:
|
|
2316
|
-
editTopic:
|
|
2317
|
-
createWrapper:
|
|
2318
|
-
createParent:
|
|
2319
|
-
createChildren:
|
|
2320
|
-
createTopic:
|
|
2321
|
-
findEle:
|
|
2326
|
+
getObjById: se,
|
|
2327
|
+
generateNewObj: ot,
|
|
2328
|
+
layout: rt,
|
|
2329
|
+
linkDiv: mt,
|
|
2330
|
+
editTopic: ft,
|
|
2331
|
+
createWrapper: at,
|
|
2332
|
+
createParent: dt,
|
|
2333
|
+
createChildren: ht,
|
|
2334
|
+
createTopic: ut,
|
|
2335
|
+
findEle: C,
|
|
2322
2336
|
changeTheme: Rt,
|
|
2323
|
-
...
|
|
2324
|
-
...
|
|
2337
|
+
...Mn,
|
|
2338
|
+
...tt,
|
|
2325
2339
|
...Bn,
|
|
2326
2340
|
...Xn,
|
|
2327
2341
|
...ao,
|
|
2328
2342
|
init(e) {
|
|
2329
2343
|
if (!e || !e.nodeData)
|
|
2330
2344
|
return new Error("MindElixir: `data` is required");
|
|
2331
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
2345
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, B(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Tt(this), this.keypress && Et(this), this.editable && Bt(this), this.contextMenu && this.disposable.push(gt(this, this.contextMenuOption)), this.draggable && St(this), this.allowUndo && Lt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2332
2346
|
},
|
|
2333
2347
|
destroy() {
|
|
2334
2348
|
var e;
|
|
2335
2349
|
this.disposable.forEach((t) => t()), this.mindElixirBox && (this.mindElixirBox.innerHTML = ""), this.mindElixirBox = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNode = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.waitCopy = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.linkSvgGroup = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, (e = this.selection) == null || e.destroy(), this.selection = void 0;
|
|
2336
2350
|
}
|
|
2337
2351
|
};
|
|
2338
|
-
function fo({ pT: e, pL: t, pW: n, pH: o, cT:
|
|
2339
|
-
let
|
|
2340
|
-
const
|
|
2341
|
-
let
|
|
2342
|
-
l ===
|
|
2343
|
-
const
|
|
2344
|
-
return l ===
|
|
2352
|
+
function fo({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction: l, containerHeight: d }) {
|
|
2353
|
+
let h = t + n / 2;
|
|
2354
|
+
const u = e + o / 2;
|
|
2355
|
+
let a;
|
|
2356
|
+
l === L.LHS ? a = s + r : a = s;
|
|
2357
|
+
const p = i + c / 2, v = (1 - Math.abs(p - u) / d) * 0.25 * (n / 2);
|
|
2358
|
+
return l === L.LHS ? h = h - n / 10 - v : h = h + n / 10 + v, `M ${h} ${u} Q ${h} ${p} ${a} ${p}`;
|
|
2345
2359
|
}
|
|
2346
|
-
function po({ pT: e, pL: t, pW: n, pH: o, cT:
|
|
2347
|
-
const
|
|
2348
|
-
let
|
|
2349
|
-
|
|
2350
|
-
const
|
|
2351
|
-
let
|
|
2352
|
-
const
|
|
2353
|
-
return l ===
|
|
2360
|
+
function po({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction: l, isFirst: d }) {
|
|
2361
|
+
const h = parseInt(this.mindElixirBox.style.getPropertyValue("--gap"));
|
|
2362
|
+
let u = 0, a = 0;
|
|
2363
|
+
d ? u = e + o / 2 : u = e + o;
|
|
2364
|
+
const p = i + c;
|
|
2365
|
+
let m = 0, v = 0, g = 0;
|
|
2366
|
+
const f = Math.abs(u - p) / 300 * h;
|
|
2367
|
+
return l === L.LHS ? (g = t, m = g + h, v = g - h, a = s + h, `M ${m} ${u} C ${g} ${u} ${g + f} ${p} ${v} ${p} H ${a}`) : (g = t + n, m = g - h, v = g + h, a = s + r - h, `M ${m} ${u} C ${g} ${u} ${g - f} ${p} ${v} ${p} H ${a}`);
|
|
2354
2368
|
}
|
|
2355
|
-
const mo = "4.3.
|
|
2356
|
-
function
|
|
2369
|
+
const mo = "4.3.7", Y = document;
|
|
2370
|
+
function D({
|
|
2357
2371
|
el: e,
|
|
2358
2372
|
direction: t,
|
|
2359
2373
|
locale: n,
|
|
2360
2374
|
draggable: o,
|
|
2361
|
-
editable:
|
|
2362
|
-
contextMenu:
|
|
2375
|
+
editable: i,
|
|
2376
|
+
contextMenu: s,
|
|
2363
2377
|
contextMenuOption: r,
|
|
2364
2378
|
toolBar: c,
|
|
2365
2379
|
keypress: l,
|
|
2366
|
-
mouseSelectionButton:
|
|
2367
|
-
selectionContainer:
|
|
2368
|
-
before:
|
|
2369
|
-
newTopicName:
|
|
2370
|
-
allowUndo:
|
|
2371
|
-
generateMainBranch:
|
|
2372
|
-
generateSubBranch:
|
|
2373
|
-
overflowHidden:
|
|
2374
|
-
theme:
|
|
2380
|
+
mouseSelectionButton: d,
|
|
2381
|
+
selectionContainer: h,
|
|
2382
|
+
before: u,
|
|
2383
|
+
newTopicName: a,
|
|
2384
|
+
allowUndo: p,
|
|
2385
|
+
generateMainBranch: m,
|
|
2386
|
+
generateSubBranch: v,
|
|
2387
|
+
overflowHidden: g,
|
|
2388
|
+
theme: f
|
|
2375
2389
|
}) {
|
|
2376
|
-
let
|
|
2377
|
-
const
|
|
2378
|
-
if (
|
|
2390
|
+
let b = null;
|
|
2391
|
+
const x = Object.prototype.toString.call(e);
|
|
2392
|
+
if (x === "[object HTMLDivElement]" ? b = e : x === "[object String]" && (b = document.querySelector(e)), !b)
|
|
2379
2393
|
throw new Error("MindElixir: el is not a valid element");
|
|
2380
|
-
|
|
2381
|
-
const
|
|
2382
|
-
this.theme =
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2394
|
+
b.className += " mind-elixir", b.innerHTML = "", this.mindElixirBox = b, this.disposable = [], this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = s === void 0 ? !0 : s, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = d || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = a || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = p === void 0 ? !1 : p, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = m || fo, this.generateSubBranch = v || po, this.overflowHidden = g || !1, this.bus = st.create(), this.container = Y.createElement("div"), this.selectionContainer = h || this.container, this.container.className = "map-container";
|
|
2395
|
+
const S = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2396
|
+
this.theme = f || (S.matches ? Be : Pe);
|
|
2397
|
+
const y = Y.createElement("div");
|
|
2398
|
+
y.className = "map-canvas", this.map = y, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Ee(), this.line2 = Ee(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : it(this);
|
|
2385
2399
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2400
|
+
D.prototype = uo;
|
|
2401
|
+
D.LEFT = $;
|
|
2402
|
+
D.RIGHT = P;
|
|
2403
|
+
D.SIDE = ae;
|
|
2404
|
+
D.THEME = Pe;
|
|
2405
|
+
D.DARK_THEME = Be;
|
|
2406
|
+
D.version = mo;
|
|
2407
|
+
D.E = C;
|
|
2408
|
+
D.new = (e) => ({
|
|
2395
2409
|
nodeData: {
|
|
2396
|
-
id:
|
|
2410
|
+
id: Z(),
|
|
2397
2411
|
topic: e || "new topic",
|
|
2398
2412
|
children: []
|
|
2399
2413
|
}
|
|
2400
2414
|
});
|
|
2401
|
-
|
|
2415
|
+
D.dragMoveHelper = k;
|
|
2402
2416
|
export {
|
|
2403
|
-
|
|
2404
|
-
|
|
2417
|
+
L as DirectionClass,
|
|
2418
|
+
D as default
|
|
2405
2419
|
};
|