mind-elixir 3.0.5-beta.1 → 3.1.0

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.
@@ -1,7 +1,7 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--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}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:800px;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:800px;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:16px}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.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}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
2
2
  (function(e) {
3
- var t, s, i, n, o, l, r = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', a = (a = document.getElementsByTagName("script"))[a.length - 1].getAttribute("data-injectcss");
4
- if (a && !e.__iconfont__svg__cssinject__) {
3
+ var t, n, i, s, o, l, r = '<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>', h = (h = document.getElementsByTagName("script"))[h.length - 1].getAttribute("data-injectcss");
4
+ if (h && !e.__iconfont__svg__cssinject__) {
5
5
  e.__iconfont__svg__cssinject__ = !0;
6
6
  try {
7
7
  document.write(
@@ -11,26 +11,26 @@
11
11
  console && console.log(d);
12
12
  }
13
13
  }
14
- function u() {
14
+ function f() {
15
15
  o || (o = !0, i());
16
16
  }
17
17
  t = function() {
18
- var d, h, c, f;
19
- (f = document.createElement("div")).innerHTML = r, r = null, (c = f.getElementsByTagName("svg")[0]) && (c.setAttribute("aria-hidden", "true"), c.style.position = "absolute", c.style.width = 0, c.style.height = 0, c.style.overflow = "hidden", d = c, (h = document.body).firstChild ? (f = d, (c = h.firstChild).parentNode.insertBefore(f, c)) : h.appendChild(d));
20
- }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (s = function() {
21
- document.removeEventListener("DOMContentLoaded", s, !1), t();
22
- }, document.addEventListener("DOMContentLoaded", s, !1)) : document.attachEvent && (i = t, n = e.document, o = !1, (l = function() {
18
+ var d, a, c, u;
19
+ (u = document.createElement("div")).innerHTML = r, r = null, (c = u.getElementsByTagName("svg")[0]) && (c.setAttribute("aria-hidden", "true"), c.style.position = "absolute", c.style.width = 0, c.style.height = 0, c.style.overflow = "hidden", d = c, (a = document.body).firstChild ? (u = d, (c = a.firstChild).parentNode.insertBefore(u, c)) : a.appendChild(d));
20
+ }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
21
+ document.removeEventListener("DOMContentLoaded", n, !1), t();
22
+ }, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (i = t, s = e.document, o = !1, (l = function() {
23
23
  try {
24
- n.documentElement.doScroll("left");
24
+ s.documentElement.doScroll("left");
25
25
  } catch {
26
26
  return void setTimeout(l, 50);
27
27
  }
28
- u();
29
- })(), n.onreadystatechange = function() {
30
- n.readyState == "complete" && (n.onreadystatechange = null, u());
28
+ f();
29
+ })(), s.onreadystatechange = function() {
30
+ s.readyState == "complete" && (s.onreadystatechange = null, f());
31
31
  });
32
32
  })(window);
33
- const q = 0, K = 1, I = 2, S = 30, L = 8, ft = {
33
+ const q = 0, K = 1, G = 2, S = 30, L = 8, ft = {
34
34
  name: "Latte",
35
35
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
36
36
  cssVar: {
@@ -55,15 +55,15 @@ const q = 0, K = 1, I = 2, S = 30, L = 8, ft = {
55
55
  "--panel-border-color": "#696969"
56
56
  }
57
57
  };
58
- function st(e) {
58
+ function nt(e) {
59
59
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
60
60
  }
61
61
  const mt = function(e, t) {
62
62
  if (t.id === e)
63
63
  return t;
64
64
  if (t.children && t.children.length) {
65
- for (let s = 0; s < t.children.length; s++) {
66
- const i = mt(e, t.children[s]);
65
+ for (let n = 0; n < t.children.length; n++) {
66
+ const i = mt(e, t.children[n]);
67
67
  if (i)
68
68
  return i;
69
69
  }
@@ -72,35 +72,35 @@ const mt = function(e, t) {
72
72
  return null;
73
73
  }, Q = (e, t) => {
74
74
  if (e.parent = t, e.children)
75
- for (let s = 0; s < e.children.length; s++)
76
- Q(e.children[s], e);
75
+ for (let n = 0; n < e.children.length; n++)
76
+ Q(e.children[n], e);
77
77
  };
78
- function gt(e, t, s, i) {
79
- const n = i - t, o = e - s;
80
- let l = Math.atan(Math.abs(n) / Math.abs(o)) / 3.14 * 180;
81
- o < 0 && n > 0 && (l = 180 - l), o < 0 && n < 0 && (l = 180 + l), o > 0 && n < 0 && (l = 360 - l);
82
- const r = 20, a = 30, u = l + a, d = l - a;
78
+ function gt(e, t, n, i) {
79
+ const s = i - t, o = e - n;
80
+ let l = Math.atan(Math.abs(s) / Math.abs(o)) / 3.14 * 180;
81
+ o < 0 && s > 0 && (l = 180 - l), o < 0 && s < 0 && (l = 180 + l), o > 0 && s < 0 && (l = 360 - l);
82
+ const r = 20, h = 30, f = l + h, d = l - h;
83
83
  return {
84
- x1: s + Math.cos(Math.PI * u / 180) * r,
85
- y1: i - Math.sin(Math.PI * u / 180) * r,
86
- x2: s + Math.cos(Math.PI * d / 180) * r,
84
+ x1: n + Math.cos(Math.PI * f / 180) * r,
85
+ y1: i - Math.sin(Math.PI * f / 180) * r,
86
+ x2: n + Math.cos(Math.PI * d / 180) * r,
87
87
  y2: i - Math.sin(Math.PI * d / 180) * r
88
88
  };
89
89
  }
90
- function J(e, t, s) {
91
- let i, n;
92
- const o = (e.cy - s) / (t - e.cx);
93
- return o > e.h / e.w || o < -e.h / e.w ? e.cy - s < 0 ? (i = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
90
+ function J(e, t, n) {
91
+ let i, s;
92
+ const o = (e.cy - n) / (t - e.cx);
93
+ return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
94
94
  x: i,
95
- y: n
95
+ y: s
96
96
  };
97
97
  }
98
- function U(e, t, s) {
99
- let i, n;
100
- const o = (e.cy - s) / (t - e.cx);
101
- return o > e.h / e.w || o < -e.h / e.w ? e.cy - s < 0 ? (i = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
98
+ function U(e, t, n) {
99
+ let i, s;
100
+ const o = (e.cy - n) / (t - e.cx);
101
+ return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
102
102
  x: i,
103
- y: n
103
+ y: s
104
104
  };
105
105
  }
106
106
  function Z() {
@@ -113,13 +113,13 @@ const Mt = function() {
113
113
  id: e
114
114
  };
115
115
  }, vt = (e, t) => {
116
- let s = 0, i = 0;
116
+ let n = 0, i = 0;
117
117
  for (; t && t !== e; )
118
- s += t.offsetLeft, i += t.offsetTop, t = t.offsetParent;
119
- return { offsetLeft: s, offsetTop: i };
118
+ n += t.offsetLeft, i += t.offsetTop, t = t.offsetParent;
119
+ return { offsetLeft: n, offsetTop: i };
120
120
  }, tt = (e, t) => {
121
- for (const s in t)
122
- e.setAttribute(s, t[s]);
121
+ for (const n in t)
122
+ e.setAttribute(n, t[n]);
123
123
  }, A = {
124
124
  moved: !1,
125
125
  // diffrentiate click and move
@@ -132,8 +132,8 @@ const Mt = function() {
132
132
  this.lastX = e.pageX, this.lastY = e.pageY;
133
133
  return;
134
134
  }
135
- const s = this.lastX - e.pageX, i = this.lastY - e.pageY;
136
- t.scrollTo(t.scrollLeft + s, t.scrollTop + i), this.lastX = e.pageX, this.lastY = e.pageY;
135
+ const n = this.lastX - e.pageX, i = this.lastY - e.pageY;
136
+ t.scrollTo(t.scrollLeft + n, t.scrollTop + i), this.lastX = e.pageX, this.lastY = e.pageY;
137
137
  }
138
138
  },
139
139
  clear() {
@@ -143,22 +143,23 @@ const Mt = function() {
143
143
  function $t(e) {
144
144
  e.map.addEventListener("click", (t) => {
145
145
  var i;
146
- if (console.log("click", t), A.moved) {
146
+ if (A.moved) {
147
147
  A.clear();
148
148
  return;
149
149
  }
150
- const s = t.target;
151
- if (s.tagName === "ME-EPD")
152
- e.expandNode(s.previousSibling);
150
+ e.unselectNode(), e.unselectNodes(), e.unselectSummary();
151
+ const n = t.target;
152
+ if (n.tagName === "ME-EPD")
153
+ e.expandNode(n.previousSibling);
153
154
  else if (e.editable)
154
- it(s) ? e.selectNode(s, !1, t) : s.tagName === "text" ? e.selectSummary(s.parentElement) : s.tagName === "path" ? ((i = s == null ? void 0 : s.parentElement) == null ? void 0 : i.tagName) === "g" && e.selectLink(s.parentElement) : s.className === "circle" || (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), e.hideLinkController && e.hideLinkController());
155
+ it(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? e.selectSummary(n.parentElement) : n.tagName === "path" ? ((i = n == null ? void 0 : n.parentElement) == null ? void 0 : i.tagName) === "g" && e.selectLink(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
155
156
  else
156
157
  return;
157
158
  }), e.map.addEventListener("dblclick", (t) => {
158
159
  if (t.preventDefault(), !e.editable)
159
160
  return;
160
- const s = t.target;
161
- it(s) ? e.beginEdit(s) : s.tagName === "text" && e.editSummary(s.parentElement);
161
+ const n = t.target;
162
+ it(n) ? e.beginEdit(n) : n.tagName === "text" && e.editSummary(n.parentElement);
162
163
  }), e.map.addEventListener("mousemove", (t) => {
163
164
  t.target.contentEditable !== "true" && A.onMove(t, e.container);
164
165
  }), e.map.addEventListener("mousedown", (t) => {
@@ -181,90 +182,90 @@ const kt = {
181
182
  },
182
183
  fire: function(e, ...t) {
183
184
  if (this.handlers[e] instanceof Array) {
184
- const s = this.handlers[e];
185
- for (let i = 0; i < s.length; i++)
186
- s[i](...t);
185
+ const n = this.handlers[e];
186
+ for (let i = 0; i < n.length; i++)
187
+ n[i](...t);
187
188
  }
188
189
  },
189
190
  removeListener: function(e, t) {
190
191
  if (!this.handlers[e])
191
192
  return;
192
- const s = this.handlers[e];
193
+ const n = this.handlers[e];
193
194
  if (!t)
194
- s.length = 0;
195
- else if (s.length)
196
- for (let i = 0; i < s.length; i++)
197
- s[i] === t && this.handlers[e].splice(i, 1);
195
+ n.length = 0;
196
+ else if (n.length)
197
+ for (let i = 0; i < n.length; i++)
198
+ n[i] === t && this.handlers[e].splice(i, 1);
198
199
  }
199
200
  };
200
201
  }
201
- }, G = document, Tt = function() {
202
+ }, I = document, Nt = function() {
202
203
  console.time("layout"), this.nodes.innerHTML = "";
203
204
  const e = this.createTopic(this.nodeData);
204
205
  bt(e, this.nodeData), e.draggable = !1;
205
- const t = G.createElement("me-root");
206
+ const t = I.createElement("me-root");
206
207
  t.appendChild(e);
207
- const s = this.nodeData.children || [];
208
- if (this.direction === I) {
209
- let i = 0, n = 0;
210
- s.map((o) => {
211
- o.direction === q ? i += 1 : o.direction === K ? n += 1 : i <= n ? (o.direction = q, i += 1) : (o.direction = K, n += 1);
208
+ const n = this.nodeData.children || [];
209
+ if (this.direction === G) {
210
+ let i = 0, s = 0;
211
+ n.map((o) => {
212
+ o.direction === q ? i += 1 : o.direction === K ? s += 1 : i <= s ? (o.direction = q, i += 1) : (o.direction = K, s += 1);
212
213
  });
213
214
  }
214
- Nt(this, s, t), console.timeEnd("layout");
215
- }, Nt = function(e, t, s) {
216
- const i = G.createElement("me-main");
215
+ Tt(this, n, t), console.timeEnd("layout");
216
+ }, Tt = function(e, t, n) {
217
+ const i = I.createElement("me-main");
217
218
  i.className = "lhs";
218
- const n = G.createElement("me-main");
219
- n.className = "rhs";
219
+ const s = I.createElement("me-main");
220
+ s.className = "rhs";
220
221
  for (let o = 0; o < t.length; o++) {
221
222
  const l = t[o], { grp: r } = e.createWrapper(l);
222
- e.direction === I ? l.direction === q ? i.appendChild(r) : n.appendChild(r) : e.direction === q ? i.appendChild(r) : n.appendChild(r);
223
+ e.direction === G ? l.direction === q ? i.appendChild(r) : s.appendChild(r) : e.direction === q ? i.appendChild(r) : s.appendChild(r);
223
224
  }
224
- e.nodes.appendChild(i), e.nodes.appendChild(s), e.nodes.appendChild(n), e.nodes.appendChild(e.lines);
225
+ e.nodes.appendChild(i), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
225
226
  }, At = function(e, t) {
226
- const s = G.createElement("me-children");
227
+ const n = I.createElement("me-children");
227
228
  for (let i = 0; i < t.length; i++) {
228
- const n = t[i], { grp: o } = e.createWrapper(n);
229
- s.appendChild(o);
229
+ const s = t[i], { grp: o } = e.createWrapper(s);
230
+ n.appendChild(o);
230
231
  }
231
- return s;
232
+ return n;
232
233
  }, w = document, M = (e, t) => (t ? t.mindElixirBox : w).querySelector(`[data-nodeid=me${e}]`), bt = function(e, t) {
233
234
  if (e.textContent = t.topic, 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.image) {
234
- const s = t.image;
235
- if (s.url && s.width && s.height) {
235
+ const n = t.image;
236
+ if (n.url && n.width && n.height) {
236
237
  const i = w.createElement("img");
237
- i.src = s.url, i.style.width = s.width + "px", i.style.height = s.height + "px", e.appendChild(i), e.image = i;
238
+ i.src = n.url, i.style.width = n.width + "px", i.style.height = n.height + "px", e.appendChild(i), e.image = i;
238
239
  } else
239
240
  console.warn("image url/width/height are required");
240
241
  }
241
242
  if (t.hyperLink) {
242
- const s = w.createElement("a");
243
- s.className = "hyper-link", s.target = "_blank", s.innerText = "🔗", s.href = t.hyperLink, e.appendChild(s), e.linkContainer = s, console.log(s);
243
+ const n = w.createElement("a");
244
+ n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n, console.log(n);
244
245
  } else
245
246
  e.linkContainer && (e.linkContainer.remove(), e.linkContainer = null);
246
247
  if (t.icons && t.icons.length) {
247
- const s = w.createElement("span");
248
- s.className = "icons", s.innerHTML = t.icons.map((i) => `<span>${st(i)}</span>`).join(""), e.appendChild(s), e.icons = s;
248
+ const n = w.createElement("span");
249
+ n.className = "icons", n.innerHTML = t.icons.map((i) => `<span>${nt(i)}</span>`).join(""), e.appendChild(n), e.icons = n;
249
250
  }
250
251
  if (t.tags && t.tags.length) {
251
- const s = w.createElement("div");
252
- s.className = "tags", s.innerHTML = t.tags.map((i) => `<span>${st(i)}</span>`).join(""), e.appendChild(s), e.tags = s;
252
+ const n = w.createElement("div");
253
+ n.className = "tags", n.innerHTML = t.tags.map((i) => `<span>${nt(i)}</span>`).join(""), e.appendChild(n), e.tags = n;
253
254
  }
254
255
  t.branchColor && (e.style.borderColor = t.branchColor);
255
256
  }, Ht = function(e, t) {
256
- const s = w.createElement("me-wrapper"), { p: i, tpc: n } = this.createParent(e);
257
- if (s.appendChild(i), !t && e.children && e.children.length > 0) {
257
+ const n = w.createElement("me-wrapper"), { p: i, tpc: s } = this.createParent(e);
258
+ if (n.appendChild(i), !t && e.children && e.children.length > 0) {
258
259
  const o = Dt(e.expanded);
259
260
  if (i.appendChild(o), e.expanded !== !1) {
260
261
  const l = At(this, e.children);
261
- s.appendChild(l);
262
+ n.appendChild(l);
262
263
  }
263
264
  }
264
- return { grp: s, top: i, tpc: n };
265
+ return { grp: n, top: i, tpc: s };
265
266
  }, Pt = function(e) {
266
- const t = w.createElement("me-parent"), s = this.createTopic(e);
267
- return bt(s, e), t.appendChild(s), { p: t, tpc: s };
267
+ const t = w.createElement("me-parent"), n = this.createTopic(e);
268
+ return bt(n, e), t.appendChild(n), { p: t, tpc: n };
268
269
  }, Bt = function(e) {
269
270
  const t = w.createElement("me-children");
270
271
  return t.append(...e), t;
@@ -275,20 +276,20 @@ const kt = {
275
276
  function yt(e) {
276
277
  const t = w.createRange();
277
278
  t.selectNodeContents(e);
278
- const s = window.getSelection();
279
- s && (s.removeAllRanges(), s.addRange(t));
279
+ const n = window.getSelection();
280
+ n && (n.removeAllRanges(), n.addRange(t));
280
281
  }
281
282
  const Vt = function(e) {
282
283
  if (console.time("editTopic"), !e)
283
284
  return;
284
- const t = w.createElement("div"), s = e.childNodes[0].textContent;
285
- e.appendChild(t), t.id = "input-box", t.textContent = s, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === q && (t.style.right = "0"), t.focus(), yt(t), this.bus.fire("operation", {
285
+ const t = w.createElement("div"), n = e.childNodes[0].textContent;
286
+ e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === q && (t.style.right = "0"), t.focus(), yt(t), this.bus.fire("operation", {
286
287
  name: "beginEdit",
287
288
  obj: e.nodeObj
288
289
  }), t.addEventListener("keydown", (i) => {
289
290
  i.stopPropagation();
290
- const n = i.key;
291
- if (n === "Enter" || n === "Tab") {
291
+ const s = i.key;
292
+ if (s === "Enter" || s === "Tab") {
292
293
  if (i.shiftKey)
293
294
  return;
294
295
  i.preventDefault(), t == null || t.blur(), this.map.focus();
@@ -297,156 +298,156 @@ const Vt = function(e) {
297
298
  var o;
298
299
  if (!t)
299
300
  return;
300
- const i = e.nodeObj, n = ((o = t.textContent) == null ? void 0 : o.trim()) || "";
301
- console.log(n), n === "" ? i.topic = s : i.topic = n, t.remove(), n !== s && (e.childNodes[0].textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
301
+ const i = e.nodeObj, s = ((o = t.textContent) == null ? void 0 : o.trim()) || "";
302
+ console.log(s), s === "" ? i.topic = n : i.topic = s, t.remove(), s !== n && (e.childNodes[0].textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
302
303
  name: "finishEdit",
303
304
  obj: i,
304
- origin: s
305
+ origin: n
305
306
  }));
306
307
  }), console.timeEnd("editTopic");
307
308
  }, Dt = function(e) {
308
309
  const t = w.createElement("me-epd");
309
310
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
310
311
  }, V = document, D = "http://www.w3.org/2000/svg", Rt = function(e, t) {
311
- const s = V.createElementNS(D, "path");
312
- return s.setAttribute("d", e), s.setAttribute("stroke", t || "#666"), s.setAttribute("fill", "none"), s.setAttribute("stroke-width", "3"), s;
313
- }, j = function(e) {
312
+ const n = V.createElementNS(D, "path");
313
+ return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
314
+ }, X = function(e) {
314
315
  const t = V.createElementNS(D, "svg");
315
316
  return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
316
- }, nt = function(e, t, s, i) {
317
- const n = V.createElementNS(D, "line");
318
- return n.setAttribute("x1", String(e)), n.setAttribute("y1", String(t)), n.setAttribute("x2", String(s)), n.setAttribute("y2", String(i)), n.setAttribute("stroke", "#bbb"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "2"), n;
317
+ }, st = function(e, t, n, i) {
318
+ const s = V.createElementNS(D, "line");
319
+ return s.setAttribute("x1", String(e)), s.setAttribute("y1", String(t)), s.setAttribute("x2", String(n)), s.setAttribute("y2", String(i)), s.setAttribute("stroke", "#bbb"), s.setAttribute("fill", "none"), s.setAttribute("stroke-width", "2"), s;
319
320
  }, Ot = function(e, t) {
320
- const s = V.createElementNS(D, "path");
321
- return s.setAttribute("d", e), s.setAttribute("stroke", t || "#555"), s.setAttribute("fill", "none"), s.setAttribute("stroke-linecap", "square"), s.setAttribute("stroke-width", "2"), s;
321
+ const n = V.createElementNS(D, "path");
322
+ return n.setAttribute("d", e), n.setAttribute("stroke", t || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
322
323
  }, qt = function(e, t) {
323
- const s = V.createElementNS(D, "g"), i = V.createElementNS(D, "path"), n = V.createElementNS(D, "path");
324
- return n.setAttribute("d", t), n.setAttribute("stroke", "rgb(235, 95, 82)"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "cap"), n.setAttribute("stroke-width", "2"), i.setAttribute("d", e), i.setAttribute("stroke", "rgb(235, 95, 82)"), i.setAttribute("fill", "none"), i.setAttribute("stroke-linecap", "cap"), i.setAttribute("stroke-width", "2"), s.appendChild(i), s.appendChild(n), s;
324
+ const n = V.createElementNS(D, "g"), i = V.createElementNS(D, "path"), s = V.createElementNS(D, "path");
325
+ return s.setAttribute("d", t), s.setAttribute("stroke", "rgb(235, 95, 82)"), s.setAttribute("fill", "none"), s.setAttribute("stroke-linecap", "cap"), s.setAttribute("stroke-width", "2"), i.setAttribute("d", e), i.setAttribute("stroke", "rgb(235, 95, 82)"), i.setAttribute("fill", "none"), i.setAttribute("stroke-linecap", "cap"), i.setAttribute("stroke-width", "2"), n.appendChild(i), n.appendChild(s), n;
325
326
  };
326
327
  let xt = Et;
327
- const Xt = function(e) {
328
+ const jt = function(e) {
328
329
  console.time("linkDiv");
329
330
  const t = this.map.querySelector("me-root");
330
331
  this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
331
- const s = this.map.querySelectorAll("me-main > me-wrapper");
332
+ const n = this.map.querySelectorAll("me-main > me-wrapper");
332
333
  this.lines.innerHTML = "", xt = this.subLinkStyle === 2 ? Yt : Et;
333
- for (let i = 0; i < s.length; i++) {
334
- const n = s[i], o = n.querySelector("me-tpc"), l = n.firstChild, r = n.parentNode.className;
335
- let a = t.offsetLeft + t.offsetWidth / 2;
336
- const u = t.offsetTop + t.offsetHeight / 2;
334
+ for (let i = 0; i < n.length; i++) {
335
+ const s = n[i], o = s.querySelector("me-tpc"), l = s.firstChild, r = s.parentNode.className;
336
+ let h = t.offsetLeft + t.offsetWidth / 2;
337
+ const f = t.offsetTop + t.offsetHeight / 2;
337
338
  let d;
338
- const h = this.theme.palette, c = o.nodeObj.branchColor || h[i % h.length], { offsetLeft: f, offsetTop: g } = vt(this.nodes, l);
339
- r === "lhs" ? d = f + l.offsetWidth : d = f;
339
+ const a = this.theme.palette, c = o.nodeObj.branchColor || a[i % a.length], { offsetLeft: u, offsetTop: g } = vt(this.nodes, l);
340
+ r === "lhs" ? d = u + l.offsetWidth : d = u;
340
341
  const m = g + l.offsetHeight / 2;
341
342
  let p = "";
342
343
  if (this.mainLinkStyle === 2)
343
- this.direction === I && (r === "lhs" ? a = a - t.offsetWidth / 6 : a = a + t.offsetWidth / 6), p = jt({ x1: a, y1: u, x2: d, y2: m });
344
+ this.direction === G && (r === "lhs" ? h = h - t.offsetWidth / 6 : h = h + t.offsetWidth / 6), p = Xt({ x1: h, y1: f, x2: d, y2: m });
344
345
  else {
345
- const x = (1 - Math.abs(m - n.parentElement.offsetTop - n.parentElement.offsetHeight / 2) / n.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
346
- r === "lhs" ? a = a - t.offsetWidth / 10 - x : a = a + t.offsetWidth / 10 + x, p = Wt({ x1: a, y1: u, x2: d, y2: m });
346
+ const x = (1 - Math.abs(m - s.parentElement.offsetTop - s.parentElement.offsetHeight / 2) / s.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
347
+ r === "lhs" ? h = h - t.offsetWidth / 10 - x : h = h + t.offsetWidth / 10 + x, p = Wt({ x1: h, y1: f, x2: d, y2: m });
347
348
  }
348
349
  this.lines.appendChild(Rt(p, c));
349
- const v = n.children[0].children[1];
350
- if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", r === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== n) && n.childElementCount) {
351
- const y = j("subLines"), x = n.lastChild;
352
- x.tagName === "svg" && x.remove(), n.appendChild(y);
353
- const _ = n.firstChild, C = n.children[1].children, k = _t(C, _, r, !0);
350
+ const v = s.children[0].children[1];
351
+ if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", r === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== s) && s.childElementCount) {
352
+ const y = X("subLines"), x = s.lastChild;
353
+ x.tagName === "svg" && x.remove(), s.appendChild(y);
354
+ const _ = s.firstChild, C = s.children[1].children, k = _t(C, _, r, !0);
354
355
  y.appendChild(Ot(k, c));
355
356
  }
356
357
  }
357
358
  this.linkSvgGroup.innerHTML = "";
358
359
  for (const i in this.linkData) {
359
- const n = this.linkData[i];
360
- this.createLink(M(n.from), M(n.to), !0, n);
360
+ const s = this.linkData[i];
361
+ this.createLink(M(s.from), M(s.to), !0, s);
361
362
  }
362
363
  this.renderSummary(), console.timeEnd("linkDiv");
363
- }, _t = function(e, t, s, i) {
364
- let n = "";
365
- const o = t.offsetTop, l = t.offsetLeft, r = t.offsetWidth, a = t.offsetHeight;
366
- for (let u = 0; u < e.length; u++) {
367
- const d = e[u], h = d.firstChild, c = h.offsetTop, f = h.offsetLeft, g = h.offsetWidth, m = h.offsetHeight;
368
- n += xt({ pT: o, pL: l, pW: r, pH: a, cT: c, cL: f, cW: g, cH: m, direction: s, isFirst: i });
369
- const p = h.children[1];
364
+ }, _t = function(e, t, n, i) {
365
+ let s = "";
366
+ const o = t.offsetTop, l = t.offsetLeft, r = t.offsetWidth, h = t.offsetHeight;
367
+ for (let f = 0; f < e.length; f++) {
368
+ const d = e[f], a = d.firstChild, c = a.offsetTop, u = a.offsetLeft, g = a.offsetWidth, m = a.offsetHeight;
369
+ s += xt({ pT: o, pL: l, pW: r, pH: h, cT: c, cL: u, cW: g, cH: m, direction: n, isFirst: i });
370
+ const p = a.children[1];
370
371
  if (p) {
371
- if (p.style.bottom = -(p.offsetHeight / 2) + "px", s === "lhs" ? p.style.left = "10px" : s === "rhs" && (p.style.right = "10px"), !p.expanded)
372
+ if (p.style.bottom = -(p.offsetHeight / 2) + "px", n === "lhs" ? p.style.left = "10px" : n === "rhs" && (p.style.right = "10px"), !p.expanded)
372
373
  continue;
373
374
  } else
374
375
  continue;
375
376
  const v = d.children[1].children;
376
- v.length > 0 && (n += _t(v, h, s));
377
+ v.length > 0 && (s += _t(v, a, n));
377
378
  }
378
- return n;
379
+ return s;
379
380
  };
380
- function jt({ x1: e, y1: t, x2: s, y2: i }) {
381
- return `M ${e} ${t} V ${i > t ? i - 20 : i + 20} C ${e} ${i} ${e} ${i} ${s > e ? e + 20 : e - 20} ${i} H ${s}`;
381
+ function Xt({ x1: e, y1: t, x2: n, y2: i }) {
382
+ return `M ${e} ${t} V ${i > t ? i - 20 : i + 20} C ${e} ${i} ${e} ${i} ${n > e ? e + 20 : e - 20} ${i} H ${n}`;
382
383
  }
383
- function Wt({ x1: e, y1: t, x2: s, y2: i }) {
384
- return `M ${e} ${t} Q ${e} ${i} ${s} ${i}`;
384
+ function Wt({ x1: e, y1: t, x2: n, y2: i }) {
385
+ return `M ${e} ${t} Q ${e} ${i} ${n} ${i}`;
385
386
  }
386
- function Yt({ pT: e, pL: t, pW: s, pH: i, cT: n, cL: o, cW: l, cH: r, direction: a, isFirst: u }) {
387
+ function Yt({ pT: e, pL: t, pW: n, pH: i, cT: s, cL: o, cW: l, cH: r, direction: h, isFirst: f }) {
387
388
  let d;
388
- u ? d = e + i / 2 : d = e + i;
389
- const h = n + r;
390
- let c = 0, f = 0, g = 0;
391
- return a === "lhs" ? (c = t + S, f = o, g = o + l) : a === "rhs" && (c = t + s - S, f = o + l, g = o), h < d + 50 && h > d - 50 ? `M ${c} ${d} H ${g} V ${h} H ${f}` : h >= d ? `M ${c} ${d} H ${g} V ${h - L} A ${L} ${L} 0 0 ${c > f ? 1 : 0} ${c > f ? g - L : g + L} ${h} H ${f}` : `M ${c} ${d} H ${g} V ${h + L} A ${L} ${L} 0 0 ${c > f ? 0 : 1} ${c > f ? g - L : g + L} ${h} H ${f}`;
389
+ f ? d = e + i / 2 : d = e + i;
390
+ const a = s + r;
391
+ let c = 0, u = 0, g = 0;
392
+ return h === "lhs" ? (c = t + S, u = o, g = o + l) : h === "rhs" && (c = t + n - S, u = o + l, g = o), a < d + 50 && a > d - 50 ? `M ${c} ${d} H ${g} V ${a} H ${u}` : a >= d ? `M ${c} ${d} H ${g} V ${a - L} A ${L} ${L} 0 0 ${c > u ? 1 : 0} ${c > u ? g - L : g + L} ${a} H ${u}` : `M ${c} ${d} H ${g} V ${a + L} A ${L} ${L} 0 0 ${c > u ? 0 : 1} ${c > u ? g - L : g + L} ${a} H ${u}`;
392
393
  }
393
- function Et({ pT: e, pL: t, pW: s, pH: i, cT: n, cL: o, cW: l, cH: r, direction: a, isFirst: u }) {
394
- let d = 0, h = 0;
395
- u ? d = e + i / 2 : d = e + i;
396
- const c = n + r;
397
- let f = 0, g = 0, m = 0;
394
+ function Et({ pT: e, pL: t, pW: n, pH: i, cT: s, cL: o, cW: l, cH: r, direction: h, isFirst: f }) {
395
+ let d = 0, a = 0;
396
+ f ? d = e + i / 2 : d = e + i;
397
+ const c = s + r;
398
+ let u = 0, g = 0, m = 0;
398
399
  const p = Math.min(Math.abs(d - c) / 800, 1.2) * S;
399
- return a === "lhs" ? (m = t, f = m + S, g = m - S, h = o + S, `M ${f} ${d} C ${m} ${d} ${m + p} ${c} ${g} ${c} H ${h}`) : (m = t + s, f = m - S, g = m + S, h = o + l - S, `M ${f} ${d} C ${m} ${d} ${m - p} ${c} ${g} ${c} H ${h}`);
400
+ return h === "lhs" ? (m = t, u = m + S, g = m - S, a = o + S, `M ${u} ${d} C ${m} ${d} ${m + p} ${c} ${g} ${c} H ${a}`) : (m = t + n, u = m - S, g = m + S, a = o + l - S, `M ${u} ${d} C ${m} ${d} ${m - p} ${c} ${g} ${c} H ${a}`);
400
401
  }
401
402
  const z = (e, t) => {
402
- const s = document.createElement("span");
403
- return s.id = e, s.innerHTML = `<svg class="icon" aria-hidden="true">
403
+ const n = document.createElement("span");
404
+ return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
404
405
  <use xlink:href="#icon-${t}"></use>
405
- </svg>`, s;
406
+ </svg>`, n;
406
407
  };
407
408
  function Ft(e) {
408
- const t = document.createElement("div"), s = z("fullscreen", "full"), i = z("toCenter", "living"), n = z("zoomout", "move"), o = z("zoomin", "add"), l = document.createElement("span");
409
- return l.innerText = "100%", t.appendChild(s), t.appendChild(i), t.appendChild(n), t.appendChild(o), t.className = "mind-elixir-toolbar rb", s.onclick = () => {
409
+ const t = document.createElement("div"), n = z("fullscreen", "full"), i = z("toCenter", "living"), s = z("zoomout", "move"), o = z("zoomin", "add"), l = document.createElement("span");
410
+ return l.innerText = "100%", t.appendChild(n), t.appendChild(i), t.appendChild(s), t.appendChild(o), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
410
411
  e.container.requestFullscreen();
411
412
  }, i.onclick = () => {
412
413
  e.toCenter();
413
- }, n.onclick = () => {
414
+ }, s.onclick = () => {
414
415
  e.scaleVal < 0.6 || e.scale(e.scaleVal -= 0.2);
415
416
  }, o.onclick = () => {
416
417
  e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
417
418
  }, t;
418
419
  }
419
- function Gt(e) {
420
- const t = document.createElement("div"), s = z("tbltl", "left"), i = z("tbltr", "right"), n = z("tblts", "side");
421
- return t.appendChild(s), t.appendChild(i), t.appendChild(n), t.className = "mind-elixir-toolbar lt", s.onclick = () => {
420
+ function It(e) {
421
+ const t = document.createElement("div"), n = z("tbltl", "left"), i = z("tbltr", "right"), s = z("tblts", "side");
422
+ return t.appendChild(n), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
422
423
  e.initLeft();
423
424
  }, i.onclick = () => {
424
425
  e.initRight();
425
- }, n.onclick = () => {
426
+ }, s.onclick = () => {
426
427
  e.initSide();
427
428
  }, t;
428
429
  }
429
- function It(e) {
430
- e.container.append(Ft(e)), e.container.append(Gt(e));
430
+ function Gt(e) {
431
+ e.container.append(Ft(e)), e.container.append(It(e));
431
432
  }
432
433
  /*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
433
- var Kt = Object.defineProperty, Jt = (e, t, s) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, b = (e, t, s) => (Jt(e, typeof t != "symbol" ? t + "" : t, s), s);
434
+ var Kt = Object.defineProperty, Jt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b = (e, t, n) => (Jt(e, typeof t != "symbol" ? t + "" : t, n), n);
434
435
  class Ut {
435
436
  constructor() {
436
437
  b(this, "_listeners", /* @__PURE__ */ new Map()), b(this, "on", this.addEventListener), b(this, "off", this.removeEventListener), b(this, "emit", this.dispatchEvent);
437
438
  }
438
- addEventListener(t, s) {
439
+ addEventListener(t, n) {
439
440
  const i = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
440
- return this._listeners.set(t, i), i.add(s), this;
441
+ return this._listeners.set(t, i), i.add(n), this;
441
442
  }
442
- removeEventListener(t, s) {
443
+ removeEventListener(t, n) {
443
444
  var i;
444
- return (i = this._listeners.get(t)) == null || i.delete(s), this;
445
+ return (i = this._listeners.get(t)) == null || i.delete(n), this;
445
446
  }
446
- dispatchEvent(t, ...s) {
447
+ dispatchEvent(t, ...n) {
447
448
  let i = !0;
448
- for (const n of this._listeners.get(t) ?? [])
449
- i = n(...s) !== !1 && i;
449
+ for (const s of this._listeners.get(t) ?? [])
450
+ i = s(...n) !== !1 && i;
450
451
  return i;
451
452
  }
452
453
  unbindAllListeners() {
@@ -454,32 +455,32 @@ class Ut {
454
455
  }
455
456
  }
456
457
  const ot = (e, t = "px") => typeof e == "number" ? e + t : e;
457
- function T({ style: e }, t, s) {
458
+ function N({ style: e }, t, n) {
458
459
  if (typeof t == "object")
459
- for (const [i, n] of Object.entries(t))
460
- n !== void 0 && (e[i] = ot(n));
460
+ for (const [i, s] of Object.entries(t))
461
+ s !== void 0 && (e[i] = ot(s));
461
462
  else
462
- s !== void 0 && (e[t] = ot(s));
463
+ n !== void 0 && (e[t] = ot(n));
463
464
  }
464
465
  function Ct(e) {
465
- return (t, s, i, n = {}) => {
466
- t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(s) || (s = [s]);
466
+ return (t, n, i, s = {}) => {
467
+ t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
467
468
  for (const o of t)
468
- for (const l of s)
469
- o[e](l, i, { capture: !1, ...n });
470
- return [t, s, i, n];
469
+ for (const l of n)
470
+ o[e](l, i, { capture: !1, ...s });
471
+ return [t, n, i, s];
471
472
  };
472
473
  }
473
- const R = Ct("addEventListener"), N = Ct("removeEventListener"), F = (e) => {
474
+ const R = Ct("addEventListener"), T = Ct("removeEventListener"), F = (e) => {
474
475
  var t;
475
- const { clientX: s, clientY: i, target: n } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
476
- return { x: s, y: i, target: n };
476
+ const { clientX: n, clientY: i, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
477
+ return { x: n, y: i, target: s };
477
478
  };
478
- function lt(e, t, s = "touch") {
479
- switch (s) {
479
+ function lt(e, t, n = "touch") {
480
+ switch (n) {
480
481
  case "center": {
481
- const i = t.left + t.width / 2, n = t.top + t.height / 2;
482
- return i >= e.left && i <= e.right && n >= e.top && n <= e.bottom;
482
+ const i = t.left + t.width / 2, s = t.top + t.height / 2;
483
+ return i >= e.left && i <= e.right && s >= e.top && s <= e.bottom;
483
484
  }
484
485
  case "cover":
485
486
  return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
@@ -488,30 +489,30 @@ function lt(e, t, s = "touch") {
488
489
  }
489
490
  }
490
491
  function O(e, t = document) {
491
- const s = Array.isArray(e) ? e : [e];
492
+ const n = Array.isArray(e) ? e : [e];
492
493
  let i = [];
493
- for (let n = 0, o = s.length; n < o; n++) {
494
- const l = s[n];
494
+ for (let s = 0, o = n.length; s < o; s++) {
495
+ const l = n[s];
495
496
  typeof l == "string" ? i = i.concat(Array.from(t.querySelectorAll(l))) : l instanceof Element && i.push(l);
496
497
  }
497
498
  return i;
498
499
  }
499
500
  const Qt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Zt = () => "safari" in window, te = (e) => {
500
- let t, s = -1, i = !1;
501
+ let t, n = -1, i = !1;
501
502
  return {
502
- next(...n) {
503
- t = n, i || (i = !0, s = requestAnimationFrame(() => {
503
+ next(...s) {
504
+ t = s, i || (i = !0, n = requestAnimationFrame(() => {
504
505
  e(...t), i = !1;
505
506
  }));
506
507
  },
507
508
  cancel() {
508
- cancelAnimationFrame(s), i = !1;
509
+ cancelAnimationFrame(n), i = !1;
509
510
  }
510
511
  };
511
512
  }, { abs: B, max: rt, min: ct, ceil: at } = Math;
512
513
  class wt extends Ut {
513
514
  constructor(t) {
514
- var s, i, n, o, l;
515
+ var n, i, s, o, l;
515
516
  super(), b(this, "_options"), b(this, "_selection", {
516
517
  stored: [],
517
518
  selected: [],
@@ -535,7 +536,7 @@ class wt extends Ut {
535
536
  overlap: "invert",
536
537
  intersect: "touch",
537
538
  ...t.behaviour,
538
- startThreshold: (s = t.behaviour) != null && s.startThreshold ? typeof t.behaviour.startThreshold == "number" ? t.behaviour.startThreshold : { x: 10, y: 10, ...t.behaviour.startThreshold } : { x: 10, y: 10 },
539
+ startThreshold: (n = t.behaviour) != null && n.startThreshold ? typeof t.behaviour.startThreshold == "number" ? t.behaviour.startThreshold : { x: 10, y: 10, ...t.behaviour.startThreshold } : { x: 10, y: 10 },
539
540
  scrolling: {
540
541
  speedDivider: 10,
541
542
  manualSpeed: 750,
@@ -543,7 +544,7 @@ class wt extends Ut {
543
544
  startScrollMargins: {
544
545
  x: 0,
545
546
  y: 0,
546
- ...(o = (n = t.behaviour) == null ? void 0 : n.scrolling) == null ? void 0 : o.startScrollMargins
547
+ ...(o = (s = t.behaviour) == null ? void 0 : s.scrolling) == null ? void 0 : o.startScrollMargins
547
548
  }
548
549
  }
549
550
  },
@@ -560,13 +561,13 @@ class wt extends Ut {
560
561
  };
561
562
  for (const d of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
562
563
  typeof this[d] == "function" && (this[d] = this[d].bind(this));
563
- const { document: r, selectionAreaClass: a, selectionContainerClass: u } = this._options;
564
- this._area = r.createElement("div"), this._clippingElement = r.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(a), u && this._clippingElement.classList.add(u), T(this._area, {
564
+ const { document: r, selectionAreaClass: h, selectionContainerClass: f } = this._options;
565
+ this._area = r.createElement("div"), this._clippingElement = r.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(h), f && this._clippingElement.classList.add(f), N(this._area, {
565
566
  willChange: "top, left, bottom, right, width, height",
566
567
  top: 0,
567
568
  left: 0,
568
569
  position: "fixed"
569
- }), T(this._clippingElement, {
570
+ }), N(this._clippingElement, {
570
571
  overflow: "hidden",
571
572
  position: "fixed",
572
573
  transform: "translate3d(0, 0, 0)",
@@ -578,34 +579,34 @@ class wt extends Ut {
578
579
  }), this.enable();
579
580
  }
580
581
  _bindStartEvents(t = !0) {
581
- const { document: s, features: i } = this._options, n = t ? R : N;
582
- n(s, "mousedown", this._onTapStart), i.touch && n(s, "touchstart", this._onTapStart, {
582
+ const { document: n, features: i } = this._options, s = t ? R : T;
583
+ s(n, "mousedown", this._onTapStart), i.touch && s(n, "touchstart", this._onTapStart, {
583
584
  passive: !1
584
585
  });
585
586
  }
586
- _onTapStart(t, s = !1) {
587
- const { x: i, y: n, target: o } = F(t), { _options: l } = this, { document: r } = this._options, a = o.getBoundingClientRect(), u = O(l.startAreas, l.document), d = O(l.boundaries, l.document);
587
+ _onTapStart(t, n = !1) {
588
+ const { x: i, y: s, target: o } = F(t), { _options: l } = this, { document: r } = this._options, h = o.getBoundingClientRect(), f = O(l.startAreas, l.document), d = O(l.boundaries, l.document);
588
589
  this._targetElement = d.find(
589
- (f) => lt(f.getBoundingClientRect(), a)
590
+ (u) => lt(u.getBoundingClientRect(), h)
590
591
  );
591
- const h = t.composedPath();
592
- if (!this._targetElement || !u.find((f) => h.includes(f)) || !d.find((f) => h.includes(f)) || !s && this._emitEvent("beforestart", t) === !1)
592
+ const a = t.composedPath();
593
+ if (!this._targetElement || !f.find((u) => a.includes(u)) || !d.find((u) => a.includes(u)) || !n && this._emitEvent("beforestart", t) === !1)
593
594
  return;
594
- this._areaLocation = { x1: i, y1: n, x2: 0, y2: 0 };
595
+ this._areaLocation = { x1: i, y1: s, x2: 0, y2: 0 };
595
596
  const c = r.scrollingElement ?? r.body;
596
597
  this._scrollDelta = { x: c.scrollLeft, y: c.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), R(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), R(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), R(r, "scroll", this._onScroll);
597
598
  }
598
599
  _onSingleTap(t) {
599
- const { singleTap: { intersect: s }, range: i } = this._options.features, n = F(t);
600
+ const { singleTap: { intersect: n }, range: i } = this._options.features, s = F(t);
600
601
  let o;
601
- if (s === "native")
602
- o = n.target;
603
- else if (s === "touch") {
602
+ if (n === "native")
603
+ o = s.target;
604
+ else if (n === "touch") {
604
605
  this.resolveSelectables();
605
- const { x: r, y: a } = n;
606
- o = this._selectables.find((u) => {
607
- const { right: d, left: h, top: c, bottom: f } = u.getBoundingClientRect();
608
- return r < d && r > h && a < f && a > c;
606
+ const { x: r, y: h } = s;
607
+ o = this._selectables.find((f) => {
608
+ const { right: d, left: a, top: c, bottom: u } = f.getBoundingClientRect();
609
+ return r < d && r > a && h < u && h > c;
609
610
  });
610
611
  }
611
612
  if (!o)
@@ -617,60 +618,60 @@ class wt extends Ut {
617
618
  }
618
619
  const { stored: l } = this._selection;
619
620
  if (this._emitEvent("start", t), t.shiftKey && i && this._latestElement) {
620
- const r = this._latestElement, [a, u] = r.compareDocumentPosition(o) & 4 ? [o, r] : [r, o], d = [...this._selectables.filter(
621
- (h) => h.compareDocumentPosition(a) & 4 && h.compareDocumentPosition(u) & 2
622
- ), a, u];
621
+ const r = this._latestElement, [h, f] = r.compareDocumentPosition(o) & 4 ? [o, r] : [r, o], d = [...this._selectables.filter(
622
+ (a) => a.compareDocumentPosition(h) & 4 && a.compareDocumentPosition(f) & 2
623
+ ), h, f];
623
624
  this.select(d), this._latestElement = r;
624
625
  } else
625
626
  l.includes(o) && (l.length === 1 || t.ctrlKey || l.every((r) => this._selection.stored.includes(r))) ? this.deselect(o) : (this.select(o), this._latestElement = o);
626
627
  this._emitEvent("stop", t);
627
628
  }
628
629
  _delayedTapMove(t) {
629
- const { container: s, document: i, behaviour: { startThreshold: n } } = this._options, { x1: o, y1: l } = this._areaLocation, { x: r, y: a } = F(t);
630
+ const { container: n, document: i, behaviour: { startThreshold: s } } = this._options, { x1: o, y1: l } = this._areaLocation, { x: r, y: h } = F(t);
630
631
  if (
631
632
  // Single number for both coordinates
632
- typeof n == "number" && B(r + a - (o + l)) >= n || // Different x and y threshold
633
- typeof n == "object" && B(r - o) >= n.x || B(a - l) >= n.y
633
+ typeof s == "number" && B(r + h - (o + l)) >= s || // Different x and y threshold
634
+ typeof s == "object" && B(r - o) >= s.x || B(h - l) >= s.y
634
635
  ) {
635
- if (N(i, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
636
- N(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
636
+ if (T(i, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
637
+ T(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
637
638
  return;
638
639
  }
639
- R(i, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), T(this._area, "display", "block"), O(s, i)[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 && (R(i, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((u) => this._targetElement.contains(u))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
640
+ R(i, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), N(this._area, "display", "block"), O(n, i)[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 && (R(i, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((f) => this._targetElement.contains(f))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
640
641
  }
641
642
  this._handleMoveEvent(t);
642
643
  }
643
644
  _setupSelectionArea() {
644
- const { _clippingElement: t, _targetElement: s, _area: i } = this, n = this._targetRect = s.getBoundingClientRect();
645
- this._scrollAvailable ? (T(t, {
646
- top: n.top,
647
- left: n.left,
648
- width: n.width,
649
- height: n.height
650
- }), T(i, {
651
- marginTop: -n.top,
652
- marginLeft: -n.left
653
- })) : (T(t, {
645
+ const { _clippingElement: t, _targetElement: n, _area: i } = this, s = this._targetRect = n.getBoundingClientRect();
646
+ this._scrollAvailable ? (N(t, {
647
+ top: s.top,
648
+ left: s.left,
649
+ width: s.width,
650
+ height: s.height
651
+ }), N(i, {
652
+ marginTop: -s.top,
653
+ marginLeft: -s.left
654
+ })) : (N(t, {
654
655
  top: 0,
655
656
  left: 0,
656
657
  width: "100%",
657
658
  height: "100%"
658
- }), T(i, {
659
+ }), N(i, {
659
660
  marginTop: 0,
660
661
  marginLeft: 0
661
662
  }));
662
663
  }
663
664
  _onTapMove(t) {
664
- const { x: s, y: i } = F(t), { _scrollSpeed: n, _areaLocation: o, _options: l, _frame: r } = this, { speedDivider: a } = l.behaviour.scrolling, u = this._targetElement;
665
- if (o.x2 = s, o.y2 = i, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
665
+ const { x: n, y: i } = F(t), { _scrollSpeed: s, _areaLocation: o, _options: l, _frame: r } = this, { speedDivider: h } = l.behaviour.scrolling, f = this._targetElement;
666
+ if (o.x2 = n, o.y2 = i, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
666
667
  this._scrollingActive = !0;
667
668
  const d = () => {
668
- if (!n.x && !n.y) {
669
+ if (!s.x && !s.y) {
669
670
  this._scrollingActive = !1;
670
671
  return;
671
672
  }
672
- const { scrollTop: h, scrollLeft: c } = u;
673
- n.y && (u.scrollTop += at(n.y / a), o.y1 -= u.scrollTop - h), n.x && (u.scrollLeft += at(n.x / a), o.x1 -= u.scrollLeft - c), r.next(t), requestAnimationFrame(d);
673
+ const { scrollTop: a, scrollLeft: c } = f;
674
+ s.y && (f.scrollTop += at(s.y / h), o.y1 -= f.scrollTop - a), s.x && (f.scrollLeft += at(s.x / h), o.x1 -= f.scrollLeft - c), r.next(t), requestAnimationFrame(d);
674
675
  };
675
676
  requestAnimationFrame(d);
676
677
  } else
@@ -678,89 +679,89 @@ class wt extends Ut {
678
679
  this._handleMoveEvent(t);
679
680
  }
680
681
  _handleMoveEvent(t) {
681
- const { features: s } = this._options;
682
- (s.touch && Qt() || this._scrollAvailable && Zt()) && t.preventDefault();
682
+ const { features: n } = this._options;
683
+ (n.touch && Qt() || this._scrollAvailable && Zt()) && t.preventDefault();
683
684
  }
684
685
  _onScroll() {
685
- const { _scrollDelta: t, _options: { document: s } } = this, { scrollTop: i, scrollLeft: n } = s.scrollingElement ?? s.body;
686
- this._areaLocation.x1 += t.x - n, this._areaLocation.y1 += t.y - i, t.x = n, t.y = i, this._setupSelectionArea(), this._frame.next(null);
686
+ const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: i, scrollLeft: s } = n.scrollingElement ?? n.body;
687
+ this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - i, t.x = s, t.y = i, this._setupSelectionArea(), this._frame.next(null);
687
688
  }
688
689
  _manualScroll(t) {
689
- const { manualSpeed: s } = this._options.behaviour.scrolling, i = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, n = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
690
- this._scrollSpeed.y += i * s, this._scrollSpeed.x += n * s, this._onTapMove(t), t.preventDefault();
690
+ const { manualSpeed: n } = this._options.behaviour.scrolling, i = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
691
+ this._scrollSpeed.y += i * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
691
692
  }
692
693
  _recalculateSelectionAreaRect() {
693
- const { _scrollSpeed: t, _areaLocation: s, _areaRect: i, _targetElement: n, _options: o } = this, { scrollTop: l, scrollHeight: r, clientHeight: a, scrollLeft: u, scrollWidth: d, clientWidth: h } = n, c = this._targetRect, { x1: f, y1: g } = s;
694
- let { x2: m, y2: p } = s;
694
+ const { _scrollSpeed: t, _areaLocation: n, _areaRect: i, _targetElement: s, _options: o } = this, { scrollTop: l, scrollHeight: r, clientHeight: h, scrollLeft: f, scrollWidth: d, clientWidth: a } = s, c = this._targetRect, { x1: u, y1: g } = n;
695
+ let { x2: m, y2: p } = n;
695
696
  const { behaviour: { scrolling: { startScrollMargins: v } } } = o;
696
- m < c.left + v.x ? (t.x = u ? -B(c.left - m + v.x) : 0, m = m < c.left ? c.left : m) : m > c.right - v.x ? (t.x = d - u - h ? B(c.left + c.width - m - v.x) : 0, m = m > c.right ? c.right : m) : t.x = 0, p < c.top + v.y ? (t.y = l ? -B(c.top - p + v.y) : 0, p = p < c.top ? c.top : p) : p > c.bottom - v.y ? (t.y = r - l - a ? B(c.top + c.height - p - v.y) : 0, p = p > c.bottom ? c.bottom : p) : t.y = 0;
697
- const y = ct(f, m), x = ct(g, p), _ = rt(f, m), C = rt(g, p);
697
+ m < c.left + v.x ? (t.x = f ? -B(c.left - m + v.x) : 0, m = m < c.left ? c.left : m) : m > c.right - v.x ? (t.x = d - f - a ? B(c.left + c.width - m - v.x) : 0, m = m > c.right ? c.right : m) : t.x = 0, p < c.top + v.y ? (t.y = l ? -B(c.top - p + v.y) : 0, p = p < c.top ? c.top : p) : p > c.bottom - v.y ? (t.y = r - l - h ? B(c.top + c.height - p - v.y) : 0, p = p > c.bottom ? c.bottom : p) : t.y = 0;
698
+ const y = ct(u, m), x = ct(g, p), _ = rt(u, m), C = rt(g, p);
698
699
  i.x = y, i.y = x, i.width = _ - y, i.height = C - x;
699
700
  }
700
701
  _redrawSelectionArea() {
701
- const { x: t, y: s, width: i, height: n } = this._areaRect, { style: o } = this._area;
702
- o.left = `${t}px`, o.top = `${s}px`, o.width = `${i}px`, o.height = `${n}px`;
702
+ const { x: t, y: n, width: i, height: s } = this._areaRect, { style: o } = this._area;
703
+ o.left = `${t}px`, o.top = `${n}px`, o.width = `${i}px`, o.height = `${s}px`;
703
704
  }
704
- _onTapStop(t, s) {
705
+ _onTapStop(t, n) {
705
706
  var i;
706
- const { document: n, features: o } = this._options, { _singleClick: l } = this;
707
- N(n, ["mousemove", "touchmove"], this._delayedTapMove), N(n, ["touchmove", "mousemove"], this._onTapMove), N(n, ["mouseup", "touchcancel", "touchend"], this._onTapStop), N(n, "scroll", this._onScroll), this._keepSelection(), t && l && o.singleTap.allow ? this._onSingleTap(t) : !l && !s && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && N(n, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (i = this._frame) == null || i.cancel(), T(this._area, "display", "none");
707
+ const { document: s, features: o } = this._options, { _singleClick: l } = this;
708
+ T(s, ["mousemove", "touchmove"], this._delayedTapMove), T(s, ["touchmove", "mousemove"], this._onTapMove), T(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), T(s, "scroll", this._onScroll), this._keepSelection(), t && l && o.singleTap.allow ? this._onSingleTap(t) : !l && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && T(s, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (i = this._frame) == null || i.cancel(), N(this._area, "display", "none");
708
709
  }
709
710
  _updateElementSelection() {
710
- const { _selectables: t, _options: s, _selection: i, _areaRect: n } = this, { stored: o, selected: l, touched: r } = i, { intersect: a, overlap: u } = s.behaviour, d = u === "invert", h = [], c = [], f = [];
711
+ const { _selectables: t, _options: n, _selection: i, _areaRect: s } = this, { stored: o, selected: l, touched: r } = i, { intersect: h, overlap: f } = n.behaviour, d = f === "invert", a = [], c = [], u = [];
711
712
  for (let m = 0; m < t.length; m++) {
712
713
  const p = t[m];
713
- if (lt(n, p.getBoundingClientRect(), a)) {
714
+ if (lt(s, p.getBoundingClientRect(), h)) {
714
715
  if (l.includes(p))
715
716
  o.includes(p) && !r.includes(p) && r.push(p);
716
717
  else if (d && o.includes(p)) {
717
- f.push(p);
718
+ u.push(p);
718
719
  continue;
719
720
  } else
720
721
  c.push(p);
721
- h.push(p);
722
+ a.push(p);
722
723
  }
723
724
  }
724
725
  d && c.push(...o.filter((m) => !l.includes(m)));
725
- const g = u === "keep";
726
+ const g = f === "keep";
726
727
  for (let m = 0; m < l.length; m++) {
727
728
  const p = l[m];
728
- !h.includes(p) && !// Check if user wants to keep previously selected elements, e.g.
729
+ !a.includes(p) && !// Check if user wants to keep previously selected elements, e.g.
729
730
  // not make them part of the current selection as soon as they're touched.
730
- (g && o.includes(p)) && f.push(p);
731
+ (g && o.includes(p)) && u.push(p);
731
732
  }
732
- i.selected = h, i.changed = { added: c, removed: f }, this._latestElement = void 0;
733
+ i.selected = a, i.changed = { added: c, removed: u }, this._latestElement = void 0;
733
734
  }
734
- _emitEvent(t, s) {
735
+ _emitEvent(t, n) {
735
736
  return this.emit(t, {
736
- event: s,
737
+ event: n,
737
738
  store: this._selection,
738
739
  selection: this
739
740
  });
740
741
  }
741
742
  _keepSelection() {
742
- const { _options: t, _selection: s } = this, { selected: i, changed: n, touched: o, stored: l } = s, r = i.filter((a) => !l.includes(a));
743
+ const { _options: t, _selection: n } = this, { selected: i, changed: s, touched: o, stored: l } = n, r = i.filter((h) => !l.includes(h));
743
744
  switch (t.behaviour.overlap) {
744
745
  case "drop": {
745
- s.stored = [
746
+ n.stored = [
746
747
  ...r,
747
- ...l.filter((a) => !o.includes(a))
748
+ ...l.filter((h) => !o.includes(h))
748
749
  // Elements not touched
749
750
  ];
750
751
  break;
751
752
  }
752
753
  case "invert": {
753
- s.stored = [
754
+ n.stored = [
754
755
  ...r,
755
- ...l.filter((a) => !n.removed.includes(a))
756
+ ...l.filter((h) => !s.removed.includes(h))
756
757
  // Elements not removed from selection
757
758
  ];
758
759
  break;
759
760
  }
760
761
  case "keep": {
761
- s.stored = [
762
+ n.stored = [
762
763
  ...l,
763
- ...i.filter((a) => !l.includes(a))
764
+ ...i.filter((h) => !l.includes(h))
764
765
  // Newly added
765
766
  ];
766
767
  break;
@@ -772,8 +773,8 @@ class wt extends Ut {
772
773
  * @param evt A MouseEvent / TouchEvent -like object
773
774
  * @param silent If beforestart should be fired,
774
775
  */
775
- trigger(t, s = !0) {
776
- this._onTapStart(t, s);
776
+ trigger(t, n = !0) {
777
+ this._onTapStart(t, n);
777
778
  }
778
779
  /**
779
780
  * Can be used if during a selection elements have been added.
@@ -787,13 +788,13 @@ class wt extends Ut {
787
788
  * @param includeStored If the store should also get cleared
788
789
  * @param quiet If move / stop events should be fired
789
790
  */
790
- clearSelection(t = !0, s = !1) {
791
- const { selected: i, stored: n, changed: o } = this._selection;
791
+ clearSelection(t = !0, n = !1) {
792
+ const { selected: i, stored: s, changed: o } = this._selection;
792
793
  o.added = [], o.removed.push(
793
794
  ...i,
794
- ...t ? n : []
795
- ), s || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
796
- stored: t ? [] : n,
795
+ ...t ? s : []
796
+ ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
797
+ stored: t ? [] : s,
797
798
  selected: [],
798
799
  touched: [],
799
800
  changed: { added: [], removed: [] }
@@ -829,24 +830,24 @@ class wt extends Ut {
829
830
  * @param query - CSS Query, can be an array of queries
830
831
  * @param quiet - If this should not trigger the move event
831
832
  */
832
- select(t, s = !1) {
833
- const { changed: i, selected: n, stored: o } = this._selection, l = O(t, this._options.document).filter(
834
- (r) => !n.includes(r) && !o.includes(r)
833
+ select(t, n = !1) {
834
+ const { changed: i, selected: s, stored: o } = this._selection, l = O(t, this._options.document).filter(
835
+ (r) => !s.includes(r) && !o.includes(r)
835
836
  );
836
- return o.push(...l), n.push(...l), i.added.push(...l), i.removed = [], this._latestElement = void 0, s || (this._emitEvent("move", null), this._emitEvent("stop", null)), l;
837
+ return o.push(...l), s.push(...l), i.added.push(...l), i.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), l;
837
838
  }
838
839
  /**
839
840
  * Removes a particular element from the selection.
840
841
  * @param query - CSS Query, can be an array of queries
841
842
  * @param quiet - If this should not trigger the move event
842
843
  */
843
- deselect(t, s = !1) {
844
- const { selected: i, stored: n, changed: o } = this._selection, l = O(t, this._options.document).filter(
845
- (r) => i.includes(r) || n.includes(r)
844
+ deselect(t, n = !1) {
845
+ const { selected: i, stored: s, changed: o } = this._selection, l = O(t, this._options.document).filter(
846
+ (r) => i.includes(r) || s.includes(r)
846
847
  );
847
- l.length && (this._selection.stored = n.filter((r) => !l.includes(r)), this._selection.selected = i.filter((r) => !l.includes(r)), this._selection.changed.added = [], this._selection.changed.removed.push(
848
+ l.length && (this._selection.stored = s.filter((r) => !l.includes(r)), this._selection.selected = i.filter((r) => !l.includes(r)), this._selection.changed.added = [], this._selection.changed.removed.push(
848
849
  ...l.filter((r) => !o.removed.includes(r))
849
- ), this._latestElement = void 0, s || (this._emitEvent("move", null), this._emitEvent("stop", null)));
850
+ ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
850
851
  }
851
852
  }
852
853
  b(wt, "version", "3.3.1");
@@ -869,42 +870,33 @@ function ee(e) {
869
870
  // fullscreen containers.
870
871
  startScrollMargins: { x: 10, y: 10 }
871
872
  }
872
- },
873
- features: {
874
- // Configuration in case a selectable gets just clicked.
875
- singleTap: {
876
- // Enable single-click selection (Also disables range-selection via shift + ctrl).
877
- allow: !0,
878
- // 'native' (element was mouse-event target) or 'touch' (element visually touched).
879
- intersect: "native"
880
- }
881
873
  }
882
- }).on("beforestart", ({ event: s }) => !(s.button !== 0 || s.target.tagName === "ME-TPC" || s.target.id === "input-box")).on("start", ({ store: s, event: i }) => {
883
- console.log(s, "store"), console.log(i, "event"), !i.ctrlKey && !i.metaKey && (e.unselectNodes(), t.clearSelection(!0, !0));
874
+ }).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box")).on("start", ({ event: n }) => {
875
+ !n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
884
876
  }).on(
885
877
  "move",
886
878
  ({
887
879
  store: {
888
- changed: { added: s, removed: i }
880
+ changed: { added: n, removed: i }
889
881
  }
890
882
  }) => {
891
883
  A.moved = !0;
892
- for (const n of s)
893
- n.classList.add("selected");
894
- for (const n of i)
895
- n.classList.remove("selected");
884
+ for (const s of n)
885
+ s.classList.add("selected");
886
+ for (const s of i)
887
+ s.classList.remove("selected");
896
888
  }
897
- ).on("stop", ({ store: { stored: s } }) => {
898
- console.log(s, "stored"), e.selectNodes(s);
889
+ ).on("stop", ({ store: { stored: n } }) => {
890
+ console.log(n, "stored"), e.selectNodes(n);
899
891
  });
900
892
  console.log(t, "selection");
901
893
  }
902
- const se = function(e, t = !0) {
894
+ const ne = function(e, t = !0) {
903
895
  this.theme = e;
904
- const s = this.theme.cssVar, i = Object.keys(s);
905
- for (let n = 0; n < i.length; n++) {
906
- const o = i[n];
907
- this.mindElixirBox.style.setProperty(o, s[o]);
896
+ const n = this.theme.cssVar, i = Object.keys(n);
897
+ for (let s = 0; s < i.length; s++) {
898
+ const o = i[s];
899
+ this.mindElixirBox.style.setProperty(o, n[o]);
908
900
  }
909
901
  t && this.refresh();
910
902
  };
@@ -916,15 +908,15 @@ function Lt(e) {
916
908
  theme: e.theme
917
909
  };
918
910
  }
919
- const ie = function(e, t, s) {
911
+ const ie = function(e, t, n) {
920
912
  if (e) {
921
913
  if (console.time("selectNode"), typeof e == "string") {
922
914
  const i = M(e);
923
915
  return i ? this.selectNode(i) : void 0;
924
916
  }
925
- this.currentNode && (this.currentNode.className = ""), 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, s), console.timeEnd("selectNode");
917
+ this.currentNode && (this.currentNode.className = ""), e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n), console.timeEnd("selectNode");
926
918
  }
927
- }, ne = function() {
919
+ }, se = function() {
928
920
  this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
929
921
  }, oe = function(e) {
930
922
  if (e) {
@@ -979,9 +971,9 @@ const ie = function(e, t, s) {
979
971
  }
980
972
  }, de = function() {
981
973
  const e = Lt(this);
982
- return JSON.stringify(e, (t, s) => {
974
+ return JSON.stringify(e, (t, n) => {
983
975
  if (t !== "parent")
984
- return t === "from" || t === "to" ? s.nodeObj.id : s;
976
+ return t === "from" || t === "to" ? n.nodeObj.id : n;
985
977
  });
986
978
  }, ue = function() {
987
979
  return JSON.parse(this.getDataString());
@@ -990,14 +982,14 @@ const ie = function(e, t, s) {
990
982
  let t = "# " + e.topic + `
991
983
 
992
984
  `;
993
- function s(i, n) {
985
+ function n(i, s) {
994
986
  for (let o = 0; o < i.length; o++)
995
- n <= 6 ? t += "".padStart(n, "#") + " " + i[o].topic + `
987
+ s <= 6 ? t += "".padStart(s, "#") + " " + i[o].topic + `
996
988
 
997
- ` : t += "".padStart(n - 7, " ") + "- " + i[o].topic + `
998
- `, i[o].children && s(i[o].children || [], n + 1);
989
+ ` : t += "".padStart(s - 7, " ") + "- " + i[o].topic + `
990
+ `, i[o].children && n(i[o].children || [], s + 1);
999
991
  }
1000
- return s(e.children || [], 2), t;
992
+ return n(e.children || [], 2), t;
1001
993
  }, pe = function() {
1002
994
  this.editable = !0;
1003
995
  }, me = function() {
@@ -1021,8 +1013,8 @@ const ie = function(e, t, s) {
1021
1013
  }, we = function(e) {
1022
1014
  this.locale = e, this.refresh();
1023
1015
  }, Le = function(e, t) {
1024
- const s = e.nodeObj;
1025
- typeof t == "boolean" ? s.expanded = t : s.expanded !== !1 ? s.expanded = !1 : s.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", s);
1016
+ const n = e.nodeObj;
1017
+ typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
1026
1018
  }, Se = function(e) {
1027
1019
  e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}), Q(this.nodeData), this.layout(), this.linkDiv();
1028
1020
  }, Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1049,7 +1041,7 @@ const ie = function(e, t, s) {
1049
1041
  selectPrevSibling: ce,
1050
1042
  setLocale: we,
1051
1043
  toCenter: ve,
1052
- unselectNode: ne,
1044
+ unselectNode: se,
1053
1045
  unselectNodes: le
1054
1046
  }, Symbol.toStringTag, { value: "Module" })), $e = function(e) {
1055
1047
  return {
@@ -1063,8 +1055,8 @@ const ie = function(e, t, s) {
1063
1055
  this.lastX = t.pageX, this.lastY = t.pageY;
1064
1056
  return;
1065
1057
  }
1066
- const s = this.lastX - t.pageX, i = this.lastY - t.pageY;
1067
- this.cb && this.cb(s, i), this.lastX = t.pageX, this.lastY = t.pageY;
1058
+ const n = this.lastX - t.pageX, i = this.lastY - t.pageY;
1059
+ this.cb && this.cb(n, i), this.lastX = t.pageX, this.lastY = t.pageY;
1068
1060
  }
1069
1061
  },
1070
1062
  handleMouseDown(t) {
@@ -1074,8 +1066,8 @@ const ie = function(e, t, s) {
1074
1066
  t.stopPropagation(), this.clear();
1075
1067
  },
1076
1068
  cb: null,
1077
- init(t, s) {
1078
- this.cb = s, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this), t.addEventListener("mousemove", this.handleMouseMove), t.addEventListener("mouseleave", this.handleClear), t.addEventListener("mouseup", this.handleClear), this.dom.addEventListener("mousedown", this.handleMouseDown);
1069
+ init(t, n) {
1070
+ this.cb = n, this.handleClear = this.handleClear.bind(this), this.handleMouseMove = this.handleMouseMove.bind(this), this.handleMouseDown = this.handleMouseDown.bind(this), t.addEventListener("mousemove", this.handleMouseMove), t.addEventListener("mouseleave", this.handleClear), t.addEventListener("mouseup", this.handleClear), this.dom.addEventListener("mousedown", this.handleMouseDown);
1079
1071
  },
1080
1072
  destory(t) {
1081
1073
  t.removeEventListener("mousemove", this.handleMouseMove), t.removeEventListener("mouseleave", this.handleClear), t.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
@@ -1086,118 +1078,130 @@ const ie = function(e, t, s) {
1086
1078
  };
1087
1079
  }, ht = {
1088
1080
  create: $e
1089
- }, ke = function(e, t, s, i) {
1090
- const n = this.map.getBoundingClientRect();
1081
+ }, ke = function(e, t, n, i) {
1082
+ const s = this.map.getBoundingClientRect();
1091
1083
  if (!e || !t)
1092
1084
  return;
1093
- const o = e.getBoundingClientRect(), l = t.getBoundingClientRect(), r = (o.x + o.width / 2 - n.x) / this.scaleVal, a = (o.y + o.height / 2 - n.y) / this.scaleVal, u = (l.x + l.width / 2 - n.x) / this.scaleVal, d = (l.y + l.height / 2 - n.y) / this.scaleVal;
1094
- let h, c, f, g;
1095
- s && i ? (h = r + i.delta1.x, c = a + i.delta1.y, f = u + i.delta2.x, g = d + i.delta2.y) : (a + d) / 2 - a <= o.height / 2 ? (h = (o.x + o.width - n.x) / this.scaleVal + 100, c = a, f = (l.x + l.width - n.x) / this.scaleVal + 100, g = d) : (h = (r + u) / 2, c = (a + d) / 2, f = (r + u) / 2, g = (a + d) / 2);
1085
+ const o = e.getBoundingClientRect(), l = t.getBoundingClientRect(), r = (o.x + o.width / 2 - s.x) / this.scaleVal, h = (o.y + o.height / 2 - s.y) / this.scaleVal, f = (l.x + l.width / 2 - s.x) / this.scaleVal, d = (l.y + l.height / 2 - s.y) / this.scaleVal;
1086
+ let a, c, u, g;
1087
+ n && i ? (a = r + i.delta1.x, c = h + i.delta1.y, u = f + i.delta2.x, g = d + i.delta2.y) : (h + d) / 2 - h <= o.height / 2 ? (a = (o.x + o.width - s.x) / this.scaleVal + 100, c = h, u = (l.x + l.width - s.x) / this.scaleVal + 100, g = d) : (a = (r + f) / 2, c = (h + d) / 2, u = (r + f) / 2, g = (h + d) / 2);
1096
1088
  const m = {
1097
1089
  cx: r,
1098
- cy: a,
1090
+ cy: h,
1099
1091
  w: o.width,
1100
1092
  h: o.height
1101
1093
  }, p = {
1102
- cx: u,
1094
+ cx: f,
1103
1095
  cy: d,
1104
1096
  w: l.width,
1105
1097
  h: l.height
1106
- }, v = J(m, h, c), y = v.x, x = v.y, _ = U(p, f, g), C = _.x, k = _.y, H = gt(f, g, C, k), E = {
1098
+ }, v = J(m, a, c), y = v.x, x = v.y, _ = U(p, u, g), C = _.x, k = _.y, H = gt(u, g, C, k), E = {
1107
1099
  id: "",
1108
1100
  label: "",
1109
1101
  from: e.nodeObj.id,
1110
1102
  to: t.nodeObj.id,
1111
1103
  delta1: {
1112
- x: h - r,
1113
- y: c - a
1104
+ x: a - r,
1105
+ y: c - h
1114
1106
  },
1115
1107
  delta2: {
1116
- x: f - u,
1108
+ x: u - f,
1117
1109
  y: g - d
1118
1110
  }
1119
1111
  }, P = qt(
1120
- `M ${y} ${x} C ${h} ${c} ${f} ${g} ${C} ${k}`,
1112
+ `M ${y} ${x} C ${a} ${c} ${u} ${g} ${C} ${k}`,
1121
1113
  `M ${H.x1} ${H.y1} L ${C} ${k} L ${H.x2} ${H.y2}`
1122
1114
  );
1123
- s && i ? (E.id = i.id, this.linkData[i.id] = E) : (E.id = Z(), this.linkData[E.id] = E, this.currentLink = P), P.linkObj = E, P.dataset.linkid = E.id, this.linkSvgGroup.appendChild(P), s || this.showLinkController(h, c, f, g, E, m, p);
1124
- }, Te = function(e) {
1115
+ n && i ? (E.id = i.id, this.linkData[i.id] = E) : (E.id = Z(), this.linkData[E.id] = E, this.currentLink = P), P.linkObj = E, P.dataset.linkid = E.id, this.linkSvgGroup.appendChild(P), n || this.showLinkController(a, c, u, g, E, m, p);
1116
+ }, Ne = function(e) {
1125
1117
  let t;
1126
1118
  if (e ? t = e : t = this.currentLink, !t)
1127
1119
  return;
1128
1120
  console.log(t), this.hideLinkController();
1129
- const s = t.linkObj.id;
1130
- console.log(s), delete this.linkData[s], t.remove(), t = null;
1131
- }, Ne = function(e) {
1121
+ const n = t.linkObj.id;
1122
+ console.log(n), delete this.linkData[n], t.remove(), t = null;
1123
+ }, Te = function(e) {
1132
1124
  this.currentLink = e;
1133
1125
  const t = e.linkObj;
1134
1126
  if (!t)
1135
1127
  return;
1136
- const s = t.from, i = t.to, n = this.map.getBoundingClientRect(), o = M(s).getBoundingClientRect(), l = M(i).getBoundingClientRect(), r = (o.x + o.width / 2 - n.x) / this.scaleVal, a = (o.y + o.height / 2 - n.y) / this.scaleVal, u = (l.x + l.width / 2 - n.x) / this.scaleVal, d = (l.y + l.height / 2 - n.y) / this.scaleVal, h = {
1128
+ const n = t.from, i = t.to, s = this.map.getBoundingClientRect(), o = M(n).getBoundingClientRect(), l = M(i).getBoundingClientRect(), r = (o.x + o.width / 2 - s.x) / this.scaleVal, h = (o.y + o.height / 2 - s.y) / this.scaleVal, f = (l.x + l.width / 2 - s.x) / this.scaleVal, d = (l.y + l.height / 2 - s.y) / this.scaleVal, a = {
1137
1129
  cx: r,
1138
- cy: a,
1130
+ cy: h,
1139
1131
  w: o.width,
1140
1132
  h: o.height
1141
1133
  }, c = {
1142
- cx: u,
1134
+ cx: f,
1143
1135
  cy: d,
1144
1136
  w: l.width,
1145
1137
  h: l.height
1146
- }, f = r + t.delta1.x, g = a + t.delta1.y, m = u + t.delta2.x, p = d + t.delta2.y;
1147
- this.showLinkController(f, g, m, p, t, h, c);
1138
+ }, u = r + t.delta1.x, g = h + t.delta1.y, m = f + t.delta2.x, p = d + t.delta2.y;
1139
+ this.showLinkController(u, g, m, p, t, a, c);
1148
1140
  }, Ae = function() {
1149
1141
  this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
1150
- }, He = function(e, t, s, i, n, o, l) {
1142
+ }, He = function(e, t, n, i, s, o, l) {
1151
1143
  this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial";
1152
1144
  const r = J(o, e, t);
1153
- let a = r.x, u = r.y;
1154
- const d = U(l, s, i);
1155
- let h = d.x, c = d.y;
1156
- this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${i}px;left:${s}px;`, this.line1.setAttribute("x1", a), this.line1.setAttribute("y1", u), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), this.line2.setAttribute("x1", s), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", h), this.line2.setAttribute("y2", c), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = ht.create(this.P2), this.helper2 = ht.create(this.P3), this.helper1.init(this.map, (f, g) => {
1145
+ let h = r.x, f = r.y;
1146
+ const d = U(l, n, i);
1147
+ let a = d.x, c = d.y;
1148
+ this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${i}px;left:${n}px;`, this.line1.setAttribute("x1", h), this.line1.setAttribute("y1", f), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", a), this.line2.setAttribute("y2", c), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = ht.create(this.P2), this.helper2 = ht.create(this.P3), this.helper1.init(this.map, (u, g) => {
1157
1149
  var p;
1158
- e = e - f / this.scaleVal, t = t - g / this.scaleVal;
1150
+ e = e - u / this.scaleVal, t = t - g / this.scaleVal;
1159
1151
  const m = J(o, e, t);
1160
- a = m.x, u = m.y, this.P2.style.top = t + "px", this.P2.style.left = e + "px", (p = this.currentLink) == null || p.children[0].setAttribute("d", `M ${a} ${u} C ${e} ${t} ${s} ${i} ${h} ${c}`), this.line1.setAttribute("x1", a), this.line1.setAttribute("y1", u), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), n.delta1.x = e - o.cx, n.delta1.y = t - o.cy;
1161
- }), this.helper2.init(this.map, (f, g) => {
1152
+ h = m.x, f = m.y, this.P2.style.top = t + "px", this.P2.style.left = e + "px", (p = this.currentLink) == null || p.children[0].setAttribute("d", `M ${h} ${f} C ${e} ${t} ${n} ${i} ${a} ${c}`), this.line1.setAttribute("x1", h), this.line1.setAttribute("y1", f), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), s.delta1.x = e - o.cx, s.delta1.y = t - o.cy;
1153
+ }), this.helper2.init(this.map, (u, g) => {
1162
1154
  var v, y;
1163
- s = s - f / this.scaleVal, i = i - g / this.scaleVal;
1164
- const m = U(l, s, i);
1165
- h = m.x, c = m.y;
1166
- const p = gt(s, i, h, c);
1167
- this.P3.style.top = i + "px", this.P3.style.left = s + "px", (v = this.currentLink) == null || v.children[0].setAttribute("d", `M ${a} ${u} C ${e} ${t} ${s} ${i} ${h} ${c}`), (y = this.currentLink) == null || y.children[1].setAttribute("d", `M ${p.x1} ${p.y1} L ${h} ${c} L ${p.x2} ${p.y2}`), this.line2.setAttribute("x1", s), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", h), this.line2.setAttribute("y2", c), n.delta2.x = s - l.cx, n.delta2.y = i - l.cy;
1155
+ n = n - u / this.scaleVal, i = i - g / this.scaleVal;
1156
+ const m = U(l, n, i);
1157
+ a = m.x, c = m.y;
1158
+ const p = gt(n, i, a, c);
1159
+ this.P3.style.top = i + "px", this.P3.style.left = n + "px", (v = this.currentLink) == null || v.children[0].setAttribute("d", `M ${h} ${f} C ${e} ${t} ${n} ${i} ${a} ${c}`), (y = this.currentLink) == null || y.children[1].setAttribute("d", `M ${p.x1} ${p.y1} L ${a} ${c} L ${p.x2} ${p.y2}`), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", a), this.line2.setAttribute("y2", c), s.delta2.x = n - l.cx, s.delta2.y = i - l.cy;
1168
1160
  });
1169
1161
  }, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1170
1162
  __proto__: null,
1171
1163
  createLink: ke,
1172
1164
  hideLinkController: Ae,
1173
- removeLink: Te,
1174
- selectLink: Ne,
1165
+ removeLink: Ne,
1166
+ selectLink: Te,
1175
1167
  showLinkController: He
1176
1168
  }, Symbol.toStringTag, { value: "Module" })), Be = function(e) {
1177
- var a, u;
1169
+ var h, f;
1170
+ if (e.length === 0)
1171
+ throw new Error("No selected node.");
1172
+ if (e.length === 1) {
1173
+ const d = e[0].nodeObj, a = e[0].nodeObj.parent;
1174
+ if (!a)
1175
+ throw new Error("Can not select root node.");
1176
+ const c = a.children.findIndex((u) => d === u);
1177
+ return {
1178
+ parent: a.id,
1179
+ start: c,
1180
+ end: c
1181
+ };
1182
+ }
1178
1183
  let t = 0;
1179
- const s = e.map((d) => {
1180
- let h = d.nodeObj;
1184
+ const n = e.map((d) => {
1185
+ let a = d.nodeObj;
1181
1186
  const c = [];
1182
- for (; h.parent; ) {
1183
- const f = h.parent, g = f.children, m = g == null ? void 0 : g.indexOf(h);
1184
- h = f, c.unshift({ node: h, index: m });
1187
+ for (; a.parent; ) {
1188
+ const u = a.parent, g = u.children, m = g == null ? void 0 : g.indexOf(a);
1189
+ a = u, c.unshift({ node: a, index: m });
1185
1190
  }
1186
1191
  return c.length > t && (t = c.length), c;
1187
1192
  });
1188
1193
  let i = 0;
1189
1194
  t:
1190
1195
  for (; i < t; i++) {
1191
- const d = (a = s[0][i]) == null ? void 0 : a.node;
1192
- console.log(d);
1193
- for (let h = 1; h < s.length; h++)
1194
- if (((u = s[h][i]) == null ? void 0 : u.node) !== d)
1196
+ const d = (h = n[0][i]) == null ? void 0 : h.node;
1197
+ for (let a = 1; a < n.length; a++)
1198
+ if (((f = n[a][i]) == null ? void 0 : f.node) !== d)
1195
1199
  break t;
1196
1200
  }
1197
- const n = s.map((d) => d[i - 1].index).sort();
1198
- console.log(s, "parentChains");
1199
- const o = n[0] || 0, l = n[n.length - 1] || 0, r = s[0][i - 1].node;
1200
- return console.log(r), {
1201
+ const s = n.map((d) => d[i - 1].index).sort(), o = s[0] || 0, l = s[s.length - 1] || 0, r = n[0][i - 1].node;
1202
+ if (r.root)
1203
+ throw new Error("Please select nodes in the same main topic.");
1204
+ return {
1201
1205
  parent: r.id,
1202
1206
  start: o,
1203
1207
  end: l
@@ -1206,91 +1210,91 @@ const ie = function(e, t, s) {
1206
1210
  const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
1207
1211
  return t.setAttribute("id", e), t;
1208
1212
  }, dt = function(e, t) {
1209
- const s = document.createElementNS("http://www.w3.org/2000/svg", "path");
1210
- return tt(s, {
1213
+ const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
1214
+ return tt(n, {
1211
1215
  d: e,
1212
1216
  stroke: t || "#666",
1213
1217
  fill: "none",
1214
1218
  "stroke-linecap": "round",
1215
1219
  "stroke-width": "2"
1216
- }), s;
1217
- }, ut = function(e, t, s, i, n) {
1220
+ }), n;
1221
+ }, ut = function(e, t, n, i, s) {
1218
1222
  const o = document.createElementNS("http://www.w3.org/2000/svg", "text");
1219
1223
  return tt(o, {
1220
1224
  "text-anchor": i,
1221
1225
  x: t + "",
1222
- y: s + "",
1223
- fill: n || "#666"
1226
+ y: n + "",
1227
+ fill: s || "#666"
1224
1228
  }), o.innerHTML = e, o;
1225
1229
  }, Ve = (e) => M(e).parentElement.parentElement, St = function(e, t) {
1226
1230
  var k, H;
1227
- const { id: s, text: i, parent: n, start: o, end: l } = t, r = e.nodes, a = M(n), u = (k = a.closest("me-main")) == null ? void 0 : k.className, d = a.nodeObj;
1228
- let h = 1 / 0, c = 0, f = 0, g = 0;
1231
+ const { id: n, text: i, parent: s, start: o, end: l } = t, r = e.nodes, h = M(s), f = (k = h.closest("me-main")) == null ? void 0 : k.className, d = h.nodeObj;
1232
+ let a = 1 / 0, c = 0, u = 0, g = 0;
1229
1233
  for (let E = o; E <= l; E++) {
1230
1234
  const P = (H = d.children) == null ? void 0 : H[E];
1231
1235
  if (!P)
1232
- return console.warn("Child not found"), e.removeSummary(s), null;
1236
+ return console.warn("Child not found"), e.removeSummary(n), null;
1233
1237
  const W = Ve(P.id), { offsetLeft: Y, offsetTop: et } = vt(r, W);
1234
- E === o && (f = et), E === l && (g = et + W.offsetHeight), Y < h && (h = Y), W.offsetWidth + Y > c && (c = W.offsetWidth + Y);
1238
+ E === o && (u = et), E === l && (g = et + W.offsetHeight), Y < a && (a = Y), W.offsetWidth + Y > c && (c = W.offsetWidth + Y);
1235
1239
  }
1236
1240
  let m, p;
1237
- const v = f + 10, y = g + 10, x = (v + y) / 2, _ = e.theme.cssVar["--color"];
1238
- u === "lhs" ? (m = dt(`M ${h + 10} ${v} c -5 0 -10 5 -10 10 L ${h} ${y - 10} c 0 5 5 10 10 10 M ${h} ${x} h -10`, _), p = ut(i, h - 20, x + 6, "end", _)) : (m = dt(`M ${c - 10} ${v} c 5 0 10 5 10 10 L ${c} ${y - 10} c 0 5 -5 10 -10 10 M ${c} ${x} h 10`, _), p = ut(i, c + 20, x + 6, "start", _));
1239
- const C = ze("s-" + s);
1241
+ const v = u + 10, y = g + 10, x = (v + y) / 2, _ = e.theme.cssVar["--color"];
1242
+ f === "lhs" ? (m = dt(`M ${a + 10} ${v} c -5 0 -10 5 -10 10 L ${a} ${y - 10} c 0 5 5 10 10 10 M ${a} ${x} h -10`, _), p = ut(i, a - 20, x + 6, "end", _)) : (m = dt(`M ${c - 10} ${v} c 5 0 10 5 10 10 L ${c} ${y - 10} c 0 5 -5 10 -10 10 M ${c} ${x} h 10`, _), p = ut(i, c + 20, x + 6, "start", _));
1243
+ const C = ze("s-" + n);
1240
1244
  return C.appendChild(m), C.appendChild(p), C.summaryObj = t, e.summarySvg.appendChild(C), C;
1241
1245
  }, De = function() {
1242
- if (!this.currentNodes)
1243
- return;
1244
- const { parent: e, start: t, end: s } = Be(this.currentNodes), i = { id: Z(), parent: e, start: t, end: s, text: "summary" }, n = St(this, i);
1245
- this.summaries.push(i), this.editSummary(n);
1246
+ let e = [];
1247
+ this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
1248
+ const { parent: t, start: n, end: i } = Be(e), s = { id: Z(), parent: t, start: n, end: i, text: "summary" }, o = St(this, s);
1249
+ this.summaries.push(s), this.editSummary(o);
1246
1250
  }, Re = function(e) {
1247
- var s;
1251
+ var n;
1248
1252
  const t = this.summaries.findIndex((i) => i.id === e);
1249
- t > -1 && (this.summaries.splice(t, 1), (s = document.querySelector("#s-" + e)) == null || s.remove());
1253
+ t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
1250
1254
  }, Oe = function(e) {
1251
- const t = e.children[1].getBBox(), s = 6, i = 3, n = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1252
- tt(n, {
1253
- x: t.x - s + "",
1254
- y: t.y - s + "",
1255
- width: t.width + s * 2 + "",
1256
- height: t.height + s * 2 + "",
1255
+ const t = e.children[1].getBBox(), n = 6, i = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1256
+ tt(s, {
1257
+ x: t.x - n + "",
1258
+ y: t.y - n + "",
1259
+ width: t.width + n * 2 + "",
1260
+ height: t.height + n * 2 + "",
1257
1261
  rx: i + "",
1258
1262
  stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
1259
1263
  "stroke-width": "2",
1260
1264
  fill: "none"
1261
- }), n.classList.add("selected"), e.appendChild(n), this.currentSummary = e;
1265
+ }), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
1262
1266
  }, qe = function() {
1263
1267
  var e, t;
1264
1268
  (t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
1265
- }, Xe = function() {
1269
+ }, je = function() {
1266
1270
  this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
1267
1271
  St(this, e);
1268
1272
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
1269
- }, je = function(e) {
1273
+ }, Xe = function(e) {
1270
1274
  var t;
1271
1275
  return (t = M(e).closest("me-main")) == null ? void 0 : t.className;
1272
1276
  }, We = function(e) {
1273
1277
  if (console.time("editSummary"), !e)
1274
1278
  return;
1275
- const t = e.childNodes[1], s = document.createElement("div");
1276
- this.nodes.appendChild(s);
1279
+ const t = e.childNodes[1], n = document.createElement("div");
1280
+ this.nodes.appendChild(n);
1277
1281
  const i = t.innerHTML;
1278
- s.id = "input-box", s.textContent = i, s.contentEditable = "true", s.spellcheck = !1;
1279
- const n = t.getAttribute("x") + "px", o = t.getAttribute("y") + "px";
1280
- s.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${n};top:${o};`, je(e.summaryObj.parent) === "lhs" ? s.style.cssText += "transform: translate(-100%, -100%);" : s.style.cssText += "transform: translate(0, -100%);", s.focus(), yt(s), s.addEventListener("keydown", (l) => {
1282
+ n.id = "input-box", n.textContent = i, n.contentEditable = "true", n.spellcheck = !1;
1283
+ const s = t.getAttribute("x") + "px", o = t.getAttribute("y") + "px";
1284
+ n.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${s};top:${o};`, Xe(e.summaryObj.parent) === "lhs" ? n.style.cssText += "transform: translate(-100%, -100%);" : n.style.cssText += "transform: translate(0, -100%);", n.focus(), yt(n), n.addEventListener("keydown", (l) => {
1281
1285
  l.stopPropagation();
1282
1286
  const r = l.key;
1283
1287
  if (r === "Enter" || r === "Tab") {
1284
1288
  if (l.shiftKey)
1285
1289
  return;
1286
- l.preventDefault(), s.blur(), this.map.focus();
1290
+ l.preventDefault(), n.blur(), this.map.focus();
1287
1291
  }
1288
- }), s.addEventListener("blur", () => {
1289
- var a;
1290
- if (!s)
1292
+ }), n.addEventListener("blur", () => {
1293
+ var h;
1294
+ if (!n)
1291
1295
  return;
1292
- const l = e.summaryObj, r = ((a = s.textContent) == null ? void 0 : a.trim()) || "";
1293
- console.log(r), r === "" ? l.text = i : l.text = r, s.remove(), r !== i && (t.innerHTML = l.text, this.linkDiv(), this.bus.fire("operation", {
1296
+ const l = e.summaryObj, r = ((h = n.textContent) == null ? void 0 : h.trim()) || "";
1297
+ r === "" ? l.text = i : l.text = r, n.remove(), r !== i && (t.innerHTML = l.text, this.linkDiv(), this.bus.fire("operation", {
1294
1298
  name: "finishEditSummary",
1295
1299
  obj: l,
1296
1300
  origin: i
@@ -1301,21 +1305,21 @@ const ie = function(e, t, s) {
1301
1305
  createSummary: De,
1302
1306
  editSummary: We,
1303
1307
  removeSummary: Re,
1304
- renderSummary: Xe,
1308
+ renderSummary: je,
1305
1309
  selectSummary: Oe,
1306
1310
  unselectSummary: qe
1307
- }, Symbol.toStringTag, { value: "Module" })), Fe = {}, Ge = {
1311
+ }, Symbol.toStringTag, { value: "Module" })), Fe = {}, Ie = {
1308
1312
  getObjById: mt,
1309
1313
  generateNewObj: Mt,
1310
- layout: Tt,
1311
- linkDiv: Xt,
1314
+ layout: Nt,
1315
+ linkDiv: jt,
1312
1316
  editTopic: Vt,
1313
1317
  createWrapper: Ht,
1314
1318
  createParent: Pt,
1315
1319
  createChildren: Bt,
1316
1320
  createTopic: zt,
1317
1321
  findEle: M,
1318
- changeTheme: se,
1322
+ changeTheme: ne,
1319
1323
  ...Me,
1320
1324
  ...Fe,
1321
1325
  ...Pe,
@@ -1323,24 +1327,24 @@ const ie = function(e, t, s) {
1323
1327
  init(e) {
1324
1328
  if (!e || !e.nodeData)
1325
1329
  return new Error("MindElixir: `data` is required");
1326
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, Q(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && It(this), ee(this), this.toCenter(), this.layout(), this.linkDiv();
1330
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, Q(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Gt(this), ee(this), this.toCenter(), this.layout(), this.linkDiv();
1327
1331
  }
1328
- }, X = document;
1332
+ }, j = document;
1329
1333
  function $({
1330
1334
  el: e,
1331
1335
  direction: t,
1332
- locale: s,
1336
+ locale: n,
1333
1337
  draggable: i,
1334
- editable: n,
1338
+ editable: s,
1335
1339
  contextMenu: o,
1336
1340
  contextMenuOption: l,
1337
1341
  toolBar: r,
1338
- keypress: a,
1339
- before: u,
1342
+ keypress: h,
1343
+ before: f,
1340
1344
  newTopicName: d,
1341
- allowUndo: h,
1345
+ allowUndo: a,
1342
1346
  mainLinkStyle: c,
1343
- subLinkStyle: f,
1347
+ subLinkStyle: u,
1344
1348
  overflowHidden: g,
1345
1349
  mobileMenu: m,
1346
1350
  theme: p
@@ -1350,19 +1354,19 @@ function $({
1350
1354
  const y = Object.prototype.toString.call(e);
1351
1355
  if (y === "[object HTMLDivElement]" ? v = e : y === "[object String]" && (v = document.querySelector(e)), !v)
1352
1356
  throw new Error("MindElixir: el is not a valid element");
1353
- v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = u || {}, this.locale = s || "en", this.contextMenuOption = l, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = r === void 0 ? !0 : r, this.keypress = a === void 0 ? !0 : a, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = i === void 0 ? !0 : i, this.newTopicName = d || "new node", this.editable = n === void 0 ? !0 : n, this.allowUndo = h === void 0 ? !1 : h, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = c || 0, this.subLinkStyle = f || 0, this.overflowHidden = g || !1, this.bus = kt.create(), this.container = X.createElement("div"), this.container.className = "map-container";
1357
+ v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", S + "px"), this.mindElixirBox = v, this.before = f || {}, this.locale = n || "en", this.contextMenuOption = l, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = r === void 0 ? !0 : r, this.keypress = h === void 0 ? !0 : h, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = i === void 0 ? !0 : i, this.newTopicName = d || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = a === void 0 ? !1 : a, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = c || 0, this.subLinkStyle = u || 0, this.overflowHidden = g || !1, this.bus = kt.create(), this.container = j.createElement("div"), this.container.className = "map-container";
1354
1358
  const x = window.matchMedia("(prefers-color-scheme: dark)");
1355
1359
  this.theme = p || (x.matches ? pt : ft);
1356
- const _ = X.createElement("div");
1357
- _.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = X.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = j("lines"), this.summarySvg = j("summary"), this.linkController = j("linkcontroller"), this.P2 = X.createElement("div"), this.P3 = X.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = nt(0, 0, 0, 0), this.line2 = nt(0, 0, 0, 0), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = j("topiclinks"), this.map.appendChild(this.nodes), this.map.appendChild(this.linkController), this.map.appendChild(this.linkSvgGroup), this.map.appendChild(this.P2), this.map.appendChild(this.P3), this.overflowHidden ? this.container.style.overflow = "hidden" : $t(this);
1360
+ const _ = j.createElement("div");
1361
+ _.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = j.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = j.createElement("div"), this.P3 = j.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = st(0, 0, 0, 0), this.line2 = st(0, 0, 0, 0), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.map.appendChild(this.linkController), this.map.appendChild(this.linkSvgGroup), this.map.appendChild(this.P2), this.map.appendChild(this.P3), this.overflowHidden ? this.container.style.overflow = "hidden" : $t(this);
1358
1362
  }
1359
- $.prototype = Ge;
1363
+ $.prototype = Ie;
1360
1364
  $.LEFT = q;
1361
1365
  $.RIGHT = K;
1362
- $.SIDE = I;
1366
+ $.SIDE = G;
1363
1367
  $.THEME = ft;
1364
1368
  $.DARK_THEME = pt;
1365
- $.version = "3.0.5-beta.1";
1369
+ $.version = "3.1.0";
1366
1370
  $.E = M;
1367
1371
  export {
1368
1372
  $ as default